Sfoglia il codice sorgente

修改 对接流程记录

lzm 3 mesi fa
parent
commit
6641bdaea7

+ 3 - 0
common/config/application-api.js

@@ -22,3 +22,6 @@ export const getCareInfo = (data) => http.get(`/dev-api/care/applications/${data
 //护理送审
 export const putCareSend = (params, config = {}) => http.put('/dev-api/care/applications', params, config);
 
+//流程记录列表
+export const getCareRecords = (data) => http.get('/dev-api/care/careRecords/list', data);
+

+ 17 - 6
pages/subpack/pages/application/componenets/page1.vue

@@ -37,10 +37,21 @@
 				<up-textarea v-model="formData.remark" placeholder="请输入您的审批意见" count />
 			</up-form-item>
 		</up-form>
-		<view class="flex-row btn-box">
-			<up-button class="up-button" type="error" style="width: 250rpx;">‌退回</up-button>
-			<view class="btn-place"></view>
-			<up-button class="up-button" type="primary">通过</up-button>
+		<view class="btn-box">
+			<view class="flex-row ">
+				<view class="u-flex flex-column align-center justify-center" style="width: 120rpx;">
+					<u-icon name="file-text-fill" color="#909399" size="24"/>
+					<view>编辑</view>
+				</view>
+				<view style="width: 20rpx;"></view>
+				<up-button class="up-button" type="primary">提交审核</up-button>
+			</view>
+			<!-- <view>
+				<up-button class="up-button" type="error" style="width: 250rpx;">‌退回</up-button>
+				<view class="btn-place"></view>
+				<up-button class="up-button" type="primary">通过</up-button>
+			</view> -->
+			
 		</view>
 	</view>
 </template>
@@ -126,8 +137,8 @@
 		padding: 20rpx 36rpx;
 		background-color: #fff;
 		position: fixed;
-		/* bottom: calc(50px + var(--status-bar-height)); */
-		bottom: 50px;
+		bottom: calc(50px + var(--status-bar-height));
+		/* bottom: 50px; */
 		width: 690rpx;
 
 		.btn-place {

+ 41 - 117
pages/subpack/pages/application/componenets/page3.vue

@@ -4,21 +4,22 @@
 		<view class="flow-list">
 			<up-steps current="2" direction="column">
 				<up-steps-item v-for="(flow, index) in flowList" :key="index" class="position-relative"
-					:title="flow.flowName">
+					:title="flow.nodeTitle">
 					<template #icon>
 						<view class="flow-icon"></view>
 					</template>
 					<template #desc>
 						<view class="position-absolute flow-time" style="top: 0;right: 0;">
-							{{flow.time??' '}}
+							{{flow.createTime??' '}}
 						</view>
 						<view class="flow-des">
 							<view class="flow-des-top">
-								<view>{{flow.name??'匿名'}}</view>
-								<view :class="`flow-des-top-tips flow-des-top-tips${flow.status}`">{{nameHandle(flow)}}</view>
+								<view>{{flow.operateName??'匿名'}}</view>
+								<view :class="`flow-des-top-tips flow-des-top-tips${flow.state}`">{{nameHandle(flow)}}
+								</view>
 							</view>
-							<view :class="`flow-des-des`" v-if="flow.des">
-								{{flow.des}}
+							<view :class="`flow-des-des`" v-if="flow.remark">
+								{{flow.remark}}
 							</view>
 						</view>
 					</template>
@@ -71,9 +72,12 @@
 		ref
 	} from 'vue';
 	import {
-			getDict
-		} from '@/common/status/index.js'
-		
+		getDict
+	} from '@/common/status/index.js';
+	import {
+		getCareRecords
+	} from '@/common/config/application-api.js'
+
 	const props = defineProps({
 		item: {
 			type: Object,
@@ -82,121 +86,41 @@
 			}
 		}
 	})
-	const allFlowKey = {
-		status: {
-			'no_check': {
-				flowIndex: 1,
-				status: 1
-			},
-			'assigned': {
-				flowIndex: 3,
-				status: 2
-			},
-			'wait_assign_company': {
-				flowIndex: 3,
-				status: 1
-			},
-			'disagree': {
-				flowIndex: 2,
-				status: 0
-			},
-			'agree': {
-				flowIndex: 1,
-				status: 2
-			},
-			'wait_check': {
-				flowIndex: 2,
-				status: 1
-			},
-			'wait_assign_nurse': {
-				flowIndex: 4,
-				status: 1
-			},
-			
-		}
-	}
-	
+
 	// 0 不同意 1 待审  2 同意
-	const allFlow = [{
-			flowName: '资料提交',
-			name: '乡镇民政所',
-			time: '2025-01-01 10:20:30',
-			des: '',
-			statusName: '',
-			status: 2,
-		},
-		{
-			flowName: '资料审核',
-			name: '区民政局',
-			time: '2025-01-01 10:20:30',
-			des: '意见:同意开门多少度啥平开门大厦科目都是',
-			statusName: '',
-			status: 2,
-		},
-		{
-			flowName: '指派护理公司',
-			name: '区民政局',
-			time: '2025-01-01 10:20:30',
-			des: '护理要求:要求必须工作做到位',
-			statusName: '',
-			status: 2,
-		},
-		{
-			flowName: '指派护理人员',
-			name: '护理公司',
-			time: '2025-01-01 10:20:30',
-			des: '要求必须工作做到位',
-			statusName: '',
-			status: 2,
-		},
-		{
-			flowName: '护理打卡',
-			name: '王富贵',
-			time: '2025-01-01 10:20:30',
-			des: '打卡6/6次',
-			status: 2,
-		},
-		{
-			flowName: '护理评分',
-			name: '看护人员',
-			time: '2025-01-01 10:20:30',
-			des: '评分:总共100分,评分88分',
-			statusName: '',
-			status: 2,
+	const defaultFlow = [{
+			nodeTitle: '资料提交',
+			operateName: '乡镇民政所',
+			createTime: '',
+			remark: '',
+			state: 0,
 		}
 	]
 	const flowList = ref([])
 
 	function nameHandle(flow) {
 		if (flow.statusName) return flow.statusName;
-		if (flow.status === 0) return '拒绝';
-		if (flow.status === 1) return '待审';
-		if (flow.status === 2) {
-			let {
-				flowName
-			} = flow;
-			if (flowName.includes('提交')) return '提交成功';
-			if (flowName.includes('指派')) return '指派成功';
-			if (flowName.includes('评分')) return '评分成功';
-			if (flowName.includes('打卡')) return '打卡成功';
-			return '同意';
-
-		}
+		if (flow.state == 0) return '未开始';
+		if (flow.state == 1) return '已完成';
+		if (flow.state == 2) return '已退回';
 		return '--'
 	}
-	
-	function initFlowList(){
-		let status = props.item.status;
-		if(allFlowKey.status.hasOwnProperty(status)) {
-			let keyObj = allFlowKey.status[status];
-			flowList.value = allFlow.slice(0, keyObj.flowIndex);
-			flowList.value[flowList.value.length - 1].status = keyObj.status;
-			flowList.value[flowList.value.length - 1].statusName = getDict('care_apply_status', {dictValue: status}).dictLabel;
-		}
-		
+
+	function initFlowList() {
+		getCareRecords({
+			params: {
+				applyId: props.item.applyId
+			}
+		}).then(res => {
+			flowList.value = res;
+			if(flowList.value.length === 0) {
+				flowList.value = [...defaultFlow];
+			}
+		})
+
 	}
-	
-	onMounted(()=>{
+
+	onMounted(() => {
 		initFlowList();
 	})
 </script>
@@ -258,15 +182,15 @@
 				color: #207DFF;
 			}
 
-			&-tips2 {
+			&-tips1 {
 				color: #1FBC99;
 			}
 
-			&-tips1 {
+			&-tips0 {
 				color: #FA7E00;
 			}
 
-			&-tips0 {
+			&-tips2 {
 				color: #fa3534;
 			}
 		}

+ 1 - 1
pages/subpack/pages/application/info.vue

@@ -32,7 +32,7 @@
 		onLoad
 	} from '@dcloudio/uni-app'
 	import { getCareInfo } from '@/common/config/application-api.js'
-	
+	// todo 权限分等级
 	// 计算属性来确定要渲染的组件名称
 	// const pages = [Page1, Page2, Page3];
 	// const currentComponent = computed(() => pages[tabbarIndex.value]);