Bläddra i källkod

feat: es集成 同步

wanggaokun 1 år sedan
förälder
incheckning
e5219b1665
2 ändrade filer med 20 tillägg och 0 borttagningar
  1. 6 0
      tfis-ui/src/api/system/case.js
  2. 14 0
      tfis-ui/src/views/system/case/index.vue

+ 6 - 0
tfis-ui/src/api/system/case.js

@@ -15,6 +15,12 @@ export function esListCase(query) {
     params: query
   })
 }
+export function syncEsData() {
+  return request({
+    url: '/system/case/syncEsData',
+    method: 'get'
+  })
+}
 
 // 查询故障案例管理详细
 export function getCase(id) {

+ 14 - 0
tfis-ui/src/views/system/case/index.vue

@@ -159,6 +159,16 @@
           >导出</el-button
         >
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-refresh"
+          size="mini"
+          @click="handleSyncEsDa"
+          >同步</el-button
+        >
+      </el-col>
       <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
     </el-row>
 
@@ -489,6 +499,7 @@
 <script>
 import {
   listCase,
+  syncEsData,
   getCase,
   delCase,
   addCase,
@@ -898,6 +909,9 @@ export default {
         `case_${new Date().getTime()}.xlsx`
       );
     },
+    handleSyncEsDa() {
+      syncEsData();
+    },
     download(path) {
       this.$download.resource(path);
     },