Explorar el Código

模板添加界面

Luolei hace 6 años
padre
commit
a28b97bdbc

+ 10 - 1
src/components/icss/BloodPressTagGroup.vue

@@ -31,7 +31,7 @@
     </div>
     <div class="bottomPartRight ">
       <p class="poolTitle">操作界面:</p>
-      <ul class="tagList operationPool">
+      <ul class="tagList operationPool templateTagList">
             <li class = "tagItem operationItem"
                 v-for="(item) in rightTagsList2" 
                 :key='item.id'
@@ -305,6 +305,7 @@ export default {
     .operationPool {
         position: relative;
         width: 85%;
+        padding: 10px;
     }
     .tagName {
         line-height: 30px;
@@ -345,6 +346,14 @@ export default {
         display: inline-block;
         line-height: 40px;
         margin: 0 5px 10px 0;
+        float: left;
+        text-align: center;
+        p {
+          padding: 5px 0;
+        }
+    }
+    .templateTagList {
+      height: 318px;
     }
     .active {
         color: #aBcdef;

+ 413 - 0
src/components/icss/CommonTemplate.vue

@@ -0,0 +1,413 @@
+<template>
+  <div class="symptomTagGroupWrapper 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 templateTagList">
+          <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 bottomPartRightTemplate">
+      <p class="poolTitle">模板内容:</p>
+      <el-form
+        class="subTemplate"
+        ref="groups"
+        :model="form"
+      >
+        <el-form-item
+          label="选择归属:"
+          prop="region"
+          size="mini"
+        >
+          <el-select
+            v-model="form.region"
+            placeholder="请选择模板归属"
+          >
+            <el-option
+              v-for="item in Adscriptions"
+              :label="item.name"
+              :value="item.val"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+          <el-button size="mini">添加</el-button>
+          <el-button size="mini">删除子模板</el-button>
+          <el-button size="mini">插入输入栏</el-button>
+
+          <el-button icon="el-icon-arrow-left" class="changeOrder changeOrderPub"></el-button>
+          <el-button icon="el-icon-arrow-right" class="changeOrderPub"></el-button>
+        </el-form-item>
+      </el-form>
+      <ul class="tagList operationPool templateTagLists">
+        <li
+          class="tagItem operationItem"
+          v-for="(item) in rightTagsList2"
+          :key='item.id'
+          :style="getStyle2(item)?styles:null"
+          @click='selectRightTag(item)'
+        >
+          <div class="inputBox">
+            <el-input
+              v-if="item.type === 'input'"
+              placeholder=""
+              v-model="item.text"
+            >
+            </el-input>
+          </div>
+          <p
+            v-if="item.tagName"
+            class="tagName  ellipsis"
+            :title="'[ '+item.tagName+' ]'"
+          >{{item.tagName}} </p>
+        </li>
+      </ul>
+    </div>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+import utils from '@api/utils.js';
+
+export default {
+  props: {
+    pool: {
+      default: () => [],
+      type: Array
+    },
+    type: {
+      default: '',
+      type: String
+    },
+    sexType: {
+      default: '',
+      type: String
+    },
+    options: {
+      default: () => [],
+      type: Array
+    },
+  },
+  data() {
+    return {
+      Adscriptions: [
+        { name: '添加病情变化', val: '1', id: '001' },
+        { name: '病程变化', val: '2', id: '002' },
+        { name: '添加其他症状', val: '3', id: '003' },
+      ],
+      form: {
+        region: '1',    //归属
+      },
+      leftTagsList: [],
+      selectLeftTagsList: [],
+      rightTagsList: [],
+      rightTagsList2: [],
+      selectRightTagsList: [],
+      searchVal: '',
+      styles: {
+        background: '#eae7e7'
+      },
+    }
+  },
+  mounted() {
+    this.rightTagsList2 = this.options
+    let newArr = []
+    for (let i = 0; i < this.rightTagsList2.length; i++) {
+      if (this.rightTagsList2[i].tagType == 8) {
+        newArr.push({ text: this.rightTagsList2[i].tagName, type: 'input', id: i + ',,,' })
+      } else {
+        if (i === 0) {
+          newArr.push({ text: '', type: 'input', id: i + ',,,' })
+        }
+        newArr.push(this.rightTagsList2[i])
+        if (!this.rightTagsList2[i + 1] || this.rightTagsList2[i + 1] && this.rightTagsList2[i + 1].tagType != 8) {
+          newArr.push({ text: '', type: 'input', id: i + ',,,,' })
+        }
+      }
+    }
+    this.rightTagsList2 = newArr
+    this.$emit('changeActionData', this.rightTagsList2, false);
+    this.searchTagList()
+    // this.leftTagsList = this.pool
+    // console.log('TAGPOOL', this.pool)
+  },
+  watch: {
+    pool(newVal, preVal) {
+      this.leftTagsList = newVal
+    },
+    searchVal(newVal, preVal) {
+      if (newVal.trim() == '') {
+        this.searchTagList()
+      } else if (newVal.trim() != preVal.trim()) {
+        this.searchTagList()
+      }
+    },
+  },
+  methods: {
+    selectLeftTag(tag, index, e) {
+      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) {
+      const hasTag = this.isHasTag(tag, this.selectRightTagsList)
+      if (hasTag) {
+        this.selectRightTagsList = this.selectRightTagsList.filter(item => item.id !== tag.id)
+      } else {
+        this.selectRightTagsList.push(tag);
+      }
+    },
+    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)
+    },
+    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++) {//每次往回移时同时删掉下面输入框
+        if (this.selectRightTagsList[i].type !== 'input') {
+          for (let j = 0; j < this.rightTagsList2.length; j++) {
+            if (this.selectRightTagsList[i].id === this.rightTagsList2[j].id) {
+              if (this.rightTagsList2.length === 3) {
+                this.rightTagsList2 = []
+              } else {
+                this.rightTagsList2.splice(j, 2)
+              }
+            }
+          }
+        }
+      }
+      this.selectLeftTagsList = []
+      this.selectRightTagsList = []
+      this.searchTagList()
+      this.$emit('changeActionData', this.rightTagsList2, false);
+    },
+    toRightList() {
+      this.rightTagsList.push(...this.selectLeftTagsList);
+      let textItem = { text: '', type: 'input' }
+      for (let i = 0; i < this.selectLeftTagsList.length; i++) { //选中标签每个前后加入输入框
+        if (this.rightTagsList2.length === 0) {
+          let textItem1 = JSON.parse(JSON.stringify(textItem))
+          textItem1.id = this.selectLeftTagsList[i].id + ',,'
+          this.rightTagsList2.push(textItem1)
+        }
+        this.rightTagsList2.push(this.selectLeftTagsList[i]);
+        let textItem2 = JSON.parse(JSON.stringify(textItem))
+        textItem2.id = this.selectLeftTagsList[i].id + ','
+        this.rightTagsList2.push(JSON.parse(JSON.stringify(textItem2)))
+      }
+
+      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.$emit('changeActionData', this.rightTagsList2, false);
+    },
+    searchTagList() {
+      let notIds = []
+      for (let i = 0; i < this.rightTagsList.length; i++) {
+        if (typeof this.rightTagsList2[i].id === 'number') {
+          notIds.push(this.rightTagsList2[i].id)
+        }
+      }
+      let param = {
+        "tagName": this.searchVal,
+        "type": this.type || '',
+        "notIds": notIds,
+      }
+      api.searchTagList(param).then((res) => {
+        if (res.data.code === '0') {
+          this.leftTagsList = res.data.data
+          this.selectLeftTagsList = []
+          this.selectRightTagsList = []
+        }
+      })
+
+    }
+
+  }
+}
+</script>
+<style lang="less" scoped>
+@import "../../less/common.less";
+.symptomTagGroupWrapper {
+  .bottomPartLeft {
+    width: 30%;
+    box-sizing: border-box;
+    float: left;
+  }
+  .poolTitle {
+    box-sizing: border-box;
+    margin-bottom: 20px;
+  }
+  .inputBox {
+    width: 100px;
+  }
+  .search {
+    width: 100%;
+    border-bottom: 1px solid @icssBorder;
+    box-sizing: border-box;
+    height: 30px;
+  }
+  .tagList {
+    overflow-y: auto;
+    border: 1px solid @icssBorder;
+  }
+  .tagItem {
+    line-height: 30px;
+    padding: 0px 10px;
+    box-sizing: border-box;
+  }
+  .operationPool {
+    position: relative;
+    width: 85%;
+    padding: 10px;
+    box-sizing: border-box;
+  }
+  .tagName {
+    line-height: 30px;
+  }
+  .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: 60%;
+    .changeOrder {
+      margin-left: 20px;
+    }
+  }
+  .templateTagList {
+    height: 450px;
+  }
+  .templateTagLists {
+    height: 468px;
+    width: 98%;
+  }
+  button {
+    // margin-top: 20px;
+  }
+  .operationItem {
+    display: inline-block;
+    line-height: 40px;
+    margin: 0 5px 10px 0;
+    text-align: center;
+    float: left;
+    p {
+      padding: 5px 0;
+    }
+  }
+  .active {
+    color: #abcdef;
+  }
+}
+</style>
+<style lang="less">
+@import "../../less/common.less";
+.bottomPartRightTemplate {
+  .subTemplate {
+    // display: inline-block;
+  }
+  .el-form-item__content {
+    .el-input__inner {
+      height: 30px;
+      line-height:30px;
+      border-radius:5px;
+      font-size: 14px;
+    }
+    .el-select {
+      margin-right:10px;
+    }
+    .el-button--mini[data-v-2db8be7a], .el-button--mini.is-round[data-v-2db8be7a] {
+      padding: 5px 8px 4px;
+    }
+    .el-button--mini[data-v-2db8be7a].changeOrderPub, .el-button--mini.is-round[data-v-2db8be7a].changeOrderPub {
+      padding: 5px 12px;
+    }
+    .el-button:hover {
+        color: @adminBase;
+        border-color: @adminBase;
+        outline: 0;
+        opacity: 1;
+        background-color: #fff;
+    }
+    .el-button:active {
+        color: @adminBase;
+        border-color: @adminBase;
+        outline: 0;
+    }
+    .el-button:focus {
+      background-color: #fff;
+      color: @adminBase;
+      opacity: 1;
+    }
+  }
+}
+  
+</style>
+

