|
@@ -29,12 +29,12 @@
|
|
|
<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="symptomPushBottomPartRight ">
|
|
|
+ <div class="symptomPushBottomPartRight clearfix">
|
|
|
<p class="symptomPushPoolTitle">操作界面:</p>
|
|
|
<ul v-for="(item, index) in rightTagsList"
|
|
|
:key="index"
|
|
|
class="symptomPushTagList symptomPushOperationPool"
|
|
|
- :class="index === 1&&item.id ? 'symptomPushOperationPoolPush':'' "
|
|
|
+ :class="{symptomPushOperationPoolPush:index === 1, hasSymptomPush: index === 1&&item.id} "
|
|
|
:style="currentSelectIndex === index?styles:null"
|
|
|
@click="SelectList(index)"
|
|
|
>
|
|
@@ -45,10 +45,19 @@
|
|
|
<li
|
|
|
v-for="(it) in item.questionDetailList"
|
|
|
:key = "it.id"
|
|
|
- class = "symptomPushTagItem">
|
|
|
+ class = "symptomPushTagItem ellipsis">
|
|
|
{{it.name}}
|
|
|
</li>
|
|
|
</ul>
|
|
|
+ <div class="symptomPushTagListPartBox fl">
|
|
|
+ <ul v-for="(item, index) in rightTagsList"
|
|
|
+ :key="index+'part'"
|
|
|
+ class="symptomPushTagListPart fl"
|
|
|
+ >
|
|
|
+ <p v-if="item.controlType" class="symptomPushTagListPartItem">{{getControlType(item.controlType)}} </p>
|
|
|
+ <p v-if="item.tagName" class="symptomPushTagListPartItem">{{item.tagName}} </p>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -63,6 +72,10 @@ export default {
|
|
|
default: () => [],
|
|
|
type: Array
|
|
|
},
|
|
|
+ tipLis: {
|
|
|
+ default: () => [],
|
|
|
+ type: Array
|
|
|
+ },
|
|
|
type: {
|
|
|
default: '',
|
|
|
type: String
|
|
@@ -79,9 +92,10 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
leftTagsList: [],
|
|
|
- selectLeftTagId: {},
|
|
|
+ selectLeftTagId: {}, //标签池中选中标签
|
|
|
rightTagsList: [{}, {}],
|
|
|
- currentSelectIndex: -1,
|
|
|
+ currentSelectIndex: -1, //选中操作界面索引
|
|
|
+ currentTipLis:[], //右侧选中的标签提示
|
|
|
searchVal: '',
|
|
|
styles:{
|
|
|
background:'#eae7e7'
|
|
@@ -89,16 +103,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- if(this.options.length) {
|
|
|
- if(this.options.length === 2) { //当两个模块都有值时
|
|
|
- this.rightTagsList = this.options
|
|
|
- this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
-
|
|
|
- } else if(this.options.length === 1) {
|
|
|
- this.options[0].controlType == 99 ? this.rightTagsList.splice(1, 1, this.options[0]) :this.rightTagsList.splice(0, 1, this.options[0])
|
|
|
+ this.currentTipLis = this.tipLis
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ if(this.options.length) {
|
|
|
+ if(this.options.length === 2) { //当两个模块都有值时
|
|
|
+ this.rightTagsList = this.options
|
|
|
+ this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+
|
|
|
+ } else if(this.options.length === 1) {
|
|
|
+ this.options[0].controlType == 99 ? this.rightTagsList.splice(1, 1, this.options[0]) :this.rightTagsList.splice(0, 1, this.options[0])
|
|
|
+ }
|
|
|
+ this.searchTagList()
|
|
|
}
|
|
|
- this.searchTagList()
|
|
|
- }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
watch: {
|
|
|
pool(newVal, preVal) {
|
|
@@ -106,6 +125,12 @@ export default {
|
|
|
this.leftTagsList = newVal
|
|
|
}
|
|
|
},
|
|
|
+ tipLis(newVal, preVal) {
|
|
|
+ console.log(newVal,preVal)
|
|
|
+ if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
|
+ this.currentTipLis = newVal
|
|
|
+ }
|
|
|
+ },
|
|
|
searchVal(newVal, preVal){
|
|
|
if(newVal.trim() == ''){
|
|
|
this.searchTagList()
|
|
@@ -113,11 +138,6 @@ export default {
|
|
|
this.searchTagList()
|
|
|
}
|
|
|
},
|
|
|
- sexType(newVal, preVal) {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
selectLeftTag(tag, index, e) {
|
|
@@ -262,6 +282,14 @@ export default {
|
|
|
SelectList(index) {
|
|
|
|
|
|
this.currentSelectIndex = this.currentSelectIndex === index ? -1 : index;
|
|
|
+ },
|
|
|
+ getControlType(controlType) {
|
|
|
+ for (let i = 0; i < this.currentTipLis.length; i++) {
|
|
|
+ if(this.currentTipLis[i].val == controlType) {
|
|
|
+ return this.currentTipLis[i].name
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -301,6 +329,9 @@ export default {
|
|
|
.symptomPushOperationPoolPush {
|
|
|
border: 1px dashed @icssBorder;
|
|
|
}
|
|
|
+ .hasSymptomPush {
|
|
|
+ background: #abcdef;
|
|
|
+ }
|
|
|
.symptomPushTagItem {
|
|
|
position: relative;
|
|
|
line-height: 30px;
|
|
@@ -359,6 +390,21 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .symptomPushTagListPartBox {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .symptomPushTagListPart {
|
|
|
+ width: 30%;
|
|
|
+ padding: 5px;
|
|
|
+ }
|
|
|
+ .symptomPushTagListPartItem {
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #c0c4cc;
|
|
|
+ padding: 2px 3px;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin: 0 3px 3px 0;
|
|
|
+ }
|
|
|
.symptomPushTagItemPushBox {
|
|
|
text-align: center
|
|
|
}
|