diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/src/api/order.js b/src/api/order.js index eb8b5cf..6136038 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -81,3 +81,30 @@ }); } + +// business/workOrder/listWorkOrderDept +export function listWorkOrderDept(query) { + return request({ + url: '/business/workOrder/listWorkOrderDept', + method: 'get', + params: query, + }); +} + +// business/workOrder/listWorkOrderHandler +export function listWorkOrderHandler(query) { + return request({ + url: '/business/workOrder/listWorkOrderHandler', + method: 'get', + params: query, + }); +} + +// business/workOrder/groupCount +export function groupCount(query) { + return request({ + url: '/business/workOrder/groupCount', + method: 'get', + params: query, + }); +} \ No newline at end of file diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/src/api/order.js b/src/api/order.js index eb8b5cf..6136038 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -81,3 +81,30 @@ }); } + +// business/workOrder/listWorkOrderDept +export function listWorkOrderDept(query) { + return request({ + url: '/business/workOrder/listWorkOrderDept', + method: 'get', + params: query, + }); +} + +// business/workOrder/listWorkOrderHandler +export function listWorkOrderHandler(query) { + return request({ + url: '/business/workOrder/listWorkOrderHandler', + method: 'get', + params: query, + }); +} + +// business/workOrder/groupCount +export function groupCount(query) { + return request({ + url: '/business/workOrder/groupCount', + method: 'get', + params: query, + }); +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 41843e4..9ee25c3 100644 --- a/src/main.js +++ b/src/main.js @@ -57,6 +57,11 @@ //空数据组件 import Empty from '@/components/Empty'; +// 持久化存储pinia +import piniaPluginPersist from 'pinia-plugin-persist'; + +store.use(piniaPluginPersist); + const app = createApp(App); // 全局方法挂载 diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/src/api/order.js b/src/api/order.js index eb8b5cf..6136038 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -81,3 +81,30 @@ }); } + +// business/workOrder/listWorkOrderDept +export function listWorkOrderDept(query) { + return request({ + url: '/business/workOrder/listWorkOrderDept', + method: 'get', + params: query, + }); +} + +// business/workOrder/listWorkOrderHandler +export function listWorkOrderHandler(query) { + return request({ + url: '/business/workOrder/listWorkOrderHandler', + method: 'get', + params: query, + }); +} + +// business/workOrder/groupCount +export function groupCount(query) { + return request({ + url: '/business/workOrder/groupCount', + method: 'get', + params: query, + }); +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 41843e4..9ee25c3 100644 --- a/src/main.js +++ b/src/main.js @@ -57,6 +57,11 @@ //空数据组件 import Empty from '@/components/Empty'; +// 持久化存储pinia +import piniaPluginPersist from 'pinia-plugin-persist'; + +store.use(piniaPluginPersist); + const app = createApp(App); // 全局方法挂载 diff --git a/src/store/modules/order.js b/src/store/modules/order.js index 3dfbb10..d5c2aec 100644 --- a/src/store/modules/order.js +++ b/src/store/modules/order.js @@ -1,4 +1,5 @@ import { listDept } from '@/api/system/dept'; // 部门 +import { listWorkOrderDept, listWorkOrderHandler } from '@/api/order'; // 部门 import { listUser } from '@/api/system/user'; import { handleTree } from '@/utils/ruoyi'; @@ -17,17 +18,31 @@ status: undefined, } */ - listDept(data).then(response => { + listWorkOrderDept(data).then(response => { this.deptList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listDept ~ this.deptList:', this.deptList, response); }); }, getUserList(data = {}) { - listUser(data).then(response => { + listWorkOrderHandler(data).then(response => { this.userList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listUser ~ this.userList:', this.userList, response); }); }, }, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + // 自定义key + // key: "userInfo", + // 自定义存储方式,默认 sessionStorage + storage: sessionStorage, + // 指定要持久化的数据,默认所有 state 都会进行缓存,可以通过 paths 指定要持久化的字段,其他的则不会进行持久化。 + paths: ['deptList'], + }, + ], + }, }); export default useOrderStore; diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/src/api/order.js b/src/api/order.js index eb8b5cf..6136038 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -81,3 +81,30 @@ }); } + +// business/workOrder/listWorkOrderDept +export function listWorkOrderDept(query) { + return request({ + url: '/business/workOrder/listWorkOrderDept', + method: 'get', + params: query, + }); +} + +// business/workOrder/listWorkOrderHandler +export function listWorkOrderHandler(query) { + return request({ + url: '/business/workOrder/listWorkOrderHandler', + method: 'get', + params: query, + }); +} + +// business/workOrder/groupCount +export function groupCount(query) { + return request({ + url: '/business/workOrder/groupCount', + method: 'get', + params: query, + }); +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 41843e4..9ee25c3 100644 --- a/src/main.js +++ b/src/main.js @@ -57,6 +57,11 @@ //空数据组件 import Empty from '@/components/Empty'; +// 持久化存储pinia +import piniaPluginPersist from 'pinia-plugin-persist'; + +store.use(piniaPluginPersist); + const app = createApp(App); // 全局方法挂载 diff --git a/src/store/modules/order.js b/src/store/modules/order.js index 3dfbb10..d5c2aec 100644 --- a/src/store/modules/order.js +++ b/src/store/modules/order.js @@ -1,4 +1,5 @@ import { listDept } from '@/api/system/dept'; // 部门 +import { listWorkOrderDept, listWorkOrderHandler } from '@/api/order'; // 部门 import { listUser } from '@/api/system/user'; import { handleTree } from '@/utils/ruoyi'; @@ -17,17 +18,31 @@ status: undefined, } */ - listDept(data).then(response => { + listWorkOrderDept(data).then(response => { this.deptList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listDept ~ this.deptList:', this.deptList, response); }); }, getUserList(data = {}) { - listUser(data).then(response => { + listWorkOrderHandler(data).then(response => { this.userList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listUser ~ this.userList:', this.userList, response); }); }, }, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + // 自定义key + // key: "userInfo", + // 自定义存储方式,默认 sessionStorage + storage: sessionStorage, + // 指定要持久化的数据,默认所有 state 都会进行缓存,可以通过 paths 指定要持久化的字段,其他的则不会进行持久化。 + paths: ['deptList'], + }, + ], + }, }); export default useOrderStore; diff --git a/src/views/index.vue b/src/views/index.vue index 9558cf5..9ab8a50 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -121,7 +121,7 @@ AllData.BottmBackGroundShow = true; orderStore.getDeptList(); - orderStore.getUserList(); + // orderStore.getUserList(); }); onBeforeUnmount(() => { clearInterval(timer.value); diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/src/api/order.js b/src/api/order.js index eb8b5cf..6136038 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -81,3 +81,30 @@ }); } + +// business/workOrder/listWorkOrderDept +export function listWorkOrderDept(query) { + return request({ + url: '/business/workOrder/listWorkOrderDept', + method: 'get', + params: query, + }); +} + +// business/workOrder/listWorkOrderHandler +export function listWorkOrderHandler(query) { + return request({ + url: '/business/workOrder/listWorkOrderHandler', + method: 'get', + params: query, + }); +} + +// business/workOrder/groupCount +export function groupCount(query) { + return request({ + url: '/business/workOrder/groupCount', + method: 'get', + params: query, + }); +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 41843e4..9ee25c3 100644 --- a/src/main.js +++ b/src/main.js @@ -57,6 +57,11 @@ //空数据组件 import Empty from '@/components/Empty'; +// 持久化存储pinia +import piniaPluginPersist from 'pinia-plugin-persist'; + +store.use(piniaPluginPersist); + const app = createApp(App); // 全局方法挂载 diff --git a/src/store/modules/order.js b/src/store/modules/order.js index 3dfbb10..d5c2aec 100644 --- a/src/store/modules/order.js +++ b/src/store/modules/order.js @@ -1,4 +1,5 @@ import { listDept } from '@/api/system/dept'; // 部门 +import { listWorkOrderDept, listWorkOrderHandler } from '@/api/order'; // 部门 import { listUser } from '@/api/system/user'; import { handleTree } from '@/utils/ruoyi'; @@ -17,17 +18,31 @@ status: undefined, } */ - listDept(data).then(response => { + listWorkOrderDept(data).then(response => { this.deptList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listDept ~ this.deptList:', this.deptList, response); }); }, getUserList(data = {}) { - listUser(data).then(response => { + listWorkOrderHandler(data).then(response => { this.userList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listUser ~ this.userList:', this.userList, response); }); }, }, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + // 自定义key + // key: "userInfo", + // 自定义存储方式,默认 sessionStorage + storage: sessionStorage, + // 指定要持久化的数据,默认所有 state 都会进行缓存,可以通过 paths 指定要持久化的字段,其他的则不会进行持久化。 + paths: ['deptList'], + }, + ], + }, }); export default useOrderStore; diff --git a/src/views/index.vue b/src/views/index.vue index 9558cf5..9ab8a50 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -121,7 +121,7 @@ AllData.BottmBackGroundShow = true; orderStore.getDeptList(); - orderStore.getUserList(); + // orderStore.getUserList(); }); onBeforeUnmount(() => { clearInterval(timer.value); diff --git a/src/views/order/components/orderDia.vue b/src/views/order/components/orderDia.vue index 8a62412..4cb1241 100644 --- a/src/views/order/components/orderDia.vue +++ b/src/views/order/components/orderDia.vue @@ -113,17 +113,17 @@
附件
-
+
+ +
+
处理详情
+
+
+
处理意见:
+
{{ orderForm.handleComment }}
+
+
+
处理照片:
+
+
+ +
+
+
+
+ +
+
事务操作
@@ -233,12 +288,14 @@ - + + + @@ -268,15 +325,17 @@ - + - + + + @@ -326,7 +385,7 @@ - + @@ -335,7 +394,7 @@
+
处理明细
@@ -437,8 +497,12 @@ import phone_icon from '@/assets/images/order/phone_icon.png'; import shortMessage_icon from '@/assets/images/order/shortMessage_icon.png'; import { getWorkOrder, listHistoryData, submitWorkOrder } from '@/api/order'; -import { onMounted, ref } from 'vue'; +import bus from '@/bus'; import useUserStore from '@/store/modules/user'; +import useOrderStore from '@/store/modules/order'; + +const useOrder = useOrderStore(); +console.log('deptList===========', useOrder, useUserStore().userInfo); const { proxy } = getCurrentInstance(); // 工单类型: work_order_type @@ -488,7 +552,7 @@ }, orderForm: {}, handleProcess: { - active: 4, + active: 0, // 'wait' | 'process' | 'finish' | 'error' | 'success' // 等待还未进行 进行 完成 错误 成功 dataList: [], @@ -505,6 +569,10 @@ type: '1', approveResult: '', approveComment: '', + nextTaskApproveRoleId: '', + nextTaskApproveUserId: '', + handlePicList: [], + handleComment: '', fileSaveRequestList: [ // { // name: 'food.jpeg', @@ -524,146 +592,6 @@ // }, ], }, - presonThreeData: [ - { - value: '1', - label: 'Level one 1', - children: [ - { - value: '1-1', - label: 'Level two 1-1', - children: [ - { - value: '1-1-1', - label: 'Level three 1-1-1', - }, - ], - }, - ], - }, - { - value: '2', - label: 'Level one 2', - children: [ - { - value: '2-1', - label: 'Level two 2-1', - children: [ - { - value: '2-1-1', - label: 'Level three 2-1-1', - }, - ], - }, - { - value: '2-2', - label: 'Level two 2-2', - children: [ - { - value: '2-2-1', - label: 'Level three 2-2-1', - }, - ], - }, - ], - }, - { - value: '3', - label: 'Level one 3', - children: [ - { - value: '3-1', - label: 'Level two 3-1', - children: [ - { - value: '3-1-1', - label: 'Level three 3-1-1', - }, - ], - }, - { - value: '3-2', - label: 'Level two 3-2', - children: [ - { - value: '3-2-1', - label: 'Level three 3-2-1', - }, - ], - }, - ], - }, - ], - threeData: [ - { - value: '1', - label: 'Level one 1', - children: [ - { - value: '1-1', - label: 'Level two 1-1', - children: [ - { - value: '1-1-1', - label: 'Level three 1-1-1', - }, - ], - }, - ], - }, - { - value: '2', - label: 'Level one 2', - children: [ - { - value: '2-1', - label: 'Level two 2-1', - children: [ - { - value: '2-1-1', - label: 'Level three 2-1-1', - }, - ], - }, - { - value: '2-2', - label: 'Level two 2-2', - children: [ - { - value: '2-2-1', - label: 'Level three 2-2-1', - }, - ], - }, - ], - }, - { - value: '3', - label: 'Level one 3', - children: [ - { - value: '3-1', - label: 'Level two 3-1', - children: [ - { - value: '3-1-1', - label: 'Level three 3-1-1', - }, - ], - }, - { - value: '3-2', - label: 'Level two 3-2', - children: [ - { - value: '3-2-1', - label: 'Level three 3-2-1', - }, - ], - }, - ], - }, - ], historyParams: { workflowKey: 'WorkOrder', fileRefFieldPattern: 'picture', @@ -671,19 +599,23 @@ }, }); -const { rules, orderForm, handleProcess, confirmForm, threeData, presonThreeData, historyParams } = toRefs(orderData); +const { rules, orderForm, handleProcess, confirmForm, historyParams } = toRefs(orderData); // 详情 const getDetail = () => { infoLoading.value = true; getWorkOrder(props.orderId).then(res => { - console.log('----------', res); + // console.log('----------', res); orderForm.value = res.data; handleProcess.value.dataList = res.data.workOrderWorkFlowStepVo?.workOrderWorkFlowHistoryVoList; handleProcess.value.timeStep = res.data.workOrderWorkFlowStepVo?.timeStepList; // previousOperation handleProcess.value.operation = res.data.previousOperation?.operation || ''; handleProcess.value.operationTime = res.data.previousOperation?.operationTime || ''; + const processIndex = handleProcess.value.dataList.findIndex(item => item.processStatus === 'process'); + if (processIndex !== -1) { + handleProcess.value.active = processIndex + 1; + } infoLoading.value = false; }); @@ -702,14 +634,18 @@ if (!formRef) return; formRef.validate(valid => { if (valid) { + if (props.status == 'report') { + confirmForm.value.handleComment = confirmForm.value.approveComment; + } confirmForm.value.approveResult = confirmForm.value.type == '1' ? 'true' : 'false'; confirmForm.value.id = props.orderId; - console.log('🚀 ~ handleSubmit ~ valid:', valid, confirmForm.value); + // console.log('🚀 ~ handleSubmit ~ valid:', valid, confirmForm.value); submitWorkOrder(confirmForm.value).then(response => { proxy.$modal.msgSuccess('提交成功'); // getList(); emit('getList'); emit('closeDialog'); + bus.emit('orderTitleList'); }); } }); @@ -720,7 +656,10 @@ }; onMounted(() => { - getHistoryData(); + useOrder.getUserList({ workOrderId: props.orderId }); + if (props.status == 'xiangqing') { + getHistoryData(); + } getDetail(); }); @@ -803,6 +742,11 @@ margin-right: 15px; } } + .detailInfo { + display: flex; + align-items: center; + margin-bottom: 5px; + } } } .boxBtn { diff --git a/package.json b/package.json index 508d1f7..de6909c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nprogress": "0.2.0", "ol": "^6.4.3", "pinia": "2.0.22", + "pinia-plugin-persist": "^1.0.0", "swiper": "^8.0.4", "three": "^0.125.2", "vue": "3.2.45", diff --git a/src/api/order.js b/src/api/order.js index eb8b5cf..6136038 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -81,3 +81,30 @@ }); } + +// business/workOrder/listWorkOrderDept +export function listWorkOrderDept(query) { + return request({ + url: '/business/workOrder/listWorkOrderDept', + method: 'get', + params: query, + }); +} + +// business/workOrder/listWorkOrderHandler +export function listWorkOrderHandler(query) { + return request({ + url: '/business/workOrder/listWorkOrderHandler', + method: 'get', + params: query, + }); +} + +// business/workOrder/groupCount +export function groupCount(query) { + return request({ + url: '/business/workOrder/groupCount', + method: 'get', + params: query, + }); +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 41843e4..9ee25c3 100644 --- a/src/main.js +++ b/src/main.js @@ -57,6 +57,11 @@ //空数据组件 import Empty from '@/components/Empty'; +// 持久化存储pinia +import piniaPluginPersist from 'pinia-plugin-persist'; + +store.use(piniaPluginPersist); + const app = createApp(App); // 全局方法挂载 diff --git a/src/store/modules/order.js b/src/store/modules/order.js index 3dfbb10..d5c2aec 100644 --- a/src/store/modules/order.js +++ b/src/store/modules/order.js @@ -1,4 +1,5 @@ import { listDept } from '@/api/system/dept'; // 部门 +import { listWorkOrderDept, listWorkOrderHandler } from '@/api/order'; // 部门 import { listUser } from '@/api/system/user'; import { handleTree } from '@/utils/ruoyi'; @@ -17,17 +18,31 @@ status: undefined, } */ - listDept(data).then(response => { + listWorkOrderDept(data).then(response => { this.deptList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listDept ~ this.deptList:', this.deptList, response); }); }, getUserList(data = {}) { - listUser(data).then(response => { + listWorkOrderHandler(data).then(response => { this.userList = handleTree(response.data, 'deptId'); console.log('🚀 ~ listUser ~ this.userList:', this.userList, response); }); }, }, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + // 自定义key + // key: "userInfo", + // 自定义存储方式,默认 sessionStorage + storage: sessionStorage, + // 指定要持久化的数据,默认所有 state 都会进行缓存,可以通过 paths 指定要持久化的字段,其他的则不会进行持久化。 + paths: ['deptList'], + }, + ], + }, }); export default useOrderStore; diff --git a/src/views/index.vue b/src/views/index.vue index 9558cf5..9ab8a50 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -121,7 +121,7 @@ AllData.BottmBackGroundShow = true; orderStore.getDeptList(); - orderStore.getUserList(); + // orderStore.getUserList(); }); onBeforeUnmount(() => { clearInterval(timer.value); diff --git a/src/views/order/components/orderDia.vue b/src/views/order/components/orderDia.vue index 8a62412..4cb1241 100644 --- a/src/views/order/components/orderDia.vue +++ b/src/views/order/components/orderDia.vue @@ -113,17 +113,17 @@
附件
-
+
+ +
+
处理详情
+
+
+
处理意见:
+
{{ orderForm.handleComment }}
+
+
+
处理照片:
+
+
+ +
+
+
+
+ +
+
事务操作
@@ -233,12 +288,14 @@ - + + + @@ -268,15 +325,17 @@ - + - + + + @@ -326,7 +385,7 @@ - + @@ -335,7 +394,7 @@
+
处理明细
@@ -437,8 +497,12 @@ import phone_icon from '@/assets/images/order/phone_icon.png'; import shortMessage_icon from '@/assets/images/order/shortMessage_icon.png'; import { getWorkOrder, listHistoryData, submitWorkOrder } from '@/api/order'; -import { onMounted, ref } from 'vue'; +import bus from '@/bus'; import useUserStore from '@/store/modules/user'; +import useOrderStore from '@/store/modules/order'; + +const useOrder = useOrderStore(); +console.log('deptList===========', useOrder, useUserStore().userInfo); const { proxy } = getCurrentInstance(); // 工单类型: work_order_type @@ -488,7 +552,7 @@ }, orderForm: {}, handleProcess: { - active: 4, + active: 0, // 'wait' | 'process' | 'finish' | 'error' | 'success' // 等待还未进行 进行 完成 错误 成功 dataList: [], @@ -505,6 +569,10 @@ type: '1', approveResult: '', approveComment: '', + nextTaskApproveRoleId: '', + nextTaskApproveUserId: '', + handlePicList: [], + handleComment: '', fileSaveRequestList: [ // { // name: 'food.jpeg', @@ -524,146 +592,6 @@ // }, ], }, - presonThreeData: [ - { - value: '1', - label: 'Level one 1', - children: [ - { - value: '1-1', - label: 'Level two 1-1', - children: [ - { - value: '1-1-1', - label: 'Level three 1-1-1', - }, - ], - }, - ], - }, - { - value: '2', - label: 'Level one 2', - children: [ - { - value: '2-1', - label: 'Level two 2-1', - children: [ - { - value: '2-1-1', - label: 'Level three 2-1-1', - }, - ], - }, - { - value: '2-2', - label: 'Level two 2-2', - children: [ - { - value: '2-2-1', - label: 'Level three 2-2-1', - }, - ], - }, - ], - }, - { - value: '3', - label: 'Level one 3', - children: [ - { - value: '3-1', - label: 'Level two 3-1', - children: [ - { - value: '3-1-1', - label: 'Level three 3-1-1', - }, - ], - }, - { - value: '3-2', - label: 'Level two 3-2', - children: [ - { - value: '3-2-1', - label: 'Level three 3-2-1', - }, - ], - }, - ], - }, - ], - threeData: [ - { - value: '1', - label: 'Level one 1', - children: [ - { - value: '1-1', - label: 'Level two 1-1', - children: [ - { - value: '1-1-1', - label: 'Level three 1-1-1', - }, - ], - }, - ], - }, - { - value: '2', - label: 'Level one 2', - children: [ - { - value: '2-1', - label: 'Level two 2-1', - children: [ - { - value: '2-1-1', - label: 'Level three 2-1-1', - }, - ], - }, - { - value: '2-2', - label: 'Level two 2-2', - children: [ - { - value: '2-2-1', - label: 'Level three 2-2-1', - }, - ], - }, - ], - }, - { - value: '3', - label: 'Level one 3', - children: [ - { - value: '3-1', - label: 'Level two 3-1', - children: [ - { - value: '3-1-1', - label: 'Level three 3-1-1', - }, - ], - }, - { - value: '3-2', - label: 'Level two 3-2', - children: [ - { - value: '3-2-1', - label: 'Level three 3-2-1', - }, - ], - }, - ], - }, - ], historyParams: { workflowKey: 'WorkOrder', fileRefFieldPattern: 'picture', @@ -671,19 +599,23 @@ }, }); -const { rules, orderForm, handleProcess, confirmForm, threeData, presonThreeData, historyParams } = toRefs(orderData); +const { rules, orderForm, handleProcess, confirmForm, historyParams } = toRefs(orderData); // 详情 const getDetail = () => { infoLoading.value = true; getWorkOrder(props.orderId).then(res => { - console.log('----------', res); + // console.log('----------', res); orderForm.value = res.data; handleProcess.value.dataList = res.data.workOrderWorkFlowStepVo?.workOrderWorkFlowHistoryVoList; handleProcess.value.timeStep = res.data.workOrderWorkFlowStepVo?.timeStepList; // previousOperation handleProcess.value.operation = res.data.previousOperation?.operation || ''; handleProcess.value.operationTime = res.data.previousOperation?.operationTime || ''; + const processIndex = handleProcess.value.dataList.findIndex(item => item.processStatus === 'process'); + if (processIndex !== -1) { + handleProcess.value.active = processIndex + 1; + } infoLoading.value = false; }); @@ -702,14 +634,18 @@ if (!formRef) return; formRef.validate(valid => { if (valid) { + if (props.status == 'report') { + confirmForm.value.handleComment = confirmForm.value.approveComment; + } confirmForm.value.approveResult = confirmForm.value.type == '1' ? 'true' : 'false'; confirmForm.value.id = props.orderId; - console.log('🚀 ~ handleSubmit ~ valid:', valid, confirmForm.value); + // console.log('🚀 ~ handleSubmit ~ valid:', valid, confirmForm.value); submitWorkOrder(confirmForm.value).then(response => { proxy.$modal.msgSuccess('提交成功'); // getList(); emit('getList'); emit('closeDialog'); + bus.emit('orderTitleList'); }); } }); @@ -720,7 +656,10 @@ }; onMounted(() => { - getHistoryData(); + useOrder.getUserList({ workOrderId: props.orderId }); + if (props.status == 'xiangqing') { + getHistoryData(); + } getDetail(); }); @@ -803,6 +742,11 @@ margin-right: 15px; } } + .detailInfo { + display: flex; + align-items: center; + margin-bottom: 5px; + } } } .boxBtn { diff --git a/src/views/order/workOrderProcessing/components/registerOrder.vue b/src/views/order/workOrderProcessing/components/registerOrder.vue index 2bb4f7a..299a895 100644 --- a/src/views/order/workOrderProcessing/components/registerOrder.vue +++ b/src/views/order/workOrderProcessing/components/registerOrder.vue @@ -87,6 +87,19 @@ + + + + + + + @@ -803,6 +742,11 @@ margin-right: 15px; } } + .detailInfo { + display: flex; + align-items: center; + margin-bottom: 5px; + } } } .boxBtn { diff --git a/src/views/order/workOrderProcessing/components/registerOrder.vue b/src/views/order/workOrderProcessing/components/registerOrder.vue index 2bb4f7a..299a895 100644 --- a/src/views/order/workOrderProcessing/components/registerOrder.vue +++ b/src/views/order/workOrderProcessing/components/registerOrder.vue @@ -87,6 +87,19 @@ + + + + + + +