|
@@ -1222,33 +1222,53 @@
|
|
:wrapper-col="wrapperCol"
|
|
:wrapper-col="wrapperCol"
|
|
label=""
|
|
label=""
|
|
>
|
|
>
|
|
- <template v-if="item.name === defaultSolganTitle">
|
|
|
|
- <a-input
|
|
|
|
- v-decorator="[
|
|
|
|
- item.name,
|
|
|
|
- {
|
|
|
|
- rules: [
|
|
|
|
- {
|
|
|
|
- required: true, message: '请输入'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- validator: compareToFirstPassword
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- initialValue: item.slogan
|
|
|
|
- }
|
|
|
|
- ]"
|
|
|
|
- class="examin-form-input"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- />
|
|
|
|
- <span class="examin-form-num">{{ handleFilterSlogan(item.name) }}/30</span>
|
|
|
|
- <a-icon class="examin-form-icon" type="check" @click="handleSolganCheck(item)"/>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- <span class="default-value-class">{{ item.slogan }}</span>
|
|
|
|
- <a-icon class="examin-form-icon" type="edit" @click="handleSolganEdit(item)"/>
|
|
|
|
- </template>
|
|
|
|
- <a-icon class="examin-form-icon icon-delete" type="delete" @click="handleDelSolgan(item)"/>
|
|
|
|
|
|
+ <div style="width: 500px;">
|
|
|
|
+ <template v-if="item.name === defaultSolganTitle">
|
|
|
|
+ <a-input
|
|
|
|
+ v-decorator="[
|
|
|
|
+ item.name,
|
|
|
|
+ {
|
|
|
|
+ rules: [{validator: validatePass, trigger: 'blur'}],
|
|
|
|
+ initialValue: item.value
|
|
|
|
+ }
|
|
|
|
+ ]"
|
|
|
|
+ class="examin-form-input"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ @change="handleSloganSearchChange($event, item.name, item.id)"
|
|
|
|
+ />
|
|
|
|
+ <span class="examin-form-num">{{ item.lenSize }}/30</span>
|
|
|
|
+ <a-icon class="examin-form-icon" type="check" @click="handleSolganCheck(item)"/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <span class="default-value-class">{{ item.slogan }}</span>
|
|
|
|
+ <a-icon class="examin-form-icon" type="edit" @click="handleSolganEdit(item)"/>
|
|
|
|
+ </template>
|
|
|
|
+ <a-icon class="examin-form-icon icon-delete" type="delete" @click="handleDelSolgan(item)"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.name === defaultSolganTitle" class="ad-name-tags-class solgan-tags-change">
|
|
|
|
+ <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
|
|
|
|
+ <a-tag
|
|
|
|
+ v-for="val in item.updateTagsList"
|
|
|
|
+ :key="val.id"
|
|
|
|
+ color="#1890ff"
|
|
|
|
+ @click="handleSloganAddTags(val.name, item.name, item.id)"
|
|
|
|
+ >
|
|
|
|
+ + {{ val.name }}
|
|
|
|
+ </a-tag>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.tabStatus === 'all'" class="name-tags-left">
|
|
|
|
+ <a-tag
|
|
|
|
+ v-for="val in item.defaultTagsList"
|
|
|
|
+ :key="val.id"
|
|
|
|
+ color="#1890ff"
|
|
|
|
+ @click="handleSloganAddTags(val.name, item.name, item.id)"
|
|
|
|
+ >
|
|
|
|
+ + {{ val.name }}
|
|
|
|
+ </a-tag>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.tabStatus === 'alone'" class="solgan-icon-type"><a @click="handleExaminMoreList(item.id, 'more')">更多</a></div>
|
|
|
|
+ <div v-if="item.tabStatus === 'all'" class="solgan-icon-type"><a @click="handleExaminMoreList(item.id, 'little')">收起</a></div>
|
|
|
|
+ </div>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-form>
|
|
</a-form>
|
|
<span v-else class="solgan-title-header">暂无</span>
|
|
<span v-else class="solgan-title-header">暂无</span>
|
|
@@ -2003,6 +2023,22 @@ export default {
|
|
this.searchQuery();
|
|
this.searchQuery();
|
|
this.checkArr = [];
|
|
this.checkArr = [];
|
|
},
|
|
},
|
|
|
|
+ handleExaminMoreList(val, type) {
|
|
|
|
+ if (type === 'more') {
|
|
|
|
+ this.slogansDetail.forEach(item => {
|
|
|
|
+ if (item.id === val) {
|
|
|
|
+ item.tabStatus = 'all';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else if (type === 'little') {
|
|
|
|
+ this.slogansDetail.forEach(item => {
|
|
|
|
+ if (item.id === val) {
|
|
|
|
+ item.tabStatus = 'alone';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
handleMoreTagsShow(val, type) {
|
|
handleMoreTagsShow(val, type) {
|
|
if (type === 'more') {
|
|
if (type === 'more') {
|
|
this.defaultFormList.forEach(item => {
|
|
this.defaultFormList.forEach(item => {
|
|
@@ -2034,28 +2070,26 @@ export default {
|
|
validatePass(rule, value, callback) {
|
|
validatePass(rule, value, callback) {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
let finallyLenList = this.handleJudgeExec(value);
|
|
let finallyLenList = this.handleJudgeExec(value);
|
|
- console.log(finallyLenList, 'finallyLenList---finallyLenList--finallyLenList');
|
|
|
|
let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
|
|
let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
|
|
- console.log(updateFinallyResult, '000000000000');
|
|
|
|
let resultSelectSize = 0;
|
|
let resultSelectSize = 0;
|
|
- if (finallyLenList.length) {
|
|
|
|
- const inputDefaultLen = value.length;
|
|
|
|
- let tagsLen = finallyLenList.length * 4;
|
|
|
|
|
|
+ if (updateFinallyResult.length) {
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(value);
|
|
|
|
+ let tagsLen = updateFinallyResult.length * 2;
|
|
let tagsSureLen = 0;
|
|
let tagsSureLen = 0;
|
|
this.adNameTags.forEach(item => {
|
|
this.adNameTags.forEach(item => {
|
|
- finallyLenList.forEach(val => {
|
|
|
|
|
|
+ updateFinallyResult.forEach(val => {
|
|
if (item.name === val) {
|
|
if (item.name === val) {
|
|
tagsSureLen += item.maxWordLen;
|
|
tagsSureLen += item.maxWordLen;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- finallyLenList.forEach(item => {
|
|
|
|
|
|
+ updateFinallyResult.forEach(item => {
|
|
tagsLen += item.length;
|
|
tagsLen += item.length;
|
|
});
|
|
});
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- resultSelectSize = value.length;
|
|
|
|
|
|
+ resultSelectSize = this.handleExportRules(value);
|
|
}
|
|
}
|
|
if (resultSelectSize === 0) {
|
|
if (resultSelectSize === 0) {
|
|
callback(new Error('请输入'));
|
|
callback(new Error('请输入'));
|
|
@@ -2072,7 +2106,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleJudgeExec(item) {
|
|
handleJudgeExec(item) {
|
|
- let re = /\{\{(.+?)\}\}/g;
|
|
|
|
|
|
+ let re = /\{(.+?)\}/g;
|
|
let array = [];
|
|
let array = [];
|
|
let temp;
|
|
let temp;
|
|
while ((temp = re.exec(item))) {
|
|
while ((temp = re.exec(item))) {
|
|
@@ -2080,6 +2114,59 @@ export default {
|
|
};
|
|
};
|
|
return array;
|
|
return array;
|
|
},
|
|
},
|
|
|
|
+ handleSloganAddTags(item, field, formId) {
|
|
|
|
+ let node = document.getElementById(field);
|
|
|
|
+ let startPos = node.selectionStart; // input 第0个字符到选中的字符
|
|
|
|
+ let endPos = node.selectionEnd; // 选中的字符到最后的字符
|
|
|
|
+ let txt = node.value;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ let finallyLenList = this.handleJudgeExec(txt);
|
|
|
|
+ let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
|
|
|
|
+ if (updateFinallyResult.length >= 2) {
|
|
|
|
+ this.$message.error('最多选择两个词包');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (startPos === 0 || endPos === 0) {
|
|
|
|
+ txt += '{' + item + '}';
|
|
|
|
+ this.solganForm.setFieldsValue({[field]: txt});
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.solganForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{' + item + '}' + txt.substring(endPos)});
|
|
|
|
+ node.selectionStart = startPos + item.length + 6;
|
|
|
|
+ node.selectionEnd = startPos + item.length + 6;
|
|
|
|
+ }
|
|
|
|
+ node.focus();
|
|
|
|
+ node.blur();
|
|
|
|
+ });
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ const dynamicWordPackIds = [];
|
|
|
|
+ let changeData = this.handleJudgeExec(this.solganForm.getFieldsValue()[field]);
|
|
|
|
+ let updateChangeData = this.adNameTags.filter(item => changeData.includes(item.name)).map(val => val.name);
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(this.solganForm.getFieldsValue()[field]);
|
|
|
|
+ let tagsLen = updateChangeData.length * 2;
|
|
|
|
+ let tagsSureLen = 0;
|
|
|
|
+ let resultSelectSize = 0;
|
|
|
|
+ this.adNameTags.forEach(item => {
|
|
|
|
+ updateChangeData.forEach(val => {
|
|
|
|
+ if (item.name === val) {
|
|
|
|
+ tagsSureLen += item.maxWordLen;
|
|
|
|
+ dynamicWordPackIds.push(item.creativeWordId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ updateChangeData.forEach(item => {
|
|
|
|
+ tagsLen += item.length;
|
|
|
|
+ });
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
|
|
|
|
+ this.slogansDetail.forEach(item => {
|
|
|
|
+ if (item.id === formId) {
|
|
|
|
+ item.lenSize = resultSelectSize;
|
|
|
|
+ item.value = this.solganForm.getFieldsValue()[field];
|
|
|
|
+ item.wordPackId = dynamicWordPackIds;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 点击获取光标位置进行字段插入
|
|
// 点击获取光标位置进行字段插入
|
|
handleGetChangeAll(item, field, formId) {
|
|
handleGetChangeAll(item, field, formId) {
|
|
let node = document.getElementById(field);
|
|
let node = document.getElementById(field);
|
|
@@ -2094,11 +2181,11 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (startPos === 0 || endPos === 0) {
|
|
if (startPos === 0 || endPos === 0) {
|
|
- txt += '{{' + item + '}}';
|
|
|
|
|
|
+ txt += '{' + item + '}';
|
|
this.examinForm.setFieldsValue({[field]: txt});
|
|
this.examinForm.setFieldsValue({[field]: txt});
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- this.examinForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{{' + item + '}}' + txt.substring(endPos)});
|
|
|
|
|
|
+ this.examinForm.setFieldsValue({[field]: txt.substring(0, startPos) + '{' + item + '}' + txt.substring(endPos)});
|
|
node.selectionStart = startPos + item.length + 6;
|
|
node.selectionStart = startPos + item.length + 6;
|
|
node.selectionEnd = startPos + item.length + 6;
|
|
node.selectionEnd = startPos + item.length + 6;
|
|
}
|
|
}
|
|
@@ -2109,8 +2196,8 @@ export default {
|
|
const dynamicWordPackIds = [];
|
|
const dynamicWordPackIds = [];
|
|
let changeData = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
|
|
let changeData = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
|
|
let updateChangeData = this.adNameTags.filter(item => changeData.includes(item.name)).map(val => val.name);
|
|
let updateChangeData = this.adNameTags.filter(item => changeData.includes(item.name)).map(val => val.name);
|
|
- const inputDefaultLen = this.examinForm.getFieldsValue()[field].length;
|
|
|
|
- let tagsLen = updateChangeData.length * 4;
|
|
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(this.examinForm.getFieldsValue()[field]);
|
|
|
|
+ let tagsLen = updateChangeData.length * 2;
|
|
let tagsSureLen = 0;
|
|
let tagsSureLen = 0;
|
|
let resultSelectSize = 0;
|
|
let resultSelectSize = 0;
|
|
this.adNameTags.forEach(item => {
|
|
this.adNameTags.forEach(item => {
|
|
@@ -2124,7 +2211,7 @@ export default {
|
|
updateChangeData.forEach(item => {
|
|
updateChangeData.forEach(item => {
|
|
tagsLen += item.length;
|
|
tagsLen += item.length;
|
|
});
|
|
});
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
|
|
this.defaultFormList.forEach(item => {
|
|
this.defaultFormList.forEach(item => {
|
|
if (item.id === formId) {
|
|
if (item.id === formId) {
|
|
item.lenSize = resultSelectSize;
|
|
item.lenSize = resultSelectSize;
|
|
@@ -2247,6 +2334,20 @@ export default {
|
|
callback();
|
|
callback();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ handleExportRules(value) {
|
|
|
|
+ let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
|
|
|
|
+ let length = 0;
|
|
|
|
+ let strArr = value.split('');
|
|
|
|
+ strArr.forEach(item => {
|
|
|
|
+ if (cnReg.test(item)) {
|
|
|
|
+ length += 1;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ length += 0.5;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return Math.ceil(length);
|
|
|
|
+ },
|
|
handleGetQueryById() {
|
|
handleGetQueryById() {
|
|
getAction('/ctop/materialInfo/queryById', {
|
|
getAction('/ctop/materialInfo/queryById', {
|
|
id: this.id
|
|
id: this.id
|
|
@@ -2256,14 +2357,35 @@ export default {
|
|
this.name = res.result.watermarkCode;
|
|
this.name = res.result.watermarkCode;
|
|
this.materialName = res.result.materialName;
|
|
this.materialName = res.result.materialName;
|
|
res.result.slogans.forEach(item => {
|
|
res.result.slogans.forEach(item => {
|
|
|
|
+ let finallyLenList = this.handleJudgeExec(item.slogan);
|
|
|
|
+ let resultSelectSize = 0;
|
|
|
|
+ if (finallyLenList.length) {
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(item.slogan);
|
|
|
|
+ let tagsLen = finallyLenList.length * 2;
|
|
|
|
+ let tagsSureLen = 0;
|
|
|
|
+ this.adNameTags.forEach(item => {
|
|
|
|
+ finallyLenList.forEach(val => {
|
|
|
|
+ if (item.name === val) {
|
|
|
|
+ tagsSureLen += item.maxWordLen;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ finallyLenList.forEach(item => {
|
|
|
|
+ tagsLen += item.length;
|
|
|
|
+ });
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ resultSelectSize = this.handleExportRules(item.slogan);
|
|
|
|
+ }
|
|
item.name = 'username' + item.id;
|
|
item.name = 'username' + item.id;
|
|
|
|
+ item.value = item.slogan;
|
|
|
|
+ item.lenSize = resultSelectSize;
|
|
|
|
+ item.tabStatus = 'alone';
|
|
|
|
+ item.defaultTagsList = this.adNameTags;
|
|
|
|
+ item.updateTagsList = this.adNameTags.slice(0, 4);
|
|
});
|
|
});
|
|
this.slogansDetail = res.result.slogans;
|
|
this.slogansDetail = res.result.slogans;
|
|
- this.$nextTick(() => {
|
|
|
|
- this.slogansDetail.forEach(item => {
|
|
|
|
- this.solganForm.setFieldsValue({[item.name]: item.slogan});
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
this.showUrlWater = null;
|
|
this.showUrlWater = null;
|
|
@@ -2286,14 +2408,19 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleSolganCheck(data) {
|
|
handleSolganCheck(data) {
|
|
|
|
+ let changeSlogan = this.slogansDetail;
|
|
|
|
+ changeSlogan.forEach(item => {
|
|
|
|
+ item.title = item.value;
|
|
|
|
+ item.creative_word_ids = item.wordPackId;
|
|
|
|
+ });
|
|
this.solganForm.validateFields(err => {
|
|
this.solganForm.validateFields(err => {
|
|
if (!err) {
|
|
if (!err) {
|
|
- const paramsData = this.solganForm.getFieldsValue();
|
|
|
|
this.defaultSolganStatus = 'input';
|
|
this.defaultSolganStatus = 'input';
|
|
this.defaultSolganTitle = 'test';
|
|
this.defaultSolganTitle = 'test';
|
|
postAction('/ctop/bytedanceVideoSlogenInfo/edit', {
|
|
postAction('/ctop/bytedanceVideoSlogenInfo/edit', {
|
|
id: data.id,
|
|
id: data.id,
|
|
- slogan: paramsData[data.name]
|
|
|
|
|
|
+ slogan: changeSlogan.filter(item => item.id === data.id)[0].title,
|
|
|
|
+ creativeWordIds: changeSlogan.filter(item => item.id === data.id)[0].creative_word_ids.join(',')
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.$message.success('修改成功');
|
|
this.$message.success('修改成功');
|
|
@@ -2304,6 +2431,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleSolganEdit(data) {
|
|
handleSolganEdit(data) {
|
|
|
|
+ console.log(data, 'data---修改');
|
|
if (this.defaultSolganStatus === 'edit') {
|
|
if (this.defaultSolganStatus === 'edit') {
|
|
this.$message.error('请先完成上一次的修改');
|
|
this.$message.error('请先完成上一次的修改');
|
|
return;
|
|
return;
|
|
@@ -2314,6 +2442,36 @@ export default {
|
|
this.solganForm.setFieldsValue({[data.name]: data.slogan});
|
|
this.solganForm.setFieldsValue({[data.name]: data.slogan});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ handleSloganSearchChange(e, field, formId) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ const dynamicWordPackIds = [];
|
|
|
|
+ let finallyLenList = this.handleJudgeExec(e.target.value);
|
|
|
|
+ let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(e.target.value);
|
|
|
|
+ let tagsLen = updateFinallyResult.length * 2;
|
|
|
|
+ let tagsSureLen = 0;
|
|
|
|
+ let resultSelectSize = 0;
|
|
|
|
+ this.adNameTags.forEach(item => {
|
|
|
|
+ updateFinallyResult.forEach(val => {
|
|
|
|
+ if (item.name === val) {
|
|
|
|
+ tagsSureLen += item.maxWordLen;
|
|
|
|
+ dynamicWordPackIds.push(item.creativeWordId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ updateFinallyResult.forEach(item => {
|
|
|
|
+ tagsLen += item.length;
|
|
|
|
+ });
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
|
|
|
|
+ this.slogansDetail.forEach(item => {
|
|
|
|
+ if (item.id === formId) {
|
|
|
|
+ item.lenSize = resultSelectSize;
|
|
|
|
+ item.wordPackId = dynamicWordPackIds;
|
|
|
|
+ item.value = e.target.value;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
handleFormInputChang(e, field, formId) {
|
|
handleFormInputChang(e, field, formId) {
|
|
const changeFiled = [];
|
|
const changeFiled = [];
|
|
this.defaultFormList.forEach(item => {
|
|
this.defaultFormList.forEach(item => {
|
|
@@ -2330,8 +2488,8 @@ export default {
|
|
const dynamicWordPackIds = [];
|
|
const dynamicWordPackIds = [];
|
|
let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
|
|
let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
|
|
let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
|
|
let updateFinallyResult = this.adNameTags.filter(item => finallyLenList.includes(item.name)).map(val => val.name);
|
|
- const inputDefaultLen = this.defaultFormList.filter(item => item.id === formId)[0].value.length;
|
|
|
|
- let tagsLen = updateFinallyResult.length * 4;
|
|
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(this.defaultFormList.filter(item => item.id === formId)[0].value);
|
|
|
|
+ let tagsLen = updateFinallyResult.length * 2;
|
|
let tagsSureLen = 0;
|
|
let tagsSureLen = 0;
|
|
let resultSelectSize = 0;
|
|
let resultSelectSize = 0;
|
|
this.adNameTags.forEach(item => {
|
|
this.adNameTags.forEach(item => {
|
|
@@ -2345,7 +2503,7 @@ export default {
|
|
updateFinallyResult.forEach(item => {
|
|
updateFinallyResult.forEach(item => {
|
|
tagsLen += item.length;
|
|
tagsLen += item.length;
|
|
});
|
|
});
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
|
|
this.defaultFormList.forEach(item => {
|
|
this.defaultFormList.forEach(item => {
|
|
if (item.id === formId) {
|
|
if (item.id === formId) {
|
|
item.lenSize = resultSelectSize;
|
|
item.lenSize = resultSelectSize;
|
|
@@ -2459,8 +2617,8 @@ export default {
|
|
let finallyLenList = this.handleJudgeExec(item.slogan);
|
|
let finallyLenList = this.handleJudgeExec(item.slogan);
|
|
let resultSelectSize = 0;
|
|
let resultSelectSize = 0;
|
|
if (finallyLenList.length) {
|
|
if (finallyLenList.length) {
|
|
- const inputDefaultLen = item.slogan.length;
|
|
|
|
- let tagsLen = finallyLenList.length * 4;
|
|
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(item.slogan);
|
|
|
|
+ let tagsLen = finallyLenList.length * 2;
|
|
let tagsSureLen = 0;
|
|
let tagsSureLen = 0;
|
|
this.adNameTags.forEach(item => {
|
|
this.adNameTags.forEach(item => {
|
|
finallyLenList.forEach(val => {
|
|
finallyLenList.forEach(val => {
|
|
@@ -2472,7 +2630,7 @@ export default {
|
|
finallyLenList.forEach(item => {
|
|
finallyLenList.forEach(item => {
|
|
tagsLen += item.length;
|
|
tagsLen += item.length;
|
|
});
|
|
});
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
resultSelectSize = item.slogan.length;
|
|
resultSelectSize = item.slogan.length;
|
|
@@ -2485,11 +2643,6 @@ export default {
|
|
item.updateTagsList = this.adNameTags.slice(0, 4);
|
|
item.updateTagsList = this.adNameTags.slice(0, 4);
|
|
});
|
|
});
|
|
this.defaultFormList = res.result.slogans;
|
|
this.defaultFormList = res.result.slogans;
|
|
- // this.$nextTick(() => {
|
|
|
|
- // this.defaultFormList.forEach(item => {
|
|
|
|
- // this.defaultFormList.setFieldsValue({[item.name]: item.slogan});
|
|
|
|
- // });
|
|
|
|
- // });
|
|
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
for (let i = 0; i < 3; i++) {
|
|
for (let i = 0; i < 3; i++) {
|
|
@@ -2984,14 +3137,35 @@ export default {
|
|
this.name = res.result.watermarkCode;
|
|
this.name = res.result.watermarkCode;
|
|
this.materialName = res.result.materialName;
|
|
this.materialName = res.result.materialName;
|
|
res.result.slogans.forEach(item => {
|
|
res.result.slogans.forEach(item => {
|
|
|
|
+ let finallyLenList = this.handleJudgeExec(item.slogan);
|
|
|
|
+ let resultSelectSize = 0;
|
|
|
|
+ if (finallyLenList.length) {
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(item.slogan);
|
|
|
|
+ let tagsLen = finallyLenList.length * 2;
|
|
|
|
+ let tagsSureLen = 0;
|
|
|
|
+ this.adNameTags.forEach(item => {
|
|
|
|
+ finallyLenList.forEach(val => {
|
|
|
|
+ if (item.name === val) {
|
|
|
|
+ tagsSureLen += item.maxWordLen;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ finallyLenList.forEach(item => {
|
|
|
|
+ tagsLen += item.length;
|
|
|
|
+ });
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ resultSelectSize = this.handleExportRules(item.slogan);
|
|
|
|
+ }
|
|
item.name = 'username' + item.id;
|
|
item.name = 'username' + item.id;
|
|
|
|
+ item.value = item.slogan;
|
|
|
|
+ item.lenSize = resultSelectSize;
|
|
|
|
+ item.tabStatus = 'alone';
|
|
|
|
+ item.defaultTagsList = this.adNameTags;
|
|
|
|
+ item.updateTagsList = this.adNameTags.slice(0, 4);
|
|
});
|
|
});
|
|
this.slogansDetail = res.result.slogans;
|
|
this.slogansDetail = res.result.slogans;
|
|
- this.$nextTick(() => {
|
|
|
|
- this.slogansDetail.forEach(item => {
|
|
|
|
- this.solganForm.setFieldsValue({[item.name]: item.slogan});
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
this.showUrlWater = null;
|
|
this.showUrlWater = null;
|