From f5e8a1a00baf276c281d4a6335b2d39a8beba91a Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期一, 21 八月 2023 10:27:46 +0800 Subject: [PATCH] 点检 保养 调整 --- src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue | 30 ++++++- src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue | 34 +++++-- src/views/base/WarehouseListNew.vue | 4 src/views/eam/modules/specialtyInspectionPlan/SpecialtyInspectionPlanModal.vue | 2 src/views/eam/modules/inspectionProject/InspectionProjectModel.vue | 26 +++--- src/views/eam/modules/inspectionProject/InspectionProjectRight.vue | 10 +- src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue | 2 src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue | 1 src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue | 1 src/views/eam/modules/equipment/EquipmentModel.vue | 61 +++++++++++---- src/views/eam/modules/specialtyMaintenancePlan/SpecialtyMaintenancePlanModal.vue | 41 ++++++++-- 11 files changed, 150 insertions(+), 62 deletions(-) diff --git a/src/views/base/WarehouseListNew.vue b/src/views/base/WarehouseListNew.vue index 2fef82d..3c2478b 100644 --- a/src/views/base/WarehouseListNew.vue +++ b/src/views/base/WarehouseListNew.vue @@ -150,7 +150,7 @@ </div> </a-tab-pane> - <a-tab-pane + <!-- <a-tab-pane key="2" forceRender > @@ -190,7 +190,7 @@ > <service-object-list ref="EquipmentFileList"></service-object-list> </div> - </a-tab-pane> + </a-tab-pane> --> </a-tabs> <warehouse-modal ref="modalForm" diff --git a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue index c70df55..e63f4fb 100644 --- a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue +++ b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue @@ -158,7 +158,7 @@ :value="text" v-if="col.dataIndex == 'inspectionProjectResult' && record.analysisMethod == '1'" :min="0" - :max="200" + :max="20000" @change="(e)=>handleChange(e, record.key, col, index,record)" style="width: 100%" :disabled="record.disabled" diff --git a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue index 245062d..ae2e910 100644 --- a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue +++ b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue @@ -180,6 +180,7 @@ hidden :gutter="24" > + <a-col :span="12"> <a-form-item label="鏈夋晥鏃堕暱" diff --git a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue index 355f36c..4c933fc 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue @@ -35,21 +35,21 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <!-- <j-dict-select-tag - allow-clear - :disabled="disableSubmit" - :placeholder="disableSubmit?'':'璇烽�夋嫨瀵硅薄閮ㄩ棬'" - :triggerChange="true" - dictCode="mom_eam_equipment,use_id,id,status!='0' and del_flag!='1' and use_id!='null'" - v-decorator="['useId', validatorRules.useId]" - /> --> - <a-input-search + <!-- <a-input-search :disabled="disableSubmit" placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬" enter-button @search="onDepartList()" :read-only="true" v-decorator="['useDepartName', validatorRules.useDepartName]" + /> --> + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬" + tree-default-expand-all + v-decorator="['useId', validatorRules.useId ]" /> </a-form-item> </a-col> @@ -104,7 +104,7 @@ /> </a-form-item> </a-col> - <a-col :span="12"> + <!-- <a-col :span="12"> <a-form-item label="瀵硅薄閮ㄩ棬Id" :labelCol="labelCol" @@ -117,7 +117,7 @@ v-decorator="['useId', validatorRules.useId ]" /> </a-form-item> - </a-col> + </a-col> --> </a-row> <a-row :gutter="24"> <a-col :span="12"> @@ -372,6 +372,7 @@ isRevise: false, model: {}, inspectionCycles: {}, + treeData: [], labelCol: { xs: { span: 24 }, sm: { span: 6 }, @@ -416,6 +417,7 @@ getInspectionCycle: "/eam/inspectionStandardDetail/getInspectionCycle", revise: '/eam/inspectionStandard/revise', getReviseVersion: "/eam/inspectionStandard/getReviseVersion", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', }, dataSource: [], @@ -461,6 +463,7 @@ edit(record) { let that = this; that.getInspectionCycle() + that.initOptions(); that.dataSource = []; that.form.resetFields(); that.model = Object.assign({}, record); @@ -491,6 +494,15 @@ } }, + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + this.$message.warning(res.message) + } + }) + }, onEquipmentList() { let data = this.form.getFieldsValue(['useId']); this.$refs.EquipmentList.list(data.useId); diff --git a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue index 7350f8d..5923fdd 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue @@ -33,13 +33,21 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-input-search + <!-- <a-input-search :disabled="disableSubmit" placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬" enter-button @search="onDepartList()" :read-only="true" v-decorator="['useDepartName', validatorRules.useDepartName]" + /> --> + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨閮ㄩ棬" + tree-default-expand-all + v-decorator="['departId', validatorRules.useId ]" /> </a-form-item> </a-col> @@ -88,7 +96,7 @@ allow-clear :disabled="true" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ矗浠荤彮缁�'" - v-decorator="['teamName', validatorRules.teamName ]" + v-decorator="['teamName', {} ]" /> </a-form-item> </a-col> @@ -111,7 +119,7 @@ /> </a-form-item> </a-col> - <a-col :span="12"> + <!-- <a-col :span="12"> <a-form-item label="瀵硅薄閮ㄩ棬Id" :labelCol="labelCol" @@ -124,7 +132,7 @@ v-decorator="['departId', validatorRules.useId ]" /> </a-form-item> - </a-col> + </a-col> --> <a-col :span="12"> <a-form-item label="鐝粍Id" @@ -508,6 +516,7 @@ model: {}, upload: {}, maintenanceCycles: {}, + treeData: [], labelCol: { xs: { span: 24 }, sm: { span: 6 }, @@ -564,6 +573,7 @@ realDelete: "/eam/maintenanceStandardDetail/realDelete", revise: '/eam/maintenanceStandard/revise', getReviseVersion: "/eam/maintenanceStandard/getReviseVersion", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', }, dataSource: [], @@ -635,6 +645,7 @@ edit(record) { let that = this; + this.initOptions(); this.getMaintenanceCycle() this.dataSource = []; this.form.resetFields(); @@ -670,6 +681,17 @@ } }, + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + this.$message.warning(res.message) + } + }) + }, + + onEquipmentList() { let data = this.form.getFieldsValue(['departId']); if (data.departId == null || data.departId == "") { diff --git a/src/views/eam/modules/equipment/EquipmentModel.vue b/src/views/eam/modules/equipment/EquipmentModel.vue index 6cb5f72..b55f514 100644 --- a/src/views/eam/modules/equipment/EquipmentModel.vue +++ b/src/views/eam/modules/equipment/EquipmentModel.vue @@ -215,14 +215,22 @@ placeholder="璇疯緭鍏ユ墍鏈夌粍缁�" v-decorator="['affiliationId', validatorRules.affiliationId]" /> --> - <a-select + <!-- <a-select :placeholder="disableSubmit?'':'璇烽�夋嫨鎵�鏈夌粍缁�'" :options="this.departs" style="width: 100%" :disabled="disableSubmit" v-decorator="['affiliationId', validatorRules.affiliationId]" - /> + /> --> <!-- @change="(e)=>handle1Change(e)" --> + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨绠$悊缁勭粐" + tree-default-expand-all + v-decorator="['affiliationId', validatorRules.affiliationId]" + /> </a-form-item> </a-col> <a-col :span="24 / 3"> @@ -249,14 +257,22 @@ placeholder="璇疯緭鍏ョ鐞嗙粍缁�" v-decorator="['manageId', validatorRules.manageId]" /> --> - <a-select + <!-- <a-select :placeholder="disableSubmit?'':'璇烽�夋嫨绠$悊缁勭粐'" :options="this.departs" style="width: 100%" :disabled="disableSubmit" v-decorator="['manageId', validatorRules.manageId]" - /> + /> --> <!-- @change="(e)=>handle3Change(e)" --> + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨绠$悊缁勭粐" + tree-default-expand-all + v-decorator="['manageId', validatorRules.manageId]" + /> </a-form-item> </a-col> <a-col :span="24 / 3"> @@ -299,23 +315,23 @@ :wrapperCol="wrapperCol" label="浣跨敤閮ㄩ棬" > - <!-- <j-dict-select-tag - allow-clear - :disabled="disableSubmit" - :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤缁勭粐'" - :triggerChange="true" - dictCode="sys_depart,depart_name,id,version = '7' and del_flag!='1'" + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨閮ㄩ棬" + tree-default-expand-all v-decorator="['useId', validatorRules.useId]" - /> --> - <a-select + /> + <!-- <a-select :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤閮ㄩ棬'" :options="this.departs" style="width: 100%" :disabled="disableSubmit" v-decorator="['useId', validatorRules.useId]" - /> - <!-- @change="(e)=>handle2Change(e)" --> + /> --> </a-form-item> + </a-col> <a-col :span="24 / 3"> @@ -330,7 +346,7 @@ :placeholder="disableSubmit?'':'璇烽�夋嫨璐d换鐝粍'" :triggerChange="true" dictCode="mom_base_team,name,id,status='1' and del_flag='0'" - v-decorator="['teamId', validatorRules.teamId]" + v-decorator="['teamId', {}]" /> </a-form-item> </a-col> @@ -553,7 +569,6 @@ 鍏抽棴 </a-button> <a-button - hidden v-if="!this.model.id" :disabled="disableSubmit || confirmLoading" :loading="confirmLoading" @@ -610,6 +625,7 @@ precisionParametersTemplateId: '', equipmentPhoto: '', departs: [], + treeData: [], model: {}, headers: {}, labelCol: { @@ -662,6 +678,7 @@ add: "/eam/equipment/add", edit: "/eam/equipment/edit", getSysDeparts: "/eam/equipment/getSysDeparts", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', }, //鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴�� alterFlag: "", @@ -669,6 +686,7 @@ }, created() { this.getSysDeparts() + }, methods: { moment, @@ -683,6 +701,7 @@ this.visible = true; this.disableSubmit = false; this.fileList = []; + this.initOptions(); this.precisionParametersTemplateId = record.precisionParametersTemplateId this.processParametersTemplateId = record.processParametersTemplateId this.$nextTick(() => { @@ -937,6 +956,16 @@ } }, + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + this.$message.warning(res.message) + } + }) + }, + onSearchProcessParametersTemplate() { this.$refs.ProcessParametersTemplateList.list(); diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue index 8fc53a6..dbb8a88 100644 --- a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue +++ b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue @@ -81,6 +81,7 @@ :toolbar="true" :toolbarConfig="toolbarConfig" :linkage-config="linkageConfig" + :addDefaultRowNum="0" > <template slot="toolbarPrefix"> <a-button diff --git a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue index 1f3d2c8..b397106 100644 --- a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue +++ b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue @@ -114,7 +114,7 @@ </a-form-item> </a-col> --> <a-col - v-if="analysisMethod == '2'" + v-if="testValueType == '2'" :span="12" > <a-form-item @@ -131,7 +131,7 @@ </a-form-item> </a-col> <a-col - v-if="analysisMethod == '1'" + v-if="testValueType == '1'" :span="12" > <a-form-item @@ -150,7 +150,7 @@ </a-col> </a-row> <a-row - v-if="analysisMethod == '1'" + v-if="testValueType == '1'" :gutter="24" > <a-col :span="12"> @@ -277,7 +277,7 @@ codeDisable: true, disableSubmit: false, inspectionProjectCategoryId: '', - analysisMethod: null, + testValueType: null, model: {}, labelCol: { xs: { span: 24 }, @@ -304,11 +304,11 @@ { validator: this.validateName }, ] }, - analysisMethod: { - rules: [ - { required: true, message: '璇烽�夋嫨鍒嗘瀽鏂规硶!' }, - ] - }, + // analysisMethod: { + // rules: [ + // { required: true, message: '璇烽�夋嫨鍒嗘瀽鏂规硶!' }, + // ] + // }, surfaceValue: { rules: [ { required: true, message: '璇疯緭鍏ュ悕涔夊��!' }, @@ -353,12 +353,12 @@ this.model = Object.assign({}, record); this.visible = true; this.disableSubmit = false; - this.analysisMethod = record.analysisMethod + this.testValueType = record.testValueType this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName', - 'num', 'name', 'unitId', 'testValueType', 'analysisMethod', 'inspectionMethod', 'inspectionTool', 'remark')) + 'num', 'name', 'unitId', 'testValueType', 'inspectionMethod', 'inspectionTool', 'remark')) }); - if (record.analysisMethod == '1') { + if (record.testValueType == '1') { this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'surfaceValue', 'upValue', 'downValue')) }); @@ -440,7 +440,7 @@ }, handleChange(val) { - this.analysisMethod = val + this.testValueType = val }, validateDownValue(rule, value, callback) { diff --git a/src/views/eam/modules/inspectionProject/InspectionProjectRight.vue b/src/views/eam/modules/inspectionProject/InspectionProjectRight.vue index 88e2641..93c9582 100644 --- a/src/views/eam/modules/inspectionProject/InspectionProjectRight.vue +++ b/src/views/eam/modules/inspectionProject/InspectionProjectRight.vue @@ -265,11 +265,11 @@ align: 'center', dataIndex: 'unitId_dictText', }, - { - title: '鍒嗘瀽鏂规硶', - align: 'center', - dataIndex: 'analysisMethod_dictText', - }, + // { + // title: '鍒嗘瀽鏂规硶', + // align: 'center', + // dataIndex: 'analysisMethod_dictText', + // }, { title: '妫�楠屽�肩被鍨�', align: "center", diff --git a/src/views/eam/modules/specialtyInspectionPlan/SpecialtyInspectionPlanModal.vue b/src/views/eam/modules/specialtyInspectionPlan/SpecialtyInspectionPlanModal.vue index b811357..d1b4a6a 100644 --- a/src/views/eam/modules/specialtyInspectionPlan/SpecialtyInspectionPlanModal.vue +++ b/src/views/eam/modules/specialtyInspectionPlan/SpecialtyInspectionPlanModal.vue @@ -148,7 +148,7 @@ <a-input :disabled=true placeholder="璇疯緭鍏ュ浘鐗囧悕绉�" - v-decorator="['name', validatorRules.name ]" + v-decorator="['name', {} ]" /> </a-form-item> </a-col> diff --git a/src/views/eam/modules/specialtyMaintenancePlan/SpecialtyMaintenancePlanModal.vue b/src/views/eam/modules/specialtyMaintenancePlan/SpecialtyMaintenancePlanModal.vue index 2652e8f..24ac3de 100644 --- a/src/views/eam/modules/specialtyMaintenancePlan/SpecialtyMaintenancePlanModal.vue +++ b/src/views/eam/modules/specialtyMaintenancePlan/SpecialtyMaintenancePlanModal.vue @@ -33,11 +33,20 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-select + <!-- <a-select :placeholder="disableSubmit?'':'璇烽�夋嫨瀵硅薄閮ㄩ棬'" :options="this.departs" style="width: 100%" :disabled="disableSubmit" + v-decorator="['departId', validatorRules.departId]" + @change="(e)=>handle2Change(e)" + /> --> + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬" + tree-default-expand-all v-decorator="['departId', validatorRules.departId]" @change="(e)=>handle2Change(e)" /> @@ -67,7 +76,7 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <j-dict-select-tag + <j-dict-select-tag allow-clear :disabled="disableSubmit" :placeholder="disableSubmit?'':'璇烽�夋嫨璐d换鐝粍'" @@ -184,7 +193,7 @@ /> </a-form-item> </a-col> - + </a-row> </a-form> </a-spin> @@ -311,6 +320,7 @@ codeDisable: true, model: {}, maintenanceCycles: [], + treeData: [], departs: [], labelCol: { xs: { span: 24 }, @@ -339,7 +349,7 @@ { required: true, message: '璇烽�夋嫨瀵硅薄閮ㄩ棬!' }, ] }, - teamId: { + teamId: { rules: [ { required: true, message: '璇烽�夋嫨璐d换鐝粍!' }, ] @@ -377,6 +387,7 @@ listByBusIdAndBusType: "/system/sysUploadRela/listByBusIdAndBusType", getMaintenanceCycles: "/eam/maintenanceStandardDetail/getMaintenanceCycle", getSysDeparts: "/eam/equipment/getSysDeparts", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', }, dataSource: [], //鐢ㄤ簬灞曠ず鏂囦欢 @@ -396,9 +407,9 @@ maintenanceStandardId: data[i].id, num: data[i].num, equipmentId: data[i].equipmentId, - version:data[i].version, - versionStatus:data[i].versionStatus, - versionStatusName:data[i].versionStatusName, + version: data[i].version, + versionStatus: data[i].versionStatus, + versionStatusName: data[i].versionStatusName, equipmentNum: data[i].equipmentNum, equipmentName: data[i].equipmentName, equipmentModel: data[i].equipmentModel, @@ -409,7 +420,7 @@ created() { this.getMaintenanceCycles() - this.getSysDeparts() + // this.getSysDeparts() const token = Vue.ls.get(ACCESS_TOKEN); const tenantid = Vue.ls.get(TENANT_ID) this.headers = { @@ -486,12 +497,14 @@ let that = this; that.visible = true; that.isFileChange = false; + that.initOptions(); that.model = Object.assign({}, record); that.$nextTick(() => { - that.form.setFieldsValue(pick(that.model, 'num', 'departId','teamId','teamName' ,'assignMode','maintenanceCycleId', 'dutyDepartId', 'maintenanceTypeId', 'maintenanceMode', 'remark')) + that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'teamName', 'assignMode', 'maintenanceCycleId', 'dutyDepartId', 'maintenanceTypeId', 'maintenanceMode', 'remark')) }); that.fileList = []; that.form.resetFields(); + that.uploadId = '' if (record.specialtyMaintenancePlanDetailList != undefined) { const temp = [...record.specialtyMaintenancePlanDetailList]; @@ -526,6 +539,16 @@ this.visible = false; }, + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + this.$message.warning(res.message) + } + }) + }, + handleOk() { const that = this; // 瑙﹀彂琛ㄥ崟楠岃瘉 -- Gitblit v1.9.3