Browse Source

添加his同步下拉菜单

wuyunfeng 3 years ago
parent
commit
1578df11d1
2 changed files with 21 additions and 0 deletions
  1. 9 0
      src/api/calling-part.js
  2. 12 0
      src/layout/components/Navbar.vue

+ 9 - 0
src/api/calling-part.js

@@ -72,3 +72,12 @@ export function getExpire() {
     loading: false
   })
 }
+
+/** 同步HIS */
+export function syncHis() {
+  return request({
+    url: '/mgr/partinfo/synchis',
+    method: 'get',
+    loading: false
+  })
+}

+ 12 - 0
src/layout/components/Navbar.vue

@@ -49,6 +49,9 @@
               </el-dropdown-menu>
             </el-dropdown>
           </el-dropdown-item>
+          <el-dropdown-item divided @click.native="syncHis">
+            <span style="display:block;">同步HIS信息</span>
+          </el-dropdown-item>
           <el-dropdown-item divided @click.native="logout">
             <span style="display:block;">{{ this.$t("action.logout") }}</span>
           </el-dropdown-item>
@@ -128,12 +131,21 @@ export default {
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
     },
+    syncHis() {
+      API_Part.syncHis().then(res => {
+        this.$message({
+          type: 'success',
+          message: '开启HIS信息同步!'
+        })
+      })
+    },
     async logout() {
       await this.$store.dispatch('user/logout')
       this.$store.dispatch('permission/removeRoutes')
       console.log('hello')
       this.$router.push(`/login?redirect=${this.$route.fullPath}`)
     },
+
     switchLanguage(value) {
       if (value === 'zh') {
         this.$i18n.locale = 'zh'