Эх сурвалжийг харах

恢复之前的改动,舍弃 858b3b1b 更改

cc12458 2 долоо хоног өмнө
parent
commit
d235553b07
1 өөрчлөгдсөн 56 нэмэгдсэн , 112 устгасан
  1. 56 112
      src/components/Header.vue

+ 56 - 112
src/components/Header.vue

@@ -1,35 +1,20 @@
 <template>
   <div>
     <div class="top-nav flex-vertical-between">
-      <div class="title flex-center" v-if="innerWidth > 768">
+      <div class="title flex-center" v-if="innerWidth>768">
         <img v-if="logo" :src="logo" alt />
-        {{ title }}
+        {{title}}
       </div>
       <div class="title flex-center" v-else>
         <img v-if="logo" :src="logo" alt />
-        {{ titleSplit[0] }}<br />{{ titleSplit[1] }}
+        {{titleSplit[0]}}<br />{{titleSplit[1]}}
       </div>
       <div v-if="ai_url">
         <AIModal :url="ai_url">
           <template #default="{ handle }">
-            <svg
-              @click="handle()"
-              class="ai"
-              viewBox="0 0 1024 1024"
-              version="1.1"
-              xmlns="http://www.w3.org/2000/svg"
-              xmlns:xlink="http://www.w3.org/1999/xlink"
-              width="32"
-              height="32"
-            >
-              <path
-                d="M501.824 32C303.552 32 141.504 176.992 141.504 357.76c0 23.712 2.816 47.104 8.32 69.856l-51.008 114.208a32 32 0 0 0 24.704 44.736c54.272 7.744 76.672 31.168 76.672 77.312v111.552a64 64 0 0 0 64 64h20.704a64 64 0 0 1 64 64V960a32 32 0 0 0 32 32h345.6a32 32 0 0 0 0-64h-313.6v-24.608a128 128 0 0 0-128-128h-20.736v-111.552c0-65.664-32.192-110.688-91.2-131.136l39.872-89.28a31.968 31.968 0 0 0 1.568-21.792 233.088 233.088 0 0 1-8.896-63.904c0-143.712 131.936-261.76 296.32-261.76s296.32 118.016 296.32 261.76a32 32 0 0 0 64 0C862.144 176.992 700.064 32 501.824 32zM904 448a32 32 0 0 0-32 32v360a32 32 0 0 0 64 0V480a32 32 0 0 0-32-32z"
-                fill="#ffffff"
-              ></path>
-              <path
-                d="M673.888 466.656c-11.744-25.568-48.416-24.64-58.816 1.536l-132.8 333.76a32 32 0 0 0 59.488 23.68l32.608-81.92c0.576 0.032 1.088 0.32 1.664 0.32h154.848l38.176 83.104a31.968 31.968 0 1 0 58.144-26.72l-153.312-333.76zM599.68 680l47.264-118.72 54.528 118.72H599.68z"
-                fill="#ffffff"
-              ></path>
+            <svg @click="handle()" class="ai" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32">
+              <path d="M501.824 32C303.552 32 141.504 176.992 141.504 357.76c0 23.712 2.816 47.104 8.32 69.856l-51.008 114.208a32 32 0 0 0 24.704 44.736c54.272 7.744 76.672 31.168 76.672 77.312v111.552a64 64 0 0 0 64 64h20.704a64 64 0 0 1 64 64V960a32 32 0 0 0 32 32h345.6a32 32 0 0 0 0-64h-313.6v-24.608a128 128 0 0 0-128-128h-20.736v-111.552c0-65.664-32.192-110.688-91.2-131.136l39.872-89.28a31.968 31.968 0 0 0 1.568-21.792 233.088 233.088 0 0 1-8.896-63.904c0-143.712 131.936-261.76 296.32-261.76s296.32 118.016 296.32 261.76a32 32 0 0 0 64 0C862.144 176.992 700.064 32 501.824 32zM904 448a32 32 0 0 0-32 32v360a32 32 0 0 0 64 0V480a32 32 0 0 0-32-32z" fill="#ffffff"></path>
+              <path d="M673.888 466.656c-11.744-25.568-48.416-24.64-58.816 1.536l-132.8 333.76a32 32 0 0 0 59.488 23.68l32.608-81.92c0.576 0.032 1.088 0.32 1.664 0.32h154.848l38.176 83.104a31.968 31.968 0 1 0 58.144-26.72l-153.312-333.76zM599.68 680l47.264-118.72 54.528 118.72H599.68z" fill="#ffffff"></path>
             </svg>
           </template>
         </AIModal>
@@ -40,21 +25,16 @@
                 </el-menu-item>
 
       </el-menu>-->
-      <div
-        class="main-menu flex flex-row-center flex-col-center"
-        v-if="navlist.length > 0"
-      >
+      <div class="main-menu flex flex-row-center flex-col-center" v-if="navlist.length>0">
         <div
-          :class="['menu-item', active == index ? 'active' : '']"
+          :class="['menu-item',active==index?'active':'']"
           @click="handleSelect1(index)"
-          v-for="(item, index) in navlist"
+          v-for="(item,index) in navlist"
           :key="index"
