Pārlūkot izejas kodu

Merge branch 'dev' into independentTag

zhouna 6 gadi atpakaļ
vecāks
revīzija
e344e25fd4

+ 22 - 0
src/api/utils.js

@@ -146,5 +146,27 @@ export default {
       }
     }
     return tmpArr;
+  },
+  /**
+   * @
+   * **/
+  simpleOptionData(data){
+    const {options,defaultCheckeds,sameToNones,sameToBans} = data;
+    let defaultSelect = '0',code='';
+    let arr=[];
+    options.forEach((it,i)=>{
+      if(it){
+        defaultSelect = +defaultCheckeds[0]===i?'1':'0';
+        if(+sameToNones[0]===i){
+          code='2';
+        }
+        if(+sameToBans[0] === i){
+          code = '1';
+        }
+        arr.push({name:it,defaultSelect,code,remark:'单选'});
+      }
+    });
+    return arr;
   }
 }
+

+ 185 - 0
src/components/icss/AddIndeptLabel.vue

@@ -0,0 +1,185 @@
+<template>
+    <div class="NoiseTemplateWrapper TemplateWrapper">
+        <div class="groupTitle"><i
+                class="el-icon-back"
+                @click="back"
+        ></i> 独立标签维护--添加独立标签</div>
+        <PubIndeptTag
+                @changeVal="changeVal"
+                @changeSex="changeSex"
+                @changeType="changeType"
+                @validatePass="validatePass"
+                ref="submitForm"
+        ></PubIndeptTag>
+        <div class="main">
+            <p class="title"> <i>*</i> 标签明细:</p>
+            <SingleSelect v-if="dataPub.region2==1" :type="dataPub.region2" @pushValues="pushValues"></SingleSelect>
+            <div class="btn">
+                <el-button
+                        type="primary"
+                        @click="submitForm"
+                >确 定</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+  /**
+   * dataPub.region2  判断底部显示哪些
+   */
+  import PubIndeptTag from './PubIndeptTag';
+  import SingleSelect from './SingleSelect';
+  import api from '@api/icss.js';
+  import utils from '@api/utils.js';
+
+  export default {
+    name: 'NoiseTemplateWrapper',
+    data() {
+      return {
+        dataPub: {},      //公用组件传的值都在这
+        form: {
+          currentOrder: '0',     //标签成文顺序
+        },
+        rules: {
+          currentOrder: [
+            { required: true, message: '选择标签成文顺序', trigger: 'change' }
+          ]
+        },
+        options: [],           //标签明细右侧操作数据
+      }
+    },
+    computed: {
+      newSign() {
+        return this.dataPub.region2;
+      },
+    },
+    watch: {
+      newSign(nextVal, prevVal) {
+        if (nextVal != prevVal) {
+          this.form.currentOrder = '0'
+        }
+      },
+    },
+    methods: {
+      back() { this.$router.go(-1) },
+      changeVal(val) {    //子组件数据改变传递到父组件
+        this.dataPub = val
+        //console.log('公用组件传的值都在这', val)
+      },
+      changeSex(sex) {       //性别改变,清空标签明细
+        //console.log(sex)
+      },
+      changeType(type) {        //填写单类型改变,标签明细左侧更新,右侧清空
+        //console.log(type)
+      },
+      pushValues(its){
+        this.options = its;
+      },
+      submitForm() {       // 调用子组件的方法验证公用部分
+        this.$refs.submitForm.submitForm('groups');
+      },
+      validatePass() {      //验证成功回调,调取接口
+        //仍需验证标签明细是否选择
+        if ([0,1,2].includes(+this.dataPub.region2)&&this.options.length==0) {
+          this.$message({
+            message: '至少填一个选项',
+            type: 'warning'
+          });
+          return;
+        }
+
+        let param = {
+          "questionWrapper": {
+            "controlType": this.dataPub.region2,                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
+            "id": "",                                    //新增id置空
+            "type": this.dataPub.region1,                //标签归属
+            "tagType": 1,             //标签类型
+            "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.region2 == 6 ? this.dataPub.region10 : (this.dataPub.region2 == 3 ? this.dataPub.region11 : ''),                               //是否复制
+            "showAdd": 0,                                //是否显示加号血压
+            "showInfo": 0,
+            "questionDetails": this.options,
+            "questionMappings": []       //映射关系,
+          }
+        };console.log(param)
+        //this.showSaveDialog(param);
+      },
+      showSaveDialog(param) {
+        this.showConfirmDialog('是否保存该标签?', () => {
+          api.saveOrUpdate(param).then((res) => {
+            if (res.data.code === '0') {
+              this.warning(res.data.msg || '保存成功', 'success')
+            } 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: {
+      PubIndeptTag,
+      SingleSelect
+    }
+  }
+</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>
+

+ 8 - 6
src/components/icss/BloodPressTagGroup.vue

@@ -25,8 +25,8 @@
       </div>
     </div>
     <div class="bottomPartMid fl">
-      <p><span class="el-icon-arrow-left" @click="toLeftList"></span></p>
-      <p><span class="el-icon-arrow-right" @click="toRightList"></span></p>
+        <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>
@@ -194,9 +194,11 @@ export default {
             this.rightTagsList.push(...this.selectLeftTagsList);
             let textItem = { text: '' ,type:'input' }
             for (let i = 0; i < this.selectLeftTagsList.length; i++) { //选中标签每个前后加入输入框
-                let textItem1 = JSON.parse(JSON.stringify(textItem))
-                textItem1.id = this.selectLeftTagsList[i].id + ',,'
-                this.rightTagsList2.push(textItem1)
+                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 + ','
@@ -318,7 +320,7 @@ export default {
         margin-top: 20px;
     }
     .operationItem {
-        float: left;
+        display: inline-block;
         line-height: 40px;
         margin: 0 5px 10px 0;
     }

+ 220 - 0
src/components/icss/IndeptLabel.vue

@@ -0,0 +1,220 @@
+<template>
+    <div>
+        <crumbs title="独立标签维护" style="min-width: 1085px">
+            <el-form :inline="true" class="demo-form-inline">
+                <!--<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-select size="mini" v-model="filter.tagAdscription" @change="getValue"  placeholder="标签归属" clearable>
+                        <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="标签系统名称:">
+                    <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="primary" @click="addIndeptTag">添加独立标签</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table
+                    :data="list"
+                    border
+                    style="width: 100%">
+                <el-table-column
+                        type="index"
+                        :index = 'indexMethod'
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        prop="typeCn"
+                        label="标签归属">
+                </el-table-column>
+                <el-table-column
+                        prop="tagTypeCn"
+                        label="标签类型">
+                </el-table-column>
+                <el-table-column
+                        prop="tagName"
+                        label="标签系统名称">
+                </el-table-column>
+                <el-table-column
+                        prop="modifier"
+                        label="操作人">
+                </el-table-column>
+                <el-table-column
+                        prop="operate"
+                        label="操作">
+                    <template slot-scope="scope">
+                        <el-button  @click="modifyIndeptTag(scope.row)" type="text" size="small">修改</el-button>
+                        <el-button @click="showDelDialog(scope.row.id)" class="delete" type="text" size="small">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+        </div>
+        <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>
+</template>
+
+<script>
+  import api from '@api/icss.js';
+
+  export default {
+    name: 'tag-group',
+    data: function() {
+      return {
+        list: [],
+        tagTypes: [],
+        Adscriptions: [],
+        tagTypesList: [],
+        filter: {
+          tagType: [], //标签类型
+          tagAdscription: '', //标签归属
+          tagSysName: '', //标签系统名称
+        },
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+      }
+    },
+    created() {
+      this.getDropList().then(() => {
+        this.getDataList()
+      })
+
+    },
+    methods: {
+      getValue(val) {
+        console.log('changeVal', val, this.filter.tagAdscription)
+      },
+      getDropList() {
+        return api.getDropList().then((res) =>{
+          console.log('dropList', res)
+          if(res.data.code === '0') {
+            this.Adscriptions = res.data.data[1];
+            this.tagTypes =  res.data.data[3];
+            for (var i = 0; i < this.tagTypes.length; i++) {
+              this.tagTypesList.push(this.tagTypes[i].val)
+            }
+          }
+
+        })
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        console.log('param', param)
+        api.getTagList(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
+              }
+            }
+            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;
+          console.log('tagGroup',res)
+        })
+      },
+      filterDatas() {
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      addIndeptTag() {
+        this.$router.push({path:'LT-YXSJWH-TJDLBQ'})
+      },
+      modifyIndeptTag() {
+      },
+      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
+        };
+        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(id){
+        this.showConfirmDialog('是否删除该标签?',()=>{
+          api.deleteTagGroup({ids:id}).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">
+    .delete{
+        color: red
+    }
+    .delete:hover {
+        color: red;
+    }
+</style>

+ 1 - 1
src/components/icss/LabelGroup.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <crumbs title="标签组维护" style="min-width: 1085px">
+        <crumbs title="标签组维护" style="min-width: 980px">
             <el-form :inline="true" class="demo-form-inline">
                 <el-form-item label="标签类型:">
                     <el-select size="mini" v-model="filter.tagType[0]" placeholder="标签类型" clearable>

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

@@ -162,7 +162,7 @@ export default {
           "questionMappings": detailLis       //映射关系,
         }
       }
-      // this.showDelDialog(param)
+      this.showDelDialog(param)
     },
     showDelDialog(param) {
       this.showConfirmDialog('是否保存该标签组?', () => {

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

@@ -0,0 +1,371 @@
+<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>
+                <el-select
+                        v-model="form.region1"
+                        placeholder="请选择归属"
+                        @change="(e)=>readyChangeSelect(e,1)"
+                >
+                    <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"
+            >
+                <span class="changeTips">改变类型后,标签明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.region2"
+                        placeholder="请选择填写单类型"
+                        @change="(e)=>readyChangeSelect(e,2)"
+                >
+                    <el-option
+                            v-for="item in labelTypes"
+                            :label="item.name"
+                            :value="item.val"
+                            :key="item.id"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    label="标签系统名称:"
+                    prop="region3"
+            >
+                <el-input
+                        v-model="form.region3"
+                        maxLength="30"
+                        placeholder="请输入标签系统名称"
+                        @change="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item
+                    label="标签界面名称:"
+                    prop="region4"
+            >
+                <el-input
+                        v-model="form.region4"
+                        maxLength="30"
+                        placeholder="请输入标签界面名称"
+                        @change="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item
+                    label="选择项之间链接:"
+                    prop="region5"
+            >
+                <el-input
+                        v-model="form.region5"
+                        maxLength="30"
+                        placeholder="请输入选择项之间链接"
+                        @change="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item
+                    label="能否当项目检索:"
+                    prop="region6"
+            >
+                <el-select
+                        v-model="form.region6"
+                        @change="sendData"
+                >
+                    <el-option
+                            label="不可以"
+                            value="1"
+                    ></el-option>
+                    <el-option
+                            label="可以"
+                            value="0"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item
+                    label="性别:"
+                    prop="region7"
+            >
+                <span class="changeTips">改变性别后,标签明细将会恢复到默认状态</span>
+                <el-select
+                        v-model="form.region7"
+                        @change="(e)=>readyChangeSelect(e,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"
+                        ref="valage1"
+                        @input="sendData"
+                ></el-input> ~
+                <el-input
+                        v-model.number="form.region9"
+                        ref="valage2"
+                        @input="sendData"
+                ></el-input>
+            </el-form-item>
+            <el-form-item label="选择子项时是否复制主项标签:" prop="region10" v-if="form.region2 == 6">
+                <el-select v-model="form.region10">
+                    <el-option label="不可以" value="1"></el-option>
+                    <el-option label="可以" value="0"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="是否复制当前模块(是否显示加号):" prop="region11" v-if="form.region2 == 3">
+                <el-select v-model="form.region11">
+                    <el-option label="不可以" value="1"></el-option>
+                    <el-option label="可以" value="0"></el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+  import api from '@api/icss.js';
+  /**
+   * titlePar 顶部显示左(有默认值可不填)
+   * titleSub  顶部显示右(有默认值可不填)
+   * form 当前页面传到父组件的数据(region10,region11暂时不用)
+   * submitForm 基本信息验证必填项
+   * validatePass 基本信息必填项验证成功回调
+   * 父组件根据form.region2改变底部组件操作项
+   * searchTagList 函数的参数根据type变化
+   */
+
+  export default {
+    data() {
+      var validatePass2 = (rule, value, callback) => {
+        this.validateSystomName(value,callback)
+      };
+      return {
+        form: {
+          region1: '',    //归属
+          region2: '',     //填写单类型
+          region3: '',      //系统名称
+          region4: '',      //界面名称
+          region5: '',      //选项之间的链接
+          region6: '1',      //是否可以检索
+          region7: '3',       //性别
+          region8: '0',          //最小年龄
+          region9: '200',         //最大年龄
+          region10: '0',        //是否复制主标签
+          region11: '1',       //是否复制当前模块
+          tagPool:[],          //标签池数据
+          order:[],            //排序方式
+          tipLis:[],           //提示列表
+        },
+        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' }
+          ],
+          region6: [
+            { required: true, message: '请输入能否当项目检索', trigger: 'change' }
+          ],
+          region7: [
+            { required: true, message: '请选择性别', trigger: 'change' }
+          ],
+          region8: [
+            { required: true, message: '请输入最小年龄', trigger: 'change' }
+          ],
+          region9: [
+            { required: true, message: '请输入最大年龄', trigger: 'change' }
+          ],
+          region10: [
+            { required: true, message: '选择子项时是否复制主项标签', trigger: 'change' }
+          ],
+          region11: [
+            { required: true, message: '是否复制当前模块', trigger: 'change' }
+          ],
+        },
+        tmpSex: '通用',
+        tmpOwn: '',
+        tmpType: '',
+        Adscriptions: [],
+        labelTypes: [],
+        labelTypesList: [],
+        tagTypes: [],        //标签池数据
+        type:'',
+        systom:null,      //标签系统名称存在与否
+      }
+    },
+    computed: {
+      newSex() {
+        return this.form.region7;
+      },
+      newType() {
+        return this.form.region1;
+      },
+      newSign() {
+        return this.form.region2;
+      },
+    },
+    mounted() {
+      this.$emit('submitForm', 'groups', false);
+      this.getDropList();
+      this.$emit('changeVal', this.form, false)
+    },
+    watch: {
+      newSex(nextVal, prevVal) {
+        this.tmpSex = prevVal;
+      }
+    },
+    methods: {
+      getDropList() {
+        return api.getDropList().then((res) => {
+          if (res.data.code === '0') {
+            this.Adscriptions = res.data.data[1];
+            this.labelTypes = res.data.data[6];
+            this.form.order = res.data.data[5];
+            this.form.tipLis = res.data.data[6];
+          }
+        })
+      },
+      validateSystomName(name,callback) {
+        if(this.form.region3.trim() == ''){ return }
+        let param = {
+          "existName": this.form.region3,
+          "type": this.form.region1
+        }
+        api.validateSystomName(param).then((res) => {
+          if (res.data.code === '0') {
+            if(res.data.data && res.data.data.length != 0){
+              callback(new Error('该系统名称已存在'));
+            }else{
+              callback();
+            }
+          }
+        })
+      },
+      sendData() {
+        this.$emit('changeVal', this.form, false)
+      },
+      changeType(type){
+        this.$emit('changeVal', this.form, false);
+        this.$emit('changeType', type, false)
+      },
+      changeSex(data) {   //改变性别清空数据
+        this.$emit('changeVal', this.form, false);
+        this.$emit('changeSex', data, false);
+      },
+      readyChangeSelect(tmpData,type) {
+        //console.log(tmpData)
+        this.changeSex(tmpData);
+      },
+      submitForm(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            this.$emit('validatePass', this.form, false)
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
+      warning(msg, type) {
+        this.$message({
+          showClose: true,
+          message: msg,
+          type: type || 'warning'
+        })
+      },
+    }
+  }
+</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;
+    }
+    .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;
+        color: #ea7777;
+        font-size: 12px;
+    }
+    }
+</style>
+

+ 168 - 0
src/components/icss/SingleSelect.vue

@@ -0,0 +1,168 @@
+<template>
+    <div class="single-container">
+        <el-form :model="form">
+            <div class="operation-row">
+                <el-checkbox-group size="small" v-model="form.defaultCheckeds" @change="emitValues">
+                    <el-checkbox-button v-for="(it,i) in rows" v-if="focusOn==i||(focusOn==-1&&i==0)" :label="i">默认选中</el-checkbox-button>
+                </el-checkbox-group>
+                <el-checkbox-group size="small" v-model="form.sameToNones" @change="emitValues">
+                    <el-checkbox-button v-for="(it,i) in rows" v-if="focusOn==i||(focusOn==-1&&i==0)" :label="i">同“无”类型</el-checkbox-button>
+                </el-checkbox-group>
+                <el-checkbox-group size="small" v-model="form.sameToBans" @change="emitValues">
+                    <el-checkbox-button v-for="(it,i) in rows" v-if="focusOn==i||(focusOn==-1&&i==0)" :label="i">同“伴”类型</el-checkbox-button>
+                </el-checkbox-group>
+                <el-button type="danger" size="small" class="del" @click="delRow">删除</el-button>
+            </div>
+            <div class="main-area">
+                <el-input v-for="(it,i) in rows"
+                          v-model="form.options[i]"
+                          v-bind:class="{select:focusOn==i}"
+                          @focus="selectRow(i)"
+                          @blur="emitValues"></el-input>
+                <el-button @click="addRow">+</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: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;
+        .del{
+           margin-left: 150px;
+        }
+    }
+    .main-area{
+        width: 200px;
+        margin:20px 150px;
+        .el-input {
+            width: 200px;
+            display: block;
+            &.select{
+                input{
+                    border-color: @adminBase;
+                }
+            }
+        }
+        .el-button{
+            width: 200px;
+        }
+    }
+</style>
+<script>
+    import utils from '@api/utils';
+    export default {
+      props:['type'],
+      data(){
+        return {
+          form:{
+            options:[],
+            defaultCheckeds:[],
+            sameToNones:[],
+            sameToBans:[]
+          },
+          rows:[{},{},{},{}],
+          focusOn:-1
+        }
+      },
+      /*watch:{
+        defaultChecked:function(next){
+          if(this.focusOn==-1){
+            this.defaultChecked = false;
+            this.$message({
+              message: '请先选择要操作的行',
+              type: 'warning'
+            });
+            return;
+          }
+          this.form.defaultChecked=next?this.focusOn:-1;console.log(this.form)
+          this.emitValues();
+        },
+        sameToNone:function(next){
+          if(this.focusOn==-1){
+            this.sameToNone = false;
+            this.$message({
+              message: '请先选择要操作的行',
+              type: 'warning'
+            });
+            return;
+          }
+          this.form.sameToNone=next?this.focusOn:-1;
+          this.emitValues();
+        },
+        sameToBan:function(next){
+          if(this.focusOn==-1){
+            this.sameToBan = false;
+            this.$message({
+              message: '请先选择要操作的行',
+              type: 'warning'
+            });
+            return;
+          }
+          this.form.sameToBan=next?this.focusOn:-1;
+          this.emitValues();
+        }
+      },*/
+      methods:{
+        setValues(name){
+          if(this.focusOn==-1){
+            this[name] = false;
+            this.$message({
+              message: '请先选择要操作的行',
+              type: 'warning'
+            });
+            return;
+          }
+          this.form[name]=this[name]?this.focusOn:-1;
+          this.emitValues();
+        },
+        addRow(){
+          this.rows.push({});
+        },
+        selectRow(index){
+          this.focusOn = index;
+
+        },
+        emitValues(){
+          //console.log(this.form)
+          const items = utils.simpleOptionData(this.form);
+          //this.$emit('pushValues',items);
+        },
+        delRow(){
+          if(this.focusOn==-1){
+            this.$message({
+              message: '请先选择要删除的行',
+              type: 'warning'
+            });
+            return;
+          }
+          this.$alert('确定要删除该行吗?', '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          }).then(() => {
+            this.form.options.splice(this.focusOn,1);
+            this.rows.splice(this.focusOn,1);
+            this.focusOn = -1;
+            this.emitValues();
+          }).catch(() => {});
+        }
+      }
+    }
+</script>

+ 33 - 9
src/components/icss/SymptomTagGroup.vue

@@ -25,8 +25,8 @@
       </div>
     </div>
     <div class="bottomPartMid fl">
-      <p><span class="el-icon-arrow-left" @click="toLeftList"></span></p>
-      <p><span class="el-icon-arrow-right" @click="toRightList"></span></p>
+        <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>
@@ -37,7 +37,7 @@
                 :style="getStyle2(item)?styles:null"
                 @click='selectRightTag(item)'
             >   
-                <div>
+                <div class="inputBox">
                     <el-input
                         v-if="item.type === 'input'"
                         placeholder=""
@@ -47,8 +47,8 @@
                 </div>
                 <p v-if="item.tagName" class="tagName">{{item.tagName}} </p>
                 <div class="attributeBox">
-                    <p v-if="item.symptomType === 1" class="tagAttribute">跟主症状</p>
-                    <p v-if="item.symptomType === 2" class="tagAttribute">跟伴随症状</p>
+                    <p v-if="item.symptomType === 1" class="tagAttribute" @click.stop>跟主症状 <span @click="closeTagAttribute(item)" class="closeTagAttribute"><i class="el-icon-error"></i></span></p>
+                    <p v-if="item.symptomType === 2" class="tagAttribute" @click.stop>跟伴随症状<span  @click="closeTagAttribute(item)" class="closeTagAttribute"><i class="el-icon-error"></i></span></p>
                 </div>
             </li>
         </ul>
@@ -274,13 +274,21 @@ export default {
                 })
             }
             this.selectRightTagsList = []
+        },
+        closeTagAttribute(tag) {
+            this.rightTagsList2 = this.rightTagsList2.filter((item) =>{
+                    if(item.id === tag.id) {
+                        item.symptomType = 3
+                    }
+                    return item
+                })
         }
 
     }
 }
 </script>
 
