From 586834bc22d6c893410a7702cf8e8264d6421fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Wed, 30 Mar 2022 17:54:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E5=86=85=E6=B5=B7=E5=A4=96=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E6=A3=80=E7=B4=A2=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domesticStandardsAndRegulations/index.vue | 18 ++++--- .../foreignStandardsAndRegulations/index.vue | 50 ++++++++++++++++++- 2 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue index b411eff1b..93ed74549 100644 --- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue @@ -4618,14 +4618,16 @@ export default { }); } } - if(item.advanceSearchVOStr){ - advanceSearchVOList.push({ - connect: item.advanceSearchVOStr[0].connect, - field: item.advanceSearchVOStr[0].field, - type: item.advanceSearchVOStr[0].type, - value: item.advanceSearchVOStr[0].value, - }) - } + if(item){ + if(item.advanceSearchVOStr.length){ + advanceSearchVOList.push({ + connect: item.advanceSearchVOStr[0].connect, + field: item.advanceSearchVOStr[0].field, + type: item.advanceSearchVOStr[0].type, + value: item.advanceSearchVOStr[0].value, + }) + } + } formData.advanceSearchVOStr = JSON.stringify(advanceSearchVOList) this.SarExportSearchEo = formData formData.startIssueTime = formData.issueTime ? formData.issueTime[0] : null diff --git a/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue index 4bb965d10..9c191d188 100644 --- a/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue @@ -3150,6 +3150,43 @@ export default { }, // 搜索 getDomesticStandardTableBtn(item) { + // // 自定义属性字段高级搜索处理 + //advanceSearchVOStr + const advanceSearchVOList = []; + for (let key in this.advanceSearchMapping) { + const value = this.advanceSearchMapping[key]; + if (value !== null && value !== '' && (key === 'NYLX' || key === 'SYRZ' || key === 'SYCPX' || (item.CLLX && item.CLLX.length > 0))) { + advanceSearchVOList.push({ + connect: "and", + field: key || '', + type: 'regexp', + value: value.join(',') + }); + } else if (value !== null && value !== '' && (key === 'SSRQ' || key === 'XCXSSRQ' || key === 'ZCCSSRQ')) { + advanceSearchVOList.push({ + connect: "and", + field: key || '', + type: 'between', + value: value.join(',') + }); + } else if (value !== null && value !== '' && (key === 'BARQ')) { + advanceSearchVOList.push({ + connect: "and", + field: key || '', + type: 'equals', + value: value + }); + } else if (value !== null && value !== '') { + advanceSearchVOList.push({ + connect: "and", + field: key || '', + type: 'like', + value: value + }); + } + } + item.advanceSearchVOStr = advanceSearchVOList + sessionStorage.setItem('tableFlag', JSON.stringify(item)) item.page = 1 this.standCommonlySearch.page = 1 this.standCommonlySearch.sarStandardsSearch = JSON.stringify(item) || '' @@ -3860,7 +3897,6 @@ export default { * 1、空:普通检索 2:高级检索 * */ getDomesticStandardTable(item) { - // if (item === 2) { // data.standSort = '' // data.standNumber = '' @@ -3939,7 +3975,17 @@ export default { } } - formData.advanceSearchVOStr = JSON.stringify(advanceSearchVOList); + if(item){ + if(item.advanceSearchVOStr.length){ + advanceSearchVOList.push({ + connect: item.advanceSearchVOStr[0].connect, + field: item.advanceSearchVOStr[0].field, + type: item.advanceSearchVOStr[0].type, + value: item.advanceSearchVOStr[0].value, + }) + } + } + formData.advanceSearchVOStr = JSON.stringify(advanceSearchVOList) this.SarExportSearchEo = formData formData.startIssueTime = formData.issueTime ? formData.issueTime[0] : null formData.endIssueTime = formData.issueTime ? formData.issueTime[1] : null