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/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:"",
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;