Merge remote-tracking branch 'origin/master'

This commit is contained in:
song.tianyang 2021-01-27 19:30:54 +08:00
commit 48f9e6a363
2 changed files with 17 additions and 3 deletions

View File

@ -274,7 +274,12 @@
},
},
created: function () {
this.condition.filters = {status: ["Prepare", "Underway", "Completed"]};
if (this.trashEnable) {
this.condition.filters = {status: ["Trash"]};
}
else {
this.condition.filters = {status: ["Prepare", "Underway", "Completed"]};
}
this.initTable();
this.getMaintainerOptions();
},

View File

@ -19,8 +19,8 @@
</el-table-column>
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" width="200px">
<template v-slot:default="scope">
<div v-for="itemName in scope.row.tagNames" :key="itemName">
<ms-tag type="success" effect="plain" :content="itemName"/>
<div v-for="itemName in getTagString(scope.row.tags)" :key="itemName">
<ms-tag type="success" effect="plain" :content="itemName.substring(1, itemName.length-1)"/>
</div>
</template>
</el-table-column>
@ -101,6 +101,15 @@
},
},
methods: {
getTagString(tagsString) {
// if(tagsString.length == 2) {
if(tagsString.length >= 2 && tagsString[0] == '[' && tagsString[1] == ']') {
return null;
}
tagsString = tagsString.substring(1, tagsString.length - 1);
let tagList = tagsString.split(',');
return tagList;
},
search() {
this.selectRows = new Set();
this.loading = true;