Browse Source

添加同步工伤匹配

lighter 4 years ago
parent
commit
370904d430
2 changed files with 21 additions and 3 deletions
  1. 7 0
      src/api/national-match/index.js
  2. 14 3
      src/views/dictionary/NationalSiMatch.vue

+ 7 - 0
src/api/national-match/index.js

@@ -46,3 +46,10 @@ export function cancelMatch(data) {
     data,
   })
 }
+
+export function synchronizeInjuryMatch() {
+  return request({
+    url: '/xmYp/synchronizeInjuryMatch',
+    method: 'get',
+  })
+}

+ 14 - 3
src/views/dictionary/NationalSiMatch.vue

@@ -22,7 +22,7 @@
         <el-switch v-model="fuzzy" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
         &nbsp;
       </span>
-      <el-button icon="el-icon-search" type="primary" @click="search">检索</el-button>&nbsp;
+      <el-button icon="el-icon-search" type="primary" @click="search">检索</el-button>&nbsp; <el-button type="danger" @click="syncInjryMtch">同步工伤匹配</el-button>&nbsp;
       <span v-if="queryParam.status === 0 && queryParam.type >= 3">
         <el-button icon="el-icon-refresh" type="warning" @click="syncNewServiceOrItem"> 同步新增{{ queryParam.type === 3 ? '项目' : '耗材' }} </el-button>
       </span>
@@ -223,7 +223,7 @@
 
 <script>
 import { reactive, ref } from '@vue/reactivity'
-import { asyncNewNameForServicesOrItems, cancelMatch, executeMatch, selectLocalItems, selectNationalItems, updateLocalItem } from '@/api/national-match'
+import { asyncNewNameForServicesOrItems, cancelMatch, executeMatch, selectLocalItems, selectNationalItems, updateLocalItem, synchronizeInjuryMatch } from '@/api/national-match'
 import store from '@/store'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { computed } from '@vue/runtime-core'
@@ -525,6 +525,16 @@ export default {
       })
     }
 
+    const syncInjryMtch = () => {
+      synchronizeInjuryMatch().then((res) => {
+        ElMessage({
+          message: res,
+          type: 'success',
+          showClose: true,
+        })
+      })
+    }
+
     return {
       factory,
       certiNo,
@@ -542,6 +552,7 @@ export default {
       showModifyLocalItem,
       showUploadPrm,
       uploadPrm,
+      cptYesOrNo,
       queryTypeChanged,
       search,
       syncNewServiceOrItem,
@@ -553,11 +564,11 @@ export default {
       beforeMatch,
       doMatch,
       deleteMatch,
-      cptYesOrNo,
       handleSelectionChange,
       beforeUploadMatch,
       rvkUploadMatch,
       executeUploadMatch,
+      syncInjryMtch,
     }
   },
 }