-<style lang="less" scoped>
+<style lang="less" >
 @import '../../less/common.less';
 .symptomTagGroupWrapper {
     .bottomPartLeft {
@@ -314,7 +322,7 @@ export default {
     .attributeBox {
         position: absolute;
         right: -100px;
-        top: 5px;
+        top: 2px;
     }
     .tagItem {
         position: relative;
@@ -366,8 +374,24 @@ export default {
     }
     .tagAttribute {
        border: 1px solid @icssBorder;
-       height: 20px;
-       line-height: 20px;
+       height: 17px;
+       line-height: 17px;
+       padding: 3px 5px;
+       border-radius: 10px;
+    }
+    .inputBox {
+        width: 120px;
+        .el-input {
+            .el-input__inner {
+                height: 30px;
+                background: rgb(234, 231, 231);
+            }
+        }
+    }
+    .closeTagAttribute {
+        position: absolute;
+        top: -5px;
+        right: -5px;
     }
     .active {
         color: #aBcdef;

+ 4 - 0
src/routes.js

@@ -34,6 +34,8 @@ import NoiseTemplate from '@components/icss/NoiseTemplate.vue';
 import DeptInfo from '@components/icss/DeptInfo.vue';//科室信息
 import DeptInfoDetail from '@components/icss/DeptInfoDetail.vue';//科室信息-详情
 import AddDeptInfo from '@components/icss/AddDeptInfo.vue';//科室信息-添加
+import IndeptLabel from '@components/icss/IndeptLabel.vue';//独立标签
+import AddIndeptLabel from '@components/icss/AddIndeptLabel.vue'//独立标签-添加
 
 export default [
   {
@@ -137,6 +139,8 @@ export default [
       {path:'LT-YXSJWH-KSWH',component:DeptInfo},     //医学数据维护--科室维护
       {path:'LT-YXSJWH-KSXQ',component:DeptInfoDetail,name:'DeptInfoDetail'},     //科室维护--详情
       {path:'LT-YXSJWH-TJKS',component:AddDeptInfo,name:'AddDeptInfo'},     //科室维护--添加
+      {path:'LT-YXSJWH-DLLXBQWH',component:IndeptLabel,name:'IndeptLabel'},     //独立标签维护--详情
+      {path:'LT-YXSJWH-TJDLBQ',component:AddIndeptLabel,name:'AddIndeptLabel'},     //独立标签维护--添加
     ]
   }
 ]