Selaa lähdekoodia

Merge branch 'bugfix' into test

zhangxc 5 vuotta sitten
vanhempi
commit
08725fa763

+ 1 - 0
src/api/config.js

@@ -249,6 +249,7 @@ export default {
     'deptList':testUrl+'/api/precman/moduleInfo_prec/getAllDeptAndDisInfo',    //模板-科室列表
     'getPrecModuleType':testUrl+'/api/precman/moduleInfo_prec/getModuleType',     //获取未创建的模板类型
     'getByIds':'/api/prec/questionInfo/getByIds',// 获取多个问题
+    'getBySubQuestionId':testUrl+'/api/precman/questionInfo_prec/getBySubQuestionId',// 获取是否被关联
      /*********诊断依据*********/
      'exportDiagnosticAll': '/api/knowledgeman/diagnose/exportDiagnosticAll', //诊断依据--导出诊断依据
      'exportDiagnosticBasis': '/api/knowledgeman/diagnose/exportDiagnosticBasis', //诊断依据--导出诊断依据问题

+ 3 - 0
src/api/preTreat.js

@@ -3,6 +3,9 @@ import config from '@api/config.js';
 
 const urls = config.urls;
 export default {
+  getBySubQuestionId(param){
+    return axios.post(urls.getBySubQuestionId,param)
+  },
   getByIds(param){
     return axios.post(urls.getByIds,param)
   },

+ 10 - 0
src/components/preTreat/AddSimpleQuestion.vue

@@ -25,6 +25,7 @@
                     :type="dataPub.region2"
                     @pushValues="pushValues"
                     :hasId="editData.id||''"
+                    :hasPool="hasPool"
                     :options="editData.questionDetailList"></PubSelect>
             <div class="btn">
                 <el-button
@@ -55,6 +56,7 @@
         itemsTypes:[1,2,8],            //有明细的类型
         editData:{},                    //编辑数据
         options: [],           //标签明细右侧操作数据
+        hasPool:true
       }
     },
     beforeMount:function(){
@@ -62,6 +64,14 @@
       if(isEdit||isCopy){
         this.txt = isCopy?'独立填写单维护-复制独立填写单':'独立填写单维护-修改独立填写单';
         this.editData = data;
+        api.getBySubQuestionId({id:data.id}).then((res) => {
+            if (res.data.code === '0') {
+              // console.log(res.data.data)
+              if(res.data.data&&res.data.data.length>0){
+                this.hasPool = false
+              }
+            }
+        })
       }
     },
     methods: {

+ 2 - 2
src/components/preTreat/PubSelect.vue

@@ -91,7 +91,7 @@
           </p>
         </div>
       </div>
-      <div v-if="type==1||type==2" class="bottomPartLeft">
+      <div v-if="(type==1||type==2)&&hasPool" class="bottomPartLeft">
         <p class="poolTitle">标签池</p>
         <div class="pool">
           <el-input placeholder="请输入搜索内容" v-model="searchVal">
@@ -255,7 +255,7 @@ import Vue from "vue";
 const initRow = { orderNo: 0, name: "", description: "", exclusion: 0 };
 const initRows = utils.getInitRow(initRow, 4);
 export default {
-  props: ["type", "options", "ascription", "sexType","hasId"],
+  props: ["type", "options", "ascription", "sexType","hasId","hasPool"],
   data() {
     return {
       rows: [...initRows],