|
@@ -1,5 +1,10 @@
|
|
|
<template>
|
|
|
<div class="symptomTagGroupWrapper commomSymptom clearfix">
|
|
|
+ <div class="operation-row">
|
|
|
+ <el-checkbox-group size="small">
|
|
|
+ <el-checkbox-button :label="0" @change="handleExclu">互斥项</el-checkbox-button>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
<div class="bottomPartLeft">
|
|
|
<p class="poolTitle">标签池</p>
|
|
|
<div class="pool">
|
|
@@ -39,11 +44,12 @@
|
|
|
@click='selectRightTag(item)'
|
|
|
>
|
|
|
<p class="tagName ellipsis" :title="'[ '+item.tagName+' ]'">{{item.tagName}} </p>
|
|
|
+ <el-tag class="exclu" v-if="item.exclusionType==1" type="info" size="mini">互斥项</el-tag>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <div class="buttonBox">
|
|
|
- <div class="bottomPartMid bottomPartMidss fl" :class="(ascription == 1)?'':'bottomPartMids'">
|
|
|
+ <div class="buttonBox" :class="(qaType==2)?'rightMore':''">
|
|
|
+ <div class="bottomPartMid bottomPartMidss fl 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>
|
|
@@ -52,12 +58,10 @@
|
|
|
</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'],
|
|
|
+ props: ['ascription','sexType','options','type','qaType'],
|
|
|
data() {
|
|
|
return {
|
|
|
leftTagsList: [],
|
|
@@ -95,6 +99,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleExclu(){
|
|
|
+ if(!this.selectRightTagsList||this.selectRightTagsList.length==0){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '请先选择要操作的标签',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ const arr = this.rightTagsList.map((it)=>{
|
|
|
+ if(it.id==this.selectRightTagsList[0].id){
|
|
|
+ it.exclusionType=1;
|
|
|
+ }else{
|
|
|
+ it.exclusionType=0;
|
|
|
+ }
|
|
|
+ return it;
|
|
|
+ });
|
|
|
+ this.rightTagsList=arr;
|
|
|
+ this.$emit('changeActionData',this.rightTagsList);
|
|
|
+ },
|
|
|
transOptions(opt){
|
|
|
return opt&&opt.map((it)=>{
|
|
|
return Object.assign({},it,{id:it.questionId||it.id}); //模板是questionId,组合是id
|
|
@@ -102,10 +126,10 @@ export default {
|
|
|
},
|
|
|
ifReflashTagList(newVal='', preVal=''){
|
|
|
if(newVal.trim() == ''){
|
|
|
- this.rightTagsList=[];console.log(1)
|
|
|
+ this.rightTagsList=[];
|
|
|
this.searchTagList();
|
|
|
}else if(newVal.trim() != preVal.trim()){
|
|
|
- this.rightTagsList=[];console.log(2)
|
|
|
+ this.rightTagsList=[];
|
|
|
this.searchTagList();
|
|
|
}
|
|
|
},
|
|
@@ -225,7 +249,7 @@ export default {
|
|
|
"type": this.ascription,
|
|
|
"notIds": notIds,
|
|
|
"sexType": this.sexType,
|
|
|
- "tagType":maps[this.type]
|
|
|
+ "tagType":+this.qaType===2?maps[this.type]:['1','4'] //qaType=2:组合填写单,qaType=3模板
|
|
|
};
|
|
|
api.questionSearch(param).then((res) => {
|
|
|
if (res.data.code === '0') {
|
|
@@ -242,6 +266,17 @@ export default {
|
|
|
|
|
|
<style lang="less" >
|
|
|
@import '../../less/common.less';
|
|
|
+.operation-row{
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+.exclu{
|
|
|
+ position: absolute;
|
|
|
+ right: -54px;
|
|
|
+ top: 5px;
|
|
|
+}
|
|
|
+.rightMore{
|
|
|
+ margin-left: 48px;
|
|
|
+}
|
|
|
.commomSymptom {
|
|
|
.tagList.operationPools {
|
|
|
width: 100%;
|