|
@@ -1093,7 +1093,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-s-operation"
|
|
|
class="right-btn"
|
|
|
- @click="infoNameVisible = true"
|
|
|
+ @click="setNodeParameters()"
|
|
|
></el-button>
|
|
|
<div class="flexEnd">
|
|
|
<i
|
|
@@ -1115,15 +1115,15 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
- v-model="scope.row.name"
|
|
|
+ v-model="scope.row.k"
|
|
|
placeholder="请选择"
|
|
|
class="w-100p"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in namelist"
|
|
|
- :key="item.id"
|
|
|
- :label="item.dictValue"
|
|
|
- :value="item.dictKey"
|
|
|
+ :key="item.k"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.k"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
@@ -1134,7 +1134,7 @@
|
|
|
label="参数值设置"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.value"></el-input>
|
|
|
+ <el-input v-model="scope.row.v"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1143,7 +1143,7 @@
|
|
|
label="描述"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.describe"></el-input>
|
|
|
+ <el-input v-model="scope.row.remark"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1156,7 +1156,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
class="text-icon-danger"
|
|
|
- @click="delNodeInfo(scope.$index)"
|
|
|
+ @click="delNodeInfoss(scope.$index)"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -1169,7 +1169,7 @@
|
|
|
<el-button @click="nodeInfoVisible = false">取 消</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- @click="nodeInfoSave"
|
|
|
+ @click="nodeInfoSave()"
|
|
|
>保 存</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
@@ -1179,11 +1179,19 @@
|
|
|
:visible.sync="infoNameVisible"
|
|
|
width="800px"
|
|
|
append-to-body
|
|
|
+ class="jiedian"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
<div>
|
|
|
+ <div class="flexEnd">
|
|
|
+ <i
|
|
|
+ class="el-icon-circle-plus marbottom10"
|
|
|
+ @click="setParameterName()"
|
|
|
+ style="font-size:24px;color:rgb(37, 193, 99);cursor: pointer;"
|
|
|
+ ></i>
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
- :data="namelist"
|
|
|
+ :data="namelists"
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
height="400"
|
|
@@ -1194,12 +1202,7 @@
|
|
|
label="参数名称"
|
|
|
>
|
|
|
<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>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1208,12 +1211,7 @@
|
|
|
label="参数值KEY"
|
|
|
>
|
|
|
<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>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1222,12 +1220,7 @@
|
|
|
label="描述"
|
|
|
>
|
|
|
<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>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1236,23 +1229,11 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<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
|
|
|
type="text"
|
|
|
size="small"
|
|
|
class="text-icon-danger"
|
|
|
- @click="delNodeInfo(scope.$index, scope.row)"
|
|
|
+ @click="delNodeInfo(scope.$index)"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -1262,7 +1243,8 @@
|
|
|
slot="footer"
|
|
|
class="dialog-footer"
|
|
|
>
|
|
|
- <el-button @click="infoNameVisible = false">关 闭</el-button>
|
|
|
+ <el-button @click="addParameterName()">保 存</el-button>
|
|
|
+ <el-button @click="closeParameter()">关 闭</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -1273,7 +1255,7 @@
|
|
|
import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
import {
|
|
|
getLazytree, getDetail, update, selectByNodeTable, getAlltree,
|
|
|
- saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort,
|
|
|
+ saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap,
|
|
|
importWbsTree, exportTemplate, remove as removeTreeNode
|
|
|
} from "@/api/manager/wbstree";
|
|
|
import {
|
|
@@ -1285,6 +1267,7 @@ import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
+ jiedianId: '',
|
|
|
excelSortTag: false,
|
|
|
excelSortTag2: false,
|
|
|
sortTag2: false,
|
|
@@ -1359,7 +1342,7 @@ export default {
|
|
|
nodeInfoVisible: false,
|
|
|
nodeInfoTable: [],
|
|
|
namelist: [],
|
|
|
-
|
|
|
+ namelists: [],
|
|
|
infoNameVisible: false,
|
|
|
};
|
|
|
},
|
|
@@ -1396,9 +1379,6 @@ export default {
|
|
|
editSort () {//修改排序
|
|
|
this.wbsTreeSort()
|
|
|
},
|
|
|
- addNodeInfoTable () {//添加节点参数数据
|
|
|
- this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
|
|
|
- },
|
|
|
async wbsTreeSort () {//修改排序
|
|
|
const { data: res } = await wbsTreeSort(this.sort)
|
|
|
console.log(res);
|
|
@@ -1537,6 +1517,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
setLeftType (type, data, node) {
|
|
|
+ this.jiedianId = data.id
|
|
|
if (type == 4 || type == 5) {
|
|
|
this.leftType = type;
|
|
|
}
|
|
@@ -1924,16 +1905,6 @@ export default {
|
|
|
//console.log(file)
|
|
|
this.upFile = file;
|
|
|
},
|
|
|
-
|
|
|
- nodeInfo () { //打开节点参数弹框
|
|
|
- this.nodeInfoVisible = true;
|
|
|
- },
|
|
|
- nodeInfoSave () {//节点参数弹框保存按钮
|
|
|
-
|
|
|
- },
|
|
|
- delNodeInfo (index) {//节点参数弹框中删除按钮
|
|
|
- this.nodeInfoTable.splice(index, 1)
|
|
|
- },
|
|
|
downloadTmp () {
|
|
|
getTemplate().then((res) => {
|
|
|
//console.log(res)
|
|
@@ -2115,6 +2086,108 @@ export default {
|
|
|
return data.title.indexOf(value) !== -1;
|
|
|
},
|
|
|
//#endregion
|
|
|
+
|
|
|
+ //#region 节点参数
|
|
|
+ nodeInfo (data) {//节点参数按钮
|
|
|
+ this.keymap()
|
|
|
+ this.jiedianId = data.id
|
|
|
+ this.parameters(data.id)
|
|
|
+ this.nodeInfoVisible = true;
|
|
|
+ },
|
|
|
+ addNodeInfoTable () {//添加节点参数数据
|
|
|
+ this.nodeInfoTable.unshift({ k: '', v: '', remark: '', wbsId: this.jiedianId })
|
|
|
+ },
|
|
|
+ delNodeInfo (key) {//设置参数名称中的删除按钮
|
|
|
+ this.namelists.splice(key, 1)
|
|
|
+ },
|
|
|
+ delNodeInfoss (key) {//节点参数
|
|
|
+ this.nodeInfoTable.splice(key, 1)
|
|
|
+ },
|
|
|
+ setNodeParameters () {//打开设置节点参数弹框按钮
|
|
|
+ this.infoNameVisible = true
|
|
|
+ this.namelists = [...this.namelist]
|
|
|
+ },
|
|
|
+ async setParameterName () {//设置参数名称中添加节点参数按钮
|
|
|
+ // wbsId: this.jiedianId
|
|
|
+ this.namelists.unshift({ name: '', remark: '', k: '', type: 0, })
|
|
|
+ },
|
|
|
+ async nodeInfoSave () {//节点参数弹框保存按钮
|
|
|
+ if (this.nodeInfoTable) {
|
|
|
+ let tag = true
|
|
|
+ this.nodeInfoTable.forEach(val => {
|
|
|
+ if (!val.k | !val.v) {
|
|
|
+ return tag = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (tag) {
|
|
|
+ await this.saveOrUpdateBatch(this.nodeInfoTable)
|
|
|
+ this.nodeInfoVisible = false
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "设置参数节点成功!"
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "请填写所有的参数名称和参数值!"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "请先设置参数节点!"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async addParameterName () {//设置参数名称中的保存按钮
|
|
|
+ if (this.namelists) {
|
|
|
+ let tag = true
|
|
|
+ this.namelists.forEach(val => {
|
|
|
+ if (!val.name || !val.k) {
|
|
|
+ return tag = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (tag) {
|
|
|
+ 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 })
|
|
|
+ console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.nodeInfoTable = res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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
|
|
|
+
|
|
|
},
|
|
|
components: {
|
|
|
ManualSorting,
|