Prechádzať zdrojové kódy

Merge branch 'test' of http://192.168.2.236:10080/zhouna/platformFront into test

Luolei 6 rokov pred
rodič
commit
6a4b58c78e

+ 22 - 4
src/api/config.js

@@ -128,7 +128,7 @@ export default {
     'getModuleInfoOne': 'api/icssman/moduleInfo/getModuleInfoOne', //模板维护系统修改获取单个模板信息上部分信息
     'getModuleDetailInfo': 'api/icssman/moduleInfo/getModuleDetailInfo', //模板维护系统修改获取单个模板右侧信息
     'delTemplate': 'api/icssman/moduleInfo/delete', //模板维护系统删除单个模板信息
-    'getDeptShortListSearh': 'api/icssman//deptVital/getDeptShortList_Searh', //查体模板--科室下拉
+    'getDeptShortListSearh': 'api/icssman/deptVital/getDeptShortList_Searh', //查体模板--科室下拉
     'getPhysicalExamTempList': 'api/icssman/deptVital/getDeptVitalPage', //查体模板列表
     'getPhysicalExamTempDepartList':'api/icssman/deptVital/getDeptShortList_create' , //查体模板科室列表--新增
     'getPhysicalExamTempByDepId':'api/icssman/deptVital/getModuleByDeptId', //通过科室id获取查体模板
@@ -199,7 +199,7 @@ export default {
     'getknowledgeList': 'api/knowledgeman/dictionaryInfo/getList', //量表结构字典信息
     'getModuleType': 'api/icssman/moduleInfo/getModuleType',  //模板维护 -- 类型筛选
     'indexByLexicon': 'api/icssman/questionInfo/indexByLexicon',  //知识库标准化-根据名称和术语库词性类型搜索
-    'indexByLexiconStandWord':'api/knowledgeman//commonconcept/indexByLexicon',  //知识库标准化-根据名称搜索
+    'indexByLexiconStandWord':'api/knowledgeman/commonconcept/indexByLexicon',  //知识库标准化-根据名称搜索
     'getAssaySon': 'api/knowledgeman/lisSonContact/lisSonContactList',  //化验子项维护
     'getAssaySonDetail': 'api/knowledgeman/lisSonContact/relationContactDetail',  //化验子项维护-详情
     'getConceptInfoAssay': '/api/knowledgeman/concept/getAllForRelation',  //化验子项维护-搜索术语
@@ -213,7 +213,22 @@ export default {
     'removeRelationContact': 'api/knowledgeman/multContact/removeRelationContact', //知识库标准化-医学术语多层关联维护-删除或者恢复
     'relationContactDetail': 'api/knowledgeman/multContact/relationContactDetail', //知识库标准化-医学术语多层关联维护-详情
     'addMultRelation': 'api/knowledgeman/multContact/addRelation', //知识库标准化-医学术语多层关联维护-添加或者编辑
-	},
+	  /*********预问诊相关接口**********/
+	  'questionList':'/api/precman/questionInfo_prec/page',     //预问诊-填写单列表
+    'questionAdd':'/api/precman/questionInfo_prec/saveOrUpdate',      //预问诊-填写单添加
+    'questionSearch':'/api/precman/questionInfo_prec/index',    //预问诊-填写单检索
+    'preTypeList':'/api/precman/dictionaryInfo_prec/getList',   //类型枚举
+    'questionDel':'/api/precman/questionInfo_prec/delete',      //删除
+    'uploadImg':'/api/precman/file_prec/uploadImage',       //图片上传
+    'fileDel':'/api/precman/file_prec/deleteRemoteFile',          //图片删除
+    'questionDetail':'/api/precman/questionInfo_prec/getById',                //填写单详情
+    'moduleList':'/api/precman/moduleInfo_prec/getModuleInfoList',        //模板列表
+    'addModule':'/api/precman/moduleInfo_prec/saveModuleInfo',        //模板添加
+    'delModule':'/api/precman/moduleInfo_prec/delete',        //模板删除
+    'moduleDetail':'/api/precman/moduleInfo_prec/getModuleInfoOne',    //模板详情
+    'deptList':'/api/precman/moduleInfo_prec/getAllDeptAndDisInfo',    //模板-科室列表
+
+  },
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',
 		'YH-GDFW': 'el-icon-service',
@@ -240,5 +255,8 @@ export default {
     {controlType:[0,1,2],tagType:[1,4]}, //组合项标签(既往史)
     {controlType:[0,1,6],tagType:[1]},    //化验组合
     {controlType:[0,1,2,99],tagType:[1]},   //症状推送类型(添加症状)
-  ]
+  ],
+  msg:{
+    imgTip:'无法上传图片,图片大小不可超过2M'
+  }
 }

+ 45 - 0
src/api/preTreat.js

@@ -0,0 +1,45 @@
+import axios from 'axios';
+import config from '@api/config.js';
+
+const urls = config.urls;
+export default {
+  getQuestionList(param){
+    return axios.post(urls.questionList,param);
+  },
+  questionAdd(param){
+    return axios.post(urls.questionAdd,param);
+  },
+  questionSearch(param){
+    return axios.post(urls.questionSearch,param);
+  },
+  getPreTypeList(){
+    return axios.post(urls.preTypeList,{});
+  },
+  questionDel(param){
+    return axios.post(urls.questionDel,param);
+  },
+  questionDetail(param){
+    return axios.post(urls.questionDetail,param);
+  },
+  fileDel(param){
+    return axios.post(urls.fileDel,param);
+  },
+  indexByLexicon(param) {
+    return axios.post(urls.indexByLexicon, param);
+  },
+  getModuleList(param){
+    return axios.post(urls.moduleList, param);
+  },
+  getModuleDetail(param){
+    return axios.post(urls.moduleDetail, param);
+  },
+  addModule(param){
+    return axios.post(urls.addModule, param);
+  },
+  delModule(param){
+    return axios.post(urls.delModule, param);
+  },
+  getDeptList(param){
+    return axios.post(urls.deptList, param)
+  }
+}

+ 47 - 1
src/api/utils.js

@@ -239,6 +239,52 @@ export default {
       tmpArr.push(obj)
     }
     return tmpArr;
+  },
+  /*返回n个row的数组
+  *n:Number
+  * row:Object
+  * orderName:编号字段名称,默认orderNo
+   */
+  getInitRow(row,n,orderName){
+    let arr = [];
+    let obj = {};
+    for(let i=0;i<n;i++){
+      obj = Object.assign({},row);
+      obj[orderName||'orderNo'] = i;
+      arr.push(obj);
+    }
+    return arr;
+  },
+  /**
+   * 预问诊-字段转换
+   *
+   * **/
+  transPretreatKeys(org,isDpt){
+    let maps = {
+      name:'region4',
+      description:'region5',
+      itemType:'region12',
+      sexType:'region7',
+      ageBegin:'region8',
+      ageEnd:'region9',
+      tagName:'region3',
+      //tagType:isDpt?'':'region2',
+      //controlType:isDpt?'region2':'',
+      type:'region1',
+      url:'region13',
+    };
+    isDpt?maps.controlType = 'region2':maps.tagType = 'region2';
+    let obj = {};
+    for(let i in org){
+      if(maps[i]){
+        obj[maps[i]] = org[i]+'';
+      }
+    }
+    return obj;
+  },
+  //获取图片名称
+  getImgName(url){
+    const arr = url.split("/");
+    return arr[arr.length-1];
   }
 }
-

+ 9 - 5
src/components/icss/AddMedicalRelation.vue

@@ -34,15 +34,15 @@
               <span>{{data.startType}}</span>
             </td>
             <td>
-              <!-- <el-select v-model="data.relationName" clearable placeholder="请选择" size="mini">
+              <el-select v-model="data.relationName" clearable placeholder="请选择" size="mini">
                 <el-option
                   v-for="item in relationList"
-                  :key="item.id"
+                  :key="item.key"
                   :label="item.name"
                   :value="item.name">
                 </el-option>
-              </el-select> -->
-              <span>{{data.relationName}}</span>
+              </el-select>
+              <!-- <span>{{data.relationName}}</span> -->
             </td>
             <td>
               <span>{{data.endName}}</span>
@@ -72,7 +72,8 @@
         data:{
           startName:'',
           startType:'',
-          relationName:'包含于',
+          // relationName:'包含于',
+          relationName:'',
           endName:'',
           endType:'',
         },
