From a751e547d67c4f8e2c6fddf958c1559f792515bd Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 27 六月 2025 16:11:50 +0800 Subject: [PATCH] 添加工作流 --- src/views/eam/MalfunctionRepair.vue | 284 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 224 insertions(+), 60 deletions(-) diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue index 12934f5..881a9e2 100644 --- a/src/views/eam/MalfunctionRepair.vue +++ b/src/views/eam/MalfunctionRepair.vue @@ -1,21 +1,24 @@ <template> <a-card :bordered="false" - title="鏁呴殰鎶ヤ慨" + title="" > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery" - > <a-row :gutter="24" style="margin-bottom: 1%;"> + > <a-row + :gutter="24" + style="margin-bottom: 1%;" + > <a-col :md="24" :sm="6" > - <a-form-item label="缁熶竴缂栧彿缇�"> + <a-form-item label="缁熶竴缂栧彿缇�"> <a-textarea - placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鈥�,鈥濋殧寮�,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�" + placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鎹㈣闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�" v-model="queryParam.nums" :auto-size="{ minRows: 2, maxRows:2 }" ></a-textarea> @@ -85,12 +88,17 @@ :sm="6" > <a-form-item label="浣跨敤閮ㄩ棬"> - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -139,10 +147,10 @@ :md="6" :sm="6" > - <a-form-item label="鏄惁鍋滄満缁翠慨"> + <a-form-item label="鏄惁鍋滄満"> <j-dict-select-tag allow-clear - placeholder="璇烽�夋嫨鏄惁鍋滄満缁翠慨" + placeholder="璇烽�夋嫨鏄惁鍋滄満" :triggerChange="true" dictCode="is_stop" v-model="queryParam.isStop" @@ -174,33 +182,53 @@ ></a-input> </a-form-item> </a-col> + <a-col + :md="6" + :sm="6" + > + <a-form-item label="鏄惁鍏抽敭璁惧"> + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨鏄惁鍏抽敭璁惧" + :triggerChange="true" + dictCode="specific_equipment" + v-model="queryParam.specificEquipment" + /> + </a-form-item> + </a-col> </a-row> </a-form> </div> <div class="table-operator"> - <a-button - type="primary" - @click="searchQuery" - icon="search" - >鏌ヨ</a-button> - <a-button - type="primary" - @click="searchReset" - icon="reload" - style="margin-left: 8px" - >閲嶇疆</a-button> + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + type="primary" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> <a-button @click="handleAdd" type="primary" icon="plus" + v-has="'report:add&edit'" >鏂板</a-button> + <a-button + type="primary" + icon="download" + @click="handleExportXls('鏁呴殰鎶ヤ慨')" + >瀵煎嚭</a-button> </div> <div> <a-table ref="table" size="middle" - :scroll="{ x: 'calc(1900px + 50%)', y: 900 }" + :scroll="{ x: 'calc(1500px + 50%)', y: 900 }" bordered rowKey="id" :columns="columns" @@ -211,11 +239,55 @@ @change="handleTableChange" :customRow="clickThenSelect" > + <!-- 鐐瑰嚮鍒楄烦杞埌浜嬫晠鐧昏椤� --> + <template + slot="accidentRegistrationProgress" + slot-scope="text, record" + > + <a + v-if="text!==''&&text!==null" + @click="handleAccidentRegistration(record)" + > + {{text=='yes'? '宸茬‘璁�':'鏈‘璁�'}} + </a> + </template> + <!-- 鐐瑰嚮鍒楄烦杞埌璐ㄩ噺闅愭偅椤� --> + <template + slot="qualityHiddenDangerProgress" + slot-scope="text, record" + > + <a + v-if="text!==''&&text!==null" + @click="handleQualityHiddenDanger(record)" + > + {{text=='yes'? '宸茬‘璁�':'鏈‘璁�'}} + </a> + </template> + <span + slot="specificEquipment" + slot-scope="text" + > + <a-icon + type="check" + style="color: chartreuse;" + v-if="text==='0'" + /> + <a-icon + type="close" + v-else + style="color:red;" + /> + </span> <span slot="action" slot-scope="text, record" > - <a-popconfirm + <a + :disabled=" record.status !== '4'" + @click="handleAccept(record)" + v-has="'report:accept'" + >楠屾敹</a> + <!-- <a-popconfirm v-if="record.status == '1' || record.status == '4'" title="纭鎻愪氦鍚�?" @confirm="() =>handleCommit(record, 'commit')" @@ -271,10 +343,16 @@ </a-popconfirm> </a-menu-item> </a-menu> - </a-dropdown> + </a-dropdown> --> </span> - <span slot="faultDescription" slot-scope="text"> - <j-ellipsis :value="text" :length="10" /> + <span + slot="jell" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="10" + /> </span> </a-table> @@ -292,7 +370,10 @@ class="table-operator" style="margin-top: 0px" > - <FaultDescriptionList ref="FaultDescriptionList" @ok="modalFormOk"/> + <FaultDescriptionList + ref="FaultDescriptionList" + @ok="modalFormOk" + /> </div> </a-tab-pane> @@ -307,6 +388,10 @@ @ok='approvalModalFormOk' @cancel='approvalModalFormOk' ></approvel-modal> + <accept-model + ref="acceptModel" + @ok="modalFormOk" + ></accept-model> </a-card> </template> @@ -321,6 +406,7 @@ import ApprovelModal from './modules/malfunctionRepair/ApprovelModal' import JEllipsis from '@/components/jeecg/JEllipsis' import moment from 'moment' +import AcceptModel from './modules/malfunctionRepair/AcceptModel' export default { name: 'MalfunctionRepairList', @@ -329,12 +415,13 @@ MalfunctionRepairModal, FaultDescriptionList, ApprovelModal, - JEllipsis + JEllipsis, + AcceptModel, }, data() { return { - treeData:[], - faultTime:[], + treeData: [], + faultTime: [], description: '鏁呴殰鎶ヤ慨', queryParam: { delflag: 0 }, selectedRowKeys: [], @@ -351,20 +438,54 @@ } }, { - title: '鐘舵��', - align: "center", - dataIndex: 'statusName', - }, - { title: '鍗曟嵁鍙�', align: "center", - dataIndex: 'num' + dataIndex: 'num', + width: 150 }, { title: '缁熶竴缂栧彿', align: "center", dataIndex: 'equipmentNum' }, + { + title: '鐘舵��', + align: "center", + dataIndex: 'statusName', + }, + { + title: '鎶ヤ慨绫诲瀷', + align: "center", + dataIndex: 'type', + customRender: (text) => { + if (text == '1') { + return "琚姩鎶ヤ慨"; + } else if (text == '2') { + return "杞﹂棿鎶ヤ慨"; + } else if (text == '3') { + return "涓诲姩缁翠慨"; + } + }, + }, + { + title: '鏉ユ簮', + align: "center", + dataIndex: 'source', + customRender: (text) => { + if (text == '1') { + return "鎵嬪姩鍒涘缓"; + } else if (text == '2') { + return "鐐规鎶ヤ慨"; + } + }, + }, + { + title: '鍏抽敭璁惧', + align: "center", + dataIndex: 'specificEquipment', + scopedSlots: { customRender: 'specificEquipment' } + }, + { title: '璁惧鍚嶇О', align: "center", @@ -375,11 +496,11 @@ align: "center", dataIndex: 'equipmentModel', }, - { - title: '瑙勬牸', - align: "center", - dataIndex: 'equipmentSpecification', - }, + // { + // title: '瑙勬牸', + // align: "center", + // dataIndex: 'equipmentSpecification', + // }, { title: '浣跨敤閮ㄩ棬', align: "center", @@ -394,8 +515,8 @@ title: '鏁呴殰鎻忚堪', align: "center", dataIndex: 'faultDescription', - scopedSlots: { - customRender: 'faultDescription' + scopedSlots: { + customRender: 'faultDescription' } }, @@ -413,10 +534,11 @@ { title: '鏁呴殰鏃堕棿', align: "center", - dataIndex: 'faultTime' + dataIndex: 'faultTime', + width: 200 }, { - title: '鏄惁鍋滄満寰呬慨', + title: '鏄惁鍋滄満', align: "center", dataIndex: 'isStopName', }, @@ -430,24 +552,42 @@ align: "center", dataIndex: 'createBy' }, - // { - // title: '鍒涘缓鏃堕棿', - // align: "center", - // dataIndex: 'createTime', - // }, + { + title: '楠屾敹鎰忚', + align: "center", + dataIndex: 'errUda5', + scopedSlots: { + customRender: 'jell' + } + }, { title: '澶囨敞', align: "center", dataIndex: 'remark' }, - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align: "center", - // fixed: "right", - // width: 200, - // scopedSlots: { customRender: 'action' } - // } + //璐ㄩ噺闅愭偅纭杩涘害 + { + title: '璐ㄩ噺闅愭偅', + align: "center", + dataIndex: 'isConfirm1', + scopedSlots: { customRender: 'qualityHiddenDangerProgress' } + }, + //浜嬫晠鐧昏纭杩涘害 + { + title: '浜嬫晠鐧昏', + align: "center", + dataIndex: 'isConfirm2', + scopedSlots: { customRender: 'accidentRegistrationProgress' } + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: "center", + fixed: "right", + width: 100, + scopedSlots: { customRender: 'action' } + }, + ], url: { list: "/eam/equipmentReportRepair/getReportRepairList", @@ -461,8 +601,8 @@ /* 鍒嗛〉鍙傛暟 */ ipagination: { current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '50'], + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], showTotal: (total, range) => { return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" }, @@ -473,7 +613,7 @@ } }, created() { - this.initOptions(); + this.initOptions(); }, computed: { importExcelUrl: function () { @@ -629,10 +769,34 @@ } }) }, - timeChange(){ + timeChange() { this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss") this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss") - } + }, + handleAccept(record) { + this.$refs.acceptModel.title = "楠屾敹" + this.$refs.acceptModel.edit(record) + }, + //鐐瑰嚮璺宠浆鍒颁簨鏁呯櫥璁伴〉 + handleAccidentRegistration(record) { + this.$router.push({ + path: '/eam/FaultInfoList', + query: { + id: record.faultInfoId, + num: record.num + } + }) + }, + //鐐瑰嚮璺宠浆鍒拌川閲忛殣鎮i〉 + handleQualityHiddenDanger(record) { + this.$router.push({ + path: '/eam/QuanlityConfirmList', + query: { + id: record.quanlityId, + num: record.num + } + }) + }, } } </script> -- Gitblit v1.9.3