From da6cc144cc4d60805e4693e4adc5ebdf78b5b37d Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 18 九月 2023 16:44:50 +0800 Subject: [PATCH] 集成系统-查询字段修改 --- Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue | 65 +++++++++++++++++++++++--------- 1 files changed, 46 insertions(+), 19 deletions(-) diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue index 4294b66..c56b682 100644 --- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue +++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue @@ -72,7 +72,9 @@ </template> <script> -import {getList} from "@/api/docking/loge"; +import {getLogoList} from "@/api/docking/loge"; +import {getDataList} from "@/api/docking/data"; +import {getTaskList} from "@/api/docking/task"; export default { name: "VciDockingSearch", props:['SearchObject','page','formInline','status'], @@ -118,20 +120,44 @@ }, 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 => { - if(!res.data.data.records){ - this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�') - }else { - let Data=res.data.data; - this.$emit('getList',Data); - } - }); + const requestApi = (api) => { + api(this.page.currentPage, this.page.pageSize, { [`conditionMap[${name}_like]`]: this.formInline.text}).then(res => { + if(!res.data.data.records){ + this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�') + }else { + let Data=res.data.data; + this.$emit('getList',Data); + } + }); + } + //鏃ュ織 + if(this.status.type=='loge'){ + requestApi(getLogoList); + } + //鏁版嵁 + if(this.status.type=='data'){ + requestApi(getDataList); + } + //浠诲姟 + if(this.status.type=='task'){ + requestApi(getTaskList); + } }, handleSearch() { - const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga} = this.status; + 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 = {}; + const requestApi = (api) => { + api(currentPage, pageSize, requestParams).then(res => { + if(!res.data.data.records){ + this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�'); + } else { + let Data=res.data.data; + this.$emit('getList',Data); + } + }); + } // 闆嗘垚鏃ュ織绫诲瀷 if (type === 'loge' && typeFlag) { requestParams['conditionMap[type_like]'] = cut; @@ -158,15 +184,16 @@ if ((type === 'task' || type === 'data') && sendTypeFlga) { requestParams['conditionMap[sendType_like]'] = taskCut; } - // 璇锋眰 - getList(currentPage, pageSize, requestParams).then(res => { - if(!res.data.data.records){ - this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�') - }else { - let Data=res.data.data; - this.$emit('getList',Data); - } - }); + + if (type == 'loge') { + requestApi(getLogoList); + } + if (type == 'data') { + requestApi(getDataList); + } + if (type == 'task') { + requestApi(getTaskList); + } } } } -- Gitblit v1.9.3