|
@@ -61,6 +61,13 @@
|
|
|
@change="handleLaunchData"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item v-show="configForm.acountId || configForm.adConvertId" label="状态">
|
|
|
+ <a-select v-model="configForm.searchStatus" style="width: 100px">
|
|
|
+ <a-select-option :value="2">不限</a-select-option>
|
|
|
+ <a-select-option :value="0">已删除</a-select-option>
|
|
|
+ <a-select-option :value="1">可投放</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
<a-form-item class="form-handle-btn">
|
|
|
<a-button type="default" class="reset-class" @click="handleResetList">重置</a-button>
|
|
|
<a-button type="primary" @click="handleQueryList">查询</a-button>
|
|
@@ -81,6 +88,11 @@
|
|
|
:pagination="false"
|
|
|
:scroll="{x: 1500}"
|
|
|
>
|
|
|
+ <span slot="currencyAction" slot-scope="text, record">
|
|
|
+ <a :disabled="record.status === '已删除'" @click="handleCurrencyEdit(record)">编辑</a>
|
|
|
+ <a-divider type="vertical"/>
|
|
|
+ <a :disabled="record.status === '已删除'" @click="handleCurrencyDelete(record)">删除</a>
|
|
|
+ </span>
|
|
|
</a-table>
|
|
|
<a-pagination
|
|
|
class="pagin-table-class"
|
|
@@ -105,6 +117,11 @@
|
|
|
:pagination="false"
|
|
|
:scroll="{x: 1500}"
|
|
|
>
|
|
|
+ <span slot="appointAction" slot-scope="text, record">
|
|
|
+ <a :disabled="record.status === '已删除'" @click="handleCurrencyEdit(record)">编辑</a>
|
|
|
+ <a-divider type="vertical"/>
|
|
|
+ <a :disabled="record.status === '已删除'" @click="handleAppointDelete(record)">删除</a>
|
|
|
+ </span>
|
|
|
</a-table>
|
|
|
<a-pagination
|
|
|
class="pagin-table-class"
|
|
@@ -123,7 +140,7 @@
|
|
|
</div>
|
|
|
<a-modal
|
|
|
v-if="causeVisible"
|
|
|
- title="新建文案"
|
|
|
+ :title="copywritingType === 'add' ? '新建文案' : '编辑文案'"
|
|
|
dialog-class="copywrit-modal"
|
|
|
:visible="causeVisible"
|
|
|
@ok="handleCauseSure"
|
|
@@ -135,8 +152,8 @@
|
|
|
<div class="acount-title-right">
|
|
|
<div class="only-title-mater">
|
|
|
<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>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -145,11 +162,11 @@
|
|
|
<div class="acount-title-left">广告账户</div>
|
|
|
<div class="acount-title-right">
|
|
|
<div class="only-title-mater">
|
|
|
- <acount-search :appId.sync="advertisingAccount" request="1,3"></acount-search>
|
|
|
+ <acount-search :appId.sync="advertisingAccount" request="1,3" :disabled="copywritingType === 'edit'"></acount-search>
|
|
|
</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-right">
|
|
|
<div class="only-title-mater">
|
|
@@ -168,7 +185,7 @@
|
|
|
<div class="acount-title-left">选择素材</div>
|
|
|
<div class="acount-title-right">
|
|
|
<div class="only-title-mater">
|
|
|
- <div><a @click="handleSelectMaterial">选择素材</a></div>
|
|
|
+ <div v-if="copywritingType === 'add'"><a @click="handleSelectMaterial">选择素材</a></div>
|
|
|
<div class="title-mater-list">
|
|
|
<p
|
|
|
class="mater-list-name"
|
|
@@ -176,20 +193,21 @@
|
|
|
:key="item.id"
|
|
|
>
|
|
|
<span class="mater-list-show">{{ item.materialName }}</span>
|
|
|
- <span class="mater-list-icon" @click="handleDelAlone(item)"><a-icon type="close"/></span>
|
|
|
+ <span class="mater-list-show">123</span>
|
|
|
+ <span v-if="copywritingType === 'add'" class="mater-list-icon" @click="handleDelAlone(item)"><a-icon type="close"/></span>
|
|
|
</p>
|
|
|
</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-right">
|
|
|
<a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
|
|
|
<span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
|
|
|
</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-right">
|
|
|
<a-form :form="examinForm">
|
|
@@ -247,6 +265,63 @@
|
|
|
</a-form>
|
|
|
</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>
|
|
|
</a-modal>
|
|
|
<a-modal
|
|
@@ -333,14 +408,10 @@
|
|
|
import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
|
|
|
|
|
|
import moment from 'moment';
|
|
|
-import {getAction, postFileAction, postAction} from '@/api/manage';
|
|
|
+import {getAction, postFileAction, postAction, deleteAction} from '@/api/manage';
|
|
|
import {mapGetters} from 'vuex';
|
|
|
import {urlAcount} from './copy-library-server.js';
|
|
|
-let COS = require('cos-js-sdk-v5');
|
|
|
-let cos = new COS({
|
|
|
- SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
|
|
|
- SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9'
|
|
|
-});
|
|
|
+
|
|
|
export default {
|
|
|
name: 'copy-library',
|
|
|
components: {
|
|
@@ -349,6 +420,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
moment,
|
|
|
+ copywritingEditList: {},
|
|
|
+ copywritingType: 'add',
|
|
|
projectModelValue: '',
|
|
|
optimizationOption: [], // 账户option
|
|
|
controlTypeModel: '1',
|
|
@@ -356,43 +429,7 @@ export default {
|
|
|
modalSelectMaterial: [],
|
|
|
materTotalAll: 0,
|
|
|
viedoCheckValue: [],
|
|
|
- viedoDefaultList: [
|
|
|
- {
|
|
|
- name: '北京市',
|
|
|
- id: 1,
|
|
|
- statDate: '2019-08-08'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '上海市',
|
|
|
- id: 2,
|
|
|
- statDate: '2019-08-08'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '天津市',
|
|
|
- id: 3,
|
|
|
- statDate: '2019-08-08'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '武汉市',
|
|
|
- id: 4,
|
|
|
- statDate: '2019-08-08'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '贵州市',
|
|
|
- id: 5,
|
|
|
- statDate: '2019-08-08'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '太原市',
|
|
|
- id: 6,
|
|
|
- statDate: '2019-08-08'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '大同市',
|
|
|
- id: 7,
|
|
|
- statDate: '2019-08-08'
|
|
|
- }
|
|
|
- ],
|
|
|
+ viedoDefaultList: [],
|
|
|
visibleMatemal: false,
|
|
|
advertisingAccount: [],
|
|
|
copywrittypeName: 'horizontal',
|
|
@@ -416,7 +453,8 @@ export default {
|
|
|
acountId: '',
|
|
|
num: '',
|
|
|
adConvertId: undefined,
|
|
|
- launchDateRange: []
|
|
|
+ launchDateRange: [],
|
|
|
+ searchStatus: 2
|
|
|
},
|
|
|
currencyPag: {
|
|
|
page: 1,
|
|
@@ -431,6 +469,12 @@ export default {
|
|
|
width: 200,
|
|
|
dataIndex: 'textCopywriter'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '状态',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 150,
|
|
|
+ // dataIndex: 'status'
|
|
|
+ // },
|
|
|
{
|
|
|
title: '相关创意',
|
|
|
align: 'center',
|
|
@@ -508,6 +552,12 @@ export default {
|
|
|
width: 200,
|
|
|
dataIndex: 'slogan'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '状态',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 150,
|
|
|
+ // dataIndex: 'status'
|
|
|
+ // },
|
|
|
{
|
|
|
title: '相关创意',
|
|
|
align: 'center',
|
|
@@ -587,7 +637,7 @@ export default {
|
|
|
masterPag: {
|
|
|
page: 1,
|
|
|
size: 10
|
|
|
- },
|
|
|
+ },
|
|
|
defaultFormList: [],
|
|
|
titleFiledResult: 0,
|
|
|
examinForm: this.$form.createForm(this),
|
|
@@ -623,6 +673,132 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
+ handleGetEditProjectList(data) {
|
|
|
+ const paramsData = {
|
|
|
+ slogan: data.slogan,
|
|
|
+ projectId: data.projectId
|
|
|
+ };
|
|
|
+ getAction(urlAcount + '/bytedance-api/ctop/bytedanceVideoSlogenInfo/queryBySlogenAndProjectId', paramsData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ const defaultData = result.result.materialNameArray;
|
|
|
+ const updateData = [];
|
|
|
+ defaultData.forEach((item, index) => {
|
|
|
+ updateData.push({
|
|
|
+ id: index + 1,
|
|
|
+ materialName: item
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.modalSelectMaterial = [...updateData];
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ that.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleCurrencyEdit(data) {
|
|
|
+ const defaultData = data;
|
|
|
+ defaultData.controlTypeModel = this.controlTypeModel;
|
|
|
+ if (this.controlTypeModel === '1') {
|
|
|
+ this.advertisingAccount[0] = defaultData.accountId;
|
|
|
+ }
|
|
|
+ if (this.controlTypeModel === '2') {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.handleGetEditProjectList(defaultData);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ 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) {
|
|
|
+ let that = this;
|
|
|
+ this.$confirm({
|
|
|
+ content: '确定是否删除该条文案',
|
|
|
+ iconType: 'exclamation-circle',
|
|
|
+ onOk() {
|
|
|
+ deleteAction(urlAcount + '/bytedance-api/advertiser/bytedanceGeneralCopywriter/delete', {id: data.id}).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ that.handleGetCurrencyList();
|
|
|
+ that.$message.success('删除成功');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ that.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleAppointDelete(data) {
|
|
|
+ let that = this;
|
|
|
+ this.$confirm({
|
|
|
+ content: '确定是否删除该条文案',
|
|
|
+ iconType: 'exclamation-circle',
|
|
|
+ onOk() {
|
|
|
+ deleteAction(urlAcount + '/bytedance-api/ctop/bytedanceVideoSlogenInfo/deleteBySlogenAndProjectId', {
|
|
|
+ slogan: data.slogan,
|
|
|
+ projectId: data.projectId
|
|
|
+ }).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ that.handleGetAppointList();
|
|
|
+ that.$message.success('删除成功');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ that.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
disabledDate(current) {
|
|
|
return current > moment().subtract(1, 'day');
|
|
|
},
|
|
@@ -684,8 +860,17 @@ export default {
|
|
|
acountId: '',
|
|
|
num: '',
|
|
|
adConvertId: undefined,
|
|
|
- launchDateRange: []
|
|
|
+ launchDateRange: [],
|
|
|
+ searchStatus: 2
|
|
|
};
|
|
|
+ if (this.currencyColumns[this.currencyColumns.length - 1].title === '操作') {
|
|
|
+ this.currencyColumns.pop();
|
|
|
+ this.currencyColumns.splice(1, 1);
|
|
|
+ }
|
|
|
+ if (this.appointColumns[this.appointColumns.length - 1].title === '操作') {
|
|
|
+ this.appointColumns.pop();
|
|
|
+ this.appointColumns.splice(1, 1);
|
|
|
+ }
|
|
|
if (e === '1') {
|
|
|
this.handleGetCurrencyList();
|
|
|
}
|
|
@@ -700,12 +885,16 @@ export default {
|
|
|
userId: this.userInfo().id,
|
|
|
startTime: this.configForm.launchDateRange[0],
|
|
|
endTime: this.configForm.launchDateRange[0],
|
|
|
+ status: this.configForm.searchStatus === 2 ? '' : this.configForm.searchStatus,
|
|
|
pageNo: this.currencyPag.page,
|
|
|
pageSize: this.currencyPag.size
|
|
|
};
|
|
|
getAction(urlAcount + '/bytedance-api/advertiser/bytedanceGeneralCopywriter/queryPageListByText', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
- this.currencyData = result.result.list;
|
|
|
+ this.currencyData = result.result.list ? result.result.list.map(item => {
|
|
|
+ item.status = item.status === 0 ? '已删除' : '可投放';
|
|
|
+ return item;
|
|
|
+ }) : [];
|
|
|
this.currencyTotalAll = result.result.total || 0;
|
|
|
}
|
|
|
else {
|
|
@@ -724,12 +913,16 @@ export default {
|
|
|
keyWord: this.configForm.num,
|
|
|
startTime: this.configForm.launchDateRange[0],
|
|
|
endTime: this.configForm.launchDateRange[0],
|
|
|
+ status: this.configForm.searchStatus === 2 ? '' : this.configForm.searchStatus,
|
|
|
pageNo: this.appointPag.page,
|
|
|
pageSize: this.appointPag.size
|
|
|
};
|
|
|
getAction(urlAcount + '/bytedance-api/ctop/bytedanceVideoSlogenInfo/queryPageListByText', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
- this.appointData = result.result.list;
|
|
|
+ this.appointData = result.result.list ? result.result.list.map(item => {
|
|
|
+ item.status = item.status === 0 ? '已删除' : '可投放';
|
|
|
+ return item;
|
|
|
+ }) : [];
|
|
|
this.appointTotalAll = result.result.total || 0;
|
|
|
}
|
|
|
else {
|
|
@@ -1053,7 +1246,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- handleUploadWxecl() {
|
|
|
+ handleUploadWxeclAdd() {
|
|
|
if (!this.advertisingAccount.length) {
|
|
|
this.$message.error('请选择账户');
|
|
|
return;
|
|
@@ -1107,10 +1300,10 @@ export default {
|
|
|
postAction(urlAcount + '/bytedance-api/ctop/bytedanceVideoSlogenInfo/addList', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
this.$message.success(result.message);
|
|
|
- this.controlTypeModel = '1';
|
|
|
+ this.controlTypeModel = '2';
|
|
|
this.modalSelectMaterial = [];
|
|
|
this.handleCauseCancel();
|
|
|
- this.handleGetCurrencyList();
|
|
|
+ this.handleGetAppointList();
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error(result.message);
|
|
@@ -1121,12 +1314,71 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ handleUploadWxeclEdit() {
|
|
|
+ if (!this.defaultFormList[0].value) {
|
|
|
+ this.$message.error('文案标题不能为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const paramsData = {
|
|
|
+ id: this.copywritingEditList.id,
|
|
|
+ textCopywriter: this.defaultFormList[0].value
|
|
|
+ };
|
|
|
+ postAction(urlAcount + '/bytedance-api/advertiser/bytedanceGeneralCopywriter/edit', paramsData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ this.$message.success(result.message);
|
|
|
+ this.causeVisible = false;
|
|
|
+ this.controlTypeModel = '1';
|
|
|
+ this.handleCauseCancel();
|
|
|
+ this.handleGetCurrencyList();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.success(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleVerticalEdit() {
|
|
|
+ if (!this.defaultFormList[0].value) {
|
|
|
+ this.$message.error('文案标题不能为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const paramsData = {
|
|
|
+ slogan: this.copywritingEditList.slogan,
|
|
|
+ projectId: this.copywritingEditList.projectId,
|
|
|
+ newSlogan: this.defaultFormList[0].value
|
|
|
+ };
|
|
|
+ postAction(urlAcount + '/bytedance-api/ctop/bytedanceVideoSlogenInfo/edit', paramsData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ this.$message.success(result.message);
|
|
|
+ this.causeVisible = false;
|
|
|
+ this.controlTypeModel = '2';
|
|
|
+ this.handleCauseCancel();
|
|
|
+ this.handleGetAppointList();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.success(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
+ },
|
|
|
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() {
|
|
@@ -1136,6 +1388,7 @@ export default {
|
|
|
this.causeVisible = false;
|
|
|
this.defaultFormList = [];
|
|
|
this.modalSelectMaterial = [];
|
|
|
+ this.copywritingType = '';
|
|
|
},
|
|
|
handleGetCreativeWord() {
|
|
|
getAction('/ctop/ByteDanceCreativeWordPackage/list').then(result => {
|
|
@@ -1167,6 +1420,8 @@ export default {
|
|
|
},
|
|
|
handleAddAccountConfig() {
|
|
|
this.causeVisible = true;
|
|
|
+ this.copywritingType = 'add';
|
|
|
+ this.copywritingEditList = {};
|
|
|
},
|
|
|
handleLaunchData(date, dateString) {
|
|
|
this.configForm.launchDateRange = dateString;
|
|
@@ -1178,6 +1433,42 @@ export default {
|
|
|
};
|
|
|
this.currencyPag = page;
|
|
|
this.appointPag = page;
|
|
|
+ if (this.configForm.acountId) {
|
|
|
+ if (this.currencyColumns[this.currencyColumns.length - 1].title !== '操作') {
|
|
|
+ this.currencyColumns.splice(1, 0, {
|
|
|
+ title: '状态',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ dataIndex: 'status'
|
|
|
+ });
|
|
|
+ this.currencyColumns.push({
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'currencyAction',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ fixed: 'right',
|
|
|
+ scopedSlots: {customRender: 'currencyAction'}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.configForm.adConvertId) {
|
|
|
+ if (this.appointColumns[this.appointColumns.length - 1].title !== '操作') {
|
|
|
+ this.appointColumns.splice(1, 0, {
|
|
|
+ title: '状态',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ dataIndex: 'status'
|
|
|
+ });
|
|
|
+ this.appointColumns.push({
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'appointAction',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ fixed: 'right',
|
|
|
+ scopedSlots: {customRender: 'appointAction'}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.controlTypeModel === '1') {
|
|
|
this.handleGetCurrencyList();
|
|
|
}
|
|
@@ -1190,7 +1481,8 @@ export default {
|
|
|
acountId: '',
|
|
|
num: '',
|
|
|
adConvertId: undefined,
|
|
|
- launchDateRange: []
|
|
|
+ launchDateRange: [],
|
|
|
+ searchStatus: 2
|
|
|
};
|
|
|
const page = {
|
|
|
page: 1,
|
|
@@ -1198,6 +1490,14 @@ export default {
|
|
|
};
|
|
|
this.currencyPag = page;
|
|
|
this.appointPag = page;
|
|
|
+ if (this.currencyColumns[this.currencyColumns.length - 1].title === '操作') {
|
|
|
+ this.currencyColumns.pop();
|
|
|
+ this.currencyColumns.splice(1, 1);
|
|
|
+ }
|
|
|
+ if (this.appointColumns[this.appointColumns.length - 1].title === '操作') {
|
|
|
+ this.appointColumns.pop();
|
|
|
+ this.appointColumns.splice(1, 1);
|
|
|
+ }
|
|
|
if (this.controlTypeModel === '1') {
|
|
|
this.handleGetCurrencyList();
|
|
|
}
|