From 7d8e7438ab28e9729b36a96ff73e5587114319aa Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 14 九月 2023 15:09:12 +0800 Subject: [PATCH] 集成模块 模糊查询 --- Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue | 41 +++++++++++++++++++++++++++++++++++++---- 1 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue index 652907c..ebdb09a 100644 --- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue +++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue @@ -117,13 +117,46 @@ }, SaveHandler(){ let name = this.SearchObject.searchData[this.formInline.type].prop; - getList(this.page.currentPage, this.page.pageSize, { [`conditionMap['${name}_like']`]: this.formInline.text}).then(res => { + getList(this.page.currentPage, this.page.pageSize, { [`conditionMap[${name}_like]`]: this.formInline.text}).then(res => { console.log(res); }); }, - handleSearch(){ - let formattedDate = this.$moment(this.formInline.Date).format('YYYY-M-D'); - console.log('formattedDate',formattedDate); + handleSearch() { + const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga} = this.status; + const { currentPage, pageSize } = this.page; + const { cut, state, stateTask, Date, lastDate, taskCut } = this.formInline; + const requestParams = {}; + // 闆嗘垚鏃ュ織绫诲瀷 + if (type === 'loge' && typeFlag) { + requestParams['conditionMap[type_like]'] = cut; + } + // 闆嗘垚鏃ュ織鏄惁鎴愬姛 + if (type === 'loge' && stateFlag) { + requestParams['conditionMap[interfaceStatus_like]'] = state; + } + // 闆嗘垚浠诲姟 鏄惁鎺ㄩ�佹垚鍔� 闆嗘垚鏁版嵁 鏄惁鍒嗚В浠诲姟 + if ((type === 'task' || type === 'data') && stateTaskDataFlag) { + requestParams['conditionMap[sendFlag_like]'] = stateTask; + } + // 闆嗘垚浠诲姟 鍒涘缓鏃ユ湡 鍜� 闆嗘垚鏃ュ織 璁板綍鏃堕棿 + if ((type === 'loge' || type === 'task') && dateFlag) { + const formattedDate = this.$moment(Date).format('YYYY-M-D'); + requestParams['conditionMap[createTime_like]'] = formattedDate; + } + // 闆嗘垚浠诲姟 鏈�鍚庢帹閫佹椂闂� + if (type === 'task' && lastDateFlag) { + const formattedDate = this.$moment(lastDate).format('YYYY-M-D'); + requestParams['conditionMap[lastModifyTime_like]'] = formattedDate; + } + // 闆嗘垚浠诲姟 闆嗘垚鏁版嵁 鎺ㄩ�佺被鍨� + if ((type === 'task' || type === 'data') && sendTypeFlga) { + requestParams['conditionMap[sendType_like]'] = taskCut; + } + // 璇锋眰 + getList(currentPage, pageSize, requestParams).then(res => { + let Data=res.data.data.records; + this.$emit('getList',Data) + }); } } } -- Gitblit v1.9.3