From 251a931a9e001be7c80d63de784ab14d04777200 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 18 四月 2025 09:36:15 +0800 Subject: [PATCH] 1、我的待办页面 设备点检 分类审批弹窗功能逻辑开发并复用至我的已办、流程管理和点检工单页面 2、我的待办页面 设备周保流程 分类审批弹窗功能逻辑调整并复用至周保工单页面 3、周保工单页面以及详情列表功能bug修改 4、点检工单页面及新增弹窗功能bug修改 5、工作流我的待办页面 设备点检 分类详情弹窗样式调整为设备周保流程一致 6、工作流我的待办页面 设备周保流程 分类详情弹窗保养明细列表功能逻辑调整 --- src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue | 554 +++++---- /dev/null | 364 ------ src/views/eam/maintenance/EamInspectionOrderList.vue | 33 src/views/flowable/workflow/FlowLedger.vue | 351 ++--- src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue | 432 ++++--- src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue | 5 src/views/flowable/workflow/FlowCompleted.vue | 299 ++-- src/views/eam/maintenance/modules/EamInspectionOrderModal.vue | 513 ++++---- src/views/flowable/workflow/FlowTodo.vue | 66 src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue | 775 +++++++------ 10 files changed, 1,572 insertions(+), 1,820 deletions(-) diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index 3bf317a..9e72586 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -134,7 +134,8 @@ </div> <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"></eam-inspection-order-modal> - <EamInspectionOrderModalXq ref="modalFormXq" @ok="modalFormOk"></EamInspectionOrderModalXq> + + <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> </a-card> </template> @@ -144,17 +145,17 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import EamInspectionOrderModal from './modules/EamInspectionOrderModal' - import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' import { deleteAction, getAction } from '@api/manage' + import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' export default { name: 'EamInspectionOrderList', mixins: [JeecgListMixin, mixinDevice], components: { - LxSearchEquipmentSelect, + InspectionOrderHandle, EamInspectionOrderModal, - EamInspectionOrderModalXq + LxSearchEquipmentSelect, }, props: { isDisplayOperation: { @@ -247,7 +248,7 @@ ], url: { list: '/eam/eamInspectionOrder/list', - cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", + cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', deleteBatch: '/eam/eamInspectionOrder/deleteBatch', exportXlsUrl: '/eam/eamInspectionOrder/exportXls', importExcelUrl: 'eam/eamInspectionOrder/importExcel', @@ -255,7 +256,8 @@ cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' }, dictOptions: {}, - superFieldList: [] + superFieldList: [], + selectInspectionOrderXqData: {} } }, created() { @@ -283,9 +285,12 @@ }, //璇︽儏 handleDetail: function(record) { - this.$refs.modalFormXq.edit(record) + this.selectInspectionOrderXqData = Object.assign({}, record) + this.$refs.modalFormXq.visible = true this.$refs.modalFormXq.title = '璇︽儏' this.$refs.modalFormXq.disableSubmit = true + this.$refs.modalFormXq.getAllApproveData(record) + this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) }, handleInspection(id) { if (!this.url.receiveInspectionOrder) { @@ -309,27 +314,27 @@ } }) }, - handleOrReceive(id){ + handleOrReceive(id) { if (!this.url.cancelInspectionOrder) { - this.$message.error("璇疯缃畊rl.cancelInspectionOrder!") + this.$message.error('璇疯缃畊rl.cancelInspectionOrder!') return } - var that = this; + var that = this getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { if (res.success) { that.$notification.success({ message: '娑堟伅', description: res.message - }); - that.loadData(); + }) + that.loadData() } else { // that.$message.warning(res.message); that.$notification.warning({ message: '娑堟伅', description: res.message - }); + }) } - }); + }) }, batchZf(type) { if (this.selectedRowKeys.length <= 0) { diff --git a/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue b/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue index 4cb1e2f..8693a78 100644 --- a/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue @@ -74,6 +74,7 @@ :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" + :scroll="{x:'max-content'}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -106,7 +107,7 @@ <!-- 琛ㄥ崟鍖哄煙 --> <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal> - <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal"></week-maintenance-approval-modal> + <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal> </a-card> </template> @@ -136,6 +137,7 @@ return { description: '鍛ㄤ繚宸ュ崟绠$悊椤甸潰', disableMixinCreated: true, + selectWeekMaintenanceData:{}, // 琛ㄥご columns: [ { @@ -414,6 +416,7 @@ }, handleDetail(record) { + this.selectWeekMaintenanceData = Object.assign({}, record) this.$refs.weekMaintenanceApprovalModal.recordDetail(record) this.$refs.weekMaintenanceApprovalModal.title = '璇︽儏'; this.$refs.weekMaintenanceApprovalModal.disableSubmit = true diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderDetailForm.vue b/src/views/eam/maintenance/modules/EamInspectionOrderDetailForm.vue deleted file mode 100644 index f27ed57..0000000 --- a/src/views/eam/maintenance/modules/EamInspectionOrderDetailForm.vue +++ /dev/null @@ -1,124 +0,0 @@ -<template> - <a-spin :spinning="confirmLoading"> - <j-form-container :disabled="formDisabled"> - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> - <a-row> - <a-col :span="24"> - <a-form-model-item label="鍒犻櫎鏍囪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag"> - <a-input-number v-model="model.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="宸ュ崟ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId"> - <a-input v-model="model.orderId" placeholder="璇疯緭鍏ュ伐鍗旾D" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规椤笽D" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemId"> - <a-input v-model="model.itemId" placeholder="璇疯緭鍏ョ偣妫�椤笽D" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规缁撴灉" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionResult"> - <a-input v-model="model.inspectionResult" placeholder="璇疯緭鍏ョ偣妫�缁撴灉" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="寮傚父鎻忚堪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="exceptionDescription"> - <a-input v-model="model.exceptionDescription" placeholder="璇疯緭鍏ュ紓甯告弿杩�" ></a-input> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </j-form-container> - </a-spin> -</template> - -<script> - - import { httpAction, getAction } from '@/api/manage' - import { validateDuplicateValue } from '@/utils/util' - - export default { - name: 'EamInspectionOrderDetailForm', - components: { - }, - props: { - //琛ㄥ崟绂佺敤 - disabled: { - type: Boolean, - default: false, - required: false - } - }, - data () { - return { - model:{ - }, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - confirmLoading: false, - validatorRules: { - }, - url: { - add: "/eam/eamInspectionOrderDetail/add", - edit: "/eam/eamInspectionOrderDetail/edit", - queryById: "/eam/eamInspectionOrderDetail/queryById" - } - } - }, - computed: { - formDisabled(){ - return this.disabled - }, - }, - created () { - //澶囦唤model鍘熷鍊� - this.modelDefault = JSON.parse(JSON.stringify(this.model)); - }, - methods: { - add () { - this.edit(this.modelDefault); - }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; - }, - submitForm () { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; - } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - - }) - }, - } - } -</script> \ No newline at end of file diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderForm.vue b/src/views/eam/maintenance/modules/EamInspectionOrderForm.vue deleted file mode 100644 index 0cc673a..0000000 --- a/src/views/eam/maintenance/modules/EamInspectionOrderForm.vue +++ /dev/null @@ -1,164 +0,0 @@ -<template> - <a-spin :spinning="confirmLoading"> - <j-form-container :disabled="formDisabled"> - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> - <a-row> - <a-col :span="24"> - <a-form-model-item label="宸ュ崟鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum"> - <a-input v-model="model.orderNum" placeholder="璇疯緭鍏ュ伐鍗曞彿" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="璁惧ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> - <a-input v-model="model.equipmentId" placeholder="璇疯緭鍏ヨ澶嘔D" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鏍囧噯ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardId"> - <a-input v-model="model.standardId" placeholder="璇疯緭鍏ユ爣鍑咺D" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> - <j-date placeholder="璇烽�夋嫨鐐规鏃ユ湡" v-model="model.inspectionDate" style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operateTime"> - <j-date placeholder="璇烽�夋嫨鐐规鏃堕棿" v-model="model.operateTime" style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator"> - <a-input v-model="model.operator" placeholder="璇疯緭鍏ョ偣妫�浜�" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规杩囨湡鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expirationTime"> - <j-date placeholder="璇烽�夋嫨鐐规杩囨湡鏃堕棿" v-model="model.expirationTime" style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鍒涘缓鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="creationMethod"> - <a-input v-model="model.creationMethod" placeholder="璇疯緭鍏ュ垱寤烘柟寮�" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐐规鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionStatus"> - <j-dict-select-tag type="list" v-model="model.inspectionStatus" dictCode="" placeholder="璇烽�夋嫨鐐规鐘舵��" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="璁惧绠$悊鍛樼‘璁�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmUser"> - <a-input v-model="model.confirmUser" placeholder="璇疯緭鍏ヨ澶囩鐞嗗憳纭" ></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime"> - <j-date placeholder="璇烽�夋嫨纭鏃堕棿" v-model="model.confirmTime" style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> - <a-textarea v-model="model.remark" rows="4" placeholder="璇疯緭鍏ュ娉�" /> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="鐓х墖鏂囦欢" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageFiles"> - <j-image-upload isMultiple v-model="model.imageFiles" ></j-image-upload> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </j-form-container> - </a-spin> -</template> - -<script> - - import { httpAction, getAction } from '@/api/manage' - import { validateDuplicateValue } from '@/utils/util' - - export default { - name: 'EamInspectionOrderForm', - components: { - }, - props: { - //琛ㄥ崟绂佺敤 - disabled: { - type: Boolean, - default: false, - required: false - } - }, - data () { - return { - model:{ - }, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - confirmLoading: false, - validatorRules: { - }, - url: { - add: "/eam/eamInspectionOrder/add", - edit: "/eam/eamInspectionOrder/edit", - queryById: "/eam/eamInspectionOrder/queryById" - } - } - }, - computed: { - formDisabled(){ - return this.disabled - }, - }, - created () { - //澶囦唤model鍘熷鍊� - this.modelDefault = JSON.parse(JSON.stringify(this.model)); - }, - methods: { - add () { - this.edit(this.modelDefault); - }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; - }, - submitForm () { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; - } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - - }) - }, - } - } -</script> \ No newline at end of file diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue b/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue index 0ea19b4..61258e3 100644 --- a/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue +++ b/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue @@ -6,80 +6,69 @@ :confirmLoading="confirmLoading" switchFullscreen centered + :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙疯嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled /> + <a-form-model-item prop="standardCode" label="宸ュ崟鍙�"> + <a-input placeholder="宸ュ崟鍙疯嚜鍔ㄧ敓鎴�" v-model="model.orderNum" readOnly/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿"> + <a-form-model-item prop="equipmentId" label="璁惧缂栧彿"> <MaintenanceEquipmentSelect placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId" - :maintenanceCategory="maintenanceCategory" :disabled="editable" - @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> + :maintenanceCategory="maintenanceCategory" :disabled="disabled" + @autocompleteForm="autocompleteForm"/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗗悕绉�" disabled v-model="model.standardName" /> + <a-form-model-item prop="standardName" label="鏍囧噯鍚嶇О"> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" readOnly v-model="model.standardName"/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="鏍囧噯缂栫爜"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗙紪鐮�" disabled v-model="model.standardCode" /> + <a-form-model-item prop="standardCode" label="鏍囧噯缂栫爜"> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" readOnly v-model="model.standardCode"/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input-number v-model="model.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" /> + <a-form-model-item label="淇濆吇鍛ㄦ湡"> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.maintenancePeriod" readOnly/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="鐐规浜�"> - <j-dict-select-tag v-model="model.operator" placeholder="璇烽�夋嫨鐢ㄦ埛" dictCode="sys_user,realname,username,username!='admin' order by create_time"/> + <a-form-model-item prop="operator" label="鐐规浜�"> + <j-search-select-tag v-model="model.operator" placeholder="璇烽�夋嫨鐐规浜�" :disabled="!model.equipmentId" + :dictOptions="maintenanceOperatorOptions"/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item label="鐐规鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> - <j-date placeholder="璇烽�夋嫨鐐规鏃ユ湡" v-model="model.inspectionDate" @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%" /> + <a-form-model-item label="鐐规鏃ユ湡" prop="inspectionDate"> + <j-date :placeholder="!model.maintenancePeriod?'璇峰~鍐欎繚鍏诲懆鏈�':'璇烽�夋嫨鐐规鏃ユ湡'" v-model="model.inspectionDate" + :disabled="!model.maintenancePeriod" + @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%"/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item label="鐐规杩囨湡鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> - <j-date placeholder="璇烽�夋嫨鐐规杩囨湡鏃堕棿" v-model="model.expirationTime" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item - label="鐓х墖鏂囦欢" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - prop="imageFiles"> - <lx-upload :returnUrl="false" - :multiple="false" - v-model="model.imageFiles" - biz="EamMaintenanceStandard"> - </lx-upload> + <a-form-model-item label="鐐规杩囨湡鏃堕棿"> + <j-date placeholder="閫夋嫨鐐规鏃ユ湡鍚庤嚜鍔ㄥ甫鍑�" v-model="model.expirationTime" disabled style="width: 100%"/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> - <a-textarea v-model="model.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" /> + <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:21}" prop="remark"> + <a-textarea v-model="model.remark" rows="3" placeholder="璇疯緭鍏ュ娉�"/> </a-form-model-item> </a-col> </a-row> @@ -96,7 +85,7 @@ :loading="detail.loading" :dataSource="detail.dataSource" :columns="detail.columns" - style="margin-top: 8px;" /> + style="margin-top: 8px;"/> </a-row> </a-form-model> </a-spin> @@ -104,215 +93,271 @@ </template> <script> -import { getAction, httpAction } from '@/api/manage' -import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' -import { JVXETypes } from '@/components/jeecg/JVxeTable' -import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' -import moment from 'dayjs' + import { getAction, httpAction } from '@/api/manage' + import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' + import { JVXETypes } from '@/components/jeecg/JVxeTable' + import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' + import moment from 'dayjs' -export default { - name: 'EamMaintenanceStandardModal', - mixins: [JVxeTableModelMixin], - components: { - MaintenanceEquipmentSelect - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - model: {}, - editable: false, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - }, - confirmLoading: false, - validatorRules: { - standardName: [ - { required: true, message: '璇疯緭鍏ユ爣鍑嗗悕绉�!' } - ], - maintenanceCategory: [ - { required: true, message: '璇烽�夋嫨淇濆吇鍒嗙被!' } - ], - initialDate: [ - { required: true, message: '璇烽�夋嫨鍒濆鏃ユ湡!' } - ], - maintenancePeriod: [ - { required: true, message: '璇疯緭鍏ヤ繚鍏诲懆鏈燂紝鍗曚綅锛氬ぉ!' } - ], - equipmentId: [ - { required: true, message: '璇烽�夋嫨璁惧!' } - ], - }, - url: { - add: '/eam/eamInspectionOrder/add', - edit: '/eam/eamInspectionOrder/edit', - detail: '/eam/eamMaintenanceStandardDetail/queryList', - detailOrder: '/eam/eamInspectionOrderDetail/queryList' - }, - maintenanceCategory: 'POINT_INSPECTION', - standardId:"", - standardType:false, - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.inputNumber, - width: '10%', - align:"center", - validateRules: [ - {required : true, unique: true, message: '搴忓彿涓嶈兘閲嶅'} - ] - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.textarea, - width: '20%', - align:"center", - validateRules: [ - {required : true, message: '淇濆吇椤逛笉鑳戒负绌猴紒'} - ] - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.textarea, - width: '30%', - align:"center", - validateRules: [ - {required : true, message: "淇濆吇瑕佹眰涓嶈兘涓虹┖锛�"} - ] - }, - ] - } - } - }, - created() { - }, - methods: { - add() { - this.model = {} - this.detail.dataSource = []; - this.visible = true - this.editable = false - this.standardType=false; + export default { + name: 'EamMaintenanceStandardModal', + mixins: [JVxeTableModelMixin], + components: { + MaintenanceEquipmentSelect }, - edit(record) { - console.log(record) - this.model = Object.assign({}, record) - this.standardId=record.standardId - this.standardType=true; - this.visible = true - this.editable = true - this.detail.dataSource = [] - if (record && record.referenceFile) { - let obj = JSON.parse(record.referenceFile) - this.model.fileList = [obj] - } else { - this.model.fieldList = [] - } - this.loadDetailOrder(record.id) - }, - close() { - this.$emit('close') - this.visible = false - this.$refs.form.clearValidate() - }, - async handleOk() { - const that = this - let errMap = await that.$refs.editableDetailTable.validateTable() - if (errMap) { - this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') - return - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - let tableData = that.$refs.editableDetailTable.getTableData() - let removeData = that.$refs.editableDetailTable.getDeleteData() - that.model.tableDetailList = [...tableData] - that.model.removeDetailList = [...removeData] - - that.confirmLoading = true - let httpurl = '' - let method = '' - if (!this.model.id) { - httpurl += this.url.add - method = 'post' - } else { - httpurl += this.url.edit - method = 'put' - } - this.model.standardId=this.standardId - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.$emit('ok') - that.close() - } else { - that.$message.warning(res.message) + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 15 } + }, + confirmLoading: false, + spinning: false, + disabled: false, + validatorRules: { + // standardName: [ + // { required: true, message: '璇疯緭鍏ユ爣鍑嗗悕绉�!' } + // ], + inspectionDate: [ + { required: true, message: '璇烽�夋嫨鐐规鏃ユ湡!' } + ], + // maintenancePeriod: [ + // { required: true, message: '璇疯緭鍏ヤ繚鍏诲懆鏈燂紝鍗曚綅锛氬ぉ!' } + // ], + equipmentId: [ + { required: true, message: '璇烽�夋嫨璁惧!' } + ] + }, + url: { + add: '/eam/eamInspectionOrder/add', + edit: '/eam/eamInspectionOrder/edit', + detail: '/eam/eamMaintenanceStandardDetail/queryList', + detailOrder: '/eam/eamInspectionOrderDetail/queryList', + userSelect: '/eam/user_select/list' + }, + maintenanceCategory: 'POINT_INSPECTION', + maintenanceOperatorOptions: [], + standardId: '', + standardType: false, + detail: { + loading: false, + dataSource: [], + columns: [ + { + title: '搴忓彿', + key: 'itemCode', + type: JVXETypes.inputNumber, + width: '10%', + align: 'center', + validateRules: [ + { required: true, unique: true, message: '搴忓彿涓嶈兘閲嶅' } + ] + }, + { + title: '淇濆吇椤�', + key: 'itemName', + type: JVXETypes.textarea, + width: '20%', + align: 'center', + validateRules: [ + { required: true, message: '淇濆吇椤逛笉鑳戒负绌猴紒' } + ] + }, + { + title: '淇濆吇瑕佹眰', + key: 'itemDemand', + type: JVXETypes.textarea, + width: '30%', + align: 'center', + validateRules: [ + { required: true, message: '淇濆吇瑕佹眰涓嶈兘涓虹┖锛�' } + ] } - }).finally(() => { - that.confirmLoading = false - }) - } else { - return false + ] } - }) - }, - handleCancel() { - this.close() - }, - autocompleteForm(selectObj) { - this.model.standardName = selectObj.standardName - this.model.maintenancePeriod=selectObj.maintenancePeriod - this.model.standardCode=selectObj.standardCode - if (!this.standardType) { - this.standardId=selectObj.id - this.loadDetail(selectObj.id) } }, - expirationTimeFrom(date) { - //杩囨湡鏃堕棿鏄垵濮嬫椂闂�+淇濆吇鍛ㄦ湡 - if (date && this.model.maintenancePeriod) { - // 杞崲涓烘椂闂存埑瀛楃涓诧紙鎴栨寚瀹氭牸寮忥級 - this.model.expirationTime = moment(date) - .add(this.model.maintenancePeriod, 'days') - .format('YYYY-MM-DD') - } else { - this.model.expirationTime = null; // 娓呯┖鏃犳晥鍊� - } + created() { }, - //鍔犺浇璇︽儏鏁版嵁 - loadDetail(standardId) { - if (standardId) { - getAction(this.url.detail, { standardId: standardId }).then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - this.standardType=false; + methods: { + add() { + this.model = {} + this.detail.dataSource = [] + this.visible = true + this.disabled = false + this.standardType = false + }, + + edit(record) { + this.model = Object.assign({}, record) + this.standardId = record.standardId + this.disabled = true + this.standardType = true + this.visible = true + this.detail.dataSource = [] + if (record && record.referenceFile) { + let obj = JSON.parse(record.referenceFile) + this.model.fileList = [obj] + } else { + this.model.fieldList = [] + } + this.loadDetailOrder(record.id) + }, + + async handleOk() { + const that = this + let errMap = await that.$refs.editableDetailTable.validateTable() + if (errMap) { + this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') + return + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + let tableData = that.$refs.editableDetailTable.getTableData() + let removeData = that.$refs.editableDetailTable.getDeleteData() + that.model.tableDetailList = [...tableData] + that.model.removeDetailList = [...removeData] + + that.confirmLoading = that.spinning = true + let httpurl = '' + let method = '' + if (!this.model.id) { + httpurl += this.url.add + method = 'post' + } else { + httpurl += this.url.edit + method = 'put' + } + this.model.standardId = this.standardId + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + that.close() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false } }) - } - }, - loadDetailOrder(orderId){ - if (orderId) { - getAction(this.url.detailOrder, { orderId: orderId }).then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - } - }) + }, + + autocompleteForm(selectObj) { + this.model.standardName = selectObj.standardName + this.model.maintenancePeriod = selectObj.maintenancePeriod + this.model.standardCode = selectObj.standardCode + // 鑻ュ彇娑堣澶囬�夋嫨鍚庝繚鍏诲懆鏈熶负绌哄垯闇�娓呯┖鐐规鏃ユ湡鍜岀偣妫�杩囨湡鏃堕棿 + if (!this.model.equipmentId) { + delete this.model.inspectionDate + delete this.model.expirationTime + } else { + // 濡傛灉鐐规鏃ユ湡瀛樺湪锛屽垯鍦ㄩ噸鏂伴�夋嫨璁惧鍚庡嵆淇濆吇鍛ㄦ湡鍙兘鍙戠敓鏀瑰彉鍚庨噸鏂拌绠楄繃鏈熸椂闂� + if (this.model.inspectionDate) this.expirationTimeFrom(this.model.inspectionDate) + } + if (!this.standardType) { + console.log('this.standardType', this.standardType) + this.standardId = selectObj.id + this.loadDetail(selectObj.id) + } + this.$nextTick(() => this.loadMaintenanceOperatorList(this.model.equipmentId)) + }, + + expirationTimeFrom(date) { + //杩囨湡鏃堕棿鏄垵濮嬫椂闂�+淇濆吇鍛ㄦ湡 + if (date && this.model.maintenancePeriod) { + // 杞崲涓烘椂闂存埑瀛楃涓诧紙鎴栨寚瀹氭牸寮忥級 + this.model.expirationTime = moment(date) + .add(this.model.maintenancePeriod, 'days') + .format('YYYY-MM-DD') + } else { + this.model.expirationTime = null // 娓呯┖鏃犳晥鍊� + } + }, + + //鍔犺浇璇︽儏鏁版嵁 + loadDetail(standardId) { + this.detail.dataSource = [] + if (standardId) { + console.log('standardId', standardId) + this.spinning = true + getAction(this.url.detail, { standardId: standardId }) + .then(res => { + if (res.success) { + this.detail.dataSource = [...res.result] + } + }) + .finally(() => { + this.spinning = false + }) + } + }, + + loadDetailOrder(orderId) { + if (orderId) { + this.spinning = true + getAction(this.url.detailOrder, { orderId: orderId }) + .then(res => { + if (res.success) { + this.detail.dataSource = [...res.result] + } + }) + .finally(() => { + this.spinning = false + }) + } + }, + + loadMaintenanceOperatorList(equipmentId) { + this.maintenanceOperatorOptions = [] + let params = { positionCode: 'PCR0001' } + if (equipmentId) { + params.equipmentId = equipmentId + } else { + delete this.model.operator + return + } + const that = this + getAction(this.url.userSelect, params) + .then(res => { + if (res.success) { + that.maintenanceOperatorOptions = res.result.map(item => ({ + key: item.id, + value: item.username, + text: item.realname + })) + if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator + } else { + if (that.model.operator) delete that.model.operator + } + }) + .catch(err => { + if (that.model.operator) delete that.model.operator + }) + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() } } } -} </script> <style lang="less" scoped> diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue b/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue deleted file mode 100644 index bcd44eb..0000000 --- a/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue +++ /dev/null @@ -1,360 +0,0 @@ -<template> - <j-modal - :title="title" - :width="1200" - :visible="visible" - :confirmLoading="false" - :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" - switchFullscreen - @ok="handleOk" - @cancel="handleCancel" - centered - cancelText="鍏抽棴"> - - <a-spin :spinning="false"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙疯嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled /> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿"> - <MaintenanceEquipmentSelect placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId" - :maintenanceCategory="maintenanceCategory" :disabled="editable" - @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗗悕绉�" disabled v-model="model.standardName" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="鏍囧噯缂栫爜"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗙紪鐮�" disabled v-model="model.standardCode" /> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input-number v-model="model.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="鐐规浜�"> - <j-dict-select-tag v-model="model.operator" placeholder="璇烽�夋嫨鐢ㄦ埛" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/> - </a-form-model-item> - </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item label="鐐规鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> - <j-date placeholder="璇烽�夋嫨鐐规鏃ユ湡" v-model="model.inspectionDate" disabled @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鐐规杩囨湡鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> - <j-date placeholder="璇烽�夋嫨鐐规杩囨湡鏃堕棿" v-model="model.expirationTime" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span="8" v-if="model.inspectionStatus === '3' || model.inspectionStatus === '4'"> - <a-form-model-item label="鐐规鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="operateTime"> - <j-date placeholder="璇烽�夋嫨鐐规鏃堕棿" v-model="model.operateTime" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item label="鐐规鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionStatus"> - <j-dict-select-tag v-model="model.inspectionStatus" placeholder="璇烽�夋嫨鐐规鐘舵��" disabled dictCode="inspection_status"/> - - </a-form-model-item> - </a-col> - <a-col :span="8" v-if="model.inspectionStatus === '4'"> - <a-form-model-item label="鐝粍闀跨‘璁�" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="confirmUser"> - <j-dict-select-tag v-model="model.confirmUser" placeholder="璇烽�夋嫨鐢ㄦ埛" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/> - </a-form-model-item> - </a-col> - <a-col :span="8" v-if="model.inspectionStatus === '4'"> - <a-form-model-item label="纭鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="confirmTime"> - <j-date placeholder="璇烽�夋嫨纭鏃堕棿" v-model="model.confirmTime" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item - label="鐓х墖鏂囦欢" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - prop="imageFiles"> - <lx-upload :returnUrl="false" - :multiple="false" - v-model="model.fileList" - biz="EamMaintenanceStandard"> - </lx-upload> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> - <a-textarea v-model="model.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" disabled/> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <j-vxe-table - ref="editableDetailTable" - :rowNumber="false" - :rowSelection="false" - :bordered="true" - :alwaysEdit="true" - :toolbar="false" - :disabled="true" - keep-source - :height="300" - :loading="detail.loading" - :dataSource="detail.dataSource" - :columns="detail.columns" - style="margin-top: 8px;" /> - </a-row> - </a-form-model> - </a-spin> - </j-modal> -</template> - -<script> -import { getAction, httpAction } from '@/api/manage' -import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' -import { JVXETypes } from '@/components/jeecg/JVxeTable' -import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' -import moment from 'dayjs' - -export default { - name: 'EamMaintenanceStandardModal', - mixins: [JVxeTableModelMixin], - components: { - MaintenanceEquipmentSelect - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - model: {}, - editable: false, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - }, - confirmLoading: false, - validatorRules: { - standardName: [ - { required: true, message: '璇疯緭鍏ユ爣鍑嗗悕绉�!' } - ], - maintenanceCategory: [ - { required: true, message: '璇烽�夋嫨淇濆吇鍒嗙被!' } - ], - initialDate: [ - { required: true, message: '璇烽�夋嫨鍒濆鏃ユ湡!' } - ], - maintenancePeriod: [ - { required: true, message: '璇疯緭鍏ヤ繚鍏诲懆鏈燂紝鍗曚綅锛氬ぉ!' } - ], - equipmentId: [ - { required: true, message: '璇烽�夋嫨璁惧!' } - ], - operator: [ - { required: true, message: '璇烽�夋嫨鐐规浜�!' } - ] - }, - url: { - add: '/eam/eamInspectionOrder/add', - edit: '/eam/eamInspectionOrder/edit', - detail: '/eam/eamMaintenanceStandardDetail/queryList', - detailOrder: '/eam/eamInspectionOrderDetail/queryList' - }, - maintenanceCategory: 'POINT_INSPECTION', - disableSubmit:false, - standardId:"", - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.normal, - width: '10%', - align:"center", - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.normal, - width: '20%', - align:"center", - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.normal, - width: '30%', - align:"center", - }, - { - title: "鐐规缁撴灉" - ,key: 'inspectionResult' - ,type: JVXETypes.selectSearch - ,dictCode:'eam_inspection_result' - ,width: '20%' - ,align:"center" - }, - { - title: '寮傚父鎻忚堪', - key: 'exceptionDescription', - type: JVXETypes.normal, - width: '30%', - align:"center", - }, - { - title: '寮傚父鏄惁鎶ヤ慨', - key: 'selectSearch', - type: JVXETypes.selectSearch, - dictCode:'yn', - width: '20%', - align:"center", - } - ] - } - } - }, - created() { - }, - methods: { - add() { - this.model = {} - this.detail.dataSource = []; - this.visible = true - this.editable = false - }, - edit(record) { - this.model = Object.assign({}, record) - this.standardId=record.standardId - this.visible = true - this.editable = true - if (record && record.referenceFile) { - let obj = JSON.parse(record.referenceFile) - this.model.fileList = [obj] - } else { - this.model.fieldList = [] - } - this.loadDetailOrder(record.id) - }, - close() { - this.$emit('close') - this.visible = false - this.$refs.form.clearValidate() - }, - async handleOk() { - const that = this - let errMap = await that.$refs.editableDetailTable.validateTable() - if (errMap) { - this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') - return - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - let tableData = that.$refs.editableDetailTable.getTableData() - let removeData = that.$refs.editableDetailTable.getDeleteData() - that.model.tableDetailList = [...tableData] - that.model.removeDetailList = [...removeData] - - that.confirmLoading = false - let httpurl = '' - let method = '' - if (!this.model.id) { - httpurl += this.url.add - method = 'post' - } else { - httpurl += this.url.edit - method = 'put' - } - this.model.standardId=this.standardId - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.$emit('ok') - that.close() - } else { - that.$message.warning(res.message) - } - }).finally(() => { - that.confirmLoading = false - }) - } else { - return false - } - }) - }, - handleCancel() { - this.close() - }, - autocompleteForm(selectObj) { - this.model.standardName = selectObj.standardName - this.model.maintenancePeriod=selectObj.maintenancePeriod - this.model.standardCode=selectObj.standardCode - if (this.standardId===undefined || this.standardId==="") { - this.standardId=selectObj.id - this.loadDetail(selectObj.id) - } - }, - expirationTimeFrom(date) { - //杩囨湡鏃堕棿鏄垵濮嬫椂闂�+淇濆吇鍛ㄦ湡 - if (date && this.model.maintenancePeriod) { - // 杞崲涓烘椂闂存埑瀛楃涓诧紙鎴栨寚瀹氭牸寮忥級 - this.model.expirationTime = moment(date) - .add(this.model.maintenancePeriod, 'days') - .format('YYYY-MM-DD') - } else { - this.model.expirationTime = null; // 娓呯┖鏃犳晥鍊� - } - }, - //鍔犺浇璇︽儏鏁版嵁 - loadDetail(standardId) { - this.detail.dataSource = [] - if (standardId) { - getAction(this.url.detail, { standardId: standardId }).then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - } - }) - } - }, - loadDetailOrder(orderId){ - this.detail.dataSource = [] - if (orderId) { - getAction(this.url.detailOrder, { orderId: orderId }).then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - } - }) - } - } - } -} -</script> - -<style lang="less" scoped> - -</style> \ No newline at end of file diff --git a/src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue b/src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue index eb2abe2..4a77dba 100644 --- a/src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue +++ b/src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue @@ -5,70 +5,72 @@ :visible="visible" :confirmLoading="confirmLoading" switchFullscreen + :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙风郴缁熻嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled /> + <a-form-model-item prop="orderNum" label="宸ュ崟鍙�"> + <a-input placeholder="宸ュ崟鍙风郴缁熻嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栫爜"> + <a-form-model-item prop="equipmentId" label="璁惧缂栫爜"> <maintenance-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId" :maintenanceCategory="maintenanceCategory" - @autocompleteForm="autocompleteForm" :disabled="editable"></maintenance-equipment-select> + @autocompleteForm="autocompleteForm" + :disabled="editable"></maintenance-equipment-select> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.standardName" disabled /> + <a-form-model-item prop="standardName" label="鏍囧噯鍚嶇О"> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.standardName" disabled/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="淇濆吇鏃ユ湡"> + <a-form-model-item prop="maintenanceDate" label="淇濆吇鏃ユ湡"> <a-date-picker placeholder="璇烽�夋嫨璁″垝淇濆吇鏃ユ湡" v-model="model.maintenanceDate" format="YYYY-MM-DD" - style="width: 100%" /> + style="width: 100%"/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="淇濆吇浜�"> - <j-search-select-tag v-model="model.operator" placeholder="璇烽�夋嫨淇濆吇浜�" - :dictOptions="maintenanceOperatorOptions" /> + <a-form-model-item prop="operator" label="淇濆吇浜�"> + <j-search-select-tag v-model="model.operator" placeholder="璇烽�夋嫨淇濆吇浜�" :disabled="!model.equipmentId" + :dictOptions="maintenanceOperatorOptions"/> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.maintenancePeriod" disabled /> + <a-form-model-item prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.maintenancePeriod" disabled/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> - <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" /> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> </a-form-model-item> </a-row> <a-row :gutter="24"> - <j-vxe-table - ref="editableDetailTable" - :rowNumber="true" - :rowSelection="true" - :bordered="true" - :alwaysEdit="true" - :toolbar="true" - :toolbarConfig="detail.toolbarConfig" - keep-source - :height="300" - :loading="detail.loading" - :dataSource="detail.dataSource" - :columns="detail.columns" - style="margin-top: 8px;" /> + <a-spin :spinning="detail.loading"> + <j-vxe-table + ref="editableDetailTable" + :rowNumber="true" + :rowSelection="true" + :bordered="true" + :alwaysEdit="true" + :toolbar="true" + :toolbarConfig="detail.toolbarConfig" + keep-source + :height="300" + :dataSource="detail.dataSource" + :columns="detail.columns" + style="margin-top: 8px;"/> + </a-spin> </a-row> </a-form-model> </a-spin> @@ -76,250 +78,266 @@ </template> <script> -import { getAction, httpAction } from '@/api/manage' -import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' -import { JVXETypes } from '@comp/jeecg/JVxeTable' -import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' + import { getAction, httpAction } from '@/api/manage' + import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' -export default { - name: 'EamWeekMaintenanceOrderModal', - mixins: [JVxeTableModelMixin], - components: { - MaintenanceEquipmentSelect - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - editable: false, - model: {}, - maintenanceCategory: 'WEEK_MAINTENANCE', - maintenanceOperatorOptions: [], - labelCol: { - xs: { span: 24 }, - sm: { span: 6 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - }, - labelColLong: { - xs: { span: 24 }, - sm: { span: 2 } - }, - wrapperColLong: { - xs: { span: 24 }, - sm: { span: 21 } - }, - confirmLoading: false, - validatorRules: { - equipmentId: [ - { required: true, message: '璇烽�夋嫨璁惧!' } - ], - maintenanceDate: [ - { required: true, message: '璇烽�夋嫨璁″垝淇濆吇鏃ユ湡!' } - ] - }, - url: { - add: '/eam/weekMaintenanceOrder/add', - edit: '/eam/weekMaintenanceOrder/edit', - standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', - detail: '/eam/weekMaintenanceOrderDetail/queryList', - userSelect: '/eam/user_select/list', - }, - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: 'ID', - key: 'id', - type: JVXETypes.hidden - }, - { - title: 'orderId', - key: 'orderId', - type: JVXETypes.hidden - }, - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.inputNumber, - width: '10%', - align: 'center', - validateRules: [ - { required: true, unique: true, message: '搴忓彿涓嶈兘閲嶅' } - ] - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.textarea, - width: '20%', - align: 'center', - validateRules: [ - { required: true, message: '淇濆吇椤逛笉鑳戒负绌猴紒' } - ] - }, - { - title: '瀛愪繚鍏婚」', - key: 'subItemName', - type: JVXETypes.textarea, - width: '25%', - align: 'center' - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.textarea, - width: '30%', - align: 'center', - validateRules: [ - { required: true, message: '淇濆吇瑕佹眰涓嶈兘涓虹┖锛�' } - ] - } - ], - toolbarConfig: { - // prefix 鍓嶇紑锛泂uffix 鍚庣紑 - slot: ['prefix', 'suffix'], - // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 - btn: ['add', 'remove', 'clearSelection'] - } - } - } - }, - created() { - }, - methods: { - add() { - //鍒濆鍖栭粯璁ゅ�� - this.model = {} - this.visible = true - this.editable = false - this.detail.dataSource = [] - this.loadMaintenanceOperatorList(); + export default { + name: 'EamWeekMaintenanceOrderModal', + mixins: [JVxeTableModelMixin], + components: { + MaintenanceEquipmentSelect }, - edit(record) { - this.model = Object.assign({}, record) - this.visible = true - this.editable = true - this.detail.dataSource = [] - this.loadDetail(record.id) - }, - close() { - this.$emit('close') - this.visible = false - this.$refs.form.clearValidate() - }, - async handleOk() { - const that = this - let errMap = await that.$refs.editableDetailTable.validateTable() - if (errMap) { - this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') - return - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - let tableData = that.$refs.editableDetailTable.getTableData() - let removeData = that.$refs.editableDetailTable.getDeleteData() - that.model.tableDetailList = [...tableData] - that.model.removeDetailList = [...removeData] - - that.confirmLoading = true - let httpurl = '' - let method = '' - if (!this.model.id) { - httpurl += this.url.add - method = 'post' - } else { - httpurl += this.url.edit - method = 'put' - } - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.$emit('ok') - that.close() - } else { - that.$message.warning(res.message) + data() { + return { + title: '鎿嶄綔', + visible: false, + editable: false, + model: {}, + maintenanceCategory: 'WEEK_MAINTENANCE', + maintenanceOperatorOptions: [], + labelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 21 } + }, + confirmLoading: false, + spinning: false, + validatorRules: { + equipmentId: [ + { required: true, message: '璇烽�夋嫨璁惧!' } + ], + maintenanceDate: [ + { required: true, message: '璇烽�夋嫨璁″垝淇濆吇鏃ユ湡!' } + ] + }, + url: { + add: '/eam/weekMaintenanceOrder/add', + edit: '/eam/weekMaintenanceOrder/edit', + standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', + detail: '/eam/weekMaintenanceOrderDetail/queryList', + userSelect: '/eam/user_select/list' + }, + detail: { + loading: false, + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'orderId', + key: 'orderId', + type: JVXETypes.hidden + }, + { + title: '搴忓彿', + key: 'itemCode', + type: JVXETypes.inputNumber, + width: '10%', + align: 'center', + validateRules: [ + { required: true, unique: true, message: '搴忓彿涓嶈兘閲嶅' } + ] + }, + { + title: '淇濆吇椤�', + key: 'itemName', + type: JVXETypes.textarea, + width: '20%', + align: 'center', + validateRules: [ + { required: true, message: '淇濆吇椤逛笉鑳戒负绌猴紒' } + ] + }, + { + title: '瀛愪繚鍏婚」', + key: 'subItemName', + type: JVXETypes.textarea, + width: '25%', + align: 'center' + }, + { + title: '淇濆吇瑕佹眰', + key: 'itemDemand', + type: JVXETypes.textarea, + width: '30%', + align: 'center', + validateRules: [ + { required: true, message: '淇濆吇瑕佹眰涓嶈兘涓虹┖锛�' } + ] } - }).finally(() => { - that.confirmLoading = false - }) - } else { - return false - } - }) - }, - handleCancel() { - this.close() - }, - autocompleteForm(selectObj) { - //鏍囧噯鍚嶇О锛屼繚鍏诲懆鏈熶笉鍒锋柊瑙e喅鍔炴硶 - //鍔炴硶涓� validatorRules equipmentId 杩樻槸鏈夐棶棰� - // const newObj = { - // standardName: selectObj.standardName, - // maintenancePeriod: selectObj.maintenancePeriod, - // standardId : selectObj.id, - // equipmentId: selectObj.equipmentId, - // }; - // this.model = Object.assign({}, newObj, this.model) - //鍔炴硶浜� - this.$set(this.model, 'standardName', selectObj.standardName) - this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) - this.$set(this.model, 'standardId', selectObj.id) - this.$set(this.model, 'equipmentId', selectObj.equipmentId) - // console.log('model', this.model) - if (!this.model.id) { - this.loadStandardDetail(selectObj.id) - } - this.loadMaintenanceOperatorList(this.model.equipmentId); - }, - //鍔犺浇璇︽儏鏁版嵁 - loadStandardDetail(standardId) { - if (standardId) { - getAction(this.url.standardDetail, { standardId: standardId }).then(res => { - if (res.success) { - this.detail.dataSource = res.result.map(item => ({ - itemCode: item.itemCode, - itemName: item.itemName, - subItemName: item.subItemName, - itemDemand: item.itemDemand - })) + ], + toolbarConfig: { + // prefix 鍓嶇紑锛泂uffix 鍚庣紑 + slot: ['prefix', 'suffix'], + // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 + btn: ['add', 'remove', 'clearSelection'] } - }) - } - }, - //鏍囧噯閫夋嫨鍙樺寲 - loadDetail(orderId) { - if (orderId) { - getAction(this.url.detail, { orderId: orderId }).then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - } - }) - } - }, - loadMaintenanceOperatorList(equipmentId) { - this.maintenanceOperatorOptions = [] - let params = { positionCode: 'PCR0001' } - if (equipmentId) { - params.equipmentId = equipmentId - } - getAction(this.url.userSelect, params).then(res => { - if (res.success) { - this.maintenanceOperatorOptions = res.result.map(item => ({ - key: item.id, - value: item.username, - text: item.realname - })) } - }) - } + } + }, + created() { + }, + methods: { + add() { + //鍒濆鍖栭粯璁ゅ�� + this.model = {} + this.visible = true + this.editable = false + this.detail.dataSource = [] + }, + edit(record) { + this.model = Object.assign({}, record) + this.visible = true + this.editable = true + this.detail.dataSource = [] + this.loadDetail(record.id) + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + async handleOk() { + const that = this + let errMap = await that.$refs.editableDetailTable.validateTable() + if (errMap) { + this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') + return + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + let tableData = that.$refs.editableDetailTable.getTableData() + let removeData = that.$refs.editableDetailTable.getDeleteData() + that.model.tableDetailList = [...tableData] + that.model.removeDetailList = [...removeData] + that.confirmLoading = true + let httpurl = '' + let method = '' + if (!this.model.id) { + httpurl += this.url.add + method = 'post' + } else { + httpurl += this.url.edit + method = 'put' + } + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + that.close() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = false + }) + } else { + return false + } + }) + }, + handleCancel() { + this.close() + }, + autocompleteForm(selectObj) { + //鏍囧噯鍚嶇О锛屼繚鍏诲懆鏈熶笉鍒锋柊瑙e喅鍔炴硶 + //鍔炴硶涓� validatorRules equipmentId 杩樻槸鏈夐棶棰� + // const newObj = { + // standardName: selectObj.standardName, + // maintenancePeriod: selectObj.maintenancePeriod, + // standardId : selectObj.id, + // equipmentId: selectObj.equipmentId, + // }; + // this.model = Object.assign({}, newObj, this.model) + //鍔炴硶浜� + this.$set(this.model, 'standardName', selectObj.standardName) + this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) + this.$set(this.model, 'standardId', selectObj.id) + this.$set(this.model, 'equipmentId', selectObj.equipmentId) + // console.log('model', this.model) + if (!this.model.equipmentId) delete this.model.operator + if (!this.model.id) { + this.loadStandardDetail(selectObj.id) + } + this.loadMaintenanceOperatorList(this.model.equipmentId) + }, + //鍔犺浇璇︽儏鏁版嵁 + loadStandardDetail(standardId) { + this.detail.dataSource = [] + if (standardId) { + this.spinning = true + getAction(this.url.standardDetail, { standardId: standardId }) + .then(res => { + if (res.success) { + this.detail.dataSource = res.result.map(item => ({ + itemCode: item.itemCode, + itemName: item.itemName, + subItemName: item.subItemName, + itemDemand: item.itemDemand + })) + } + }) + .finally(() => { + this.spinning = false + }) + } + }, + //鏍囧噯閫夋嫨鍙樺寲 + loadDetail(orderId) { + if (orderId) { + getAction(this.url.detail, { orderId: orderId }).then(res => { + if (res.success) { + this.detail.dataSource = [...res.result] + } + }) + } + }, + loadMaintenanceOperatorList(equipmentId) { + this.maintenanceOperatorOptions = [] + let params = { positionCode: 'PCR0001' } + if (equipmentId) { + params.equipmentId = equipmentId + } + else return + const that = this + getAction(this.url.userSelect, params) + .then(res => { + if (res.success) { + that.maintenanceOperatorOptions = res.result.map(item => ({ + key: item.id, + value: item.username, + text: item.realname + })) + if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator + } else { + if (that.model.operator) delete that.model.operator + } + }) + .catch(err => { + if (that.model.operator) delete that.model.operator + }) + } + + } } -} </script> <style lang="less" scoped> diff --git a/src/views/flowable/workflow/FlowCompleted.vue b/src/views/flowable/workflow/FlowCompleted.vue index ba2a883..c851a89 100644 --- a/src/views/flowable/workflow/FlowCompleted.vue +++ b/src/views/flowable/workflow/FlowCompleted.vue @@ -11,16 +11,19 @@ <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="娴佺▼鍒嗙被"> - <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> + <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" + dictCode="flow_type"></j-dict-select-tag> </a-form-item> </a-col> - <a-col :xl="10" :lg="11" :md="12" :sm="24"> - <a-form-item label="鎿嶄綔鏃堕棿"> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" v-model="queryParam.startTime"></j-date> - <span class="query-group-split-cust"></span> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" class="query-group-cust" v-model="queryParam.endTime"></j-date> - </a-form-item> - </a-col> + <a-col :xl="10" :lg="11" :md="12" :sm="24"> + <a-form-item label="鎿嶄綔鏃堕棿"> + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" + v-model="queryParam.startTime"></j-date> + <span class="query-group-split-cust"></span> + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" class="query-group-cust" + v-model="queryParam.endTime"></j-date> + </a-form-item> + </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> @@ -53,7 +56,8 @@ </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img v-else :src="getImgView(text)" height="25px" alt="" + style="max-width:80px;font-size: 12px;font-style: italic;"/> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> @@ -75,164 +79,151 @@ </a-table> </div> - <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq> - - <DispatchFileXq ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq> - - <InspectionOrderXq ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq> - + <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> </a-card> </template> <script> -import '@/assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' -import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue' -import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue' -import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue' + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' + import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' -export default { - name: 'NcDeviceCharactersList', - mixins:[JeecgListMixin, mixinDevice], - components: { - InspectionOrderXq, - DispatchFileXq, - AssignFileStreamXq: AssignFileStreamXq, - JDictSelectTag, - }, - data () { - return { - description: '璁惧鐗规畩瀛楃绠$悊椤甸潰', - // 琛ㄥご - columns: [ - { - title: '搴忓彿', - dataIndex: '', - key:'rowIndex', - width:200, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '娴佺▼鍒嗙被', - align: "center", - dataIndex: 'category_dictText', - width: 200, - }, - { - title: '娴佺▼鍚嶇О', - align: "center", - dataIndex: 'procDefName', - width: 200, - }, - { - title: '娴佺▼涓氬姟绠�瑕佹弿杩�', - align: "center", - dataIndex: 'description', - width:300 - }, - { - title: '娴佺▼鍙戣捣浜哄悕绉�', - align: "center", - dataIndex: 'startUserName', - width: 250, - }, - { - title: '浠诲姟鍚嶇О', - align: "center", - dataIndex: 'taskName', - width:250 - }, - { - title: '鎿嶄綔鏃堕棿', - align: "center", - dataIndex: 'finishTime', - width:300 - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - scopedSlots: { customRender: 'action' }, - align: 'center', - width: 200, - fixed: 'right' - } - ], - url: { - list: "/assign/flow/finishedList", - }, - dictOptions:{}, - selectShenpiData: {}, - selectDispatchFileXqData:{}, - selectInspectionOrderXqData:{} - } - }, - created() { - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + export default { + name: 'NcDeviceCharactersList', + mixins: [JeecgListMixin, mixinDevice], + components: { + InspectionOrderHandle, + JDictSelectTag }, - }, - methods: { - handelDetial(item, index) { - console.log('鐐瑰嚮浜嗚鎯�') - console.log('item----->', item) - console.log('index----->', index) - let approcesstype = this.splitAprocessType(item.category) - console.log('approcesstype--->', approcesstype) - switch (approcesstype) { - case 'drApproval': - this.handDrDetial(item) - break - case 'ggApproval': - this.handDispatchFileDetial(item) - break - case 'sbdjApproval': - this.handInspectionOrder(item) - break - default: - alert('娌℃壘鍒拌娴佺▼') + data() { + return { + description: '璁惧鐗规畩瀛楃绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '搴忓彿', + dataIndex: '', + key: 'rowIndex', + width: 200, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '娴佺▼鍒嗙被', + align: 'center', + dataIndex: 'category_dictText', + width: 200 + }, + { + title: '娴佺▼鍚嶇О', + align: 'center', + dataIndex: 'procDefName', + width: 200 + }, + { + title: '娴佺▼涓氬姟绠�瑕佹弿杩�', + align: 'center', + dataIndex: 'description', + width: 300 + }, + { + title: '娴佺▼鍙戣捣浜哄悕绉�', + align: 'center', + dataIndex: 'startUserName', + width: 250 + }, + { + title: '浠诲姟鍚嶇О', + align: 'center', + dataIndex: 'taskName', + width: 250 + }, + { + title: '鎿嶄綔鏃堕棿', + align: 'center', + dataIndex: 'finishTime', + width: 300 + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: { customRender: 'action' }, + align: 'center', + width: 200, + fixed: 'right' + } + ], + url: { + list: '/assign/flow/finishedList' + }, + dictOptions: {}, + selectShenpiData: {}, + selectDispatchFileXqData: {}, + selectInspectionOrderXqData: {} } }, - splitAprocessType(title) { - let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 - let result = parts[0] - return result + created() { }, - handDrDetial(item) { - this.selectShenpiData = item - this.$refs.modalFormApproval.clearTableSource() - this.$refs.modalFormApproval.getAllApproveData(item) + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, - handDispatchFileDetial(item){ - console.log('item----->', item) - this.selectDispatchFileXqData = item - this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText - this.selectDispatchFileXqData.procInstId=item.procInsId - this.selectDispatchFileXqData.processInstanceId=item.procInsId - this.selectDispatchFileXqData.title=item.description - this.$refs.modalFormDispatchFileXq.clearTableSource() - this.$refs.modalFormDispatchFileXq.getAllApproveData(item) - }, - handInspectionOrder(item) { - console.log('item----->', item) - this.selectInspectionOrderXqData = item - this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText - this.selectInspectionOrderXqData.procInstId=item.procInsId - this.selectInspectionOrderXqData.processInstanceId=item.procInsId - this.selectInspectionOrderXqData.title=item.description - this.$refs.modalFormInspectionOrderXq.clearTableSource() - this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) + methods: { + handelDetial(item, index) { + console.log('鐐瑰嚮浜嗚鎯�') + console.log('item----->', item) + console.log('index----->', index) + let approcesstype = this.splitAprocessType(item.category) + console.log('approcesstype--->', approcesstype) + switch (approcesstype) { + case 'sbdjApproval': + this.handInspectionOrder(item) + break + case 'WEEK_MAINTENANCE': + this.handleWeekMaintenance(item) + break + default: + alert('娌℃壘鍒拌娴佺▼') + } + }, + + splitAprocessType(title) { + let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 + let result = parts[0] + return result + }, + + handleWeekMaintenance() { + + }, + + handInspectionOrder(record) { + console.log('record----->', record) + this.selectInspectionOrderXqData = Object.assign({}, record) + const { todoUsers_dictText, procInsId, description, taskName } = this.selectInspectionOrderXqData + this.selectInspectionOrderXqData.assignee_dictText = todoUsers_dictText + this.selectInspectionOrderXqData.procInstId = procInsId + this.selectInspectionOrderXqData.processInstanceId = procInsId + this.selectInspectionOrderXqData.title = description + this.$refs.modalFormInspectionOrderXq.visible = true + this.$refs.modalFormInspectionOrderXq.title = taskName + this.$refs.modalFormInspectionOrderXq.disableSubmit = true + this.$refs.modalFormInspectionOrderXq.getAllApproveData({ + ...record, + procInstId: procInsId, + processInstanceId: procInsId + }) + this.$refs.modalFormInspectionOrderXq.getBasicInformation(record) + } } } -} </script> <style scoped> -@import '~@assets/less/common.less'; + @import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/flowable/workflow/FlowLedger.vue b/src/views/flowable/workflow/FlowLedger.vue index 41014c0..089356a 100644 --- a/src/views/flowable/workflow/FlowLedger.vue +++ b/src/views/flowable/workflow/FlowLedger.vue @@ -9,11 +9,12 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="娴佺▼鍒嗙被"> - <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> - </a-form-item> - </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="娴佺▼鍒嗙被"> + <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" + dictCode="flow_type"></j-dict-select-tag> + </a-form-item> + </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="娴佺▼鍚嶇О"> <a-input placeholder="璇疯緭鍏ユ祦绋嬪悕绉�" v-model="queryParam.flowName"></a-input> @@ -24,13 +25,15 @@ <a-input placeholder="璇疯緭鍏ョ畝瑕佹弿杩�" v-model="queryParam.title"></a-input> </a-form-item> </a-col> - <a-col :xl="10" :lg="11" :md="12" :sm="24"> - <a-form-item label="鎿嶄綔鏃堕棿"> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" v-model="queryParam.startTime"></j-date> - <span class="query-group-split-cust"></span> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" class="query-group-cust" v-model="queryParam.endTime"></j-date> - </a-form-item> - </a-col> + <a-col :xl="10" :lg="11" :md="12" :sm="24"> + <a-form-item label="鎿嶄綔鏃堕棿"> + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" + v-model="queryParam.startTime"></j-date> + <span class="query-group-split-cust"></span> + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" class="query-group-cust" + v-model="queryParam.endTime"></j-date> + </a-form-item> + </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> @@ -59,212 +62,162 @@ :loading="loading" class="j-table-force-nowrap" @change="handleTableChange"> - - <template slot="htmlSlot" slot-scope="text"> - <div v-html="text"></div> - </template> - <template slot="imgSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> - 涓嬭浇 - </a-button> - </template> - <span slot="action" slot-scope="text, record"> - <a @click="handelDetial(record,text)">璇︽儏</a> + <a @click="handelDetail(record,text)">璇︽儏</a> </span> - </a-table> </div> - <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq> - <DispatchFileXq ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq> - - <InspectionOrderXq ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq> + <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> </a-card> </template> <script> -import '@/assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' -import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue' -import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue' -import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue' + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' + import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' -export default { - name: 'NcDeviceCharactersList', - mixins:[JeecgListMixin, mixinDevice], - components: { - DispatchFileXq, - AssignFileStreamXq: AssignFileStreamXq, - JDictSelectTag, - InspectionOrderXq - }, - data () { - return { - description: '璁惧鐗规畩瀛楃绠$悊椤甸潰', - // 琛ㄥご - columns: [ - { - title: '搴忓彿', - dataIndex: '', - key:'rowIndex', - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '娴佺▼鍒嗙被', - align: "center", - dataIndex: 'category_dictText', - width: 200, - }, - { - title:'娴佺▼鍚嶇О', - align:"center", - dataIndex: 'flowName' - }, - { - title:'娴佺▼涓氬姟绠�瑕佹弿杩�', - align:"center", - dataIndex: 'title' - }, - { - title:'鐢宠浜�', - align:"center", - dataIndex: 'proposer_dictText' - }, - { - title: '鍓嶉┍鑺傜偣', - align: "center", - dataIndex: 'preNode', - }, - { - title:'褰撳墠鑺傜偣', - align:"center", - dataIndex: 'taskName' - }, - { - title:'娴佺▼寮�濮嬫椂闂�', - align:"center", - dataIndex: 'startTime' - }, - { - title:'娴佺▼缁撴潫鏃堕棿', - align:"center", - dataIndex: 'endTime' - }, - { - title:'澶勭悊鏃堕暱', - align:"center", - dataIndex: 'duration' - }, - { - title:'褰撳墠浠诲姟浜�', - align:"center", - dataIndex: 'todoUsers_dictText' - }, - { - title:'澶勭悊杩囩殑浜�', - align:"center", - dataIndex: 'doneUsers_dictText' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - scopedSlots: { customRender: 'action' }, - align: 'center', - width: 200, - fixed: 'right' - } - ], - url: { - list: "/assign/flow/list", - }, - dictOptions:{}, - selectShenpiData: {}, - selectDispatchFileXqData:{}, - selectInspectionOrderXqData:{} - } - }, - created() { - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + export default { + name: 'FlowLedger', + mixins: [JeecgListMixin, mixinDevice], + components: { + InspectionOrderHandle, + JDictSelectTag }, - }, - methods: { - handelDetial(item, index) { - console.log('鐐瑰嚮浜嗚鎯�') - console.log('item----->', item) - console.log('index----->', index) - let approcesstype = this.splitAprocessType(item.category) - console.log('approcesstype--->', approcesstype) - switch (approcesstype) { - case 'drApproval': - item.description=item.title - this.handDrDetial(item) - break - case 'ggApproval': - item.description=item.title - this.handDispatchFileDetial(item) - break - case 'sbdjApproval': - item.description=item.title - this.handInspectionOrderDetial(item) - break - default: - alert('娌℃壘鍒拌娴佺▼') + data() { + return { + description: '娴佺▼绠$悊', + // 琛ㄥご + columns: [ + { + title: '搴忓彿', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '娴佺▼鍒嗙被', + align: 'center', + dataIndex: 'category_dictText', + width: 200 + }, + { + title: '娴佺▼鍚嶇О', + align: 'center', + dataIndex: 'flowName' + }, + { + title: '娴佺▼涓氬姟绠�瑕佹弿杩�', + align: 'center', + dataIndex: 'title' + }, + { + title: '鐢宠浜�', + align: 'center', + dataIndex: 'proposer_dictText' + }, + { + title: '鍓嶉┍鑺傜偣', + align: 'center', + dataIndex: 'preNode' + }, + { + title: '褰撳墠鑺傜偣', + align: 'center', + dataIndex: 'taskName' + }, + { + title: '娴佺▼寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'startTime' + }, + { + title: '娴佺▼缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'endTime' + }, + { + title: '澶勭悊鏃堕暱', + align: 'center', + dataIndex: 'duration' + }, + { + title: '褰撳墠浠诲姟浜�', + align: 'center', + dataIndex: 'todoUsers_dictText' + }, + { + title: '澶勭悊杩囩殑浜�', + align: 'center', + dataIndex: 'doneUsers_dictText' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: { customRender: 'action' }, + align: 'center', + width: 200, + fixed: 'right' + } + ], + url: { + list: '/assign/flow/list' + }, + dictOptions: {}, + selectShenpiData: {}, + selectDispatchFileXqData: {}, + selectInspectionOrderXqData: {} } }, - splitAprocessType(title) { - let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 - let result = parts[0] - return result + created() { }, - handDrDetial(item) { - this.selectShenpiData = item - this.selectShenpiData.assignee_dictText=item.todoUsers_dictText - this.selectShenpiData.createTime=item.startTime - this.selectShenpiData.procInstId=item.processInstanceId - this.$refs.modalFormApproval.clearTableSource() - this.$refs.modalFormApproval.getAllApproveData(item) + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, - handDispatchFileDetial(item){ - this.selectDispatchFileXqData = item - this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText - this.selectDispatchFileXqData.createTime=item.startTime - this.selectDispatchFileXqData.procInstId=item.processInstanceId - this.$refs.modalFormDispatchFileXq.clearTableSource() - this.$refs.modalFormDispatchFileXq.getAllApproveData(item) - }, - handInspectionOrderDetial(item){ - this.selectInspectionOrderXqData = item - this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText - this.selectInspectionOrderXqData.createTime=item.startTime - this.selectInspectionOrderXqData.procInstId=item.processInstanceId - this.$refs.modalFormInspectionOrderXq.clearTableSource() - this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) + methods: { + handelDetail(item, index) { + console.log('鐐瑰嚮浜嗚鎯�') + console.log('item----->', item) + console.log('index----->', index) + let approcesstype = this.splitAprocessType(item.category) + console.log('approcesstype--->', approcesstype) + switch (approcesstype) { + case 'sbdjApproval': + item.description = item.title + this.handInspectionOrderDetail(item) + break + default: + alert('娌℃壘鍒拌娴佺▼') + } + }, + splitAprocessType(title) { + let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 + let result = parts[0] + return result + }, + + handInspectionOrderDetail(item) { + this.selectInspectionOrderXqData = item + this.selectInspectionOrderXqData.assignee_dictText = item.todoUsers_dictText + this.selectInspectionOrderXqData.createTime = item.startTime + this.selectInspectionOrderXqData.procInstId = item.processInstanceId + this.$refs.modalFormInspectionOrderXq.visible = true + this.$refs.modalFormInspectionOrderXq.disableSubmit = true + this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) + this.$refs.modalFormInspectionOrderXq.getBasicInformation(item) + } } } -} </script> <style scoped> -@import '~@assets/less/common.less'; + @import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index ce37b8f..24f25ba 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -82,22 +82,16 @@ @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a @click="handelDetail(record,text)">鏌ョ湅璇︽儏</a> + <a @click="handelDetail(record,text)">鎵ц/瀹℃壒</a> </span> </a-table> </div> - <AssignFileStreamHandle ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamHandle> - <DispatchFileHandle ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData" - @searchReset="searchReset"></DispatchFileHandle> - <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" - @ok="modalFormOk"></DispatchFileBachHandleStyle> <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" @searchReset="searchReset"></InspectionOrderHandle> - <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" - @searchReset="searchReset"></InspectionOrderHandleBzz> - <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" @searchReset="searchReset"></week-maintenance-approval-modal> + <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData" + @searchReset="searchReset"></week-maintenance-approval-modal> <repair-order-approval-modal ref="repairOrderApprovalModal" @searchReset="searchReset" :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal> </a-card> @@ -109,13 +103,9 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' - import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' - import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' - import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' - import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue' import { getAction } from '@api/manage' @@ -123,14 +113,10 @@ name: 'NcDeviceCharactersList', mixins: [JeecgListMixin, mixinDevice], components: { - AssignFileStreamHandle, JDictSelectTag, - DispatchFileHandle, - DispatchFileBachHandleStyle, WeekMaintenanceApprovalModal, RepairOrderApprovalModal, - InspectionOrderHandle, - InspectionOrderHandleBzz + InspectionOrderHandle }, data() { return { @@ -205,10 +191,8 @@ isSameNode: '/assign/flow/isSameNode' }, dictOptions: {}, - selectShenpiData: {}, - selectDispatchFileXqData: {}, selectInspectionOrderData: {}, - selectInspectionOrderDataBzz: {}, + selectWeekMaintenanceData: {}, selectBachData: {}, selectRepairOrderData: {}, //涓氬姟淇℃伅ID @@ -233,12 +217,6 @@ let processType = this.splitAprocessType(item.category) console.log('processType--->', processType) switch (processType) { - case 'drApproval': - this.handDrDetail(item) - break - case 'ggApproval': - this.handDispatchFileDetail(item) - break case 'sbdjApproval': this.handInspectionOrder(item) break @@ -257,34 +235,16 @@ let result = parts[0] return result }, - handDrDetail(record) { - this.selectShenpiData = Object.assign({}, record) - this.$refs.modalFormApproval.visible = true - this.$refs.modalFormApproval.getAllApproveData(record) - }, - searchReset() { - this.queryParam = {} - this.loadData(1) - }, - handDispatchFileDetail(item) { - console.log('item----->', item) - this.selectDispatchFileXqData = item - this.$refs.modalFormDispatchFileXq.clearTableSource() - this.$refs.modalFormDispatchFileXq.getAllApproveData(item) - }, + handInspectionOrder(record) { console.log('record----->', record) - const tableRecord = Object.assign({}, record) - if (record.taskDefKey === 'Confirmed_completed') { - this.selectInspectionOrderDataBzz = tableRecord - this.$refs.modalFormInspectionOrderBzz.getAllApproveData(record) - } else { - this.selectInspectionOrderData = tableRecord - this.$refs.modalFormInspectionOrder.visible = true - this.$refs.modalFormInspectionOrder.getAllApproveData(record) - this.$refs.modalFormInspectionOrder.getBasicInformation(record) - } + this.selectInspectionOrderData = Object.assign({}, record) + this.$refs.modalFormInspectionOrder.visible = true + this.$refs.modalFormInspectionOrder.title = record.name + this.$refs.modalFormInspectionOrder.getAllApproveData(record) + this.$refs.modalFormInspectionOrder.getBasicInformation(record) }, + batchHandle() { if (this.selectedRowKeys.length <= 0) { this.$notification.warning({ @@ -314,8 +274,10 @@ }) } }, + handleWeekMaintenance(item) { if (item && item.dataId) { + this.selectWeekMaintenanceData = Object.assign({}, item) this.$refs.weekMaintenanceApprovalModal.handleDetail(item) this.$refs.weekMaintenanceApprovalModal.title = item.name this.$refs.weekMaintenanceApprovalModal.disableSubmit = false diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue index c954873..f70bca9 100644 --- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue +++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue @@ -1,115 +1,93 @@ <template> - <a-modal - :width="1000" + <j-modal + :title="title" + :width="1200" :visible="visible" + :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }" @ok="submitForm" - @cancel="handCancel" + @cancel="handleCancel" :mask-closable="false" + :confirmLoading="confirmLoading" + switchFullscreen centered > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.title }}</b> - <br> - <br> - <a-tag color="blue"> - 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} - </a-tag> - <a-tag color="blue"> - 浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <a-button @click="fetchAndShowBmp" class="btn-custom" :loading="showBmpButtonLoading">娴佺▼鍥�</a-button> - <div v-if="imageSrc&&isDisplayBmp"> - <img :src="imageSrc" alt="Fetched Image"/> - </div> - <!--<hr class="shallow-hr">--> - </div> + <a-spin :spinning="spinning"> + <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol" + :rules="validatorRules"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鐐规鍩虹淇℃伅</a-divider> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" - :wrapperCol="wrapperCol"> - <a-row> - <a-col :span='span'> - <a-form-model-item label="宸ュ崟鍙�"> - <a-input readOnly v-model="tableRowRecord.orderNum"/> - </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.orderNum"/> + </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-col :span='span'> + <a-form-model-item label="鏍囧噯鍚嶇О"> + <a-input readOnly v-model="tableRowRecord.standardName"/> + </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.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 v-model="tableRowRecord.maintenancePeriod" 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> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label="鐐规鏃ユ湡" prop="inspectionDate"> - <a-input v-model="tableRowRecord.inspectionDate" readOnly/> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label="鐐规杩囨湡鏃堕棿"> - <a-input v-model="tableRowRecord.expirationTime" readOnly/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="{span:3}" :wrapperCol="{span:20}"> - <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card :bordered="false"> - <a-timeline> - <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> - <div> - <h3 style="font-weight: bold;">{{item.taskName}}</h3> - <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> - <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> - <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> - <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> + <a-row> + <a-col :span='span'> + <a-form-model-item label="鏍囧噯缂栫爜"> + <a-input readOnly v-model="tableRowRecord.standardCode"/> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="鐐规鏃ユ湡"> + <a-input v-model="tableRowRecord.inspectionDate" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="鐐规杩囨湡鏃堕棿"> + <a-input v-model="tableRowRecord.expirationTime" readOnly/> + </a-form-model-item> + </a-col> + </a-row> - <a-tabs default-active-key='1'> + <a-row> + <a-col :span='span'> + <a-form-model-item label="淇濆吇鍛ㄦ湡"> + <a-input v-model="tableRowRecord.maintenancePeriod" 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> + </a-col> + </a-row> + + <a-row> + <a-col :span="span*3"> + <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:21}"> + <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <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"/> + </a-form-model-item> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> + 淇濆吇椤逛俊鎭� + </a-divider> + + <a-tabs v-model="activeTabKey"> <a-tab-pane key="1" tab="淇濆吇椤规槑缁�"> <j-vxe-table ref="editableDetailTable" @@ -127,6 +105,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'" placeholder="璇烽�夋嫨鐐规缁撴灉" @change="handleInspectionResultSelectChange($event,props.row)" style="width: 100%"/> @@ -134,20 +113,46 @@ <template v-slot:exceptionDescription="props"> <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" - :disabled="!props.row.inspectionResult||props.row.inspectionResult==='1'"/> + :placeholder="props.row.inspectionResult==='2'?'璇疯緭鍏ュ紓甯告弿杩�':''" + :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'||!props.row.inspectionResult||props.row.inspectionResult==='1'"/> </template> <template v-slot:reportFlag="props"> <j-dict-select-tag v-model="props.row.reportFlag" - :disabled="!props.row.inspectionResult||props.row.inspectionResult==='1'" + :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁淇濅慨':''" + :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'||!props.row.inspectionResult||props.row.inspectionResult==='1'" dictCode="yn" style="width: 100%"/> </template> </j-vxe-table> </a-tab-pane> - <a-button v-if="selectedRowKeys.length>0" slot="tabBarExtraContent" type="primary" - @click="handleSelectAllInspectionResult">鎵归噺鐐规姝e父 + <template v-if="selectShenpiData.procInstId"> + <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> + <a-card :bordered="false"> + <a-timeline> + <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> + <div> + <h3 style="font-weight: bold;">{{item.taskName}}</h3> + <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> + <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> + <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> + <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> + </div> + </a-timeline-item> + </a-timeline> + </a-card> + </a-tab-pane> + + <a-tab-pane key='3' tab='娴佺▼鍥�'> + <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'" + slot="tabBarExtraContent" type="primary" + @click="handleSelectAllInspectionResult">鎵归噺鐐规姝e父 </a-button> <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">--> @@ -161,9 +166,32 @@ <!--</a-button>--> <!--</a-dropdown>--> </a-tabs> - </a-spin> - </a-card> - </a-modal> + + <template v-if="isDisplayConfirm"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鐝粍闀跨‘璁や俊鎭� + </a-divider> + + <a-row :gutter="24"> + <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="璇烽�夋嫨澶勭悊绫诲瀷"/> + </a-form-model-item> + </a-col> + + <a-col :span="12"> + <a-form-model-item prop="confirmComment" label="澶勭悊鎰忚"> + <a-textarea placeholder="璇疯緭鍏ュ鐞嗘剰瑙�" + :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'" + v-model="tableRowRecord.confirmComment"/> + </a-form-model-item> + </a-col> + </a-row> + </template> + </a-form-model> + </a-spin> + </j-modal> </template> <script> @@ -171,22 +199,32 @@ import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' import { JVXETypes } from '@comp/jeecg/JVxeTable' + import moment from 'moment' export default { name: 'InspectionOrderHandle', components: { MaintenanceEquipmentSelect }, props: { selectShenpiData: { - type: Object, - required: true + type: Object } }, data() { return { - span: 12, + span: 8, + confirmLoading: false, spinning: false, tableRowRecord: {}, + assignFileStream: {}, hitaskDataSource: [], + validatorRules: { + confirmDealType: [ + { required: true, message: '璇烽�夋嫨澶勭悊绫诲瀷' } + ], + confirmComment: [ + { required: true, message: '璇疯緭鍏ュ鐞嗘剰瑙�' } + ] + }, imageSrc: null, labelCol: { xs: { span: 24 }, @@ -212,7 +250,7 @@ title: '搴忓彿', key: 'itemCode', type: JVXETypes.normal, - width: '10%', + width: '5%', align: 'center', fixed: 'left' }, @@ -220,7 +258,7 @@ title: '淇濆吇椤�', key: 'itemName', type: JVXETypes.normal, - width: '20%', + width: '15%', align: 'center', fixed: 'left' }, @@ -228,7 +266,7 @@ title: '淇濆吇瑕佹眰', key: 'itemDemand', type: JVXETypes.normal, - width: '30%', + width: '15%', align: 'center', fixed: 'left' }, @@ -237,16 +275,22 @@ key: 'inspectionResult', type: JVXETypes.slot, slotName: 'inspectionResult', - width: '20%', - align: 'center' + width: '15%', + align: 'center', + validateRules: [ + { required: true, message: '${title}涓嶈兘涓虹┖锛�' } + ] }, { title: '寮傚父鎻忚堪', key: 'exceptionDescription', type: JVXETypes.slot, slotName: 'exceptionDescription', - width: '30%', - align: 'center' + width: '20%', + align: 'center', + validateRules: [ + { handler: this.customValidator } + ] }, { title: '寮傚父鏄惁鎶ヤ慨', @@ -254,13 +298,27 @@ type: JVXETypes.slot, slotName: 'reportFlag', width: '20%', - align: 'center' + align: 'center', + validateRules: [ + { handler: this.customValidator } + ] } ] }, isDisplayBmp: false, showBmpButtonLoading: false, - selectedRowKeys: [] + selectedRowKeys: [], + disableSubmit: false, + activeTabKey: '1', + title: '' + } + }, + computed: { + hasInspectionDateArrived() { + return moment(this.tableRowRecord.inspectionDate).diff(moment(), 'hours') <= 0 + }, + isDisplayConfirm() { + return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.inspectionStatus) } }, methods: { @@ -269,11 +327,29 @@ * @param record 寰呭姙璁板綍淇℃伅 */ getAllApproveData(record) { - const param = { 'procInstId': record.procInstId } - getAction(this.url.queryHisTaskList, param) - .then(res => { - this.hitaskDataSource = res.result - }) + if (record.procInstId) { + const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = record + const param = { procInstId } + const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } + const that = this + + getAction(this.url.queryHisTaskList, param) + .then(res => { + that.hitaskDataSource = res.result + }) + + downFile(this.url.diagramView, imageParam, 'get') + .then((res => { + const urlObject = window.URL.createObjectURL(new Blob([res])) + that.imageSrc = urlObject + })) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: res.message + }) + }) + } }, /** @@ -281,6 +357,7 @@ * @param record 寰呭姙璁板綍淇℃伅 */ getBasicInformation(record) { + this.activeTabKey = '1' this.tableRowRecord = {} this.detail.dataSource = [] this.spinning = true @@ -290,62 +367,52 @@ .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) } })) }, - // 鑾峰彇骞跺睍寮�娴佺▼鍥� - fetchAndShowBmp() { - this.isDisplayBmp = !this.isDisplayBmp - if (!this.imageSrc) { - const { processDefinitionId, processInstanceId, processDefinitionKey } = this.selectShenpiData - let param = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } - this.showBmpButtonLoading = true - const that = this - downFile(this.url.diagramView, param, 'get') - .then((res => { - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - .catch(err => { - that.$notification.error({ - message: '娑堟伅', - description: res.message - }) - }) - .finally(() => { - this.showBmpButtonLoading = false - }) + async submitForm() { + let errMap = await this.$refs.editableDetailTable.validateTable() + if (errMap) { + console.log('err', errMap) + return } - }, - submitForm() { - const flowTaskVo = {} - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() - const that = this - this.confirmLoading = true - console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo) - // httpAction(this.url.approve, flowTaskVo, 'post') - // .then((res) => { - // if (res.success) { - // that.$message.success(res.message) - // //鍒锋柊琛ㄦ牸 - // that.$emit('searchReset') - // that.handleCancel() - // } else { - // that.$message.warning(res.message) - // } - // }) - // .finally(() => { - // that.confirmLoading = false - // }) + this.$refs.form.validate(valid => { + if (valid) { + this.confirmLoading = this.spinning = true + const flowTaskVo = {} + flowTaskVo.dataId = this.selectShenpiData.dataId + flowTaskVo.taskId = this.selectShenpiData.id + flowTaskVo.userId = this.selectShenpiData.assignee + flowTaskVo.instanceId = this.selectShenpiData.procInstId + flowTaskVo.values = this.selectShenpiData.variables + flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType + flowTaskVo.confirmComment = this.tableRowRecord.confirmComment + flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() + const that = this + console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo) + httpAction(this.url.approve, flowTaskVo, 'post') + .then((res) => { + if (res.success) { + that.$message.success(res.message) + //鍒锋柊琛ㄦ牸 + that.$emit('searchReset') + that.handleCancel() + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = this.spinning = false + }) + } else { + return false + } + }) }, autoCompleteForm({ standardName, maintenancePeriod, standardCode }) { @@ -360,7 +427,6 @@ this.selectedRowKeys.forEach(key => { const dataItem = this.detail.dataSource.find(item => item.id === key) if (dataItem && dataItem.inspectionResult !== '1') { - console.log('dataItem', dataItem) delete dataItem.exceptionDescription delete dataItem.reportFlag dataItem.inspectionResult = '1' @@ -388,7 +454,19 @@ if (record.reportFlag) delete record.reportFlag }, - handCancel() { + customValidator({ cellValue, row }, callback) { + if (row.inspectionResult === '2') { + if (!cellValue) { + callback(false, '${title}涓嶈兘涓虹┖锛�') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀� + } else { + callback(true) // true = 閫氳繃楠岃瘉 + } + } else { + callback(true) + } + }, + + handleCancel() { this.selectedRowKeys = [] this.visible = false } diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue deleted file mode 100644 index a658adc..0000000 --- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue +++ /dev/null @@ -1,468 +0,0 @@ -<!-- - Description: 宸ヤ綔娴�-璁惧鐐规澶勭悊椤甸潰 List - Author: 浣滆�� liuyh - Date: 2025-02-27 ---> -<template> - <a-modal - :title="title" - :width="width" - :visible="visible" - :footer="null" - @cancel="handCancel" - > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.title }}</b> - <br> - <br> - <a-tag color="blue"> - 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} - </a-tag> - <a-tag color="blue"> - 浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> - </div> - <hr class="shallow-hr"> - </div> - <div> - <b>鐐规宸ュ崟璇︽儏</b> - <br> - <a-form :form='form'> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> - <a-row> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙疯嚜鍔ㄧ敓鎴�" :disabled="true" v-model="tableRowRecord.orderNum" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿"> - <MaintenanceEquipmentSelect placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="tableRowRecord.equipmentId" - :maintenanceCategory="maintenanceCategory" :disabled="true" - @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> - </a-form-model-item> - </a-col> - - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗗悕绉�" disabled v-model="this.standardName" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="鏍囧噯缂栫爜"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗙紪鐮�" disabled v-model="this.standardCode" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input-number v-model="this.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="鐐规浜�"> - <j-dict-select-tag v-model="tableRowRecord.operator" placeholder="璇烽�夋嫨鐢ㄦ埛" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label="鐐规鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> - <j-date placeholder="璇烽�夋嫨鐐规鏃ユ湡" v-model="tableRowRecord.inspectionDate" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label="鐐规杩囨湡鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> - <j-date placeholder="璇烽�夋嫨鐐规杩囨湡鏃堕棿" v-model="tableRowRecord.expirationTime" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row > - <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> - <a-textarea v-model="tableRowRecord.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" disabled /> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card> - <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> - <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> - <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> - <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> - <div class="left_qiu"><span>{{item.taskName}}</span></div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> - </a-spin> - </a-form> - </div> - <div> - <hr class="shallow-hr"> - <br> - <b>淇濆吇椤规槑缁�</b> - <br> - <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> - <a-row :gutter="24"> - <j-vxe-table - ref="editableDetailTable" - :rowNumber="false" - :rowSelection="false" - :bordered="true" - :alwaysEdit="true" - :toolbar="false" - keep-source - :height="300" - :loading="detail.loading" - :dataSource="detail.dataSource" - :columns="detail.columns" - :disabled="true" - style="margin-top: 8px;" /> - </a-row> - </a-form-model> - </div> - <div> - <hr class="shallow-hr"> - <br> - <b>鐝粍闀跨‘璁�</b> - <br> - <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> - <a-row> - <a-col ::span='span' class="btxx"> - <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='dealType'> - <j-dict-select-tag type='list' v-model='assignFileStream.dealType' dictCode='approved_rejected' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> - </a-form-model-item > - </a-col> - <a-col :span="24" class="btxx"> - <a-form-model-item label="澶勭悊鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea v-model="assignFileStream.dealSuggestion" rows="4" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"/> - </a-form-model-item > - </a-col> - </a-row> - <div class="table-operator" style="text-align: right;"> - <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> - <a-button @click="submitForm">鎻� 浜�</a-button> - </div> - </a-form-model> - </div> - </a-card> - - - </a-modal> -</template> - -<script> - -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' -import { JVXETypes } from '@comp/jeecg/JVxeTable' -export default { - name: 'FlowShenPi', - components: { MaintenanceEquipmentSelect }, - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - status: { - rules: [ - { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, - ] - }, - }, - approveData: {}, - flowData: {}, - title: '璇︽儏椤甸潰', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/eam/eamInspectionOrder/selectVoById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/eam/eamInspectionOrder/approval", - saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile" - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [], - maintenanceCategory: 'POINT_INSPECTION', - standardName:"", - maintenancePeriod:"", - standardCode:"", - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.normal, - width: '10%', - align:"center", - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.normal, - width: '20%', - align:"center", - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.normal, - width: '30%', - align:"center", - }, - { - title: "鐐规缁撴灉" - ,key: 'inspectionResult' - ,type: JVXETypes.selectSearch - ,dictCode:'eam_inspection_result' - ,width: '20%' - ,align:"center" - }, - { - title: '寮傚父鎻忚堪', - key: 'exceptionDescription', - type: JVXETypes.normal, - width: '30%', - align:"center", - }, - { - title: '寮傚父鏄惁鎶ヤ慨', - key: 'reportFlag', - type: JVXETypes.selectSearch, - dictCode:'yn', - width: '20%', - align:"center", - } - ] - } - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') - } - }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() - }, - autocompleteForm(selectObj) { - this.standardName = selectObj.standardName - this.maintenancePeriod=selectObj.maintenancePeriod - this.standardCode=selectObj.standardCode - }, - submitForm () { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let flowTaskVo = {} - let tableData = that.$refs.editableDetailTable.getTableData() - flowTaskVo.dealType=that.assignFileStream.dealType - flowTaskVo.dealSuggestion=that.assignFileStream.dealSuggestion - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.tableDetailList=tableData - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.visible = false - //鍒锋柊琛ㄦ牸 - that.$emit('searchReset') - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.procInstId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result[0] - this.detail.dataSource=res.result[0].tableDetailList - console.log('this.tableRowRecord----->', this.tableRowRecord[0]) - } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) - } - } -} -</script> -<style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} - -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} - -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} - -@import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue deleted file mode 100644 index 4ef96af..0000000 --- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue +++ /dev/null @@ -1,443 +0,0 @@ -<!-- - Description: 宸ヤ綔娴�-璁惧鐐规澶勭悊椤甸潰 List - Author: 浣滆�� liuyh - Date: 2025-02-27 ---> -<template> - <a-modal - :title="title" - :width="width" - :visible="visible" - :footer="null" - @cancel="handCancel" - > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.title }}</b> - <br> - <br> - <a-tag color="blue"> - 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} - </a-tag> - <a-tag color="blue"> - 浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> - </div> - <hr class="shallow-hr"> - </div> - <div> - <b>鐐规宸ュ崟璇︽儏</b> - <br> - <a-form :form='form'> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> - <a-row> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙疯嚜鍔ㄧ敓鎴�" :disabled="true" v-model="tableRowRecord.orderNum" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿"> - <MaintenanceEquipmentSelect placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="tableRowRecord.equipmentId" - :maintenanceCategory="maintenanceCategory" :disabled="true" - @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> - </a-form-model-item> - </a-col> - - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗗悕绉�" disabled v-model="this.standardName" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="鏍囧噯缂栫爜"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗙紪鐮�" disabled v-model="this.standardCode" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input-number v-model="this.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="鐐规浜�"> - <j-dict-select-tag v-model="tableRowRecord.operator" placeholder="璇烽�夋嫨鐢ㄦ埛" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label="鐐规鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> - <j-date placeholder="璇烽�夋嫨鐐规鏃ユ湡" v-model="tableRowRecord.inspectionDate" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label="鐐规杩囨湡鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> - <j-date placeholder="璇烽�夋嫨鐐规杩囨湡鏃堕棿" v-model="tableRowRecord.expirationTime" disabled style="width: 100%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row > - <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> - <a-textarea v-model="tableRowRecord.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" disabled /> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card> - <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> - <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> - <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> - <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> - <div class="left_qiu"><span>{{item.taskName}}</span></div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> - </a-spin> - </a-form> - </div> - <div> - <hr class="shallow-hr"> - <br> - <b>淇濆吇椤规槑缁�</b> - <br> - <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> - <a-row :gutter="24"> - <j-vxe-table - ref="editableDetailTable" - :rowNumber="false" - :rowSelection="false" - :bordered="true" - :alwaysEdit="true" - :toolbar="false" - :disabled="true" - keep-source - :height="300" - :loading="detail.loading" - :dataSource="detail.dataSource" - :columns="detail.columns" - style="margin-top: 8px;" /> - </a-row> - </a-form-model> - </div> - </a-card> - - - </a-modal> -</template> - -<script> - -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' -import { JVXETypes } from '@comp/jeecg/JVxeTable' -export default { - name: 'FlowShenPi', - components: { MaintenanceEquipmentSelect }, - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - status: { - rules: [ - { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, - ] - }, - }, - approveData: {}, - flowData: {}, - title: '璇︽儏椤甸潰', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/eam/eamInspectionOrder/selectVoById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/eam/eamInspectionOrder/approval", - saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile" - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [], - maintenanceCategory: 'POINT_INSPECTION', - standardName:"", - maintenancePeriod:"", - standardCode:"", - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.normal, - width: '10%', - align:"center", - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.normal, - width: '20%', - align:"center", - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.normal, - width: '30%', - align:"center", - }, - { - title: "鐐规缁撴灉" - ,key: 'inspectionResult' - ,type: JVXETypes.selectSearch - ,dictCode:'eam_inspection_result' - ,width: '20%' - ,align:"center" - }, - { - title: '寮傚父鎻忚堪', - key: 'exceptionDescription', - type: JVXETypes.normal, - width: '30%', - align:"center", - }, - { - title: '寮傚父鏄惁鎶ヤ慨', - key: 'selectSearch', - type: JVXETypes.selectSearch, - dictCode:'yn', - width: '20%', - align:"center", - } - ] - } - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') - } - }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() - }, - autocompleteForm(selectObj) { - this.standardName = selectObj.standardName - this.maintenancePeriod=selectObj.maintenancePeriod - this.standardCode=selectObj.standardCode - }, - submitForm () { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let flowTaskVo = {} - let tableData = that.$refs.editableDetailTable.getTableData() - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.tableDetailList=tableData - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.visible = false - //鍒锋柊琛ㄦ牸 - that.$emit('searchReset') - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.procInstId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result[0] - this.detail.dataSource=res.result[0].tableDetailList - console.log('this.tableRowRecord----->', this.tableRowRecord[0]) - } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) - } - } -} -</script> -<style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} - -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} - -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} - -@import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue b/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue deleted file mode 100644 index fc8405c..0000000 --- a/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue +++ /dev/null @@ -1,432 +0,0 @@ -<!-- - Description: 宸ヤ綔娴�-鎸囨淳璁惧澶勭悊椤甸潰 List - Author: 浣滆�� liuyh - Date: 2025-02-27 ---> -<template> - <a-modal - :title="title" - :width="width" - :visible="visible" - :footer="null" - @cancel="handCancel" - > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.title }}</b> - <br> - <br> - <a-tag color="blue"> - 澶勭悊浜� {{ selectShenpiData.assignee }} - </a-tag> - <a-tag color="blue"> - 鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> - </div> - <hr class="shallow-hr"> - </div> - <div> - <b>鎸囨淳璇︽儏</b> - <br> - <a-form :form='form'> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> - <a-row> - <a-col :span='span'> - <a-form-model-item label='浜у搧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='閮ㄤ欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='闆朵欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='partsName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.partsName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='宸ュ簭鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='processName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.processName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='宸ユ鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='stepName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.stepName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='璁惧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='璁惧绫诲悕绉�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceManagementCode'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceManagementCode'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='璁惧绫诲悕绉�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceManagementName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceManagementName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='version'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.version'></a-input> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card> - <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> - <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> - <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> - <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> - <div class="left_qiu"><span>{{item.taskName}}</span></div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> - </a-spin> - </a-form> - </div> - <div> - <hr class="shallow-hr"> - <br> - <b>瀹℃壒璇︽儏</b> - <br> - <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> - <a-row> - <a-col ::span='span'> - <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='applyUser'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.applyUser'></a-input> - </a-form-model-item > - </a-col> - <a-col ::span='span'> - <a-form-model-item label="鐢宠鍘熷洜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applyReason"> - <a-textarea :disabled='coldisabled' v-model="tableRowRecord.applyReason" rows="4" /> - </a-form-model-item > - </a-col> - <a-col ::span='span'> - <a-form-model-item label="鐢宠鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applyTime"> - <a-input :disabled='coldisabled' v-model='tableRowRecord.applyTime'></a-input> - </a-form-model-item > - </a-col> - <a-col :span="24"> - <a-form-item label="瀵嗙骇涓�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag type='list' v-model='assignFileStream.secretLevel' dictCode='dnc_secret_level' placeholder="璇烽�夋嫨瀵嗙骇" /> - </a-form-item> - </a-col> - <a-col :span="24" class="btxx"> - <a-form-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='dnc_assign_stream_status' placeholder="璇烽�夋嫨瀹℃壒鐘舵��" /> - </a-form-item> - </a-col> - <a-col :span="24" class="btxx"> - <a-form-model-item label="瀹℃壒鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="璇疯緭鍏ュ鎵规剰瑙�"/> - </a-form-model-item > - </a-col> - </a-row> - <div class="table-operator" style="text-align: right;"> - <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> - <a-button @click="submitForm">鎻� 浜�</a-button> - </div> - </a-form-model> - </div> - </a-card> - - - </a-modal> -</template> - -<script> - -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -export default { - name: 'FlowShenPi', - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - version: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗g増鏈�!'}, - ] - }, - applyUser: { - rules: [ - { required: true, message: '璇烽�夋嫨鐢宠浜�!'}, - ] - }, - approveContent: { - rules: [ - { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!'}, - ] - }, - docName: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗e悕绉�!'}, - ] - }, - status: { - rules: [ - { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, - ] - }, - }, - approveData: {}, - flowData: {}, - title: '瀹℃壒椤甸潰', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/nc/activit/selectVoById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/nc/activit/assign/file/approve", - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [] - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') - } - }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() - }, - submitForm () { - const that = this; - if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ - this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') - return false; - } - if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒') - return false; - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let flowTaskVo = {} - flowTaskVo.status=that.assignFileStream.status; - flowTaskVo.approveContent =that.assignFileStream.approveContent; - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.targetKey = this.selectShenpiData.taskDefKey - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.assignee = this.selectShenpiData.assignee - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.procInstId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result - console.log('this.tableRowRecord----->', this.tableRowRecord) - } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) - } - } -} -</script> -<style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} - -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} - -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} - -@import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue b/src/views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue deleted file mode 100644 index 6b602c7..0000000 --- a/src/views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue +++ /dev/null @@ -1,389 +0,0 @@ -<!-- - Description: 宸ヤ綔娴�-鎸囨淳璁惧璇︽儏椤甸潰 List - Author: 浣滆�� liuyh - Date: 2025-02-27 ---> -<template> - <a-modal - :title="title" - :width="width" - :visible="visible" - :footer="null" - @cancel="handCancel" - > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.description }}</b> - <br> - <br> - <a-tag color="blue"> - 澶勭悊浜� {{ selectShenpiData.assignee }} - </a-tag> - <a-tag color="blue"> - 鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> - </div> - <hr class="shallow-hr"> - </div> - <div> - <b>鎸囨淳璇︽儏</b> - <br> - <a-form :form='form'> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> - <a-row> - <a-col :span='span'> - <a-form-model-item label='浜у搧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='閮ㄤ欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='闆朵欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='partsName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.partsName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='宸ュ簭鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='processName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.processName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='宸ユ鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='stepName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.stepName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='璁惧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='璁惧绫诲悕绉�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceManagementCode'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceManagementCode'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='璁惧绫诲悕绉�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceManagementName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceManagementName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='version'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.version'></a-input> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card> - <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> - <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> - <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> - <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> - <div class="left_qiu"><span>{{item.taskName}}</span></div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> - </a-spin> - </a-form> - </div> - </a-card> - - - </a-modal> -</template> - -<script> - -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -export default { - name: 'FlowShenPi', - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - version: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗g増鏈�!'}, - ] - }, - applyUser: { - rules: [ - { required: true, message: '璇烽�夋嫨鐢宠浜�!'}, - ] - }, - approveContent: { - rules: [ - { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!'}, - ] - }, - docName: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗e悕绉�!'}, - ] - }, - status: { - rules: [ - { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, - ] - }, - }, - approveData: {}, - flowData: {}, - title: '璇︽儏椤甸潰', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/nc/activit/selectVoById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/activit/assign/file/approve", - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [] - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') - } - }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() - }, - submitForm () { - const that = this; - if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ - this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') - return false; - } - if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒') - return false; - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let flowTaskVo = {} - flowTaskVo.status=that.assignFileStream.status; - flowTaskVo.approveContent =that.assignFileStream.approveContent; - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.targetKey = this.selectShenpiData.taskDefKey - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.assignee = this.selectShenpiData.assignee - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - console.log('item----->', item) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.processInstanceId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result - console.log('this.tableRowRecord----->', this.tableRowRecord) - } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) - } - } -} -</script> -<style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} - -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} - -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} - -@import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue b/src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue deleted file mode 100644 index a883bcc..0000000 --- a/src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue +++ /dev/null @@ -1,216 +0,0 @@ -<template> - <a-spin :spinning="confirmLoading"> - <j-form-container > - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> - <a-row> - <a-col :span="24" v-if="selectBachData.taskDefKey ==='task_proofread'" class="btxx"> - <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> - <j-dict-select-tag type='list' v-model='model.status' dictCode='nc_sq_handle_type_jd' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> - </a-form-model-item > - </a-col> - <a-col :span="24" v-if="selectBachData.taskDefKey ==='task_approve' || selectBachData.taskDefKey ==='task_cut' || selectBachData.taskDefKey ==='task_finalize'" class="btxx"> - <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> - <j-dict-select-tag type='list' v-model='model.status' dictCode='nc_sq_handle_type' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> - </a-form-model-item > - </a-col> - <a-col :span="24" class="btxx"> - <a-form-model-item label="澶勭悊鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea v-model="model.approveContent" rows="4" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"/> - </a-form-model-item > - </a-col> - </a-row> - </a-form-model> - </j-form-container> - </a-spin> -</template> - -<script> - import axios from 'axios'; - import { - httpAction, - getAction - } from '@/api/manage' - import { - validateDuplicateValue - } from '@/utils/util' - - export default { - name: 'ChCfForm', - components: {}, - props: { - //琛ㄥ崟绂佺敤 - disabled: { - type: Boolean, - default: false, - required: false - } - }, - data() { - return { - principalList: [], - model: {}, - labelCol: { - xs: { - span: 24 - }, - sm: { - span: 5 - }, - }, - wrapperCol: { - xs: { - span: 24 - }, - sm: { - span: 16 - }, - }, - confirmLoading: false, - validatorRules: { - address: [{ - required: true, - message: '璇烽�夋嫨鍦板潃!' - }, ], - bt: [{ - required: true, - message: '璇疯緭鍏ユ爣棰�!' - }, ], - }, - url: { - approvalBatch: "/dncFlow/dispatchFile/approvalBatch", - }, - selectBachData:{} - } - }, - computed: { - formDisabled() { - return this.disabled - }, - }, - created() { - //澶囦唤model鍘熷鍊� - this.modelDefault = JSON.parse(JSON.stringify(this.model)); - }, - methods: { - handleChange(e) { - console.log(e); - let sss = e.split('||||') - console.log(sss); - this.model.jd = sss[0] - this.model.address = sss[1] - console.log(sss) - }, - handleSearch(e) { - if (e === '') { - return - } - const that = this; - axios.get('/s-api/api/index/lsdz?input=' + e) - .then(response => { - that.principalList = [] - console.log(that.principalList) - for (var i = 0; i < response.data.data.length; i++) { - that.principalList.push({ - value: response.data.data[i].inputValueId + '||||' + response.data.data[i].setout, - label: response.data.data[i].setout, - }); - } - // that.principalList = response.data.data - console.log(that.principalList, '8888'); // 杈撳嚭杩斿洖鐨勬暟鎹� - }) - .catch(error => { - console.error(error); // 澶勭悊閿欒鎯呭喌 - }); - }, - add() { - this.edit(this.modelDefault); - }, - edit(record) { - this.selectBachData=record - this.visible = true; - }, - submitForm () { - const that = this; - if (that.selectBachData.taskDefKey ==='task_prepare'){ - // 瑙﹀彂琛ㄥ崟楠岃瘉-閲嶆柊鍚姩 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let url=this.url.approvalBatch; - let method = 'post'; - let flowTaskVo = {} - flowTaskVo.comment =this.model.approveContent; - flowTaskVo.taskIds=that.selectBachData.taskIds - flowTaskVo.targetKey=that.selectBachData.taskDefKey - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.valid = false - //鍒锋柊琛ㄦ牸 - that.$emit('searchReset') - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - }) - //璺冲嚭鏂规硶 - return false; - }else { - if (!that.model.status==null || that.model.status===undefined){ - this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�') - return false; - } - } - if (!that.model.approveContent==null || that.model.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒') - return false; - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let url=this.url.approvalBatch - let method = 'post'; - let handle =this.model.status === '1'; - let flowTaskVo = {} - switch (that.selectBachData.taskDefKey){ - case "task_approve": - flowTaskVo.ratify=handle; - break; - case "task_cut": - flowTaskVo.cut=handle; - break; - case "task_finalize": - flowTaskVo.stereotype=handle; - break; - } - if (that.selectBachData.taskDefKey ==='task_proofread'){ - flowTaskVo.proofreadStatus =that.model.status; - } - flowTaskVo.comment =that.model.approveContent; - flowTaskVo.taskIds=that.selectBachData.taskIds - flowTaskVo.targetKey=that.selectBachData.taskDefKey - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.valid = false - that.close(); - //鍒锋柊琛ㄦ牸 - that.$emit('ok') - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - }) - }, - } - } -</script> \ No newline at end of file diff --git "a/src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle\043Drawer.vue" "b/src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle\043Drawer.vue" deleted file mode 100644 index c3bfc8a..0000000 --- "a/src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle\043Drawer.vue" +++ /dev/null @@ -1,62 +0,0 @@ -<template> - <j-modal - :title="title" - :width="width" - :visible="visible" - switchFullscreen - @ok="handleOk" - :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" - @cancel="handleCancel" - cancelText="鍏抽棴"> - <DispatchFileBachHandleForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></DispatchFileBachHandleForm> - </j-modal> - - -</template> -<script> - - import DispatchFileBachHandleForm from './DispatchFileBachHandleForm.vue' - - export default { - name: 'DispatchFileBachHandleStyle', - components: { - DispatchFileBachHandleForm - }, - data () { - return { - title:'', - width:800, - visible: false, - disableSubmit: false - } - }, - methods: { - add () { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.add(); - }) - }, - edit (record) { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.edit(record); - }); - }, - close () { - this.$emit('close'); - this.visible = false; - }, - submitCallback(){ - this.$emit('ok'); - this.visible = false; - }, - handleOk () { - this.$refs.realForm.submitForm(); - }, - handleCancel () { - this.close() - } - } - } -</script> \ No newline at end of file diff --git a/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue b/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue deleted file mode 100644 index 3df4835..0000000 --- a/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue +++ /dev/null @@ -1,415 +0,0 @@ -<!-- - Description: 宸ヤ綔娴�-NC瀹$澶勭悊椤甸潰 List - Author: 浣滆�� liuyh - Date: 2025-02-27 ---> -<template> - <a-modal - :title="title" - :width="width" - :visible="visible" - :footer="null" - @cancel="handCancel" - > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.title }}</b> - <br> - <br> - <a-tag color="blue"> - 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} - </a-tag> - <a-tag color="blue"> - 浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> - </div> - <hr class="shallow-hr"> - </div> - <div> - <b>瀹$璇︽儏</b> - <br> - <a-form :form='form'> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='publishVersion'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.publishVersion'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚庣紑' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docSuffix'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docSuffix'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='绯荤粺鎸囧畾鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鍑哄簱鐘舵��' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='pullStatus_dictText'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.pullStatus_dictText'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鍑哄簱浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='pullUser_dictText'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.pullUser_dictText'></a-input> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card> - <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> - <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> - <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> - <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> - <div class="left_qiu"><span>{{item.taskName}}</span></div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> - </a-spin> - </a-form> - </div> - <div> - <hr class="shallow-hr"> - <br> - <b>瀹℃壒璇︽儏</b> - <br> - <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> - <a-row> - <a-col ::span='span' v-if="selectShenpiData.taskDefKey ==='task_proofread'" class="btxx"> - <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> - <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='nc_sq_handle_type_jd' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> - </a-form-model-item > - </a-col> - <a-col ::span='span' v-if="selectShenpiData.taskDefKey ==='task_approve' || selectShenpiData.taskDefKey ==='task_cut' || selectShenpiData.taskDefKey ==='task_finalize'" class="btxx"> - <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> - <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='nc_sq_handle_type' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> - </a-form-model-item > - </a-col> - <a-col :span="24" class="btxx"> - <a-form-model-item label="澶勭悊鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"/> - </a-form-model-item > - </a-col> - </a-row> - <div class="table-operator" style="text-align: right;"> - <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> - <a-button @click="submitForm">鎻� 浜�</a-button> - </div> - </a-form-model> - </div> - </a-card> - - - </a-modal> -</template> - -<script> - -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -export default { - name: 'FlowShenPi', - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - status: { - rules: [ - { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, - ] - }, - }, - approveData: {}, - flowData: {}, - title: '璇︽儏椤甸潰', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/dncFlow/dispatchFile/selectVoById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/dncFlow/dispatchFile/approval", - saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile" - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [] - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') - } - }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() - }, - submitForm () { - const that = this; - if (that.selectShenpiData.taskDefKey ==='task_prepare'){ - // 瑙﹀彂琛ㄥ崟楠岃瘉-閲嶆柊鍚姩 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.saveDispatchFile; - let method = 'post'; - let flowTaskVo = {} - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.taskId = this.selectShenpiData.id - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.visible = false - //鍒锋柊琛ㄦ牸 - that.$emit('searchReset') - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - }) - //璺冲嚭鏂规硶 - return false; - }else { - if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ - this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�') - return false; - } - } - if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒') - return false; - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let handle =that.assignFileStream.status === '1'; - let flowTaskVo = {} - switch (that.selectShenpiData.taskDefKey){ - case "task_approve": - flowTaskVo.ratify=handle; - break; - case "task_cut": - flowTaskVo.cut=handle; - break; - case "task_finalize": - flowTaskVo.stereotype=handle; - break; - } - if (that.selectShenpiData.taskDefKey ==='task_proofread'){ - flowTaskVo.proofreadStatus =that.assignFileStream.status; - } - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.values = this.selectShenpiData.variables - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.visible = false - //鍒锋柊琛ㄦ牸 - that.$emit('searchReset') - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.procInstId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result[0] - console.log('this.tableRowRecord----->', this.tableRowRecord[0]) - } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) - } - } -} -</script> -<style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} - -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} - -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} - -@import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/dispatchFile/DispatchFileXq.vue b/src/views/flowable/workflow/dispatchFile/DispatchFileXq.vue deleted file mode 100644 index dfac703..0000000 --- a/src/views/flowable/workflow/dispatchFile/DispatchFileXq.vue +++ /dev/null @@ -1,364 +0,0 @@ -<!-- - Description: 宸ヤ綔娴�-NC瀹$璇︽儏椤甸潰 List - Author: 浣滆�� liuyh - Date: 2025-02-27 ---> -<template> - <a-modal - :title="title" - :width="width" - :visible="visible" - :footer="null" - @cancel="handCancel" - > - <a-card :bordered="false"> - <div> - <b>{{ selectShenpiData.title }}</b> - <br> - <br> - <a-tag color="blue"> - 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} - </a-tag> - <a-tag color="blue"> - 褰撳墠浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} - </a-tag> - <br> - <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> - </div> - <hr class="shallow-hr"> - </div> - <div> - <b>瀹$璇︽儏</b> - <br> - <a-form :form='form'> - <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> - <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='publishVersion'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.publishVersion'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚庣紑' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docSuffix'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docSuffix'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='绯荤粺鎸囧畾鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鍑哄簱鐘舵��' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='pullStatus_dictText'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.pullStatus_dictText'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鍑哄簱浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='pullUser_dictText'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.pullUser_dictText'></a-input> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card> - <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> - <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> - <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> - <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> - <div class="left_qiu"><span>{{item.taskName}}</span></div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - </a-tabs> - </a-spin> - </a-form> - </div> - </a-card> - - - </a-modal> -</template> - -<script> - -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -export default { - name: 'FlowShenPi', - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - version: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗g増鏈�!'}, - ] - }, - applyUser: { - rules: [ - { required: true, message: '璇烽�夋嫨鐢宠浜�!'}, - ] - }, - approveContent: { - rules: [ - { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!'}, - ] - }, - docName: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗e悕绉�!'}, - ] - }, - status: { - rules: [ - { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, - ] - }, - }, - approveData: {}, - flowData: {}, - title: '璇︽儏椤甸潰', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/dncFlow/dispatchFile/selectVoById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/activit/assign/file/approve", - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [] - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') - } - }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() - }, - submitForm () { - const that = this; - if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ - this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') - return false; - } - if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒') - return false; - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let flowTaskVo = {} - flowTaskVo.status=that.assignFileStream.status; - flowTaskVo.approveContent =that.assignFileStream.approveContent; - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.targetKey = this.selectShenpiData.taskDefKey - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.assignee = this.selectShenpiData.assignee - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - }) - } - - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.procInstId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result[0] - console.log('this.tableRowRecord----->', this.tableRowRecord[0]) - } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) - } - } -} -</script> -<style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} - -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} - -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} - -@import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue b/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue index 5303ee7..e853f82 100644 --- a/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue +++ b/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue @@ -8,16 +8,17 @@ switchFullscreen @ok="handleOk" @cancel="handleCancel" + centered cancelText="鍏抽棴"> - <a-spin :spinning="confirmLoading"> + <a-spin :spinning="spinning"> <a-form-model ref="form" :model="model" :rules="validatorRules"> <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 淇濆吇鍩虹淇℃伅 </a-divider> <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙风郴缁熻嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled /> + <a-input placeholder="宸ュ崟鍙风郴缁熻嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled/> </a-form-model-item> </a-col> <a-col :span="8"> @@ -30,7 +31,7 @@ </a-col> <a-col :span="8"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.standardName" disabled /> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.standardName" disabled/> </a-form-model-item> </a-col> </a-row> @@ -39,24 +40,24 @@ <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="淇濆吇鏃ユ湡"> <a-date-picker placeholder="璇烽�夋嫨璁″垝淇濆吇鏃ユ湡" v-model="model.maintenanceDate" format="YYYY-MM-DD" disabled - style="width: 100%" /> + style="width: 100%"/> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="淇濆吇浜�"> <j-search-select-tag v-model="model.operator" placeholder="璇烽�夋嫨淇濆吇浜�" disabled - :dictOptions="maintenanceOperatorOptions" /> + :dictOptions="maintenanceOperatorOptions"/> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.maintenancePeriod" disabled /> + <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.maintenancePeriod" disabled/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> - <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" disabled /> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" disabled/> </a-form-model-item> </a-row> <a-row :gutter="24"> @@ -65,13 +66,13 @@ :isMultiple="true" file-type="image" :disabled="confirmDisable" - v-model="model.imageFilesResult" /> + v-model="model.imageFilesResult"/> </a-form-model-item> </a-row> <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 淇濆吇椤逛俊鎭� </a-divider> <a-row :gutter="24"> - <a-tabs> + <a-tabs v-model="activeTabKey"> <a-tab-pane key="1" tab="淇濆吇椤规槑缁�"> <j-vxe-table ref="editableDetailTable" @@ -92,39 +93,44 @@ placeholder="璇烽�夋嫨淇濆吇缁撴灉" :disabled="disableSubmit || confirmDisable" @change="handleInspectionResultSelectChange($event,props.row)" - style="width: 100%" /> + style="width: 100%"/> </template> <template v-slot:exceptionDescription="props"> <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" - :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" /> + :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> </template> <template v-slot:reportFlag="props"> <j-dict-select-tag v-model="props.row.reportFlag" :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" dictCode="yn" - style="width: 100%" /> + style="width: 100%"/> </template> </j-vxe-table> </a-tab-pane> - <a-tab-pane v-if="!disableSubmit" key='2' tab='娴佺▼鑺傜偣'> - <a-card :bordered="false"> - <a-timeline> - <a-timeline-item v-for="(item,index) in taskData" :key="index"> - <div> - <h3 style="font-weight: bold;">{{item.taskName}}</h3> - <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> - <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> - <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> - <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - <a-button v-if="!disableSubmit || selectedRowKeys.length > 0" slot="tabBarExtraContent" type="primary" - @click="handleSelectAllInspectionResult">淇濆吇姝e父 + <template v-if="selectShenpiData.procInstId"> + <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> + <a-card :bordered="false"> + <a-timeline> + <a-timeline-item v-for="(item,index) in taskData" :key="index"> + <div> + <h3 style="font-weight: bold;">{{item.taskName}}</h3> + <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> + <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> + <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> + <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> + </div> + </a-timeline-item> + </a-timeline> + </a-card> + </a-tab-pane> + <a-tab-pane key='3' tab='娴佺▼鍥�'> + <img :src="imageSrc" alt="Fetched Image"/>--> + </a-tab-pane> + </template> + <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" + type="primary" @click="handleSelectAllInspectionResult">淇濆吇姝e父 </a-button> </a-tabs> </a-row> @@ -134,12 +140,14 @@ <a-row :gutter="24"> <a-col :span="12"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmDealType" label="纭绫诲瀷"> - <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" :disabled="disableSubmit || initialAcceptanceDisable" /> + <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected' + placeholder="璇烽�夋嫨澶勭悊绫诲瀷" :disabled="disableSubmit || initialAcceptanceDisable"/> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmComment" label="纭鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.confirmComment" :disabled="disableSubmit || initialAcceptanceDisable" /> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.confirmComment" + :disabled="disableSubmit || initialAcceptanceDisable"/> </a-form-model-item> </a-col> </a-row> @@ -149,16 +157,19 @@ </a-divider> <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceComment" label="鍒濋獙鏀舵剰瑙�"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.initialAcceptanceComment" :disabled="disableSubmit || finalAcceptanceDisable" /> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceComment" + label="鍒濋獙鏀舵剰瑙�"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.initialAcceptanceComment" + :disabled="disableSubmit || finalAcceptanceDisable"/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult" label="鍒濋獙鏀堕檮浠�"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult" + label="鍒濋獙鏀堕檮浠�"> <lx-upload :returnUrl="false" :isMultiple="true" :disabled="disableSubmit || finalAcceptanceDisable" - v-model="model.initialAcceptanceFilesResult" /> + v-model="model.initialAcceptanceFilesResult"/> </a-form-model-item> </a-col> </a-row> @@ -168,16 +179,19 @@ </a-divider> <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceComment" label="缁堥獙鏀舵剰瑙�"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.finalAcceptanceComment" :disabled="disableSubmit || completionDisable" /> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceComment" + label="缁堥獙鏀舵剰瑙�"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.finalAcceptanceComment" + :disabled="disableSubmit || completionDisable"/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult" label="缁堥獙鏀堕檮浠�"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult" + label="缁堥獙鏀堕檮浠�"> <lx-upload :returnUrl="false" :isMultiple="true" :disabled="disableSubmit || completionDisable" - v-model="model.finalAcceptanceFilesResult" /> + v-model="model.finalAcceptanceFilesResult"/> </a-form-model-item> </a-col> </a-row> @@ -188,339 +202,386 @@ </template> <script> -import { getAction, httpAction } from '@/api/manage' -import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' -import { JVXETypes } from '@comp/jeecg/JVxeTable' -import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' + import { downFile, getAction, httpAction } from '@/api/manage' + import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' -export default { - name: 'WeekMaintenanceApprovalModal', - mixins: [JVxeTableModelMixin], - components: { - MaintenanceEquipmentSelect - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - //鐘舵�佹帶鍒� - //淇濆吇涓� 涓嶅彲缂栬緫 - // confirmDisable: false, - // initialAcceptanceDisable: false, - // finalAcceptanceDisable: false, - editable: false, - model: {}, - maintenanceCategory: 'WEEK_MAINTENANCE', - maintenanceOperatorOptions: [], - labelCol: { - xs: { span: 24 }, - sm: { span: 6 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - }, - labelColLong: { - xs: { span: 24 }, - sm: { span: 2 } - }, - wrapperColLong: { - xs: { span: 24 }, - sm: { span: 21 } - }, - confirmLoading: false, - validatorRules: { - confirmDealType: [ - { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } - ], - confirmComment: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } - ], - initialAcceptanceComment: [ - { required: true, message: '璇疯緭鍏ュ垵楠屾敹鎰忚!' } - ], - finalAcceptanceComment: [ - { required: true, message: '璇疯緭鍏ョ粓楠屾敹鎰忚!' } - ], - }, - url: { - queryById: '/eam/weekMaintenanceOrder/queryById', - detail: '/eam/weekMaintenanceOrderDetail/queryList', - approval: '/eam/weekMaintenanceOrder/approval', - userSelect: '/eam/user_select/list', - queryHisTaskList: '/assign/flow/queryHisTaskList', - }, - disableSubmit: false, - taskData: [], - isDisplayBmp: false, - showBmpButtonLoading: false, - selectedRowKeys: [], - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: 'ID', - key: 'id', - type: JVXETypes.hidden - }, - { - title: 'orderId', - key: 'orderId', - type: JVXETypes.hidden - }, - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.normal, - width: '5%', - align: 'center' - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.normal, - width: '10%', - align: 'center' - }, - { - title: '瀛愪繚鍏婚」', - key: 'subItemName', - type: JVXETypes.normal, - width: '10%', - align: 'center' - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.normal, - width: '20%', - align: 'center' - }, - { - title: '淇濆吇缁撴灉', - key: 'maintenanceResult', - type: JVXETypes.slot, - width: '10%', - align: 'center', - slotName: 'maintenanceResult', - validateRules: [ - { required: true, message: '淇濆吇缁撴灉涓嶈兘涓虹┖锛�' } - ] - }, - { - title: '寮傚父鎻忚堪', - key: 'exceptionDescription', - type: JVXETypes.slot, - width: '20%', - align: 'center', - slotName: 'exceptionDescription', - }, - { - title: '鏄惁鎶ヤ慨', - key: 'reportFlag', - type: JVXETypes.slot, - width: '10%', - align: 'center', - slotName: 'reportFlag', + export default { + name: 'WeekMaintenanceApprovalModal', + mixins: [JVxeTableModelMixin], + components: { + MaintenanceEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鐘舵�佹帶鍒� + //淇濆吇涓� 涓嶅彲缂栬緫 + // confirmDisable: false, + // initialAcceptanceDisable: false, + // finalAcceptanceDisable: false, + editable: false, + model: {}, + maintenanceCategory: 'WEEK_MAINTENANCE', + maintenanceOperatorOptions: [], + labelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 21 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + activeTabKey: '1', + validatorRules: { + confirmDealType: [ + { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } + ], + confirmComment: [ + { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } + ], + initialAcceptanceComment: [ + { required: true, message: '璇疯緭鍏ュ垵楠屾敹鎰忚!' } + ], + finalAcceptanceComment: [ + { required: true, message: '璇疯緭鍏ョ粓楠屾敹鎰忚!' } + ] + }, + url: { + queryById: '/eam/weekMaintenanceOrder/queryById', + detail: '/eam/weekMaintenanceOrderDetail/queryList', + approval: '/eam/weekMaintenanceOrder/approval', + userSelect: '/eam/user_select/list', + queryHisTaskList: '/assign/flow/queryHisTaskList', + diagramView: '/assign/flow/diagramView' + }, + disableSubmit: false, + taskData: [], + isDisplayBmp: false, + showBmpButtonLoading: false, + selectedRowKeys: [], + detail: { + loading: false, + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'orderId', + key: 'orderId', + type: JVXETypes.hidden + }, + { + title: '搴忓彿', + key: 'itemCode', + type: JVXETypes.normal, + width: '5%', + align: 'center' + }, + { + title: '淇濆吇椤�', + key: 'itemName', + type: JVXETypes.normal, + width: '10%', + align: 'center' + }, + { + title: '瀛愪繚鍏婚」', + key: 'subItemName', + type: JVXETypes.normal, + width: '10%', + align: 'center' + }, + { + title: '淇濆吇瑕佹眰', + key: 'itemDemand', + type: JVXETypes.normal, + width: '20%', + align: 'center' + }, + { + title: '淇濆吇缁撴灉', + key: 'maintenanceResult', + type: JVXETypes.slot, + width: '10%', + align: 'center', + slotName: 'maintenanceResult', + validateRules: [ + { required: true, message: '淇濆吇缁撴灉涓嶈兘涓虹┖锛�' } + ] + }, + { + title: '寮傚父鎻忚堪', + key: 'exceptionDescription', + type: JVXETypes.slot, + width: '20%', + align: 'center', + slotName: 'exceptionDescription', + validateRules: [ + { handler: this.customValidator } + ] + }, + { + title: '鏄惁鎶ヤ慨', + key: 'reportFlag', + type: JVXETypes.slot, + width: '10%', + align: 'center', + slotName: 'reportFlag', + validateRules: [ + { handler: this.customValidator } + ] + } + ], + toolbarConfig: { + // prefix 鍓嶇紑锛泂uffix 鍚庣紑 + slot: ['prefix', 'suffix'], + // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 + btn: ['clearSelection'] } - ], - toolbarConfig: { - // prefix 鍓嶇紑锛泂uffix 鍚庣紑 - slot: ['prefix', 'suffix'], - // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 - btn: ['clearSelection'] } } - } - }, - created() { - }, - computed: { - confirmDisable: function(){ - return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus); }, - initialAcceptanceDisable: function() { - return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus); + created() { }, - finalAcceptanceDisable: function() { - return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus); + computed: { + confirmDisable: function() { + return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) + }, + initialAcceptanceDisable: function() { + return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) + }, + finalAcceptanceDisable: function() { + return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) + }, + completionDisable: function() { + return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus) + } }, - completionDisable: function() { - return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus); - } - }, - methods: { - async handleDetail(item) { - this.loading = true - this.visible = true - this.detail.dataSource = [] - let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId: item.procInstId }); - this.taskData = [...taskDataList.result]; - let res = await getAction(this.url.queryById, {id: item.dataId}) - this.model = Object.assign({}, res.result) - if(this.model.imageFiles) { - let obj = JSON.parse(this.model.imageFiles); - this.model.imageFilesResult = [...obj]; - } - if(this.model.initialAcceptanceFiles) { - let obj = JSON.parse(this.model.initialAcceptanceFiles); - this.model.initialAcceptanceFilesResult = [...obj]; - } - if(this.model.finalAcceptanceFiles) { - let obj = JSON.parse(this.model.finalAcceptanceFiles); - this.model.finalAcceptanceFilesResult = [...obj]; - } - this.model.dataId = item.dataId - this.model.taskId = item.id - this.model.userId = item.assignee - this.model.instanceId = item.procInstId - this.model.values = item.variables - await this.loadDetail(item.dataId) - this.loading = false - }, - recordDetail(record) { - this.loading = true - this.visible = true - this.detail.dataSource = [] - this.model = Object.assign({}, record) - if(this.model.imageFiles) { - let obj = JSON.parse(this.model.imageFiles); - this.model.imageFilesResult = [...obj]; - } - if(this.model.initialAcceptanceFiles) { - let obj = JSON.parse(this.model.initialAcceptanceFiles); - this.model.initialAcceptanceFilesResult = [...obj]; - } - if(this.model.finalAcceptanceFiles) { - let obj = JSON.parse(this.model.finalAcceptanceFiles); - this.model.finalAcceptanceFilesResult = [...obj]; - } - this.loadDetail(record.id) - this.loading = false - }, - close() { - this.$emit('close') - this.visible = false - this.$refs.form.clearValidate() - }, - async handleOk() { - const that = this - let errMap = await that.$refs.editableDetailTable.validateTable() - if (errMap) { - this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') - return - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - let tableData = that.$refs.editableDetailTable.getTableData(); + methods: { + async handleDetail(item) { + this.initParams() + this.model = {} + if (item.procInstId) { + const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item - let checkMsg = null; - tableData.some(row => { - if(!row.maintenanceResult) { - checkMsg = '淇濆吇缁撴灉涓嶈兘涓虹┖锛�'; - return true; - } - if(row.maintenanceResult === '2' && (!row.exceptionDescription || !row.reportFlag)) { - checkMsg = '淇濆吇缁撴灉涓哄紓甯革紝闇�瑕佸~鍐欏紓甯稿師鍥犲強鏄惁鎶ヤ慨锛�'; - return true; - } - }) - if(checkMsg) { - that.$message.warning(checkMsg); - return; - } + let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId }) + this.taskData = [...taskDataList.result] - that.model.tableDetailList = [...tableData] - - that.confirmLoading = true - let httpurl = this.url.approval - let method = 'put' - - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.$emit('searchReset') - that.close() - } else { - that.$message.warning(res.message) - } - }).finally(() => { - that.confirmLoading = false - }) - } else { - return false + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + const urlObject = window.URL.createObjectURL(new Blob([res])) + this.imageSrc = urlObject + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: res.message + }) + }) } - }) - }, - handleCancel() { - this.close() - }, - autocompleteForm(selectObj) { - this.$set(this.model, 'standardName', selectObj.standardName) - this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) - this.$set(this.model, 'standardId', selectObj.id) - this.$set(this.model, 'equipmentId', selectObj.equipmentId) - // console.log('model', this.model) - if (!this.model.id) { - this.loadStandardDetail(selectObj.id) - } - this.loadMaintenanceOperatorList(this.model.equipmentId) - }, - //鏍囧噯閫夋嫨鍙樺寲 - loadDetail(orderId) { - if (orderId) { - getAction(this.url.detail, { orderId: orderId }).then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] + let res = await getAction(this.url.queryById, { id: item.dataId }) + this.model = Object.assign({}, res.result) + if (this.model.imageFiles) { + let obj = JSON.parse(this.model.imageFiles) + this.model.imageFilesResult = [...obj] + } + if (this.model.initialAcceptanceFiles) { + let obj = JSON.parse(this.model.initialAcceptanceFiles) + this.model.initialAcceptanceFilesResult = [...obj] + } + if (this.model.finalAcceptanceFiles) { + let obj = JSON.parse(this.model.finalAcceptanceFiles) + this.model.finalAcceptanceFilesResult = [...obj] + } + this.model.dataId = item.dataId + this.model.taskId = item.id + this.model.userId = item.assignee + this.model.instanceId = item.procInstId + this.model.values = item.variables + await this.loadDetail(item.dataId) + }, + + recordDetail(record) { + this.initParams() + this.model = Object.assign({}, record) + if (this.model.imageFiles) { + let obj = JSON.parse(this.model.imageFiles) + this.model.imageFilesResult = [...obj] + } + if (this.model.initialAcceptanceFiles) { + let obj = JSON.parse(this.model.initialAcceptanceFiles) + this.model.initialAcceptanceFilesResult = [...obj] + } + if (this.model.finalAcceptanceFiles) { + let obj = JSON.parse(this.model.finalAcceptanceFiles) + this.model.finalAcceptanceFilesResult = [...obj] + } + this.loadDetail(record.id) + }, + + initParams() { + this.detail.dataSource = [] + this.visible = true + this.activeTabKey = '1' + this.spinning = true + }, + + async handleOk() { + const that = this + let errMap = await that.$refs.editableDetailTable.validateTable() + if (errMap) { + this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') + return + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + let tableData = that.$refs.editableDetailTable.getTableData() + + that.model.tableDetailList = [...tableData] + + that.confirmLoading = spinnning = true + let httpurl = this.url.approval + let method = 'put' + + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('searchReset') + that.close() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = spinning = false + }) + } else { + return false } }) - } - }, - loadMaintenanceOperatorList(equipmentId) { - this.maintenanceOperatorOptions = [] - let params = { positionCode: 'PCR0001' } - if (equipmentId) { - params.equipmentId = equipmentId - } - getAction(this.url.userSelect, params).then(res => { - if (res.success) { - this.maintenanceOperatorOptions = res.result.map(item => ({ - key: item.id, - value: item.username, - text: item.realname - })) + }, + + autocompleteForm(selectObj) { + this.$set(this.model, 'standardName', selectObj.standardName) + this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) + this.$set(this.model, 'standardId', selectObj.id) + this.$set(this.model, 'equipmentId', selectObj.equipmentId) + // console.log('model', this.model) + if (!this.model.id) { + this.loadStandardDetail(selectObj.id) } - }) - }, - handleInspectionResultSelectChange(value, record) { - if (record.exceptionDescription) delete record.exceptionDescription - if (record.reportFlag) delete record.reportFlag - }, - // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉 - handleSelectAllInspectionResult() { - this.selectedRowKeys.forEach(key => { - const dataItem = this.detail.dataSource.find(item => item.id === key) - if (dataItem && dataItem.maintenanceResult !== '1') { - console.log('dataItem', dataItem) - delete dataItem.exceptionDescription - delete dataItem.reportFlag - dataItem.maintenanceResult = '1' + this.loadMaintenanceOperatorList(this.model.equipmentId) + }, + + //鏍囧噯閫夋嫨鍙樺寲 + loadDetail(orderId) { + if (orderId) { + getAction(this.url.detail, { orderId: orderId }) + .then(res => { + if (res.success) { + this.detail.dataSource = [...res.result] + } + }) + .finally(() => { + this.spinning = false + }) } - }) - this.$refs.editableDetailTable.clearCheckboxRow() - this.selectedRowKeys = [] - }, - /** - * 琛ㄦ牸澶氶�夋鍙戠敓鏀瑰彉鏃惰Е鍙� - * @param {selectedRowIds} 琛ㄦ牸涓凡閫夋嫨鐨処D鍒楄〃 - */ - handleTableSelectRowChange({ selectedRowIds }) { - this.selectedRowKeys = selectedRowIds - }, + }, + + loadMaintenanceOperatorList(equipmentId) { + this.maintenanceOperatorOptions = [] + let params = { positionCode: 'PCR0001' } + if (equipmentId) { + params.equipmentId = equipmentId + } + getAction(this.url.userSelect, params).then(res => { + if (res.success) { + this.maintenanceOperatorOptions = res.result.map(item => ({ + key: item.id, + value: item.username, + text: item.realname + })) + } + }) + }, + + handleInspectionResultSelectChange(value, record) { + if (record.exceptionDescription) delete record.exceptionDescription + if (record.reportFlag) delete record.reportFlag + }, + + // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉 + handleSelectAllInspectionResult() { + this.selectedRowKeys.forEach(key => { + const dataItem = this.detail.dataSource.find(item => item.id === key) + if (dataItem && dataItem.maintenanceResult !== '1') { + console.log('dataItem', dataItem) + delete dataItem.exceptionDescription + delete dataItem.reportFlag + dataItem.maintenanceResult = '1' + } + }) + this.$refs.editableDetailTable.clearCheckboxRow() + this.selectedRowKeys = [] + }, + + /** + * 琛ㄦ牸澶氶�夋鍙戠敓鏀瑰彉鏃惰Е鍙� + * @param {selectedRowIds} 琛ㄦ牸涓凡閫夋嫨鐨処D鍒楄〃 + */ + handleTableSelectRowChange({ selectedRowIds }) { + this.selectedRowKeys = selectedRowIds + }, + + customValidator({ cellValue, row }, callback) { + if (row.maintenanceResult === '2') { + if (!cellValue) { + callback(false, '${title}涓嶈兘涓虹┖锛�') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀� + } else { + callback(true) // true = 閫氳繃楠岃瘉 + } + } else { + callback(true) + } + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } } -} </script> <style lang="less" scoped> -- Gitblit v1.9.3