Quellcode durchsuchen

Merge remote-tracking branch 'origin/testedMerge'

zhouna vor 5 Jahren
Ursprung
Commit
56c5f42845

+ 1 - 0
src/api/config.js

@@ -249,6 +249,7 @@ export default {
     'deptList':testUrl+'/api/precman/moduleInfo_prec/getAllDeptAndDisInfo',    //模板-科室列表
     'deptList':testUrl+'/api/precman/moduleInfo_prec/getAllDeptAndDisInfo',    //模板-科室列表
     'getPrecModuleType':testUrl+'/api/precman/moduleInfo_prec/getModuleType',     //获取未创建的模板类型
     'getPrecModuleType':testUrl+'/api/precman/moduleInfo_prec/getModuleType',     //获取未创建的模板类型
     'getByIds':'/api/prec/questionInfo/getByIds',// 获取多个问题
     'getByIds':'/api/prec/questionInfo/getByIds',// 获取多个问题
+    'getBySubQuestionId':testUrl+'/api/precman/questionInfo_prec/getBySubQuestionId',// 获取是否被关联
      /*********诊断依据*********/
      /*********诊断依据*********/
      'exportDiagnosticAll': '/api/knowledgeman/diagnose/exportDiagnosticAll', //诊断依据--导出诊断依据
      'exportDiagnosticAll': '/api/knowledgeman/diagnose/exportDiagnosticAll', //诊断依据--导出诊断依据
      'exportDiagnosticBasis': '/api/knowledgeman/diagnose/exportDiagnosticBasis', //诊断依据--导出诊断依据问题
      '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;
 const urls = config.urls;
 export default {
 export default {
+  getBySubQuestionId(param){
+    return axios.post(urls.getBySubQuestionId,param)
+  },
   getByIds(param){
   getByIds(param){
     return axios.post(urls.getByIds,param)
     return axios.post(urls.getByIds,param)
   },
   },

+ 4 - 1
src/components/common/CopyRightInfo.vue

@@ -2,7 +2,7 @@
     <footer class="copyRightContainer">
     <footer class="copyRightContainer">
         <div>
         <div>
             <span class="copyRightInfo">版权所有:杭州朗通信息技术有限公司</span>
             <span class="copyRightInfo">版权所有:杭州朗通信息技术有限公司</span>
-            <span class="copyRightNum">浙ICP备:10039268号</span>
+            <a class="copyRightNum" href="http://www.beian.miit.gov.cn" target="_blank">浙ICP备:16000400号-2</a>
         </div>
         </div>
     </footer>
     </footer>
 </template>
 </template>
@@ -32,5 +32,8 @@ export default {
 .copyRightInfo {
 .copyRightInfo {
     margin: 0 22px 0 238px;
     margin: 0 22px 0 238px;
 }
 }
+    .copyRightNum{
+        color:#545455
+    }
 </style>
 </style>
 
 

+ 15 - 1
src/components/preTreat/AddSimpleQuestion.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <div class="NoiseTemplateWrapper TemplateWrapper">
+    <div class="NoiseTemplateWrapper TemplateWrapper" @click="hideQas">
         <crumbs
         <crumbs
                 :title="txt"
                 :title="txt"
                 class="topBack"
                 class="topBack"
@@ -20,11 +20,13 @@
             </p>
             </p>
             <PubSelect
             <PubSelect
                     v-if="dataPub.region2==1 || dataPub.region2==2 || dataPub.region2==3 || dataPub.region2==11|| dataPub.region2==8|| dataPub.region2==10"
                     v-if="dataPub.region2==1 || dataPub.region2==2 || dataPub.region2==3 || dataPub.region2==11|| dataPub.region2==8|| dataPub.region2==10"
+                    ref="PubSelect"
                     :ascription="dataPub.region1"
                     :ascription="dataPub.region1"
                     :sexType="dataPub.region7"
                     :sexType="dataPub.region7"
                     :type="dataPub.region2"
                     :type="dataPub.region2"
                     @pushValues="pushValues"
                     @pushValues="pushValues"
                     :hasId="editData.id||''"
                     :hasId="editData.id||''"
+                    :hasPool="hasPool"
                     :options="editData.questionDetailList"></PubSelect>
                     :options="editData.questionDetailList"></PubSelect>
             <div class="btn">
             <div class="btn">
                 <el-button
                 <el-button
@@ -55,6 +57,7 @@
         itemsTypes:[1,2,8],            //有明细的类型
         itemsTypes:[1,2,8],            //有明细的类型
         editData:{},                    //编辑数据
         editData:{},                    //编辑数据
         options: [],           //标签明细右侧操作数据
         options: [],           //标签明细右侧操作数据
+        hasPool:true
       }
       }
     },
     },
     beforeMount:function(){
     beforeMount:function(){
@@ -62,12 +65,23 @@
       if(isEdit||isCopy){
       if(isEdit||isCopy){
         this.txt = isCopy?'独立填写单维护-复制独立填写单':'独立填写单维护-修改独立填写单';
         this.txt = isCopy?'独立填写单维护-复制独立填写单':'独立填写单维护-修改独立填写单';
         this.editData = data;
         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: {
     methods: {
       changeVal(val) {   //子组件数据改变传递到父组件
       changeVal(val) {   //子组件数据改变传递到父组件
         this.dataPub = val;
         this.dataPub = val;
       },
       },
+      hideQas(){
+        this.$refs.PubSelect&&this.$refs.PubSelect.hideQas()
+      },
       pushValues(its){
       pushValues(its){
         this.options = its;
         this.options = its;
       },
       },

+ 17 - 10
src/components/preTreat/PubSelect.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div class="single-container">
+  <div class="single-container" @click="hideQas">
     <el-form>
     <el-form>
       <div class="operation-row">
       <div class="operation-row">
         <el-checkbox-group size="small">
         <el-checkbox-group size="small">
@@ -51,7 +51,7 @@
             ></el-input>
             ></el-input>
           </div>
           </div>
           <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
           <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
-          <span :class="tagActive===i?'tag-active el-tag--mini el-tag el-tag--info':'el-tag--mini el-tag el-tag--info'" v-if="it.exclusionCon" @click="getConnectedQas(it.subQuestion,i)">已关联</span>
+          <span :class="tagActive===i?'tag-active el-tag--mini el-tag el-tag--info':'el-tag--mini el-tag el-tag--info'" v-if="it.exclusionCon" @click="getConnectedQas($event,it.subQuestion,i)">已关联</span>
         </el-col>
         </el-col>
         <el-button @click="addRow">+</el-button>
         <el-button @click="addRow">+</el-button>
         <div class="bottomPartMid bottomPartMidss">
         <div class="bottomPartMid bottomPartMidss">
@@ -62,7 +62,7 @@
             <span class="el-icon-arrow-down" @click="orderUpDown(1)"></span>
             <span class="el-icon-arrow-down" @click="orderUpDown(1)"></span>
           </p>
           </p>
         </div>
         </div>
-        <div class="connected-qas" v-if="showQas.length>0">
+        <div class="connected-qas" @click.stop v-if="showQas.length>0">
           <p style="margin-bottom: 10px;">关联的问题:</p>
           <p style="margin-bottom: 10px;">关联的问题:</p>
           <p v-for="(qa,i) in showQas">{{i+1}}. {{qa.name}}</p>
           <p v-for="(qa,i) in showQas">{{i+1}}. {{qa.name}}</p>
         </div>
         </div>
@@ -91,7 +91,7 @@
           </p>
           </p>
         </div>
         </div>
       </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>
         <p class="poolTitle">标签池</p>
         <div class="pool">
         <div class="pool">
           <el-input placeholder="请输入搜索内容" v-model="searchVal">
           <el-input placeholder="请输入搜索内容" v-model="searchVal">
@@ -202,7 +202,7 @@
     margin: 20px 150px 20px 30%;
     margin: 20px 150px 20px 30%;
     .bottomPartMid {
     .bottomPartMid {
       top: 0;
       top: 0;
-      right: 40%;
+      right: 5%;
     }
     }
   }
   }
   .inps {
   .inps {
@@ -255,10 +255,11 @@ import Vue from "vue";
 const initRow = { orderNo: 0, name: "", description: "", exclusion: 0 };
 const initRow = { orderNo: 0, name: "", description: "", exclusion: 0 };
 const initRows = utils.getInitRow(initRow, 4);
 const initRows = utils.getInitRow(initRow, 4);
 export default {
 export default {
-  props: ["type", "options", "ascription", "sexType","hasId"],
+  props: ["type", "options", "ascription", "sexType","hasId","hasPool"],
   data() {
   data() {
     return {
     return {
       rows: [...initRows],
       rows: [...initRows],
+      selectIndex: -1,
       checkedExc: false,
       checkedExc: false,
       checkedCon: false,
       checkedCon: false,
       focusOn: -1, //聚焦的行index
       focusOn: -1, //聚焦的行index
@@ -305,8 +306,10 @@ export default {
       this.searchTagList();
       this.searchTagList();
     },
     },
     focusOn(newVal) {
     focusOn(newVal) {
+      this.selectIndex = newVal
       this.checkedExc = this.rows[newVal].exclusion === 1;
       this.checkedExc = this.rows[newVal].exclusion === 1;
       this.checkedCon = this.rows[newVal].exclusionCon === 1;
       this.checkedCon = this.rows[newVal].exclusionCon === 1;
+      this.searchTagList()
     },
     },
     /*type() {
     /*type() {
         this.initData();
         this.initData();
@@ -316,10 +319,10 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
-    getConnectedQas(ids,n){
+    getConnectedQas(e,ids,n){
+      e.stopPropagation();
       if(this.tagActive===n){
       if(this.tagActive===n){
-        this.tagActive=-1;
-        this.showQas=[];
+       this.hideQas()
         return;
         return;
       }
       }
       this.tagActive=n;
       this.tagActive=n;
@@ -351,6 +354,10 @@ export default {
         }
         }
       });
       });
     },
     },
+    hideQas(){
+      this.tagActive=-1;
+      this.showQas =[]
+    },
     selectLeftTag(tag) {
     selectLeftTag(tag) {
       const hasTag = this.isHasTag(tag, this.selectLeftTagsList);
       const hasTag = this.isHasTag(tag, this.selectLeftTagsList);
       if (hasTag) {
       if (hasTag) {
@@ -376,7 +383,7 @@ export default {
     searchTagList() {
     searchTagList() {
       let ids = []
       let ids = []
       this.rows.map((it, x) => {
       this.rows.map((it, x) => {
-        if (it.subQuestion) {
+        if (it.subQuestion&&this.selectIndex===x) {
           ids=ids.concat(it.subQuestion.split(','))
           ids=ids.concat(it.subQuestion.split(','))
         }
         }
       });
       });