Pārlūkot izejas kodu

Merge branch 'release/20241231'

cc12458 1 gadu atpakaļ
vecāks
revīzija
99ab506378

+ 19 - 2
src/api/dataAnalysis.js

@@ -1,12 +1,29 @@
 import request from "@/utils/request.js"
 import request from "@/utils/request.js"
 // 获取医生工作量信息
 // 获取医生工作量信息
-export function getDoctorWork(data) {
+export function getDoctorWork({page, limit, ...data}) {
+    return request({
+        url: '/data/analysis/docDemCount',
+        method: 'post',
+        data,
+        params: {page, limit}
+    })
+}
+// 获取医生工作量信息
+export function getDoctorWorkChart(data) {
+    return request({
+        url: '/data/analysis/docDemReport',
+        method: 'post',
+        data,
+    })
+}
+// 医院使用分析
+export function getHospitalWork(data) {
     return request({
     return request({
         url: '/data/analysis/doctorWorkCount',
         url: '/data/analysis/doctorWorkCount',
         method: 'post',
         method: 'post',
         data
         data
     })
     })
-};
+}
 
 
 // 处方金额分析
 // 处方金额分析
 export function getRecipeMoney(data) {
 export function getRecipeMoney(data) {

+ 5 - 0
src/api/diagnosis.js

@@ -210,6 +210,11 @@ export function getPharmacyID(data) {
 
 
 // 切换药房 id
 // 切换药房 id
 export function changePharmacy(data) {
 export function changePharmacy(data) {
+    if (data && Array.isArray(data.drugIds) && data.drugIds.length === 0) return Promise.resolve({
+        "Data": [],
+        "ResultInfo": "操作成功",
+        "ResultCode": 0
+    });
     return request({
     return request({
         url: '/test/outpatient/changeDrug',
         url: '/test/outpatient/changeDrug',
         method: 'post',
         method: 'post',

+ 10 - 0
src/api/system.js

@@ -116,6 +116,16 @@ export function getDepartSelect(data) {
     })
     })
 };
 };
 
 
+// 获取医生选择器 列表
+export function getDoctorSelect(data) {
+    return request({
+        url: '/portal/userMgr/listPain',
+        method: 'post',
+        data,
+        params: {page: 1, limit: 999}
+    })
+}
+
 // 获取科室列表
 // 获取科室列表
 export function getDepartList(data) {
 export function getDepartList(data) {
     return request({
     return request({

+ 75 - 59
src/components/ChineseMedicine.vue

@@ -215,7 +215,7 @@
         <!-- 表格  -->
         <!-- 表格  -->
         <div class="table-show flex-plane-t-between flex-wrap">
         <div class="table-show flex-plane-t-between flex-wrap">
           <!-- 表一和表二 -->
           <!-- 表一和表二 -->
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2 + 1)}">
             <div class="table-left" v-if="true">
             <div class="table-left" v-if="true">
               <el-table
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData"
                 :data="recipe_tabs[recipe_tabs_c].tableData"
@@ -243,11 +243,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
 
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -312,10 +308,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -459,7 +452,7 @@
             </div>
             </div>
           </div>
           </div>
 
 
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2)}">
             <div class="table-left" v-if="true">
             <div class="table-left" v-if="true">
               <el-table
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData1"
                 :data="recipe_tabs[recipe_tabs_c].tableData1"
@@ -486,11 +479,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
 
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -555,10 +544,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -957,7 +943,7 @@
       </div>
       </div>
     </div>
     </div>
 
 
-    <popup
+    <popup class="accord-edit-wrapper"
       :showDialog="showDialog"
       :showDialog="showDialog"
       distanceTop="4vh"
       distanceTop="4vh"
       @cancle="showDialog=false"
       @cancle="showDialog=false"
@@ -1571,12 +1557,10 @@ export default {
         }
         }
       ];
       ];
       this.recipe_tabs[this.recipe_tabs_c].tableData1 = [];
       this.recipe_tabs[this.recipe_tabs_c].tableData1 = [];
-      this.recipe_tabs[this.recipe_tabs_c].radio = this.pharmacyTypes[0].ptype;
-      this.recipe_tabs[
-        this.recipe_tabs_c
-      ].lastType = this.pharmacyTypes[0].ptype;
-      let moneyMsg = this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg;
+      // this.recipe_tabs[this.recipe_tabs_c].radio = this.pharmacyTypes[0].ptype;
+      // this.recipe_tabs[this.recipe_tabs_c].lastType = this.pharmacyTypes[0].ptype;
       this.recipe_tabs[this.recipe_tabs_c].bottom_form = {
       this.recipe_tabs[this.recipe_tabs_c].bottom_form = {
+        ...this.recipe_tabs[this.recipe_tabs_c].bottom_form,
         preType: "", // 协定方的时候 切换 中药类型带入
         preType: "", // 协定方的时候 切换 中药类型带入
         disable: false, // 协定方 配方转方 为 true
         disable: false, // 协定方 配方转方 为 true
         doseNum: "",
         doseNum: "",
@@ -1592,8 +1576,8 @@ export default {
         timeList: [], // 服药时间后台数据
         timeList: [], // 服药时间后台数据
         caozuo: "",
         caozuo: "",
         zhutuo: "",
         zhutuo: "",
-        radio: 1,
-        isDaiJian: 2,
+        // radio: 1,
+        // isDaiJian: 2,
         provinceList: [],
         provinceList: [],
         cityList: [],
         cityList: [],
         areaList: [],
         areaList: [],
@@ -1608,8 +1592,6 @@ export default {
         nowRecipeMoney: 0, //单剂金额
         nowRecipeMoney: 0, //单剂金额
         nowRecipeMoney1: 0, //当前处方金额
         nowRecipeMoney1: 0, //当前处方金额
         allMoney: 0, // 合计金额
         allMoney: 0, // 合计金额
-
-        moneyMsg: moneyMsg // 价格数据
       };
       };
       this.nowRecipeMoney = 0;
       this.nowRecipeMoney = 0;
 
 
@@ -1804,13 +1786,9 @@ export default {
     // 表一 选中药品
     // 表一 选中药品
     chooseDis1(scope, index, item, from = "now") {
     chooseDis1(scope, index, item, from = "now") {
       let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
       let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
-      let isHas = false;
-      totalData.forEach(item1 => {
-        if (item1.medid === item.pid) {
-          isHas = true;
-        }
-      });
-      if (isHas) {
+      const i = totalData.findIndex(t => t.medid === item.pid);
+      const oneself = i === scope.row.id - 1;
+      if (i !== -1 && !oneself) {
         this.$message.warning("请勿重复添加药品");
         this.$message.warning("请勿重复添加药品");
         clearTimeout(medicineBlurTimer);
         clearTimeout(medicineBlurTimer);
         let index = scope.row.id ? scope.row.id - 1 : 0;
         let index = scope.row.id ? scope.row.id - 1 : 0;
@@ -1825,10 +1803,10 @@ export default {
         name: item.ypmc,
         name: item.ypmc,
         spec: item.gg, // 规格
         spec: item.gg, // 规格
         // dose: "", // 剂量
         // dose: "", // 剂量
-        dose: scope.row.color == "red" ? scope.row.dose : "",
+        dose: scope.row.color === "red" || oneself ? scope.row.dose : "",
         unit: item.dw, // 单位
         unit: item.dw, // 单位
         usage:
         usage:
-          scope.row.color == "red"
+          oneself ? scope.row.usage : scope.row.color === "red"
             ? this.usageList[0].key
             ? this.usageList[0].key
             : scope.row.usage || item.usagestr || this.usageList[0].key, // 用法
             : scope.row.usage || item.usagestr || this.usageList[0].key, // 用法
         //usage: "",
         //usage: "",
@@ -2022,10 +2000,10 @@ export default {
       let index = scope.row.id ? scope.row.id - 1 : 0;
       let index = scope.row.id ? scope.row.id - 1 : 0;
       // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
       // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
 
 
-      let ids = document.querySelectorAll("#operate2");
-      ids.forEach((item, index) => {
-        item.style["z-index"] = "auto";
-      });
+      // let ids = document.querySelectorAll("#operate2");
+      // ids.forEach((item, index) => {
+      //   item.style["z-index"] = "auto";
+      // });
       // if (e != '') {
       // if (e != '') {
       //     this.recipe_tabs[this.recipe_tabs_c].totalTableD[
       //     this.recipe_tabs[this.recipe_tabs_c].totalTableD[
       //         scope.row.id - 1
       //         scope.row.id - 1
@@ -2059,10 +2037,10 @@ export default {
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].key = "";
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].key = "";
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].showSearch = false;
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].showSearch = false;
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [];
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [];
-        let ids = document.querySelectorAll("#operate2");
-        ids.forEach((item, index) => {
-          item.style["z-index"] = "99";
-        });
+        // let ids = document.querySelectorAll("#operate2");
+        // ids.forEach((item, index) => {
+        //   item.style["z-index"] = "99";
+        // });
         this._splitDataToView();
         this._splitDataToView();
       }, 500);
       }, 500);
     },
     },
@@ -2620,7 +2598,15 @@ export default {
       }
       }
       setTimeout(() => {
       setTimeout(() => {
         const el = document.querySelectorAll(`#searchD${index+1}`)[0];
         const el = document.querySelectorAll(`#searchD${index+1}`)[0];
-        if (el) el.focus();
+        if (el) {
+          el.focus();
+          const container = document.querySelector(`.table-container`);
+          if (container) {
+            const _bottom = container.getBoundingClientRect().bottom;
+            const bottom = el.getBoundingClientRect().bottom;
+            if (bottom + 220 > _bottom) container.scrollTop += 220;
+          }
+        }
       }, 100);
       }, 100);
     },
     },
     // 获取省数据
     // 获取省数据
@@ -2836,6 +2822,16 @@ export default {
   }
   }
 };
 };
 </script>
 </script>
+<style lang="scss">
+.accord-edit-wrapper {
+  .popup-container {
+    display: flex;
+    flex-direction: column;
+    > div { flex: auto; }
+    > div.btns { flex: none; }
+  }
+}
+</style>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 @import "../style/common.scss";
 @import "../style/common.scss";
 
 
@@ -2891,14 +2887,24 @@ export default {
 }
 }
 
 
 #chineseM {
 #chineseM {
