From 4ac53eac3402797316e2b7f97e8ddf608c866046 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期二, 24 十月 2023 19:12:00 +0800 Subject: [PATCH] 故障报修 --- src/views/eam/modules/malfunctionRepair/EquipmentList.vue | 30 ++++++++- src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue | 16 ++++- src/views/eam/MalfunctionRepair.vue | 49 +++++++++------ src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue | 47 +++++++++++---- 4 files changed, 102 insertions(+), 40 deletions(-) diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue index 52f383d..ea0a7f5 100644 --- a/src/views/eam/MalfunctionRepair.vue +++ b/src/views/eam/MalfunctionRepair.vue @@ -187,6 +187,9 @@ </a-menu> </a-dropdown> </span> + <span slot="faultDescription" slot-scope="text"> + <j-ellipsis :value="text" :length="10" /> + </span> </a-table> </div> @@ -230,6 +233,7 @@ import MalfunctionRepairModal from './modules/malfunctionRepair/MalfunctionRepaireModal' import FaultDescriptionList from './modules/malfunctionRepair/FaultDescriptionList' import ApprovelModal from './modules/malfunctionRepair/ApprovelModal' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: 'MalfunctionRepairList', @@ -237,7 +241,8 @@ components: { MalfunctionRepairModal, FaultDescriptionList, - ApprovelModal + ApprovelModal, + JEllipsis }, data() { return { @@ -291,15 +296,19 @@ align: "center", dataIndex: 'departName', }, - { - title: '绱ф�ョ▼搴�', - align: "center", - dataIndex: 'urgencyName', - }, + // { + // title: '绱ф�ョ▼搴�', + // align: "center", + // dataIndex: 'urgencyName', + // }, { title: '鏁呴殰鎻忚堪', align: "center", - dataIndex: 'faultDescription' + dataIndex: 'faultDescription', + scopedSlots: { + customRender: 'faultDescription' + } + }, // { // title: '鏁呴殰鎷嶇収', @@ -307,11 +316,11 @@ // dataIndex: 'photo', // scopedSlots: { customRender: 'imgSlot' } // }, - { - title: '鏁呴殰鍘熷洜', - align: "center", - dataIndex: 'faultReason' - }, + // { + // title: '鏁呴殰鍘熷洜', + // align: "center", + // dataIndex: 'faultReason' + // }, { title: '鏁呴殰鏃堕棿', align: "center", @@ -337,14 +346,14 @@ align: "center", dataIndex: 'remark' }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: "center", - fixed: "right", - width: 200, - scopedSlots: { customRender: 'action' } - } + // { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align: "center", + // fixed: "right", + // width: 200, + // scopedSlots: { customRender: 'action' } + // } ], url: { list: "/eam/equipmentReportRepair/getReportRepairList", diff --git a/src/views/eam/modules/malfunctionRepair/EquipmentList.vue b/src/views/eam/modules/malfunctionRepair/EquipmentList.vue index 04bc746..73a3350 100644 --- a/src/views/eam/modules/malfunctionRepair/EquipmentList.vue +++ b/src/views/eam/modules/malfunctionRepair/EquipmentList.vue @@ -174,6 +174,30 @@ handleCancel() { this.close(); }, + loadData(arg) { + if (!this.url.list) { + this.$message.error('璇疯缃畊rl.list灞炴��!') + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1 + } + this.onClearSelected() + this.queryParam.equipmentStatus = '1'; + var params = this.getQueryParams()//鏌ヨ鏉′欢 + this.loading = true + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records + this.ipagination.total = res.result.total + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false + }) + }, }, } @@ -227,8 +251,7 @@ height: 90% !important; overflow-y: hidden; } - -/deep/ .notshow { + .notshow { display: none; } @@ -247,8 +270,7 @@ .dataUnKnow { color: #1890ff; } - -/deep/ .frozenRowClass { + .frozenRowClass { color: #c9c9c9; } </style> \ No newline at end of file diff --git a/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue b/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue index 9cf49d5..c36671c 100644 --- a/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue +++ b/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue @@ -176,7 +176,8 @@ add: "/eam/equipmentReportRepair/add", edit: "/eam/equipmentReportRepair/edit", queryById: "/eam/equipmentReportRepair/queryById", - equipmentList: '/eam/equipment/list' + equipmentList: '/eam/equipment/list', + getNum:'/eam/sysIdentity/getNumNew' }, isMaintenance: [ { label: '鏄�', value: true }, @@ -272,13 +273,22 @@ add() { this.modelDefault.status = 1 this.modelDefault.isStop = false - this.edit(this.modelDefault); + let that = this; + let param = { + type: 'EquipmentReportRepair', + length: 4 + }; + getAction(this.url.getNum,param).then(res=>{ + if(res.success){ + that.modelDefault.num = res.result; + that.edit(that.modelDefault); + } + }) }, async edit(record) { await this.fetchList() this.model = Object.assign({}, record); if (this.model.id) { - this.selectStatus = Number(record.status) record.isStop == 'true' ? this.isStop = true : this.isStop = false this.equipmentId = String(record.equipmentId) diff --git a/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue b/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue index c22adfa..394348f 100644 --- a/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue +++ b/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue @@ -19,7 +19,7 @@ :wrapperCol="wrapperCol" > <a-input - :disabled="disableSubmit" + :disabled="true" placeholder="璇疯緭鍏ュ崟鎹彿" v-decorator="['num', validatorRules.num]" /> @@ -33,7 +33,7 @@ > <j-dict-select-tag allow-clear - :disabled="disableSubmit" + :disabled="true" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鍋滄満缁翠慨'" :triggerChange="true" dictCode="is_stop" @@ -67,7 +67,7 @@ :wrapperCol="wrapperCol" > <j-date - :disabled="disableSubmit" + :disabled="true" style="width: 100%" placeholder="璇烽�夋嫨鏁呴殰鏃堕棿" :showTime="true" @@ -175,7 +175,7 @@ </a-form-item> </a-col> </a-row> - <a-row :gutter="24"> + <!-- <a-row :gutter="24"> <a-col :span="24/2"> <a-form-item label="绱ф�ョ▼搴�" @@ -191,21 +191,21 @@ v-decorator="['urgency', validatorRules.urgency]" /> </a-form-item> - </a-col> - <a-col :span="24/2" v-show="false"> + </a-col> --> + <!-- <a-col :span="24/2" v-show="false"> <a-form-item label="鏁呴殰鍘熷洜" :labelCol="labelCol" :wrapperCol="wrapperCol" > <a-input - :disabled="disableSubmit" + :disabled="disableSubmit" enter-button v-decorator="['faultReason', validatorRules.faultReason]" /> </a-form-item> - </a-col> - </a-row> + </a-col> --> + <!-- </a-row> --> <a-row :gutter="24"> <a-col :span="24/2"> <a-form-item @@ -290,6 +290,8 @@ // import JImageUpload from '@/components/jeecg/JImage2Upload' import EquipmentList from './EquipmentList' import Vue from 'vue' +import dayjs from 'dayjs' + export default { name: "MalfunctionRepaireModal", @@ -297,7 +299,8 @@ JMultiSelectTag, Tooltip, // JImageUpload, - EquipmentList + EquipmentList, + dayjs }, data() { return { @@ -338,13 +341,19 @@ { required: true, message: '璇烽�夋嫨鏁呴殰鏃堕棿!' }, ] }, + faultDescription:{ + rules: [ + { required: true, message: '璇锋弿杩版晠闅�!' }, + { max: 1000, min:1,message: '鏈�澶氬彲鎻忚堪1000瀛�!' }, + ] + }, }, url: { add: "/eam/equipmentReportRepair/add", edit: "/eam/equipmentReportRepair/edit", getSysDeparts: "/eam/equipment/getSysDeparts", + getNum:'/eam/sysIdentity/getNumNew' }, - dataSource: [], } }, @@ -354,9 +363,21 @@ }, methods: { - add() { - this.edit({}) + let that = this; + let param = { + type: 'EquipmentReportRepair', + length: 4 + }; + let modelDefault = {}; + getAction(this.url.getNum,param).then(res=>{ + if(res.success){ + modelDefault.num = res.result; + modelDefault.isStop = '2' + modelDefault.faultTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); + that.edit(modelDefault); + } + }) }, edit(record) { let that = this; -- Gitblit v1.9.3