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/mixins/JeecgListMixin.js | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 156 insertions(+), 7 deletions(-) diff --git a/src/mixins/JeecgListMixin.js b/src/mixins/JeecgListMixin.js index 95fa270..841a3e7 100644 --- a/src/mixins/JeecgListMixin.js +++ b/src/mixins/JeecgListMixin.js @@ -4,7 +4,7 @@ * data涓璾rl瀹氫箟 list涓烘煡璇㈠垪琛� delete涓哄垹闄ゅ崟鏉¤褰� deleteBatch涓烘壒閲忓垹闄� */ import { filterObj } from '@/utils/util'; -import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/manage' +import { deleteAction, getAction, downFile, getFileAccessHttpUrl, httpAction } from '@/api/manage' import Vue from 'vue' import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types" import store from '@/store' @@ -81,11 +81,10 @@ this.ipagination.current = 1; } var params = this.getQueryParams();//鏌ヨ鏉′欢 - + console.log('params',params) if(!params){ return false; } - this.loading = true; getAction(this.url.list, params).then((res) => { if (res.success) { @@ -149,7 +148,6 @@ }); return str; }, - onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; @@ -354,9 +352,9 @@ this.$warning({ title: message, content: (<div> - <span>{msg}</span><br/> - <span>鍏蜂綋璇︽儏璇� <a href={href} target="_blank" download={fileName}>鐐瑰嚮涓嬭浇</a> </span> - </div> + <span>{msg}</span><br/> + <span>鍏蜂綋璇︽儏璇� <a href={href} target="_blank" download={fileName}>鐐瑰嚮涓嬭浇</a> </span> + </div> ) }) } else { @@ -410,6 +408,157 @@ let url = getFileAccessHttpUrl(text) window.open(url); }, + + /** + * 鍗曟嵁鎵归噺鎻愪氦 + */ + handleSubmitBatch: function() { + if (!this.url.submitBatch) { + this.$message.error('璇疯缃畊rl.submitBatch灞炴��!') + return + } + if (this.selectedRowKeys.length <= 0) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + return + } else { + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' + } + let httpurl = this.url.submitBatch + let method = 'post' + var params = { ids: ids } + + const that = this + httpAction(httpurl, params, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + + }) + + } + }, + /** + * 鎵归噺鎾ゅ洖宸叉彁浜ょ殑璁板綍 + */ + handleRevocationBatch: function() { + if (!this.url.revocationBatch) { + this.$message.error('璇疯缃畊rl.revocationBatch灞炴��!') + return + } + if (this.selectedRowKeys.length <= 0) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + return + } else { + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' + } + let httpurl = this.url.revocationBatch + let method = 'post' + var params = { ids: ids } + + const that = this + httpAction(httpurl, params, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + }) + + } + }, + /** + * 鍗曟嵁鎻愪氦 + */ + handleSubmit: function() { + if (!this.url.submit) { + this.$message.error('璇疯缃畊rl.submit灞炴��!') + return + } + if (this.selectedRowKeys.length != 1) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + return + } else { + var id = this.selectedRowKeys[0] + let httpurl = this.url.submit + let method = 'post' + var params = { id: id } + + const that = this + + this.$confirm({ + title: '纭鎻愪氦锛�', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + httpAction(httpurl, params, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + + }) + } + }) + + + } + }, + /** + * 鎾ゅ洖宸叉彁浜ょ殑璁板綍 + */ + handleRevocation: function() { + if (!this.url.revocation) { + this.$message.error('璇疯缃畊rl.revocation灞炴��!') + return + } + if (this.selectedRowKeys.length != 1) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + return + } else { + var id = this.selectedRowKeys[0] + let httpurl = this.url.revocation + let method = 'post' + var params = { id: id } + + const that = this + this.$confirm({ + title: '纭鎾ゅ洖锛�', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + + httpAction(httpurl, params, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + } + + } } \ No newline at end of file -- Gitblit v1.9.3