+ 1 - 0
src/components/icss/NoiseTemplate.vue

@@ -271,6 +271,7 @@ export default {
   }
   .btn {
     text-align: right;
+    margin-top: 10px;
   }
   .order {
     margin-bottom: 20px;

+ 216 - 0
src/components/icss/PubTemplateGroup.vue

@@ -0,0 +1,216 @@
+<template>
+  <div class="PubTagGroupWrapper">
+    <el-form
+      class="groups"
+      :rules="rules"
+      ref="groups"
+      :model="form"
+      label-width="150px"
+    >
+      <el-form-item
+        label="选择归属:"
+        prop="region1"
+      >
+        <span class="changeTips">改变归属后,模板明细将会恢复到默认状态</span>
+          <!-- :disabled="!!editData.id" -->
+        <el-select
+          v-model="form.region1"
+          placeholder="请选择模板归属"
+          @change="readyChangeSelect"
+        >
+          <el-option
+            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="模板名称:"
+        prop="region2"
+      >
+        <el-input
+          v-model="form.region2"
+          :disabled="!form.region1"
+          maxLength="120"
+          placeholder="请输入模板名称"
+          @change="sendData"
+        ></el-input>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/icss.js';
+
+/**
+ * 归属type
+ * 1:主诉模板 2:现病史模板 3:现病史空模板 4 : 其他史模板 5:嵌套模板 6:慢病模板
+ */
+
+
+export default {
+  props:['editData'],
+  data() {
+    var validatePass2 = (rule, value, callback) => {
+        const editData = this.$props.editData;
+        if(editData.id && value == editData.tagName){ //修改系统名称没变就不再校验
+          callback();    
+        }else{
+          this.validateSystomName(value,callback)
+        }
+    };
+    return {
+      Adscriptions:[
+        {name:'主诉模板',val:'1',id:'1001'},
+        {name:'现病史模板',val:'2',id:'1002'},
+        {name:'现病史空模板',val:'3',id:'1003'},
+        {name:'其他史模板',val:'4',id:'1004'},
+        {name:'嵌套模板',val:'5',id:'1005'},
+        {name:'慢病模板',val:'6',id:'1006'},
+      ],
+      form: {
+        region1: '1',    //归属
+        region2: '',     //模板名称
+      },
+      rules: {
+        region1: [
+          { required: true, message: '请选择模板归属', trigger: 'change' }
+        ],
+        region2: [
+          { required: true, message: '请输入模板名称', trigger: 'change' },
+          { validator: validatePass2, trigger: 'blur' },
+        ],
+      },
+    }
+  },
+  computed: {
+    newType() {
+      return this.form.region1;
+    },
+  },
+  mounted() {
+    const editData = this.$props.editData;
+    if(editData.id){      //修改
+      const trans = utils.transformKeys(editData,2);
+      this.form = Object.assign({},this.form,trans);
+    }
+    this.$emit('changeVal', this.form, false)
+  },
+  watch: {
+    newType(nextVal, prevVal) {
+      
+    },
+  },
+  methods:{
+    sendData(val){
+      console.log(val)
+    },
+    readyChangeSelect(val){
+      console.log(val)
+    },
+    validateSystomName(name,callback) {         //判断模板名称是否存在
+      if(this.form.region2.trim() == ''){ return }
+      let param = {
+        "existName": this.form.region2,     
+        "type": this.form.region1,
+        "notTagType":[8],        //去掉文字标签查重
+      }
+      api.validateSystomName(param).then((res) => {
+        if (res.data.code === '0') {
+          if(res.data.data && res.data.data.length != 0){
+            callback(new Error('该系统名称已存在'));
+          }else{
+            callback();
+          }
+        }
+      })
+    },
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('validatePass', this.form, false)
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  }
+}
+</script>
+<style lang="less">
+.PubTagGroupWrapper {
+  .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 {
+    top: 28px;
+  }
+  .el-form-item__label {
+    line-height: 30px;
+    text-align: left;
+  }
+  .el-input__icon {
+    line-height: 30px;
+  }
+  .verticalMiddle .el-form-item__content {
+    position: relative;
+    top: 16px;
+  }
+  .maxAges {
+    margin-left: -125px;
+  }
+  .ages {
+    display: inline-block;
+    .el-form-item__content {
+      width: auto;
+    }
+    .el-input {
+      display: inline-block;
+      width: auto;
+      .el-input__inner {
+        width: 60px;
+        padding: 0 5px;
+        margin-right: 25px;
+        text-align: center;
+      }
+
+      .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;
+    color: #22ccc8;
+    font-size: 12px;
+  }
+}
+}
+</style>
+

+ 8 - 3
src/components/icss/TemplateMaintenance.vue

@@ -9,7 +9,7 @@
                 </el-form-item>
                 <el-form-item>
                     <el-button size="mini" @click="filterDatas">确认</el-button>
-                    <el-button size="mini" type="primary" @click="addIndeptTag">添加归属</el-button>
+                    <el-button size="mini" type="primary" @click="addIndeptTag">添加模板</el-button>
                 </el-form-item>
             </el-form>
         </crumbs>
@@ -22,26 +22,32 @@
                         type="index"
                         :index = 'indexMethod'
                         label="编号"
+                        :resizable = "false"
                         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="归属">
                 </el-table-column>
                 <el-table-column
+                        :resizable = "false"
                         prop="modifier"
                         label="操作人">
                 </el-table-column>
                 <el-table-column
+                        :resizable = "false"
                         prop="operate"
                         label="操作">
                     <template slot-scope="scope">
@@ -137,7 +143,7 @@
         this.getDataList();
       },
       addIndeptTag() {
-        this.$router.push({path:'LT-YXSJWH-TJDLBQ'})
+        this.$router.push({path:'LT-YXSJWH-TJMBWH'})
       },
       modifyIndeptTag(row) {
         // api.detailsTag({id:row.id,sexType:row.sexType,age:row.age}).then((res)=>{
@@ -153,7 +159,6 @@
         //   }
         // });
         console.log(row)
-        // this.$router.push({name:'AddIndeptLabel'});
       },
       currentChange(next) {
         this.currentPage = next;

+ 197 - 0
src/components/icss/TemplateMaintenanceWrap.vue

@@ -0,0 +1,197 @@
+<template>
+  <div class="NoiseTemplateWrapper TemplateWrapper">
+    <div class="groupTitle"><i
+        class="el-icon-back"
+        @click="back"
+      ></i> {{txt}}</div>
+    <PubTemplateGroup
+      :editData="editData"
+      @changeVal="changeVal"
+      @changeType="changeType"
+      @validatePass="validatePass"
+      ref="submitForm"
+    ></PubTemplateGroup>
+    <div class="main">
+      <CommonTemplate
+        v-if="dataPub.region1 == 1" 
+        :pool="dataPub.tagPool"
+        :type="dataPub.region1"
+        :options="editData.questionMapping"
+         @changeActionData="changeActionData"
+      >
+      </CommonTemplate>
+      <div class="btn">
+        <el-button
+          type="primary"
+          @click="submitForm"
+        >确 定</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+/**
+ * dataPub.region2  判断底部显示哪些
+ */
+import PubTemplateGroup from './PubTemplateGroup';
+import CommonTemplate from './CommonTemplate';
+import api from '@api/icss.js';
+import utils from '@api/utils.js';
+
+export default {
+  name: 'TemplateMaintenanceWrap',
+  data() {
+    return {
+      txt:'模板维护--添加模板',
+      dataPub: {},                    //公用组件传的值都在这
+      editData:{},                    //编辑数据
+      form: {
+        currentOrder: '0',            //标签成文顺序
+      },
+      rules: {
+        currentOrder: [
+          { required: true, message: '选择标签成文顺序', trigger: 'change' }
+        ]
+      },
+      sendIds: [[], [], [], [], [], []],           //标签明细右侧操作数据
+    }
+  },
+  beforeMount:function(){
+    const {isEdit,data} = this.$route.params;
+    if(isEdit){
+      this.txt = '模板维护--修改模板';
+      this.editData = data;
+      // console.log('回读数据', this.editData)
+    }
+  },
+  methods: {
+    back() { this.$router.go(-1) },
+    changeVal(val) {    //子组件数据改变传递到父组件
+      this.dataPub = val
+      // console.log('公用组件传的值都在这', val)
+    },
+    changeSex(sex) {       //性别改变,清空标签明细
+      // console.log(sex)
+    },
+    changeType(type) {        //填写单类型改变,标签明细左侧更新,右侧清空
+      // console.log(type)
+    },
+    changeActionData(arr) {          //标签明细右侧数据id
+      this.sendIds = arr
+    },
+    submitForm() {       // 调用子组件的方法验证公用部分
+      this.$refs.submitForm.submitForm('groups');
+    },
+    validatePass() {      //验证成功回调,调取接口
+      //仍需验证标签明细是否选择
+      let type = this.dataPub.region1;
+      if (JSON.stringify(this.sendIds) == '[[],[],[],[],[],[]]' && type != 6 && type != 7 && type != 8) {
+        this.$message({
+          message: '请选择标签明细',
+          type: 'warning'
+        });
+        return;
+      }
+      let detailLis = utils.dataRecombination(this.sendIds, this.dataPub.region2)
+      let param = {
+        "questionWrapper": {
+          "controlType": 0,                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
+          "id": this.editData.id || '',                //新增id空
+          "type": this.dataPub.region1,                //标签归属
+          // "itemType":0,                                //0:是症状,1:不是症状
+          "tagType": this.dataPub.region2,             //标签类型
+          "tagName": this.dataPub.region3,             //系统名称
+          "name": this.dataPub.region4,                //界面名称
+          "joint": this.dataPub.region5,               //标签间的连接符
+          "subType": this.dataPub.region6,   	         //0:可以,1:不可以(当项目检索)
+          "sexType": this.dataPub.region7,             //1:男,2:女,3:通用
+          "ageBegin": this.dataPub.region8,       		 //最小年龄
+          "ageEnd": this.dataPub.region9,              //最大年龄
+          "textGenerate": this.form.currentOrder,      //成文顺序 默认0
+          "copyType": this.dataPub.region10,           //是否复制
+          "showAdd": this.dataPub.region11,            //是否显示加号血压
+          "showInfo": 0,
+          "questionDetails": [],
+          "questionMappings": detailLis       //映射关系,
+        }
+      }
+      this.showDelDialog(param)
+    },
+    showDelDialog(param) {
+      this.showConfirmDialog('是否保存该标签组?', () => {
+        api.saveOrUpdate(param).then((res) => {
+          if (res.data.code === '0') {
+            this.warning(res.data.msg || '保存成功', 'success','1000')
+            setTimeout(() => {
+              this.$router.push({
+                path:'/admin/LT-YXSJWH-BQZWH'
+              })
+            }, 1000);
+          } 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,time) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning',
+        duration:time || '3000'
+      })
+    },
+  },
+  components: {
+    PubTemplateGroup,
+    CommonTemplate,
+  }
+}
+</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;
+    }
+  }
+}
+</style>
+

