Bläddra i källkod

模板添加,量表结构维护

Luolei 6 år sedan
förälder
incheckning
180de959d4

+ 22 - 36
src/api/config.js

@@ -136,6 +136,7 @@ export default {
     'getConceptKnowledgeList':'/api/knowledgeman/libraryDetail/getLibraryDetailList', //  术语静态知识列表
     'getConceptKnowledge':'/api/knowledgeman/Knowledge/getConceptKnowledge',//术语静态知识查询
     'getConceptInfo':'/api/knowledgeman/concept/getConceptInfo', //  搜索术语
+    'getAllConcept':'/api/knowledgeman/concept/getAllConcept', //  术语列表
     'versionInfo': 'api/icssman/versionInfo/getVersionInfoAlls', //版本信息
     'addVersInfo': 'api/icssman/versionInfo/saveVersionInfoAlls', //版本信息-添加
     'updateVersInfo': 'api/icssman/versionInfo/updateVersionInfoAlls', //版本信息-修改
@@ -145,46 +146,31 @@ export default {
     'getVersionDetlInfo': 'api/icssman/versionDetail/getDetailById', //版本信息-版本说明列表获取
     'promptServer':'/api/icssman/file/uploadImage',    //静态知识
     /**************医学术语维护****************/
-	'saveConceptInfo':'/api/knowledgeman/libraryDetail/addLibraryDetail',   //保存术语静态知识
+	  'saveConceptInfo':'/api/knowledgeman/libraryDetail/addLibraryDetail',   //保存术语静态知识
     'delConceptInfo':'/api/knowledgeman/libraryDetail/removeLibraryDetail',   //删除术语静态知识
-    'knowledgeName': 'api/knowledgeman/concept/getAllInformation', //医学术语-命名维护
-    'knowledgeUpload': 'api/knowledgeman/concept/conceptInfoExcelIm', //医学术语-命名维护-导入
-    'allKnowledgeType': 'api/knowledgeman/lexicon/getAllLexicon', //医学术语-类型列表
-    'deletMedicalName': 'api/knowledgeman/concept/removeConceptInfo', //医学术语-命名维护-删除
-    'getMedicalDetail': 'api/knowledgeman/concept/getConceptInfoDetail', //医学术语-命名维护-详情
-    'addMedicalName': 'api/knowledgeman/concept/addConceptInfo', //医学术语-命名维护-添加修改
-    'knowledgeRelation': 'api/knowledgeman/relation/getRelationInfoList', //医学术语-关系维护
-    'delKnowledgeRelation': 'api/knowledgeman/relation/removeRelationInfo', //医学术语-关系维护-删除
-    'getAllRelationType': 'api/knowledgeman/lexiconRelationship/getAllLexiconRelationship', //医学术语-关系维护-关系下拉
-    'addRelationConcept': 'api/knowledgeman/relation/addRelationInfo', //医学术语-关系维护-添加
-    'RelationUpload': 'api/knowledgeman/relation/relationInfoExcelIm', //医学术语-关系维护-导入
+    // 'knowledgeName': 'api/knowledgeman/medical/getAllMedicalInfo', //医学术语--命名维护
+    'knowledgeName': 'api/knowledgeman/concept/getAllInformation', //医学术语--命名维护
+    'knowledgeUpload': 'api/knowledgeman/concept/importTermExcel', //医学术语--命名维护-导入
+    'allKnowledgeType': 'api/knowledgeman/type/getAllType', //医学术语--类型列表
+    'deletMedicalName': 'api/knowledgeman/concept/removeConceptInfo', //医学术语--命名维护-删除
+    'getMedicalDetail': 'api/knowledgeman/medical/getMedicalInfo', //医学术语--命名维护-修改获取同义词
+    'knowledgeRelation': 'api/knowledgeman/relation/getAllRelation', //医学术语--关系维护
+    'delKnowledgeRelation': 'api/knowledgeman/relation/removeRelation', //医学术语--关系维护-删除
+    'getAllConcept': 'api/knowledgeman/concept/getAllConcept', //查询所有术语名称
+    'getMedicalInfoList': 'http://192.168.3.101:5050/api/knowledgeman/medical/getMedicalInfoList', //医学术语--属性维护--属性列表
+    'medicalInfoExcelIm': 'http://192.168.3.101:5050/api/knowledgeman/medical/medicalInfoExcelIm', //医学术语--属性维护-术语医学属性excel文件导入
+    'getMedicalInfoDetail': 'http://192.168.3.101:5050/api/knowledgeman/medical/getMedicalInfoDetail', //医学术语--属性维护--属性详情
+    'addMedicalInfo': 'http://192.168.3.101:5050/api/knowledgeman/medical/addMedicalInfo', //医学术语--属性维护--术语医学属性添加或者编辑
+    'removeMedicalInfo': 'http://192.168.3.101:5050/api/knowledgeman/medical/removeMedicalInfo', //医学术语--属性维护--术语医学属性删除
+    'getAllLexiconRelationship':'http://192.168.3.101:5050/api/knowledgeman/lexicon/getAllLexicon', //医学术语--获取所有关系类型
+    'getAllConcept':'http://192.168.3.101:5050/api/knowledgeman/concept/getAllConcept',   //医学术语--获取所有概念(标准术语)
+    'getAllBodypart': 'http://192.168.3.101:5050/api/knowledgeman/bodypart/getAllBodypart',  //医学术语--获取所有部位
     'scaleContentStructure': 'api/icssman/scaleContent/list',  //量表结构维护 -- 列表
     'getAllDeptAndDisInfo': 'api/icssman/moduleInfo/getAllDeptAndDisInfo',  //模板维护-获取科室和疾病所有信息
     'queryEvaluationModulePages': 'api/icssman/evaluationModuleMapping/queryEvaluationModulePages',  //慢病管理评估维护 -- 列表
-    'getMedicalInfoList': '/api/knowledgeman/medical/getMedicalInfoList', //医学术语--属性维护--属性列表
-    'medicalInfoExcelIm': '/api/knowledgeman/medical/medicalInfoExcelIm', //医学术语--属性维护-术语医学属性excel文件导入
-    'getMedicalInfoDetail': '/api/knowledgeman/medical/getMedicalInfoDetail', //医学术语--属性维护--属性详情
-    'addMedicalInfo': '/api/knowledgeman/medical/addMedicalInfo', //医学术语--属性维护--术语医学属性添加或者编辑
-    'removeMedicalInfo': '/api/knowledgeman/medical/removeMedicalInfo', //医学术语--属性维护--术语医学属性删除
-    'getAllLexiconRelationship':'/api/knowledgeman/lexicon/getAllLexicon', //医学术语--获取所有关系类型
-    'getAllConcept':'/api/knowledgeman/concept/getAllConcept',   //医学术语--获取所有概念(标准术语)
-    'getAllBodypart': '/api/knowledgeman/bodypart/getAllBodypart',  //医学术语--获取所有部位
-    'getAllDepts': '/api/knowledgeman/medical/getAllDepts',  //医学术语--获取所有科室
-    'getLisMappingPage': '/api/icssman/lisMapping/getLisMappingPage', //医学数据-化验大小项与公表项维护-列表
-    'addLisMapping': '/api/icssman/lisMapping/addLisMapping',  //医学数据-化验大小项与公表项维护-新增
-    'delLisMappingById': '/api/icssman/lisMapping/delLisMappingById',  //医学数据-化验大小项与公表项维护-单个删除
-    'delLisMappingByIds': '/api/icssman/lisMapping/delLisMappingByIds', //医学数据-化验大小项与公表项维护-批量删除
-    'modifyLisMapping': '/api/icssman/lisMapping/modifyLisMapping',  //医学数据-化验大小项与公表项维护-修改
-    'hasLisMapping': '/api/icssman/lisMapping/hasLisMapping',  //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
-    'getTypeList': 'api/knowledgeman/lexicon/getLexiconList', //术语类型-列表
-    'addType': 'api/knowledgeman/lexicon/addLexicon', //术语类型-添加
-    'getAllLisConcept':'api/knowledgeman/concept/getAllLisConcept',  //医学数据-化验大小项与公表项维护-获取所有化验公表项
-    'queryIndexConfigPages':'api/icssman/indexConfig/queryIndexConfigPages',  //医学数据-慢病指标值关联维护-列表
-    'getIndexConfigLists':'api/icssman/indexConfig/getIndexConfigLists',  //医学数据-慢病指标值关联维护-获取慢病指标值关联
-    'cancelIndexConfigAlls':'api/icssman/indexConfig/cancelIndexConfigAlls',  //医学数据-慢病指标值关联维护-删除慢病指标值关联
-    'saveIndexConfigLists':'api/icssman/indexConfig/saveIndexConfigLists',  //医学数据-慢病指标值关联维护-添加关联
-    'updateIndexConfigList':'api/icssman/indexConfig/updateIndexConfigList',  //医学数据-慢病指标值关联维护-修改关联
-    
+    'insertOrUpdate': 'api/icssman/scaleContent/insertOrUpdate',  //量表结构维护 -- 添加或者更新
+    'deleteScale': 'api/icssman/scaleContent/delete',  //量表结构维护 -- 删除
+    'getModuleType': 'api/icssman/moduleInfo/getModuleType',  //模板维护 -- 类型筛选
 	},
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 9 - 0
src/api/icss.js

@@ -329,4 +329,13 @@ export default {
     updateIndexConfigList(param) {
         return axios.post(urls.updateIndexConfigList, param)    //医学数据-慢病指标值关联维护-修改关联
     },
+    insertOrUpdate(param) {
+        return axios.post(urls.insertOrUpdate, param)    //量表结构--添加或更新
+    },
+    getModuleType(param) {
+        return axios.post(urls.getModuleType, param)    //模板维护 -- 类型筛选
+    },
+    deleteScale(param) {
+        return axios.post(urls.deleteScale, param)    //量表结构 -- 删除
+    },
 }

+ 288 - 78
src/components/icss/ChronicDiseaseAdd.vue

@@ -5,34 +5,31 @@
       class="topBack"
       linkTo="/admin/LT-YXSJWH-LBJGWH"
     ></crumbs>
-    <div class="ChronicDiseaseAddWrap">
+    <div class="ChronicDiseaseAddWrap" @click="close">
       <div class="ChronicDisease">
-        <p class="ChronicDiseaseTop">
+        <p class="ChronicDiseaseTop" v-if="!editData.isEdit">
           <span>选择量表标签:</span>
           <input
             type="text"
             v-model="region"
+            @click.stop
           >
-          <i>搜索</i>
-          <ul>
-            <li>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</li>
-            <li>呵呵呵</li>
-            <li>咯咯咯</li>
+          <i @click.stop="searchTagList">搜索</i>
+          <ul v-if="showLis">
+            <li v-for="item in AdscriptionsType" :key="item.id" @click="selectLis(item.id,item.tagName)">{{item.tagName}}</li>
           </ul>
         </p>
         <p class="ChronicDiseaseBtm">
           <span>已选择量表:</span>
-          <i>{{region}}</i>
+          <i>{{selectName}}</i>
         </p>
       </div>
       <div class="ChronicDiseaseDetail">
         <div class="ChronicDiseaseLeft">
           <h4>操作栏:</h4>
-          <ul>
-            <li>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</li>
-            <li>呵呵呵</li>
-            <li>咯咯咯</li>
-          </ul>
+          <div class="parts" v-for="(item,idx) in parts" :class="selectLeftPart.id == item.id?'selectDom':null" :key="item.id" @click="selectPart(item,1)">
+            {{item.name}}
+          </div>
         </div>
         <div class="bottomPartMid fl">
           <p><span
@@ -46,22 +43,31 @@
         </div>
         <div class="ChronicDiseaseRight">
           <h4>内容池:</h4>
-          <ul>
-            <li>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</li>
-            <li>呵呵呵</li>
-            <li>咯咯咯</li>
-          </ul>
+          <div class="contentWrap">
+            <div class="contentDetail clearfix" v-for="(item,idx) in contentPool" :class="selectRightPart.order == item.order?'selectDom':null" :key="item.order" @click="selectPart(item,2)">
+              <span>{{item.name}}:</span>
+              <div class="contentDetails">
+                <quillEditor v-model="item.content" :options="editorOption" v-if="item.val == 0"></quillEditor>
+              </div>
+            </div>
+          </div>
         </div>
-        <div class="bottomPartMid fl">
+        <div class="bottomPartMid upAndDown">
           <p><span
               class="el-icon-arrow-up"
-              @click="toTopPool"
+              @click="movePool(1)"
             ></span></p>
           <p><span
               class="el-icon-arrow-down"
-              @click="toBtmPool"
+              @click="movePool(2)"
             ></span></p>
         </div>
+        <div class="btn">
+          <el-button
+            type="primary"
+            @click="submitForm"
+          >确 定</el-button>
+        </div>
       </div>
     </div>
   </div>
@@ -69,69 +75,253 @@
 <script>
 import api from '@api/icss.js';
 import utils from '@api/utils.js';
-
+import 'quill/dist/quill.core.css'
+import 'quill/dist/quill.snow.css'
+import 'quill/dist/quill.bubble.css'
+import {quillEditor, Quill} from 'vue-quill-editor'
+import config from '@api/config';
+import {container, ImageExtend, QuillWatch} from 'quill-image-extend-module';
+Quill.register('modules/ImageExtend', ImageExtend);
 /**
  * 归属type
  * 1:主诉模板 2:现病史模板 3:现病史空模板 4 : 其他史模板 5:嵌套模板 6:慢病模板
  */
-
-
 export default {
   data() {
     return {
+      editorOption: {
+        modules: {
+          toolbar: {
+            container: container
+          }
+        }
+      },
       region: '',    //量表标签
+      selectName:'',
+      selectId:'',
       AdscriptionsType: [],
       editData: {},
       minTitle:'量表维护-添加量表',
+      showLis:false,
+      parts:[],
+      selectLeftPart:{},//左侧选中
+      selectRightPart:{},//右侧选中
+      contentPool:[], //内容池
     }
   },
+  beforeMount:function(){
+    let tmpPart = localStorage.getItem('DiseaseManage')
+    this.parts = JSON.parse(tmpPart)
+  },
   mounted() {
-    console.log(this.$route.params, 78787)
     let tmpEditData = this.$route.params
-    this.editData = tmpEditData
     if (tmpEditData.isEdit) {      //修改
-      this.minTitle='量表维护-修改量表', 
-      this.form = Object.assign({}, this.form, editData);
-      this.form.region1 = (editData.type + '')
-      this.form.region2 = editData.name
+      this.editData = tmpEditData
+      this.minTitle='量表维护-修改量表'
+      this.selectName = tmpEditData.data.name
+      this.selectId = tmpEditData.data.id
+      let tmpScale = tmpEditData.data.scale
+      for(let i = 0;i < tmpScale.length;i++){
+        tmpScale[i].val = tmpScale[i].type
+        tmpScale[i].order = tmpScale[i].orderNo
+        tmpScale[i].name = tmpScale[i].type == 0?'文本模块':'推送模块'
+      }
+      this.contentPool = tmpScale
     }
     this.$emit('changeVal', this.form, false)
-    // this.searchTagList()
   },
   methods: {
-    sendData(val) {
-      this.$emit('changeVal', this.form, false)
-    },
     toRightPool() {
-
+      let tmpLeft = JSON.parse(JSON.stringify(this.selectLeftPart))
+      let tmpPool = JSON.parse(JSON.stringify(this.contentPool))
+      if(JSON.stringify(tmpLeft) == '{}'){
+        return
+      }
+      if(tmpLeft.val == 1){
+        for(let i = 0;i < tmpPool.length;i++){
+          if(tmpPool[i].val == 1){
+            // this.$message({
+            //   message: '推送模块只能添加一次',
+            //   type: 'warning'
+            // });
+            return
+          }
+        }
+      }
+      tmpPool.push(tmpLeft)
+      this.selectLeftPart = {}
+      for(let i = 0;i < tmpPool.length;i++){
+        tmpPool[i].order = i+1
+      }
+      this.contentPool = tmpPool
     },
     toLeftPool() {
-
+      let tmpRight = JSON.parse(JSON.stringify(this.selectRightPart))
+      let tmpPool = JSON.parse(JSON.stringify(this.contentPool))
+      if(JSON.stringify(tmpRight) == '{}'){
+        return
+      }
+      tmpPool = tmpPool.filter((item)=>item.order != tmpRight.order)
+      for(let i = 0;i < tmpPool.length;i++){
+        tmpPool[i].order = i+1
+      }
+      this.contentPool = tmpPool
+      this.selectRightPart = {}
     },
-    toTopPool() {
-
+    movePool(dir) {
+      let tmpRight = JSON.parse(JSON.stringify(this.selectRightPart))
+      let tmpPool = JSON.parse(JSON.stringify(this.contentPool))
+      if((dir == 1 && tmpRight.order == 1) || (dir == 2 && tmpRight.order == tmpPool.length)){
+        return
+      }
+      if(JSON.stringify(tmpRight) == '{}'){
+        return
+      }
+      tmpPool = tmpPool.filter((item)=>item.order != tmpRight.order)
+      if(dir == 1){
+        tmpPool.splice(tmpRight.order-2,0,tmpRight)
+        for(let i = 0;i < tmpPool.length;i++){
+          tmpPool[i].order = i+1
+        }
+      }else if(dir == 2){
+        tmpPool.splice(tmpRight.order,0,tmpRight)
+        for(let i = 0;i < tmpPool.length;i++){
+          tmpPool[i].order = i+1
+        }
+      }
+      this.selectRightPart = tmpRight
+      this.contentPool = tmpPool
     },
-    toBtmPool() {
-
+    selectPart(part,dir){
+      if(dir == 1){
+        if(this.selectLeftPart.val == part.val){
+          this.selectLeftPart = {}
+        }else{
+          this.selectLeftPart = part
+        }
+      }else if(dir == 2){
+        if(this.selectRightPart.order == part.order){
+          this.selectRightPart = {}
+        }else{
+          this.selectRightPart = part
+        }
+      }
+    },
+    close(){
+      this.showLis = false
     },
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          this.$emit('validatePass', this.form, false)
-        } else {
-          console.log('error submit!!');
-          return false;
+    selectLis(id,name){
+      this.selectName = name
+      this.selectId = id
+    },
+    searchTagList() {
+      let param = {
+        "tagName": this.region,
+        "type": "21",
+        "filterList":[
+          "scale"
+        ]
+      }
+      api.searchTagList(param).then((res) => {
+        if (res.data.code === '0') {
+          this.AdscriptionsType = res.data.data
+          this.showLis = this.AdscriptionsType.length > 0
         }
-      });
+      })
+    },
+    getParams(){
+      let tmpParams = []
+      let tmpPool = JSON.parse(JSON.stringify(this.contentPool))
+      for(let i = 0;i < tmpPool.length;i++){
+        if(tmpPool[i].val == 0 && !tmpPool[i].content){
+          
+        }else{
+          let tmpObj = {
+            "content": "",
+            "orderNo": '',
+            "type": ''
+          }
+          tmpObj.content = tmpPool[i].content || ''
+          tmpObj.orderNo = tmpPool[i].order
+          tmpObj.type = tmpPool[i].val
+          tmpParams.push(tmpObj)
+        }
+      }
+      return {
+        "content": tmpParams,
+        "scaleId": this.selectId
+      }
+    },
+    submitForm() {
+      if(this.selectName == ''){
+        this.$message({
+          message: '请选择量表标签',
+          type: 'warning'
+        });
+        return
+      }
+      let param = this.getParams();
+      if(param.content.length == 0){
+        this.$message({
+          message: '请添加内容池内容',
+          type: 'warning'
+        });
+        return
+      }
+      this.showConfirmDialog('是否保存该标签组?', () => {
+        api.insertOrUpdate(param).then((res) => {
+          if (res.data.code === '0') {
+            this.warning(res.data.msg || '保存成功', 'success');
+            setTimeout(() => {
+              this.$router.push({
+                path:'/admin/LT-YXSJWH-LBJGWH'
+              })
+            }, 1000);
+          }
+        })
+      })
     },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
+      }).then(() => {
+        resolve();
+      }).catch(() => {});
+    },
+    warning(msg, type,time) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning',
+        duration:time || '3000'
+      })
+    },
+  },
+  components:{
+    quillEditor
   }
 }
 </script>
