|
|
|
@ -159,13 +159,17 @@ |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="使用已有标签" name="history"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="18"> |
|
|
|
使用常用标签: |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-autocomplete v-model.trim="tagForm.tagName" value-key="tagName" :fetch-suggestions="querySearchAsync" |
|
|
|
placeholder="请输入内容进行搜索" @select="handleSelect"></el-autocomplete> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row type="flex" style="flex-wrap: wrap;"> |
|
|
|
<el-col :span="5" style="margin-right: 10px;" v-for="(item, index) in tagList" :key="index"> |
|
|
|
<el-button type="primary" plain round |
|
|
|
<el-button :class="{ highlight: item.isHighlighted }" type="primary" plain round |
|
|
|
style="white-space: nowrap;text-overflow: ellipsis;word-wrap: normal; width: 100%;" size="small" |
|
|
|
@click="handelClickTag(item)"> |
|
|
|
{{ item.tagName }} |
|
|
|
@ -270,10 +274,10 @@ |
|
|
|
<el-form-item label="标签名称" prop="tagName" v-if="activeName === 'add'"> |
|
|
|
<el-input v-model.trim="tagForm.tagName" style="width: 200px;" size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="标签名称" label-width="120px" prop="tagName" v-if="activeName === 'history'"> |
|
|
|
<!-- <el-form-item label="标签名称" label-width="120px" prop="tagName" v-if="activeName === 'history'"> |
|
|
|
<el-autocomplete v-model.trim="tagForm.tagName" value-key="tagName" :fetch-suggestions="querySearchAsync" |
|
|
|
placeholder="请输入内容进行搜索" @select="handleSelect"></el-autocomplete> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form> |
|
|
|
</el-main> |
|
|
|
<el-footer> |
|
|
|
@ -642,6 +646,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
handelClickTag(item) { |
|
|
|
this.tagList.forEach(tag => { |
|
|
|
tag.isHighlighted = false; |
|
|
|
}); |
|
|
|
item.isHighlighted = true; |
|
|
|
this.initForm("view", item); |
|
|
|
}, |
|
|
|
async fetchData(url, params) { |
|
|
|
@ -1039,6 +1047,8 @@ export default { |
|
|
|
await this.saveLuckysheetHead() |
|
|
|
}, |
|
|
|
async handleSelect(item) { |
|
|
|
item.isHighlighted = true; |
|
|
|
this.tagList.unshift(item); |
|
|
|
await this.initForm("edit", item); |
|
|
|
}, |
|
|
|
handleCellEditBefore(e) { |
|
|
|
@ -1228,6 +1238,10 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.highlight { |
|
|
|
background-color: #0056d6; /* 高亮背景颜色 */ |
|
|
|
color: #fff; /* 高亮文字颜色 */ |
|
|
|
} |
|
|
|
/deep/ .el-tabs__item.is-active{ |
|
|
|
font-weight: 600; |
|
|
|
} |
|
|
|
|