From bf70f3cf825f44c457dba2bebd26e7af73e4b2a8 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 06 九月 2024 15:02:09 +0800 Subject: [PATCH] 解决集成日志查询bug --- Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue | 71 +++++++++++++++++++++++++---------- 1 files changed, 51 insertions(+), 20 deletions(-) diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue index 0edd298..4216767 100644 --- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue +++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue @@ -24,9 +24,13 @@ <el-option label="鍒嗙被鏌ヨ" value="queryClassify"></el-option> <el-option label="鍚紪鐮佽鍒欑殑鍒嗙被鏌ヨ" value="queryClassifyRule"></el-option> <el-option label="鏁版嵁鏌ヨ" value="queryData"></el-option> + <el-option label="鏍囧噯鐢宠" value="applyCodeForBZ"></el-option> + <el-option label="閮ㄩ棬鐢宠" value="syncDataForOrg"></el-option> + <el-option label="浜哄憳鐢宠" value="syncDataForPerson"></el-option> </el-select> </el-form-item> -<!-- 闆嗘垚浠诲姟 鏄惁鎺ㄩ�佹垚鍔� 闆嗘垚鏁版嵁 鏄惁鍒嗚В浠诲姟--> +<!-- 闆嗘垚浠诲姟 鏄惁鎺ㄩ�佹垚鍔� +闆嗘垚鏁版嵁 鏄惁鍒嗚В浠诲姟--> <el-form-item v-if="((status.type == 'task' || status.type == 'data')&& status.stateTaskDataFlag)" size="small"> <el-select v-model="formInline.stateTask" placeholder="璇烽�夋嫨鐘舵��"> <el-option label="鏄�" value="true"></el-option> @@ -71,7 +75,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'], @@ -117,20 +123,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,'createTime','desc',{[`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,'createTime','desc',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; @@ -157,15 +187,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