ソースを参照

3.2 中医诊疗→智能开方页,新增 统建处方

cc12458 1 年間 前
コミット
95359f61f3

+ 4 - 0
src/utils/minix/prescribing.js

@@ -4,6 +4,7 @@ export default {
     data() {
         return {
             showCase: false, // 参考医案弹窗
+            showUnifyPresc: false, // 统建处方弹窗
             showPresc: false, // 方剂 协定方弹窗
             showSafeD: false, // 安全合理用药
             isShrink: false, // 是否是收缩状态
@@ -77,6 +78,9 @@ export default {
         openPrec() {
             this.showPresc = true
         },
+        openUnifyPrescPrec() {
+            this.showUnifyPresc = true
+        },
         opensafeD() {
             this.showSafeD = true
         },

+ 19 - 0
src/views/diagnosis/Prescribing.vue

@@ -313,6 +313,7 @@
         </div>
         <!-- 右侧按钮 -->
         <div class="flex-vertical-center-r flex-wrap">
+          <el-button size="mini" @click="openUnifyPrescPrec" type="primary">统建处方</el-button>
           <el-button
             size="mini"
             type="primary"
@@ -1055,6 +1056,20 @@
       </div>
     </Popup>
 
+    <!-- 查询统建处方 页面768 -->
+    <Popup
+      :showDialog="showUnifyPresc"
+      @cancle="showUnifyPresc=false"
+      title="查询统建处方"
+      :showBtns="false"
+      width="700px"
+      distanceTop="5vh"
+    >
+      <div slot="body">
+        <UnifyPrescription></UnifyPrescription>
+      </div>
+    </Popup>
+
     <!-- 安全合理用药弹窗 -->
     <!-- 查询协定方 方剂 页面768 -->
     <Popup
@@ -1106,6 +1121,7 @@ import submitRecipe from "./components/submitRecipe.vue";
 import TCMDiagnosis from "../../components/TCMDiagnosis.vue";
 import doctorCase from "./components/doctorCase.vue";
 import prescription from "./components/prescription.vue";
+import UnifyPrescription from "./components/prescription-unify.vue";
 import safeDrug from "./components/safeDrug.vue";
 import medAdress from "./components/medAddress.vue";
 import medAdressNew from "./components/medAddressNew.vue";
@@ -1156,6 +1172,7 @@ export default {
     TCMDiagnosis,
     submitRecipe,
     prescription,
+    UnifyPrescription,
     doctorCase,
     safeDrug,
     medAdress,
@@ -2515,6 +2532,7 @@ export default {
       this.showAgree = false;
       this.showExpr = false;
       this.showPresc = false;
+      this.showUnifyPresc = false;
 
       data1.getPharmacyID();
     },
@@ -4078,6 +4096,7 @@ export default {
           this.showTestCase = false;
           this.showDialog = false;
           this.showPresc = false;
+          this.showUnifyPresc = false;
           loading.close();
         }
       } else if (this.container_i == 2) {

+ 256 - 0
src/views/diagnosis/components/prescription-unify.vue

@@ -0,0 +1,256 @@
+<template>
+  <!-- 查询统建处方 -->
+  <div class="prescription">
+    <!-- 搜索条件 -->
+    <div class="top-filter">
+      <el-form label-position="left" label-width="70px" :model="form" inline>
+        <el-form-item label="方名">
+          <el-input v-model="form.name" size="small" placeholder="请输入"></el-input>
+        </el-form-item>
+        <el-form-item label="共享状态" v-if="activeName === '2'">
+          <el-select v-model="form.share" placeholder="请选择" size="small">
+            <!-- <el-option
+              :label="item.name"
+              :value="item.pid"
+              v-for="(item,index) in shareSelect"
+              :key="index"
+            ></el-option>-->
+            <el-option label="个人" :value="0"></el-option>
+            <el-option label="二级科室" :value="1"></el-option>
+            <el-option label="科室" :value="2"></el-option>
+            <el-option label="本院" :value="3"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-button size="small" type="primary" @click="searchDis">搜索</el-button>
+      <el-button size="small" type="warning" @click="clearDis">清空</el-button>
+    </div>
+    <!-- 表格数据展示 -->
+    <div class="table">
+      <!-- 统建处方(协定方)表格 -->
+      <el-table :data="tableData1" border style="width: 100%" v-if="activeName === '2'">
+        <el-table-column prop="name" label="方名" align="center"></el-table-column>
+        <el-table-column prop="chinesesymptom" label="是否可修改" align="center" width="95">
+          <template slot-scope="scope">
+            <div>{{ scope.row.type==0?'是':'否' }}</div>
+          </template>
+        </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="book" label="共享状态" align="center">
+          <template slot-scope="scope">
+            <div>{{ scope.row.showType |filterShowType}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="address" label="操作" width="80" align="center">
+          <template slot-scope="scope">
+            <el-button size="mini" type="primary" @click="handleAgree(scope)">转方</el-button>
+            <!-- <el-button size="mini" type="warning" @click="viewCaseDetail(scope)">合方</el-button> -->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 分页数据 -->
+    <div class="paging">
+      <el-pagination
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="10"
+        :total="total"
+        background
+        layout=" prev, pager, next, jumper"
+      ></el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import { getAccordShareList } from "@/api/business.js";
+import { getEffectQuery, getPrescriptionsList } from "@/api/knowledge.js";
+import { getAgreeRecipe, getAccordDetail } from "@/api/diagnosis.js";
+export default {
+  data() {
+    return {
+      activeName: "2",
+      form: {
+        name: "", // 方名
+        type: "", // 类型
+        share: "", // 共享状态
+        purposeType: "1", // 用途类型 1 八病九方
+      },
+      shareSelect: [],
+      types: [],
+      tableData: [],
+      tableData1: [],
+      currentPage: 1,
+      total: 0
+    };
+  },
+  created() {
+    this.getAccordShareList();
+    this.getEffectQuery();
+    // this.getPrescriptionsList();
+    this.getAgreeRecipe();
+  },
+  filters: {
+    filterShowType(val) {
+      if (val == 0) return "个人";
+      if (val == 1) return "二级科室";
+      if (val == 2) return "科室";
+      if (val == 3) return "本院";
+    }
+  },
+  methods: {
+    clearDis() {
+      this.currentPage = 1;
+
+      this.form = {
+        name: "", // 方名
+        type: "", // 类型
+        share: "" // 共享状态
+      };
+      if (this.activeName === '2') {
+        this.getAgreeRecipe();
+      }
+    },
+    handleCurrentChange(e) {
+      this.currentPage = e;
+      if (this.activeName === '2') {
+        this.getAgreeRecipe();
+      }
+    },
+    searchDis() {
+      this.currentPage = 1;
+      if (this.activeName === '2') {
+        this.getAgreeRecipe();
+      }
+    },
+    handleClick() {
+      this.currentPage = 1;
+
+      this.form = {
+        name: "", // 方名
+        type: "", // 类型
+        share: "", // 共享状态
+        purposeType: "1", // 用途类型 1 八病九方
+      };
+      if (this.activeName === '2') {
+        this.getAgreeRecipe();
+      }
+    },
+    //   方剂换方/合方
+    handleFj(scope, type) {
+      let item = scope.row;
+      if (type == 1) {
+        // 换
+        this.$parent.$parent.$parent.inferChange(item);
+      } else {
+        // 合
+        this.$parent.$parent.$parent.inferChange1(item);
+      }
+    },
+    // 协定方转方
+    handleAgree(scope) {
+      this.getAccordDetail(scope.row.preId);
+    },
+    // 获取共享至信息
+    async getAccordShareList() {
+      let res = await getAccordShareList();
+      if (res.ResultCode == 0) {
+        this.shareSelect = res.Data;
+      }
+    },
+    // 获取方剂分类
+    async getEffectQuery() {
+      let res = await getEffectQuery({
+        effecttype: "1",
+        effictId: ""
+      });
+
+      if (res.code == 0) {
+        this.types = res.data.effects;
+      }
+    },
+    // 获取方剂列表
+    async getPrescriptionsList() {
+      let params = {
+        pageid: this.currentPage,
+        pagesize: 10,
+        searchtype: "",
+        keyword: this.form.name,
+        effected: this.form.type
+      };
+      let res = await getPrescriptionsList(params);
+      if (res.code == 0) {
+        this.total = res.data.TotalRecordCount;
+        this.tableData = res.data.pres;
+      }
+    },
+    //获取右侧协定方列表
+    async getAgreeRecipe() {
+      let params = {
+        type: this.form.share,
+        purposeType: this.form.purposeType,
+
+        name: this.form.name,
+        pageId: this.currentPage,
+        pageSize: 10
+      };
+      let res = await getAgreeRecipe(params);
+      if (res.ResultCode == 0) {
+        this.total = res.Data.TotalRecordCount;
+        this.tableData1 = res.Data.Items;
+      }
+    },
+    //   获取协定方详情
+    async getAccordDetail(id) {
+      let res = await getAccordDetail({
+        pid: id
+      });
+      if (res.ResultCode == 0) {
+        this.$parent.$parent.$parent.agreeInfo = res.Data;
+        this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        if (res.Data.diseaseid) {
+          this.$parent.$parent.$parent.$refs.TCM.setParams({
+            namemedicine: res.Data.diseasename,
+            disid: res.Data.diseaseid,
+            symptomid: res.Data.symptomid,
+            syndrometypes: res.Data.symptomname,
+            treatment: res.Data.treatment
+          });
+
+          setTimeout(() => {
+            this.$parent.$parent.$parent.tcmClick(false);
+          }, 200);
+        }
+      }
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.top-filter {
+  display: flex;
+  align-items: center;
+  justify-content: flex-start;
+  margin-bottom: 10px;
+}
+
+.top-filter {
+  ::v-deep {
+    .el-input__inner {
+      width: 150px;
+    }
+
+    .el-form--inline .el-form-item {
+      margin-bottom: 0;
+    }
+  }
+}
+
+.paging {
+  margin-top: 10px;
+  display: flex;
+  justify-content: center;
+}
+</style>
+