瀏覽代碼

4001 => -1; 脱敏

yuwandanmian 2 年之前
父節點
當前提交
ce6c5431d4
共有 4 個文件被更改,包括 103 次插入97 次删除
  1. 1 1
      src/axios/index.js
  2. 1 1
      src/axios/index2.js
  3. 1 1
      src/axios/index3.js
  4. 100 94
      src/views/allcase/caseViews.vue

+ 1 - 1
src/axios/index.js

@@ -81,7 +81,7 @@ service.interceptors.response.use(
       // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 VXAdmin 请求最新版本
       return dataAxios;
     } else {
-      if (code == 4001) {
+      if (code == -1) {
         messageOnce.error({
           message: `${dataAxios.msg}`,
           type: 'error',

+ 1 - 1
src/axios/index2.js

@@ -80,7 +80,7 @@ service2.interceptors.response.use(
       // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 VXAdmin 请求最新版本
       return dataAxios;
     } else {
-      if (code == 4001) {
+      if (code == -1) {
         messageOnce.error({
           message: `${dataAxios.msg}`,
           type: 'error',

+ 1 - 1
src/axios/index3.js

@@ -80,7 +80,7 @@ service3.interceptors.response.use(
       // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 VXAdmin 请求最新版本
       return dataAxios;
     } else {
-      if (code == 4001) {
+      if (code == -1) {
         messageOnce.error({
           message: `${dataAxios.msg}`,
           type: 'error',

+ 100 - 94
src/views/allcase/caseViews.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="MyDiv" :class="{'nocopy': $route.query.status }">
+  <div id="MyDiv" :class="{ nocopy: $route.query.status }">
     <div class="header">
       <el-button @click="getback">返回</el-button>
     </div>
@@ -28,7 +28,15 @@
             </div>
             <!-- 病程记录、手术记录 -->
             <div v-if="[294, 303].includes(item.bllb)">
-              <div :class="['li-left-item-li', is_active == jitem.blbh ? 'is-active' : '']" v-for="(jitem, jindex) in item.list" :key="jindex" :id="`${jitem.blbh}`" :title="jitem.name.trim()">{{ jitem.name.trim() }}</div>
+              <div
+                :class="['li-left-item-li', is_active == jitem.blbh ? 'is-active' : '']"
+                v-for="(jitem, jindex) in item.list"
+                :key="jindex"
+                :id="`${jitem.blbh}`"
+                :title="jitem.name.trim()"
+              >
+                {{ jitem.name.trim() }}
+              </div>
             </div>
           </li>
         </ul>
@@ -41,7 +49,7 @@
           <!-- 入院记录 -->
           <admissionRecord :data="admissionRecord" :ifFile="ifFile"></admissionRecord>
         </div>
-        <div v-else-if="parentType == '1'&&is_active == 1">
+        <div v-else-if="parentType == '1' && is_active == 1">
           <!-- 出院记录 -->
           <OutHospitalRecord :data="outHospitalRecordData" />
         </div>
@@ -67,23 +75,23 @@
           <!-- 临时医嘱 -->
           <medicalTemporary :dataObj="happensAdvice"></medicalTemporary>
         </div>
-        <div v-else-if="parentType == '2000002'&&is_active == '1'">
-            <!-- 病例图文报告 -->
-            <caseImageText :dataObjArr="pacsDetail" ></caseImageText>
+        <div v-else-if="parentType == '2000002' && is_active == '1'">
+          <!-- 病例图文报告 -->
+          <caseImageText :dataObjArr="pacsDetail"></caseImageText>
         </div>
-        <div v-else-if="parentType == '2000002'&&is_active == '2'">
+        <div v-else-if="parentType == '2000002' && is_active == '2'">
           <!-- 超声诊断 -->
           <ultrasound :dataObjArr="pacsDetail"></ultrasound>
         </div>
-        <div v-else-if="parentType == '2000002'&&is_active == '3'">
+        <div v-else-if="parentType == '2000002' && is_active == '3'">
           <!-- 影像诊断 -->
           <imaging :dataObjArr="pacsDetail"></imaging>
         </div>
-        <div v-else-if="parentType == '2000002'&&is_active == '4'">
+        <div v-else-if="parentType == '2000002' && is_active == '4'">
           <!-- 为心电 -->
           <electrocar :dataObjArr="pacsDetail"></electrocar>
         </div>
-        <div v-else-if="parentType == '2000002'&&is_active == '5'">
+        <div v-else-if="parentType == '2000002' && is_active == '5'">
           <!-- 检验报告单 病理 -->
           <checkout :dataObjArr="pacsDetail"></checkout>
         </div>
@@ -139,7 +147,7 @@ export default {
     ShouShuRecord2,
     ShouShuRecord4,
     NoFormatText,
-    OutHospitalRecord
+    OutHospitalRecord,
   },
   directives: {},
   filters: {},
@@ -158,7 +166,7 @@ export default {
       ifFile: false,
       treeList: [],
       is_active: 0,
-      parentType:0,
+      parentType: 0,
       name_title: '',
       text: '',
       update: true,
@@ -171,7 +179,7 @@ export default {
         ssqk: [],
         sscxsj: [],
         sslb: [],
-        is_format: 0
+        is_format: 0,
       },
       outHospitalRecordData: {
         name: {},
@@ -185,51 +193,51 @@ export default {
         zljg: {},
         cyqk: {},
         cyzd: {},
-        cyyz: {}
-      }
+        cyyz: {},
+      },
     };
   },
   computed: {
     bcjlLiIds() {
       // 病程记录子项数据
-      const arr = Object.values(this.treeList).filter(item => item.bllb === 294)
-      const liIds = []
+      const arr = Object.values(this.treeList).filter(item => item.bllb === 294);
+      const liIds = [];
       if (arr.length) {
         if (arr[0].list) {
-          for (let i=0; i<arr[0].list.length; i++) {
-            liIds.push(arr[0].list[i].blbh)
+          for (let i = 0; i < arr[0].list.length; i++) {
+            liIds.push(arr[0].list[i].blbh);
           }
         }
       }
-      return liIds
+      return liIds;
     },
     shoushuLiIds() {
       // 病程记录子项数据
-      const arr = Object.values(this.treeList).filter(item => item.bllb === 303)
-      const liIds = []
+      const arr = Object.values(this.treeList).filter(item => item.bllb === 303);
+      const liIds = [];
       if (arr.length) {
         if (arr[0].list) {
-          for (let i=0; i<arr[0].list.length; i++) {
-            liIds.push(arr[0].list[i].blbh)
+          for (let i = 0; i < arr[0].list.length; i++) {
+            liIds.push(arr[0].list[i].blbh);
           }
         }
       }
-      return liIds
+      return liIds;
     },
     blname_title() {
-      let title
-      const type = this.surgeryData.type
+      let title;
+      const type = this.surgeryData.type;
       if (type === 1) {
-        title = '手术风险评估表'
+        title = '手术风险评估表';
       } else if (type === 2) {
-        title = '手术安全核查表'
+        title = '手术安全核查表';
       } else if (type === 3) {
-        title = '手术同意书'
+        title = '手术同意书';
       } else if (type === 4) {
-        title = '手术记录'
+        title = '手术记录';
       }
-      return title
-    }
+      return title;
+    },
   },
   watch: {},
   mounted() {
@@ -266,9 +274,9 @@ export default {
     funQuery() {
       const params = {
         id: this.valData,
-      }
+      };
       if (this.$route.query.status) {
-        params.is_tm = 1
+        params.is_tm = 1;
       }
       this.$axios.post('/medical_record', params).then(res => {
         this.mainHomeData = res.data;
@@ -298,7 +306,6 @@ export default {
       } else if (b == 294) {
         that.is_active = event.target.id;
       } else if (b == 303) {
-        console.log(b, event.target.id, 'event.target.id6546546')
         that.is_active = event.target.id;
       } else {
         that.is_active = b;
@@ -310,30 +317,26 @@ export default {
         const params = {
           MED_REC_ID: that.valData,
           bllb: b,
-        }
+        };
         if (this.$route.query.status) {
-          params.is_tm = 1
+          params.is_tm = 1;
         }
-        that.$axios
-          .post('/getAllCase', params)
-          .then(res => {
-            that.text = res.data.text;
-            that.reload();
-          });
+        that.$axios.post('/getAllCase', params).then(res => {
+          that.text = res.data.text;
+          that.reload();
+        });
       } else if (b == 292) {
         // 获取详情
         const params = {
           id: this.valData,
           bllb: b,
-        }
+        };
         if (this.$route.query.status) {
-          params.is_tm = '1'
+          params.is_tm = '1';
         }
-        that.$axios
-          .post('/get_case_platform', params)
-          .then(res => {
-            this.admissionRecord = res.data;
-          });
+        that.$axios.post('/get_case_platform', params).then(res => {
+          this.admissionRecord = res.data;
+        });
         // 获取质控结果 -- 入院记录
         that.$axios
           .post('/get_case', {
@@ -348,53 +351,55 @@ export default {
         const params = {
           id: this.valData,
           bllb: b,
-        }
+        };
         if (this.$route.query.status) {
-          params.is_tm = 1
+          params.is_tm = 1;
         }
-        that.$axios
-          .post('/get_case_platform', params)
-          .then(res => {
-            this.outHospitalRecordData = res.data;
-          });
+        that.$axios.post('/get_case_platform', params).then(res => {
+          this.outHospitalRecordData = res.data;
+        });
       }
       if (that.is_active == '长期医嘱') {
         // 长期医嘱
-        that.$axios
-          .post('/long', {
-            AAA28: that.valData,
-          })
-          .then(res => {
-            this.longAdvice = res.data;
-          });
+        const params = {
+          AAA28: that.valData,
+        };
+        if (this.$route.query.status) {
+          params.is_tm = 1;
+        }
+        that.$axios.post('/long', params).then(res => {
+          this.longAdvice = res.data;
+        });
       }
       if (that.is_active == '临时医嘱') {
-        // 长期医嘱
-        that.$axios
-          .post('/temporary', {
-            AAA28: that.valData,
-          })
-          .then(res => {
-            this.happensAdvice = res.data;
-          });
+        // 临时医嘱
+        const params = {
+          AAA28: that.valData,
+        };
+        if (this.$route.query.status) {
+          params.is_tm = 1;
+        }
+        that.$axios.post('/temporary', params).then(res => {
+          this.happensAdvice = res.data;
+        });
       }
-      if (that.parentType == '2000002'&&that.is_active !=''){ 
+      if (that.parentType == '2000002' && that.is_active != '') {
         // 报告单 相关
-        let  parm = {
-          type:Number(that.is_active)
+        let parm = {
+          type: Number(that.is_active),
         };
         if (this.$route.query.status) {
-          parm.is_tm = 1
+          parm.is_tm = 1;
         }
-        let treeListArr = Object.values(that.treeList)
-        treeListArr.forEach((item,index)=> {
-          if(item.bllb == 2000002){
-            parm.zyh = Number(item.list[0].ZYH)
+        let treeListArr = Object.values(that.treeList);
+        treeListArr.forEach((item, index) => {
+          if (item.bllb == 2000002) {
+            parm.zyh = Number(item.list[0].ZYH);
           }
         });
 
-        that.$axios.post('/get_pacs_data',parm).then(res => {
-         this.pacsDetail = res.data
+        that.$axios.post('/get_pacs_data', parm).then(res => {
+          this.pacsDetail = res.data;
         });
       }
 
@@ -405,29 +410,30 @@ export default {
       //     this.pacsDetail = res.data;
       //   });
       // }
-      console.log(item, 'that.is_active')
       // 病程记录
       if (item.bllb === 294) {
         // 请求前先重置之前的数据
-        that.caseRecodeInfo = {}
-        let parm = {'blbh': that.is_active };
+        that.caseRecodeInfo = {};
+        let parm = { blbh: that.is_active };
         if (this.$route.query.status) {
-          parm.is_tm = 1
+          parm.is_tm = 1;
         }
         that.$axios.post('/get_bc_data', parm).then(res => {
-          that.caseRecodeInfo = res.data[0].bc_data
-          that.caseRecodeInfo.is_format = res.data[0].is_format
+          that.caseRecodeInfo = res.data[0].bc_data;
+          that.caseRecodeInfo.is_format = res.data[0].is_format;
         });
       }
       // 手术记录
       if (item.bllb === 303) {
         // 请求前先重置之前的数据
-        that.surgeryData = {}
-        let parm = {'blbh': that.is_active };
+        that.surgeryData = {};
+        let parm = { blbh: that.is_active };
+        if (this.$route.query.status) {
+          parm.is_tm = 1;
+        }
         that.$axios.post('/get_surgery_data', parm).then(res => {
-          console.log(res, '手术记录')
-          that.surgeryData = res.data[0].surgery_data
-          that.surgeryData.is_format = res.data[0].is_format
+          that.surgeryData = res.data[0].surgery_data;
+          that.surgeryData.is_format = res.data[0].is_format;
         });
       }
     },