|
@@ -31,21 +31,13 @@
|
|
|
</div>
|
|
|
<div class="bottomPartRight ">
|
|
|
<p class="poolTitle">操作界面:</p>
|
|
|
- <ul class="tagList operationPool" :class="(type == 1 && isSymp == 0)?'':'operationPools'">
|
|
|
+ <ul class="tagList operationPool operationPools">
|
|
|
<li class = "tagItem"
|
|
|
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 class="tagName ellipsis" :title="'[ '+item.tagName+' ]'">{{item.tagName}} </p>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -65,28 +57,7 @@ import { constants } from 'fs';
|
|
|
|
|
|
export default {
|
|
|
name: "QuestionTagGroup",
|
|
|
- props: {
|
|
|
- pool: {
|
|
|
- default: () => [],
|
|
|
- type: Array
|
|
|
- },
|
|
|
- type: {
|
|
|
- default: '',
|
|
|
- type: String
|
|
|
- },
|
|
|
- isSymp: {
|
|
|
- default: '',
|
|
|
- type: String
|
|
|
- },
|
|
|
- sexType: {
|
|
|
- default: '',
|
|
|
- type: String
|
|
|
- },
|
|
|
- options: {
|
|
|
- default: () => [],
|
|
|
- type: Array
|
|
|
- }
|
|
|
- },
|
|
|
+ props: ['ascription','type','sexType','options'],
|
|
|
data() {
|
|
|
return {
|
|
|
leftTagsList: [],
|
|
@@ -101,44 +72,25 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.$nextTick(()=>{
|
|
|
let tagList = this.options;
|
|
|
- if(tagList.length > 0){
|
|
|
- /*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+',,,', symptomType: this.rightTagsList2[i].symptomType})
|
|
|
- } 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 = tagList;
|
|
|
- this.$emit('changeActionData',this.rightTagsList2, false);
|
|
|
+ if(tagList&&tagList.length > 0){
|
|
|
+ this.rightTagsList2 = tagList;console.log(this.options,this.rightTagsList2)
|
|
|
+ this.$emit('changeActionData',this.rightTagsList2);
|
|
|
this.searchTagList();
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
- // this.leftTagsList = this.pool
|
|
|
- // console.log('TAGPOOL', this.pool)
|
|
|
},
|
|
|
watch: {
|
|
|
- pool(newVal, preVal) {
|
|
|
- this.leftTagsList = newVal
|
|
|
- },
|
|
|
+ /*rightTagsList2(newVal, preVal) {
|
|
|
+ //this.pushValues(newVal);
|
|
|
+ this.$emit('pushValues', newVal);
|
|
|
+ },*/
|
|
|
searchVal(newVal, preVal){
|
|
|
if(newVal.trim() == ''){
|
|
|
this.searchTagList()
|
|
|
}else if(newVal.trim() != preVal.trim()){
|
|
|
this.searchTagList()
|
|
|
}
|
|
|
- },
|
|
|
+ },/*
|
|
|
sexType(newVal, preVal) {
|
|
|
if (newVal != preVal) {
|
|
|
if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
@@ -151,13 +103,11 @@ export default {
|
|
|
// this.searchTagList();
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
+ },*/
|
|
|
},
|
|
|
methods: {
|
|
|
selectLeftTag(tag, index, e) {
|
|
|
- const hasTag = this.isHasTag(tag, this.selectLeftTagsList)
|
|
|
+ const hasTag = this.isHasTag(tag, this.selectLeftTagsList);
|
|
|
if (hasTag) {
|
|
|
this.selectLeftTagsList = this.selectLeftTagsList.filter(item => item.id !== tag.id)
|
|
|
} else {
|
|
@@ -278,10 +228,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
let param = {
|
|
|
"tagName": this.searchVal,
|
|
|
- "type": this.type || '',
|
|
|
+ "type": '',
|
|
|
"notIds": notIds,
|
|
|
"sexType": this.sexType,
|
|
|
};
|