|
@@ -396,7 +396,7 @@
|
|
<el-button
|
|
<el-button
|
|
style="margin-left:30px;"
|
|
style="margin-left:30px;"
|
|
type="primary"
|
|
type="primary"
|
|
- @click="saveLinkTab"
|
|
|
|
|
|
+ @click="saveLinkTab()"
|
|
>确 定</el-button>
|
|
>确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -1089,7 +1089,7 @@
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-s-operation"
|
|
icon="el-icon-s-operation"
|
|
class="right-btn"
|
|
class="right-btn"
|
|
- @click="infoNameVisible = true"
|
|
|
|
|
|
+ @click="setNodeParameters()"
|
|
></el-button>
|
|
></el-button>
|
|
<div class="flexEnd">
|
|
<div class="flexEnd">
|
|
<i
|
|
<i
|
|
@@ -1118,8 +1118,8 @@
|
|
<el-option
|
|
<el-option
|
|
v-for="item in namelist"
|
|
v-for="item in namelist"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
- :label="item.dictValue"
|
|
|
|
- :value="item.dictKey"
|
|
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
@@ -1170,6 +1170,7 @@
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <!-- 设置参数名称 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
title="设置参数名称"
|
|
title="设置参数名称"
|
|
:visible.sync="infoNameVisible"
|
|
:visible.sync="infoNameVisible"
|
|
@@ -1187,7 +1188,7 @@
|
|
></i>
|
|
></i>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
- :data="namelist"
|
|
|
|
|
|
+ :data="namelists"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
height="400"
|
|
height="400"
|
|
@@ -1198,12 +1199,7 @@
|
|
label="参数名称"
|
|
label="参数名称"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <template v-if="scope.row.isEdit">
|
|
|
|
- <el-input v-model="scope.row.name"></el-input>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- {{scope.row.name}}
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input v-model="scope.row.name"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1212,12 +1208,7 @@
|
|
label="参数值KEY"
|
|
label="参数值KEY"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <template v-if="scope.row.isEdit">
|
|
|
|
- <el-input v-model="scope.row.key"></el-input>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- {{scope.row.key}}
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input v-model="scope.row.k"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1226,12 +1217,7 @@
|
|
label="描述"
|
|
label="描述"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <template v-if="scope.row.isEdit">
|
|
|
|
- <el-input v-model="scope.row.describe"></el-input>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- {{scope.row.describe}}
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input v-model="scope.row.remark"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1240,18 +1226,6 @@
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- v-show="scope.row.isEdit"
|
|
|
|
- @click="saveNodeInfoHandle(scope.$index, scope.row)"
|
|
|
|
- >保存</el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- v-show="!scope.row.isEdit"
|
|
|
|
- @click="editNodeInfo(scope.$index, scope.row)"
|
|
|
|
- >编辑</el-button>
|
|
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
@@ -1267,7 +1241,7 @@
|
|
class="dialog-footer"
|
|
class="dialog-footer"
|
|
>
|
|
>
|
|
<el-button @click="addParameterName()">保 存</el-button>
|
|
<el-button @click="addParameterName()">保 存</el-button>
|
|
- <el-button @click="infoNameVisible = false">关 闭</el-button>
|
|
|
|
|
|
+ <el-button @click="closeParameter()">关 闭</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -1279,7 +1253,7 @@ import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
|
|
import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
|
|
import {
|
|
import {
|
|
saveFormAndElement, selectFormElements,
|
|
saveFormAndElement, selectFormElements,
|
|
- importWbsTree, findWbsTreePrivateSameLevel, wbsTreePrivateSort, parameters
|
|
|
|
|
|
+ importWbsTree, findWbsTreePrivateSameLevel, wbsTreePrivateSort, parameters, saveOrUpdateBatch, keymap
|
|
} from "@/api/manager/wbstree";
|
|
} from "@/api/manager/wbstree";
|
|
import {
|
|
import {
|
|
saveElement, remove as removeElement, updateBatchElements, getTemplate,
|
|
saveElement, remove as removeElement, updateBatchElements, getTemplate,
|
|
@@ -1395,6 +1369,7 @@ export default {
|
|
nodeInfoVisible: false,
|
|
nodeInfoVisible: false,
|
|
nodeInfoTable: [],
|
|
nodeInfoTable: [],
|
|
namelist: [],
|
|
namelist: [],
|
|
|
|
+ namelists: [],
|
|
|
|
|
|
infoNameVisible: false,
|
|
infoNameVisible: false,
|
|
//#endregion
|
|
//#endregion
|
|
@@ -1441,7 +1416,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getNodeDetail (data, node) {
|
|
getNodeDetail (data, node) {
|
|
- //console.log(data,node,ref)
|
|
|
|
let parentName = '';
|
|
let parentName = '';
|
|
if (node.parent.data) {
|
|
if (node.parent.data) {
|
|
parentName = node.parent.data.title;
|
|
parentName = node.parent.data.title;
|
|
@@ -1804,19 +1778,6 @@ export default {
|
|
//console.log(file)
|
|
//console.log(file)
|
|
this.upFile = file;
|
|
this.upFile = file;
|
|
},
|
|
},
|
|
-
|
|
|
|
- nodeInfo (data) {
|
|
|
|
- console.log(data);
|
|
|
|
- this.parameters(data.primaryKeyId)
|
|
|
|
- this.nodeInfoVisible = true;
|
|
|
|
- },
|
|
|
|
- nodeInfoSave () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- delNodeInfo () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
editNodeInfo (index, row) {
|
|
editNodeInfo (index, row) {
|
|
this.$set(row, 'isEdit', true);
|
|
this.$set(row, 'isEdit', true);
|
|
},
|
|
},
|
|
@@ -2088,19 +2049,32 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async saveLinkTab () {//保存按钮
|
|
async saveLinkTab () {//保存按钮
|
|
- const { data: res } = await saveLinkTab({
|
|
|
|
- exceTabId: this.$refs.tree.getCheckedNodes()[this.$refs.tree.getCheckedNodes.length - 1].id,
|
|
|
|
- tabId: this.GLExcelFrom.id,
|
|
|
|
- })
|
|
|
|
- console.log(res);
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
|
+ if (this.$refs.tree.getCheckedNodes.length > 0) {
|
|
|
|
+ const { data: res } = await saveLinkTab({
|
|
|
|
+ exceTabId: this.$refs.tree.getCheckedNodes()[this.$refs.tree.getCheckedNodes().length - 1].id,
|
|
|
|
+ tabId: this.GLExcelFrom.id,
|
|
|
|
+ })
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '关联清表成功',
|
|
|
|
+ })
|
|
|
|
+ this.GLExcel = false
|
|
|
|
+ this.GLExcelMD()
|
|
|
|
+ selectByNodeTable(this.jiedianId, this.projectid, this.id).then((res) => {
|
|
|
|
+ if (res.data.data.length) {
|
|
|
|
+ this.formData = res.data.data;
|
|
|
|
+ } else {
|
|
|
|
+ this.formData = [];
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'success',
|
|
type: 'success',
|
|
- message: '关联清表成功',
|
|
|
|
|
|
+ message: '请先设置清表',
|
|
})
|
|
})
|
|
- this.GLExcel = false
|
|
|
|
- this.GLExcelMD()
|
|
|
|
- this.setLeftType(4, { id: this.jiedianId })
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
filterNode222 (GLExcelFromvalue, dataAssociationlist) {
|
|
filterNode222 (GLExcelFromvalue, dataAssociationlist) {
|
|
@@ -2110,21 +2084,76 @@ export default {
|
|
//#endregion
|
|
//#endregion
|
|
|
|
|
|
//#region 节点参数
|
|
//#region 节点参数
|
|
|
|
+ nodeInfo (data) {//节点参数按钮
|
|
|
|
+ console.log(data);
|
|
|
|
+ this.keymap()
|
|
|
|
+ this.jiedianId = data.primaryKeyId
|
|
|
|
+ this.parameters(data.primaryKeyId)
|
|
|
|
+ this.nodeInfoVisible = true;
|
|
|
|
+ },
|
|
addNodeInfoTable () {//添加节点参数数据
|
|
addNodeInfoTable () {//添加节点参数数据
|
|
this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
|
|
this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
|
|
},
|
|
},
|
|
- async parameters (wbsId) {
|
|
|
|
|
|
+ delNodeInfo (key) {//设置参数名称中的删除按钮
|
|
|
|
+ this.namelists.splice(key, 1)
|
|
|
|
+ },
|
|
|
|
+ setNodeParameters () {//打开设置节点参数弹框按钮
|
|
|
|
+ this.infoNameVisible = true
|
|
|
|
+ this.namelists = [...this.namelist]
|
|
|
|
+ },
|
|
|
|
+ async setParameterName () {//设置参数名称中添加节点参数按钮
|
|
|
|
+ this.namelists.unshift({ name: '', remark: '', k: '', type: 0, wbsId: this.jiedianId })
|
|
|
|
+ },
|
|
|
|
+ nodeInfoSave () {//节点参数弹框保存按钮
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ async addParameterName () {//设置参数名称中的保存按钮
|
|
|
|
+ if (this.namelists) {
|
|
|
|
+ let tag = true
|
|
|
|
+ this.namelists.forEach(val => {
|
|
|
|
+ if (!val.name || !val.k) {
|
|
|
|
+ return tag = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if (tag) {
|
|
|
|
+ console.log({ wps: this.namelists });
|
|
|
|
+ await this.saveOrUpdateBatch(this.namelists) //保存设置参数
|
|
|
|
+ this.infoNameVisible = false
|
|
|
|
+ this.keymap()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "请填写所有的参数名称和参数值KEY!"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "请设置参数"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ closeParameter () {//设置参数名称,关闭按钮
|
|
|
|
+ this.namelists = []
|
|
|
|
+ this.infoNameVisible = false
|
|
|
|
+ },
|
|
|
|
+ async parameters (wbsId) {//获取接待你参数列表
|
|
const { data: res } = await parameters({ wbsId })
|
|
const { data: res } = await parameters({ wbsId })
|
|
console.log(res);
|
|
console.log(res);
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.nodeInfoTable = res.data
|
|
this.nodeInfoTable = res.data
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //#endregion
|
|
|
|
-
|
|
|
|
- //#region
|
|
|
|
- async setParameterName () {
|
|
|
|
- this.namelist.unshift({ name: '', remark: '', k: '' })
|
|
|
|
|
|
+ async saveOrUpdateBatch (da) {//保存
|
|
|
|
+ const { data: res } = await saveOrUpdateBatch(da)
|
|
|
|
+ console.log(res);
|
|
|
|
+ },
|
|
|
|
+ async keymap () {//节点参数枚举
|
|
|
|
+ const { data: res } = await keymap()
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.code = 200) {
|
|
|
|
+ this.namelist = res.data
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//#endregion
|
|
//#endregion
|
|
|
|
|