From cf585780ca83908649c5fad7c07b5e45c4f12b67 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 18 九月 2023 14:14:45 +0800
Subject: [PATCH] 首页样式修改

---
 Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 51 insertions(+), 8 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
index 9fe3956..4294b66 100644
--- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
+++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -4,7 +4,7 @@
 <!--      闆嗘垚鏃ュ織 浠诲姟 鏁版嵁鍏ㄩ儴鍏敤-->
       <el-form-item label="闆嗘垚鏌ヨ:" size="small">
         <el-select v-model="formInline.type" placeholder="璇烽�夋嫨鍒嗙被" @change="SelectChange">
-          <el-option :label="item.label" :value="item.value" v-for="item in SearchObject.searchData" ></el-option>
+          <el-option :label="item.label" :value="item.value" :key="item.value" v-for="(item,index) in SearchObject.searchData"></el-option>
         </el-select>
       </el-form-item>
 <!--      闆嗘垚鏃ュ織 鏄惁鎴愬姛-->
@@ -26,7 +26,8 @@
           <el-option label="鏁版嵁鏌ヨ" value="queryData"></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>
@@ -60,7 +61,7 @@
 <!--      鍏敤妯″潡-->
 <!--      杈撳叆鍐呭-->
       <el-form-item size="small" v-if="shouldShowInput">
-        <el-input v-model="formInline.text" placeholder="璇疯緭鍏ュ唴瀹�" @keyup.enter.native="SaveHandler"></el-input>
+        <el-input v-model="formInline.text" placeholder="鎸変笅鍥炶溅閿繘琛屾煡璇紒" @keyup.enter.native="SaveHandler"></el-input>
       </el-form-item>
 <!--      鏌ヨ鎸夐挳-->
       <el-form-item size="small" v-if="shouldShowButton">
@@ -117,13 +118,55 @@
     },
     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 => {
-        console.log(res);
+      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);
+        }
       });
     },
-    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 => {
+        if(!res.data.data.records){
+          this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�')
+        }else {
+          let Data=res.data.data;
+          this.$emit('getList',Data);
+        }
+      });
     }
   }
 }

--
Gitblit v1.9.3