|
@@ -17,7 +17,7 @@
|
|
|
|
|
|
<el-popover placement="bottom" v-if="searchStorageText.length > 0" width="260" trigger="click">
|
|
|
<div style="height: 200px;overflow-x: auto;">
|
|
|
- <div v-for="(item, index) in searchStorageText" :key="item.value">
|
|
|
+ <div v-for="(item, index) in searchStorageText" :key="index">
|
|
|
<div style="margin-bottom:10px;background:#F0F9EB;padding: 10px 5px;">
|
|
|
<span>{{ item.label }}</span>
|
|
|
<span> = </span>
|
|
@@ -160,15 +160,25 @@ export default {
|
|
|
resultBtn(item, index, i) {
|
|
|
if (Array.isArray(item.inputValue)) {
|
|
|
item.inputValue.splice(i, 1)
|
|
|
+ var field = ''
|
|
|
+ if(item.filedKind == 0){
|
|
|
+ field = 'checkName'
|
|
|
+ }else{
|
|
|
+ field = 'inputValue'
|
|
|
+ }
|
|
|
+
|
|
|
if (this.searchStorageText[index].inputValue.length == 0) {
|
|
|
this.searchStorageText.splice(index, 1)
|
|
|
let spliceName = ''
|
|
|
if (item.dele == 'storage') {
|
|
|
spliceName = 'searchStorage'
|
|
|
} else {
|
|
|
- spliceName = 'searchPatentCheck'
|
|
|
+ spliceName = 'searchPatentCheck'
|
|
|
}
|
|
|
- this[spliceName].splice(index, 1)
|
|
|
+ let b = this[spliceName].findIndex(itemFind => {
|
|
|
+ return itemFind[field] == item[field]
|
|
|
+ })
|
|
|
+ this[spliceName].splice(b, 1)
|
|
|
}
|
|
|
if (item.checkData && item.checkData.length > 0) {//统计自定义字段
|
|
|
item.checkData.splice(i, 1)
|
|
@@ -316,10 +326,16 @@ export default {
|
|
|
value += ' OR '
|
|
|
}
|
|
|
})
|
|
|
- this.searchStr = `${item.value} ${sign} (${value})`
|
|
|
+ if(value){
|
|
|
+ this.searchStr = `${item.value} ${sign} (${value})`
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
- var values = this.$commonJS.AddQuotationMarks(item.inputValue)
|
|
|
- this.searchStr = `${item.value} ${sign} (${values.join('')})`
|
|
|
+ if(item.inputValue){
|
|
|
+ var values = this.$commonJS.AddQuotationMarks(item.inputValue)
|
|
|
+ this.searchStr = `${item.value} ${sign} (${values.join('')})`
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
} else {
|
|
@@ -336,10 +352,16 @@ export default {
|
|
|
value += ' OR '
|
|
|
}
|
|
|
})
|
|
|
- this.searchStr += ` AND ${item.value} ${sign} (${value})`
|
|
|
+ if(value){
|
|
|
+ this.searchStr += ` AND ${item.value} ${sign} (${value})`
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
- var values = this.$commonJS.AddQuotationMarks(item.inputValue)
|
|
|
- this.searchStr += ` AND ${item.value} ${sign} (${values.join('')})`
|
|
|
+ if(item.inputValue){
|
|
|
+ var values = this.$commonJS.AddQuotationMarks(item.inputValue)
|
|
|
+ this.searchStr += ` AND ${item.value} ${sign} (${values.join('')})`
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
} else {
|