yuwandanmian 2 éve
szülő
commit
3d21c0b9bb

+ 1 - 1
src/permission.js

@@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title';
 
 NProgress.configure({ showSpinner: false }); // NProgress Configuration
 
-const whiteList = ['/login', '/whitelist-search']; // no redirect whitelist
+const whiteList = ['/login', '/whitelist-search', '/whitelist-caseViews', '/whitelist-chargeDetails']; // no redirect whitelist
 
 router.beforeEach(async (to, from, next) => {
   // start progress bar

+ 13 - 1
src/router/index.js

@@ -300,6 +300,18 @@ export const constantRoutes = [
         component: () => import('@/views/searchSystem/index'),
         meta: { keepAlive:true },
         hidden: true
+      },
+      {
+        path: '/whitelist-caseViews',
+        name: 'WhitelistCaseViews',
+        component: () => import('@/views/allcase/caseViews'),
+        hidden: true
+      },
+      {
+        path: '/whitelist-chargeDetails',
+        name: 'WhitelistChargeDetails',
+        hidden: true,
+        component: () => import('@/views/data/query/ChargeDetails')
       }
     ]
   }
@@ -314,7 +326,7 @@ const createRouter = () =>
 
 const router = createRouter();
 
-const whiteList = ['/login','/404', '/whitelist-search']; // 添加路由白名单
+const whiteList = ['/login','/404', '/whitelist-search', '/whitelist-caseViews', '/whitelist-chargeDetails']; // 添加路由白名单
 //路由判断
 router.beforeEach(async (to, from, next) => {
   const hasToken = getToken();

+ 2 - 0
src/views/allcase/contFile/mainHomePage.vue

@@ -1373,6 +1373,8 @@ export default {
       let toPath
       if (['/hospital-caseViews', '/hospital-details'].includes(path)) {
         toPath = '/hospital-chargeDetails'
+      } else if (path === '/whitelist-caseViews') {
+        toPath = '/whitelist-chargeDetails'
       } else if (path === '/embedIndex-caseViews') {
         toPath = '/embedIndex-chargeDetails'
       } else {

+ 14 - 2
src/views/searchSystem/components/BLSearch.vue

@@ -223,7 +223,8 @@
         </el-form>
       </div>
       <div v-if="choice == 1" class="fBtn" style="position: relative">
-        <el-button type="primary" icon="el-icon-download" style="position: absolute; right: 120px" @click="highDownload('病历-高级搜索')">导出execl</el-button>
+        <!-- 不登陆访问没有导出 -->
+        <el-button v-if="!isWhitelist" type="primary" icon="el-icon-download" style="position: absolute; right: 120px" @click="highDownload('病历-高级搜索')">导出execl</el-button>
         <el-button
           class="btn11"
           @click="reset"
@@ -232,7 +233,8 @@
         <el-button class="btn2" @click="funQuery(1)">检索</el-button>
       </div>
       <div v-else class="fBtn" style="position: relative">
-        <el-button type="primary" icon="el-icon-download" style="position: absolute; right: 220px" @click="normalDownload('病历-普通搜索')">导出execl</el-button>
+        <!-- 不登陆访问没有导出 -->
+        <el-button v-if="!isWhitelist" type="primary" icon="el-icon-download" style="position: absolute; right: 220px" @click="normalDownload('病历-普通搜索')">导出execl</el-button>
         <el-select
           v-model="formData0.input1"
           style="position: absolute; right: 0px"
@@ -414,6 +416,14 @@ import mPagination from "@/components/m-pagination";
 import { bassNormalSearchDownload, bassHighSearchDownload } from '@/api/excel'
 
 export default {
+  props: {
+    isWhitelist: {
+      type: Boolean,
+      default() {
+        return false
+      }
+    }
+  },
   components: {
     Title,
     mPagination,
@@ -617,6 +627,8 @@ export default {
       let toPath
       if (path === '/hospital-search') {
         toPath = '/hospital-caseViews'
+      } else if (path === '/whitelist-search') {
+        toPath = '/whitelist-caseViews'
       } else {
         toPath = '/caseViews'
       }

+ 10 - 2
src/views/searchSystem/components/CaseHomeSearch.vue

@@ -229,8 +229,8 @@
             </div>
           </div>
         </div>
-
-        <el-button class="btn1" type="primary" icon="el-icon-download" @click="funExport('质控列表', '/qualityList')">导出execl</el-button>
+        <!-- 不登录没有导出 -->
+        <el-button v-if="!isWhitelist" class="btn1" type="primary" icon="el-icon-download" @click="funExport('质控列表', '/qualityList')">导出execl</el-button>
       </div>
 
       <el-table :data="tableData" border style="width: 100%">
@@ -301,6 +301,14 @@ import mPagination from '@/components/m-pagination';
 
 export default {
   name: 'Dashboard',
+  props: {
+    isWhitelist: {
+      type: Boolean,
+      default() {
+        return false
+      }
+    }
+  },
   components: {
     Title,
     mPagination,

+ 10 - 1
src/views/searchSystem/components/DoctorOrderSearch.vue

@@ -64,7 +64,8 @@
             </span>
           </div>
-          <el-button class="title-left-btn" @click="funExport()">导出Excel</el-button>
+          <!-- 不登陆访问没有导出 -->
+          <el-button v-if="!isWhitelist" class="title-left-btn" @click="funExport()">导出Excel</el-button>
         </div>
       </div>
 
@@ -117,6 +118,14 @@ import mPagination from '@/components/m-pagination';
 
 export default {
   name: 'adviceSearch',
+  props: {
+    isWhitelist: {
+      type: Boolean,
+      default() {
+        return false
+      }
+    }
+  },
   components: {
     Title,
     mPagination,

+ 10 - 4
src/views/searchSystem/index.vue

@@ -3,16 +3,16 @@
     <div class="box_wrapper">
       <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane label="病历搜索" name="0">
-          <BLSearchVue v-if="activeName ==0" />
+          <BLSearchVue v-if="activeName ==0" :is-whitelist="isWhiteList" />
         </el-tab-pane>
         <el-tab-pane label="病案首页搜索" name="1">
-          <CaseHomeSearchVue v-if="activeName ==1" />
+          <CaseHomeSearchVue v-if="activeName ==1" :is-whitelist="isWhiteList" />
         </el-tab-pane>
         <el-tab-pane label="医嘱搜索" name="2">
-          <DoctorOrderSearchVue v-if="activeName ==2" />
+          <DoctorOrderSearchVue v-if="activeName ==2" :is-whitelist="isWhiteList" />
         </el-tab-pane>
       </el-tabs>
-      <el-button class="layout-btn" @click="onLayout">
+      <el-button v-if="!isWhiteList" class="layout-btn" @click="onLayout">
         退出
       </el-button>
     </div>
@@ -35,6 +35,12 @@ export default {
       activeName: '0',
     };
   },
+  computed: {
+    isWhiteList() {
+      // 判断是否不登录访问
+      return this.$route.path.includes('whitelist')
+    }
+  },
   methods: {
     handleClick(tab, event) {
       console.log(tab.name);