@@ -87,6 +88,9 @@
     created(){
       // 关系只有“属于”,前端写死 5-16
       // this.getRelationList();
+      // 使用枚举7-12
+      const list = JSON.parse(localStorage.getItem('knowledgeEnumsData'));
+      this.relationList = list.lexiconRSTypeEnum;
     },
     methods:{
       /*getRelationList(){//获取关系下拉

+ 2 - 0
src/components/icss/PubIndeptTag.vue

@@ -637,6 +637,8 @@
         this.form.maxNormalVal = ''
         this.form.region5 = ''
         this.form.region12 = '0'
+        this.systemNameShow = false
+        this.interfaceNameShow = false
       },
     }
   }

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

@@ -462,7 +462,7 @@ export default {
         this.systemNameLis = []
         return
       }
-      if (this.form.region12 == 0) {
+      if (this.form.region12 == 0 &&((this.form.region1 == 1 && this.form.region2 == 4) || (this.form.region1 == 4) || (this.form.region1 == 5) || (this.form.region1 == 3))) {
         let tmpArr = [];
         if (this.form.region1 == 1 && this.form.region2 == 4) {//症状
           tmpArr = [1]
@@ -624,6 +624,7 @@ export default {
       this.form.region12 = '0'
       this.form.region10 = '1'
       this.form.region11 = '0'
+      this.systemNameShow = false
     }
   }
 }

+ 192 - 0
src/components/preTreat/AddCombinQuestion.vue

@@ -0,0 +1,192 @@
+<template>
+    <div class="NoiseTemplateWrapper TemplateWrapper">
+        <crumbs
+                :title="txt"
+                class="topBack"
+                linkTo="/admin/LT-YWZSJWH-ZHTXDWH"
+        ></crumbs>
+        <PubIndeptQa
+                @changeVal="changeVal"
+                @changeSex="changeSex"
+                @changeType="changeType"
+                @validatePass="validatePass"
+                qaType="2"
+                :editData="editData"
+                ref="submitForm"
+        ></PubIndeptQa>
+        <div class="main">
+            <p class="title">
+                填写单明细:
+            </p>
+            <QuestionTagGroup :ascription="dataPub.region1" :sexType="dataPub.region7" :type="dataPub.region2" @changeActionData="pushValues" :options="editData.questionMapping"></QuestionTagGroup>
+            <div class="btn">
+                <el-button
+                        type="primary"
+                        @click="submitForm"
+                >确 定</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+  /**
+   * dataPub.region2  判断底部显示哪些
+   */
+  import PubIndeptQa from './PubIndeptQa';
+  import QuestionTagGroup from './QuestionTagGroup';
+  import api from '@api/preTreat.js';
+  import utils from '@api/utils.js';
+
+  export default {
+    name: 'addCombinQuestion',
+    data() {
+      return {
+        txt:'组合填写单维护-添加组合填写单',
+        imgList:[],
+        dataPub: {},      //公用组件传的值都在这
+        itemsTypes:[1,2],            //有明细的类型
+        editData:{},                    //编辑数据
+        options: [],           //标签明细右侧操作数据
+      }
+    },
+    beforeMount:function(){
+      const {isEdit,data} = this.$route.params;
+      if(isEdit){
+        this.txt = '组合填写单维护-修改组合填写单';
+        this.editData = data;
+      }
+    },
+    methods: {
+      back() { this.$router.go(-1) },
+      changeVal(val) {    //子组件数据改变传递到父组件
+        this.dataPub = val;
+        console.log('公用组件传的值都在这', val);
+      },
+      changeSex(sex) {       //性别改变,清空填写单明细
+                             //console.log(sex)
+      },
+      changeType(type) {        //填写单类型改变,标签明细左侧更新,右侧清空
+        // console.log('type',type)
+        this.options = [];
+      },
+      pushValues(its){
+        const arr = its.map((it,i)=>{
+          return {
+            sonQuestion:it.id,
+            orderNo:+i+1,
+            exclusionType:0
+          }
+        });
+        this.options = arr;
+      },
+      submitForm() {      // 调用子组件的方法验证公用部分
+        this.$refs.submitForm.submitForm('groups');
+      },
+      validatePass() {      //验证成功回调,调取接口
+        //仍需验证填写单明细是否选择
+        if(parseFloat(this.dataPub.region8) >= parseFloat(this.dataPub.region9)) {
+          this.warning('最小年龄不能大于或等于最大年龄');
+          return;
+        }
+        if(parseFloat(this.dataPub.minNormalVal) >= parseFloat(this.dataPub.maxNormalVal)) {
+          this.warning('最小正常值不能大于或等于最大正常值');
+          return;
+        }
+        const {isEdit,data} = this.$route.params;
+        let param = {
+          "questionWrapper": {
+            //"controlType": this.dataPub.region2,                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
+            "id": isEdit?data.id:'',                                    //新增id置空
+            "type": this.dataPub.region1,                //填写单归属
+            "tagType": this.dataPub.region2,             //组合填写单类型
+            "tagName": this.dataPub.region3,             //系统名称
+            "name": this.dataPub.region4,                //医生界面名称
+            "description":this.dataPub.region5,
+            "sexType": this.dataPub.region7,             //1:男,2:女,3:通用
+            "ageBegin": this.dataPub.region8,       		 //最小年龄
+            "ageEnd": this.dataPub.region9,              //最大年龄
+            "itemType" :this.dataPub.region12,           //是否为主要内容
+            "url":this.dataPub.region13,                  //上传图片
+            //"questionDetails": this.options,                //明细项
+            "questionMappings": this.options,      //映射关系,
+          }
+        };
+        this.showSaveDialog(param);
+      },
+      showSaveDialog(param) {
+        this.showConfirmDialog('是否保存该填写单?', () => {
+          api.questionAdd(param).then((res) => {
+            if (res.data.code === '0') {
+              this.warning(res.data.msg || '保存成功', 'success');
+              this.$router.push("/admin/LT-YWZSJWH-ZHTXDWH");
+            } else {
+              this.warning(res.data.msg)
+            }
+          }).catch((err) => {
+            this.warning(err);
+          })
+        });
+      },
+      showConfirmDialog(msg, resolve) {
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      warning(msg, type) {
+        this.$message({
+          showClose: true,
+          message: msg,
+          type: type || 'warning'
+        })
+      },
+    },
+    components: {
+      PubIndeptQa,
+      QuestionTagGroup
+    }
+  }
+</script>
+<style lang="less">
+    @import "../../less/common.less";
+    .NoiseTemplateWrapper {
+    .groupTitle {
+        background-color: #fff;
+        height: 40px;
+        line-height: 40px;
+        padding-left: 20px;
+    }
+    .main {
+        background-color: #fff;
+        margin: 0 20px 20px;
+        padding: 20px;
+        border-top: 1px solid @icssBorder;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #606266;
+    .title {
+        margin-bottom: 20px;
+    i {
+        color: #f56c6c;
+    }
+    }
+    }
+    .btn {
+        text-align: right;
+    }
+    .order {
+        margin-bottom: 20px;
+    .el-input__inner {
+        line-height: 30px;
+        height: 30px;
+    }
+    }
+    }
+    .toast-cancel{
+        color: #22ccc8 !important;
+    // background: #22ccc8;
+    }
+</style>
+

+ 316 - 0
src/components/preTreat/AddQuestionModules.vue

@@ -0,0 +1,316 @@
+<template>
+    <div class="NoiseTemplateWrapper TemplateWrapper">
+        <crumbs
+                :title="txt"
+                class="topBack"
+                linkTo="/admin/LT-YWZSJWH-MBWH"
+        ></crumbs>
+        <div class="PubTagGroupWrapper">
+        <el-form class="groups"
+                :rules="rules"
+                ref="groups"
+                :model="form"
+                label-width="150px">
+            <el-form-item
+                    label="模板类型:"
+                    prop="moduleType">
+                <span class="changeTips">改变类型后,填写单明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.moduleType"
+                        :disabled="!!editData.id"
+                        placeholder="请选择模板类型"
+                        @change="changeType(1)"
+                >
+                    <el-option
+                            v-for="item in moduleTypes"
+                            :label="item.name"
+                            :value="item.val"
+                            :key="item.id"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    label="模板归属:"
+                    prop="type"
+            >
+                <span class="changeTips">改变归属后,填写单明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.type"
+                        :disabled="!!editData.id"
+                        placeholder="请选择模板归属"
+                        @change="changeType(0)"
+                >
+                    <el-option
+                            v-for="item in typeList"
+                            :label="item.name"
+                            :value="item.val"
+                            :key="item.id"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    v-if="form.moduleType==1"
+                    label="选择科室:"
+                    prop="relationId">
+                <span class="changeTips">改变类型后,填写单明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.relationId"
+                        placeholder="请选择科室"
+                >
+                    <el-option
+                            v-for="item in deptList"
+                            :label="item.name"
+                            :value="item.conceptId"
+                            :key="item.conceptId"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    label="模板名称:"
+                    prop="name"
+            >
+                <el-input
+                        v-model="form.name"
+                        maxLength="30"
+                        placeholder="请输入模板名称"
+                ></el-input>
+            </el-form-item>
+            <el-form-item label="备注:">
+                <el-input type="textarea" v-model="form.remark"></el-input>
+            </el-form-item>
+        </el-form>
+    </div>
+        <div class="main">
+            <p class="title">
+                填写单明细:
+            </p>
+            <QuestionTagGroup v-if="form.type!=1" :ascription="form.type" @changeActionData="pushValues" :options="editData.moduleDetail"></QuestionTagGroup>
+            <div class="static" v-if="form.type==1">
+                <p>请问您有哪些不适?</p>
+                <div class="inner">科室常见症状</div>
+            </div>
+            <div class="btn">
+                <el-button
+                        type="primary"
+                        @click="submitForm"
+                >确 定</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+  /**
+   *
+   */
+  import QuestionTagGroup from './QuestionTagGroup';
+  import api from '@api/preTreat.js';
+
+  export default {
+    name: 'addCombinQuestion',
+    props:[''],
+    data() {
+      return {
+        txt:'模板维护-添加模板',
+        form:{
+          name:"",
+          type:"",
+          moduleType:"",
+          relationId:"",
+          moduleDetail:[],
+          remark:''
+        },
+        typeList:[],
+        moduleTypes:[],
+        deptList:[],
+        editData:{},                    //编辑数据
+        options: [],           //标签明细右侧操作数据
+        rules: {
+          type: [
+            { required: true, message: '请选择归属', trigger: 'change' }
+          ],
+          moduleType: [
+            { required: true, message: '请选择类型', trigger: 'change' }
+          ],
+          name: [
+            { required: true, message: '请输入模板名称', trigger: 'change' }
+          ],
+          relationId: [
+            { required: true, message: '请选择模板归属科室', trigger: 'change' },
+          ],
+        },
+      }
+    },
+    beforeMount:function(){
+      const {isEdit,data} = this.$route.params;
+      this.getDropDatas();
+      if(isEdit){
+        this.txt = '模板维护-修改模板';
+        this.form = Object.assign({},this.form,this.transFormData(data));
+        this.editData = data;
+      }
+    },
+    methods: {
+      back() { this.$router.go(-1) },
+      transFormData(org){
+        const maps = {
+          'moduleType':'moduleType',
+          'moduleDetail':'moduleDetail',
+          'relationId':'relationId',
+          'type':'type',
+          'name':'name',
+          'id':'id',
+          'remark':'remark'
+        };
+        let obj = {};
+        for(let i in org){
+          if(maps[i]){
+            obj[maps[i]] = typeof org[i]=='object'?org[i]:''+org[i];
+          }
+        }
+        return obj;
+      },
+      getDropDatas(){
+        api.getPreTypeList().then((res) =>{
+          if(res.data.code === '0') {
+            this.typeList = res.data.data[1];
+            this.moduleTypes =  res.data.data[4];
+          }
+        });
+        this.getDeptList();
+      },
+      getDeptList(){
+        const depts = localStorage.getItem("precDeptList");
+        const list = depts?JSON.parse(depts):[];
+        if(list&&list.length>0){
+          this.deptList = list;
+          return ;
+        }
+        api.getDeptList({moduleType:0,type:1}).then((res) =>{
+          if(res.data.code === '0') {
+            this.deptList = res.data.data&&res.data.data.deptDTOS||[];
+            localStorage.setItem("precDeptList",JSON.stringify(this.deptList));
+          }
+        });
+      },
+      changeType(flag) {        //填写单类型改变,标签明细左侧更新,右侧清空
+        // console.log('type',type)
+        if(flag){
+          this.form.type='';
+        }
+        this.options = [];
+      },
+      pushValues(its){
+        const arr = its.map((it)=>{
+          return {
+            questionId:it.id,
+          }
+        });
+        this.options = arr;
+      },
+      submitForm() {      // 调用子组件的方法验证公用部分
+        this.$refs.groups.validate((valid) => {
+          if (valid) {
+            let param = this.form;
+            param.moduleDetail = this.options;
+            this.showSaveDialog(param);
+          }else{
+            return false;
+          }
+        });
+      },
+      showSaveDialog(param) {
+        this.showConfirmDialog('是否保存该模板?', () => {
+          api.addModule(param).then((res) => {
+            if (res.data.code === '0') {
+              this.warning(res.data.msg || '保存成功', 'success');
+              this.$router.push("/admin/LT-YWZSJWH-MBWH");
+            } else {
+              this.warning(res.data.msg)
+            }
+          }).catch((err) => {
+            this.warning(err);
+          })
+        });
+      },
+      showConfirmDialog(msg, resolve) {
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      warning(msg, type) {
+        this.$message({
+          showClose: true,
+          message: msg,
+          type: type || 'warning'
+        })
+      },
+    },
+    components: {
+      QuestionTagGroup
+    }
+  }
+</script>
+<style lang="less">
+    @import "../../less/common.less";
+    .static{
+        width:360px;
+        height:137px;
+        background:#F0EEEE;
+        padding: 20px 0 0 20px;
+        .inner{
+            background: #fff;
+            width: 317px;
+            height: 57px;
+            line-height: 52px;
+            margin-top:20px;
+            text-align: center;
+        }
+        p{
+
+        }
+    }
+    .PubTagGroupWrapper{
+        padding-bottom: 10px;
+    }
+    .NoiseTemplateWrapper {
+    .groupTitle {
+        background-color: #fff;
+        height: 40px;
+        line-height: 40px;
+        padding-left: 20px;
+    }
+    .main {
+        background-color: #fff;
+        margin: 0 20px 20px;
+        padding: 20px;
+        border-top: 1px solid @icssBorder;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #606266;
+    .title {
+        margin-bottom: 20px;
+    i {
+        color: #f56c6c;
+    }
+    }
+    }
+    .btn {
+        text-align: right;
+    }
+    .order {
+        margin-bottom: 20px;
+    .el-input__inner {
+        line-height: 30px;
+        height: 30px;
+    }
+    }
+    }
+    .toast-cancel{
+        color: #22ccc8 !important;
+    // background: #22ccc8;
+    }
+</style>
+

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

@@ -0,0 +1,217 @@
+<template>
+    <div class="NoiseTemplateWrapper TemplateWrapper">
+        <crumbs
+                :title="txt"
+                class="topBack"
+                linkTo="/admin/LT-YWZSJWH-DLTXDWH"
+        ></crumbs>
+        <PubIndeptQa
+                @changeVal="changeVal"
+                @validatePass="validatePass"
+                qaType="1"
+                :editData="editData"
+                ref="submitForm"
+        ></PubIndeptQa>
+        <div class="main">
+            <p class="title" v-if="dataPub.region2==1||dataPub.region2==2|| dataPub.region2==3|| dataPub.region2==11">
+                填写单明细:
+            </p>
+            <PubSelect
+                    v-if="dataPub.region2==1 || dataPub.region2==2 || dataPub.region2==3 || dataPub.region2==11"
+                    :ascription="dataPub.region1"
+                    :sexType="dataPub.region7"
+                    :type="dataPub.region2"
+                    @pushValues="pushValues"
+                    :options="editData.questionDetailList"></PubSelect>
+            <div class="btn">
+                <el-button
+                        type="primary"
+                        @click="submitForm"
+                >确 定</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+  /**
+   * dataPub.region2  判断底部显示哪些
+   */
+  import PubIndeptQa from './PubIndeptQa';
+  import PubSelect from './PubSelect';
+  import api from '@api/preTreat.js';
+  import utils from '@api/utils.js';
+
+  export default {
+    name: 'addSimpleQuestion',
+    data() {
+      return {
+        txt:'独立填写单维护-添加独立填写单',
+        imgList:[],
+        dataPub: {},      //公用组件传的值都在这
+        itemsTypes:[1,2],            //有明细的类型
+        editData:{},                    //编辑数据
+        options: [],           //标签明细右侧操作数据
+      }
+    },
+    beforeMount:function(){
+      const {isEdit,data} = this.$route.params;
+      if(isEdit){
+        this.txt = '独立填写单维护-修改独立填写单';
+        this.editData = data;
+      }
+    },
+    methods: {
+      back() { this.$router.go(-1) },
+      changeVal(val) {   //子组件数据改变传递到父组件
+        this.dataPub = val;
+        //console.log('公用组件传的值都在这', val);
+      },
+      changeSex() {       //性别改变,清空填写单明细
+        this.changeType();
+      },
+      changeType() {      //填写单类型改变,标签明细左侧更新,右侧清空
+        this.options = [];
+      },
+      pushValues(its){
+        this.options = its;
+      },
+      submitForm() {      // 调用子组件的方法验证公用部分
+        this.$refs.submitForm.submitForm('groups');
+      },
+      validatePass() {      //验证成功回调,调取接口
+        //仍需验证填写单明细是否选择
+        let isNull = false;
+        let options2 = [];
+        const opts = this.options;
+        for (let i = 0; i < this.options.length; i++) {
+          if(this.options[i].name.trim() != '') {
+            options2.push(this.options[i])
+          }else if(this.options[i].description.trim() != ''){           //患者填了,医生没填,提示医生必填
+            isNull = true;
+          }
+        }
+        this.options = options2;
+        if(this.itemsTypes.includes(+this.dataPub.region2)&&isNull) {
+          this.warning('医生界面展示标准内容必填');
+          return;
+        }
+        let flag=true;
+        if(opts[0] && opts[0].code){
+          flag=opts.findIndex((it)=>{
+            return !it.code;
+          })==-1;
+        }else{
+          flag=opts.findIndex((it)=>{
+            return it.code;
+          })==-1;
+        }
+        if(!flag){
+          this.warning('所有选项必须都有或者都没有同“伴”/“无”标记');
+          return;
+        }
+        if(parseFloat(this.dataPub.region8) >= parseFloat(this.dataPub.region9)) {
+          this.warning('最小年龄不能大于或等于最大年龄');
+          return;
+        }
+        if(parseFloat(this.dataPub.minNormalVal) >= parseFloat(this.dataPub.maxNormalVal)) {
+          this.warning('最小正常值不能大于或等于最大正常值');
+          return;
+        }
+        const {isEdit,data} = this.$route.params;
+        let param = {
+          "questionWrapper": {
+            "controlType": this.dataPub.region2,                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
+            "id": isEdit?data.id:'',                                    //新增id置空
+            "type": this.dataPub.region1,                //填写单归属
+            "tagType": 1,             //独立填写单类型
+            "tagName": this.dataPub.region3,             //系统名称
+            "name": this.dataPub.region4,                //医生界面名称
+            "description":this.dataPub.region5,
+            "sexType": this.dataPub.region7,             //1:男,2:女,3:通用
+            "ageBegin": this.dataPub.region8,       		 //最小年龄
+            "ageEnd": this.dataPub.region9,              //最大年龄
+            "itemType" :this.dataPub.region12,           //是否为主要内容
+            "url":this.dataPub.region13,                  //上传图片
+            "questionDetails": this.options,                //明细项
+            //"questionMappings": [],      //映射关系,
+          }
+        };
+        this.showSaveDialog(param);
+      },
+      showSaveDialog(param) {
+        this.showConfirmDialog('是否保存该填写单?', () => {
+          api.questionAdd(param).then((res) => {
+            if (res.data.code === '0') {
+              this.warning(res.data.msg || '保存成功', 'success');
+              this.$router.push("/admin/LT-YWZSJWH-DLTXDWH");
+            } else {
+              this.warning(res.data.msg)
+            }
+          }).catch((err) => {
+            this.warning(err);
+          })
+        });
+      },
+      showConfirmDialog(msg, resolve) {
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      warning(msg, type) {
+        this.$message({
+          showClose: true,
+          message: msg,
+          type: type || 'warning'
+        })
+      },
+    },
+    components: {
+      PubIndeptQa,
+      PubSelect
+    }
+  }
+</script>
+<style lang="less">
+    @import "../../less/common.less";
+    .NoiseTemplateWrapper {
+    .groupTitle {
+        background-color: #fff;
+        height: 40px;
+        line-height: 40px;
+        padding-left: 20px;
+    }
+    .main {
+        background-color: #fff;
+        margin: 0 20px 20px;
+        padding: 20px;
+        border-top: 1px solid @icssBorder;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #606266;
+    .title {
+        margin-bottom: 20px;
+    i {
+        color: #f56c6c;
+    }
+    }
+    }
+    .btn {
+        text-align: right;
+    }
+    .order {
+        margin-bottom: 20px;
+    .el-input__inner {
+        line-height: 30px;
+        height: 30px;
+    }
+    }
+    }
+    .toast-cancel{
+        color: #22ccc8 !important;
+    // background: #22ccc8;
+    }
+</style>
+

+ 241 - 0
src/components/preTreat/CombinQuestion.vue

@@ -0,0 +1,241 @@
+<template>
+    <div>
+        <crumbs title="组合填写单维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="归属:">
+                    <el-select size="mini" v-model="filter.tagAdscription" @change="getValue"  placeholder="归属" clearable>
+                        <el-option v-if="item.val!=6&&item.val!=7&&item.val!=8&&item.val!=9&&item.val!=10&&item.val!=21&&item.val!=22" v-for="item in Adscriptions" :label="item.name" :value="item.val" :key="item.id" ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="类型:">
+                    <el-select size="mini" v-model="filter.tagType[0]" placeholder="类型" clearable>
+                        <el-option v-for="item in tagTypes" :label="item.name" :value="item.val" :key="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="填写单系统名称:">
+                    <el-input size="mini" v-model="filter.tagSysName" placeholder="填写单系统名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" @click="addIndeptTag">添加组合填写单</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table
+                    :data="list"
+                    border
+                    style="width: 100%">
+                <el-table-column
+                        :resizable = "false"
+                        type="index"
+                        :index = 'indexMethod'
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="tagName"
+                        label="填写单系统名称">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="typeCn"
+                        label="归属"
+                        width="80">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="tagTypeCn"
+                        label="类型">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="modifier"
+                        label="操作人"
+                        width="120">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="operate"
+                        label="操作"
+                        width="120">
+                    <template slot-scope="scope">
+                        <el-button  @click="modifyIndeptTag(scope.row)" type="text" size="small">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination v-if="total>pageSize"
+                           :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           layout="total,prev, pager, next, jumper"
+                           :total="total">
+            </el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+  import api from '@api/preTreat.js';
+
+  export default {
+    name: 'combinQuestion',
+    data: function() {
+      return {
+        list: [],
+        tagTypes: [],
+        Adscriptions: [],
+        tagTypesList:[],
+        filter: {
+          tagType: [], //标签类型
+          tagAdscription: '', //标签归属
+          tagSysName: '', //标签系统名称
+        },
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+      }
+    },
+    created() {
+      this.getDropList();
+    },
+    methods: {
+      getValue(val) {
+        console.log('changeVal', val, this.filter.tagAdscription)
+      },
+      getDropList() {
+        api.getPreTypeList().then((res) =>{
+          this.getDataList();
+          if(res.data.code === '0') {
+            this.Adscriptions = res.data.data[1];
+            this.tagTypes =  res.data.data[3];
+            this.tagTypes =  this.tagTypes.filter(item => item.val != 0)  //去掉名称为默认值的填写单类型
+
+          }
+
+        })
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        api.getQuestionList(param).then((res) => {
+          const list = [...res.data.data.records];
+          for (var i = 0; i < list.length; i++) {
+            for (var j =  0; j < this.tagTypes.length; j++) {
+              if(list[i].tagType == this.tagTypes[j].val) {
+                list[i].tagTypeCn = this.tagTypes[j].name;
+              }
+            }
+            //后台数据typeCn转换为筛选中对应的字段名称
+            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;
+        })
+      },
+      filterDatas() {
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      addIndeptTag() {
+        this.$router.push({path:'LT-YWZSJWH-TJZHTXD'});
+      },
+      modifyIndeptTag(row) {
+        api.questionDetail({id:row.id}).then((res)=>{
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+            this.$router.push({name:'AddCombinQuestion',params:{isEdit:true,data:data}});
+          }else{
+            this.$message({
+              message: msg,
+              type: 'warning'
+            });
+          }
+        });
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        this.getDataList();
+      },
+      getFilterItems() {
+        const param = {
+          tagTypeList: this.filter.tagType[0] ? this.filter.tagType: [4,6],
+          current: this.currentPage,
+          size: this.pageSize,
+          type: this.filter.tagAdscription,
+          tagName: this.filter.tagSysName,
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      getTagType(val) {
+        return val
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(row){
+        const param = {
+          "ids": row.id,
+          "type": row.type
+        };
+        this.showConfirmDialog('是否删除该填写单?',()=>{
+          api.questionDel(param).then((res)=>{
+            if(res.data.code=='0'){
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功','success');
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      }
+    }
+  }
+</script>
+
+
+<style lang="less">
+    @import "../../less/admin.less";
+    .delete{
+        color: red
+    }
+    .delete:hover {
+        color: red;
+    }
+    .el-select .el-input .el-icon-arrow-up{
+        display: inline-block!important;
+    }
+    .el-select .el-input .el-icon-circle-close{
+        float:left;
+    }
+</style>

+ 556 - 0
src/components/preTreat/PubIndeptQa.vue

@@ -0,0 +1,556 @@
+<template>
+    <div class="PubTagGroupWrapper"
+         @click="closeNameLis(1)"
+    >
+        <el-form
+                class="groups"
+                :rules="rules"
+                ref="groups"
+                :model="form"
+                label-width="150px"
+        >
+            <el-form-item
+                    label="选择归属:"
+                    prop="region1"
+            >
+                <span class="changeTips">改变归属后,填写单明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.region1"
+                        placeholder="请选择归属"
+                        :disabled="!!editData.id"
+                        @change="readyChangeSelect(1)"
+                >
+                    <el-option
+                            v-for="item in Adscriptions"
+                            :label="item.name"
+                            :value="item.val"
+                            :key="item.val"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    label="选择类型:"
+                    prop="region2">
+                <span class="changeTips">改变类型后,填写单明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.region2"
+                        placeholder="请选择类型"
+                        :disabled="!!editData.id  || !form.region1"
+                        @change="readyChangeSelect(2)"
+                >
+                    <el-option
+                            v-for="item in labelTypes"
+                            :label="item.name"
+                            :value="item.val"
+                            :key="item.val"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    v-if="qaType==2"
+                    :label="'是否为主要内容'"
+                    prop="region12"
+            >
+                <el-select
+                        v-model="form.region12"
+                        :disabled="!form.region1"
+                        @change="sendData"
+                >
+                    <el-option
+                            label="是"
+                            value="0"
+                    ></el-option>
+                    <el-option
+                            label="不是"
+                            value="1"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+
+            <el-form-item
+                    label="填写单系统名称:"
+                    prop="region3">
+                <div @click.stop style="display:inline-block;">
+                    <el-input
+                            v-model="form.region3"
+                            :disabled="!form.region1"
+                            maxLength="30"
+                            placeholder="请输入填写单系统名称"
+                            @change="sendData"
+                            @input="focusSystemName"></el-input>
+                    <ul class="systemNames"
+                        v-if="isNeedSearch&&systemNameShow">
+                        <li v-for="item in systemNameLis"
+                            class="ellipsis"
+                            :key="item.conceptId"
+                            @click="pushSystemName(item.name)">{{item.name}}</li>
+                    </ul>
+                </div>
+                <span class="changeTips changeTipsName">
+                    当为症状时,填写单系统名称需要与医学标准术语内容相对应,如果没有可以先在医学标准术语中建立相关信息!未建立相关信息可能会影响系统使用!
+                </span>
+            </el-form-item>
+            <el-form-item
+                    :label="qaType==2?'填写单医生界面展示标准内容:':'填写单界面描述名称:'"
+                    prop="region4"
+            >
+                <el-input
+                        :disabled="!form.region1"
+                        v-model="form.region4"
+                        maxLength="30"
+                        :placeholder="qaType==2?'请输入填写单医生界面展示标准内容':'请输入填写单界面描述名称'"
+                        @change="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item
+                    v-if="qaType==2"
+                    label="填写单患者界面展示通俗内容:"
+                    prop="region5"
+            >
+                <el-input
+                        :disabled="!form.region1"
+                        v-model="form.region5"
+                        maxLength="30"
+                        placeholder="请输入填写单患者界面展示通俗内容"
+                        @change="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item
+                    label="性别:"
+                    prop="region7"
+            >
+                <span class="changeTips">改变性别后,填写单明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.region7"
+                        :disabled="!!editData.id || !form.region1"
+                        @change="readyChangeSelect(3)"
+                >
+                    <el-option
+                            label="通用"
+                            value="3"
+                    ></el-option>
+                    <el-option
+                            label="男"
+                            value="1"
+                    ></el-option>
+                    <el-option
+                            label="女"
+                            value="2"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    label="年龄:"
+                    prop="region8"
+                    class="ages"
+            >
+                <el-input
+                        v-model.number="form.region8"
+                        :disabled="!form.region1"
+                        type="number"
+                        ref="valage1"
+                        @input="sendData"
+                ></el-input>
+            </el-form-item> ~
+            <el-form-item
+                    prop="region9"
+                    class="ages maxAges"
+            >
+                <el-input
+                        v-model.number="form.region9"
+                        :disabled="!form.region1"
+                        type="number"
+                        ref="valage2"
+                        @input="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item label="填写单图片内容:"
+                          v-if="qaType==1&&form.region2!=4"
+                          prop="region13">
+                <el-upload
+                        :class="form.region13?'upload-hide':''"
+                        :limit="1"
+                        :action="uploadUrl"
+                        list-type="picture"
+                        :file-list="imgList"
+                        :show-file-list="showFileList"
+                        :on-remove="handleRemove"
+                        :on-success="handleSuccess"
+                        :on-error="handleError"
+                        accept="image/*"
+                        name="upfile">
+                    <el-button slot="trigger" size="small" type="primary">上传图片</el-button>
+                </el-upload>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+  import api from '@api/preTreat.js';
+  import utils from '@api/utils.js';
+  import config from '@api/config.js';
+
+  /**
+   * titlePar 顶部显示左(有默认值可不填)
+   * titleSub  顶部显示右(有默认值可不填)
+   * form 当前页面传到父组件的数据(region10,region11暂时不用)
+   * submitForm 基本信息验证必填项
+   * validatePass 基本信息必填项验证成功回调
+   * 父组件根据form.region2改变底部组件操作项
+   */
+
+  // 归属和填写单类型限制:
+
+// 症状情况(val:1):单选(val:1)、多选(val:2)、多列填写(val:3)、输入框(val:6)、数字输入框(val:7)、文本域(val:5)
+
+// 诊疗情况(val:51):单选(val:1)、多选(val:2)、多列填写(val:3)、输入框(val:6)、数字输入框(val:7)、文本域(val:5)、上传图片(val:4)
+
+// 其他史(val:3):单选(val:1)、多选(val:2)、多列填写(val:3)、输入框(val:6)、数字输入框(val:7)、文本域(val:5)
+
+// 补充内容(val:52):单选(val:1)、多选(val:2)、多列填写(val:3)、输入框(val:6)、数字输入框(val:7)、文本域(val:5)
+
+  export default {
+    props:['editData','qaType'],      //qaType:独立1/组合2填写单
+    data() {
+      var validatePass1 = (rule, value, callback) => {
+        this.validateSystomName(value,callback,1)
+      };
+      var validatePass2 = (rule, value, callback) => {
+        const editData = this.$props.editData;
+        if(editData.id && value == editData.tagName){ //修改系统名称没变就不再校验
+          callback();
+        }else{
+          this.validateSystomName(value,callback,2)
+        }
+      };
+      var validatePass11 = (rule, value, callback) => {
+        this.validateSystomName(value,callback,11)
+      };
+      var validatePass12 = (rule, value, callback) => {
+        this.validateSystomName(value,callback,1)
+      };
+      return {
+        form: {
+          region1: '',    //归属
+          region2: '',     //填写单类型
+          region3: '',      //系统名称
+          region4: '',      //医生界面名称
+          region5: '',      //患者界面名称
+          region6: '',      //填写单界面描述问题名称
+          region7: '3',       //性别
+          region8: '0',          //最小年龄
+          region9: '200',         //最大年龄
+          region12: '0',        //是否为主要内容
+          region13:'',          //上传图片
+        },
+        //isNeedSearch: false, //是否需要查询(系统名称)
+        imgList:[],
+        showFileList:false,
+        uploadUrl:config.urls.uploadImg,        //图片上传地址
+        labelTypesMaps: {       // 归属和填写单类型限制
+          '1':['1','2','3','5','6','7'], //症状情况
+          '51':['1','2','3','4','5','6','7'],    //诊疗情况
+          '3':['1','2','3','5','6','7'],         //其他史
+          '52':['1','2','3','5','6','7']            //补充内容
+        },
+        combinLabelMaps:{
+          '1':['4'], //症状情况
+          '51':['4','6'],    //诊疗情况
+          '3':['4','6'],         //其他史
+          '52':['4','6']            //补充内容
+        },
+        rules: {
+          region1: [
+            { required: true, message: '请选择归属', trigger: 'change' }
+          ],
+          region2: [
+            { required: true, message: '请选择类型', trigger: 'change' }
+          ],
+          region3: [
+            { required: true, message: '请输入填写单系统名称', trigger: 'change' },
+            { validator: validatePass2, trigger: 'blur' },
+          ],
+          region4: [
+            { required: true, message: '请输入填写单医生界面名称', trigger: 'change' },
+            { validator: validatePass11, trigger: 'blur' },
+          ],
+          region5: [
+            { required: true, message: '请输入填写单患者界面名称', trigger: 'change' },
+            { validator: validatePass12, trigger: 'blur' },
+          ],
+          region6: [
+            { required: true, message: '请输入填写单界面描述名称', trigger: 'change' },
+            { validator: validatePass1, trigger: 'blur' },
+          ],
+          region7: [
+            { required: true, message: '请选择性别', trigger: 'change' }
+          ],
+          region8: [
+            { required: true, message: '请输入最小年龄', trigger: 'change' }
+          ],
+          region9: [
+            { required: true, message: '请输入最大年龄', trigger: 'change' }
+          ],
+          region12: [
+            { required: true, message: '请选择是否为主要内容', trigger: 'change' }
+          ],
+        },
+        Adscriptions: [],
+        labelTypes: [],
+        labelTypesList: [],
+        systemNameShow: false,//系统名称列表显示
+        systom:null,      //填写单系统名称存在与否
+      }
+    },
+    computed: {
+      isNeedSearch() {
+        return this.qaType==2&&this.form.region1==1;
+      },
+    },
+    mounted() {
+      this.getDropList();
+      //编辑时赋值
+      const editData = this.$props.editData;
+      if(editData.id){
+        const trans = utils.transPretreatKeys(editData,this.qaType==1);
+        this.form = Object.assign({},this.form,trans);
+        const imgUrl = trans.region13;
+        if(imgUrl){
+          this.imgList = [{name:'',url:imgUrl.replace('{imageUrlPrefix}',config.imgHost)}];
+        }
+      };
+
+      //this.$emit('submitForm', 'groups', false);
+
+      this.$emit('changeVal', this.form, false);
+
+    },
+    /*watch: {
+      newName(nextVal, prevVal) {
+        if (this.isNeedSearch && nextVal != prevVal && (this.form.region12 == 0)) {
+          this.focusSystemName()
+        }
+      },
+    },*/
+    methods: {
+      handleRemove(){
+        this.showFileList=false;
+        this.form.region13 = '';
+        this.imgList=[];
+      },
+      handleSuccess(response){
+        if(response.state==='SUCCESS'){
+          this.showFileList = true;
+          this.form.region13 = '{imageUrlPrefix}'+response.url;
+        }else{
+          this.showFileList=false;
+          this.warning(response.msg);
+        }
+      },
+      handleError(){
+        this.showFileList=false;
+      },
+      getDropList() {
+        return api.getPreTypeList().then((res) => {
+          if (res.data.code === '0') {
+            this.Adscriptions = res.data.data[1];
+            this.labelTypesList = this.qaType==1?res.data.data[2]:res.data.data[3];
+            this.labelTypes = this.labelTypesList;
+          }
+        })
+      },
+      validateSystomName(name,callback,flg) {
+        if(flg == 1){
+          let tmpVal = this.form.region5;
+          if(tmpVal.trim() == ''){
+            callback(new Error('填写单界面描述名称不能为空'));
+          }else{
+            this.form.region5 = tmpVal.trim();
+            callback();
+          }
+        }else if(flg == 2){
+          let tmpVal = this.form.region3;
+          if(tmpVal.trim() == ''){
+            callback(new Error('填写单系统名称不能为空'));
+          }else{
+            this.form.region3 = tmpVal.trim();
+            callback();
+          }
+        }else if(flg == 11){
+          let tmpVal = this.form.region4;
+          if(tmpVal.trim() == ''){
+            callback(new Error('填写单医生界面名称不能为空'));
+          }else{
+            this.form.region4 = tmpVal.trim();
+            callback();
+          }
+        }
+      },
+      sendData() {
+        this.$emit('changeVal', Object.assign({},this.form), false)
+      },
+      readyChangeSelect(type) {
+        if(type === 1) {
+          this.initForm();
+          const maps = this.qaType==1?this.labelTypesMaps:this.combinLabelMaps;
+          this.labelTypes = this.labelTypesList.filter(item => maps[this.form.region1].includes(item.val));
+        }
+        //if(type === 2||type === 3) {
+          this.sendData();
+        //}
+      },
+      submitForm(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            this.$emit('validatePass', this.form, false);
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
+      focusSystemName() {       //系统名称搜索标准词
+        if(!this.isNeedSearch){
+          return;
+        }
+        if (this.form.region3.trim() == '') {
+          this.systemNameShow = false;
+          this.systemNameLis = [];
+          return;
+        }
+        let params = {
+          "libType": [1],
+          "name": this.form.region3
+        };
+        api.indexByLexicon(params).then((res) => {
+          if (res.data.code === '0') {
+            this.systemNameLis = res.data.data;
+            if (res.data.data.length > 0) {
+              this.systemNameShow = true;
+            } else {
+              this.systemNameShow = false;
+            }
+          }
+        })
+      },
+      pushSystemName(val) {
+        this.form.region3 = val;
+        this.systemNameShow = false;
+        this.sendData();
+      },
+      closeNameLis(flg) {
+        if (flg == 1) {
+          this.systemNameShow = false;
+        } else if (flg == 2) {
+          if (this.systemNameLis.length > 0) {
+            this.systemNameShow = true;
+          } else {
+            this.systemNameShow = false;
+          }
+        }
+      },
+      warning(msg, type) {
+        this.$message({
+          showClose: true,
+          message: msg,
+          type: type || 'warning'
+        })
+      },
+      initForm() {
+        this.form.region2 = '';
+        this.form.region7 = '3';
+        this.form.region12 = '0';
+        this.form.region13 = '';
+        //this.form.region5 = '';
+        //this.form.region12 = '1';
+      },
+    }
+  }
+</script>
+<style lang="less">
+    .normalVal .el-input{
+        width: auto;
+        display: inline-block;
+    .el-input__inner {
+        width: 40px;
+        padding: 0 5px;
+    }
+    }
+    .el-upload-list--picture .el-upload-list__item-name{
+        display: none;
+    }
+    .PubTagGroupWrapper .fix-inp .el-col .el-input__inner{
+        width: 100%;
+        display: inline-block;
+    }
+    .PubTagGroupWrapper .fix-inp .el-col-4{
+        text-align: center;
+    }
+    .PubTagGroupWrapper .fix-inp .el-col-8{
+        text-align: center;
+    }
+
+    .groups {
+        background-color: #fff;
+        padding: 20px;
+        margin: 20px 20px -20px 20px;
+    .el-form-item__content,
+    .el-input__inner {
+        height: 30px;
+        line-height: 30px;
+        width: 200px;
+    }
+    .el-form-item {
+        margin-bottom: 20px;
+    }
+    .el-form-item__error {
+        width: 200px;
+        top: 28px;
+    }
+    .el-form-item__label {
+        line-height: 30px;
+        text-align: left;
+    }
+    .el-input__icon {
+        line-height: 30px;
+    }
+    .ages .el-input {
+        display: inline-block;
+        width: auto;
+    .el-input__inner {
+        width: 40px;
+        padding: 0 5px;
+    }
+
+    .el-input__inner::-webkit-outer-spin-button,
+    .el-input__inner::-webkit-inner-spin-button {
+        -webkit-appearance: none;
+    }
+
+    .el-input__inner[type="number"] {
+        -moz-appearance: textfield;
+    }
+    }
+    .el-message-box__btns .el-button--default {
+        color: #606266 !important;
+    }
+    .cancelColor {
+        color: #22ccc8 !important;
+    }
+    .changeTips {
+        position: absolute;
+        left: 220px;
+    // min-width: 300px;
+        width: 200%;
+        color: #ea7777;
+        font-size: 12px;
+    }
+    }
+    .el-upload-list{
+        float: left;
+    }
+    .upload-hide .el-upload--picture{
+        display: none;
+    }
+</style>
+

+ 287 - 0
src/components/preTreat/PubSelect.vue

@@ -0,0 +1,287 @@
+<template>
+    <div class="single-container">
+        <el-form>
+            <div class="operation-row">
+                <el-checkbox-group size="small">
+                    <el-checkbox-button :label="0" @change="handlePlaceholder(0)">文字输入框占位符</el-checkbox-button>
+                </el-checkbox-group>
+                <el-checkbox-group size="small">
+                    <el-checkbox-button :label="0" @change="handlePlaceholder(1)">数字输入框占位符</el-checkbox-button>
+                </el-checkbox-group>
+                <el-checkbox-group size="small" v-if="type==2">
+                    <el-checkbox-button :label="0" @change="handleExclu">互斥项</el-checkbox-button>
+                </el-checkbox-group>
+                <el-button type="danger" size="small" class="del" @click="delRow">删除</el-button>
+
+            </div>
+            <div class="main-area" v-if="type!=3">
+                <el-col class="col-title">
+                    <span><i>*</i>填写单医生界面展示标准内容</span>
+                    <span>填写单患者界面展示通俗内容</span>
+                </el-col>
+                <el-col v-for="(it,i) in rows" :key="i">
+                    <div class="inps">
+                        <el-input v-model="rows[i].name"
+                                  v-bind:class="{select:focusOn==i}"
+                                  @focus="selectRow(i)"
+                                  ref = "inputName"
+                                  @input="HandleInputName(i, rows[i].name,true)"
+                                  @blur="emitValues"></el-input>
+                        <el-input v-model="rows[i].description"
+                                  v-bind:class="{select:focusOn==i}"
+                                  @focus="selectRow(i)"
+                                  ref = "inputDesc"
+                                  @input="HandleInputName(i, rows[i].description)"
+                                  @blur="emitValues"></el-input>
+                     </div>
+                    <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
+                </el-col>
+                <el-button @click="addRow">+</el-button>
+            </div>
+            <div class="main-area" v-if="type==3">
+                <el-col v-for="(it,i) in rows" :key="i">
+                    <div class="inps">
+                        <el-input v-model="rows[i].name"
+                                  v-bind:class="{select:focusOn==i}"
+                                  @focus="selectRow(i)"
+                                  ref = "inputName"
+                                  @input="HandleInputName(i, rows[i].name,true)"
+                                  @blur="emitValues"></el-input>
+                    </div>
+                    <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
+                </el-col>
+                <el-button @click="addRow" class="little">+</el-button>
+            </div>
+        </el-form>
+    </div>
+</template>
+<style lang="less">
+    @import "../../less/common.less";
+    .el-checkbox-button--small .el-checkbox-button__inner{
+        font-size: 14px;
+    }
+    .el-checkbox-button.is-disabled:first-child .el-checkbox-button__inner{
+        border-color: @disableColor;
+        border-left-color: @disableColor;
+        color: @disableColor;
+    }
+    .el-checkbox-button:last-child .el-checkbox-button__inner{
+        border-radius: 3px;
+        border-color: @adminBase;
+        color: @adminBase;
+        margin-right: 15px;
+    }
+    .el-checkbox-button.is-checked:first-child .el-checkbox-button__inner{
+        background-color:@adminBase;
+        border-left-color:@adminBase;
+        color:#fff;
+    }
+    .el-checkbox-group{
+        display: inline-block;
+    }
+    .operation-row{
+        margin-left:150px;
+        /*text-align: right;*/
+    .del{
+        margin-left: 150px;
+    }
+    .tip {
+        color: #22ccc8;
+    }
+    }
+    .main-area{
+        width: 80%;
+        min-width: 400px;
+        margin:20px 150px;
+    .inps{
+        display: inline-block;
+        width: calc(100% - 60px);
+    }
+    .el-tag{
+        margin-left: 10px;
+    }
+    .col-title{
+        margin-bottom:10px;
+        span{
+            display: inline-block;
+            width: calc(50% - 30px);
+            font-size:12px;
+            i{
+                color: #f56c6c;
+                margin-right: 3px;
+            }
+        }
+    }
+    .el-col .el-input {
+        width: 50%;
+        display: inline-block;
+        .el-input__inner{
+            border-radius: 0;
+        }
+        &.select{
+        input{
+            border-color: @adminBase;
+        }
+      }
+    }
+
+    .el-button{
+        width: calc(100% - 60px);
+        border-radius: 0;
+    &.little{
+         width: calc(50% - 30px);
+     }
+    }
+    }
+</style>
+<script>
+  import utils from '@api/utils.js';
+  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'],
+    data(){
+      return {
+        rows:[...initRows],
+        focusOn:-1,         //聚焦的行index
+      }
+    },
+    mounted(){
+      const {options} = this.$props;
+      if(options){
+        const arr = options.filter((it)=>{
+          return it.name;
+        });
+        const arrLen = arr.length;
+        if(arrLen < 4) {
+          for (let i = 0; i < 4 - arrLen; i++) {
+            arr.push(...utils.getInitRow(initRow,1))
+          }
+        }
+        this.rows = arr;
+        const items = utils.simpleOptionData(this.rows);
+        this.$emit('pushValues',items);
+      }
+    },
+    computed:{
+      showTag:function(){
+        return function(it){
+          let name = Object.keys(this.maps).find((item)=>{
+            return it[item];
+          });
+          return this.maps[name];
+        }
+      },
+    },
+    watch: {
+      ascription(newVal, preVal) {
+        if (newVal != preVal) {
+            this.rows = [...utils.getInitRow(initRow,4)];
+        }
+      },
+      type(newVal, preVal) {
+        if (newVal != preVal) {
+            this.rows = [...utils.getInitRow(initRow,4)];
+        }
+      },
+      sexType(newVal, preVal) {
+        if (newVal != preVal) {
+            this.rows = [...utils.getInitRow(initRow,4)];
+        }
+      },
+    },
+    methods:{
+      addRow(){
+        this.rows.push(utils.getInitRow(initRow,1));
+      },
+      selectRow(index){
+        this.focusOn = index;
+
+      },
+      handlePlaceholder(type){          //占位符类型,type=0文本输入框,type=1数字输入框
+        const i = this.focusOn;
+        if(i==-1){
+          this.$message({
+            message: '请先选中要操作的行',
+            type: 'warning',
+            showClose: true,
+          });
+          return ;
+        }
+        const maps = {0:'${input_输入}',1:'${number_输入}'};
+        this.rows[i].name = this.rows[i].name+maps[type];
+        this.rows[i].description = this.rows[i].description+maps[type];
+      },
+      handleExclu(){
+        const i = this.focusOn;
+        if(i==-1){
+          this.$message({
+            message: '请先选中要操作的行',
+            type: 'warning',
+            showClose: true,
+          });
+          return ;
+        }
+        this.rows.map((it,x)=>{
+          if(x===i){
+            it.exclusion = 1;
+          }else{
+            it.exclusion = 0;
+          }
+        });
+      },
+      emitValues(i,type,flag){
+        if(typeof i =='number'&&this.focusOn == -1){
+          this.$message({
+            message: '请先选择要操作的行',
+            type: 'warning',
+            showClose: true,
+          });
+          return;
+        }
+        const items = this.rows;
+        this.$emit('pushValues',items);
+      },
+      HandleInputName(i, name, isName) {
+        if(name.length > 30) {
+          if(isName){
+            Vue.set(this.rows[i], 'name', this.rows[i].name.slice(0, 30));
+            this.$refs.inputName[i].currentValue = this.rows[i].name;
+          }else{
+            Vue.set(this.rows[i], 'description', this.rows[i].description.slice(0, 30));
+            this.$refs.inputDesc[i].currentValue = this.rows[i].description;
+          }
+
+          this.$message({
+            message: '最多输入30个字',
+            type: 'warning',
+            showClose: true,
+          });
+          return;
+        }
+
+      },
+      delRow(){
+        if(this.focusOn==-1){
+          this.$message({
+            message: '请先选择要删除的行',
+            type: 'warning',
+            showClose: true,
+          });
+          return;
+        }
+        this.$alert('确定要删除该行吗?', '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          this.rows.splice(this.focusOn,1);
+          this.focusOn = -1;
+          this.emitValues();
+        }).catch(() => {});
+      }
+    }
+  }
+</script>

+ 265 - 0
src/components/preTreat/QuestionModules.vue

@@ -0,0 +1,265 @@
+<template>
+    <div>
+        <crumbs title="模板维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="模板名称:">
+                    <el-input size="mini" v-model="filter.name" placeholder="模板名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="归属:">
+                    <el-select size="mini" v-model="filter.type" @change="getValue"  placeholder="归属" clearable>
+                        <el-option v-if="item.val!=6&&item.val!=7&&item.val!=8&&item.val!=9&&item.val!=10&&item.val!=21&&item.val!=22" v-for="item in Adscriptions" :label="item.name" :value="item.val" :key="item.id" ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="类型:">
+                    <el-select size="mini" v-model="filter.moduleType" placeholder="类型" clearable>
+                        <el-option v-for="item in tagTypes" :label="item.name" :value="item.val" :key="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="归属科室:" v-if="filter.moduleType==1">
+                    <el-select size="mini" v-model="filter.relationId" @change="getValue"  placeholder="归属" clearable>
+                        <el-option v-for="item in deptList" :label="item.name" :value="item.conceptId" :key="item.conceptId" ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" @click="addModule">添加模板</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table
+                    :data="list"
+                    border
+                    style="width: 100%">
+                <el-table-column
+                        :resizable = "false"
+                        type="index"
+                        :index = 'indexMethod'
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="name"
+                        label="模板名称">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="ascriptionName"
+                        label="模板归属"
+                        width="80">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="moduleTypeName"
+                        label="模板类型">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="relationName"
+                        label="归属科室">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="modifier"
+                        label="操作人"
+                        width="120">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="operate"
+                        label="操作"
+                        width="120">
+                    <template slot-scope="scope">
+                        <el-button  @click="modifyModule(scope.row)" type="text" size="small">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination v-if="total>pageSize"
+                           :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           layout="total,prev, pager, next, jumper"
+                           :total="total">
+            </el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+  import api from '@api/preTreat.js';
+
+  export default {
+    name: 'QuestionModules',
+    data: function() {
+      return {
+        list: [],
+        tagTypes: [],
+        Adscriptions: [],
+        deptList:[],
+        filter: {
+          name: '', //模板名称
+          type: '', //模板归属
+          moduleType: '', //模板类型
+          relationId:'',  //归属科室
+        },
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+      }
+    },
+    created() {
+      this.getDropList();
+    },
+    methods: {
+      getValue(val) {
+        console.log('changeVal', val, this.filter.tagAdscription)
+      },
+      getDropList() {
+        api.getPreTypeList().then((res) =>{
+          this.getDataList();
+          if(res.data.code === '0') {
+            this.Adscriptions = res.data.data[1];
+            this.tagTypes =  res.data.data[4];
+          }
+        });
+        this.getDeptList();
+      },
+      getDeptList(){
+        const depts = localStorage.getItem("precDeptList");
+        const list = depts?JSON.parse(depts):[];
+        if(list&&list.length>0){
+          this.deptList = list;
+          return ;
+        }
+        api.getDeptList({moduleType:0,type:1}).then((res) =>{
+          if(res.data.code === '0') {
+            this.deptList = res.data.data&&res.data.data.deptDTOS||[];
+            localStorage.setItem("precDeptList",JSON.stringify(this.deptList));
+          }
+        });
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        api.getModuleList(param).then((res) => {
+          const list = [...res.data.data.records];
+          for (var i = 0; i < list.length; i++) {
+            for (var j =  0; j < this.tagTypes.length; j++) {
+              if(list[i].moduleType == this.tagTypes[j].val) {
+                list[i].tagTypeCn = this.tagTypes[j].name;
+              }
+            }
+            //后台数据typeCn转换为筛选中对应的字段名称
+            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;
+        })
+      },
+      filterDatas() {
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      addModule() {
+        this.$router.push({path:'LT-YWZSJWH-TJMBWH'});
+      },
+      modifyModule(row) {
+        api.getModuleDetail({moduleId:row.id,type:row.type}).then((res)=>{
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+            const item = Object.assign({},row,data);
+            this.$router.push({name:'AddQuestionModules',params:{isEdit:true,data:item}});
+          }else{
+            this.$message({
+              message: msg,
+              type: 'warning'
+            });
+          }
+        });
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        this.getDataList();
+      },
+      getFilterItems() {
+        const param = {
+          name: this.filter.name,
+          type:this.filter.type,
+          moduleType: this.filter.moduleType,
+          relationId: this.filter.moduleType==1?this.filter.relationId:'',
+          current: this.currentPage,
+          size: this.pageSize,
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      getTagType(val) {
+        return val
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(row){
+        const param = {
+          "ids": row.id,
+        };
+        this.showConfirmDialog('是否删除该模板?',()=>{
+          api.delModule(param).then((res)=>{
+            if(res.data.code=='0'){
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功','success');
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      }
+    }
+  }
+</script>
+
+
+<style lang="less">
+    @import "../../less/admin.less";
+    .delete{
+        color: red
+    }
+    .delete:hover {
+        color: red;
+    }
+    .el-select .el-input .el-icon-arrow-up{
+        display: inline-block!important;
+    }
+    .el-select .el-input .el-icon-circle-close{
+        float:left;
+    }
+</style>

+ 346 - 0
src/components/preTreat/QuestionTagGroup.vue

@@ -0,0 +1,346 @@
+<template>
+    <div class="symptomTagGroupWrapper commomSymptom clearfix">
+    <div class="bottomPartLeft">
+      <p class="poolTitle">标签池</p>
+      <div class="pool">
+        <el-input
+          placeholder="请输入搜索内容"
+          v-model="searchVal"
+        >
+            <i
+                slot="prefix"
+                class="el-input__icon el-icon-search"
+            ></i>
+        </el-input>
+        <ul class="tagList tagPool">
+            <li v-for="(item, index) in leftTagsList"
+                class = "tagItem"
+                :key='item.id'
+                :title="'[ '+item.tagName+' ]'"
+                :style="getStyle(item)?styles:null"
+                @click='selectLeftTag(item, index, $event)'
+            >
+                <p class="tagName ellipsis" >{{item.tagName}} </p>
+            </li>
+        </ul>
+      </div>
+    </div>
+    <div class="bottomPartMid fl">
+        <p><span class="el-icon-arrow-right" @click="toRightList"></span></p>
+        <p><span class="el-icon-arrow-left" @click="toLeftList"></span></p>
+    </div>
+    <div class="bottomPartRight ">
+      <p class="poolTitle">操作界面:</p>
+      <ul class="tagList operationPool operationPools">
+            <li class = "tagItem"
+                v-for="(item) in rightTagsList"
+                :key='item.id'
+                :style="getStyle2(item)?styles:null"
+                @click='selectRightTag(item)'
+            >
+                <p class="tagName  ellipsis" :title="'[ '+item.tagName+' ]'">{{item.tagName}} </p>
+            </li>
+        </ul>
+    </div>
+    <div class="buttonBox">
+        <div class="bottomPartMid bottomPartMidss fl" :class="(ascription == 1)?'':'bottomPartMids'">
+            <p><span class="el-icon-arrow-up" @click="toggleTopDownList(1)"></span></p>
+            <p><span class="el-icon-arrow-down" @click="toggleTopDownList(2)"></span></p>
+        </div>
+    </div>
+  </div>
+</template>
+<script>
+import api from '@api/preTreat.js';
+import utils from '@api/utils.js';
+import { constants } from 'fs';
+
+export default {
+    name: "QuestionTagGroup",
+    props: ['ascription','sexType','options','type'],
+    data() {
+        return {
+            leftTagsList: [],
+            selectLeftTagsList: [],
+            rightTagsList: [],
+            selectRightTagsList: [],
+            searchVal: '',
+            styles:{
+                background:'#eae7e7'
+            },
+        }
+    },
+    mounted() {
+        let tagList = this.transOptions(this.options);
+        if(tagList&&tagList.length > 0){
+          const that = this;
+          setTimeout(function(){            //等watch执行后赋值tags,否则这里先执行,会被watch里清空
+            that.rightTagsList = tagList;
+            that.searchTagList();
+          },100);
+        }
+    },
+    watch: {
+        searchVal(newVal, preVal){
+          this.ifReflashTagList(newVal, preVal);
+        },
+        ascription(newVal, preVal){
+          this.ifReflashTagList(newVal, preVal);
+        },
+        sexType(newVal, preVal){
+          this.ifReflashTagList(newVal, preVal);
+        },
+        type(newVal, preVal){
+          this.ifReflashTagList(newVal, preVal);
+        }
+    },
+    methods: {
+        transOptions(opt){
+          return opt&&opt.map((it)=>{
+            return Object.assign({},it,{id:it.questionId||it.id});      //模板是questionId,组合是id
+          });
+        },
+        ifReflashTagList(newVal='', preVal=''){
+          if(newVal.trim() == ''){
+            this.rightTagsList=[];console.log(1)
+            this.searchTagList();
+          }else if(newVal.trim() != preVal.trim()){
+            this.rightTagsList=[];console.log(2)
+            this.searchTagList();
+          }
+        },
+        selectLeftTag(tag) {
+            const hasTag = this.isHasTag(tag, this.selectLeftTagsList);
+            if (hasTag) {
+                this.selectLeftTagsList = this.selectLeftTagsList.filter(item => item.id !== tag.id)
+            } else {
+                this.selectLeftTagsList.push(tag);
+            }
+        },
+        selectRightTag(tag) {
+            let tmpArr = [];
+            tmpArr.push(tag);
+            if (this.selectRightTagsList.length > 0 && tag.id == this.selectRightTagsList[0].id) {
+              this.selectRightTagsList = this.selectRightTagsList.filter(item => item.id !== tag.id)
+            }else{
+              this.selectRightTagsList = tmpArr;
+            }
+        },
+        isHasTag(item, arr) {
+            for ( let i = 0; i <arr.length; i++) {
+                if(arr[i].id === item.id) {
+                    return true;
+                }
+            }
+            return false;
+        },
+        getStyle(item){       //左侧选中状态
+            return this.isHasTag(item, this.selectLeftTagsList)
+        },
+        getStyle2(item) {
+            return this.isHasTag(item, this.selectRightTagsList);
+        },
+        toggleTopDownList(type){
+          if(this.selectRightTagsList.length == 0 || this.rightTagsList.length == 0){
+            return;
+          }
+          const tmpRightSelect = JSON.parse(JSON.stringify(this.selectRightTagsList));
+          const tmpRightLis = JSON.parse(JSON.stringify(this.rightTagsList));
+          const numLen = tmpRightLis.length;
+          const numId = tmpRightSelect[0].id;
+          if(type == 1){
+            for(let i = 0;i < tmpRightLis.length;i++){
+              if(numId === tmpRightLis[i].id){//选中的是第几个
+                if(i == 0){//第一个不能往上移动
+                  return;
+                }else{//先把这个元素和后面的输入框从数组中删除,再添加到数组里
+                  let tmp1 = tmpRightLis[i];
+                  tmpRightLis.splice(i,1);
+                  tmpRightLis.splice(i-1,0,tmp1);
+                  this.rightTagsList = [...tmpRightLis];
+                  this.$emit('changeActionData',this.rightTagsList, false);
+                  return
+                }
+              }
+            }
+          }else if(type == 2){
+            for(let i = 0;i < tmpRightLis.length;i++){
+              if(numId === tmpRightLis[i].id){
+                if(i == numLen-1){
+                  return;
+                }else{
+                  let tmp1 = tmpRightLis[i];
+                  tmpRightLis.splice(i,1);
+                  tmpRightLis.splice(i+1,0,tmp1);
+                  this.rightTagsList = [...tmpRightLis];
+                  this.$emit('changeActionData',this.rightTagsList, false);
+                  return;
+                }
+              }
+            }
+          }
+        },
+        toLeftList() {
+            for (let i = 0; i < this.selectRightTagsList.length; i++) {
+                this.rightTagsList = this.rightTagsList.filter(item => item.id !== this.selectRightTagsList[i].id);
+            }
+            for (let i = 0; i < this.selectRightTagsList.length; i++) {
+                for (let j = 0; j < this.rightTagsList.length; j++) {
+                    if(this.selectRightTagsList[i].id === this.rightTagsList[j].id) {
+                        if(this.rightTagsList.length === 1) {
+                            this.rightTagsList = [];
+                        } else {
+                            this.rightTagsList.splice(j, 1);
+                        }
+                    }
+                }
+            }
+            this.selectLeftTagsList = [];
+            this.selectRightTagsList = [];
+            this.searchTagList();
+            this.$emit('changeActionData',this.rightTagsList, false);
+        },
+        toRightList() {
+            this.rightTagsList.push(...this.selectLeftTagsList);
+
+            for (let i = 0; i < this.rightTagsList.length; i++) {
+                this.leftTagsList = this.leftTagsList.filter(item => item.id !== this.rightTagsList[i].id)
+            }
+            this.selectLeftTagsList = [];
+            this.selectRightTagsList = [];
+            this.searchTagList();
+            this.$emit('changeActionData',this.rightTagsList, false);
+        },
+        searchTagList() {
+            let notIds = [];
+            for (let i = 0; i < this.rightTagsList.length; i++) {
+              notIds.push(this.rightTagsList[i].id);
+            }
+            const maps = {
+              '4':['1'],            //独立组合只能添加独立填写单
+              '6':['4']             //混合组合只能添加独立组合填写单
+            };
+            let param = {
+                "tagName": this.searchVal,
+                "type": this.ascription,
+                "notIds": notIds,
+                "sexType": this.sexType,
+                "tagType":maps[this.type]
+            };
+            api.questionSearch(param).then((res) => {
+                if (res.data.code === '0') {
+                    this.leftTagsList = res.data.data;
+                    this.selectLeftTagsList = [];
+                    this.selectRightTagsList = [];
+                }
+            })
+           
+        },
+    }
+}
+</script>
+
+<style lang="less" >
+@import '../../less/common.less';
+.commomSymptom {
+  .tagList.operationPools {
+    width: 100%;
+  }
+  div.bottomPartMids {
+    margin-left: 20px;
+  }
+  div.bottomPartMidss {
+    margin-top: 30px;
+  }
+}
+.symptomTagGroupWrapper {
+    .bottomPartLeft {
+        width: 30%;
+        box-sizing: border-box;
+        float: left;
+    }
+    .poolTitle {
+        // border-bottom: 1px solid @icssBorder;
+        box-sizing: border-box;
+        margin-bottom: 20px;
+    }
+    .pool {
+        // border:1px solid @icssBorder;
+    
+    }
+    .search {
+        width: 100%;
+        border-bottom: 1px solid @icssBorder;
+        box-sizing: border-box;
+        height: 30px;
+    }
+    .tagList {
+        border: 1px solid @icssBorder;
+    }
+    .tagPool {
+        height: 300px;
+        overflow-y: auto;
+
+    }
+    .attributeBox {
+        position: absolute;
+        right: -100px;
+        top: 2px;
+    }
+    .tagItem {
+        position: relative;
+        line-height: 30px;
+        cursor: pointer;
+        padding: 0 10px;
+    }
+    .operationPool {
+        position: relative;
+        width: 60%;
+        min-height: 300px;
+        padding: 10px 0;
+    }
+    .tagName:before {
+        content: '['
+    }
+    .tagName::after {
+        content: ']'
+    }
+    .bottomPartMid {
+        width: 8%;
+        margin-top: 60px;
+        p {
+        width: 100%;
+        text-align: center;
+        span {
+            cursor: pointer;
+            display: inline-block;
+            width: 30px;
+            height: 40px;
+            line-height: 40px;
+            margin: 0 auto;
+            border: 1px solid @icssBorder;
+            margin-bottom: 15px;
+            font-size: 18px;
+        }
+        }
+    }
+    .bottomPartRight {
+        float: left;
+        width: 40%;
+    }
+    .buttonBox {
+        width: 10%;
+        float: left;
+        margin-top: 30px;
+    }
+    .inputBox {
+        width: 120px;
+        .el-input {
+            .el-input__inner {
+                height: 30px;
+                background: rgb(234, 231, 231);
+            }
+        }
+    }
+}
+</style>

+ 250 - 0
src/components/preTreat/SimpleQuestion.vue

@@ -0,0 +1,250 @@
+<template>
+    <div>
+        <crumbs title="独立填写单维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="归属:">
+                    <el-select size="mini" v-model="filter.tagAdscription" @change="getValue"  placeholder="归属" clearable>
+                        <el-option v-if="item.val!=6&&item.val!=7&&item.val!=8&&item.val!=9&&item.val!=10&&item.val!=21&&item.val!=22" v-for="item in Adscriptions" :label="item.name" :value="item.val" :key="item.id" ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="类型:">
+                    <el-select size="mini" v-model="filter.controlType[0]" placeholder="类型" clearable>
+                        <el-option v-for="item in tagTypes" :label="item.name" :value="item.val" :key="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="填写单系统名称:">
+                    <el-input size="mini" v-model="filter.tagSysName" placeholder="填写单系统名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" @click="addIndeptTag">添加独立填写单</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table
+                    :data="list"
+                    border
+                    style="width: 100%">
+                <el-table-column
+                        :resizable = "false"
+                        type="index"
+                        :index = 'indexMethod'
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="tagName"
+                        label="填写单系统名称">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="typeCn"
+                        label="归属"
+                        width="80">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="tagTypeCn"
+                        label="类型">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="modifier"
+                        label="操作人"
+                        width="120">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="operate"
+                        label="操作"
+                        width="120">
+                    <template slot-scope="scope">
+                        <el-button  @click="modifyIndeptTag(scope.row)" type="text" size="small">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination v-if="total>pageSize"
+                           :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           layout="total,prev, pager, next, jumper"
+                           :total="total">
+            </el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+  import api from '@api/preTreat.js';
+
+  export default {
+    name: 'simpleQuestion',
+    data: function() {
+      return {
+        list: [],
+        tagTypes: [],
+        Adscriptions: [],
+        tagTypesList:[],
+        filter: {
+          tagType: [], //标签类型
+          controlType: [],
+          tagAdscription: '', //标签归属
+          tagSysName: '', //标签系统名称
+        },
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+      }
+    },
+    created() {
+      this.getDropList();
+    },
+    methods: {
+      getValue(val) {
+        console.log('changeVal', val, this.filter.tagAdscription)
+      },
+      getDropList() {
+        api.getPreTypeList().then((res) =>{
+          this.getDataList();
+          if(res.data.code === '0') {
+            this.Adscriptions = res.data.data[1];
+            this.tagTypes =  res.data.data[2];
+            this.tagTypes =  this.tagTypes.filter(item => item.val != 0)  //去掉名称为默认值的填写单类型
+
+          }
+
+        })
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        api.getQuestionList(param).then((res) => {
+          const list = [...res.data.data.records];
+          for (var i = 0; i < list.length; i++) {
+            for (var j =  0; j < this.tagTypes.length; j++) {
+              if(list[i].controlType == this.tagTypes[j].val) {
+                list[i].tagTypeCn = this.tagTypes[j].name;
+              }
+            }
+            //后台数据typeCn转换为筛选中对应的字段名称
+            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;
+        })
+      },
+      filterDatas() {
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      addIndeptTag() {
+        this.$router.push({path:'LT-YWZSJWH-TJDLTXD'})
+      },
+      modifyIndeptTag(row) {
+        api.questionDetail({id:row.id}).then((res)=>{
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+            const item = Object.assign({},row,data);
+            this.$router.push({name:'AddSimpleQuestion',params:{isEdit:true,data:item}});
+          }else{
+            this.$message({
+              message: msg,
+              type: 'warning'
+            });
+          }
+        });
+        //this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:row}});
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        this.getDataList();
+        // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+        //     this.list = this.cacheData[next];
+        // } else {
+        //     this.getDataList();
+        // }
+      },
+      getFilterItems() {
+        const param = {
+          tagTypeList: [1],
+          current: this.currentPage,
+          size: this.pageSize,
+          type: this.filter.tagAdscription,
+          tagName: this.filter.tagSysName,
+          controlTypeList: this.filter.controlType[0] ? this.filter.controlType: []
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      getTagType(val) {
+        return val
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(row){
+        const param = {
+          "ids": row.id,
+          "type": row.type
+        };
+        this.showConfirmDialog('是否删除该填写单?',()=>{
+          api.questionDel(param).then((res)=>{
+            if(res.data.code=='0'){
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功','success');
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      }
+    }
+  }
+</script>
+
+
+<style lang="less">
+    @import "../../less/admin.less";
+    .delete{
+        color: red
+    }
+    .delete:hover {
+        color: red;
+    }
+    .el-select .el-input .el-icon-arrow-up{
+        display: inline-block!important;
+    }
+    .el-select .el-input .el-icon-circle-close{
+        float:left;
+    }
+</style>

+ 17 - 0
src/routes.js

@@ -85,6 +85,14 @@ import AddConceptRelation from '@components/icss/AddConceptRelation.vue'  //医
 import MedicalMultRelation from '@components/icss/MedicalMultRelation.vue'  //医学术语--医学术语多层关联维护
 import AddMedicalMultRelation from '@components/icss/AddMedicalMultRelation.vue' //医学术语--添加医学术语多层关联维护
 import MedicalType from '@components/icss/MedicalType.vue'//医学术语维护-类型维护
+//预问诊
+import SimpleQuestion from '@components/preTreat/SimpleQuestion.vue';
+import CombinQuestion from '@components/preTreat/CombinQuestion.vue';
+import AddSimpleQuestion from '@components/preTreat/AddSimpleQuestion.vue';
+import AddCombinQuestion from '@components/preTreat/AddCombinQuestion.vue';
+import QuestionModules from '@components/preTreat/QuestionModules.vue';
+import AddQuestionModules from '@components/preTreat/AddQuestionModules.vue';
+
 export default [
   {
     path: '/',
@@ -236,6 +244,15 @@ export default [
 
       {path:'LT-YXSYKWH-YXSYDCGLWH',component:MedicalMultRelation,name:'MedicalMultRelation'},   //医学术语--医学术语多层关联维护
       {path:'LT-YXSYKWH-TJYXSYDCGL',component:AddMedicalMultRelation,name:'AddMedicalMultRelation'},   //医学术语--添加医学术语多层关联
+
+      {path:'LT-YWZSJWH-DLTXDWH',component:SimpleQuestion,name:'SimpleQuestion'},  //预问诊-独立填写单
+      {path:'LT-YWZSJWH-ZHTXDWH',component:CombinQuestion,name:'CombinQuestion'},  //预问诊-组合填写单
+      {path:'LT-YWZSJWH-TJDLTXD',component:AddSimpleQuestion,name:'AddSimpleQuestion'},  //预问诊-添加独立填写单
+      {path:'LT-YWZSJWH-TJZHTXD',component:AddCombinQuestion,name:'AddCombinQuestion'},  //预问诊-添加组合填写单
+      {path:'LT-YWZSJWH-MBWH',component:QuestionModules,name:'QuestionModules'},  //预问诊-模板维护
+      {path:'LT-YWZSJWH-TJMBWH',component:AddQuestionModules,name:'AddQuestionModules'},  //预问诊-添加模板
+
+
     ]
   }
 ]

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
 // const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.241:88';
+const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