|
@@ -145,7 +145,7 @@
|
|
|
}
|
|
|
|
|
|
.video-content {
|
|
|
- width: 50%;
|
|
|
+ width: 45%;
|
|
|
padding: 10px;
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
@@ -316,6 +316,9 @@
|
|
|
<selectTable :projectId.sync="queryParam.productId" ref="selectTable"></selectTable>
|
|
|
</a-col>
|
|
|
<a-col :md="8" :sm="8">
|
|
|
+ <selectTableProject :projectId.sync="queryParam.projectId" :productId="queryParam.productId" ref="selectTableProject"></selectTableProject>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="8">
|
|
|
<a-form-item label="素材名称">
|
|
|
<a-input placeholder="请输入素材名称" v-model="queryParam.materialName"></a-input>
|
|
|
</a-form-item>
|
|
@@ -345,6 +348,60 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="8" :sm="8">
|
|
|
+ <a-form-item label="剪辑">
|
|
|
+ <a-select
|
|
|
+ v-model="queryParam.clipId"
|
|
|
+ :filter-option="filterOption"
|
|
|
+ allowClear
|
|
|
+ show-search
|
|
|
+ >
|
|
|
+ <a-select-option
|
|
|
+ v-for="item in designList"
|
|
|
+ :key="item.userId"
|
|
|
+ :value="item.userId"
|
|
|
+ >
|
|
|
+ {{ item.companyName + '_' + item.userName }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="8">
|
|
|
+ <a-form-item label="拍摄">
|
|
|
+ <a-select
|
|
|
+ v-model="queryParam.shotId"
|
|
|
+ :filter-option="filterOption"
|
|
|
+ allowClear
|
|
|
+ show-search
|
|
|
+ >
|
|
|
+ <a-select-option
|
|
|
+ v-for="item in designList"
|
|
|
+ :key="item.userId"
|
|
|
+ :value="item.userId"
|
|
|
+ >
|
|
|
+ {{ item.companyName + '_' + item.userName }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="8">
|
|
|
+ <a-form-item label="编导">
|
|
|
+ <a-select
|
|
|
+ v-model="queryParam.planId"
|
|
|
+ :filter-option="filterOption"
|
|
|
+ allowClear
|
|
|
+ show-search
|
|
|
+ >
|
|
|
+ <a-select-option
|
|
|
+ v-for="item in designList"
|
|
|
+ :key="item.userId"
|
|
|
+ :value="item.userId"
|
|
|
+ >
|
|
|
+ {{ item.companyName + '_' + item.userName }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="8">
|
|
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" @click="handleSubmit" icon="search">查询</a-button>
|
|
|
<a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
|
|
@@ -620,7 +677,7 @@
|
|
|
</a-dropdown>
|
|
|
<a-checkbox :value="items.id" style="float: right" v-show="active == '0' || active == '1'"></a-checkbox>
|
|
|
<br />
|
|
|
- {{ items.createTime | getDate }}
|
|
|
+ {{ items.createTime }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -968,7 +1025,7 @@
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</a-modal>
|
|
|
- <a-modal title="素材详情" v-model="visibleDetail" width="70%" :footer="null">
|
|
|
+ <a-modal title="素材详情" v-model="visibleDetail" @cancel="handleBudgetCancel" width="70%" :footer="null">
|
|
|
<div style="width: 100%; height: 35px">
|
|
|
<a-button type="primary" @click="setSuccess" style="float: right">
|
|
|
{{ excellent == 0 ? '标记为优秀素材' : '取消标记' }}
|
|
@@ -1212,7 +1269,7 @@
|
|
|
</div>
|
|
|
</a-form>
|
|
|
<div class="solgan-whole-content">
|
|
|
- <span class="solgan-title-header">广告语:</span>
|
|
|
+ <span class="solgan-title-header" style="display: inline-block;width: 60px;">广告语:</span>
|
|
|
<a-form v-if="slogansDetail.length" :form="solganForm" class="solgan-form-class">
|
|
|
<a-form-item
|
|
|
v-for="item in slogansDetail"
|
|
@@ -1222,33 +1279,53 @@
|
|
|
:wrapper-col="wrapperCol"
|
|
|
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: 430px;">
|
|
|
+ <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>
|
|
|
<span v-else class="solgan-title-header">暂无</span>
|
|
@@ -1648,6 +1725,7 @@ import uploadFile from '@/components/uploadFile.vue';
|
|
|
import {closeAllVideoFun, stopOtherVideo} from '@/utils/videoControl';
|
|
|
import accountCheck from '@/views/modules/material/accountCheck';
|
|
|
import accountCheckBytedance from '@/views/modules/material/accountCheckBytedance';
|
|
|
+import selectTableProject from '@/views/modules/Statistics/components/selectPagination.vue';
|
|
|
import {urlAcount} from '../account-config/account-config-server.js';
|
|
|
|
|
|
import qs from 'qs';
|
|
@@ -1664,10 +1742,12 @@ export default {
|
|
|
selectTable,
|
|
|
uploadFile,
|
|
|
PermissionModal,
|
|
|
- accountCheckBytedance
|
|
|
+ accountCheckBytedance,
|
|
|
+ selectTableProject
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ designList: [],
|
|
|
adNameTags: [],
|
|
|
materTitltStatus: false,
|
|
|
accountMaster: {
|
|
@@ -1947,6 +2027,7 @@ export default {
|
|
|
});
|
|
|
this.getHangye();
|
|
|
this.handleGetCreativeWord();
|
|
|
+ this.handleGetDesignList();
|
|
|
},
|
|
|
watch: {
|
|
|
$route(n, o) {
|
|
@@ -1957,9 +2038,12 @@ export default {
|
|
|
this.loadData();
|
|
|
}
|
|
|
},
|
|
|
- 'queryParam.productId'(n, o) {
|
|
|
- if (n !== '') {
|
|
|
+ 'queryParam.productId': function (n, o) {
|
|
|
+ if (n != '') {
|
|
|
this.getList(n);
|
|
|
+ this.checkArr = [];
|
|
|
+ this.$refs.selectTableProject.keyValue = '';
|
|
|
+ this.$refs.selectTableProject.getData(n);
|
|
|
}
|
|
|
},
|
|
|
visibleDetail(n, o) {
|
|
@@ -1999,10 +2083,45 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
+ handleBudgetCancel() {
|
|
|
+ this.defaultSolganTitle = 'test';
|
|
|
+ this.defaultSolganStatus = 'input';
|
|
|
+ this.visibleDetail = false;
|
|
|
+ },
|
|
|
+ // 获取设计人员
|
|
|
+ handleGetDesignList() {
|
|
|
+ postAction('/ctop/kuaishou/videoReport/getDesignList').then(result => {
|
|
|
+ if (result.success) {
|
|
|
+ this.designList = result.result;
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ },
|
|
|
handleSubmit() {
|
|
|
+ if (!this.queryParam.productId) {
|
|
|
+ this.$refs.selectTableProject.keyValue = '';
|
|
|
+ this.$refs.selectTableProject.getData();
|
|
|
+ }
|
|
|
this.searchQuery();
|
|
|
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) {
|
|
|
if (type === 'more') {
|
|
|
this.defaultFormList.forEach(item => {
|
|
@@ -2034,28 +2153,26 @@ export default {
|
|
|
validatePass(rule, value, callback) {
|
|
|
this.$nextTick(() => {
|
|
|
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);
|
|
|
- console.log(updateFinallyResult, '000000000000');
|
|
|
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;
|
|
|
this.adNameTags.forEach(item => {
|
|
|
- finallyLenList.forEach(val => {
|
|
|
+ updateFinallyResult.forEach(val => {
|
|
|
if (item.name === val) {
|
|
|
tagsSureLen += item.maxWordLen;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- finallyLenList.forEach(item => {
|
|
|
+ updateFinallyResult.forEach(item => {
|
|
|
tagsLen += item.length;
|
|
|
});
|
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
|
|
|
}
|
|
|
else {
|
|
|
- resultSelectSize = value.length;
|
|
|
+ resultSelectSize = this.handleExportRules(value);
|
|
|
}
|
|
|
if (resultSelectSize === 0) {
|
|
|
callback(new Error('请输入'));
|
|
@@ -2072,7 +2189,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleJudgeExec(item) {
|
|
|
- let re = /\{\{(.+?)\}\}/g;
|
|
|
+ let re = /\{(.+?)\}/g;
|
|
|
let array = [];
|
|
|
let temp;
|
|
|
while ((temp = re.exec(item))) {
|
|
@@ -2080,6 +2197,59 @@ export default {
|
|
|
};
|
|
|
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) {
|
|
|
let node = document.getElementById(field);
|
|
@@ -2094,11 +2264,11 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
if (startPos === 0 || endPos === 0) {
|
|
|
- txt += '{{' + item + '}}';
|
|
|
+ txt += '{' + item + '}';
|
|
|
this.examinForm.setFieldsValue({[field]: txt});
|
|
|
}
|
|
|
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.selectionEnd = startPos + item.length + 6;
|
|
|
}
|
|
@@ -2109,8 +2279,8 @@ export default {
|
|
|
const dynamicWordPackIds = [];
|
|
|
let changeData = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
|
|
|
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 resultSelectSize = 0;
|
|
|
this.adNameTags.forEach(item => {
|
|
@@ -2124,7 +2294,7 @@ export default {
|
|
|
updateChangeData.forEach(item => {
|
|
|
tagsLen += item.length;
|
|
|
});
|
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateChangeData.length;
|
|
|
this.defaultFormList.forEach(item => {
|
|
|
if (item.id === formId) {
|
|
|
item.lenSize = resultSelectSize;
|
|
@@ -2247,6 +2417,20 @@ export default {
|
|
|
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() {
|
|
|
getAction('/ctop/materialInfo/queryById', {
|
|
|
id: this.id
|
|
@@ -2256,14 +2440,35 @@ export default {
|
|
|
this.name = res.result.watermarkCode;
|
|
|
this.materialName = res.result.materialName;
|
|
|
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.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.$nextTick(() => {
|
|
|
- this.slogansDetail.forEach(item => {
|
|
|
- this.solganForm.setFieldsValue({[item.name]: item.slogan});
|
|
|
- });
|
|
|
- });
|
|
|
}
|
|
|
else {
|
|
|
this.showUrlWater = null;
|
|
@@ -2276,6 +2481,9 @@ export default {
|
|
|
this.$message.error('删除失败,广告语不能少于三条');
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.defaultSolganStatus === 'edit') {
|
|
|
+ this.defaultSolganStatus = 'input';
|
|
|
+ }
|
|
|
let formdata = new FormData();
|
|
|
formdata.append('id', data.id);
|
|
|
postAction('/ctop/bytedanceVideoSlogenInfo/delete', formdata).then(res => {
|
|
@@ -2286,14 +2494,19 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleSolganCheck(data) {
|
|
|
+ let changeSlogan = this.slogansDetail;
|
|
|
+ changeSlogan.forEach(item => {
|
|
|
+ item.title = item.value;
|
|
|
+ item.creative_word_ids = item.wordPackId;
|
|
|
+ });
|
|
|
this.solganForm.validateFields(err => {
|
|
|
if (!err) {
|
|
|
- const paramsData = this.solganForm.getFieldsValue();
|
|
|
this.defaultSolganStatus = 'input';
|
|
|
this.defaultSolganTitle = 'test';
|
|
|
postAction('/ctop/bytedanceVideoSlogenInfo/edit', {
|
|
|
id: data.id,
|
|
|
- slogan: paramsData[data.name]
|
|
|
+ slogan: changeSlogan.filter(item => item.id === data.id)[0].title,
|
|
|
+ creativeWordIds: JSON.stringify(changeSlogan.filter(item => item.id === data.id)[0].creative_word_ids)
|
|
|
}).then(res => {
|
|
|
if (res.success) {
|
|
|
this.$message.success('修改成功');
|
|
@@ -2314,6 +2527,36 @@ export default {
|
|
|
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) {
|
|
|
const changeFiled = [];
|
|
|
this.defaultFormList.forEach(item => {
|
|
@@ -2330,8 +2573,8 @@ export default {
|
|
|
const dynamicWordPackIds = [];
|
|
|
let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
|
|
|
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 resultSelectSize = 0;
|
|
|
this.adNameTags.forEach(item => {
|
|
@@ -2345,7 +2588,7 @@ export default {
|
|
|
updateFinallyResult.forEach(item => {
|
|
|
tagsLen += item.length;
|
|
|
});
|
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + updateFinallyResult.length;
|
|
|
this.defaultFormList.forEach(item => {
|
|
|
if (item.id === formId) {
|
|
|
item.lenSize = resultSelectSize;
|
|
@@ -2459,8 +2702,8 @@ export default {
|
|
|
let finallyLenList = this.handleJudgeExec(item.slogan);
|
|
|
let resultSelectSize = 0;
|
|
|
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;
|
|
|
this.adNameTags.forEach(item => {
|
|
|
finallyLenList.forEach(val => {
|
|
@@ -2472,7 +2715,7 @@ export default {
|
|
|
finallyLenList.forEach(item => {
|
|
|
tagsLen += item.length;
|
|
|
});
|
|
|
- resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + finallyLenList.length;
|
|
|
}
|
|
|
else {
|
|
|
resultSelectSize = item.slogan.length;
|
|
@@ -2485,11 +2728,6 @@ export default {
|
|
|
item.updateTagsList = this.adNameTags.slice(0, 4);
|
|
|
});
|
|
|
this.defaultFormList = res.result.slogans;
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.defaultFormList.forEach(item => {
|
|
|
- // this.defaultFormList.setFieldsValue({[item.name]: item.slogan});
|
|
|
- // });
|
|
|
- // });
|
|
|
}
|
|
|
else {
|
|
|
for (let i = 0; i < 3; i++) {
|
|
@@ -2768,28 +3006,12 @@ export default {
|
|
|
},
|
|
|
moment,
|
|
|
tongbu(value) {
|
|
|
- // getAction('/ctop/project/queryById', {id: this.queryParam.projectId}).then(res => {
|
|
|
- // if (res.success) {
|
|
|
- // if (res.result.mediaId === '1' || res.result.mediaId === '3') {
|
|
|
- // this.$refs.check.getData('/ctop/userAllocation/getAccountListByProjectId', {
|
|
|
- // userId: this.userInfo().id,
|
|
|
- // projectId: this.queryParam.projectId
|
|
|
- // });
|
|
|
- // }
|
|
|
- // else if (res.result.mediaId === '2' || res.result.mediaId === '4') {
|
|
|
- // this.$refs.accountCheckBytedance.getParticipateList(this.queryParam.projectId);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // this.$message.error('网络波动,请稍后再试');
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.mediaId = value
|
|
|
+ this.mediaId = value;
|
|
|
this.$refs.check.getData('/ctop/userAllocation/getAccountListByUserIdAndProductId', {
|
|
|
userId: this.userInfo().id,
|
|
|
productId: this.queryParam.productId,
|
|
|
- mediaId: value,
|
|
|
- })
|
|
|
+ mediaId: value
|
|
|
+ });
|
|
|
},
|
|
|
implement(data) {
|
|
|
let params = {};
|
|
@@ -2874,24 +3096,16 @@ export default {
|
|
|
userId: this.userInfo().id,
|
|
|
status: this.active,
|
|
|
productId: ''
|
|
|
- }
|
|
|
- this.$refs.selectTable.keyValue = "";
|
|
|
- this.$refs.selectTable.getData()
|
|
|
+ };
|
|
|
+ this.$refs.selectTable.keyValue = '';
|
|
|
+ this.$refs.selectTable.getData();
|
|
|
+ this.$refs.selectTableProject.keyValue = '';
|
|
|
+ this.$refs.selectTableProject.getData();
|
|
|
this.labelValue = [];
|
|
|
this.loadData(1);
|
|
|
this.checkArr = [];
|
|
|
},
|
|
|
getList(value) {
|
|
|
- // if (value) {
|
|
|
- // getAction('/ctop/projectMember/participateListV2', {
|
|
|
- // userId: this.userInfo().id,
|
|
|
- // projectId: value
|
|
|
- // }).then(res => {
|
|
|
- // if (res.code === 0) {
|
|
|
- // this.mediaId = res.result.records[0].mediaId;
|
|
|
- // };
|
|
|
- // });
|
|
|
- // }
|
|
|
this.loadData();
|
|
|
},
|
|
|
onChangeCheckImage(checkedList) {
|
|
@@ -2984,14 +3198,35 @@ export default {
|
|
|
this.name = res.result.watermarkCode;
|
|
|
this.materialName = res.result.materialName;
|
|
|
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.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.$nextTick(() => {
|
|
|
- this.slogansDetail.forEach(item => {
|
|
|
- this.solganForm.setFieldsValue({[item.name]: item.slogan});
|
|
|
- });
|
|
|
- });
|
|
|
}
|
|
|
else {
|
|
|
this.showUrlWater = null;
|
|
@@ -3201,7 +3436,7 @@ export default {
|
|
|
md5: [],
|
|
|
name: [],
|
|
|
size: []
|
|
|
- }
|
|
|
+ };
|
|
|
this.imageArrList = [];
|
|
|
this.addImageVisible = false;
|
|
|
this.loadingImage = false;
|
|
@@ -3574,7 +3809,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getDataSource(page, pageSize) {
|
|
|
- this.ipagination.current = page
|
|
|
+ this.ipagination.current = page;
|
|
|
this.checkArr = [];
|
|
|
this.checkAll = false;
|
|
|
this.loadData();
|