fix: account列表notification列左移
This commit is contained in:
@@ -165,18 +165,18 @@
|
||||
},
|
||||
|
||||
getScripts() {
|
||||
/*this.$get("/alert/script?pageNo=1&pageSize=-1").then(response => {
|
||||
this.$get("/alert/script?pageNo=1&pageSize=-1").then(response => {
|
||||
this.scripts = response.data.list;
|
||||
this.getSelectableScripts();
|
||||
});*/
|
||||
this.scripts = [
|
||||
});
|
||||
/*this.scripts = [
|
||||
{id: 1, name: "DOLBY"},
|
||||
{id: 2, name: "IMAX"},
|
||||
{id: 3, name: "CGS"},
|
||||
{id: 4, name: "LUXE"},
|
||||
{id: 5, name: "DST:X"},
|
||||
];
|
||||
this.getSelectableScripts();
|
||||
this.getSelectableScripts();*/
|
||||
},
|
||||
|
||||
getSelectableScripts() {
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
v-for="(item, index) in tools.customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:prop="item.prop"
|
||||
:sort-orders="['ascending', 'descending']"
|
||||
@@ -98,7 +99,7 @@
|
||||
<span v-else>{{scope.row[item.prop]}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="28">
|
||||
<el-table-column width="28" fixed="right">
|
||||
<template slot="header" slot-scope="scope" :resizable="false">
|
||||
<span @mousedown.stop="!tools.showCustomTableTitle && (tools.showCustomTableTitle = true)" class="nz-table-gear">
|
||||
<i class="nz-icon nz-icon-gear"></i>
|
||||
@@ -207,7 +208,8 @@
|
||||
label: this.$t('config.account.option'),
|
||||
prop: 'option',
|
||||
show: true,
|
||||
width: 120
|
||||
width: 120,
|
||||
fixed: "right"
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
@@ -289,13 +291,13 @@
|
||||
if (response.code === 200) {
|
||||
for (let i = 0; i < response.data.list.length; i++) {
|
||||
response.data.list[i].status = response.data.list[i].status + "";
|
||||
response.data.list[i].notifications = [
|
||||
/*response.data.list[i].notifications = [
|
||||
{scriptId: 1, account: "杀死比尔"},
|
||||
{scriptId: 2, account: "虎虎虎"},
|
||||
{scriptId: 3, account: "红海行动"},
|
||||
{scriptId: 4, account: "十面埋伏"},
|
||||
{scriptId: 5, account: "哪吒"},
|
||||
];
|
||||
];*/
|
||||
}
|
||||
this.tableData = response.data.list;
|
||||
this.pageObj.total = response.data.total
|
||||
@@ -362,17 +364,8 @@
|
||||
let title = this.tools.customTableTitle;
|
||||
let tableTitle = title.slice(0, this.tableTitle.length);
|
||||
let tagTitle = title.slice(this.tableTitle.length, title.length);
|
||||
/*this.$get("/alert/script?pageNo=1&pageSize=-1").then(response => {
|
||||
this.scripts = response.data.list;
|
||||
this.getSelectableScripts();
|
||||
});*/
|
||||
let scripts = [
|
||||
{id: 1, name: "DOLBY"},
|
||||
{id: 2, name: "IMAX"},
|
||||
{id: 3, name: "CGS"},
|
||||
{id: 4, name: "LUXE"},
|
||||
{id: 5, name: "DST:X"},
|
||||
];
|
||||
this.$get("/alert/script?pageNo=1&pageSize=-1").then(response => {
|
||||
let scripts = response.data.list;
|
||||
scripts = scripts.map(item => {
|
||||
return {label: item.name, prop: 'tags', show: false, allowed: true, scriptId: item.id, type: "tag"};
|
||||
});
|
||||
@@ -386,14 +379,25 @@
|
||||
|
||||
result = result.concat(keepTags).concat(newTags);
|
||||
this.tools.customTableTitle = JSON.parse(JSON.stringify(result));
|
||||
});
|
||||
/*let scripts = [
|
||||
{id: 1, name: "DOLBY"},
|
||||
{id: 2, name: "IMAX"},
|
||||
{id: 3, name: "CGS"},
|
||||
{id: 4, name: "LUXE"},
|
||||
{id: 5, name: "DST:X"},
|
||||
];*/
|
||||
},
|
||||
filterTags(scriptId, scope) {
|
||||
this.$nextTick(() => {
|
||||
let notification = scope.row.notifications.find(item => {
|
||||
return scriptId === item.scriptId;
|
||||
});
|
||||
if (notification) {
|
||||
return notification.account;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user