+ 3 - 1
src/routes.js

@@ -40,7 +40,8 @@ import PromptInfo from '@components/icss/PromptInfo.vue'//提示信息
 import AddPromptInfo from '@components/icss/AddPromptInfo.vue'//添加提示信息
 import SimilarName from '@components/icss/SimilarName.vue'//别名维护
 import AddSimilarName from '@components/icss/AddSimilarName.vue'//别名维护-详情
-import TemplateMaintenance from '@components/icss/TemplateMaintenance.vue'//别名维护-详情
+import TemplateMaintenance from '@components/icss/TemplateMaintenance.vue'//模板维护列表
+import TemplateMaintenanceWrap from '@components/icss/TemplateMaintenanceWrap.vue'//模板维护添加修改
 export default [
   {
     path: '/',
@@ -150,6 +151,7 @@ export default [
 	  {path:'LT-YXSJWH-BMWH',component:SimilarName,name:'SimilarName'},     //别名维护
       {path:'LT-YXSJWH-TJBM',component:AddSimilarName,name:'AddSimilarName'},     //别名维护-详情
       {path:'LT-YXSJWH-MBWH',component:TemplateMaintenance,name:'TemplateMaintenance'},     //模板维护
+      {path:'LT-YXSJWH-TJMBWH',component:TemplateMaintenanceWrap,name:'TemplateMaintenanceWrap'},     //模板维护-添加修改
     ]
   }
 ]