From f6b61a485501f326debe52d77ea65d87fb34b37f Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期三, 05 三月 2025 17:57:09 +0800
Subject: [PATCH] 完善集成日志查询

---
 Source/UBCS-WEB/src/views/docking/loge.vue                        |  240 +++++++++++++++++++++++++----------------------
 Source/UBCS-WEB/src/views/code/code.vue                           |    2 
 Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue |    8 
 3 files changed, 131 insertions(+), 119 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
index 92da52c..6f8e57b 100644
--- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
+++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -65,7 +65,7 @@
       <!--      鍏敤妯″潡-->
       <!--      杈撳叆鍐呭-->
       <el-form-item v-if="shouldShowInput" size="small">
-        <el-input v-model="formInline.text" placeholder="鎸変笅鍥炶溅閿繘琛屾煡璇紒" @keyup.enter.native="SaveHandler"></el-input>
+        <el-input v-model.trim="formInline.text" placeholder="鎸変笅鍥炶溅閿繘琛屾煡璇紒" @keyup.enter.native="SaveHandler"></el-input>
       </el-form-item>
       <!--      鏌ヨ鎸夐挳-->
       <el-form-item v-if="shouldShowButton" size="small">
@@ -125,9 +125,9 @@
     SaveHandler() {
       let searchDataItem = Object.values(this.SearchObject.searchData).find(item => item.value === this.formInline.type);
       let name = searchDataItem ? searchDataItem.prop : null;
-      if (!searchDataItem) {
-        this.$message.error('鏈壘鍒板搴旀悳绱㈢被鍨嬭鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
-      }
+      // if (!searchDataItem) {
+      //   this.$message.error('鏈壘鍒板搴旀悳绱㈢被鍨嬭鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
+      // }
       const requestApi = (api) => {
         api(this.page.currentPage, this.page.pageSize, 'createTime', 'desc', {[`conditionMap[${name}_like]`]: this.formInline.text})
           .then(res => {
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 63c39b4..60297f3 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -2516,8 +2516,6 @@
           },
           {
             data: [],
-
-
             title: "鎻忚堪",
             fieldType: "text",
             queryField: "description",
diff --git a/Source/UBCS-WEB/src/views/docking/loge.vue b/Source/UBCS-WEB/src/views/docking/loge.vue
index 6a2b9f7..c6ebd44 100644
--- a/Source/UBCS-WEB/src/views/docking/loge.vue
+++ b/Source/UBCS-WEB/src/views/docking/loge.vue
@@ -1,121 +1,121 @@
 <template>
   <!--绯荤粺闆嗘垚鐨勭郴缁熸棩蹇楅〉闈�-->
   <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
+    <avue-crud ref="crud"
                :data="data || getList"
+               :option="option"
                :page.sync="page"
-               ref="crud"
+               :table-loading="loading"
                @cell-dblclick="cellDbClick"
                @search-change="searchChange"
                @search-reset="searchReset"
                @selection-change="selectionChange"
                @current-change="currentChange"
                @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-      <template slot-scope="scope" slot="menuLeft">
-        <vci-docking-search :SearchObject="SearchObject" :page="page" :formInline="formInline" :status="status" @getList="dockingGetList"></vci-docking-search>
+               @refresh-change="refreshChange">
+      <template slot="menuLeft" slot-scope="scope">
+        <vci-docking-search ref="dockingSearch" :SearchObject="SearchObject" :formInline="formInline" :page="page"
+                            :status="status" @getList="dockingGetList"></vci-docking-search>
       </template>
       <template slot="paramString" slot-scope="scope">
-        <avue-text-ellipsis :text="scope.row.paramString" :height="50">
+        <avue-text-ellipsis :height="50" :text="scope.row.paramString">
           <small slot="more">...</small>
         </avue-text-ellipsis>
       </template>
       <template slot="returnString" slot-scope="scope">
-        <avue-text-ellipsis :text="scope.row.returnString" :height="50">
+        <avue-text-ellipsis :height="50" :text="scope.row.returnString">
           <small slot="more">...</small>
         </avue-text-ellipsis>
       </template>
       <template slot="menu" slot-scope="scope">
-        <el-button type="text" icon="el-icon-view" size="mini" @click="rowView(scope.row)">鏌ョ湅</el-button>
+        <el-button icon="el-icon-view" size="mini" type="text" @click="rowView(scope.row)">鏌ョ湅</el-button>
       </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-import {getLogoList,gridLogeDetail} from "@/api/docking/loge";
+import {getLogoList, gridLogeDetail} from "@/api/docking/loge";
 import {validatenull} from "@/util/validate";
 import {mapGetters} from "vuex";
 
 export default {
   name: "loge",
-  data(){
+  data() {
     return {
-      value:'',
+      value: '',
       //鍚勪釜绫诲瀷鐘舵��
-      status:{
-        type:'loge',
-        typeFlag:false,
-        dateFlag:false,
-        stateFlag:false,
+      status: {
+        type: 'loge',
+        typeFlag: false,
+        dateFlag: false,
+        stateFlag: false,
       },
       //model缁戝畾
-      formInline:{
-        type:'',
-        cut:'',
-        text:'',
-        Date:'',
-        state:''
+      formInline: {
+        type: '',
+        cut: '',
+        text: '',
+        Date: '',
+        state: ''
       },
       //闆嗘垚绫诲瀷姝绘暟鎹�
-      SearchObject:{
-        searchData:[
+      SearchObject: {
+        searchData: [
           {
-            label:'鏁版嵁缂栫爜',
+            label: '鏁版嵁缂栫爜',
             prop: "id",
-            value:0
+            value: 0
           },
           {
-            label:'鍒嗙被浠e彿',
+            label: '鍒嗙被浠e彿',
             prop: 'classifyId',
-            value:1
+            value: 1
           },
           {
-            label:'鍒嗙被鍚嶇О',
+            label: '鍒嗙被鍚嶇О',
             prop: 'classifyName',
-            value:2
+            value: 2
           },
           {
-            label:'闆嗘垚绯荤粺缂栧彿',
+            label: '闆嗘垚绯荤粺缂栧彿',
             prop: 'systemCode',
-            value:3
+            value: 3
           },
           {
-            label:'闆嗘垚绯荤粺鍚嶇О',
+            label: '闆嗘垚绯荤粺鍚嶇О',
             prop: 'systemName',
-            value:4
+            value: 4
           },
           {
-            label:'绫诲瀷',
+            label: '绫诲瀷',
             prop: 'typeText',
-            value:5
+            value: 5
           },
           {
-            label:'璁板綍鏃堕棿',
-            value:6,
+            label: '璁板綍鏃堕棿',
+            value: 6,
             prop: 'createTime',
           },
           {
-            label:'鏄惁鎴愬姛',
+            label: '鏄惁鎴愬姛',
             prop: 'interfaceStatus',
-            value:7
+            value: 7
           },
           {
-            label:'鎺ュ彛鍙傛暟',
-            prop:'paramString',
-            value:11
+            label: '鎺ュ彛鍙傛暟',
+            prop: 'paramString',
+            value: 11
           },
           {
-            label:'杩斿洖鍙傛暟',
-            prop:'returnString',
-            value:12
+            label: '杩斿洖鍙傛暟',
+            prop: 'returnString',
+            value: 12
           },
           {
             label: '杩斿洖msg',
             prop: 'msg',
-            value:13
+            value: 13
           },
         ],
       },
@@ -127,50 +127,50 @@
         currentPage: 1,
         total: 0
       },
-      data:[],
+      data: [],
       option: {
-        height:'auto',
+        height: 'auto',
         calcHeight: 20,
-        menuWidth:120,
+        menuWidth: 120,
         tip: false,
         searchShow: false,
         border: true,
         index: true,
-        indexFixed:false,
+        indexFixed: false,
         selection: false,
         dialogClickModal: false,
-        menuFixed:'right',
+        menuFixed: 'right',
         dialogType: 'drawer',
         viewBtn: false,
         stripe: true,
-        addBtn:false,
-        editBtn:false,
-        delBtn:false,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
         column: [
           {
             label: "鏁版嵁缂栫爜",
             prop: "id",
-            sortable:true,
-            width:130
+            sortable: true,
+            width: 130
           },
           {
             label: "鍥惧彿",
             prop: "uniqueCode",
-            hide:true,
-            sortable:true,
-            width:150
+            hide: true,
+            sortable: true,
+            width: 150
           },
           {
             label: '鍒嗙被浠e彿',
             prop: 'classifyId',
-            sortable:true,
-            overHidden:true,
+            sortable: true,
+            overHidden: true,
             width: 150
           },
           {
             label: '鍒嗙被鍚嶇О',
             prop: 'classifyName',
-            sortable:true,
+            sortable: true,
             overHidden: true,
             width: 140
           },
@@ -195,40 +195,40 @@
           {
             label: '闆嗘垚绯荤粺缂栧彿',
             prop: 'systemCode',
-            labelWidth:150,
-            sortable:true,
+            labelWidth: 150,
+            sortable: true,
             width: 130
           },
           {
             label: '闆嗘垚绯荤粺鍚嶇О',
             prop: 'systemName',
-            sortable:true,
-            labelWidth:150,
+            sortable: true,
+            labelWidth: 150,
             width: 150
           },
           {
             label: '绫诲瀷',
             prop: 'typeText',
-            sortable:true,
+            sortable: true,
             width: 150
           },
           {
-            label:'鎺ュ彛鍙傛暟',
-            prop:'paramString',
-            sortable:true,
+            label: '鎺ュ彛鍙傛暟',
+            prop: 'paramString',
+            sortable: true,
             minRows: 20,
             type: "textarea",
             slot: true,
-            hide:true,
+            hide: true,
           },
           {
-            label:'杩斿洖鍙傛暟',
-            prop:'returnString',
-            sortable:true,
+            label: '杩斿洖鍙傛暟',
+            prop: 'returnString',
+            sortable: true,
             minRows: 20,
             type: "textarea",
             slot: true,
-            hide:true,
+            hide: true,
           },
           {
             label: '杩斿洖msg',
@@ -238,24 +238,24 @@
           {
             label: '璁板綍鏃堕棿',
             prop: 'createTime',
-            sortable:true,
-      
+            sortable: true,
+
           },
           {
             label: '鏄惁鎴愬姛',
             prop: 'interfaceStatus',
-            sortable:true,
+            sortable: true,
             width: 120,
-            html:true,
-            align:'center',
-            type:'select',
-            searchLabelWidth:130,
-            dicData: [{key:'true',value:'鏄�'},{key:'false',value:'鍚�'}],
+            html: true,
+            align: 'center',
+            type: 'select',
+            searchLabelWidth: 130,
+            dicData: [{key: 'true', value: '鏄�'}, {key: 'false', value: '鍚�'}],
             props: {
               label: "value",
               value: "key"
             },
-            formatter : function (row, column) {
+            formatter: function (row, column) {
               return row.interfaceStatus == 'true' || row.interfaceStatus == '' ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>'
             }
           },
@@ -263,8 +263,8 @@
       }
     }
   },
-  computed:{
-    ...mapGetters([ "permission"]),
+  computed: {
+    ...mapGetters(["permission"]),
     permissionList() {
       return {
         addBtn: false,
@@ -274,22 +274,26 @@
       };
     }
   },
+  created() {
+    this.onLoad(this.page);
+  },
   methods: {
-    rowView(row){
+    rowView(row) {
       this.loading = true;
-      gridLogeDetail({oid:row.oid}).then(res =>{
+      gridLogeDetail({oid: row.oid}).then(res => {
         console.log(res)
-        if(res.data.data){
+        if (res.data.data) {
           this.loading = false
           this.$refs.crud.rowView(res.data.data)
         }
       })
     },
-    dockingGetList(val){
-      this.data=val.records;
-      this.page.pageSize=val.size;
-      this.page.currentPage=val.current;
-      this.page.total=val.total;
+    dockingGetList(val) {
+      console.log(val);
+      this.data = val.records;
+      this.page.pageSize = val.size;
+      this.page.currentPage = val.current;
+      this.page.total = val.total;
     },
     async cellDbClick(row, column, cell, event) {
       for (const key in row) {
@@ -323,28 +327,37 @@
     },
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
+      this.$refs.dockingSearch.SaveHandler();
     },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
+      this.$refs.dockingSearch.SaveHandler();
     },
     refreshChange() {
-      this.onLoad(this.page);
+      const page = {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0
+      };
+      this.page = page;
+      this.formInline = { type: '', cut: '', text: '',Date: '', state: ''}
+      this.onLoad(page);
     },
-    onLoad(page, params={}) {
+    onLoad(page, params = {}) {
       this.loading = true;
-      var queryCondition={}
+      var queryCondition = {}
       if (this.query) {
         for (var key in this.query) {
           queryCondition['conditionMap["' + key + '"]'] = this.query[key];
         }
       }
-      getLogoList(page.currentPage, page.pageSize,'createTime','desc',Object.assign(params,this.params, queryCondition,this.query),).then(res => {
+      getLogoList(page.currentPage, page.pageSize, 'createTime', 'desc', Object.assign(params, this.params, queryCondition, this.query),).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
         this.loading = false;
         this.selectionClear();
-      }).catch(error=>{
+      }).catch(error => {
         this.$message.error(error);
         this.loading = false;
       });
@@ -357,17 +370,18 @@
 <style lang="scss" scoped>
 // 婊氬姩鏉℃牱寮忎慨鏀�
 // 婊氬姩鏉$殑瀹藉害
-   /deep/ .el-table__body-wrapper::-webkit-scrollbar {
-     height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
-   background: white;
-     border: white;
-     width: 10px;
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
+  height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
+  background: white;
+  border: white;
+  width: 10px;
 
-   }
+}
+
 // 婊氬姩鏉$殑婊戝潡
-   /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
-     background-color: #ececec;
-     border-radius: 20px;
-     border: #ececec;
-   }
+/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
+  background-color: #ececec;
+  border-radius: 20px;
+  border: #ececec;
+}
 </style>

--
Gitblit v1.9.3