提交 52498f21 编写于 作者: alex.zhang's avatar alex.zhang

项目标签设置

上级 7d791969
......@@ -150,7 +150,7 @@
<div slot="footer" style="text-align: center">
<el-button type="primary" @click="setTagSave">确认</el-button>
<el-button @click="setTagVisible = false">取消</el-button>
<el-button @click="setTagVisible = false;clearLabelData();">取消</el-button>
</div>
</el-dialog>
......@@ -262,7 +262,6 @@ export default {
tag03: "",
tag04: "",
tag05: "",
tagList: [this.tag01, this.tag02, this.tag03, this.tag04, this.tag05],
labelCount: 1,
labelList: [],
allLabelList: [],
......@@ -420,24 +419,36 @@ export default {
);
},
getHistoryLabel() {
// this.getData(
// "get",
// `/sensitive/dataStatistics/getLabel?projectMainId=${this.queryParams.projectMainId}`,
// {},
// (data) => {
// this.labelList = data.data;
// if (this.labelList) {
// this.labelCount = this.labelList.length;
// if (this.labelCount > 0) {
// for(let item in labelList) {
// this.tagList[item] = this.labelList[item];
// }
// }
// }
// }
// );
this.getData(
"get",
`/sensitive/dataStatistics/getLabel?projectMainId=${this.queryParams.projectMainId}`,
{},
(data) => {
this.labelList = data.data;
if (this.labelList) {
this.labelCount = this.labelList.length;
console.log("getHistoryLabel() : this.labelCount = " + this.labelCount);
if (this.labelCount > 0) {
for(let item in this.labelList) {
if (item == 0) {
this.tag01 = this.labelList[item];
} else if (item == 1) {
this.tag02 = this.labelList[item];
} else if (item == 2) {
this.tag03 = this.labelList[item];
} else if (item == 3) {
this.tag04 = this.labelList[item];
} else if (item == 4) {
this.tag05 = this.labelList[item];
}
}
}
}
}
);
},
handleLabelchange() {
this.clearLabelData();
this.getHistoryLabel();
},
addTagNew() {
......@@ -488,10 +499,20 @@ export default {
type: "success",
message: "项目标签设置成功",
});
this.clearLabelData();
this.setTagVisible = false;
}
);
},
clearLabelData() {
this.tag01 = "";
this.tag02 = "";
this.tag03 = "";
this.tag04 = "";
this.tag05 = "";
this.labelList = [];
},
//项目标记状态设置
showProjectStatus() {
this.setStatusVisible = true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册