From 59eb5746394c73b4eb7396fe695d0cdb1f0c071e Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期三, 25 十月 2023 17:04:27 +0800 Subject: [PATCH] 已经处理的问题 --- src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue | 136 ++++++++++++++++++++++++++++++++------------- 1 files changed, 97 insertions(+), 39 deletions(-) diff --git a/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue b/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue index cd9a830..bb3e7d0 100644 --- a/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue +++ b/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue @@ -1,7 +1,7 @@ <template> <a-modal :title="title" - :width="1250" + :width="1600" :visible="visible" :confirmLoading="confirmLoading" :okButtonProps="{ props: {disabled: disableSubmit} }" @@ -72,12 +72,14 @@ :columns="columns" :dataSource="dataSource" :pagination="ipagination" - :loading="loading" + :loading="confirmLoading" @change="handleTableChange" :customRow="clickThenCheck" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" > - + <span slot="faultDescription" slot-scope="text"> + <j-ellipsis :value="text" :length="10" /> + </span> </a-table> </div> </a-form> @@ -94,6 +96,16 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 import store from '@/store' +import { + ACCESS_TOKEN, + USER_NAME, + USER_INFO, + USER_AUTH, + SYS_BUTTON_AUTH, + UI_CACHE_DB_DICT_DATA, + TENANT_ID, + CACHE_INCLUDED_ROUTES +} from '@/store/mutation-types' export default { name: "FaultReportRepair", @@ -102,6 +114,7 @@ JDate, Tooltip, JEllipsis, + store }, data() { return { @@ -134,29 +147,59 @@ confirmLoading: false, form: this.$form.createForm(this), columns: [ - { + { title: '#', dataIndex: '', key: 'rowIndex', - align: 'center', + width: 60, + align: "center", customRender: function (t, r, index) { - return parseInt(index) + 1 + return parseInt(index) + 1; } }, { + title: '鐘舵��', + align: "center", + dataIndex: 'statusName', + }, + { title: '鍗曟嵁鍙�', - align: 'center', - dataIndex: 'num', + align: "center", + dataIndex: 'num' + }, + { + title: '璁惧缂栫爜', + align: "center", + dataIndex: 'equipmentNum' }, { title: '璁惧鍚嶇О', - align: 'center', + align: "center", dataIndex: 'equipmentName', + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'equipmentModel', + }, + { + title: '瑙勬牸', + align: "center", + dataIndex: 'equipmentSpecification', + }, + { + title: '浣跨敤閮ㄩ棬', + align: "center", + dataIndex: 'departName', }, { title: '鏁呴殰鎻忚堪', align: "center", - dataIndex: 'faultDescription' + dataIndex: 'faultDescription', + scopedSlots: { + customRender: 'faultDescription' + } + }, { title: '鏁呴殰鏃堕棿', @@ -164,13 +207,32 @@ dataIndex: 'faultTime' }, { - title: '绱ф�ョ▼搴�', - align: 'center', - dataIndex: 'urgency_dictText', + title: '鏄惁鍋滄満寰呬慨', + align: "center", + dataIndex: 'isStopName', + }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy' + }, + { + title: '鍒涘缓鏃堕棿', + align: "center", + dataIndex: 'createTime', + }, + { + title: '澶囨敞', + align: "center", + dataIndex: 'remark', + scopedSlots: { + customRender: 'faultDescription' + } }, ], url: { - list: "/eam/equipmentReportRepair/list", + list: "/eam/equipmentReportRepair/getReportRepairList", + add: "/eam/repairOrder/addBySelectReport" }, } }, @@ -187,6 +249,8 @@ if (arg === 1) { this.ipagination.current = 1 } + this.queryParam.status = '1'; + this.queryParam.userId = store.getters.userInfo.id var params = this.getQueryParams() //鏌ヨ鏉′欢 this.loading = true params.isCreateOrder = 0 @@ -207,19 +271,12 @@ this.loading = false }) }, - searchQuery() { this.loadData(1); }, searchReset() { this.queryParam = {}; this.loadData(1) - }, - list(params) { - this.selectedRowKeys = []; - this.selectedRowRecord = []; - this.visible = true; - this.loadData(1); }, clickThenCheck(record) { return { @@ -231,9 +288,9 @@ } }; }, - onSelectChange(selectedRowKeys, selectedRows) { + onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; - this.selectedRowRecord = selectedRows[0]; + this.selectionRows = selectionRows; }, close() { this.queryParam = {}; @@ -243,18 +300,22 @@ handleOk() { const that = this; // 瑙﹀彂琛ㄥ崟楠岃瘉 - if (that.selectedRowKeys.length > 0) { - if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { - that.$emit('sendFaultReportRepairRecord', { record: that.selectedRowRecord }); - that.close(); - } else { - that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨淇℃伅锛�") - } - } else { - that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨淇℃伅锛�") + if (that.selectedRowKeys.length === 0) { + that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨鍗曞悗鎻愪氦锛�") + return false; } + postAction(this.url.add,this.selectionRows).then(res=>{ + if(res.success){ + that.$message.success("棰嗗彇鎴愬姛锛�") + that.$emit('ok'); + }else{ + that.$message.error("棰嗗彇鍑虹幇寮傚父锛�") + } + }).finally(res=>{ + that.confirmLoading = false; + that.close(); + }); }, - handleCancel() { this.close(); }, @@ -311,8 +372,7 @@ height: 90% !important; overflow-y: hidden; } - -/deep/ .notshow { + .notshow { display: none; } @@ -330,9 +390,7 @@ } .dataUnKnow { color: #1890ff; -} - -/deep/ .frozenRowClass { +} .frozenRowClass { color: #c9c9c9; } </style> \ No newline at end of file -- Gitblit v1.9.3