|
@@ -67,7 +67,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import addLegend from '../legendLibrary/addLegend'
|
|
import addLegend from '../legendLibrary/addLegend'
|
|
-import { getLegendTree, queryRelation, deleteRelation } from '@/api/legendLibrary.js'
|
|
|
|
|
|
+import { getLegendTree, queryRelation, deleteRelation, graphElementUpdate } from '@/api/legendLibrary.js'
|
|
export default {
|
|
export default {
|
|
components: { addLegend },
|
|
components: { addLegend },
|
|
data() {
|
|
data() {
|
|
@@ -135,10 +135,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- /**
|
|
|
|
- * 点击工具栏按钮回调方法
|
|
|
|
- * @param {Object} Obj {tool:{icon:'icon组件名称',name:'按钮名称',type:'icon组件type'},item:当前行数据}
|
|
|
|
- */
|
|
|
|
buttonClickHandle(obj) {
|
|
buttonClickHandle(obj) {
|
|
let index = Number(obj.item.index.split('-')[1])
|
|
let index = Number(obj.item.index.split('-')[1])
|
|
let _this = this
|
|
let _this = this
|
|
@@ -161,6 +157,8 @@ export default {
|
|
_this.tableData.splice(index - 1, 1)
|
|
_this.tableData.splice(index - 1, 1)
|
|
_this.tableData.splice(index, 0, upDate)
|
|
_this.tableData.splice(index, 0, upDate)
|
|
}
|
|
}
|
|
|
|
+ let ids = _this.tableData.map(({ Id }) => Id)
|
|
|
|
+ _this.upDateGraphy(ids)
|
|
}
|
|
}
|
|
|
|
|
|
function down() {
|
|
function down() {
|
|
@@ -171,15 +169,27 @@ export default {
|
|
_this.tableData.splice(index + 1, 1)
|
|
_this.tableData.splice(index + 1, 1)
|
|
_this.tableData.splice(index, 0, downDate)
|
|
_this.tableData.splice(index, 0, downDate)
|
|
}
|
|
}
|
|
|
|
+ let ids = _this.tableData.map(({ Id }) => Id)
|
|
|
|
+ _this.upDateGraphy(ids)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 更新图例关系信息
|
|
|
|
+ upDateGraphy(ids) {
|
|
|
|
+ let posParams = {
|
|
|
|
+ GraphCategoryId: this.GraphCategoryId[0],
|
|
|
|
+ GraphElementIds: ids,
|
|
|
|
+ Move: true
|
|
|
|
+ }
|
|
|
|
+ graphElementUpdate({ posParams }).then(res => {
|
|
|
|
+ this.getData()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
handleNodeClick(data, e) {
|
|
handleNodeClick(data, e) {
|
|
this.GraphCategoryId = [e.node.eventKey]
|
|
this.GraphCategoryId = [e.node.eventKey]
|
|
this.getData()
|
|
this.getData()
|
|
},
|
|
},
|
|
deleteClick(row) {
|
|
deleteClick(row) {
|
|
- console.log(row)
|
|
|
|
let postParams = [
|
|
let postParams = [
|
|
{
|
|
{
|
|
GraphCategoryId: this.GraphCategoryId[0],
|
|
GraphCategoryId: this.GraphCategoryId[0],
|
|
@@ -268,8 +278,8 @@ export default {
|
|
flex: 1;
|
|
flex: 1;
|
|
display: flex;
|
|
display: flex;
|
|
.legend-rules-left {
|
|
.legend-rules-left {
|
|
- width: 288px;
|
|
|
|
- padding: 26px;
|
|
|
|
|
|
+ // width: 288px;
|
|
|
|
+ // padding: 26px;
|
|
}
|
|
}
|
|
.legend-rules-right {
|
|
.legend-rules-right {
|
|
padding: 16px;
|
|
padding: 16px;
|