Browse Source

模板bug修改

Luolei 6 years ago
parent
commit
fa61406f12

+ 10 - 12
src/components/icss/CommonTemplate.vue

@@ -38,28 +38,27 @@
     </div>
     <div class="bottomPartRight bottomPartRightTemplate">
       <p class="poolTitle poolTitleTmp">模板内容:
-        <span style="color:#22ccc8;fontSize:12px" v-if="type == 1">特殊标记1-只可放入主诉模块中,放入其他模块数据会显示异常;</span>
-        <span style="color:#22ccc8;fontSize:12px" v-if="type == 2">特殊标记4-只可放入现病史模块中,放入其他模块数据会显示异常;</span>
-        <span style="color:#22ccc8;fontSize:12px" v-if="type == 322 || type == 32 || type == 31">特殊标记1-只可放入主诉模块中,放入其他模块数据会显示异常;特殊标记4-只可放入现病史模块中,放入其他模块数据会显示异常;</span>
+        <span style="color:#22ccc8;fontSize:12px" v-if="type == 1 || type == 31">特殊标记1-只可放入主诉模块中,放入其他模块数据会显示异常;模版内容中至少需要1或4特殊标记,保证功能的正常使用;</span>
+        <span style="color:#22ccc8;fontSize:12px" v-if="type == 2 || type == 22 || type == 322 || type == 32">特殊标记4-只可放入现病史模块中,放入其他模块数据会显示异常;模版内容中至少需要1或4特殊标记,保证功能的正常使用;</span>
       </p>
-      <div v-if="type == 322 || type == 32 || type == 31">
-        <span style="marginLeft:10px;">
+      <div>
+        <span style="marginLeft:10px;" v-if="type == 31">
           <el-button v-if="flagLisFst == 1" type="primary" class="flagStyle" size="mini" @click="addFlg(1)" :disabled="flagLisSec == 4">1、标示主诉中添加症状展示位置</el-button>
           <el-button v-else class="flagStyle" size="mini" @click="addFlg(1)" :disabled="flagLisSec == 4">1、标示主诉中添加症状展示位置</el-button>
         </span>
-        <span style="marginLeft:10px;">
+        <span style="marginLeft:10px;" v-if="type == 322 || type == 32">
           <el-button style="marginTop:3px;" v-if="flagLisSec == 4" type="primary" class="flagStyle" size="mini" @click="addFlg(4)" :disabled="flagLisFst == 1">4、标示在主诉中症状引用到现病史中展示位置
 和添加症状位置</el-button>
           <el-button style="marginTop:3px;" v-else class="flagStyle" size="mini" @click="addFlg(4)" :disabled="flagLisFst == 1">4、标示在主诉中症状引用到现病史中展示位置
 和添加症状位置</el-button>
         </span>
       </div>
-      <div class="arrowWrap" style="float:right;marginRight:10px" v-if="type != 1 && type != 2">
+      <div class="arrowWrap" style="float:right;marginRight:10px" v-if="type != 1 && type != 2 && type != 22">
         <el-button size="mini" @click="addDomTemplate(1)" v-if="type != 5 && type != 6 && type != 7 && type != 8">插入输入栏</el-button>
         <i class="el-icon-arrow-left arrowWrapPub" @click="moveTag(0)"></i>
         <i class="el-icon-arrow-right arrowWrapPub" @click="moveTag(1)"></i>
       </div>
-      <div class="formWrap" v-if="type == 1 || type == 2">
+      <div class="formWrap" v-if="type == 1 || type == 2 || type == 22">
           <el-form
             class="subTemplate"
             :model="form"
@@ -87,7 +86,7 @@
                 <el-button v-if="flagLisFst == 1" type="primary" class="flagStyle" size="mini" @click="addFlg(1)">1、标示主诉中添加症状展示位置</el-button>
                 <el-button v-else class="flagStyle" size="mini" @click="addFlg(1)">1、标示主诉中添加症状展示位置</el-button>
               </span>
-              <span v-if="type == 2" style="marginLeft:10px;">
+              <span v-if="type == 2 || type == 22" style="marginLeft:10px;">
                 <el-button v-if="flagLisSec == 4" type="primary" class="flagStyle" size="mini" @click="addFlg(4)">4、标示在主诉中症状引用到现病史中展示位置
 和添加症状位置</el-button>
                 <el-button v-else class="flagStyle" size="mini" @click="addFlg(4)">4、标示在主诉中症状引用到现病史中展示位置
@@ -468,7 +467,6 @@ export default {
     searchTagList() {
       let notIds = []
       let tmpArr = this.rightTagsList.slice();
-      // console.log(tmpArr)
       for (let i = 0; i < tmpArr.length; i++) {
         if(tmpArr[i].type != 'sub' && tmpArr[i].type != 'input'){
           notIds.push(tmpArr[i].id)
@@ -478,7 +476,7 @@ export default {
         "tagName": this.searchVal,
         "type": this.type == 3?3:1,
         "notIds": notIds,
-        "notTagType": [3,4,8,10]
+        "notTagType": this.type == 3?[3,8,10]:[3,4,8,10]
       }
       api.searchTagList(param).then((res) => {
         if (res.data.code === '0') {
@@ -491,7 +489,7 @@ export default {
     getSubTemplate() {
       let param = {
         noIds:this.subTmpList,
-        type:this.type,
+        type:'3'+this.type,
         moduleType: this.signe,
         relationId: this.rela
       }

+ 14 - 1
src/components/icss/TemplateMaintenanceWrap.vue

@@ -65,7 +65,6 @@ export default {
   methods: {
     back() { this.$router.go(-1) },
     staticOwn(val){
-      console.log(val,'change555')
       this.staticOwnTo = val
     },
     changeVal(val) {    //子组件数据改变传递到父组件
@@ -84,6 +83,7 @@ export default {
       //仍需验证标签明细是否选择
       let type = this.dataPub.region1,name=this.dataPub.region2;
       let detailLis = utils.orderTemplateData(this.sendIds)
+      console.log(detailLis,1111111111111)
       if (JSON.stringify(this.sendIds) == '[]' || !detailLis) {
         this.$message({
           message: '模板至少包含一个标签池标签',
@@ -97,6 +97,19 @@ export default {
         });
         return;
       }
+      // let numplus = 0;
+      // for(let k = 0;k < detailLis.length;k++){
+      //   if((detailLis[k].flag && detailLis[k].flag != 3) || (type == 322 || type == 32 || type == 31)){
+      //     ++numplus
+      //   }
+      // }
+      // if(numplus == 0){
+      //   this.$message({
+      //     message: '除子模板外,其他模板内容中至少给一个标签打上标记',
+      //     type: 'warning'
+      //   });
+      //   return;
+      // }
       let param = {
         "modelDetils": detailLis,
         "name": name,