|
|
@@ -165,7 +165,6 @@ export default {
|
|
|
newApplications: [],
|
|
|
statusOptions: [],
|
|
|
buffOptions: [],
|
|
|
- tagOptions: [],
|
|
|
typeArrs: [],
|
|
|
selectAapplications: [],
|
|
|
selectedAppRange: '',
|
|
|
@@ -243,7 +242,6 @@ export default {
|
|
|
initData() {
|
|
|
this.getDmsCNameAType("applevel");
|
|
|
this.getDmsCNameAType("appstatus");
|
|
|
- this.getDmsCNameAType("tag");
|
|
|
this.getDmsDataList();
|
|
|
let param = {
|
|
|
num: 6,
|
|
|
@@ -384,25 +382,42 @@ export default {
|
|
|
return this.typeArrs.slice(0, 4); // 获取前四个元素
|
|
|
},
|
|
|
getDmsCNameAType(param) {
|
|
|
- let requestParams = {
|
|
|
- cName: param,
|
|
|
- type: 0,
|
|
|
- };
|
|
|
- appCenter.getDmsCNameAType(requestParams).then((res) => {
|
|
|
- if (res.code === 200 && res.content) {
|
|
|
- let option = res.content.map((item) => ({
|
|
|
- label: item.index,
|
|
|
- value: item.name,
|
|
|
- }));
|
|
|
- if (param === "applevel") {
|
|
|
- this.buffOptions = option;
|
|
|
- } else if (param === "appstatus") {
|
|
|
- this.statusOptions = option;
|
|
|
- } else if (param === "tag") {
|
|
|
- this.tagOptions = option;
|
|
|
+ if (param === "applevel") {
|
|
|
+ this.buffOptions = [];
|
|
|
+ let obj = this.$getDmsTypes("applevel");
|
|
|
+ for(let key in obj){
|
|
|
+ this.buffOptions.push({
|
|
|
+ label: key,
|
|
|
+ value: obj[key]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (param === "appstatus") {
|
|
|
+ this.statusOptions = [];
|
|
|
+ let obj = this.$getDmsTypes("appstatus");
|
|
|
+ for(let key in obj){
|
|
|
+ this.statusOptions.push({
|
|
|
+ label: key,
|
|
|
+ value: obj[key]
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ // let requestParams = {
|
|
|
+ // cName: param,
|
|
|
+ // type: 0,
|
|
|
+ // };
|
|
|
+ // appCenter.getDmsCNameAType(requestParams).then((res) => {
|
|
|
+ // if (res.code === 200 && res.content) {
|
|
|
+ // let option = res.content.map((item) => ({
|
|
|
+ // label: item.index,
|
|
|
+ // value: item.name,
|
|
|
+ // }));
|
|
|
+ // if (param === "applevel") {
|
|
|
+ // this.buffOptions = option;
|
|
|
+ // } else if (param === "appstatus") {
|
|
|
+ // this.statusOptions = option;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
getDmsDataList() {
|
|
|
let requestParams = {
|
|
|
@@ -430,12 +445,6 @@ export default {
|
|
|
appstautName:
|
|
|
this.statusOptions.find((info) => info.label == item.appstauts.trim())
|
|
|
?.value || "",
|
|
|
- tags: item.apptags
|
|
|
- .split(",")
|
|
|
- .map(
|
|
|
- (tag) =>
|
|
|
- this.tagOptions.find((info) => info.label == tag.trim())?.value || ""
|
|
|
- ),
|
|
|
createTime: moment(item.create_time).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
}));
|
|
|
this.applications = this.itemApplications;
|