Commit 8be637f0 by liuchenxi

update: 卡券标签回显

parent 33f759b1
......@@ -448,6 +448,7 @@ export default {
immediate: true,
handler(newval) {
this.middleSelection = newval;
this.getCardList();
}
}
},
......@@ -456,7 +457,7 @@ export default {
this.repProjectName = this.projectName || 'gic-web';
this.cardLimitType = this.cardLimit;
this.cardTypes = this.cardType;
this.getCardList();
// this.getCardList();
this.setNewData(this.showCardDialog);
},
filters: {
......
......@@ -1065,7 +1065,7 @@ export default {
startTime: '',
endTime: ''
},
cardRadioType: 1
cardRadioType: 1,
};
},
watch: {
......@@ -1322,11 +1322,11 @@ export default {
});
}
if (data.templateCode == 'com024') { // 修改组件内参数
this.$nextTick(_ => {
this.$refs.gicCard[0].sdate = this.cardParams.startTime
this.$refs.gicCard[0].edate = this.cardParams.endTime
this.$refs.gicCard[0].getCardList()
})
// this.$nextTick(_ => {
// this.$refs.gicCard[0].sdate = this.cardParams.startTime
// this.$refs.gicCard[0].edate = this.cardParams.endTime
// this.$refs.gicCard[0].getCardList()
// })
}
/**
......@@ -1538,11 +1538,10 @@ export default {
// 回显数据
let tagValue = JSON.parse(this.templateDataList.tagValue);
let tagParams = JSON.parse(this.templateDataList.tagParams);
console.log(tagParams, tagValue)
let value = null;
let selectVal = null;
let checkedCount = null;
console.log(this.templateData, 'asdsadsad');
console.log(this.templateDataList, 'asdsadsad');
// compute 是计算属性的区间值 value是选中的值
for(let i = 0; i < this.templateDataList.templateCode.length; i++) {
......@@ -1576,7 +1575,6 @@ export default {
// 组合 属于和多选框
case 'tag001':
console.log(this.templateData, 'asdsadsad');
value = tagValue.val[0].data.value.split(' ');
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode === 'tag001') {
......@@ -1589,7 +1587,6 @@ export default {
break;
case 'tag013':
console.log(this.templateData);
value = tagValue.val[0].data.value.split(' ');
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode === 'tag013') {
......@@ -1849,14 +1846,17 @@ export default {
case 'com024':
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode === 'com023' || this.templateData[i].templateCode === 'com024') {
value = tagValue.val[0].data.value.split(' ');
selectVal = tagParams.selectedVal.split(' ');
selectVal.forEach((el, ix) => {
this.tagList.push({
cardName: el,
coupCardId: value[ix]
this.cardRadioType = tagValue.val[0].data.compute == 'in' ? 1 : 0;
if(this.cardRadioType) { // 全部商品不回显tag列表
value = tagValue.val[0].data.value.split(' ');
selectVal = tagParams.selectedVal.split(' ');
selectVal.forEach((el, ix) => {
this.tagList.push({
cardName: el,
coupCardId: value[ix]
});
});
});
}
}
this.templateData[i].templateCode === 'com024' && (this.expiration = tagValue.time[0].value)
}
......
......@@ -68,7 +68,7 @@ export default {
},
watch: {
selectedTagsData(newval) {
console.log(newval);
console.log(1111, newval);
}
},
methods: {
......
......@@ -21,8 +21,8 @@
<draggable v-model="tagsData" group="article" style="height: 100%" @end="dragTag" :move="checkMove" :sort="false" :data-index="tagsGroupIndex">
<div class="tags-group__tag" v-for="(item, index) in tagsData" :key="item.tagId">
<el-tooltip>
<span>{{ item.tagName }} 【选择:{{ item.newTagVal }}</span>
<div style="max-width: 400px;font-size: 14px" slot="content">{{ item.tagName }} 【选择:{{ item.newTagVal }}</div>
<span>{{ item.tagName }} 【选择:{{ getComputeType ? item.newTagVal : '全部卡券' }}</span>
<div style="max-width: 400px;font-size: 14px" slot="content">{{ item.tagName }} 【选择:{{ getComputeType ? item.newTagVal : '全部卡券' }}</div>
</el-tooltip>
<i class="iconfont icon-bianji1 edit" @click="editTags(index)"></i>
<i class="iconfont icon-guanbi" @click="delTags(index)"></i>
......@@ -150,6 +150,12 @@ export default {
this.changed = !relatedList.some(item => item.tagId === draggedElement.tagId);
return this.changed;
}
},
computed: {
getComputeType() {
console.log(JSON.parse(this.tagsData[0].tagValue).val[0].data.compute == 'in');
return JSON.parse(this.tagsData[0].tagValue).val[0].data.compute == 'in';
}
}
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment