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