|
@@ -110,7 +110,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- 目录自定义按钮区域 -->
|
|
<!-- 目录自定义按钮区域 -->
|
|
<div id="custom-button-zone" class="custom-button-zone">
|
|
<div id="custom-button-zone" class="custom-button-zone">
|
|
- <img src="~@/assets/img/data_m/move_ico.png" v-permission="permissionBtn.sandboxPermission.sandbox_classify_move"/>
|
|
|
|
|
|
+ <img src="~@/assets/img/data_m/move_ico.png" style="pointer-events: none;" v-permission="permissionBtn.sandboxPermission.sandbox_classify_move"/>
|
|
<img src="~@/assets/img/sand_new/add_outline.png" class="add-classify-img" v-permission="permissionBtn.sandboxPermission.sandbox_classify_addEdit"/>
|
|
<img src="~@/assets/img/sand_new/add_outline.png" class="add-classify-img" v-permission="permissionBtn.sandboxPermission.sandbox_classify_addEdit"/>
|
|
<img src="~@/assets/img/sand_new/edit_outline.png" class="edit-classify-img" v-permission="permissionBtn.sandboxPermission.sandbox_classify_addEdit"/>
|
|
<img src="~@/assets/img/sand_new/edit_outline.png" class="edit-classify-img" v-permission="permissionBtn.sandboxPermission.sandbox_classify_addEdit"/>
|
|
<img src="~@/assets/img/sand_new/delete_outline.png" class="delete-classify-img" v-permission="permissionBtn.sandboxPermission.sandbox_classify_del"/>
|
|
<img src="~@/assets/img/sand_new/delete_outline.png" class="delete-classify-img" v-permission="permissionBtn.sandboxPermission.sandbox_classify_del"/>
|
|
@@ -134,11 +134,14 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="关联品种" prop="ChartPermissionId" v-if="hasVariety">
|
|
<el-form-item label="关联品种" prop="ChartPermissionId" v-if="hasVariety">
|
|
<el-cascader
|
|
<el-cascader
|
|
|
|
+ @change="chartPermissionIdChange"
|
|
:options="classifyArr"
|
|
:options="classifyArr"
|
|
:props="classifyProps"
|
|
:props="classifyProps"
|
|
v-model="classifyForm.ChartPermissionId"
|
|
v-model="classifyForm.ChartPermissionId"
|
|
placeholder="请选择对应品种"
|
|
placeholder="请选择对应品种"
|
|
id="classifyAddCascader"
|
|
id="classifyAddCascader"
|
|
|
|
+ ref="chartPermissionCascader"
|
|
|
|
+ :disabled="(classifyForm.SandboxClassifyId && classifyForm.Level!=1) || (!classifyForm.SandboxClassifyId && classifyForm.Level!=0)"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -274,6 +277,7 @@ import { myGraph } from './common/gragh';
|
|
viewSandbox:{},
|
|
viewSandbox:{},
|
|
activeNode:{},
|
|
activeNode:{},
|
|
addClassifyNodeTid:'',
|
|
addClassifyNodeTid:'',
|
|
|
|
+ locationNode:'',
|
|
movingRecoveData:{
|
|
movingRecoveData:{
|
|
targetNode:null,
|
|
targetNode:null,
|
|
treeNode:null,
|
|
treeNode:null,
|
|
@@ -289,7 +293,8 @@ import { myGraph } from './common/gragh';
|
|
classifyForm:{
|
|
classifyForm:{
|
|
SandboxClassifyId:0,
|
|
SandboxClassifyId:0,
|
|
SandboxClassifyName:'',
|
|
SandboxClassifyName:'',
|
|
- ChartPermissionId:null,
|
|
|
|
|
|
+ ChartPermissionId:0,
|
|
|
|
+ ChartPermissionName:'',
|
|
ParentId:0,
|
|
ParentId:0,
|
|
Level:0
|
|
Level:0
|
|
},
|
|
},
|
|
@@ -373,11 +378,12 @@ import { myGraph } from './common/gragh';
|
|
}else{
|
|
}else{
|
|
this.treeData = nodesData
|
|
this.treeData = nodesData
|
|
}
|
|
}
|
|
- if(locationNode){
|
|
|
|
|
|
+ let location = locationNode || this.locationNode
|
|
|
|
+ if(location){
|
|
let searchNode
|
|
let searchNode
|
|
- let locationId = locationNode.isCatalogue?locationNode.SandboxClassifyId:locationNode.SandboxId
|
|
|
|
|
|
+ let locationId = location.isCatalogue?location.SandboxClassifyId:location.SandboxId
|
|
if(parentNode){
|
|
if(parentNode){
|
|
- if(locationNode.isCatalogue){
|
|
|
|
|
|
+ if(location.isCatalogue){
|
|
searchNode=this.zTreeObj.getNodesByParam('SandboxClassifyId',+locationId,parentNode)
|
|
searchNode=this.zTreeObj.getNodesByParam('SandboxClassifyId',+locationId,parentNode)
|
|
}else{
|
|
}else{
|
|
searchNode=this.zTreeObj.getNodesByParam('SandboxId',+locationId,parentNode)
|
|
searchNode=this.zTreeObj.getNodesByParam('SandboxId',+locationId,parentNode)
|
|
@@ -393,6 +399,7 @@ import { myGraph } from './common/gragh';
|
|
this.zTreeObj.selectNode(searchNode[0])
|
|
this.zTreeObj.selectNode(searchNode[0])
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ this.locationNode=''
|
|
}else if(this.locationParentIds && this.locationParentIds.length>0){
|
|
}else if(this.locationParentIds && this.locationParentIds.length>0){
|
|
// 获取分类列表后需要定位
|
|
// 获取分类列表后需要定位
|
|
requestAnimationFrame(()=>{
|
|
requestAnimationFrame(()=>{
|
|
@@ -502,7 +509,6 @@ import { myGraph } from './common/gragh';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
zTreeClick(event, treeId, treeNode,clickFlag){
|
|
zTreeClick(event, treeId, treeNode,clickFlag){
|
|
-
|
|
|
|
if(clickFlag==1){
|
|
if(clickFlag==1){
|
|
if(this.activeNode.SandboxClassifyId == treeNode.SandboxClassifyId &&
|
|
if(this.activeNode.SandboxClassifyId == treeNode.SandboxClassifyId &&
|
|
this.activeNode.SandboxId == treeNode.SandboxId){
|
|
this.activeNode.SandboxId == treeNode.SandboxId){
|
|
@@ -597,6 +603,8 @@ import { myGraph } from './common/gragh';
|
|
this.classifyAddTitle="添加分类"
|
|
this.classifyAddTitle="添加分类"
|
|
this.classifyForm.Level = node.Level
|
|
this.classifyForm.Level = node.Level
|
|
this.classifyForm.ParentId = node.SandboxClassifyId
|
|
this.classifyForm.ParentId = node.SandboxClassifyId
|
|
|
|
+ this.classifyForm.ChartPermissionId = node.ChartPermissionId
|
|
|
|
+ this.classifyForm.ChartPermissionName = node.ChartPermissionName
|
|
this.classifyAddShow=true
|
|
this.classifyAddShow=true
|
|
},
|
|
},
|
|
getParentNodeName(node){
|
|
getParentNodeName(node){
|
|
@@ -609,10 +617,14 @@ import { myGraph } from './common/gragh';
|
|
},
|
|
},
|
|
editClassify(e,node){
|
|
editClassify(e,node){
|
|
e.stopPropagation()
|
|
e.stopPropagation()
|
|
|
|
+ this.locationNode = node
|
|
let pNode = node.getParentNode()
|
|
let pNode = node.getParentNode()
|
|
this.lastLevelClassifyName = pNode ? pNode.SandboxClassifyName:''
|
|
this.lastLevelClassifyName = pNode ? pNode.SandboxClassifyName:''
|
|
this.classifyForm.SandboxClassifyId = node.SandboxClassifyId
|
|
this.classifyForm.SandboxClassifyId = node.SandboxClassifyId
|
|
|
|
+ this.classifyForm.Level = node.Level
|
|
this.classifyForm.SandboxClassifyName = node.SandboxClassifyName
|
|
this.classifyForm.SandboxClassifyName = node.SandboxClassifyName
|
|
|
|
+ this.classifyForm.ChartPermissionId = node.ChartPermissionId
|
|
|
|
+ this.classifyForm.ChartPermissionName = node.ChartPermissionName
|
|
this.classifyAddTitle="编辑分类"
|
|
this.classifyAddTitle="编辑分类"
|
|
this.classifyAddShow=true
|
|
this.classifyAddShow=true
|
|
},
|
|
},
|
|
@@ -668,6 +680,11 @@ import { myGraph } from './common/gragh';
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ chartPermissionIdChange(value){
|
|
|
|
+ this.classifyForm.ChartPermissionName=
|
|
|
|
+ this.$refs.chartPermissionCascader.getCheckedNodes()[0] ?
|
|
|
|
+ this.$refs.chartPermissionCascader.getCheckedNodes()[0].label+'' || '':''
|
|
|
|
+ },
|
|
classifyAddSubmit(){
|
|
classifyAddSubmit(){
|
|
//提交
|
|
//提交
|
|
this.$refs.classifyFormRef.validate(valid=>{
|
|
this.$refs.classifyFormRef.validate(valid=>{
|
|
@@ -676,17 +693,23 @@ import { myGraph } from './common/gragh';
|
|
//编辑
|
|
//编辑
|
|
let params={
|
|
let params={
|
|
SandboxClassifyId:this.classifyForm.SandboxClassifyId,
|
|
SandboxClassifyId:this.classifyForm.SandboxClassifyId,
|
|
- SandboxClassifyName:this.classifyForm.SandboxClassifyName
|
|
|
|
|
|
+ SandboxClassifyName:this.classifyForm.SandboxClassifyName,
|
|
|
|
+ ChartPermissionId:this.classifyForm.ChartPermissionId,
|
|
|
|
+ ChartPermissionName:this.classifyForm.ChartPermissionName,
|
|
}
|
|
}
|
|
sandInterface.editSandboxClassify(params).then(res=>{
|
|
sandInterface.editSandboxClassify(params).then(res=>{
|
|
if(res.Ret == 200){
|
|
if(res.Ret == 200){
|
|
this.classifyAddShow=false
|
|
this.classifyAddShow=false
|
|
this.$message.success(this.classifyAddTitle+"成功")
|
|
this.$message.success(this.classifyAddTitle+"成功")
|
|
- let currentNode = this.zTreeObj.getSelectedNodes()[0]
|
|
|
|
|
|
+ let parentNode = this.locationNode.getParentNode()
|
|
|
|
|
|
- currentNode.SandboxClassifyName = this.classifyForm.SandboxClassifyName
|
|
|
|
- this.zTreeObj.updateNode(currentNode)
|
|
|
|
- // this.getSandboxClassify()
|
|
|
|
|
|
+ if(!parentNode){
|
|
|
|
+ this.getSandboxClassify(null,this.locationNode)
|
|
|
|
+ }else{
|
|
|
|
+ this.zTreeObj.removeChildNodes(parentNode)
|
|
|
|
+ this.zTreeObj.expandNode(parentNode,true,false,false,true)
|
|
|
|
+ this.zTreeClick(null,'',this.locationNode,1)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
@@ -695,7 +718,8 @@ import { myGraph } from './common/gragh';
|
|
SandboxClassifyName:this.classifyForm.SandboxClassifyName,
|
|
SandboxClassifyName:this.classifyForm.SandboxClassifyName,
|
|
ParentId:this.classifyForm.ParentId,
|
|
ParentId:this.classifyForm.ParentId,
|
|
Level:this.classifyForm.Level,
|
|
Level:this.classifyForm.Level,
|
|
- ChartPermissionId:this.classifyForm.ChartPermissionId
|
|
|
|
|
|
+ ChartPermissionId:this.classifyForm.ChartPermissionId,
|
|
|
|
+ ChartPermissionName:this.classifyForm.ChartPermissionName,
|
|
}
|
|
}
|
|
sandInterface.addSandboxClassify(params).then(res=>{
|
|
sandInterface.addSandboxClassify(params).then(res=>{
|
|
if(res.Ret == 200){
|
|
if(res.Ret == 200){
|
|
@@ -719,7 +743,8 @@ import { myGraph } from './common/gragh';
|
|
this.classifyForm={
|
|
this.classifyForm={
|
|
SandboxClassifyId:0,
|
|
SandboxClassifyId:0,
|
|
SandboxClassifyName:'',
|
|
SandboxClassifyName:'',
|
|
- ChartPermissionId:null,
|
|
|
|
|
|
+ ChartPermissionId:0,
|
|
|
|
+ ChartPermissionName:'',
|
|
ParentId:0,
|
|
ParentId:0,
|
|
Level:0
|
|
Level:0
|
|
}
|
|
}
|
|
@@ -868,8 +893,10 @@ import { myGraph } from './common/gragh';
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
// 在沙盘图详情删除
|
|
// 在沙盘图详情删除
|
|
- this.sandboxLocation([result.SandboxClassifyId])
|
|
|
|
this.zTreeObj.removeNode(result)
|
|
this.zTreeObj.removeNode(result)
|
|
|
|
+ let parentNode = result.getParentNode()
|
|
|
|
+ this.zTreeObj.selectNode(parentNode)
|
|
|
|
+ this.zTreeClick(null,'',parentNode,1)
|
|
}
|
|
}
|
|
this.getSandboxList('setCurrentIndex')
|
|
this.getSandboxList('setCurrentIndex')
|
|
|
|
|
|
@@ -1091,7 +1118,7 @@ import { myGraph } from './common/gragh';
|
|
//==============================画布
|
|
//==============================画布
|
|
// 初始化画布
|
|
// 初始化画布
|
|
init() {
|
|
init() {
|
|
- const graph = new myGraph('sand-chart-body',null,'','view');
|
|
|
|
|
|
+ const graph = new myGraph('sand-chart-body',null,'view');
|
|
this.graph = graph;
|
|
this.graph = graph;
|
|
graph.on('node:mouseenter', ({ node, e }) => {
|
|
graph.on('node:mouseenter', ({ node, e }) => {
|
|
let data = node.data
|
|
let data = node.data
|