From 120cf05bfd146a9bd1c011c9dd0244a57d0dea64 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期五, 12 一月 2024 17:35:43 +0800 Subject: [PATCH] 1、优化代码:mdc全局页面表格区域内容若需滚动无需翻至最底部且部分页面竖向滚动会滚动整个页面调整为仅滚动表格区域,表格操作列右固定以满足不同分辨率下操作列始终显示不被遮挡 2、优化代码:mdc全局左侧树组件所在区域的滚动条将不再进行全部内容滚动,调整为仅只有树组件内容滚动 3、优化代码:报警分析、利用率走势分析以及利用率分段分析页面在浏览器窗口尺寸变化后重绘图表以适应页面新尺寸 4、设备综合效率分析页面取消分页器以便能一次性导出所有表格数据 5、mdc全局左侧树区域宽度增大,右侧数据展示区域宽度减小 --- src/views/eam/DailyInspectionStandardList.vue | 124 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 117 insertions(+), 7 deletions(-) diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue index 2ba59ba..afc6879 100644 --- a/src/views/eam/DailyInspectionStandardList.vue +++ b/src/views/eam/DailyInspectionStandardList.vue @@ -92,6 +92,22 @@ icon="reload" style="margin-left: 8px" >閲嶇疆</a-button> + <a-button + v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'" + type="primary" + @click="batchHandleOK" + icon="reload" + style="margin-left: 8px" + v-has="'dailyInspectionStandard:batchHandleOK'" + >鎵归噺閫氳繃</a-button> + <a-button + v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'" + type="primary" + @click="batchHandleReject" + icon="reload" + style="margin-left: 8px" + v-has="'dailyInspectionStandard:batchHandleReject'" + >鎵归噺椹冲洖</a-button> </div> <!-- table鍖哄煙-begin --> @@ -292,11 +308,11 @@ align: 'center', dataIndex: 'teamName', }, - { - title: '娲惧伐鏂瑰紡', - align: 'center', - dataIndex: 'assignModeName', - }, + // { + // title: '娲惧伐鏂瑰紡', + // align: 'center', + // dataIndex: 'assignModeName', + // }, { title: '瀹℃牳鎰忚', align: 'center', @@ -377,7 +393,7 @@ align: 'center', fixed: 'right', scopedSlots: { customRender: 'action' }, - width: 200, + width: 230, } ], url: { @@ -386,6 +402,7 @@ deleteBatch: '/eam/inspectionStandard/deleteBatch', versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect", importExcelUrl: "/eam/inspectionStandard/importExcel", + passBatch: '/eam/inspectionStandard/auditApprovalBatch', }, version: '1.0', dictOptions: {}, @@ -514,7 +531,7 @@ }, searchReset() { this.inspectionStandardId = '-1' - this.queryParam = {} + this.queryParam = { versionStatus: '2' } this.loadData(1); }, modalFormOk() { @@ -523,6 +540,99 @@ //娓呯┖鍒楄〃閫変腑 // this.onClearSelected() }, + batchHandleReject: function () { + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: "璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } else { + + var that = this; + this.$confirm({ + title: "纭鎵归噺椹冲洖", + content: "鏄惁鎵归噺椹冲洖閫変腑鏁版嵁?", + onOk: function () { + that.loading = true; + that.confirmLoading = true; + let formData = {}; + let dailyInspectionStandardlist = that.selectionRows + for (var i = 0; i < dailyInspectionStandardlist.length; i++) { + let record = dailyInspectionStandardlist[i] + if (record.approvalStatus == '1') { + record.approvalStatus = '2' + } else if (record.approvalStatus == '3') { + record.approvalStatus = '4' + } else if (record.approvalStatus == '4') { + record.approvalStatus = '2' + } + } + formData.dailyInspectionStandardlist = dailyInspectionStandardlist + requestPut(that.url.passBatch, formData).then((res) => { + if (res.success) { + that.$message.success("鎵归噺椹冲洖鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎵归噺閫氳繃澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + that.loading = false; + }) + } + }); + } + }, + + batchHandleOK: function () { + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: "璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } else { + + var that = this; + this.$confirm({ + title: "纭鎵归噺閫氳繃", + content: "鏄惁鎵归噺閫氳繃閫変腑鏁版嵁?", + onOk: function () { + that.loading = true; + that.confirmLoading = true; + let formData = {}; + let dailyInspectionStandardlist = that.selectionRows + for (var i = 0; i < dailyInspectionStandardlist.length; i++) { + let record = dailyInspectionStandardlist[i] + if (record.approvalStatus == '1') { + record.approvalStatus = '3' + } else if (record.approvalStatus == '2') { + record.approvalStatus = '3' + } else if (record.approvalStatus == '3') { + record.approvalStatus = '5' + } else if (record.approvalStatus == '4') { + record.approvalStatus = '3' + } + } + formData.dailyInspectionStandardlist = dailyInspectionStandardlist + requestPut(that.url.passBatch, formData).then((res) => { + if (res.success) { + that.$message.success("鎵归噺閫氳繃鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎵归噺閫氳繃澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + that.loading = false; + }) + } + }); + } + }, } } -- Gitblit v1.9.3