+  display: flex;
+  flex-direction: column;
   height: 100%;
   height: 100%;
   .table-container {
   .table-container {
-    padding: 5px 0px;
+    display: flex;
+    flex-direction: column;
+    //padding: 5px 0px;
+    height: 100%;
     // height: 340px;
     // height: 340px;
-    height: calc(100% - 80px);
+    //height: calc(100% - 80px);
     overflow: auto;
     overflow: auto;
 
 
     .t-con-header {
     .t-con-header {
+      position: sticky;
+      top: -1px;
+      z-index: 99;
+      background-color: #fff;
+      padding-top: 5px;
       margin-bottom: 0px;
       margin-bottom: 0px;
 
 
       .t-con-radio {
       .t-con-radio {
@@ -2931,21 +2937,29 @@ export default {
         cursor: pointer;
         cursor: pointer;
       }
       }
     }
     }
+    .table-msg {
+      flex: auto;
+      display: flex;
+      flex-direction: column;
+
+    }
   }
   }
 }
 }
 
 
 .table-show {
 .table-show {
+  flex: auto;
   width: 100%;
   width: 100%;
   // min-height: 212px;
   // min-height: 212px;
-  overflow: auto;
+  //overflow: auto;
 
 
   // background: #5386F6;
   // background: #5386F6;
   // overflow: hidden;
   // overflow: hidden;
-  z-index: 999;
+  //z-index: 999;
   position: relative;
   position: relative;
 
 
   .table-left-body {
   .table-left-body {
     width: 50%;
     width: 50%;
+    height: 100%;
     position: relative;
     position: relative;
     perspective: 100px;
     perspective: 100px;
     // padding-bottom: 10px;
     // padding-bottom: 10px;
@@ -2953,6 +2967,7 @@ export default {
 
 
   .table-left {
   .table-left {
     width: 100%;
     width: 100%;
+    height: 100%;
     overflow-y: auto;
     overflow-y: auto;
     border: 1px solid #dedede;
     border: 1px solid #dedede;
     box-sizing: border-box;
     box-sizing: border-box;
@@ -3010,7 +3025,7 @@ export default {
         height: 53px;
         height: 53px;
         line-height: 53px;
         line-height: 53px;
         border: 1px solid #dedede;
         border: 1px solid #dedede;
-        z-index: 9999;
+        //z-index: 9999;
         border-top: 0 !important;
         border-top: 0 !important;
       }
       }
 
 
@@ -3072,7 +3087,7 @@ export default {
   }
   }
 
 
   .table-choose {
   .table-choose {
-    z-index: 9999;
+    //z-index: 9999;
     width: 332px;
     width: 332px;
     height: 221px;
     height: 221px;
     background: #ffffff;
     background: #ffffff;
@@ -3126,7 +3141,7 @@ export default {
   padding: 0 10px;
   padding: 0 10px;
   // margin-top: 241px;
   // margin-top: 241px;
   margin-top: 5px;
   margin-top: 5px;
-  z-index: -1;
+  //z-index: -1;
 
 
   .header-about {
   .header-about {
     .item {
     .item {
@@ -3355,7 +3370,7 @@ export default {
   // perspective: 100px;
   // perspective: 100px;
 
 
   .dose-section {
   .dose-section {
-    z-index: 999999 !important;
+    //z-index: 999999 !important;
     position: fixed;
     position: fixed;
     width: 50px;
     width: 50px;
     //left: 136px;
     //left: 136px;
@@ -3375,16 +3390,16 @@ export default {
 }
 }
 
 
 .table-choose3 {
 .table-choose3 {
-  z-index: 999999 !important;
+  z-index: 99;
   // width: 332px;
   // width: 332px;
   width: 532px;
   width: 532px;
   height: 221px;
   height: 221px;
   background: #ffffff;
   background: #ffffff;
   border: 2px solid #d8d8d8;
   border: 2px solid #d8d8d8;
   position: fixed;
   position: fixed;
-  top: 44px;
+  //top: 44px;
   left: 84px;
   left: 84px;
-  margin-top: 19px;
+  //margin-top: 19px;
   overflow: auto;
   overflow: auto;
 
 
   .table-choose-h {
   .table-choose-h {
@@ -3454,6 +3469,7 @@ export default {
 
 
 .table-show::v-deep .el-table {
 .table-show::v-deep .el-table {
   // z-index: 999;
   // z-index: 999;
+  height: 100%;
 }
 }
 
 
 .table-show::v-deep .el-table th {
 .table-show::v-deep .el-table th {

+ 99 - 92
src/components/MedicineAccord.vue

@@ -44,14 +44,13 @@
         <!-- 表格  -->
         <!-- 表格  -->
         <div class="table-show flex-plane-t-between flex-wrap">
         <div class="table-show flex-plane-t-between flex-wrap">
           <!-- 表一和表二 -->
           <!-- 表一和表二 -->
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2 + 1)}">
             <div class="table-left" v-if="true">
             <div class="table-left" v-if="true">
               <el-table
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData"
                 :data="recipe_tabs[recipe_tabs_c].tableData"
                 style="width:100%;"
                 style="width:100%;"
                 :span-method="arraySpanMethod1"
                 :span-method="arraySpanMethod1"
                 id="table1"
                 id="table1"
-                height="500px"
               >
               >
                 <el-table-column prop="id" label width="20">
                 <el-table-column prop="id" label width="20">
                   <template slot-scope="scope">
                   <template slot-scope="scope">
@@ -73,11 +72,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
 
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -142,10 +137,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -289,13 +281,12 @@
             </div>
             </div>
           </div>
           </div>
 
 
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2)}">
             <div class="table-left" v-if="true">
             <div class="table-left" v-if="true">
               <el-table
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData1"
                 :data="recipe_tabs[recipe_tabs_c].tableData1"
                 :span-method="arraySpanMethod1"
                 :span-method="arraySpanMethod1"
                 id="table1"
                 id="table1"
-                height="500px"
               >
               >
                 <el-table-column prop="id" label width="20">
                 <el-table-column prop="id" label width="20">
                   <template slot-scope="scope">
                   <template slot-scope="scope">
@@ -317,11 +308,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
 
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -386,10 +373,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
                             <div class="flex-center">规格</div>
@@ -1289,13 +1273,9 @@ export default {
     },// 表一 选中药品
     },// 表一 选中药品
     chooseDis1(scope, index, item, from = "now") {
     chooseDis1(scope, index, item, from = "now") {
       let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
       let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
-      let isHas = false;
-      totalData.forEach(item1 => {
-        if (item1.medid === item.pid) {
-          isHas = true;
-        }
-      });
-      if (isHas) {
+      const i = totalData.findIndex(t => t.medid === item.pid);
+      const oneself = i === scope.row.id - 1;
+      if (i !== -1 && !oneself) {
         this.$message.warning("请勿重复添加药品");
         this.$message.warning("请勿重复添加药品");
         clearTimeout(medicineBlurTimer);
         clearTimeout(medicineBlurTimer);
         let index = scope.row.id ? scope.row.id - 1 : 0;
         let index = scope.row.id ? scope.row.id - 1 : 0;
@@ -1310,10 +1290,10 @@ export default {
         name: item.ypmc,
         name: item.ypmc,
         spec: item.gg, // 规格
         spec: item.gg, // 规格
         // dose: "", // 剂量
         // dose: "", // 剂量
-        dose: scope.row.color == "red" ? scope.row.dose : "",
+        dose: scope.row.color === "red" || oneself ? scope.row.dose : "",
         unit: item.dw, // 单位
         unit: item.dw, // 单位
         usage:
         usage:
-          scope.row.color == "red"
+          oneself ? scope.row.usage : scope.row.color === "red"
             ? this.usageList[0].key
             ? this.usageList[0].key
             : scope.row.usage || item.usagestr || this.usageList[0].key, // 用法
             : scope.row.usage || item.usagestr || this.usageList[0].key, // 用法
         //usage: "",
         //usage: "",
@@ -1485,9 +1465,9 @@ export default {
       // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
       // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
 
 
       let ids = document.querySelectorAll(".medicine-editor-wrapper #operate2");
       let ids = document.querySelectorAll(".medicine-editor-wrapper #operate2");
-      ids.forEach((item, index) => {
-        item.style["z-index"] = "auto";
-      });
+      // ids.forEach((item, index) => {
+      //   item.style["z-index"] = "auto";
+      // });
       // if (e != '') {
       // if (e != '') {
       //     this.recipe_tabs[this.recipe_tabs_c].totalTableD[
       //     this.recipe_tabs[this.recipe_tabs_c].totalTableD[
       //         scope.row.id - 1
       //         scope.row.id - 1
@@ -1522,9 +1502,9 @@ export default {
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].showSearch = false;
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].showSearch = false;
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [];
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [];
         let ids = document.querySelectorAll("#operate2");
         let ids = document.querySelectorAll("#operate2");
-        ids.forEach((item, index) => {
-          item.style["z-index"] = "99";
-        });
+        // ids.forEach((item, index) => {
+        //   item.style["z-index"] = "99";
+        // });
         this._splitDataToView();
         this._splitDataToView();
       }, 500);
       }, 500);
     },
     },
@@ -2073,8 +2053,15 @@ export default {
       }
       }
       setTimeout(() => {
       setTimeout(() => {
         const el = document.querySelectorAll(`.medicine-editor-wrapper #searchD${index+1}`)[0];
         const el = document.querySelectorAll(`.medicine-editor-wrapper #searchD${index+1}`)[0];
-        console.log(el);
-        if (el) el.focus();
+        if (el) {
+          el.focus();
+          const container = document.querySelector(`.popup-container`) || document.querySelector(`.second-view`)
+          if (container) {
+            const _bottom = container.getBoundingClientRect().bottom;
+            const bottom = el.getBoundingClientRect().bottom;
+            if (bottom + 220 > _bottom) container.scrollTop += 220;
+          }
+        }
       }, 100);
       }, 100);
     },
     },
     // 获取省数据
     // 获取省数据
@@ -2272,6 +2259,55 @@ export default {
 };
 };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.medicine-editor-wrapper {
+  height: 100%;
+}
+.table-container {
+  display: flex;
+  flex-direction: column;
+  padding: 5px 0px;
+  height: 100%;
+
+  .t-con-header {
+    flex: none;
+    margin-bottom: 0px;
+
+    .t-con-radio {
+      flex: 1;
+      padding-bottom: 5px;
+      border-bottom: 1px solid #eaeaea;
+    }
+
+    .t-radio-title {
+      width: 82px;
+      font-size: 16px;
+      font-family: PingFang SC;
+      font-weight: 400;
+      color: #333333;
+    }
+
+    .t-radio-group {
+      flex: 1;
+    }
+
+    .add-presc1 {
+      width: 84px;
+      height: 34px;
+      background: #ffae45;
+      border-radius: 4px;
+      font-size: 14px;
+      font-family: PingFang SC;
+      font-weight: bold;
+      color: #ffffff;
+      cursor: pointer;
+    }
+  }
+  .table-msg {
+    flex: auto;
+  }
+}
+</style>
+<style lang="scss" scoped>
 @import "../style/common.scss";
 @import "../style/common.scss";
 
 
 .table-header {
 .table-header {
@@ -2325,69 +2361,29 @@ export default {
   margin-right: 10px;
   margin-right: 10px;
 }
 }
 
 
-#chineseM {
-  height: 100%;
-  .table-container {
-    padding: 5px 0px;
-    // height: 340px;
-    height: calc(100% - 80px);
-    overflow: auto;
-
-    .t-con-header {
-      margin-bottom: 0px;
-
-      .t-con-radio {
-        flex: 1;
-        padding-bottom: 5px;
-        border-bottom: 1px solid #eaeaea;
-      }
-
-      .t-radio-title {
-        width: 82px;
-        font-size: 16px;
-        font-family: PingFang SC;
-        font-weight: 400;
-        color: #333333;
-      }
-
-      .t-radio-group {
-        flex: 1;
-      }
-
-      .add-presc1 {
-        width: 84px;
-        height: 34px;
-        background: #ffae45;
-        border-radius: 4px;
-        font-size: 14px;
-        font-family: PingFang SC;
-        font-weight: bold;
-        color: #ffffff;
-        cursor: pointer;
-      }
-    }
-  }
-}
-
 .table-show {
 .table-show {
   width: 100%;
   width: 100%;
+  height: 100%;
   // min-height: 212px;
   // min-height: 212px;
-  overflow: auto;
+  //overflow: auto;
 
 
   // background: #5386F6;
   // background: #5386F6;
   // overflow: hidden;
   // overflow: hidden;
-  z-index: 999;
+  //z-index: 999;
   position: relative;
   position: relative;
 
 
   .table-left-body {
   .table-left-body {
     width: 50%;
     width: 50%;
+    height: 100%;
     position: relative;
     position: relative;
+    z-index: 0;
     perspective: 100px;
     perspective: 100px;
     // padding-bottom: 10px;
     // padding-bottom: 10px;
   }
   }
 
 
   .table-left {
   .table-left {
     width: 100%;
     width: 100%;
+    height: 100%;
     overflow-y: auto;
     overflow-y: auto;
     border: 1px solid #dedede;
     border: 1px solid #dedede;
     box-sizing: border-box;
     box-sizing: border-box;
@@ -2445,7 +2441,7 @@ export default {
         height: 53px;
         height: 53px;
         line-height: 53px;
         line-height: 53px;
         border: 1px solid #dedede;
         border: 1px solid #dedede;
-        z-index: 9999;
+        //z-index: 9999;
         border-top: 0 !important;
         border-top: 0 !important;
       }
       }
 
 
@@ -2507,7 +2503,7 @@ export default {
   }
   }
 
 
   .table-choose {
   .table-choose {
-    z-index: 9999;
+    //z-index: 9999;
     width: 332px;
     width: 332px;
     height: 221px;
     height: 221px;
     background: #ffffff;
     background: #ffffff;
@@ -2561,7 +2557,7 @@ export default {
   padding: 0 10px;
   padding: 0 10px;
   // margin-top: 241px;
   // margin-top: 241px;
   margin-top: 5px;
   margin-top: 5px;
-  z-index: -1;
+  //z-index: -1;
 
 
   .header-about {
   .header-about {
     .item {
     .item {
@@ -2790,7 +2786,7 @@ export default {
   // perspective: 100px;
   // perspective: 100px;
 
 
   .dose-section {
   .dose-section {
-    z-index: 999999 !important;
+    //z-index: 999999 !important;
     position: fixed;
     position: fixed;
     width: 50px;
     width: 50px;
     left: 136px;
     left: 136px;
@@ -2809,16 +2805,16 @@ export default {
 }
 }
 
 
 .table-choose3 {
 .table-choose3 {
-  z-index: 999999 !important;
+  z-index: 99;
   // width: 332px;
   // width: 332px;
   width: 532px;
   width: 532px;
   height: 221px;
   height: 221px;
   background: #ffffff;
   background: #ffffff;
   border: 2px solid #d8d8d8;
   border: 2px solid #d8d8d8;
   position: fixed;
   position: fixed;
-  top: 44px;
+  //top: 32px;
   left: 84px;
   left: 84px;
-  margin-top: 19px;
+  //margin-top: 19px;
   overflow: auto;
   overflow: auto;
 
 
   .table-choose-h {
   .table-choose-h {
@@ -2888,6 +2884,17 @@ export default {
 
 
 .table-show::v-deep .el-table {
 .table-show::v-deep .el-table {
   // z-index: 999;
   // z-index: 999;
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+
+  .el-table__header-wrapper {
+    flex: none;
+  }
+  .el-table__body-wrapper {
+    flex: auto;
+    min-height: 221px;
+  }
 }
 }
 
 
 .table-show::v-deep .el-table th {
 .table-show::v-deep .el-table th {

+ 17 - 1
src/router/dataAnalysis.js

@@ -3,7 +3,23 @@ export default [{
     name: 'doctorWork',
     name: 'doctorWork',
     component: () => import('@/views/dataAnalysis/DoctorWork.vue'),
     component: () => import('@/views/dataAnalysis/DoctorWork.vue'),
     meta: {
     meta: {
-        title: '医生工作量分析',
+        title: '医生工作量数据',
+        pftitle: '数据分析'
+    }
+}, {
+    path: 'doctorWorkChart',
+    name: 'doctorWorkChart',
+    component: () => import('@/views/dataAnalysis/DoctorWorkChart.vue'),
+    meta: {
+        title: '医生工作量图表',
+        pftitle: '数据分析'
+    }
+}, {
+    path: 'hospitalWork',
+    name: 'hospitalWork',
+    component: () => import('@/views/dataAnalysis/HospitalWork.vue'),
+    meta: {
+        title: '医院使用分析',
         pftitle: '数据分析'
         pftitle: '数据分析'
     }
     }
 }, {
 }, {

+ 11 - 11
src/style/media/diagnosis/prescribing.scss

@@ -20,11 +20,11 @@
     ::v-deep {
     ::v-deep {
       #chineseM{
       #chineseM{
         .table-msg{
         .table-msg{
-          height: calc(100% - 25px);
-          overflow: auto;
+          //height: calc(100% - 25px);
+          //overflow: auto;
         }
         }
         .table-show {
         .table-show {
-          min-height: calc(100% - 80px);
+          //min-height: calc(100% - 80px);
         }
         }
       }
       }
 
 
@@ -100,8 +100,8 @@
   // 中药
   // 中药
   .prescribing ::v-deep .table-container {
   .prescribing ::v-deep .table-container {
     // height: 659px !important;
     // height: 659px !important;
-    height: calc(100% - 80px) !important;
-    overflow: auto;
+    //height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
   }
 
 
    .prescribing ::v-deep .med-accord .table-container{
    .prescribing ::v-deep .med-accord .table-container{
@@ -131,8 +131,8 @@
   // 中药
   // 中药
   .prescribing ::v-deep .table-container {
   .prescribing ::v-deep .table-container {
     // height: 519px !important;
     // height: 519px !important;
-     height: calc(100% - 80px) !important;
-    overflow: auto;
+    // height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
   }
 
 
    .prescribing ::v-deep .med-accord .table-container{
    .prescribing ::v-deep .med-accord .table-container{
@@ -162,8 +162,8 @@
   // 中药
   // 中药
   .prescribing ::v-deep .table-container {
   .prescribing ::v-deep .table-container {
     // height: 394px !important;
     // height: 394px !important;
-     height: calc(100% - 80px) !important;
-    overflow: auto;
+    // height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
   }
 
 
    .prescribing ::v-deep .med-accord .table-container{
    .prescribing ::v-deep .med-accord .table-container{
@@ -199,8 +199,8 @@
    // 中药
    // 中药
   .prescribing ::v-deep .table-container {
   .prescribing ::v-deep .table-container {
     // height: 394px !important;
     // height: 394px !important;
-     height: calc(100% - 80px) !important;
-    overflow: auto;
+    // height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
   }
 
 
   
   

+ 31 - 0
src/utils/format.js

@@ -97,4 +97,35 @@ export function numberToUpperCase(textIndex) {
         newString += sum(newTextIndex.substring(i, i + 1), i);
         newString += sum(newTextIndex.substring(i, i + 1), i);
     }
     }
     return newString;
     return newString;
+}
+
+export function formatMonth(date) {
+    if (!date) return '';
+    if (typeof date === 'number') date = new Date(date);
+    const year = date.getFullYear(); // 获取年份
+    const month = date.getMonth() + 1; // 获取月份,月份是从0开始的,所以需要加1
+    const formattedMonth = month < 10 ? '0' + month : month; // 如果月份小于10,前面补0
+
+    return `${year}-${formattedMonth}`; // 返回格式化后的字符串
+}
+
+export function subtractMonths(value, date = new Date()) {
+    // 获取原始日期的年、月、日
+    const year = date.getFullYear();
+    const month = date.getMonth();
+    const day = date.getDate();
+
+    let _month = month - Math.abs(value);
+    const _year =  year + Math.floor((_month - (month + 1)) / 12);
+
+    _month = _month - Math.floor((_month - (month + 1)) / 12) * 12;
+
+    // 处理月份天数不足的情况,比如1月31日加1个月不能是2月31日
+    let _date = new Date(_year, _month, day);
+    if (_date.getMonth() !== _month) {
+        const _day = Math.min(day, new Date(_year, _month + 1, 0).getDate());
+        _date = new Date(_year, _month, _day);
+    }
+
+    return _date;
 }
 }

+ 6 - 23
src/utils/minix/prescribing.js

@@ -113,7 +113,8 @@ export default {
         },
         },
         // 我的协定方转方
         // 我的协定方转方
         agreeTurnRecipe(agreeInfo) {
         agreeTurnRecipe(agreeInfo) {
-            this.turnRecipe2(agreeInfo)
+            // this.turnRecipe2(agreeInfo)
+            this.transposition({...agreeInfo, medicine: agreeInfo.preStiDetails, __RecipeFrom__: '2'});
 
 
             if (agreeInfo.diseaseid) {
             if (agreeInfo.diseaseid) {
                 this.$refs.TCM.setParams({
                 this.$refs.TCM.setParams({
@@ -170,28 +171,10 @@ export default {
         },
         },
         // 提交地址信息
         // 提交地址信息
         submitAddress() {
         submitAddress() {
-            this.showAddress = false
-            return
-            let zhongPrescriptionVo = this.dealRecipe1();
-            let chengPrescriptionVo = {};
-            setTimeout(() => {
-                chengPrescriptionVo = this.dealRecipe2();
-            }, 100);
-            let technologyPrescriptionVo = {};
-            setTimeout(() => {
-                technologyPrescriptionVo = this.dealRecipe3();
-            }, 200);
-            setTimeout(() => {
-
-
-                this._getRecipePriview(
-                    zhongPrescriptionVo,
-                    chengPrescriptionVo,
-                    technologyPrescriptionVo
-                );
-
-
-            }, 500);
+            const model = this.$refs.medAdress.form;
+            this.psChange(model.iskD)
+            this.djChange(model.isDaiJian)
+            this.showAddress = false;
         },
         },
         // 获取医保规则最大/最小药味数
         // 获取医保规则最大/最小药味数
         async getMaxMinDoaseNumber() {
         async getMaxMinDoaseNumber() {

+ 17 - 0
src/views/business/Accord.vue

@@ -28,6 +28,15 @@
             </el-select>
             </el-select>
           </div>
           </div>
         </div>
         </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>是否统建处方:</span>
+          <div class="input">
+            <el-select size="mini" placeholder="请选择" v-model="form.purposeType" clearable>
+              <el-option label="是" value="1"></el-option>
+              <el-option label="否" value="0"></el-option>
+            </el-select>
+          </div>
+        </div>
 
 
         <el-button type="primary" size="mini" @click="search()">搜索</el-button>
         <el-button type="primary" size="mini" @click="search()">搜索</el-button>
         <el-button type="warning" size="mini" @click="clearFilter()">清空</el-button>
         <el-button type="warning" size="mini" @click="clearFilter()">清空</el-button>
@@ -56,6 +65,7 @@
             <el-table-column prop="name" label="方名" align="center" width="120"></el-table-column>
             <el-table-column prop="name" label="方名" align="center" width="120"></el-table-column>
             <el-table-column prop="createName" label="创建者" align="center" width="120"></el-table-column>
             <el-table-column prop="createName" label="创建者" align="center" width="120"></el-table-column>
             <el-table-column prop="drugName" label="药品信息" align="center"></el-table-column>
             <el-table-column prop="drugName" label="药品信息" align="center"></el-table-column>
+            <el-table-column prop="provenance" label="处方出处" align="center" width="180"></el-table-column>
             <el-table-column prop="state" label="共享状态" width="100" align="center">
             <el-table-column prop="state" label="共享状态" width="100" align="center">
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <div>{{scope.row.rangState==0?'个人':scope.row.rangState==1?'二级科室':scope.row.rangState==2?'科室':'医疗机构'}}</div>
                 <div>{{scope.row.rangState==0?'个人':scope.row.rangState==1?'二级科室':scope.row.rangState==2?'科室':'医疗机构'}}</div>
@@ -66,6 +76,11 @@
                 <div>{{scope.row.type==0?'是':'否'}}</div>
                 <div>{{scope.row.type==0?'是':'否'}}</div>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
+            <el-table-column prop="type" label="统建处方" width="100" align="center">
+              <template slot-scope="scope">
+                <div>{{scope.row.purposeType === '1' ? '是' : '否'}}</div>
+              </template>
+            </el-table-column>
 
 
             <el-table-column label="操作" align="center" width="200">
             <el-table-column label="操作" align="center" width="200">
               <template slot-scope="scope">
               <template slot-scope="scope">
@@ -105,6 +120,7 @@ export default {
       form: {
       form: {
         efficacy: "", // 功效
         efficacy: "", // 功效
         name: "",
         name: "",
+        purposeType: "", // 用途类型 1 八病九方
         type: "" // 类别
         type: "" // 类别
       },
       },
       page: 1,
       page: 1,
@@ -176,6 +192,7 @@ export default {
         page: this.page,
         page: this.page,
         limit: this.limit
         limit: this.limit
       };
       };
+      if (this.form.purposeType) params.purposeType = this.form.purposeType;
       let res = await getAccordList(params);
       let res = await getAccordList(params);
       if (res.ResultCode == 0) {
       if (res.ResultCode == 0) {
         this.tableData = res.Data.Items;
         this.tableData = res.Data.Items;

+ 82 - 36
src/views/business/AccordEdit.vue

@@ -1,16 +1,16 @@
 <template>
 <template>
   <div class="accordEdit">
   <div class="accordEdit">
     <!-- <div class="flex-center back" @click="$router.back()" v-if='showBtn'>返回</div> -->
     <!-- <div class="flex-center back" @click="$router.back()" v-if='showBtn'>返回</div> -->
-    <div>
+    <div class="sticky" v-if="showBtn">
       <el-button size="mini" type="primary" @click="$router.back()" v-if="showBtn">返回</el-button>
       <el-button size="mini" type="primary" @click="$router.back()" v-if="showBtn">返回</el-button>
       <el-button
       <el-button
         size="mini"
         size="mini"
         type="warning"
         type="warning"
-        v-if="(type=='edit' &&showBtn) || (type=='add' && showBtn)"
+        v-if="type === 'edit' || type === 'add'"
         @click="save()"
         @click="save()"
       >保存</el-button>
       >保存</el-button>
     </div>
     </div>
-    <div class="flex-vertical-center-l flex-wrap topForm">
+    <div class="flex-vertical-center-l flex-wrap">
       <div class="item flex-vertical-center-l">
       <div class="item flex-vertical-center-l">
         <span>*</span>
         <span>*</span>
         <div class="name">方名:</div>
         <div class="name">方名:</div>
@@ -54,6 +54,20 @@
           </el-select>
           </el-select>
         </div>
         </div>
       </div>
       </div>
+      <div class="item flex-vertical-center-l">
+        <span></span>
+        <div class="name">处方出处:</div>
+        <div class="input">
+          <el-input size="mini" v-model="form.provenance" placeholder="请输入" :disabled="type=='find'"></el-input>
+        </div>
+      </div>
+      <div class="item flex-vertical-center-l" v-if="showPurposeType">
+        <span></span>
+        <div class="name"></div>
+        <div class="input">
+          <el-checkbox size="mini" :value="form.purposeType === '1'" @change="form.purposeType = $event ? '1' : '0'">统建处方</el-checkbox>
+        </div>
+      </div>
     </div>
     </div>
 
 
     <div class="bottom">
     <div class="bottom">
@@ -100,6 +114,28 @@
           </el-select>
           </el-select>
         </div>
         </div>
       </div>
       </div>
+      <div class="item flex-vertical-center-l" v-if="form.doseType=='0'">
+        <span></span>
+        <div class="name">浓煎每次:</div>
+        <div class="input">
+          <el-select
+            size="small"
+            v-model="form.nongjian"
+            placeholder="请选择"
+            :disabled="type=='find'"
+          >
+            <el-option label="50ml" value="50"></el-option>
+            <el-option label="100ml" value="100"></el-option>
+            <el-option label="150ml" value="150"></el-option>
+            <el-option label="200ml" value="200"></el-option>
+            <el-option label="250ml" value="250"></el-option>
+            <el-option label="300ml" value="300"></el-option>
+            <el-option label="400ml" value="400"></el-option>
+            <el-option label="500ml" value="500"></el-option>
+            <el-option label="1000ml" value="1000"></el-option>
+          </el-select>
+        </div>
+      </div>
       <div class="item flex-vertical-center-l" v-if="form.doseType=='1'">
       <div class="item flex-vertical-center-l" v-if="form.doseType=='1'">
         <span></span>
         <span></span>
         <div class="name">每次:</div>
         <div class="name">每次:</div>
@@ -174,6 +210,11 @@ export default {
     MedicineAccord,
     MedicineAccord,
     TCMDiagnosis
     TCMDiagnosis
   },
   },
+  computed: {
+    showPurposeType() {
+      return this.showBtn
+    }
+  },
   data() {
   data() {
     return {
     return {
       shareSelect: [], // 共享至选择器
       shareSelect: [], // 共享至选择器
@@ -199,6 +240,8 @@ export default {
         type: "", // 处方类型
         type: "", // 处方类型
         share: "", // 共享至
         share: "", // 共享至
         efficacy: "", // 功效
         efficacy: "", // 功效
+        provenance: "", // 处方出处
+        purposeType: "0", // 用途类型 1 八病九方
 
 
         times: "", // 频次
         times: "", // 频次
         recipeUse: "", // 处方用法
         recipeUse: "", // 处方用法
@@ -301,33 +344,33 @@ export default {
         return;
         return;
       }
       }
 
 
-      let tcmdParams = this.$refs.tcmd.getParams();
-      if (tcmdParams.namemedicine == "") {
+      // let tcmdParams = this.$refs.tcmd.getParams();
+      /*if (tcmdParams.namemedicine == "") {
         this.$message({
         this.$message({
           type: "error",
           type: "error",
           message: "请输入病名",
           message: "请输入病名",
           showClose: true
           showClose: true
         });
         });
         return;
         return;
-      }
+      }*/
 
 
-      if (tcmdParams.syndrometypes == "") {
+      /*if (tcmdParams.syndrometypes == "") {
         this.$message({
         this.$message({
           type: "error",
           type: "error",
           message: "请输入证型",
           message: "请输入证型",
           showClose: true
           showClose: true
         });
         });
         return;
         return;
-      }
+      }*/
 
 
-      if (tcmdParams.treatment == "") {
+      /*if (tcmdParams.treatment == "") {
         this.$message({
         this.$message({
           type: "error",
           type: "error",
           message: "请输入治法",
           message: "请输入治法",
           showClose: true
           showClose: true
         });
         });
         return;
         return;
-      }
+      }*/
 
 
       this.addAccordData();
       this.addAccordData();
     },
     },
@@ -395,6 +438,7 @@ export default {
           page: 1,
           page: 1,
           loadMore: true,
           loadMore: true,
           usageList: this.useList,
           usageList: this.useList,
+          color: item1.color || '',
           id: item1.seqn || item1.id,
           id: item1.seqn || item1.id,
           name: item1.drugname || item1.name,
           name: item1.drugname || item1.name,
           spec: item1.specification || item1.spec, // 规格
           spec: item1.specification || item1.spec, // 规格
@@ -439,16 +483,13 @@ export default {
 
 
         let data1 = children[0];
         let data1 = children[0];
 
 
+        data1.changePharmacy(
+          data1.recipe_tabs[data1.recipe_tabs_c].lastType,
+          type
+        );
         data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = this.totalTableD;
         data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = this.totalTableD;
         data1.recipe_tabs[data1.recipe_tabs_c].tableData = this.tableData;
         data1.recipe_tabs[data1.recipe_tabs_c].tableData = this.tableData;
         data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = this.tableData1;
         data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = this.tableData1;
-
-        setTimeout(() => {
-          data1.changePharmacy(
-            data1.recipe_tabs[data1.recipe_tabs_c].lastType,
-            type
-          );
-        }, 500);
       }, 1000);
       }, 1000);
     },
     },
 
 
@@ -585,7 +626,10 @@ export default {
         markfree,
         markfree,
         curetype: this.form.doseType,
         curetype: this.form.doseType,
         density: this.form.nongjian,
         density: this.form.nongjian,
+        strongFried: this.form.nongjian, //浓煎
         effect: this.form.efficacy,
         effect: this.form.efficacy,
+        provenance: this.showPurposeType ? this.form.provenance : '0',
+        purposeType: this.form.purposeType,
         frequency: this.form.times,
         frequency: this.form.times,
         name: this.form.name,
         name: this.form.name,
         pinyincode: this.form.pinyin,
         pinyincode: this.form.pinyin,
@@ -655,6 +699,8 @@ export default {
               ? res.Data.rangTypeName
               ? res.Data.rangTypeName
               : res.Data.rangtype,
               : res.Data.rangtype,
           efficacy: res.Data.effect, // 功效
           efficacy: res.Data.effect, // 功效
+          provenance: res.Data.provenance, // 处方出处
+          purposeType: res.Data.purposeType, // 用途类型 1 八病九方
           // wubi: res.Data.wubicode, // 五笔
           // wubi: res.Data.wubicode, // 五笔
           // pinyin: res.Data.pinyincode, // 拼音
           // pinyin: res.Data.pinyincode, // 拼音
           times: res.Data.frequency, // 频次
           times: res.Data.frequency, // 频次
@@ -683,6 +729,25 @@ export default {
 };
 };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.accordEdit {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  > div { flex: none; }
+  > div.bottom { flex: auto; }
+  
+  .sticky {
+    position: sticky;
+    top: -6px;
+    width: 100%;
+    background-color: #fff;
+    z-index: 11;
+    padding-bottom: 5px;
+    margin-bottom: 5px;
+  }
+}
+</style>
+<style lang="scss" scoped>
 @import "../../style/common.scss";
 @import "../../style/common.scss";
 
 
 .accordEdit {
 .accordEdit {
@@ -690,22 +755,6 @@ export default {
   background: #ffffff;
   background: #ffffff;
   border-radius: 5px;
   border-radius: 5px;
   box-sizing: border-box;
   box-sizing: border-box;
-  height: 99%;
-  overflow: auto;
-
-  .back {
-    width: 74px;
-    height: 36px;
-    background: #5386f6;
-    border-radius: 4px;
-    font-size: 14px;
-    font-family: PingFang SC;
-    font-weight: 400;
-    color: #ffffff;
-    margin-bottom: 49px;
-    cursor: pointer;
-  }
-
   .item {
   .item {
     font-size: 14px;
     font-size: 14px;
     font-family: PingFang SC;
     font-family: PingFang SC;
@@ -728,8 +777,5 @@ export default {
   .topForm {
   .topForm {
     margin-top: 10px;
     margin-top: 10px;
   }
   }
-
-  .bottom {
-  }
 }
 }
 </style>
 </style>

+ 306 - 542
src/views/dataAnalysis/DoctorWork.vue

@@ -1,508 +1,243 @@
 <template>
 <template>
-  <div class="doctorWork">
+  <div class="druglist">
     <!-- 顶部筛选 -->
     <!-- 顶部筛选 -->
     <div class="screening">
     <div class="screening">
       <div class="screening-title flex-vertical-center-l">
       <div class="screening-title flex-vertical-center-l">
-        <span></span>
-        <div>筛选</div>
+        <img src="~@/assets/filters.png" alt/>
       </div>
       </div>
       <div class="screening-form flex-vertical-center-l flex-wrap">
       <div class="screening-form flex-vertical-center-l flex-wrap">
         <div class="screening-item flex-vertical-center-l">
         <div class="screening-item flex-vertical-center-l">
-          <span>年度:</span>
-          <div class="input">
-            <el-date-picker
-              size="mini"
-              @change="yearBlur"
-              v-model="form.year"
-              type="year"
-              placeholder="选择年"
-              :clearable="false"
-            ></el-date-picker>
+          <div class="input" style="display: flex;">
+            <el-date-picker size="mini" v-model="start" type="month" placeholder="起始年月"
+                            :picker-options="startPickerOptions" format="yyyy-MM"></el-date-picker>
+            <el-date-picker size="mini" v-model="end" type="month" placeholder="结束年月"
+                            :picker-options="endPickerOptions" format="yyyy-MM"></el-date-picker>
           </div>
           </div>
         </div>
         </div>
         <div class="screening-item flex-vertical-center-l">
         <div class="screening-item flex-vertical-center-l">
-          <span>月度:</span>
+          <span>医疗机构名称:</span>
           <div class="input">
           <div class="input">
-            <el-date-picker
-              size="mini"
-              v-model="form.month"
-              format="MM"
-              type="month"
-              placeholder="选择月"
-            ></el-date-picker>
+            <el-select
+                size="mini"
+                v-model="cascader[1]"
+                placeholder="请选择"
+                @change="getCascaderC($event)"
+            >
+              <el-option
+                  :label="item.name"
+                  :value="item.pid"
+                  v-for="(item) in cascaderBOptions"
+                  :key="item.pid"
+              ></el-option>
+            </el-select>
           </div>
           </div>
         </div>
         </div>
         <div class="screening-item flex-vertical-center-l">
         <div class="screening-item flex-vertical-center-l">
-          <span>机构名称:</span>
+          <span>科室名称:</span>
           <div class="input">
           <div class="input">
-            <el-select size="mini" v-model="form.medName" placeholder="请选择">
+            <el-select size="mini" v-model="cascader[2]" placeholder="请选择" multiple collapse-tags clearable
+                       @change="getCascaderD('')">
               <el-option
               <el-option
-                :label="item.name"
-                :value="item.pid"
-                v-for="(item,index) in medSelectList"
-                :key="index"
+                  :label="item.name"
+                  :value="item.pid"
+                  v-for="(item) in cascaderCOptions"
+                  :key="item.pid"
               ></el-option>
               ></el-option>
             </el-select>
             </el-select>
           </div>
           </div>
         </div>
         </div>
         <div class="screening-item flex-vertical-center-l">
         <div class="screening-item flex-vertical-center-l">
-          <div class="input flex-vertical-center-l">
-            <el-checkbox v-model="form.checked">是否包含下级</el-checkbox>
-          </div>
-        </div>
-        <div class="screening-item flex-vertical-center-l" v-if="false">
+          <span>医生名称:</span>
           <div class="input">
           <div class="input">
-            <el-select size="mini" v-model="form.depart" placeholder="请选择">
-              <el-option label="全部科室" :value="1"></el-option>
-              <el-option label="中医内科" :value="2"></el-option>
-              <el-option label="康复科" :value="3"></el-option>
+            <el-select size="mini" v-model="cascader[3]" placeholder="请输入关键词" multiple collapse-tags clearable
+                       reserve-keyword filterable remote :remote-method="getCascaderD" :loading="loadDoctorSelect"
+                       :disabled="!cascader[1]">
+              <el-option
+                  :label="item.username"
+                  :value="item.pid"
+                  v-for="(item) in cascaderDOptions"
+                  :key="item.pid"
+              ></el-option>
             </el-select>
             </el-select>
           </div>
           </div>
         </div>
         </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>量级维度:</span>
+          <el-select size="mini" v-model="orderType" placeholder="请选择">
+            <el-option :label="item.label" :value="item.value" v-for="(item,index) in categoryOptions"
+                       :key="item.value"></el-option>
+          </el-select>
+        </div>
 
 
-        <el-button size="mini" type="primary" @click="search">搜索</el-button>
-        <el-button size="mini" type="warning" @click="clearFilter">清空</el-button>
+        <el-button type="primary" size="mini" @click="search()">搜索</el-button>
+        <el-button type="warning" size="mini" @click="clearFilter()">清空</el-button>
+        <!--<el-button type="primary" size="mini" @click="exportDow()">导出</el-button>-->
       </div>
       </div>
     </div>
     </div>
-    <!-- 展示数据层 -->
-    <div class="showData">
-      <div class="flex-vertical-center-l">
-        <div class="top-change flex-vertical-center-l">
-          <div :class="isEcharts==0?'choosed':''" @click="topChange(0)">图表</div>
-          <div :class="isEcharts==1?'choosed':''" @click="topChange(1)">列表</div>
-        </div>
-        <div class="flex-center bg-yellow" v-if="isEcharts==1" @click="exportDow">导出</div>
-      </div>
-      <!-- 展示两种数据 -->
-      <div class="showEcharts" v-if="isEcharts==0">
-        <div id="myChart" :style="{width: '100%'}" class="myCharts"></div>
-        <div class="e-format">
-          格式:时间:数量
-          <span style="margin-left:30px;"></span> X轴:时间 Y轴:单位(个)
-        </div>
+
+    <!-- 底部表格数据 -->
+    <div class="today-data">
+      <div class="today-table">
+        <el-table :data="tableData" stripe style="width: 100%" height="100%" border>
+          <el-table-column prop="doctorName" label="医生" align="center" width="150"></el-table-column>
+          <el-table-column prop="id" label="机构 / 科室" align="center">
+            <template slot-scope="scope">
+              <div v-if="scope.row.stiName" class="fragment">{{ scope.row.stiName }}</div>
+              <div v-if="scope.row.deptName" class="fragment">{{ scope.row.deptName }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="docInCount" label="进入系统量" align="center" width="100"></el-table-column>
+          <el-table-column prop="docOutCount" label="辅诊系统推导给HIS量" align="center" width="150"></el-table-column>
+          <el-table-column prop="docPayCount" label="已收费处方量" align="center" width="100"></el-table-column>
+          <el-table-column prop="associationCount" label="协定方使用量" align="center" width="100"></el-table-column>
+          <el-table-column prop="pushCount" label="智能推导量" align="center" width="100"></el-table-column>
+          <el-table-column prop="dialecticalCount" label="智能辩证推导量" align="center" width="120"></el-table-column>
+          <el-table-column prop="prescriptionsCount" label="方剂检索量" align="center" width="100"></el-table-column>
+          <el-table-column prop="famousCount" label="名家医案检索量" align="center" width="120"></el-table-column>
+          <el-table-column prop="medicalCount" label="病历转方量" align="center" width="100"></el-table-column>
+        </el-table>
       </div>
       </div>
-      <!-- 列表展示 -->
-      <div class="showList" v-if="isEcharts==1">
-        <ul>
-          <li class="flex-vertical-between" v-for="(item,index) in list" :key="index">
-            <div class="title">{{form.year |formMatD}}-{{item.id}}</div>
-            <div>
-              中医门诊量:
-              <span>{{item.outpatientCount}}</span>
-            </div>
-            <div>
-              中医住院量:
-              <span>{{item.hospitalCount}}</span>
-            </div>
-            <div>
-              饮片开方量:
-              <span>{{item.slicesCount}}</span>
-            </div>
-            <div>
-              颗粒剂开方量:
-              <span>{{item.particlesCount}}</span>
-            </div>
-            <div>
-              中药制剂开方量:
-              <span>{{item.chinaMadeCount}}</span>
-            </div>
-            <div>
-              适宜技术处方开方量:
-              <span>{{item.techCount}}</span>
-            </div>
-          </li>
-        </ul>
+      <div class="flex-vertical-center-r today-page">
+        <el-pagination
+            background
+            layout=" prev, pager, next, jumper, total"
+            :total="total"
+            :page-size="limit"
+            @current-change="sizeC($event)"
+        ></el-pagination>
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
-import { medicalInstitution } from "@/api/city.js";
-import { getDoctorWork, exportDow } from "@/api/dataAnalysis.js";
+import {getDepartSelect, getDoctorSelect} from "@/api/system.js";
+import {medicalInstitution} from "@/api/city";
+import {getDoctorWork} from "@/api/dataAnalysis";
+import {formatMonth} from "@/utils/format";
+import {mapGetters} from "vuex";
+
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-      // 筛选数据
-      form: {
-        medName: "",
-        year: "",
-        month: "",
-        checked: false,
-        depart: 1
+      loadDoctorSelect: false,
+      cascaderAOptions: [],
+      cascaderBOptions: [],
+      cascaderCOptions: [],
+      cascaderDOptions: [],
+      cascader: [],
+      orderType: void 0,
+      start: void 0,
+      end: new Date(),
+
+      categoryOptions: [
+        {label: '进入系统量', value: '1'},
+        {label: '辅诊系统推导给HIS量', value: '2'},
+        {label: '已收费处方量', value: '6'},
+        {label: '智能辩证推导量', value: '3'},
+        {label: '智能推导量', value: '4'},
+        {label: '协定方使用量', value: '5'},
+        {label: '方剂检索量', value: '7'},
+        {label: '名家医案检索量', value: '8'},
+        {label: '病历转方量', value: '9'},
+      ],
+
+      tableData: [],
+
+      page: 1,
+      limit: 10,
+      total: 0,
+
+
+      startPickerOptions: {
+        disabledDate: (date) => {
+          const value = date.getTime();
+          return this.end && value > this.end.getTime() || value > Date.now()
+        }
       },
       },
-      isFinish: 1, // 上一段函数 是否完成
-      // 医疗机构
-      medSelectList: [],
-      // 是否是图表
-      isEcharts: 0, // 0 图表 1 列表
-
-      list: [], // 列表
-      xAxisData: [], // 图表 横向坐标
-
-      chinaMadeCount: [], // 中药制剂开方数据
-      chinaPreCount: [], // 中药处方
-      hospitalCount: [], // 中医住院量
-      outpatientCount: [], //中医门诊量
-      particlesCount: [], // 颗粒剂开方量
-      slicesCount: [], // 饮片开方量
-      techCount: [] // 适宜技术处方
+      endPickerOptions: {
+        disabledDate: (date) => {
+          const value = date.getTime();
+          return this.start && value < this.start.getTime() || value > Date.now()
+        }
+      }
     };
     };
   },
   },
-  created() {},
-  mounted() {
-    let date = new Date();
-    this.form.year = date.getFullYear().toString();
-
-    this.medicalInstitution();
-    this.getDoctorWork();
-  },
-  filters: {
-    formMatD(value) {
-      let date = new Date(value);
-      let year = date.getFullYear();
-      let month = date.getMonth() + 1;
-
-      return year;
-    }
+  created() {
+    this.getCascaderB(this.getuserinfo.organizationid);
+    this.load();
   },
   },
   methods: {
   methods: {
-    // 年份失去焦点
-    yearBlur(e) {
-      if (!e || e.length > 4 || e.length < 4) {
-        let date = new Date();
-        this.form.year = date.getFullYear().toString();
-      }
-    },
-    // 顶部列表更改
-    topChange(type) {
-      this.isEcharts = type;
-      if (type == 0) {
-        setTimeout(() => {
-          this.drawLine();
-          // this.drawLine2()
-        }, 200);
-      }
-    },
-    // 绘制 图表
-    drawLine() {
-      // 基于准备好的dom,初始化echarts实例
-      let myChart = this.$echarts.init(document.getElementById("myChart"));
-      // 绘制图表
-      myChart.setOption({
-        grid: {
-          left: "1%",
-          right: "1%",
-          bottom: "3%",
-          containLabel: true
-        },
-        legend: {
-          data: [
-            "中医门诊量",
-            "中医住院量",
-            "中药处方开方量",
-            "饮片开方量",
-            "颗粒剂开方量",
-            "中药制剂开方量",
-            "适宜技术处方开方量"
-          ]
-        },
-        color: [
-          "#5FA0FA",
-          "#FFB703",
-          "#1bb2d8",
-          "#FD2446",
-          "#51CEC6",
-          "#DAEDF6",
-          "#FB925A"
-        ],
-        tooltip: {},
-        xAxis: {
-          type: "category",
-          data: this.xAxisData,
-          name: "时间",
-          nameLocation: "end"
-        },
-        yAxis: {
-          type: "value"
-          // name: "单位(个)"
-        },
-        series: [
-          {
-            name: "中医门诊量",
-            type: "bar",
-
-            data: this.outpatientCount
-          },
-          {
-            name: "中医住院量",
-            type: "bar",
-
-            data: this.hospitalCount
-          },
-          {
-            name: "中药处方开方量",
-            type: "bar",
-
-            data: this.chinaPreCount
-          },
-          {
-            name: "饮片开方量",
-            type: "bar",
-            // stack: "中药处方开方量",
-            data: this.slicesCount
-          },
-          {
-            name: "颗粒剂开方量",
-            type: "bar",
-            // stack: "中药处方开方量",
-            data: this.particlesCount
-          },
-          {
-            name: "中药制剂开方量",
-            type: "bar",
-            // stack: "中药处方开方量",
-            data: this.chinaMadeCount
-          },
-          {
-            name: "适宜技术处方开方量",
-            type: "bar",
-            data: this.techCount
-          }
-        ]
-      });
-    },
-    // 绘制饼图
-    drawLine2() {
-      let text = this.forMatDate(1, this.form.month)
-        ? "医生工作量分析-" +
-          this.forMatDate(0, this.form.year) +
-          "年" +
-          this.forMatDate(1, this.form.month) +
-          "月"
-        : "医生工作量分析-" + this.forMatDate(0, this.form.year) + "年";
-      // 基于准备好的dom,初始化echarts实例
-      let myChart = this.$echarts.init(document.getElementById("myChart"));
-      console.log(myChart, "chart");
-      // 绘制图表
-      myChart.setOption({
-        title: {
-          text: text,
-          // top: '10%',
-          left: "center"
-        },
-        tooltip: {
-          trigger: "item"
-        },
-        legend: {
-          orient: "vertical",
-          left: "left"
-        },
-        series: [
-          {
-            name: "医生工作量分析",
-            type: "pie",
-            radius: "50%",
-            data: [
-              {
-                name: "中医门诊量" + "-" + this.outpatientCount[0] + "个",
-
-                value: this.outpatientCount[0]
-              },
-              {
-                name: "中医住院量" + "-" + this.hospitalCount[0] + "个",
-
-                value: this.hospitalCount[0]
-              },
-              {
-                name: "中药处方开方量" + "-" + this.chinaPreCount[0] + "个",
-
-                value: this.chinaPreCount[0]
-              },
-              {
-                name: "饮片开方量" + "-" + this.slicesCount[0] + "个",
-                // type: 'bar',
-                stack: "中药处方开方量",
-                value: this.slicesCount[0]
-              },
-              {
-                name: "颗粒剂开方量" + "-" + this.particlesCount[0] + "个",
-                // type: 'bar',
-                stack: "中药处方开方量",
-                value: this.particlesCount[0]
-              },
-              {
-                name: "中药制剂开方量" + "-" + this.chinaMadeCount[0] + "个",
-                // type: 'bar',
-                stack: "中药处方开方量",
-                value: this.chinaMadeCount[0]
-              },
-              {
-                name: "适宜技术处方开方量" + "-" + this.techCount[0] + "个",
-                // type: 'bar',
-                value: this.techCount[0]
-              }
-            ],
-            emphasis: {
-              itemStyle: {
-                shadowBlur: 10,
-                shadowOffsetX: 0,
-                shadowColor: "rgba(0, 0, 0, 0.5)"
-              }
-            }
-          }
-        ]
-      });
-    },
     search() {
     search() {
-      this.xAxisData = []; // 图表 横向坐标
-
-      this.chinaMadeCount = []; // 中药制剂开方数据
-      this.chinaPreCount = []; // 中药处方
-      this.hospitalCount = []; // 中医住院量
-      this.outpatientCount = []; //中医门诊量
-      this.particlesCount = []; // 颗粒剂开方量
-      this.slicesCount = []; // 饮片开方量
-      this.techCount = []; // 适宜技术处方
-
-      this.getDoctorWork();
+      this.page = 1;
+      this.load();
     },
     },
     clearFilter() {
     clearFilter() {
-      let date = new Date();
-
-      this.form = {
-        medName: "",
-        year: date.getFullYear().toString(),
-        month: "",
-        checked: false,
-        depart: 1
-      };
-      this.xAxisData = []; // 图表 横向坐标
-      this.chinaMadeCount = []; // 中药制剂开方数据
-      this.chinaPreCount = []; // 中药处方
-      this.hospitalCount = []; // 中医住院量
-      this.outpatientCount = []; //中医门诊量
-      this.particlesCount = []; // 颗粒剂开方量
-      this.slicesCount = []; // 饮片开方量
-      this.techCount = []; // 适宜技术处方
-
-      if (this.isFinish == 0) return;
-      this.getDoctorWork();
+      this.getCascaderB(this.getuserinfo.organizationid)
+      this.orderType = void 0;
+      this.start = void 0;
+      this.end = new Date();
+
+      this.search();
     },
     },
-    // 处理选择器 时间数据
-    forMatDate(type, data) {
-      if (!data) return "";
-      // type : 0 year 1 month
-      let date = new Date(data);
-      let year = date.getFullYear();
-      let month = date.getMonth() + 1;
-      if (type == 0) {
-        return year;
-      } else if (type == 1) {
-        return month;
-      }
+    exportDow() {},
+
+    sizeC(e) {
+      // console.log(e, '1')
+      this.page = e;
+      this.load();
     },
     },
     // 获取医疗机构选择器
     // 获取医疗机构选择器
-    async medicalInstitution() {
-      let params = {
-        organizationId: this.getuserinfo.organizationid
-      };
-      let res = await medicalInstitution(params);
+    async getCascaderB(id) {
+      this.cascader = [id, '', [], []];
+      this.cascaderBOptions = []
+      this.cascaderCOptions = []
+      this.cascaderDOptions = []
+      let res = await medicalInstitution({organizationId: id});
+      if (res.ResultCode == 0) { this.cascaderBOptions = res.Data; }
+    },
+    // 获取医疗机构下的科室
+    async getCascaderC(id) {
+      this.cascader = [this.cascader[0], id, [], []];
+      let res = await getDepartSelect({institutionId: id});
+      if (res.ResultCode == 0) { this.cascaderCOptions = res.Data; }
+
+      await this.getCascaderD().catch();
+    },
+    async getCascaderD(keyword) {
+      if (!this.cascader[1]) return;
+      this.loadDoctorSelect = true;
+      const res = await getDoctorSelect({
+        keyword,
+        organizationid: this.cascader[0] || '',
+        sititutionid: this.cascader[1] || '',
+        departmentsIds: this.cascader[2] || [],
+      })
       if (res.ResultCode == 0) {
       if (res.ResultCode == 0) {
-        this.medSelectList = res.Data;
+        this.cascaderDOptions = res.Data.Items;
       }
       }
+      this.loadDoctorSelect = false;
     },
     },
-    // 获取工作量分析数据
-    async getDoctorWork() {
-      this.isFinish = 0; //
+    // 获取列表
+    async load() {
       let params = {
       let params = {
-        month: this.forMatDate(1, this.form.month),
-        stiId: this.form.medName,
-        type: this.form.checked ? "0" : "1",
-        year: this.forMatDate(0, this.form.year)
+        page: this.page,
+        limit: this.limit,
+
+        orderType: this.orderType,
+        startMon: formatMonth(this.start),
+        endMon: formatMonth(this.end),
+        orgId: this.cascader[0] || '',
+        stiId: this.cascader[1] || '',
+        deptId: '',
+        deptIds: this.cascader[2] || [],
+        doctorIds: this.cascader[3] || [],
       };
       };
       let res = await getDoctorWork(params);
       let res = await getDoctorWork(params);
       if (res.ResultCode == 0) {
       if (res.ResultCode == 0) {
-        this.list = res.Data;
-        if (!this.form.month) {
-          for (let i = 1; i <= 12; i++) {
-            let j = i < 10 ? "0" + i : i;
-            let xAxis = this.forMatDate(0, this.form.year) + "-" + j + "月";
-            this.xAxisData.push(xAxis);
-          }
-        } else {
-          this.xAxisData = [
-            this.forMatDate(0, this.form.year) +
-              "-" +
-              this.forMatDate(1, this.form.month) +
-              "月"
-          ];
-        }
-        res.Data.forEach((item, index) => {
-          this.chinaMadeCount.push(item.chinaMadeCount);
-          this.chinaPreCount.push(item.chinaPreCount);
-          this.hospitalCount.push(item.hospitalCount);
-          this.outpatientCount.push(item.outpatientCount);
-          this.particlesCount.push(item.particlesCount);
-          this.slicesCount.push(item.slicesCount);
-          this.techCount.push(item.techCount);
-        });
-        // 数里列表数据
-        this.list.filter((item, index) => {
-          if (this.form.month) {
-            return (item.id =
-              this.forMatDate(1, this.form.month) < 10
-                ? "0" + this.forMatDate(1, this.form.month)
-                : this.forMatDate(1, this.form.month));
-          } else {
-            return (item.id = index + 1 < 10 ? "0" + (index + 1) : index + 1);
-          }
-        });
-        let text = this.forMatDate(1, this.form.month)
-          ? this.forMatDate(0, this.form.year) +
-            "年" +
-            this.forMatDate(1, this.form.month) +
-            "月"
-          : this.forMatDate(0, this.form.year) + "年";
-        setTimeout(() => {
-          this.isFinish = 1; //
-          this.drawLine();
-          // this.drawLine2()
-        }, 200);
+        this.tableData = res.Data.Items;
+        this.total = res.Data.TotalRecordCount;
       }
       }
     },
     },
-    // 表导出
-    async exportDow() {
-      let params = {
-        month: this.forMatDate(1, this.form.month),
-        stiId: this.form.medName,
-        type: this.form.checked ? "0" : "1",
-        year: this.forMatDate(0, this.form.year)
-      };
-      const loading = this.$loading({
-        lock: true,
-        text: "正在导出,请稍后",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
-      let res = await exportDow(params).catch(err => {
-        loading.close();
-      });
-      if (res.ResultCode == 0) {
-        let path = process.env.VUE_APP_UPLOAD + "file/" + res.ResultInfo;
-        const a = document.createElement("a"); // 创建a标签
-        a.setAttribute("download", ""); // download属性
-        a.setAttribute("href", path); // href链接
-        a.click(); // 自执行点击事件
-        a.remove();
-        this.$message({
-          type: "success",
-          message: "导出成功",
-          showClose: true
-        });
-        loading.close();
-      }
-    }
   },
   },
   computed: {
   computed: {
     ...mapGetters(["getuserinfo"])
     ...mapGetters(["getuserinfo"])
@@ -513,142 +248,171 @@ export default {
 @import "../../style/common.scss";
 @import "../../style/common.scss";
 @import "../../style/base.scss";
 @import "../../style/base.scss";
 
 
-.showData {
-  background: #fff;
-  border-radius: 10px;
+.today-data {
   margin-top: 5px;
   margin-top: 5px;
-  padding: 10px;
+  padding: 10px 10px;
+  background: #ffffff;
+  border-radius: 5px;
   height: 71vh;
   height: 71vh;
-  overflow: auto;
-
-  .top-change {
-    margin-bottom: 10px;
-    width: 100px;
-    height: 34px;
-    border-radius: 8px;
-    cursor: pointer;
-    border: 1px solid #dcdfe6;
-    font-size: 14px;
-
-    div:first-child {
-      border-radius: 8px 0 0 8px;
-    }
-
-    div:last-child {
-      border-radius: 0 8px 8px 0;
-    }
 
 
-    div {
-      height: 34px;
-      width: 50px;
-      box-sizing: border-box;
-      line-height: 34px;
-      text-align: center;
-    }
-
-    .choosed {
-      background: #5386f6;
-      color: #fff;
-    }
-  }
-
-  .bg-yellow {
-    border-radius: 8px;
-    background: #ffae45;
-    color: #fff;
+  .add {
     width: 74px;
     width: 74px;
-    height: 34px;
-    margin-bottom: 20px;
+    height: 36px;
+    background: #5386f6;
+    border-radius: 4px;
+    font-size: 14px;
+    font-family: PingFang SC;
+    font-weight: 400;
+    color: #ffffff;
     cursor: pointer;
     cursor: pointer;
-    margin-left: 20px;
+    margin-bottom: 20px;
   }
   }
 
 
-  .showEcharts {
-    width: 100%;
-
-    .myCharts {
-      height: 340px;
+  .today-table {
+    height: 89%;
+
+    .enable,
+    .disable {
+      width: 60px;
+      height: 24px;
+      background: #ff6245;
+      border-radius: 2px;
+      font-size: 14px;
+      font-family: PingFang SC;
+      font-weight: 400;
+      color: #ffffff;
+      cursor: pointer;
+      margin: 0 auto;
     }
     }
-  }
 
 
-  .showList {
-    width: 100%;
+    .disable {
+      background: #68a8ff !important;
+    }
 
 
-    ul {
-      li {
-        padding: 15px;
-        border-bottom: 1px solid #dcdfe6;
+    .operation {
+      div {
+        width: 60px;
+        height: 24px;
+        background: #5386f6;
+        border-radius: 2px;
+        cursor: pointer;
+        font-size: 14px;
+        font-family: PingFang SC;
+        font-weight: 400;
+        color: #ffffff;
       }
       }
 
 
-      li:hover {
-        background: #dcdfe6;
-        cursor: default;
+      .bg-yellow {
+        background: #ffae45;
+        margin-left: 15px;
       }
       }
 
 
-      .title {
-        font-weight: bold;
-        color: #5386f6;
-        width: 90px;
+      .bg-default {
+        width: 80px;
+        margin-left: 15px;
       }
       }
     }
     }
   }
   }
 }
 }
-</style>
 
 
+.table-body::v-deep .el-table .cell {
+  text-align: center;
+}
+</style>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 @media screen and (min-width: 1681px) and (max-width: 1920px) {
 @media screen and (min-width: 1681px) and (max-width: 1920px) {
-  .showData {
-    height: 81vh;
-
-    .showEcharts {
-      width: 100%;
+  .today-data {
+    height: 82vh;
+    padding: 10px;
+    // background: red;
 
 
-      .myCharts {
-        height: 400px;
-      }
+    .today-table {
+      height: 94%;
     }
     }
   }
   }
+
+  .today-table::v-deep .el-table td {
+    padding: 18px 0;
+  }
+
+  .today-table::v-deep .el-table th {
+    padding: 18px 0;
+  }
 }
 }
 
 
 @media screen and (min-width: 1601px) and (max-width: 1680px) {
 @media screen and (min-width: 1601px) and (max-width: 1680px) {
-  .showData {
-    height: 80vh;
-
-    .showEcharts {
-      width: 100%;
+  .today-data {
+    height: 81vh;
+    padding: 10px;
+    // background: red;
 
 
-      .myCharts {
-        height: 400px;
-      }
+    .today-table {
+      height: 94%;
     }
     }
   }
   }
+
+  .today-table::v-deep .el-table td {
+    padding: 16px 0;
+  }
+
+  .today-table::v-deep .el-table th {
+    padding: 20px 0;
+  }
 }
 }
 
 
 @media screen and (min-width: 1361px) and (max-width: 1600px) {
 @media screen and (min-width: 1361px) and (max-width: 1600px) {
-  .showData {
+  .today-data {
     height: 73vh;
     height: 73vh;
+    padding: 10px;
+    // background: red;
 
 
-    .showEcharts {
-      width: 100%;
-
-      .myCharts {
-        height: 360px;
-      }
+    .today-table {
+      height: 92%;
     }
     }
   }
   }
+
+  .today-table::v-deep .el-table td {
+    padding: 10px 0;
+  }
+
+  .today-table::v-deep .el-table th {
+    padding: 14px 0;
+  }
 }
 }
 
 
-@media screen and(min-width:1281px) and (max-width: 1360px) {
-  .showData {
+@media screen and(min-width: 1281px) and (max-width: 1360px) {
+  .today-data {
     height: 73vh;
     height: 73vh;
+    padding: 5px;
+    // background: red;
 
 
-    .showEcharts {
-      width: 100%;
-
-      .myCharts {
-        height: 360px;
-      }
+    .today-table {
+      height: 92%;
     }
     }
   }
   }
+
+  .today-table::v-deep .el-table td {
+    padding: 5px 0;
+  }
+
+  .today-table::v-deep .el-table th {
+    padding: 5px 0;
+  }
+}
+
+.departmentidSelsourceName {
+  width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.fragment {
+  display: inline-block;
+
+  & + .fragment::before {
+    content: "/";
+    margin: 0 4px;
+  }
 }
 }
 </style>
 </style>

+ 371 - 0
src/views/dataAnalysis/DoctorWorkChart.vue

@@ -0,0 +1,371 @@
+<template>
+  <div class="druglist">
+    <!-- 顶部筛选 -->
+    <div class="screening">
+      <div class="screening-title flex-vertical-center-l">
+        <img src="~@/assets/filters.png" alt/>
+      </div>
+      <div class="screening-form flex-vertical-center-l flex-wrap">
+        <div class="screening-item flex-vertical-center-l">
+          <div class="input" style="display: flex;">
+            <el-date-picker size="mini" v-model="start" type="month" placeholder="起始年月"
+                            :picker-options="startPickerOptions" format="yyyy-MM" :clearable="false"></el-date-picker>
+            <el-date-picker size="mini" v-model="end" type="month" placeholder="结束年月"
+                            :picker-options="endPickerOptions" format="yyyy-MM"></el-date-picker>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>医疗机构名称:</span>
+          <div class="input">
+            <el-select
+                size="mini"
+                v-model="cascader[1]"
+                placeholder="请选择"
+                @change="getCascaderC($event)"
+            >
+              <el-option
+                  :label="item.name"
+                  :value="item.pid"
+                  v-for="(item) in cascaderBOptions"
+                  :key="item.pid"
+              ></el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>科室名称:</span>
+          <div class="input">
+            <el-select size="mini" v-model="cascader[2]" placeholder="请选择" multiple collapse-tags clearable
+                       @change="getCascaderD('')">
+              <el-option
+                  :label="item.name"
+                  :value="item.pid"
+                  v-for="(item) in cascaderCOptions"
+                  :key="item.pid"
+              ></el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>医生名称:</span>
+          <div class="input">
+            <el-select size="mini" v-model="cascader[3]" placeholder="请输入关键词" multiple collapse-tags clearable
+                       reserve-keyword filterable remote :remote-method="getCascaderD" :loading="loadDoctorSelect"
+                       :disabled="!cascader[1]">
+              <el-option
+                  :label="item.username"
+                  :value="item.pid"
+                  v-for="(item) in cascaderDOptions"
+                  :key="item.pid"
+              ></el-option>
+            </el-select>
+          </div>
+        </div>
+
+        <el-button type="primary" size="mini" @click="search()">搜索</el-button>
+        <el-button type="warning" size="mini" @click="clearFilter()">清空</el-button>
+        <!--<el-button type="primary" size="mini" @click="exportDow()">导出</el-button>-->
+      </div>
+    </div>
+
+    <!-- 展示数据层 -->
+    <div class="showData">
+      <!-- 展示两种数据 -->
+      <div class="showEcharts">
+        <div id="myChart" :style="{width: '100%'}" class="myCharts"></div>
+        <div class="e-format" style="margin-bottom:20px;">
+          格式:量级维度-时间:数量
+          <span style="margin-left:30px;"></span> X轴:时间 Y轴:单位(次)
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import {getDepartSelect, getDoctorSelect} from "@/api/system.js";
+import {medicalInstitution} from "@/api/city";
+import {getDoctorWorkChart} from "@/api/dataAnalysis";
+import {formatMonth, subtractMonths} from "@/utils/format";
+import {mapGetters} from "vuex";
+
+export default {
+  data() {
+    return {
+      loadDoctorSelect: false,
+      cascaderAOptions: [],
+      cascaderBOptions: [],
+      cascaderCOptions: [],
+      cascaderDOptions: [],
+      cascader: [],
+      start: subtractMonths(-12),
+      end: new Date(),
+
+      categoryOptions: [
+        {label: '进入系统量', value: 'docInCount'},
+        {label: '辅诊系统推导给HIS量', value: 'docOutCount'},
+        {label: '已收费处方量', value: 'docPayCount'},
+        {label: '协定方使用量', value: 'associationCount'},
+        {label: '智能推导量', value: 'pushCount'},
+        {label: '智能辩证推导量', value: 'dialecticalCount'},
+        {label: '方剂检索量', value: 'prescriptionsCount'},
+        {label: '名家医案检索量', value: 'famousCount'},
+        {label: '病历转方量', value: 'medicalCount'},
+      ],
+
+      tableData: [],
+
+      page: 1,
+      limit: 10,
+      total: 0,
+
+
+      startPickerOptions: {
+        disabledDate: (date) => {
+          const value = date.getTime();
+          return this.end && value > this.end.getTime() || value > Date.now()
+        }
+      },
+      endPickerOptions: {
+        disabledDate: (date) => {
+          const value = date.getTime();
+          return this.start && value < this.start.getTime() || value > Date.now()
+        }
+      }
+    };
+  },
+  created() {
+    this.getCascaderB(this.getuserinfo.organizationid);
+  },
+  mounted() {
+    this.load();
+  },
+  methods: {
+    search() {
+      this.load();
+    },
+    clearFilter() {
+      this.getCascaderB(this.getuserinfo.organizationid)
+      this.orderType = void 0;
+      this.start = subtractMonths(-12);
+      this.end = new Date();
+
+      this.search();
+    },
+    exportDow() {},
+    // 获取医疗机构选择器
+    async getCascaderB(id) {
+      this.cascader = [id, '', [], []];
+      this.cascaderBOptions = []
+      this.cascaderCOptions = []
+      this.cascaderDOptions = []
+      let res = await medicalInstitution({organizationId: id});
+      if (res.ResultCode == 0) { this.cascaderBOptions = res.Data; }
+    },
+    // 获取医疗机构下的科室
+    async getCascaderC(id) {
+      this.cascader = [this.cascader[0], id, [], []];
+      let res = await getDepartSelect({institutionId: id});
+      if (res.ResultCode == 0) { this.cascaderCOptions = res.Data; }
+
+      await this.getCascaderD().catch();
+    },
+    async getCascaderD(keyword) {
+      if (!this.cascader[1]) return;
+      this.loadDoctorSelect = true;
+      const res = await getDoctorSelect({
+        keyword,
+        organizationid: this.cascader[0] || '',
+        sititutionid: this.cascader[1] || '',
+        departmentsIds: this.cascader[2] || [],
+      })
+      if (res.ResultCode == 0) {
+        this.cascaderDOptions = res.Data.Items;
+      }
+      this.loadDoctorSelect = false;
+    },
+    // 获取列表
+    async load() {
+      let params = {
+        startMon: formatMonth(this.start),
+        endMon: formatMonth(this.end),
+        orgId: this.cascader[0] || '',
+        stiId: this.cascader[1] || '',
+        deptId: '',
+        deptIds: this.cascader[2] || [],
+        doctorIds: this.cascader[3] || [],
+      };
+      let res = await getDoctorWorkChart(params);
+      if (res.ResultCode == 0) {
+        this.tableData = res.Data;
+        this.drawLine();
+      }
+    },
+    drawLine() {
+      // 基于准备好的dom,初始化echarts实例
+      let myChart = this.$echarts.init(document.getElementById("myChart"));
+      // 绘制图表
+      myChart.setOption({
+        grid: {
+          left: "1%",
+          right: "1%",
+          bottom: "3%",
+          containLabel: true
+        },
+        legend: {},
+        tooltip: {trigger: 'axis'},
+        xAxis: {type: "category",},
+        yAxis: {type: "value"},
+        dataset: {source: this.tableData},
+        series: this.categoryOptions.map((item) => {
+          return {type: 'bar', seriesLayoutBy: 'row', name: item.label, encode: {x: 'mon', y: item.value}}
+        })
+      });
+    }
+  },
+  computed: {
+    ...mapGetters(["getuserinfo"])
+  }
+};
+</script>
+<style lang="scss" scoped>
+@import "../../style/common.scss";
+@import "../../style/base.scss";
+
+.showData {
+  background: #fff;
+  border-radius: 10px;
+  margin-top: 5px;
+  padding: 10px;
+  height: 71vh;
+  overflow: auto;
+
+  .top-change {
+    margin-bottom: 20px;
+    width: 100px;
+    height: 34px;
+    border-radius: 8px;
+    cursor: pointer;
+    border: 1px solid #dcdfe6;
+    font-size: 14px;
+
+    div:first-child {
+      border-radius: 8px 0 0 8px;
+    }
+
+    div:last-child {
+      border-radius: 0 8px 8px 0;
+    }
+
+    div {
+      height: 34px;
+      width: 50px;
+      box-sizing: border-box;
+      line-height: 34px;
+      text-align: center;
+    }
+
+    .choosed {
+      background: #5386f6;
+      color: #fff;
+    }
+  }
+
+  .bg-yellow {
+    border-radius: 8px;
+    background: #ffae45;
+    color: #fff;
+    width: 74px;
+    height: 34px;
+    margin-bottom: 20px;
+    cursor: pointer;
+    margin-left: 20px;
+  }
+
+  .showEcharts {
+    width: 100%;
+
+    .myCharts {
+      height: 360px;
+    }
+  }
+
+  .showList {
+    width: 100%;
+
+    ul {
+      li {
+        padding: 15px;
+        border-bottom: 1px solid #dcdfe6;
+      }
+
+      li:hover {
+        background: #dcdfe6;
+        cursor: default;
+      }
+
+      .title {
+        font-weight: bold;
+        color: #5386f6;
+        width: 90px;
+      }
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+@media screen and (min-width: 1681px) and (max-width: 1920px) {
+  .showData {
+    height: 81vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 500px;
+      }
+    }
+  }
+}
+
+@media screen and (min-width: 1601px) and (max-width: 1680px) {
+  .showData {
+    height: 80vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 500px;
+      }
+    }
+  }
+}
+
+@media screen and (min-width: 1361px) and (max-width: 1600px) {
+  .showData {
+    height: 73vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 410px;
+      }
+    }
+  }
+}
+
+@media screen and(min-width: 1281px) and (max-width: 1360px) {
+  .showData {
+    height: 73vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 410px;
+      }
+    }
+  }
+}
+</style>

+ 654 - 0
src/views/dataAnalysis/HospitalWork.vue

@@ -0,0 +1,654 @@
+<template>
+  <div class="doctorWork">
+    <!-- 顶部筛选 -->
+    <div class="screening">
+      <div class="screening-title flex-vertical-center-l">
+        <span></span>
+        <div>筛选</div>
+      </div>
+      <div class="screening-form flex-vertical-center-l flex-wrap">
+        <div class="screening-item flex-vertical-center-l">
+          <span>年度:</span>
+          <div class="input">
+            <el-date-picker
+              size="mini"
+              @change="yearBlur"
+              v-model="form.year"
+              type="year"
+              placeholder="选择年"
+              :clearable="false"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>月度:</span>
+          <div class="input">
+            <el-date-picker
+              size="mini"
+              v-model="form.month"
+              format="MM"
+              type="month"
+              placeholder="选择月"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l">
+          <span>机构名称:</span>
+          <div class="input">
+            <el-select size="mini" v-model="form.medName" placeholder="请选择">
+              <el-option
+                :label="item.name"
+                :value="item.pid"
+                v-for="(item,index) in medSelectList"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l">
+          <div class="input flex-vertical-center-l">
+            <el-checkbox v-model="form.checked">是否包含下级</el-checkbox>
+          </div>
+        </div>
+        <div class="screening-item flex-vertical-center-l" v-if="false">
+          <div class="input">
+            <el-select size="mini" v-model="form.depart" placeholder="请选择">
+              <el-option label="全部科室" :value="1"></el-option>
+              <el-option label="中医内科" :value="2"></el-option>
+              <el-option label="康复科" :value="3"></el-option>
+            </el-select>
+          </div>
+        </div>
+
+        <el-button size="mini" type="primary" @click="search">搜索</el-button>
+        <el-button size="mini" type="warning" @click="clearFilter">清空</el-button>
+      </div>
+    </div>
+    <!-- 展示数据层 -->
+    <div class="showData">
+      <div class="flex-vertical-center-l">
+        <div class="top-change flex-vertical-center-l">
+          <div :class="isEcharts==0?'choosed':''" @click="topChange(0)">图表</div>
+          <div :class="isEcharts==1?'choosed':''" @click="topChange(1)">列表</div>
+        </div>
+        <div class="flex-center bg-yellow" v-if="isEcharts==1" @click="exportDow">导出</div>
+      </div>
+      <!-- 展示两种数据 -->
+      <div class="showEcharts" v-if="isEcharts==0">
+        <div id="myChart" :style="{width: '100%'}" class="myCharts"></div>
+        <div class="e-format">
+          格式:时间:数量
+          <span style="margin-left:30px;"></span> X轴:时间 Y轴:单位(个)
+        </div>
+      </div>
+      <!-- 列表展示 -->
+      <div class="showList" v-if="isEcharts==1">
+        <ul>
+          <li class="flex-vertical-between" v-for="(item,index) in list" :key="index">
+            <div class="title">{{form.year |formMatD}}-{{item.id}}</div>
+            <div>
+              中医门诊量:
+              <span>{{item.outpatientCount}}</span>
+            </div>
+            <div>
+              中医住院量:
+              <span>{{item.hospitalCount}}</span>
+            </div>
+            <div>
+              饮片开方量:
+              <span>{{item.slicesCount}}</span>
+            </div>
+            <div>
+              颗粒剂开方量:
+              <span>{{item.particlesCount}}</span>
+            </div>
+            <div>
+              中药制剂开方量:
+              <span>{{item.chinaMadeCount}}</span>
+            </div>
+            <div>
+              适宜技术处方开方量:
+              <span>{{item.techCount}}</span>
+            </div>
+          </li>
+        </ul>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
+import { medicalInstitution } from "@/api/city.js";
+import { getHospitalWork, exportDow } from "@/api/dataAnalysis.js";
+export default {
+  data() {
+    return {
+      // 筛选数据
+      form: {
+        medName: "",
+        year: "",
+        month: "",
+        checked: false,
+        depart: 1
+      },
+      isFinish: 1, // 上一段函数 是否完成
+      // 医疗机构
+      medSelectList: [],
+      // 是否是图表
+      isEcharts: 0, // 0 图表 1 列表
+
+      list: [], // 列表
+      xAxisData: [], // 图表 横向坐标
+
+      chinaMadeCount: [], // 中药制剂开方数据
+      chinaPreCount: [], // 中药处方
+      hospitalCount: [], // 中医住院量
+      outpatientCount: [], //中医门诊量
+      particlesCount: [], // 颗粒剂开方量
+      slicesCount: [], // 饮片开方量
+      techCount: [] // 适宜技术处方
+    };
+  },
+  created() {},
+  mounted() {
+    let date = new Date();
+    this.form.year = date.getFullYear().toString();
+
+    this.medicalInstitution();
+    this.getHospitalWork();
+  },
+  filters: {
+    formMatD(value) {
+      let date = new Date(value);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+
+      return year;
+    }
+  },
+  methods: {
+    // 年份失去焦点
+    yearBlur(e) {
+      if (!e || e.length > 4 || e.length < 4) {
+        let date = new Date();
+        this.form.year = date.getFullYear().toString();
+      }
+    },
+    // 顶部列表更改
+    topChange(type) {
+      this.isEcharts = type;
+      if (type == 0) {
+        setTimeout(() => {
+          this.drawLine();
+          // this.drawLine2()
+        }, 200);
+      }
+    },
+    // 绘制 图表
+    drawLine() {
+      // 基于准备好的dom,初始化echarts实例
+      let myChart = this.$echarts.init(document.getElementById("myChart"));
+      // 绘制图表
+      myChart.setOption({
+        grid: {
+          left: "1%",
+          right: "1%",
+          bottom: "3%",
+          containLabel: true
+        },
+        legend: {
+          data: [
+            "中医门诊量",
+            "中医住院量",
+            "中药处方开方量",
+            "饮片开方量",
+            "颗粒剂开方量",
+            "中药制剂开方量",
+            "适宜技术处方开方量"
+          ]
+        },
+        color: [
+          "#5FA0FA",
+          "#FFB703",
+          "#1bb2d8",
+          "#FD2446",
+          "#51CEC6",
+          "#DAEDF6",
+          "#FB925A"
+        ],
+        tooltip: {},
+        xAxis: {
+          type: "category",
+          data: this.xAxisData,
+          name: "时间",
+          nameLocation: "end"
+        },
+        yAxis: {
+          type: "value"
+          // name: "单位(个)"
+        },
+        series: [
+          {
+            name: "中医门诊量",
+            type: "bar",
+
+            data: this.outpatientCount
+          },
+          {
+            name: "中医住院量",
+            type: "bar",
+
+            data: this.hospitalCount
+          },
+          {
+            name: "中药处方开方量",
+            type: "bar",
+
+            data: this.chinaPreCount
+          },
+          {
+            name: "饮片开方量",
+            type: "bar",
+            // stack: "中药处方开方量",
+            data: this.slicesCount
+          },
+          {
+            name: "颗粒剂开方量",
+            type: "bar",
+            // stack: "中药处方开方量",
+            data: this.particlesCount
+          },
+          {
+            name: "中药制剂开方量",
+            type: "bar",
+            // stack: "中药处方开方量",
+            data: this.chinaMadeCount
+          },
+          {
+            name: "适宜技术处方开方量",
+            type: "bar",
+            data: this.techCount
+          }
+        ]
+      });
+    },
+    // 绘制饼图
+    drawLine2() {
+      let text = this.forMatDate(1, this.form.month)
+        ? "医生工作量分析-" +
+          this.forMatDate(0, this.form.year) +
+          "年" +
+          this.forMatDate(1, this.form.month) +
+          "月"
+        : "医生工作量分析-" + this.forMatDate(0, this.form.year) + "年";
+      // 基于准备好的dom,初始化echarts实例
+      let myChart = this.$echarts.init(document.getElementById("myChart"));
+      console.log(myChart, "chart");
+      // 绘制图表
+      myChart.setOption({
+        title: {
+          text: text,
+          // top: '10%',
+          left: "center"
+        },
+        tooltip: {
+          trigger: "item"
+        },
+        legend: {
+          orient: "vertical",
+          left: "left"
+        },
+        series: [
+          {
+            name: "医生工作量分析",
+            type: "pie",
+            radius: "50%",
+            data: [
+              {
+                name: "中医门诊量" + "-" + this.outpatientCount[0] + "个",
+
+                value: this.outpatientCount[0]
+              },
+              {
+                name: "中医住院量" + "-" + this.hospitalCount[0] + "个",
+
+                value: this.hospitalCount[0]
+              },
+              {
+                name: "中药处方开方量" + "-" + this.chinaPreCount[0] + "个",
+
+                value: this.chinaPreCount[0]
+              },
+              {
+                name: "饮片开方量" + "-" + this.slicesCount[0] + "个",
+                // type: 'bar',
+                stack: "中药处方开方量",
+                value: this.slicesCount[0]
+              },
+              {
+                name: "颗粒剂开方量" + "-" + this.particlesCount[0] + "个",
+                // type: 'bar',
+                stack: "中药处方开方量",
+                value: this.particlesCount[0]
+              },
+              {
+                name: "中药制剂开方量" + "-" + this.chinaMadeCount[0] + "个",
+                // type: 'bar',
+                stack: "中药处方开方量",
+                value: this.chinaMadeCount[0]
+              },
+              {
+                name: "适宜技术处方开方量" + "-" + this.techCount[0] + "个",
+                // type: 'bar',
+                value: this.techCount[0]
+              }
+            ],
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)"
+              }
+            }
+          }
+        ]
+      });
+    },
+    search() {
+      this.xAxisData = []; // 图表 横向坐标
+
+      this.chinaMadeCount = []; // 中药制剂开方数据
+      this.chinaPreCount = []; // 中药处方
+      this.hospitalCount = []; // 中医住院量
+      this.outpatientCount = []; //中医门诊量
+      this.particlesCount = []; // 颗粒剂开方量
+      this.slicesCount = []; // 饮片开方量
+      this.techCount = []; // 适宜技术处方
+
+      this.getHospitalWork();
+    },
+    clearFilter() {
+      let date = new Date();
+
+      this.form = {
+        medName: "",
+        year: date.getFullYear().toString(),
+        month: "",
+        checked: false,
+        depart: 1
+      };
+      this.xAxisData = []; // 图表 横向坐标
+      this.chinaMadeCount = []; // 中药制剂开方数据
+      this.chinaPreCount = []; // 中药处方
+      this.hospitalCount = []; // 中医住院量
+      this.outpatientCount = []; //中医门诊量
+      this.particlesCount = []; // 颗粒剂开方量
+      this.slicesCount = []; // 饮片开方量
+      this.techCount = []; // 适宜技术处方
+
+      if (this.isFinish == 0) return;
+      this.getHospitalWork();
+    },
+    // 处理选择器 时间数据
+    forMatDate(type, data) {
+      if (!data) return "";
+      // type : 0 year 1 month
+      let date = new Date(data);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      if (type == 0) {
+        return year;
+      } else if (type == 1) {
+        return month;
+      }
+    },
+    // 获取医疗机构选择器
+    async medicalInstitution() {
+      let params = {
+        organizationId: this.getuserinfo.organizationid
+      };
+      let res = await medicalInstitution(params);
+      if (res.ResultCode == 0) {
+        this.medSelectList = res.Data;
+      }
+    },
+    // 获取工作量分析数据
+    async getHospitalWork() {
+      this.isFinish = 0; //
+      let params = {
+        month: this.forMatDate(1, this.form.month),
+        stiId: this.form.medName,
+        type: this.form.checked ? "0" : "1",
+        year: this.forMatDate(0, this.form.year)
+      };
+      let res = await getHospitalWork(params);
+      if (res.ResultCode == 0) {
+        this.list = res.Data;
+        if (!this.form.month) {
+          for (let i = 1; i <= 12; i++) {
+            let j = i < 10 ? "0" + i : i;
+            let xAxis = this.forMatDate(0, this.form.year) + "-" + j + "月";
+            this.xAxisData.push(xAxis);
+          }
+        } else {
+          this.xAxisData = [
+            this.forMatDate(0, this.form.year) +
+              "-" +
+              this.forMatDate(1, this.form.month) +
+              "月"
+          ];
+        }
+        res.Data.forEach((item, index) => {
+          this.chinaMadeCount.push(item.chinaMadeCount);
+          this.chinaPreCount.push(item.chinaPreCount);
+          this.hospitalCount.push(item.hospitalCount);
+          this.outpatientCount.push(item.outpatientCount);
+          this.particlesCount.push(item.particlesCount);
+          this.slicesCount.push(item.slicesCount);
+          this.techCount.push(item.techCount);
+        });
+        // 数里列表数据
+        this.list.filter((item, index) => {
+          if (this.form.month) {
+            return (item.id =
+              this.forMatDate(1, this.form.month) < 10
+                ? "0" + this.forMatDate(1, this.form.month)
+                : this.forMatDate(1, this.form.month));
+          } else {
+            return (item.id = index + 1 < 10 ? "0" + (index + 1) : index + 1);
+          }
+        });
+        let text = this.forMatDate(1, this.form.month)
+          ? this.forMatDate(0, this.form.year) +
+            "年" +
+            this.forMatDate(1, this.form.month) +
+            "月"
+          : this.forMatDate(0, this.form.year) + "年";
+        setTimeout(() => {
+          this.isFinish = 1; //
+          this.drawLine();
+          // this.drawLine2()
+        }, 200);
+      }
+    },
+    // 表导出
+    async exportDow() {
+      let params = {
+        month: this.forMatDate(1, this.form.month),
+        stiId: this.form.medName,
+        type: this.form.checked ? "0" : "1",
+        year: this.forMatDate(0, this.form.year)
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出,请稍后",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      let res = await exportDow(params).catch(err => {
+        loading.close();
+      });
+      if (res.ResultCode == 0) {
+        let path = process.env.VUE_APP_UPLOAD + "file/" + res.ResultInfo;
+        const a = document.createElement("a"); // 创建a标签
+        a.setAttribute("download", ""); // download属性
+        a.setAttribute("href", path); // href链接
+        a.click(); // 自执行点击事件
+        a.remove();
+        this.$message({
+          type: "success",
+          message: "导出成功",
+          showClose: true
+        });
+        loading.close();
+      }
+    }
+  },
+  computed: {
+    ...mapGetters(["getuserinfo"])
+  }
+};
+</script>
+<style lang="scss" scoped>
+@import "../../style/common.scss";
+@import "../../style/base.scss";
+
+.showData {
+  background: #fff;
+  border-radius: 10px;
+  margin-top: 5px;
+  padding: 10px;
+  height: 71vh;
+  overflow: auto;
+
+  .top-change {
+    margin-bottom: 10px;
+    width: 100px;
+    height: 34px;
+    border-radius: 8px;
+    cursor: pointer;
+    border: 1px solid #dcdfe6;
+    font-size: 14px;
+
+    div:first-child {
+      border-radius: 8px 0 0 8px;
+    }
+
+    div:last-child {
+      border-radius: 0 8px 8px 0;
+    }
+
+    div {
+      height: 34px;
+      width: 50px;
+      box-sizing: border-box;
+      line-height: 34px;
+      text-align: center;
+    }
+
+    .choosed {
+      background: #5386f6;
+      color: #fff;
+    }
+  }
+
+  .bg-yellow {
+    border-radius: 8px;
+    background: #ffae45;
+    color: #fff;
+    width: 74px;
+    height: 34px;
+    margin-bottom: 20px;
+    cursor: pointer;
+    margin-left: 20px;
+  }
+
+  .showEcharts {
+    width: 100%;
+
+    .myCharts {
+      height: 340px;
+    }
+  }
+
+  .showList {
+    width: 100%;
+
+    ul {
+      li {
+        padding: 15px;
+        border-bottom: 1px solid #dcdfe6;
+      }
+
+      li:hover {
+        background: #dcdfe6;
+        cursor: default;
+      }
+
+      .title {
+        font-weight: bold;
+        color: #5386f6;
+        width: 90px;
+      }
+    }
+  }
+}
+</style>
+
+<style lang="scss" scoped>
+@media screen and (min-width: 1681px) and (max-width: 1920px) {
+  .showData {
+    height: 81vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 400px;
+      }
+    }
+  }
+}
+
+@media screen and (min-width: 1601px) and (max-width: 1680px) {
+  .showData {
+    height: 80vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 400px;
+      }
+    }
+  }
+}
+
+@media screen and (min-width: 1361px) and (max-width: 1600px) {
+  .showData {
+    height: 73vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 360px;
+      }
+    }
+  }
+}
+
+@media screen and(min-width:1281px) and (max-width: 1360px) {
+  .showData {
+    height: 73vh;
+
+    .showEcharts {
+      width: 100%;
+
+      .myCharts {
+        height: 360px;
+      }
+    }
+  }
+}
+</style>

+ 41 - 10
src/views/diagnosis/Prescribing.vue

@@ -1066,7 +1066,7 @@
       @cancle="showUnifyPresc=false"
       @cancle="showUnifyPresc=false"
       title="查询统建处方"
       title="查询统建处方"
       :showBtns="false"
       :showBtns="false"
-      width="700px"
+      width="78%"
       distanceTop="5vh"
       distanceTop="5vh"
     >
     >
       <div slot="body">
       <div slot="body">
@@ -1107,7 +1107,7 @@
     <!-- 选择代煎 地址栏 -->
     <!-- 选择代煎 地址栏 -->
     <Popup
     <Popup
       :showDialog="showAddress"
       :showDialog="showAddress"
-      @cancle="showAddress=false"
+      @cancle="submitAddress"
       @confim="submitAddress"
       @confim="submitAddress"
       title="请和患者确认以下信息"
       title="请和患者确认以下信息"
       width="700px"
       width="700px"
@@ -1416,7 +1416,7 @@ export default {
         this.isTuiDaoZy = true;
         this.isTuiDaoZy = true;
       }
       }
       // 处方编辑 recipeType
       // 处方编辑 recipeType
-      else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
+      else if (query.from !== 'his' && this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
       // 暂存处方
       // 暂存处方
       else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
       else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
       // 历史处方
       // 历史处方
@@ -1425,6 +1425,7 @@ export default {
         let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
         let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
         const has = res && res.ResultCode == 0 && res.Data.length > 0;
         const has = res && res.ResultCode == 0 && res.Data.length > 0;
         if (has) await this.getRecipeShowData();
         if (has) await this.getRecipeShowData();
+        else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
       }
       }
    },
    },
     // 参考医案
     // 参考医案
@@ -2465,7 +2466,7 @@ export default {
       }, 1000);
       }, 1000);
     },
     },
     // 协定方数据转方 赋值给中药处方
     // 协定方数据转方 赋值给中药处方
-    agreeAssignToTCM(data, loading) {
+    agreeAssignToTCM(data, loading, request = true) {
       let children = this.$children.filter(item => {
       let children = this.$children.filter(item => {
         return (
         return (
           item.name == "中药处方" ||
           item.name == "中药处方" ||
@@ -2513,6 +2514,8 @@ export default {
 
 
       data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
       data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
 
 
+      if (!request) return;
+
       // 赋值给表格
       // 赋值给表格
       data.preStiDetails.forEach((item, index) => {
       data.preStiDetails.forEach((item, index) => {
         let obj1 = {
         let obj1 = {
@@ -2787,7 +2790,34 @@ export default {
       this.showRecord = false;
       this.showRecord = false;
       this.showAgree = false;
       this.showAgree = false;
     },
     },
-    // 协定方转方
+    transposition(recipe) {
+     const is = recipe.medicine.every(m => m.matid);
+     if (is) {
+       // 调用 方剂 换方
+       const medicine = recipe.medicine.map((m, i) => {
+         return {
+           matid: m.matid,
+           matname: m.ypmc,
+           dose: m.dose,
+           unit: m.dw || m.zxdw || m.bzdw,
+           useage: m.usagestr,
+           seqn: i + 1,
+         }
+       });
+       if (recipe.__RecipeFrom__ === '2') this.agreeAssignToTCM(recipe, void 0, true);
+       this.setDrugsInfo(medicine);
+       this.changeAndJoin(1);
+     } else if (recipe.__RecipeFrom__ === '2') {
+       this.agreeInfo = recipe;
+       this.changeBasisPre(this.agreeInfo.pid);
+     }
+     if (recipe.__RecipeFrom__) this.addRecipeFrom(recipe.__RecipeFrom__ /* 2 协定方*/);
+    },
+
+    /**
+     * 协定方转方
+     * @deprecated
+     */
     turnRecipe2() {
     turnRecipe2() {
       this.addRecipeFrom("2");
       this.addRecipeFrom("2");
       this.changeBasisPre(this.agreeInfo.pid);
       this.changeBasisPre(this.agreeInfo.pid);
@@ -3386,7 +3416,7 @@ export default {
             this.rDoctorCase.page += 1;
             this.rDoctorCase.page += 1;
           }
           }
         } else {
         } else {
-          this.rPrescriprDoctorCasetion.loadMore = false;
+          this.rPrescriprDoctorCasetion = { ...this.rPrescriprDoctorCasetion, loadMore: false, };
         }
         }
       }
       }
     },
     },
@@ -4569,15 +4599,16 @@ export default {
   }
   }
 
 
   .pre-center {
   .pre-center {
-    height: 100%;
+    display: flex;
+    flex-direction: column;
     flex: 1;
     flex: 1;
     padding: 5px 5px;
     padding: 5px 5px;
     background: #fff;
     background: #fff;
     box-sizing: border-box;
     box-sizing: border-box;
-    overflow: auto;
-    overflow-y: auto;
-    height: 470px;
+    overflow: hidden;
 
 
+    > div { flex: none; }
+    > div.center-table { flex: auto; }
     .center-tab {
     .center-tab {
       div {
       div {
         cursor: default;
         cursor: default;

+ 11 - 8
src/views/diagnosis/components/prescription-unify.vue

@@ -7,20 +7,20 @@
         <el-form-item label="方名">
         <el-form-item label="方名">
           <el-input v-model="form.name" size="small" placeholder="请输入"></el-input>
           <el-input v-model="form.name" size="small" placeholder="请输入"></el-input>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="共享状态" v-if="activeName === '2'">
+        <!--<el-form-item label="共享状态" v-if="activeName === '2'">
           <el-select v-model="form.share" placeholder="请选择" size="small">
           <el-select v-model="form.share" placeholder="请选择" size="small">
-            <!-- <el-option
+            &lt;!&ndash; <el-option
               :label="item.name"
               :label="item.name"
               :value="item.pid"
               :value="item.pid"
               v-for="(item,index) in shareSelect"
               v-for="(item,index) in shareSelect"
               :key="index"
               :key="index"
-            ></el-option>-->
+            ></el-option>&ndash;&gt;
             <el-option label="个人" :value="0"></el-option>
             <el-option label="个人" :value="0"></el-option>
             <el-option label="二级科室" :value="1"></el-option>
             <el-option label="二级科室" :value="1"></el-option>
             <el-option label="科室" :value="2"></el-option>
             <el-option label="科室" :value="2"></el-option>
             <el-option label="本院" :value="3"></el-option>
             <el-option label="本院" :value="3"></el-option>
           </el-select>
           </el-select>
-        </el-form-item>
+        </el-form-item>-->
       </el-form>
       </el-form>
       <el-button size="small" type="primary" @click="searchDis">搜索</el-button>
       <el-button size="small" type="primary" @click="searchDis">搜索</el-button>
       <el-button size="small" type="warning" @click="clearDis">清空</el-button>
       <el-button size="small" type="warning" @click="clearDis">清空</el-button>
@@ -37,11 +37,12 @@
         </el-table-column>
         </el-table-column>
         <el-table-column prop="effect" label="功效与适用症" align="center" width="150"></el-table-column>
         <el-table-column prop="effect" label="功效与适用症" align="center" width="150"></el-table-column>
         <el-table-column prop="drugInformation" label="中药信息" align="center"></el-table-column>
         <el-table-column prop="drugInformation" label="中药信息" align="center"></el-table-column>
-        <el-table-column prop="book" label="共享状态" align="center">
+        <!--<el-table-column prop="book" label="共享状态" align="center" width="100">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <div>{{ scope.row.showType |filterShowType}}</div>
             <div>{{ scope.row.showType |filterShowType}}</div>
           </template>
           </template>
-        </el-table-column>
+        </el-table-column>-->
+        <el-table-column prop="provenance" label="处方出处" align="center" width="150"></el-table-column>
         <el-table-column prop="address" label="操作" width="80" align="center">
         <el-table-column prop="address" label="操作" width="80" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-button size="mini" type="primary" @click="handleAgree(scope)">转方</el-button>
             <el-button size="mini" type="primary" @click="handleAgree(scope)">转方</el-button>
@@ -207,8 +208,10 @@ export default {
         pid: id
         pid: id
       });
       });
       if (res.ResultCode == 0) {
       if (res.ResultCode == 0) {
-        this.$parent.$parent.$parent.agreeInfo = res.Data;
-        this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        // this.$parent.$parent.$parent.agreeInfo = res.Data;
+        // this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        const recipe = { ...res.Data, medicine: res.Data.preStiDetails, __RecipeFrom__: '2' }
+        this.$parent.$parent.$parent.transposition(recipe);
         if (res.Data.diseaseid) {
         if (res.Data.diseaseid) {
           this.$parent.$parent.$parent.$refs.TCM.setParams({
           this.$parent.$parent.$parent.$refs.TCM.setParams({
             namemedicine: res.Data.diseasename,
             namemedicine: res.Data.diseasename,

+ 7 - 4
src/views/diagnosis/components/prescription.vue

@@ -69,7 +69,8 @@
         </el-table-column>
         </el-table-column>
         <el-table-column prop="effect" label="功效与适用症" align="center" width="150"></el-table-column>
         <el-table-column prop="effect" label="功效与适用症" align="center" width="150"></el-table-column>
         <el-table-column prop="drugInformation" label="中药信息" align="center"></el-table-column>
         <el-table-column prop="drugInformation" label="中药信息" align="center"></el-table-column>
-        <el-table-column prop="book" label="共享状态" align="center">
+        <el-table-column prop="provenance" label="处方出处" align="center" width="150"></el-table-column>
+        <el-table-column prop="book" label="共享状态" align="center" width="100">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <div>{{ scope.row.showType |filterShowType}}</div>
             <div>{{ scope.row.showType |filterShowType}}</div>
           </template>
           </template>
@@ -228,7 +229,7 @@ export default {
     async getAgreeRecipe() {
     async getAgreeRecipe() {
       let params = {
       let params = {
         type: this.form.share,
         type: this.form.share,
-
+        purposeType: '0',
         name: this.form.name,
         name: this.form.name,
         pageId: this.currentPage,
         pageId: this.currentPage,
         pageSize: 10
         pageSize: 10
@@ -245,8 +246,10 @@ export default {
         pid: id
         pid: id
       });
       });
       if (res.ResultCode == 0) {
       if (res.ResultCode == 0) {
-        this.$parent.$parent.$parent.agreeInfo = res.Data;
-        this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        // this.$parent.$parent.$parent.agreeInfo = res.Data;
+        // this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        const recipe = { ...res.Data, medicine: res.Data.preStiDetails, __RecipeFrom__: '2' }
+        this.$parent.$parent.$parent.transposition(recipe);
         if (res.Data.diseaseid) {
         if (res.Data.diseaseid) {
           this.$parent.$parent.$parent.$refs.TCM.setParams({
           this.$parent.$parent.$parent.$refs.TCM.setParams({
             namemedicine: res.Data.diseasename,
             namemedicine: res.Data.diseasename,

+ 2 - 2
src/views/hisEnter.vue

@@ -56,8 +56,8 @@ export default {
         loading.close();
         loading.close();
         let preNo = this.$route.query.preNo;
         let preNo = this.$route.query.preNo;
         let path = preNo
         let path = preNo
-          ? `/index/prescribing?recipeID=${preNo}&recipeType=edit`
-          : "/index/prescribing";
+          ? `/index/prescribing?recipeID=${preNo}&recipeType=edit&from=his`
+          : "/index/prescribing?from=his";
         this.setIsSee(true);
         this.setIsSee(true);
         this.setPreNo(preNo || '');
         this.setPreNo(preNo || '');
         await this.$router.push({
         await this.$router.push({