|
@@ -118,7 +118,7 @@
|
|
:scroll="{x: 1500}"
|
|
:scroll="{x: 1500}"
|
|
>
|
|
>
|
|
<span slot="appointAction" slot-scope="text, record">
|
|
<span slot="appointAction" slot-scope="text, record">
|
|
- <a @click="handleAppointEdit(record)">编辑</a>
|
|
|
|
|
|
+ <a @click="handleCurrencyEdit(record)">编辑</a>
|
|
<a-divider type="vertical"/>
|
|
<a-divider type="vertical"/>
|
|
<a @click="handleAppointDelete(record)">删除</a>
|
|
<a @click="handleAppointDelete(record)">删除</a>
|
|
</span>
|
|
</span>
|
|
@@ -140,7 +140,7 @@
|
|
</div>
|
|
</div>
|
|
<a-modal
|
|
<a-modal
|
|
v-if="causeVisible"
|
|
v-if="causeVisible"
|
|
- title="新建文案"
|
|
|
|
|
|
+ :title="copywritingType === 'add' ? '新建文案' : '编辑文案'"
|
|
dialog-class="copywrit-modal"
|
|
dialog-class="copywrit-modal"
|
|
:visible="causeVisible"
|
|
:visible="causeVisible"
|
|
@ok="handleCauseSure"
|
|
@ok="handleCauseSure"
|
|
@@ -152,8 +152,8 @@
|
|
<div class="acount-title-right">
|
|
<div class="acount-title-right">
|
|
<div class="only-title-mater">
|
|
<div class="only-title-mater">
|
|
<a-radio-group v-model="copywrittypeName" button-style="solid" @change="handleFormLayoutChange">
|
|
<a-radio-group v-model="copywrittypeName" button-style="solid" @change="handleFormLayoutChange">
|
|
- <a-radio-button value="horizontal">通用</a-radio-button>
|
|
|
|
- <a-radio-button value="vertical">指定素材</a-radio-button>
|
|
|
|
|
|
+ <a-radio-button value="horizontal" :disabled="copywritingEditList.controlTypeModel === '2'">通用</a-radio-button>
|
|
|
|
+ <a-radio-button value="vertical" :disabled="copywritingEditList.controlTypeModel === '1'">指定素材</a-radio-button>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -166,7 +166,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="copywrittypeName === 'horizontal'" class="acount-title">
|
|
|
|
|
|
+ <div v-if="copywrittypeName === 'horizontal' && copywritingType === 'add'" class="acount-title">
|
|
<div class="acount-title-left">文件上传</div>
|
|
<div class="acount-title-left">文件上传</div>
|
|
<div class="acount-title-right">
|
|
<div class="acount-title-right">
|
|
<div class="only-title-mater">
|
|
<div class="only-title-mater">
|
|
@@ -199,14 +199,14 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="copywrittypeName === 'vertical'" class="acount-title push-plate">
|
|
|
|
|
|
+ <div v-if="copywrittypeName === 'vertical' && copywritingType === 'add'" class="acount-title push-plate">
|
|
<div class="acount-title-left">创意标题</div>
|
|
<div class="acount-title-left">创意标题</div>
|
|
<div class="acount-title-right">
|
|
<div class="acount-title-right">
|
|
<a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
|
|
<a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
|
|
<span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
|
|
<span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="copywrittypeName === 'vertical'" class="acount-title">
|
|
|
|
|
|
+ <div v-if="copywrittypeName === 'vertical' && copywritingType === 'add'" class="acount-title">
|
|
<div class="acount-title-left"></div>
|
|
<div class="acount-title-left"></div>
|
|
<div class="acount-title-right">
|
|
<div class="acount-title-right">
|
|
<a-form :form="examinForm">
|
|
<a-form :form="examinForm">
|
|
@@ -264,6 +264,63 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div v-if="copywritingType === 'edit'" class="acount-title push-plate">
|
|
|
|
+ <div class="acount-title-left">创意标题</div>
|
|
|
|
+ <div class="acount-title-right">
|
|
|
|
+ <a-form :form="examinForm">
|
|
|
|
+ <a-form-item
|
|
|
|
+ v-for="item in defaultFormList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ class="examin-form-model"
|
|
|
|
+ :label-col="labelCol"
|
|
|
|
+ :wrapper-col="wrapperCol"
|
|
|
|
+ label=""
|
|
|
|
+ >
|
|
|
|
+ <a-input
|
|
|
|
+ v-decorator="[
|
|
|
|
+ item.name,
|
|
|
|
+ {rules: [
|
|
|
|
+ {validator: validatePass, trigger: 'blur'}
|
|
|
|
+ ]}
|
|
|
|
+ ]"
|
|
|
|
+ class="examin-form-input"
|
|
|
|
+ :id="item.name"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ @change="handleFormInputChang($event, item.name, item.id)"
|
|
|
|
+ />
|
|
|
|
+ <span class="examin-form-num">{{ item.lenSize }}/30</span>
|
|
|
|
+ <div class="ad-name-tags-class">
|
|
|
|
+ <div v-if="item.tabStatus === 'alone'" class="name-tags-left">
|
|
|
|
+ <a-tag
|
|
|
|
+ v-for="val in item.updateTagsList"
|
|
|
|
+ :key="val.id"
|
|
|
|
+ color="#1890ff"
|
|
|
|
+ @click="handleGetChangeAll(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="handleGetChangeAll(val.name, item.name, item.id)"
|
|
|
|
+ >
|
|
|
|
+ + {{ val.name }}
|
|
|
|
+ </a-tag>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.tabStatus === 'alone'">
|
|
|
|
+ <a @click="handleMoreTagsShow(item.id, 'more')">更多</a>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.tabStatus === 'all'">
|
|
|
|
+ <a @click="handleMoreTagsShow(item.id, 'little')">收起</a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</a-modal>
|
|
</a-modal>
|
|
<a-modal
|
|
<a-modal
|
|
@@ -366,6 +423,8 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
moment,
|
|
moment,
|
|
|
|
+ copywritingEditList: {},
|
|
|
|
+ copywritingType: 'add',
|
|
projectModelValue: '',
|
|
projectModelValue: '',
|
|
optimizationOption: [], // 账户option
|
|
optimizationOption: [], // 账户option
|
|
controlTypeModel: '1',
|
|
controlTypeModel: '1',
|
|
@@ -669,8 +728,60 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
- handleGetCurrencyEditData() {
|
|
|
|
-
|
|
|
|
|
|
+ handleCurrencyEdit(data) {
|
|
|
|
+ console.log(data, this.controlTypeModel, 'data, --data');
|
|
|
|
+ const defaultData = data;
|
|
|
|
+ defaultData.controlTypeModel = this.controlTypeModel;
|
|
|
|
+ if (this.controlTypeModel === '1') {
|
|
|
|
+ this.advertisingAccount[0] = defaultData.accountId;
|
|
|
|
+ }
|
|
|
|
+ this.causeVisible = true;
|
|
|
|
+ this.copywritingType = 'edit';
|
|
|
|
+ this.copywrittypeName = this.controlTypeModel === '1' ? 'horizontal' : 'vertical';
|
|
|
|
+ this.copywritingEditList = defaultData;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ let changeValue = this.controlTypeModel === '1' ? data.textCopywriter : data.slogan;
|
|
|
|
+ let finallyLenList = this.handleJudgeExec(changeValue);
|
|
|
|
+ let newOptionList = [];
|
|
|
|
+ finallyLenList.forEach(item => {
|
|
|
|
+ this.adNameTags.forEach(val => {
|
|
|
|
+ if (item === val.name) {
|
|
|
|
+ newOptionList.push(val);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ let resultSelectSize = 0;
|
|
|
|
+ if (newOptionList.length) {
|
|
|
|
+ const inputDefaultLen = this.handleExportRules(changeValue);
|
|
|
|
+ let tagsLen = newOptionList.length * 2;
|
|
|
|
+ let tagsSureLen = 0;
|
|
|
|
+ newOptionList.forEach(item => {
|
|
|
|
+ this.adNameTags.forEach(val => {
|
|
|
|
+ if (item.name === val.name) {
|
|
|
|
+ tagsSureLen += val.maxWordLen;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ finallyLenList.forEach(item => {
|
|
|
|
+ tagsLen += item.length;
|
|
|
|
+ });
|
|
|
|
+ resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen + newOptionList.length;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ resultSelectSize = this.handleExportRules(changeValue);
|
|
|
|
+ }
|
|
|
|
+ const defaultList = this.adNameTags;
|
|
|
|
+ const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
|
|
|
|
+ this.defaultFormList.push({
|
|
|
|
+ id: randomNum,
|
|
|
|
+ name: 'username' + randomNum,
|
|
|
|
+ value: changeValue,
|
|
|
|
+ lenSize: resultSelectSize,
|
|
|
|
+ tabStatus: 'alone',
|
|
|
|
+ defaultTagsList: defaultList,
|
|
|
|
+ updateTagsList: defaultList.slice(0, 4)
|
|
|
|
+ });
|
|
|
|
+ });
|
|
},
|
|
},
|
|
handleCurrencyDelete(data) {
|
|
handleCurrencyDelete(data) {
|
|
let that = this;
|
|
let that = this;
|
|
@@ -1151,7 +1262,7 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleUploadWxecl() {
|
|
|
|
|
|
+ handleUploadWxeclAdd() {
|
|
if (!this.advertisingAccount.length) {
|
|
if (!this.advertisingAccount.length) {
|
|
this.$message.error('请选择账户');
|
|
this.$message.error('请选择账户');
|
|
return;
|
|
return;
|
|
@@ -1219,12 +1330,28 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ handleUploadWxeclEdit() {
|
|
|
|
+ console.log('通用编辑');
|
|
|
|
+ },
|
|
|
|
+ handleVerticalEdit() {
|
|
|
|
+ console.log('指定编辑');
|
|
|
|
+ },
|
|
handleCauseSure() {
|
|
handleCauseSure() {
|
|
- if (this.copywrittypeName === 'horizontal') {
|
|
|
|
- this.handleUploadWxecl();
|
|
|
|
|
|
+ if (this.copywritingType === 'add') {
|
|
|
|
+ if (this.copywrittypeName === 'horizontal') {
|
|
|
|
+ this.handleUploadWxeclAdd();
|
|
|
|
+ }
|
|
|
|
+ else if (this.copywrittypeName === 'vertical') {
|
|
|
|
+ this.handleVerticalAdd();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- else if (this.copywrittypeName === 'vertical') {
|
|
|
|
- this.handleVerticalAdd();
|
|
|
|
|
|
+ else if (this.copywritingType === 'edit') {
|
|
|
|
+ if (this.copywrittypeName === 'horizontal') {
|
|
|
|
+ this.handleUploadWxeclEdit();
|
|
|
|
+ }
|
|
|
|
+ else if (this.copywrittypeName === 'vertical') {
|
|
|
|
+ this.handleVerticalEdit();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleCauseCancel() {
|
|
handleCauseCancel() {
|
|
@@ -1234,6 +1361,7 @@ export default {
|
|
this.causeVisible = false;
|
|
this.causeVisible = false;
|
|
this.defaultFormList = [];
|
|
this.defaultFormList = [];
|
|
this.modalSelectMaterial = [];
|
|
this.modalSelectMaterial = [];
|
|
|
|
+ this.copywritingType = '';
|
|
},
|
|
},
|
|
handleGetCreativeWord() {
|
|
handleGetCreativeWord() {
|
|
getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
|
|
getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
|
|
@@ -1265,6 +1393,8 @@ export default {
|
|
},
|
|
},
|
|
handleAddAccountConfig() {
|
|
handleAddAccountConfig() {
|
|
this.causeVisible = true;
|
|
this.causeVisible = true;
|
|
|
|
+ this.copywritingType = 'add';
|
|
|
|
+ this.copywritingEditList = {};
|
|
},
|
|
},
|
|
handleLaunchData(date, dateString) {
|
|
handleLaunchData(date, dateString) {
|
|
this.configForm.launchDateRange = dateString;
|
|
this.configForm.launchDateRange = dateString;
|