|
@@ -440,7 +440,7 @@
|
|
|
@click="handlesync(scope.$index, scope.row)">表单同步
|
|
|
</el-button>
|
|
|
<el-button class="mg-l-10" type="text" :loading="handlesyncLoad"
|
|
|
- @click="handleLinkNodes(scope.$index, scope.row)">关联节点
|
|
|
+ @click="handleLinkNodes(scope.$index, scope.row)" v-if="curTreeData.nodeType === 1000">关联节点
|
|
|
</el-button>
|
|
|
<el-link class="mg-l-10" type="danger"
|
|
|
@click="handleDelete(scope.$index, scope.row)">删除表单
|
|
@@ -1658,7 +1658,9 @@ import {
|
|
|
syncNodeTable,
|
|
|
syncNodeinfo,
|
|
|
tabTypeLazyTree,
|
|
|
- syncContractTabSort
|
|
|
+ syncContractTabSort,
|
|
|
+ linkNodeTree,
|
|
|
+ getLinekNodeTreelist
|
|
|
} from "@/api/manager/wbsprivate";
|
|
|
import {findProjectTree as getAlltree} from "@/api/manager/projectinfo";
|
|
|
import {findProjectTreeTrial as getAlltreeTrial} from "@/api/manager/projectinfo";
|
|
@@ -1943,7 +1945,9 @@ export default {
|
|
|
handlesyncLoad: false,//表单同步
|
|
|
isLinkNodes: false,
|
|
|
linkNodesLoad: false,
|
|
|
- checkedLinkNodesKeys: []
|
|
|
+ checkedLinkNodesKeys: [],
|
|
|
+ rowPkeyId: '',
|
|
|
+ nodesCheck: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -2250,22 +2254,47 @@ export default {
|
|
|
},
|
|
|
//关联节点
|
|
|
handleLinkNodes(index, row) {
|
|
|
+ this.rowPkeyId = row.pkeyId
|
|
|
this.linkNodesLoad = false
|
|
|
this.isLinkNodes = true
|
|
|
- //checkedLinkNodesKeys
|
|
|
+ getLinekNodeTreelist(row.pkeyId).then(({data}) => {
|
|
|
+ const res = data.data
|
|
|
+ if (res instanceof Array) {
|
|
|
+ this.checkedLinkNodesKeys = res
|
|
|
+ } else {
|
|
|
+ this.checkedLinkNodesKeys = []
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.checkedLinkNodesKeys = []
|
|
|
+ })
|
|
|
},
|
|
|
//关联节点被勾选
|
|
|
- linkNodesCheck(_, data) {
|
|
|
- console.log(data)
|
|
|
+ linkNodesCheck(_, {checkedKeys}) {
|
|
|
+ this.nodesCheck = checkedKeys
|
|
|
},
|
|
|
//确定关联
|
|
|
linkNodesSave() {
|
|
|
-
|
|
|
+ const keys = this.nodesCheck
|
|
|
+ const pkeyId = this.rowPkeyId
|
|
|
+ this.linkNodesLoad = true
|
|
|
+ linkNodeTree(keys.join(','), pkeyId).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "关联成功!",
|
|
|
+ });
|
|
|
+ this.linkNodesLoad = false
|
|
|
+ this.linkNodesClose()
|
|
|
+ }).catch(() => {
|
|
|
+ this.linkNodesLoad = false
|
|
|
+ })
|
|
|
},
|
|
|
//关闭关联弹窗
|
|
|
linkNodesClose() {
|
|
|
this.isLinkNodes = false
|
|
|
this.linkNodesLoad = false
|
|
|
+ this.checkedLinkNodesKeys = []
|
|
|
+ this.nodesCheck = []
|
|
|
+ this.rowPkeyId = ''
|
|
|
},
|
|
|
handleDelete(index, row) {
|
|
|
this.$confirm("是否删除 " + row.tableName + " ?", "删除元素表", {
|