-        >
-          {{ item.title }}
-        </div>
+        >{{item.title}}</div>
       </div>
       <div class="admin">
-        <span class="name">{{ getuserinfo.username }}</span>
+        <span class="name">{{getuserinfo.username}}</span>
         <img src="../assets/down-header.png" alt class="icon" />
 
         <div class="hover-show">
@@ -62,16 +42,10 @@
 
                         <span>{{getuserinfo.username}}</span>
           </div>-->
-          <div
-            class="flex-center"
-            @click="$router.push({ path: '/index/help' })"
-          >
+          <div class="flex-center" @click="$router.push({path:'/index/help'})">
             <span>修改密码</span>
           </div>
-          <div
-            class="flex-center"
-            @click="$router.push({ path: '/index/help' })"
-          >
+          <div class="flex-center" @click="$router.push({path:'/index/help'})">
             <span>帮助</span>
           </div>
           <div class="flex-center" @click="logOut">
@@ -80,38 +54,31 @@
         </div>
       </div>
     </div>
-    <div class="header-bottom flex-center" v-if="navlist.length > 0">
+    <div class="header-bottom flex-center" v-if="navlist.length>0">
       <!-- <div class="left-nav-tip">主页/{{activeName}}</div> -->
-      <div class="left-nav-tip">
-        {{ navlist[active].title }}/{{ $route.meta.title }}
-      </div>
+      <div class="left-nav-tip">{{navlist[active].title}}/{{$route.meta.title}}</div>
       <!-- <div class="left-nav-tip">navlist[active].name/{{navlist[active].child}}</div> -->
       <div class="tab-bar flex-center">
         <div
-          v-for="(item, index) in navlist[active].list"
+          v-for="(item,index) in navlist[active].list"
           :key="index"
-          :class="item.id == activeID ? 'is-active' : ''"
-          @click="choose(item.id, item.jump, item.title)"
-        >
-          {{ item.title }}
-        </div>
+          :class="item.id==activeID?'is-active':''"
+          @click="choose(item.id,item.jump,item.title)"
+        >{{item.title}}</div>
       </div>
       <!-- 用户信息 -->
-      <div
-        class="user-info flex-column flex-center"
-        v-if="getPatiensInfo != null"
-      >
+      <div class="user-info flex-column flex-center" v-if="getPatiensInfo!=null  ">
         <div @click="patientIn" class="flex-vertical-center-r">
           <img src="../assets/h-avatar.png" alt />
-          <div v-if="Object.keys(getPatiensInfo).length > 0">
+          <div v-if=" Object.keys(getPatiensInfo).length>0">
             <span style="margin-right:27px;">
-              {{ getPatiensInfo.patientidSelsourceName }}&nbsp;&nbsp;
-              {{ getPatiensInfo.sex }}&nbsp;&nbsp;
-              {{ getPatiensInfo.basisPatient.age }}岁&nbsp;&nbsp;
-              {{ getPatiensInfo.pregnancy == 2 ? "妊娠期" : "" }}&nbsp;&nbsp;
-              {{ getPatiensInfo.breastfeeding == 1 ? "哺乳期" : "" }}
+              {{getPatiensInfo.patientidSelsourceName}}&nbsp;&nbsp;
+              {{getPatiensInfo.sex}}&nbsp;&nbsp;
+              {{getPatiensInfo.basisPatient.age}}岁&nbsp;&nbsp;
+              {{getPatiensInfo.pregnancy==2?'妊娠期':''}}&nbsp;&nbsp;
+              {{getPatiensInfo.breastfeeding==1?'哺乳期':''}}
             </span>
-            <div style="font-size:14px;">{{ getPatiensInfo.code }}</div>
+            <div style="font-size:14px;">{{getPatiensInfo.code}}</div>
           </div>
         </div>
         <!-- <div class="flex-vertical-center-r">
@@ -126,13 +93,13 @@
             <div
               class="seeRecord-item"
               @click="handleRecord(item)"
-              v-for="(item, index) in list"
+              v-for="(item,index) in list"
               :key="index"
             >
-              {{ item.timeStr }}
-              <span v-if="item.illnessName"
-                >{{ item.illnessName }}-{{ item.symptomType }}</span
-              >
+              {{item.timeStr}}
+              <span
+                v-if="item.illnessName"
+              >{{item.illnessName}}-{{item.symptomType}}</span>
             </div>
           </div>
           <div class="block flex flex-col-center flex-row-center">
@@ -169,12 +136,12 @@ import { getPatiensBasisM, getRecordDetail } from "@/api/diagnosis";
 import { getPatiensVisitList } from "@/api/patients.js";
 import pageProup from "@/components/Propup";
 import outpatientRecord from "@/components/ui/outpatientRecords";
