|
@@ -151,22 +151,30 @@
|
|
|
getDataList() {
|
|
|
const param = this.getFilterItems();
|
|
|
api.getModuleList(param).then((res) => {
|
|
|
- const list = [...res.data.data.records];
|
|
|
- for (var i = 0; i < list.length; i++) {
|
|
|
- for (var j = 0; j < this.tagTypes.length; j++) {
|
|
|
- if(list[i].moduleType == this.tagTypes[j].val) {
|
|
|
- list[i].tagTypeCn = this.tagTypes[j].name;
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ const list = res.data.data&&res.data.data.records?[...res.data.data.records]:[];
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
+ for (var j = 0; j < this.tagTypes.length; j++) {
|
|
|
+ if(list[i].moduleType == this.tagTypes[j].val) {
|
|
|
+ list[i].tagTypeCn = this.tagTypes[j].name;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- //后台数据typeCn转换为筛选中对应的字段名称
|
|
|
- for (var z = 0; z < this.Adscriptions.length; z++) {
|
|
|
- if(list[i].type == this.Adscriptions[z].val) {
|
|
|
- list[i].typeCn = this.Adscriptions[z].name;
|
|
|
+ //后台数据typeCn转换为筛选中对应的字段名称
|
|
|
+ for (var z = 0; z < this.Adscriptions.length; z++) {
|
|
|
+ if(list[i].type == this.Adscriptions[z].val) {
|
|
|
+ list[i].typeCn = this.Adscriptions[z].name;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ this.list = list;
|
|
|
+ this.total = res.data.data.total;
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
}
|
|
|
- this.list = list;
|
|
|
- this.total = res.data.data.total;
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
filterDatas() {
|