From 9a5970afa191e9bc33dfa039b2c8ee87de1ebb00 Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Fri, 11 Jul 2025 16:23:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=91=98=E5=B7=A5=E6=8F=90=E6=88=90?= =?UTF-8?q?=E6=8B=BC=E6=8E=A5=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99=E9=80=97?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emisCommissionQuoteForm.vue | 17 +++++++---------- src/views/emis/emisCommissionQuote/index.vue | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/views/emis/emisCommissionQuote/emisCommissionQuoteForm.vue b/src/views/emis/emisCommissionQuote/emisCommissionQuoteForm.vue index f8638ec1..0eb37d54 100644 --- a/src/views/emis/emisCommissionQuote/emisCommissionQuoteForm.vue +++ b/src/views/emis/emisCommissionQuote/emisCommissionQuoteForm.vue @@ -329,24 +329,21 @@ export default { return; } let userArr=this.impEmpListStr.trim().split(/[;\;\,\,\n]/)||[]; - let empCodeStr=""; - let empNameStr=""; + let empCodeArr = []; + let empNameArr = []; for(let i=0;iuser====>",user); + // console.log("====>user====>",user); if(user==null){ this.$modal.msgError(userArr[i]+"不存在!"); return }else{ - empCodeStr=empCodeStr+user.empCode+","; - empNameStr=empNameStr+user.empName+","; + empCodeArr.push(user.empCode); + empNameArr.push(user.empName); } } - - this.form.empCode=empCodeStr; - this.form.empName=empNameStr; - - + this.form.empCode=empCodeArr.join(","); + this.form.empName=empNameArr.join(","); this.openForm=false; }, cancelBatchEmp(){ diff --git a/src/views/emis/emisCommissionQuote/index.vue b/src/views/emis/emisCommissionQuote/index.vue index 1b9936e8..7bebc68c 100644 --- a/src/views/emis/emisCommissionQuote/index.vue +++ b/src/views/emis/emisCommissionQuote/index.vue @@ -304,7 +304,7 @@ export default { currentQuote:null, openForm: false, titleForm: "", - + isCopy:false, // 弹出展示层 quoteId:null, titleView:"", From 0a3ca7dfcf55e6d6bf0834e1e5971e6da5db5d28 Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Fri, 11 Jul 2025 16:24:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8B=93=E6=89=91=E5=9B=BE=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=AF=BC=E5=87=BA=E3=80=81=E5=B0=8F=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchForm/index.vue | 10 ++ .../emis/emisTransPlanRuleTopoGraph/index.vue | 109 ++++++++---------- 2 files changed, 61 insertions(+), 58 deletions(-) diff --git a/src/components/SearchForm/index.vue b/src/components/SearchForm/index.vue index ce0f0f65..9167e5c0 100644 --- a/src/components/SearchForm/index.vue +++ b/src/components/SearchForm/index.vue @@ -12,6 +12,9 @@ + + + @@ -42,6 +45,10 @@ export default { isShowSearchBtn:{ type: Boolean, default: true, + }, + isShowDownload :{ + type:Boolean, + default: false, } }, data() { @@ -96,6 +103,9 @@ export default { // this.resetForm(); this.$emit('reset') }, + handleExport() { + this.$emit('export') + }, resetForm() { if (this.$refs["searchForm"]) { this.$refs["searchForm"].resetFields(); diff --git a/src/views/emis/emisTransPlanRuleTopoGraph/index.vue b/src/views/emis/emisTransPlanRuleTopoGraph/index.vue index 47716b39..dc03f464 100644 --- a/src/views/emis/emisTransPlanRuleTopoGraph/index.vue +++ b/src/views/emis/emisTransPlanRuleTopoGraph/index.vue @@ -2,10 +2,10 @@
- + v-show="showSearch" @search="handleQuery" @reset="resetQuery" :isShowDownload="true" @export="exportImage"> + - + -
- - - 导 出 --> - - -
- +
@@ -48,11 +40,13 @@ export default { data() { return { treeData: {}, + showMinimap:false, graph: null, queryParams: { pageNum: 1, pageSize: 50, lineCode: "", + lineName: '', productType: "", productName: '', startSiteCode: '' @@ -113,11 +107,7 @@ export default { // 触摸移动逻辑... }, }); - - // this.splitChild(this.treeData); this.drawTreeGraph(); - - }, beforeRouteEnter(to, from, next) { // 组件创建前 保存当前背景颜色 @@ -173,15 +163,14 @@ export default { }); const minimap = new G6.Minimap({ - container:'minimap', - size: [190, 190], - type: 'delegate', - delegateStyle: { - // 代理元素样式配置 - fill: '#b12d29', // 填充色(半透明白色) - // stroke: 'black', // 描边色(蓝色) - } - }); + container: 'minimap', + size: [190, 190], + type: 'delegate', + delegateStyle: { + fill: '#b12d29', // 填充色(半透明白色) + } + }) + this.graph = new G6.TreeGraph({ container, width: document.getElementById('container').clientWidth, //画布宽度等于浏览器宽度 @@ -190,7 +179,7 @@ export default { // fitViewPadding: [10, 50, 10, 50], animate: true, // plugins: [this.treeTooltip(), this.contextMenu, minimap], - plugins: [this.treeTooltip()], + plugins: [this.treeTooltip(), minimap], defaultNode: { type: "rect", size: [250, 80], @@ -561,13 +550,17 @@ export default { this.edges = []; const res = await emisTransPlanRuleTree(this.queryParams); //测试数据 this.treeData = res.rows; - + if (res.rows.length === 0) { + loadingInstance.close(); + return + }; + this.showMinimap=true; //获取产品下的网点 // let { list: newlist, edges: newEdges } = this.treeDataToNodelist( // this.treeData, // this.queryParams.productType, // ); - this.treeData = { "id": '1', "label": this.queryParams.productName, "x": 500, "y": 500, "children": this.processTree(this.treeData) } + this.treeData = { "id": '1', "label": `${this.queryParams.lineName}\n${this.queryParams.productName}`, "children": this.processTree(this.treeData) } // 折叠节点 this.splitChild(this.treeData); this.graph.data(this.treeData); @@ -596,34 +589,35 @@ export default { return str; }, async exportImage() { - - this.graph.toFullDataURL((res) => { - // 为了防止下载的图片影响到G6显示,这里作一个深度拷贝 - const canvas = document.getElementById('container').childNodes[1].cloneNode(true); - console.log('canvas',document.getElementById('container').childNodes); - const img = new Image(); - img.onload = function () { - canvas.width = img.width + 32; - canvas.height = img.height + 32; - const ctx = canvas.getContext('2d'); - ctx.fillStyle = '#fff'; - ctx.fillRect(0, 0, canvas.width, canvas.height); - ctx.drawImage(img, 16, 16); - // 下载 - const oA = document.createElement('a'); - oA.download = '组批次规则图'; - oA.href = canvas.toDataURL('image/png'); - document.body.appendChild(oA); - oA.click(); - oA.remove(); // 下载之后把创建的元素删除 - }; - img.src = res; - }, 'image/png', { - imageConfig: { - padding: 16 - } - }); - } + this.graph.toFullDataURL((res) => { + // 为了防止下载的图片影响到G6显示,这里作一个深度拷贝 + const canvas = document.getElementById('container').childNodes[1].cloneNode(true); + const img = new Image(); + img.onload = function () { + canvas.width = img.width + 32; + canvas.height = img.height + 32; + const ctx = canvas.getContext('2d'); + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, canvas.width, canvas.height); + ctx.drawImage(img, 16, 16); + // 下载 + const oA = document.createElement('a'); + oA.download = '组批次规则图'; + oA.href = canvas.toDataURL('image/png'); + document.body.appendChild(oA); + oA.click(); + oA.remove(); // 下载之后把创建的元素删除 + }; + img.src = res; + }, 'image/png', { + imageConfig: { + padding: 16 + } + }); + }, + onLineChange(value) { + this.queryParams.lineName = value.lineName; + }, } } @@ -648,14 +642,13 @@ export default { border: 1px solid #ccc; } - #container>>>.g6-component-tooltip { background: #333; color: #fff; padding: 10px; } .minimap-container >>>.g6-minimap-viewport { - outline: 2px solid black !important; + outline: 2px solid #333 !important; } /* canvas { cursor: pointer !important;