+<style lang="less">
+.contentDetails{
+  .quill-editor .ql-toolbar.ql-snow .ql-formats  .ql-image,
+  .quill-editor .ql-toolbar.ql-snow .ql-formats  .ql-video,
+  .quill-editor .ql-toolbar.ql-snow .ql-formats  .ql-link{
+    display: none;
+  }
+}
+</style>
+
 <style lang="less" scoped>
 @import "../../less/common.less";
 .topBack {
   top: 0;
 }
+.btn {
+  text-align: right;
+  margin-top: 20px;
+}
 .ChronicDiseaseAddWrap {
   margin: 20px;
   box-sizing: border-box;
@@ -159,20 +349,23 @@ export default {
         width: 56px;
         height: 34px;
         line-height: 32px;
-        border-left: 1px solid #ccc;
+        border-left: 1px solid @icssBorder;
         position: relative;
         left: -57px;
         vertical-align: middle;
         text-align: center;
-        cursor: default;
+        cursor: pointer;
       }
       ul {
-        margin-left: 160px;
         width: 219px;
-        border: 1px solid #ccc;
+        margin-left: 160px;
+        border: 1px solid @icssBorder;
         background: #fff;
-        max-height: 291px;
+        max-height: 200px;
         overflow-y: auto;
+        height: auto;
+        position: absolute;
+        z-index: 9999;
         li {
           border: 1px solid #fff;
           padding-left: 7px;
@@ -183,23 +376,23 @@ export default {
           text-overflow: ellipsis;
         }
         li:hover {
-          border-color: #22ccc8;
+          border-color: @adminBase;
         }
       }
     }
     .ChronicDiseaseBtm {
-      margin: 10px 0;
+      margin: 25px 0 10px 0;
     }
   }
   .ChronicDiseaseDetail {
     padding: 20px;
     overflow: hidden;
-    min-width: 650px;
+    position: relative;
     h4 {
       margin-bottom: 10px;
     }
     .bottomPartMid {
-      width: 60px;
+      width: 80px;
       margin-top: 60px;
       p {
         width: 100%;
@@ -217,34 +410,51 @@ export default {
         }
       }
     }
+    .upAndDown {
+      position: absolute;
+      right: 0;
+      top: 0;
+    }
     .ChronicDiseaseLeft {
       float: left;
+      .parts {
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        margin: 20px 0;
+        background-color: #f5f5f5;
+        border: 1px solid @icssBorder;
+        padding: 10px 20px;
+        color: #333;
+        cursor: pointer;
+      }
     }
   }
   .ChronicDiseaseRight {
-    float: left;
-    ul {
-      width: auto;
+    padding-right: 50px;
+    .contentWrap {
+      color: #333;
+      min-width: 400px;
+      min-height: 500px;
+      max-height: 600px;
+      border: 1px dashed @icssBorder;
+      background: #fff;
+      overflow-y: auto;
+      .contentDetail {
+        border: 1px solid #fff;
+        padding: 5px;
+        margin: 5px;
+        .contentDetails {
+          margin-top: 6px;
+          min-height: 60px;
+          width: 100%;
+          background-color: #f5f5f5;
+        }
+      }
     }
   }
-  ul {
-    width: 219px;
-    border: 1px solid #ccc;
-    background: #fff;
-    height: 400px;
-    overflow-y: auto;
-    li {
-      border: 1px solid #fff;
-      padding: 0 7px;
-      height: 27px;
-      line-height: 27px;
-      overflow: hidden;
-      white-space: nowrap;
-      text-overflow: ellipsis;
-    }
-    li:hover {
-      border-color: #22ccc8;
-    }
+  .selectDom {
+    border: 1px solid @adminBase !important;
   }
 }
 </style>

+ 16 - 12
src/components/icss/ChronicDiseaseStructureList.vue

@@ -74,7 +74,6 @@
       return {
         list: [],
         tagTypes: [],
-        Adscriptions: [],
         AdscriptionsType:[],
         AdscriptionsOwnTo:[],
         tagTypesList: [],
@@ -94,12 +93,11 @@
     },
     methods: {
       getDropList() {
-        let templateOwn = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleTypeEnum : []
         let templateType = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleInfoTypeEnum : []
-        this.Adscriptions = templateOwn;
         this.AdscriptionsType = templateType
         return api.getDropList().then((res) =>{
           if(res.data.code === '0') {
+            localStorage.setItem('DiseaseManage',JSON.stringify(res.data.data[8]))
             this.tagTypes =  res.data.data[6];
             for (var i = 0; i < this.tagTypes.length; i++) {
               this.tagTypesList.push(this.tagTypes[i].val)
@@ -117,11 +115,6 @@
                 list[i].tagTypeCn = this.tagTypes[j].name;
               }
             }
-            for (var z =  0; z < this.Adscriptions.length; z++) {
-              if(list[i].type === this.Adscriptions[z].val) {
-                list[i].typeCn = this.Adscriptions[z].name
-              }
-            }
           }
           this.list = list;
           this.total = res.data.data.total;
@@ -135,7 +128,17 @@
         this.$router.push({name:'ChronicDiseaseAdd'})
       },
       modifyIndeptTag(row) {
-        this.$router.push({name:'ChronicDiseaseAdd',params:{isEdit:true,data:row}});
+        api.detailsTag({id:row.id}).then((res)=>{
+            const {code,data,msg} = res.data;
+            if(code=='0'){
+              this.$router.push({name:'ChronicDiseaseAdd',params:{isEdit:true,data:data}});
+            }else{
+              this.$message({
+                message: msg,
+                type: 'warning'
+              });
+            }
+        });
       },
       currentChange(next) {
         this.currentPage = next;
@@ -145,8 +148,7 @@
         const param = {
           current: this.currentPage,
           size: this.pageSize,
-          type: this.filter.tagAdscription,
-          moduleType:this.filter.templateType,
+          tagName: this.filter.tagSysName,
         };
         return param;
       },
@@ -169,8 +171,10 @@
         }).catch(() => {});
       },
       showDelDialog(id){
+        let tmpArr = []
+        tmpArr.push(id)
         this.showConfirmDialog('是否删除该标签?',()=>{
-          api.delTemplate({ids:id}).then((res)=>{
+          api.deleteScale({ids:tmpArr}).then((res)=>{
             if(res.data.code=='0'){
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');

+ 31 - 24
src/components/icss/CommonTemplate.vue

@@ -39,27 +39,27 @@
     <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 == 3 || type == 2">特殊标记4-只可放入现病史模块中,放入其他模块数据会显示异常;</span>
-        <span style="color:#22ccc8;fontSize:12px" v-if="type == 5">特殊标记1-只可放入主诉模块中,放入其他模块数据会显示异常;特殊标记4-只可放入现病史模块中,放入其他模块数据会显示异常;</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>
       </p>
-        <div v-if="type == 5">
-          <span style="marginLeft:10px;">
-            <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;">
-            <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 && type != 3">
-        <el-button size="mini" @click="addDomTemplate(1)">插入输入栏</el-button>
+      <div v-if="type == 322 || type == 32 || type == 31">
+        <span style="marginLeft:10px;">
+          <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;">
+          <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">
+        <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 || type == 3">
+      <div class="formWrap" v-if="type == 1 || type == 2">
           <el-form
             class="subTemplate"
             :model="form"
@@ -87,7 +87,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 || type == 3" style="marginLeft:10px;">
+              <span v-if="type == 2" 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、标示在主诉中症状引用到现病史中展示位置
@@ -122,7 +122,7 @@
             class="tagName  ellipsis"
             :title="'[ '+item.tagName+' ]'"
           >{{item.tagName}} 
-            <!-- <i class="tagFlag">{{item.flag?(item.flag == 4?2:1):''}}</i> -->
+            <i class="tagFlag">子</i>
             </p>
           <p
             v-if="item.type !== 'input' && item.type !== 'sub'"
@@ -152,6 +152,10 @@ export default {
       default: '',
       type: String
     },
+    rela: {
+      default: '',
+      type: String
+    },
     options: {
       default: () => {},
       type: Object
@@ -463,7 +467,7 @@ export default {
     searchTagList() {
       let notIds = []
       let tmpArr = this.rightTagsList.slice();
-      console.log(tmpArr)
+      // 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)
@@ -471,10 +475,11 @@ export default {
       }
       let param = {
         "tagName": this.searchVal,
-        "type": this.type == 4?3:1,
-        "noIds": notIds,
+        "type": this.type == 3?3:1,
+        "notIds": notIds,
+        "notTagType": [3,4,8,10]
       }
-      api.getQuestionInfos(param).then((res) => {
+      api.searchTagList(param).then((res) => {
         if (res.data.code === '0') {
           this.leftTagsList = res.data.data
           this.selectLeftTagsList = []
@@ -485,7 +490,9 @@ export default {
     getSubTemplate() {
       let param = {
         noIds:this.subTmpList,
-        type:5
+        type:this.type,
+        moduleType: this.sign,
+        relationId: this.rela
       }
       api.getModuleInfoSub(param).then((res) => {
         if (res.data.code === '0') {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2 - 2
src/components/icss/NoiseTemplate.vue


+ 2 - 2
src/components/icss/PubTagGroup.vue

@@ -245,8 +245,8 @@ export default {
         // '7':['9'],
         '8':['9'],
         '9':['9'],
-        '10':['9'],
-        '11':['9']
+        '21':['9'],
+        '22':['9']
       },
       rules: {
         region1: [

+ 78 - 70
src/components/icss/PubTemplateGroup.vue

@@ -38,42 +38,23 @@
         </el-select>
       </el-form-item>
       <el-form-item
-        label="属于科室:"
+        :label="form.region3 == 1?'属于科室:':'属于慢病:'"
         prop="region4"
-        v-if="form.region3 == 1"
+        v-if="form.region3 != 0"
       >
-        <!-- <span class="changeTips">改变属于科室后,模板内容将会恢复到默认状态</span> -->
+        <span class="changeTips">改变属于类别后,模板内容将会恢复到默认状态</span>
         <el-select
           :disabled="!!editData.id"
           v-model="form.region4"
-          placeholder="属于科室"
+          :placeholder="form.region3 == 1?'属于科室':'属于慢病'"
           @change="sendData"
         >
           <el-option
             v-for="item in sonLis"
             :label="item.name"
-            :value="item.key+''"
-            :key="item.key"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item
-        label="属于慢病:"
-        prop="region5"
-        v-if="form.region3 == 2"
-      >
-        <!-- <span class="changeTips">改变属于慢病后,模板内容将会恢复到默认状态</span> -->
-        <el-select
-          :disabled="!!editData.id"
-          v-model="form.region5"
-          placeholder="属于慢病"
-          @change="sendData"
-        >
-          <el-option
-            v-for="item in sonLis"
-            :label="item.name"
-            :value="item.key+''"
-            :key="item.key"
+            :value="item.id+''"
+            :key="item.id"
+            v-if="!!item.name"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -83,7 +64,7 @@
       >
         <span class="changeTips">改变模板归属后,模板内容将会恢复到默认状态</span>
         <el-select
-          :disabled="!!editData.id"
+          :disabled="!!editData.id || (form.region3 == '') || (form.region3 != '0' && form.region4 == '') || (form.region3 != '0' && form.region5 == '') "
           v-model="form.region1"
           placeholder="模板归属"
           @change="sendData"
@@ -91,8 +72,8 @@
           <el-option
             v-for="item in Adscriptions"
             :label="item.name"
-            :value="item.key+''"
-            :key="item.key"
+            :value="item.type+''"
+            :key="item.type"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -115,26 +96,15 @@ export default {
     return {
       numWord:0,
       Adscriptions:[],
-      sonLis:[{
-        name:'空',
-        key:'-1',
-      },{
-        name:'主诉模板',
-        key:'1'
-      },{
-        name:'现病史模板',
-        key:'2'
-      },{
-        name:'现病史空模板',
-        key:'3'
-      }],
+      sonLis:[],
+      disabled1:'false',
+      disabled2:'false',
+      disabled3:'false',
       form: {
         region1: '',    //归属
         region2: '',     //模板名称
-        region3: '',     //子模板
-        region4: '',     //所属科室
-        region5: '',     //所属慢病
-        tagPool:[],      //标签池
+        region3: '',     //类型
+        region4: '',     //所属科室慢病
       },
       rules: {
         region1: [
@@ -147,51 +117,89 @@ export default {
           { required: true, message: '请选择模板类型', trigger: 'change' },
         ],
         region4: [
-          { required: true, message: '请选择所属科室', trigger: 'change' },
+          { required: true, message: '请选择所属', trigger: 'change' },
         ],
       },
-      AdscriptionsType:[]
+      AdscriptionsType:[],
+      deptDis:{}
     }
   },
   beforeMount:function(){
-    let templateOwn = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleTypeEnum : []
     let templateType = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleInfoTypeEnum : []
+    this.deptDis = localStorage.getItem('deptDis') ? JSON.parse(localStorage.getItem('deptDis')) : {}
+
     this.AdscriptionsType = templateType
-    let guisu = localStorage.getItem('guisu') ? JSON.parse(localStorage.getItem('guisu')) : []
-    for(let k = 0;k < guisu.length;k++){
-      // templateOwn = templateOwn.filter(item => item.key != guisu[k])
+  },
+  computed:{
+    tmpType(){
+      return this.form.region3
+    },
+    tmpOwnTo(){
+      return this.form.region4
+    }
+  },
+  watch: {
+    tmpType(newVal, preVal){
+      if(newVal != preVal){
+        if(newVal == 1){
+          let tmpDeptDTOS = this.deptDis.deptDTOS
+          let obj = {id:0,name:'通用'}
+          if(tmpDeptDTOS[0].id != 0){
+            tmpDeptDTOS.unshift(obj)
+          }
+          this.sonLis = tmpDeptDTOS
+          this.form.region4 = ''
+          this.form.region1 = ''
+        }else if(newVal == 2){
+          let tmpDisDTOS = this.deptDis.disDTOS
+          let obj = {id:0,name:'通用'}
+          if(tmpDisDTOS[0].id != 0){
+            tmpDisDTOS.unshift(obj)
+          }
+          this.sonLis = tmpDisDTOS
+          this.form.region1 = ''
+          this.form.region4 = ''
+        }else{
+          this.getTypes()
+          this.sonLis = []
+          this.form.region1 = ''
+          this.form.region4 = ''
+        }
+      }
+    },
+    tmpOwnTo(newVal, preVal){
+      if(newVal != preVal){
+          this.getTypes()   
+          this.form.region1 = ''
+      }
     }
-    this.Adscriptions = templateOwn;
   },
   mounted() {
     const editData = this.$props.editData;
-    let templateOwn = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleTypeEnum : []
+    console.log(editData)
+    let templateOwn = localStorage.getItem('typeLis') ? JSON.parse(localStorage.getItem('typeLis')) : []
     if(editData.id){      //修改
-      // const trans = utils.transformKeys(editData,2);
       this.form = Object.assign({},this.form,editData);
       this.Adscriptions = templateOwn
       this.form.region1 = (editData.type+'')
       this.form.region2 = editData.name
+      this.form.region3 = editData.moduleType
+      this.form.region4 = editData.relationId
     }
     this.$emit('changeVal', this.form, false)
-    // this.searchTagList()
   },
   methods:{
-    changes(){
-      let nameVal = this.form.region2
-      console.log(nameVal.length)
-      if(nameVal.length == 10){
-        this.$message({
-          message: '最多输入120个字',
-          type: 'warning',
-          showClose: true,
-        });
-      }
-      if(nameVal.length == 10){
-        this.numWord = 10
-      }else{
-        this.numWord = 0
+    getTypes(){
+      let param = {
+          "moduleType": this.form.region3,
+          "relationId": this.form.region4
       }
+      api.getModuleType(param).then((res) => {
+        if (res.data.code === '0') {//获取模板归属
+          let result = res.data.data
+          this.Adscriptions = result
+        }
+      })
     },
     sendData(val){
       this.$emit('changeVal', this.form, false)

+ 10 - 6
src/components/icss/TemplateMaintenance.vue

@@ -115,7 +115,7 @@
         currentPage: 1,
         pageSize: 10,
         total: 0,
-        deptAndDisInfo:[],
+        deptAndDisInfo:{},
       }
     },
     created() {
@@ -131,7 +131,6 @@
     },
     watch: {
       tmpType(newVal, preVal){
-        console.log(newVal,preVal)
         if(newVal != preVal){
           if(newVal == 1){
             this.AdscriptionsOwnTo = this.deptAndDisInfo.deptDTOS
@@ -151,19 +150,19 @@
         api.getAllDeptAndDisInfo().then((res) => {
           if (res.data.code === '0') {//获取科室和疾病所有信息
             let result = res.data.data
-
             this.deptAndDisInfo = result
+            localStorage.setItem('deptDis',JSON.stringify(result))
           }
         })
       },
       getDropList() {
-        let templateOwn = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleTypeEnum : []
         let templateType = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleInfoTypeEnum : []
-        this.Adscriptions = templateOwn;
         this.AdscriptionsType = templateType
         return api.getDropList().then((res) =>{
           if(res.data.code === '0') {
             this.tagTypes =  res.data.data[6];
+            this.Adscriptions = res.data.data[4];
+            localStorage.setItem('typeLis',JSON.stringify(res.data.data[4]))
             for (var i = 0; i < this.tagTypes.length; i++) {
               this.tagTypesList.push(this.tagTypes[i].val)
             }
@@ -198,7 +197,12 @@
         this.$router.push({path:'LT-YXSJWH-TJMBWH'})
       },
       modifyIndeptTag(row) {
-        console.log(row)
+        // api.detailsTag({ids:row.id}).then((res) => {
+        //   if (res.data.code === '0') {//获取科室和疾病所有信息
+        //     let result = res.data.data
+        //     console.log(result)
+        //   }
+        // })
         Promise.all([
           api.getModuleInfoOne({moduleId:row.id}),
           api.getModuleDetailInfo({moduleId:row.id})

+ 6 - 3
src/components/icss/TemplateMaintenanceWrap.vue

@@ -17,6 +17,7 @@
         :pool="dataPub.tagPool"
         :type="dataPub.region1"
         :sign="dataPub.region3"
+        :rela="dataPub.region4"
         :options="editData"
          @changeActionData="changeActionData"
       >
@@ -79,7 +80,7 @@ export default {
           type: 'warning'
         });
         return;
-      }else if(detailLis[0].text == '' && detailLis[0].questionId == ''){
+      }else if(detailLis[0].questionId == ''){
         this.$message({
           message: '保存模版时,无法保存单独的输入栏',
           type: 'warning'
@@ -90,9 +91,11 @@ export default {
         "modelDetils": detailLis,
         "name": name,
         "type": type,
-        "flag": type == 5?3:'',
+        "flag": (type == 322 || type == 32 || type == 31)?3:'',
         "textType": type,
-        "id":this.editData.id || ''
+        "id":this.editData.id || '',
+        "moduleType": this.dataPub.region3,
+        "relationId": this.dataPub.region4
       }
       // console.log(param,'保存模板的参数')
       this.showDelDialog(param)