From 7859c063db5effe91f2418056e70b848177a3628 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 14 八月 2025 10:51:29 +0800 Subject: [PATCH] 1、保养规范审批流程根据规范分类区分展示保养项明细 2、调整二保批量新增功能 --- src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue | 180 +++++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 123 insertions(+), 57 deletions(-) diff --git a/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue b/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue index 988848e..dc08948 100644 --- a/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue +++ b/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue @@ -74,25 +74,67 @@ </a-col> <a-col :span="10" class="scroll-col"> - <a-tabs default-active-key="1"> - <a-tab-pane key="1" tab="淇濆吇椤规槑缁�"> - <j-vxe-table ref="editableDetailTable" bordered alwaysEdit keep-source :dataSource="detail.dataSource" - :columns="detail.columns"> - <template v-slot:itemCategory="props"> - <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> - </template> - </j-vxe-table> - </a-tab-pane> + <a-tabs v-model="activeTabKey"> + <template v-if="model.maintenanceCategory==='POINT_INSPECTION'"> + <a-tab-pane key="1" tab="鏃ョ偣妫�"> + <j-vxe-table bordered alwaysEdit keep-source :dataSource="detail.dataSource1" + :columns="detail.columns"> + <template v-slot:itemCategory="props"> + <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> + </template> + </j-vxe-table> + </a-tab-pane> + + <a-tab-pane key="2" tab="鍛ㄧ偣妫�"> + <j-vxe-table bordered alwaysEdit keep-source :dataSource="detail.dataSource2" + :columns="detail.columns"> + <template v-slot:itemCategory="props"> + <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> + </template> + </j-vxe-table> + </a-tab-pane> + </template> + + <template v-if="model.maintenanceCategory==='SECOND_MAINTENANCE'"> + <a-tab-pane key="1" tab="鎿嶄綔宸�"> + <j-vxe-table bordered alwaysEdit keep-source :dataSource="detail.dataSource1" + :columns="detail.columns"> + <template v-slot:itemCategory="props"> + <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> + </template> + </j-vxe-table> + </a-tab-pane> + + <a-tab-pane key="2" tab="缁翠慨宸�"> + <j-vxe-table bordered alwaysEdit keep-source :dataSource="detail.dataSource2" + :columns="detail.columns"> + <template v-slot:itemCategory="props"> + <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> + </template> + </j-vxe-table> + </a-tab-pane> + </template> + + <template v-if="model.maintenanceCategory==='THIRD_MAINTENANCE'"> + <a-tab-pane key="1" tab="涓変繚"> + <j-vxe-table bordered alwaysEdit keep-source :dataSource="detail.dataSource1" + :columns="detail.columns"> + <template v-slot:itemCategory="props"> + <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> + </template> + </j-vxe-table> + </a-tab-pane> + </template> <template v-if="selectShenpiData.processDefinitionKey"> - <a-tab-pane key='2' tab='娴佺▼鍥�'> + <a-tab-pane key='3' tab='娴佺▼鍥�'> <img :src="imageSrc" alt="Fetched Image"/> </a-tab-pane> </template> - <a-tab-pane key='3' tab='娴佽浆鑺傜偣'> + <a-tab-pane key='4' tab='娴佽浆鑺傜偣'> <a-card> - <a-timeline style="padding:0 1% 0 12%" > + <a-timeline style="padding:0 1% 0 12%"> <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> <div class="bottom"> <p>澶勭悊浜猴細{{item.assignee_dictText}}</p> @@ -177,6 +219,7 @@ confirmLoading: false, spinning: false, model: {}, + hitaskDataSource: [], validatorRules: { repairManagerApproveResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], technicalManagerApproveResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }] @@ -191,6 +234,7 @@ sm: { span: 16 } }, visible: false, + activeTabKey: '1', // 琛ㄥご url: { diagramView: '/assign/flow/diagramView', @@ -200,9 +244,9 @@ detailList: '/eam/eamMaintenanceStandardDetail/queryList' }, detail: { - dataSource: [], + dataSource1: [], + dataSource2: [], columns: [], - hitaskDataSource:[], inspectionColumns: [ { title: 'ID', @@ -218,16 +262,17 @@ title: '椤圭洰搴忓彿', key: 'itemCode', type: JVXETypes.normal, - align: 'center' - }, - { - title: '淇濆吇椤瑰垎绫�', - key: 'itemCategory', - type: JVXETypes.slot, - slotName: 'itemCategory', align: 'center', - disabled: true + width: 100 }, + // { + // title: '淇濆吇椤瑰垎绫�', + // key: 'itemCategory', + // type: JVXETypes.slot, + // slotName: 'itemCategory', + // align: 'center', + // disabled: true + // }, { title: '淇濆吇椤圭洰', key: 'itemName', @@ -256,16 +301,17 @@ title: '椤圭洰搴忓彿', key: 'itemCode', type: JVXETypes.normal, - align: 'center' - }, - { - title: '淇濆吇椤瑰垎绫�', - key: 'itemCategory', - type: JVXETypes.slot, - slotName: 'itemCategory', align: 'center', - disabled: true + width: 100 }, + // { + // title: '淇濆吇椤瑰垎绫�', + // key: 'itemCategory', + // type: JVXETypes.slot, + // slotName: 'itemCategory', + // align: 'center', + // disabled: true + // }, { title: '淇濆吇椤圭洰', key: 'itemName', @@ -332,11 +378,11 @@ }, computed: { displayRepairLeaderFlag() { - return this.model.standardStatus && ['WAIT_REPAIR_DIRECTOR', 'WAIT_TECHNICAL_DIRECTOR', 'REJECTED'].includes(this.model.standardStatus) + return this.model.standardStatus && ['WAIT_REPAIR_DIRECTOR', 'WAIT_TECHNICAL_DIRECTOR', 'START', 'REJECTED'].includes(this.model.standardStatus) }, displayTechnicalDirectorFlag() { - return this.model.standardStatus && ['WAIT_TECHNICAL_DIRECTOR', 'REJECTED'].includes(this.model.standardStatus) && this.model.repairManagerApproveResult === '1' + return this.model.standardStatus && ['WAIT_TECHNICAL_DIRECTOR', 'START', 'REJECTED'].includes(this.model.standardStatus) && this.model.repairManagerApproveResult === '1' }, encodedDictCode() { @@ -350,6 +396,7 @@ * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 */ handleApprove(record) { + this.activeTabKey = '1' this.getBasicInformationByApi(record) this.getFlowChartImageByApi(record) this.getFlowTaskListByApi(record) @@ -360,15 +407,13 @@ * @param record */ getFlowTaskListByApi(record) { - console.log("sss",record) - let parmhis={ + let parmhis = { 'procInstId': record.procInstId } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result + getAction(this.url.queryHisTaskList, parmhis).then(res => { + this.hitaskDataSource = res.result }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) + this.visible = true ) }, @@ -377,8 +422,10 @@ * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 */ handleDetail(record) { - this.detail.dataSource = [] + this.activeTabKey = '1' + this.detail.dataSource1 = this.detail.dataSource2 = [] this.model = Object.assign({}, record) + this.getFlowTaskListByApi(record) this.loadDetail(record.id) }, @@ -389,7 +436,7 @@ getBasicInformationByApi(record) { this.spinning = true this.model = {} - this.detail.dataSource = [] + this.detail.dataSource1 = this.detail.dataSource2 = [] const that = this getAction(this.url.queryById, { id: record.dataId }) .then(res => { @@ -440,9 +487,26 @@ * @param dataId 涓氬姟ID */ loadDetail(dataId) { + this.spinning = true getAction(this.url.detailList, { standardId: dataId }) .then(res => { - if (res.success) this.detail.dataSource = res.result + if (res.success) { + switch (this.model.maintenanceCategory) { + case 'POINT_INSPECTION': + this.detail.dataSource1 = res.result.filter(item => item.itemCategory === 'DAY_INSPECTION') + this.detail.dataSource2 = res.result.filter(item => item.itemCategory === 'WEEK_INSPECTION') + break + case 'SECOND_MAINTENANCE': + this.detail.dataSource1 = res.result.filter(item => item.itemCategory === 'OPERATOR_MAINTENANCE') + this.detail.dataSource2 = res.result.filter(item => item.itemCategory === 'REPAIRER_MAINTENANCE') + break + case 'THIRD_MAINTENANCE': + this.detail.dataSource1 = res.result + break + default: + break + } + } }) .finally(() => { this.spinning = false @@ -450,11 +514,6 @@ }, async submitForm() { - let errMap = await this.$refs.editableDetailTable.validateTable() - if (errMap) { - return - } - this.$refs.form.validate(valid => { if (valid) { this.confirmLoading = this.spinning = true @@ -516,6 +575,7 @@ } } } + /* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */ html.submitting, html.submitting body { @@ -561,6 +621,7 @@ background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ } + .btn-custom { background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ color: white; /* 鐧借壊鏂囧瓧 */ @@ -579,13 +640,14 @@ font-weight: bold; font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ } - .left_qiu{ + + .left_qiu { position: absolute; left: -74px; top: 0; - width:54px; + width: 54px; border-radius: 50%; - height:54px; + height: 54px; font-size: 13px; margin: auto; display: flex; @@ -595,20 +657,23 @@ background: #0099ff; transform: translate(0, 0); } - /deep/ .ant-timeline-item-tail{ + + /deep/ .ant-timeline-item-tail { left: -29px !important; } - .left_qiu span{ + + .left_qiu span { width: 3em; display: block; color: #fff; text-align: center; } - .img{ + + .img { width: 75%; } - .wrap{ + .wrap { clear: both; width: 100%; display: flex; @@ -616,13 +681,14 @@ border: 1px solid #ccc; /* background-color: aqua; */ } - .box{ - width:21%; - height:50px; + + .box { + width: 21%; + height: 50px; border-right: 1px solid #ccc; line-height: 50px; /* background: red; */ - text-align:center; + text-align: center; margin: auto; } </style> \ No newline at end of file -- Gitblit v1.9.3