-import AIModal from "@/components/AIModal.vue";
+import AIModal from '@/components/AIModal.vue';
 export default {
   components: {
     AIModal,
     pageProup,
-    outpatientRecord,
+    outpatientRecord
   },
   data() {
     return {
@@ -193,7 +160,7 @@ export default {
       page: 1,
       list: [],
       total: 0,
-      innerWidth: 1920,
+      innerWidth: 1920
     };
   },
   created() {
@@ -231,7 +198,7 @@ export default {
       this.activeName = this.navlist[index].list[0].title;
       if (this.navlist[index].list[0].jump == this.$route.path) return;
       this.$router.push({
-        path: this.navlist[index].list[0].jump,
+        path: this.navlist[index].list[0].jump
       });
     },
 
@@ -242,7 +209,7 @@ export default {
       this.setActiveID(id);
       if (path == this.$route.path) return;
       this.$router.push({
-        path: path,
+        path: path
       });
     },
     // 退出登录
@@ -256,7 +223,7 @@ export default {
       sessionStorage.clear();
 
       this.$router.replace({
-        path: "/",
+        path: "/"
       });
     },
     async getMenuPermiss() {
@@ -279,27 +246,9 @@ export default {
         //     type: "page",
         // })
 
-        // 在"药品目录管理"菜单后插入"非药物目录管理"
-        // res.Data.forEach(item => {
-        //   const drugListIdx = item.list.findIndex(m => m.jump === '/index/druglist');
-        //   if (drugListIdx !== -1) {
-        //     const drugListItem = item.list[drugListIdx];
-        //     const parentIdx = drugListItem.id.split('-')[0];
-        //     const newId = parentIdx + '-' + (item.list.length + 1);
-        //     const nondrugItem = {
-        //       id: newId,
-        //       jump: "/index/nondruglist",
-        //       name: "nondruglist",
-        //       title: "非药物目录管理",
-        //       type: "page",
-        //     };
-        //     item.list.splice(drugListIdx + 1, 0, nondrugItem);
-        //   }
-        // });
-        // console.log(res.Data, "导航菜单");
         this.navlist = res.Data;
         this.navlist.forEach((item, index) => {
-          item.list.forEach((item1) => {
+          item.list.forEach(item1 => {
             if (this.$route.path == item1.jump) {
               this.activeID = item1.id;
               this.activeName = item1.title;
@@ -316,14 +265,14 @@ export default {
           let obj = {
             index: String(index),
             name: item.title,
-            child: [],
+            child: []
           };
 
           item.list.forEach((item1, index1) => {
             let obj1 = {
               id: item1.id,
               name: item1.title,
-              path: item1.jump,
+              path: item1.jump
             };
 
             obj.child.push(obj1);
@@ -338,7 +287,7 @@ export default {
     // 获取患者己本信息
     async _getPatiensBasisM() {
       let res = await getPatiensBasisM({
-        patientId: this.getPatiensInfo.pid,
+        patientId: this.getPatiensInfo.pid
       });
       if (res.ResultCode == 0) {
         // res.Data.recordLength = res.Data.patientRecord.length;
@@ -350,7 +299,7 @@ export default {
     // 获取就诊详情
     async _getRecordDetail(id) {
       let res = await getRecordDetail({
-        id: id,
+        id: id
         // id: 'e68d293d-f1b7-4f6d-bed4-42b1aba6973e'
       });
       if (res.ResultCode == 0) {
@@ -365,7 +314,7 @@ export default {
       let res = await getPatiensVisitList({
         patientId: id,
         page: this.page,
-        limit: 11,
+        limit: 11
       });
       if (res.ResultCode == 0) {
         this.list = res.Data.Items;
@@ -376,8 +325,8 @@ export default {
       setActiveID: "nav/setActiveID",
       setActive: "nav/setActive",
       setPatiensInfo: "user/setPatiensInfo",
-      setUserinfo: "user/setUserinfo",
-    }),
+      setUserinfo: "user/setUserinfo"
+    })
   },
   watch: {
     $route: {
@@ -385,7 +334,7 @@ export default {
       immediate: true,
       handler: function(to, from) {
         this.navlist.forEach((item, index) => {
-          item.list.forEach((item1) => {
+          item.list.forEach(item1 => {
             if (to.path == item1.jump) {
               this.activeID = item1.id;
               this.activeName = item1.title;
@@ -401,7 +350,7 @@ export default {
         });
       },
       immediate: true,
-      deep: true,
+      deep: true
     },
 
     getPatiensInfo: {
@@ -412,30 +361,25 @@ export default {
         if (Object.keys(this.getPatiensInfo).length > 0) {
           this._getPatiensBasisM();
         }
-      },
+      }
     },
     getActiveID: {
       deep: true,
       immediate: true,
       handler: function() {
         this.activeID = this.getActiveID;
-      },
-    },
+      }
+    }
   },
   computed: {
     titleSplit() {
-      const suffix = `辅助诊疗系统`;
+      const suffix = `辅助诊疗系统`
       const values = this.title.split(suffix);
-      values[1] = values.length === 2 ? suffix + values[1] : "";
+      values[1] = values.length === 2 ? suffix + values[1] : '';
       return values;
     },
-    ...mapGetters([
-      "getuserinfo",
-      "getPatiensInfo",
-      "getActiveID",
-      "getActive",
-    ]),
-  },
+    ...mapGetters(["getuserinfo", "getPatiensInfo", "getActiveID", "getActive"])
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -779,4 +723,4 @@ export default {
     }
   }
 }
-</style>
+</style>