|
@@ -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;
|
|
|
}
|
|
|
}
|