Commit 46d47610 by member

缺失条件

parent 30e28dc3
......@@ -434,12 +434,21 @@
</div>
<div class="m-t-20">
<label class="inline-block w-98"></label>
<el-radio v-model="parent.timeChecked" label="1" @change="currentDayChange($event, parent)">{{ parent.timeRadio == 1 ? '天' : parent.timeRadio == 2 ? '月' : '年' }}</el-radio>
<el-checkbox v-model="parent.timeChecked" @change="currentDayChange($event, parent)">
{{ parent.timeRadio == 1 ? '天' : parent.timeRadio == 2 ? '月' : '年' }}
</el-checkbox>
<!-- <el-radio v-model="parent.timeChecked" @change="currentDayChange($event, parent)"> </el-radio> -->
<!-- <el-checkbox v-model="parent.timeChecked"><label class="inline-block middle">{{parent.timeRadio==1?'天':parent.timeRadio==2?'月':'年'}}</label></el-checkbox> -->
</div>
<div class="m-t-20">
<label class="inline-block w-98"></label>
<el-radio v-model="parent.timeChecked" label="2">{{ '' }}</el-radio>
<el-checkbox v-model="parent.timeAfterChecked">
</el-checkbox>
<!-- <el-radio v-model="parent.timeAfterChecked">{{ '' }}</el-radio> -->
<!-- <el-checkbox v-model="parent.timeCheckedTwo"> </el-checkbox> -->
<el-select v-model="parent.timeSelect" placeholder="请选择" class="w-86 m-l-8">
<el-option label="最近" value="1"></el-option>
......@@ -450,7 +459,6 @@
placeholder="请输入"
class="w-90"
@blur="value => toEditDateInput(value, parent.timeRadio, parent)"
:disabled="parent.timeChecked == 1 ? true : false"
></el-input>
<template v-if="parent.timeRadio == 1">
<label class="inline-block middle label-unit m-l-8"></label>
......@@ -585,6 +593,7 @@ export default {
data() {
return {
timeAfterChecked: '',
tagList: [],
// 卡券
disabledList: [],
......@@ -613,9 +622,8 @@ export default {
options: [
// {
// value: 1,
// key: '男'
// },
// {
// value: 2,
// key: '女'
// }
......@@ -859,7 +867,7 @@ export default {
},
handleCheckedCitiesChange(value) {
this.templateData.forEach(item => {
if (item.templateCode == 'tag001') {
if (item.templateCode == 'tag001' || item.templateCode == 'tag013') {
let checkedCount = value.length;
item.checkAll = checkedCount === item.options.length;
item.isIndeterminate = checkedCount > 0 && checkedCount < item.options.length;
......@@ -906,8 +914,8 @@ export default {
columnKey: data.columnKey,
template: data.template
};
console.log(data);
// syo 关键点 修改实时以及key
this.tagData.tagType = data.tagType;
this.tagData.tagName = data.tagName;
this.currentKey = data.columnKey;
this.tagData.isActive = data.isActive;
......@@ -1021,12 +1029,11 @@ export default {
this.templateCode = this.templateData.map(el => el.templateCode);
if (this.templateDataList.editCondition) {
this.replaceTemplateValue();
} else {
// 如果不是编辑状态
this.resetOptions();
}
}, 20);
}, 200);
// 获取已存数据
this.getExistData(this.tagData.tagId);
......@@ -1078,8 +1085,8 @@ export default {
.then(res => {
let resData = res;
if (this.tagData.tagType != 1 && this.currentKey != 'tag') {
if (resData.errorCode == 0) {
data.options = resData.result;
if (resData.data.errorCode == 0) {
data.options = resData.data.result;
this.templateData.push(data);
this.getExistData(this.tagData.tagId, data.options);
return;
......@@ -1091,6 +1098,7 @@ export default {
this.getExistData(this.tagData.tagId, data.options);
}
}
console.log(this.templateData);
})
.catch(error => {
console.log(error);
......@@ -1107,6 +1115,7 @@ export default {
};
findOndJson(param)
.then(res => {
console.log(res);
if (res.errorCode == 1) {
if (!res.result || res.tagParams == '[]') {
this.addTempFlag = false;
......@@ -1118,6 +1127,7 @@ export default {
if (!!newOptions) {
items.forEach(function(ele, index) {
if (ele.templateCode == 'tag013') {
console.log(11);
ele.options = newOptions;
let idOptions = newOptions.map(el => el.key);
let checkFlag = true;
......@@ -1185,6 +1195,7 @@ export default {
let value = null;
let radio = null;
let selectVal = null;
let checkedCount = null;
console.log(this.templateDataList);
console.log(this.templateDataList.templateCode);
console.log(this.templateData);
......@@ -1230,6 +1241,21 @@ export default {
this.templateData[i].checkeditems = value;
}
}
checkedCount = this.templateData[i].checkeditems.length;
this.templateData[i].checkAll = checkedCount == this.templateData[i].options.length;
this.templateData[i].isIndeterminate = checkedCount > 0 && checkedCount < this.templateData[i].options.length;
break;
case 'tag013':
value = tagValue.val[0].data.value.split(' ');
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode === 'tag013') {
this.templateData[i].checkeditems = value;
}
}
checkedCount = this.templateData[i].checkeditems.length;
this.templateData[i].checkAll = checkedCount == this.templateData[i].options.length;
this.templateData[i].isIndeterminate = checkedCount > 0 && checkedCount < this.templateData[i].options.length;
break;
// 属于不属于 从newTagVal里面比较
case 'tag002':
......
......@@ -218,9 +218,10 @@ export default {
radio: '1',
dateRangeValue: [],
// 相对时间
timeRadio: '1', // 年月日
timeRadio: false, // 年月日
timeChecked: '1', //当 年月日 / 最近
// timeCheckedTwo: false,
timeAfterChecked: false, // 最后 最近
timeSelect: '1', // 最近
timeInput: ''
},
......@@ -231,9 +232,10 @@ export default {
dateRangeValue: [],
// 相对时间
timeRadio: '1', // 年月日
timeRadio: false, // 年月日
timeChecked: '1', //当 年月日 / 最近/之后
// timeCheckedTwo: false,
timeAfterChecked: false,
timeSelect: '1', // 最近/之后
timeInput: ''
}
......@@ -424,6 +426,7 @@ export default {
if (code === 'tag013' && that.templateData.length === 1) {
tagValue.val[0].data.compute = that.templateData[0].postCompute;
// tagValue.val[0].data.value = that.templateData[0].checkeditems.join(' ')
console.log();
that.templateData[0].options.forEach(function(ele, index) {
if (that.templateData[0].checkeditems.indexOf(ele.key) != -1) {
that.postTemplateData.selectedVal.push(ele.value);
......@@ -450,6 +453,14 @@ export default {
tagValue.val[0].data.value = that.templateData[0].dateRangeValue.join(',');
that.postTemplateData.selectedVal.push(`${that.templateData[0].dateRangeValue[0]}${that.templateData[0].dateRangeValue[1]}`);
}
if (code === 'tag019') {
for (let val of this.templateData) {
if (val.templateCode === 'tag019') {
}
}
}
/* 固定/相对 年月日+最近+之后 年月日+最近 年月日时分秒-年月日时分秒 */
if ((code === 'tag014' || code === 'tag017' || code === 'tag019') && that.templateData[0].radio == 1 && !that.templateData[0].dateRangeValue.length) {
that.$message.error({ message: '请选择值' });
......@@ -585,6 +596,14 @@ export default {
}
}
}
// if (code === 'tag019') {
// console.log(this.templateData);
// for (let val of this.templateData) {
// }
// }
/* 时间属性- 月日-月日+最近+之后 */
if (code === 'tag015' && that.templateData[0].radio == 1 && !that.templateData[0].monthDayRange.length) {
that.$message.error({ message: '请选择值' });
......@@ -1490,6 +1509,7 @@ export default {
}
// 如果通过 url 获取
if (parseInt(resData.result.sourceFlag) === 1) {
console.log(11);
resData.result.widgetParam = JSON.parse(resData.result.widgetParam);
that.getAsyncList(resData.result.widgetParam[0].value, that[resData.result.templateCode]);
if (resData.result.templateCode === 'tag009' || resData.result.templateCode === 'tag010') {
......@@ -1547,9 +1567,11 @@ export default {
that.axios
.post(that.baseUrl + url, qs.stringify(para))
.then(res => {
console.log(res, 'sy');
let resData = res.data;
if (that.tagData.tagType != 1 && that.currentKey != 'tag') {
if (resData.errorCode == 0) {
data.options = resData.result;
that.templateData.push(data);
that.getExistData(that.tagData.tagId).then(items => {
......
......@@ -227,10 +227,10 @@ export default {
name: '会员标签',
path: ''
},
{
name: '手工标签列表',
path: '/manualTagList'
},
// {
// name: '手工标签列表',
// path: '/manualTagList'
// },
{
name: that.$route.query.tagId ? '手工标签编辑' : '新增手工标签',
path: ''
......
......@@ -17,7 +17,7 @@
@checkTagsGroup="checkTagsGroup"
@dragTag="dragTag"
/>
<el-button class="m-t-10 w-348 el-icon-plus color-blue add-group-btn" v-show="selectedTagsData.length < 3" @click="addTagsGroup">
<el-button class="m-t-10 w-384 el-icon-plus color-blue add-group-btn" v-show="selectedTagsData.length < 3" @click="addTagsGroup">
&nbsp;&nbsp;添加
</el-button>
</div>
......
<template>
<div class="w-348 border-box">
<div class="w-384 border-box">
<div :class="['tags-group', { 'tags-group--active': active }]" @click="checkTagsGroup">
<!--右上角的下拉菜单-->
<el-dropdown class="tags-group__dropdown" placement="bottom-end">
......
......@@ -455,8 +455,8 @@ input:focus {
.w-309 {
width: 309px;
}
.w-348 {
width: 348px;
.w-384 {
width: 384px;
}
.w-329 {
width: 329px;
......
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