From 54c22f2f0e98c35e48cdad6c4d0299d08beea630 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期一, 28 七月 2025 10:15:13 +0800 Subject: [PATCH] update --- src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue | 132 ++++++++++++++++++++++++++++++-------------- 1 files changed, 90 insertions(+), 42 deletions(-) diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue index f70bca9..9a8dc93 100644 --- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue +++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue @@ -23,10 +23,23 @@ </a-form-model-item> </a-col> <a-col :span='span'> + <a-form-model-item label="宸ュ崟鐘舵��"> + <a-input readOnly v-model="tableRowRecord.inspectionStatus_dictText"/> + </a-form-model-item> + </a-col> + <a-col :span='span'> <a-form-model-item label="璁惧缂栧彿"> <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId" :maintenanceCategory="'POINT_INSPECTION'" disabled @autocompleteForm="autoCompleteForm"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span='span'> + <a-form-model-item label="瀹夎浣嶇疆"> + <a-input readOnly v-model="tableRowRecord.installationPosition_dictText"/> </a-form-model-item> </a-col> <a-col :span='span'> @@ -34,12 +47,17 @@ <a-input readOnly v-model="tableRowRecord.standardName"/> </a-form-model-item> </a-col> + <a-col :span='span'> + <a-form-model-item label="鏍囧噯缂栫爜"> + <a-input readOnly v-model="tableRowRecord.standardCode"/> + </a-form-model-item> + </a-col> </a-row> <a-row> <a-col :span='span'> - <a-form-model-item label="鏍囧噯缂栫爜"> - <a-input readOnly v-model="tableRowRecord.standardCode"/> + <a-form-model-item label="淇濆吇鍛ㄦ湡"> + <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/> </a-form-model-item> </a-col> <a-col :span='span'> @@ -55,14 +73,20 @@ </a-row> <a-row> + <a-col :span='span'> - <a-form-model-item label="淇濆吇鍛ㄦ湡"> - <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/> + <a-form-model-item label="鐐规浜�"> + <a-input v-model="tableRowRecord.operator_dictText" readOnly/> </a-form-model-item> </a-col> <a-col :span='span'> - <a-form-model-item label="鐐规浜�"> - <a-input v-model="tableRowRecord.operator" readOnly/> + <a-form-model-item label="鐐规浜虹數璇�"> + <a-input v-model="tableRowRecord.operatorPhone_dictText" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="浣滀笟鎸囧"> + <a-button @click="handlePreview(tableRowRecord.referenceFile)" type="primary" icon="eye">棰勮</a-button> </a-form-model-item> </a-col> </a-row> @@ -78,8 +102,8 @@ <a-row> <a-form-model-item prop="imageFilesResult" label="鐐规鍥剧墖" :labelCol="{span:2}" :wrapperCol="{span:21}"> <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" - :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'" - v-model="tableRowRecord.imageFiles"/> + :disabled="isDisableOperation||!hasInspectionDateArrived" + v-model="tableRowRecord.fileList"/> </a-form-model-item> </a-row> @@ -105,7 +129,7 @@ > <template v-slot:inspectionResult="props"> <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result" - :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'" + :disabled="isDisableOperation" placeholder="璇烽�夋嫨鐐规缁撴灉" @change="handleInspectionResultSelectChange($event,props.row)" style="width: 100%"/> @@ -114,13 +138,13 @@ <template v-slot:exceptionDescription="props"> <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" :placeholder="props.row.inspectionResult==='2'?'璇疯緭鍏ュ紓甯告弿杩�':''" - :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'||!props.row.inspectionResult||props.row.inspectionResult==='1'"/> + :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"/> </template> <template v-slot:reportFlag="props"> <j-dict-select-tag v-model="props.row.reportFlag" - :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁淇濅慨':''" - :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'||!props.row.inspectionResult||props.row.inspectionResult==='1'" + :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''" + :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'" dictCode="yn" style="width: 100%"/> </template> @@ -145,12 +169,12 @@ </a-tab-pane> <a-tab-pane key='3' tab='娴佺▼鍥�'> - <img :src="imageSrc" alt="Fetched Image"/>--> + <img :src="imageSrc" alt="Fetched Image"/> </a-tab-pane> </template> <a-button - v-if="selectedRowKeys.length>0&&!disableSubmit&&tableRowRecord.inspectionStatus==='UNDER_INSPECTION'&&hasInspectionDateArrived&&activeTabKey==='1'" + v-if="selectedRowKeys.length>0&&!isDisableOperation&&hasInspectionDateArrived&&activeTabKey==='1'" slot="tabBarExtraContent" type="primary" @click="handleSelectAllInspectionResult">鎵归噺鐐规姝e父 </a-button> @@ -175,8 +199,7 @@ <a-col :span="12"> <a-form-model-item prop="confirmDealType" label="澶勭悊绫诲瀷"> <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected' - :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'" - placeholder="璇烽�夋嫨澶勭悊绫诲瀷"/> + :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"/> </a-form-model-item> </a-col> @@ -191,6 +214,8 @@ </template> </a-form-model> </a-spin> + + <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> </j-modal> </template> @@ -237,10 +262,12 @@ visible: false, // 琛ㄥご url: { - queryBomDataById: '/eam/eamInspectionOrder/selectVoById', + // queryBomDataById: '/eam/eamInspectionOrder/selectVoById', diagramView: '/assign/flow/diagramView', queryHisTaskList: '/assign/flow/queryHisTaskList', - approve: '/eam/eamInspectionOrder/approval' + approve: '/eam/eamInspectionOrder/approval', + queryById: '/eam/eamInspectionOrder/queryById', + detailList: '/eam/eamInspectionOrderDetail/queryList' }, detail: { loading: false, @@ -305,12 +332,11 @@ } ] }, - isDisplayBmp: false, - showBmpButtonLoading: false, selectedRowKeys: [], disableSubmit: false, activeTabKey: '1', - title: '' + title: '', + fileUrl: '', } }, computed: { @@ -319,11 +345,14 @@ }, isDisplayConfirm() { return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.inspectionStatus) + }, + isDisableOperation() { + return this.disableSubmit || this.tableRowRecord.inspectionStatus !== 'UNDER_INSPECTION' } }, methods: { /** - * 鑾峰彇娴佺▼鑺傜偣 + * 鑾峰彇娴佺▼鑺傜偣鍜屾祦绋嬪浘 * @param record 寰呭姙璁板綍淇℃伅 */ getAllApproveData(record) { @@ -356,22 +385,18 @@ * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭� * @param record 寰呭姙璁板綍淇℃伅 */ - getBasicInformation(record) { + async getBasicInformation(record) { this.activeTabKey = '1' - this.tableRowRecord = {} this.detail.dataSource = [] this.spinning = true const param = { id: record.dataId } - const that = this - getAction(this.url.queryBomDataById, param) - .then((res => { - if (res.success) { - that.tableRowRecord = res.result[0] - if (!this.hasInspectionDateArrived && !this.disableSubmit) this.title += `锛堟湭鍒扮偣妫�鏃ユ湡涓嶈兘鎻愬墠鐐规锛塦 - that.detail.dataSource = res.result[0].tableDetailList - console.log('that.tableRowRecord----->', that.tableRowRecord) - } - })) + let res = await getAction(this.url.queryById, param); + this.tableRowRecord = Object.assign({}, res.result); + if (this.tableRowRecord.imageFiles) { + let obj = JSON.parse(this.tableRowRecord.imageFiles) + this.tableRowRecord.fileList = [...obj] + } + await this.loadDetail(record.dataId) }, async submitForm() { @@ -392,6 +417,7 @@ flowTaskVo.values = this.selectShenpiData.variables flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType flowTaskVo.confirmComment = this.tableRowRecord.confirmComment + flowTaskVo.fileList = this.tableRowRecord.fileList flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() const that = this console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo) @@ -415,11 +441,11 @@ }) }, - autoCompleteForm({ standardName, maintenancePeriod, standardCode }) { + autoCompleteForm({ standardName, maintenancePeriod, standardCode, referenceFile }) { this.$set(this.tableRowRecord, 'standardName', standardName) this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod) this.$set(this.tableRowRecord, 'standardCode', standardCode) - this.spinning = false + this.$set(this.tableRowRecord, 'referenceFile', referenceFile) }, // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉 @@ -469,16 +495,38 @@ handleCancel() { this.selectedRowKeys = [] this.visible = false - } + }, + //鏍囧噯閫夋嫨鍙樺寲 + loadDetail(orderId) { + if (orderId) { + getAction(this.url.detailList, { orderId: orderId }) + .then(res => { + if (res.success) { + this.detail.dataSource = [...res.result] + } + }) + .finally(() => { + this.spinning = false + }) + } + }, + handlePreview: function (fileJson) { + if(fileJson) { + let obj = JSON.parse(fileJson) + if(obj.filePath) { + this.$refs.lxFilePreview.preview(obj.filePath); + }else { + that.$message.warning('娌℃湁涓婁紶鎿嶄綔鎸囧鍥剧墖') + } + }else { + that.$message.warning('娌℃湁涓婁紶鎿嶄綔鎸囧鍥剧墖') + } + + }, } } </script> <style scoped> - .btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: #fff; /* 鐧借壊鏂囧瓧 */ - } - /deep/ .ant-select-dropdown-menu { text-align: left; } -- Gitblit v1.9.3