|
|
@ -29,8 +29,8 @@ |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="文档类型项" prop="items"> |
|
|
|
<div class="tag-container flex gap-2"> |
|
|
|
<el-tag v-for="ent in tags" :key="ent.code" closable :disable-transitions="false" @close="handleClose(ent.id)"> |
|
|
|
{{ ent.code}} |
|
|
|
<el-tag v-for="ent in tags" :key="ent.name" closable :disable-transitions="false" @close="handleClose(ent.id)"> |
|
|
|
{{ ent.name}} |
|
|
|
</el-tag> |
|
|
|
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/> |
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="addItem"> |
|
|
@ -156,10 +156,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
if (formField === 'wenDangItem') { |
|
|
|
console.log(val) |
|
|
|
val.forEach(item => { |
|
|
|
const isExist = tags.value.some(tag => tag.code === item.code); |
|
|
|
const isExist = tags.value.some(tag => tag.name === item.name); |
|
|
|
if (!isExist){ |
|
|
|
const newItem = {}; |
|
|
|
newItem['code'] = item.code; |
|
|
|
newItem['name'] = item.name; |
|
|
|
newItem['id'] = item.id; |
|
|
|
tags.value.push(newItem); |
|
|
|
} |
|
|
|