|
@@ -16,7 +16,7 @@
|
|
|
@change="handleChange"
|
|
|
:filterOption="filterOption"
|
|
|
>
|
|
|
- <a-select-option v-for="campaign in campaignList" :key="campaign.id" :value="campaign.id">{{campaign.campaignName}}</a-select-option>
|
|
|
+ <a-select-option v-for="campaign in campaignList" :key="campaign.id" :value="campaign.id">{{campaign.name}}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
|
|
@@ -44,7 +44,8 @@
|
|
|
@change="handleChange"
|
|
|
:filterOption="filterOption"
|
|
|
>
|
|
|
- <a-select-option v-for="userorentation in userorentationList" :key="userorentation.id" :value="userorentation.id">{{userorentation.name}}</a-select-option>
|
|
|
+ <a-select-option value="1">默认</a-select-option>
|
|
|
+ <!--<a-select-option v-for="userorentation in userorentationList" :key="userorentation.id" :value="userorentation.id">{{userorentation.name}}</a-select-option>-->
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
|
|
@@ -86,81 +87,14 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
|
|
|
-
|
|
|
- <a-form-item
|
|
|
- label="创意方式"
|
|
|
- :labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-radio-group v-model="creativeType">
|
|
|
- <a-radio-button value="customize">自定义创意</a-radio-button>
|
|
|
- <a-radio-button value="program">程序化创意</a-radio-button>
|
|
|
- </a-radio-group>
|
|
|
- </a-form-item>
|
|
|
- <a-form-item
|
|
|
- label="上传视频"
|
|
|
- :labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-upload
|
|
|
- name="multipartFile"
|
|
|
- :multiple="true"
|
|
|
- action="/jeecg-boot/upload/video?type=bytedance"
|
|
|
- :headers="headers"
|
|
|
- @change="videoChange">
|
|
|
- <a-button><a-icon type="upload" /> 点击上传</a-button>
|
|
|
- </a-upload>
|
|
|
- </a-form-item>
|
|
|
-
|
|
|
<a-form-item
|
|
|
- label="上传封面"
|
|
|
+ label="模板名称"
|
|
|
:labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-upload
|
|
|
- name="multipartFile"
|
|
|
- listType="picture-card"
|
|
|
- class="avatar-uploader"
|
|
|
- :showUploadList="false"
|
|
|
- action="/jeecg-boot/upload/image?type=bytedance"
|
|
|
- :beforeUpload="beforeUpload"
|
|
|
- @change="imageChange"
|
|
|
- >
|
|
|
- <img v-if="imageUrl" :src="imageUrl" alt="上传封面" />
|
|
|
- <div v-else>
|
|
|
- <a-icon :type="loading ? 'loading' : 'plus'" />
|
|
|
- <div class="上传封面">Upload</div>
|
|
|
- </div>
|
|
|
- </a-upload>
|
|
|
+ :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
|
|
|
+ <a-input v-model="templateName"></a-input>
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item
|
|
|
- label="创意分类"
|
|
|
- :labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-input v-model="creativeText"></a-input>
|
|
|
- </a-form-item>
|
|
|
-
|
|
|
- <a-form-item
|
|
|
- label="创意标签"
|
|
|
- :labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-input v-model="creativeText"></a-input>
|
|
|
- </a-form-item>
|
|
|
-
|
|
|
- <a-form-item
|
|
|
- label="创意文案"
|
|
|
- :labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-input v-model="creativeText"></a-input>
|
|
|
- </a-form-item>
|
|
|
- <a-form-item
|
|
|
- label="迭代数量"
|
|
|
- :labelCol="{lg: {span: 7}, sm: {span: 7}}"
|
|
|
- :wrapperCol="{lg: {span: 15}, sm: {span: 17} }">
|
|
|
- <a-input-number :min="0" :max="10" v-model="iteratorNum" @change="onChange"/>
|
|
|
- </a-form-item>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <a-form-item
|
|
|
:wrapperCol="{ span: 24 }"
|
|
|
style="text-align: center"
|
|
|
>
|
|
@@ -188,17 +122,12 @@
|
|
|
headers: {
|
|
|
authorization: 'authorization-text',
|
|
|
},
|
|
|
- videoId:0,
|
|
|
- imageId:0,
|
|
|
+ templateName:'',
|
|
|
loading: false,
|
|
|
- imageUrl: '',
|
|
|
- iteratorNum:1,
|
|
|
campaignList: {},
|
|
|
deliverytargetList:{},
|
|
|
userorentationList:{},
|
|
|
budgetList:{},
|
|
|
- creativeType:'customize',
|
|
|
- creativeText:'',
|
|
|
deliveryRange:'default',
|
|
|
campaignId:null,
|
|
|
deliverytargetId:null,
|
|
@@ -207,7 +136,7 @@
|
|
|
form: this.$form.createForm(this),
|
|
|
url: {
|
|
|
dictListUrl: 'toutiao/dictitem/list',
|
|
|
- campaignTemplateListUrl:'/template/campaign/list',
|
|
|
+ campaignListUrl:'/template/campaign/data/list',
|
|
|
budgetTemplateListUrl:'/template/budget/list',
|
|
|
deliverytargetTemplateListUrl:'/template/deliverytarget/list',
|
|
|
userorentationTemplateListUrl:'/template/userorentation/list',
|
|
@@ -217,45 +146,6 @@
|
|
|
},
|
|
|
methods: {
|
|
|
moment,
|
|
|
- videoChange(info) {
|
|
|
- if (info.file.status !== 'uploading') {
|
|
|
- console.log(info.file, info.fileList);
|
|
|
- }
|
|
|
- if (info.file.status === 'done') {
|
|
|
- let response = info.file.response;
|
|
|
- this.$message.success(`${info.file.name} 文件上传成功`);
|
|
|
- videoId = response.fileInfo.id;
|
|
|
- } else if (info.file.status === 'error') {
|
|
|
- this.$message.error(`${info.file.name} file upload failed.`);
|
|
|
- }
|
|
|
- },
|
|
|
- imageChange (info) {
|
|
|
- if (info.file.status === 'uploading') {
|
|
|
- this.loading = true
|
|
|
- return
|
|
|
- }
|
|
|
- if (info.file.status === 'done') {
|
|
|
- console.log(info);
|
|
|
- let response = info.file.response;
|
|
|
- if(response.success){
|
|
|
- this.$message.success(`${info.file.name} 文件上传成功`);
|
|
|
- this.imageUrl = response.fileInfo.fileUrl;
|
|
|
- videoId = response.fileInfo.id;
|
|
|
- }
|
|
|
- // Get this url from response in real world.
|
|
|
- // getBase64(info.file.originFileObj, (imageUrl) => {
|
|
|
- // this.imageUrl = imageUrl
|
|
|
- // this.loading = false
|
|
|
- // })
|
|
|
- }
|
|
|
- },
|
|
|
- beforeUpload (file) {
|
|
|
- const isJPG = file.type === 'image/jpeg'
|
|
|
- if (!isJPG) {
|
|
|
- this.$message.error('请上传图片文件!')
|
|
|
- }
|
|
|
- return isJPG;
|
|
|
- },
|
|
|
handleChange (value) {
|
|
|
console.log(`selected ${value}`);
|
|
|
},
|
|
@@ -280,10 +170,7 @@
|
|
|
params.userOrentationTemplateId = this.userorentationId;
|
|
|
params.budgetTemplateId = this.budgetId;
|
|
|
params.deliveryTargetTemplateId = this.deliverytargetId;
|
|
|
- params.videoId = this.videoId;
|
|
|
- params.imageId = this.imageId;
|
|
|
- params.creativeText = this.creativeText;
|
|
|
- params.iteratorNum = this.iteratorNum;
|
|
|
+ params.name = this.templateName;
|
|
|
|
|
|
console.log(params)
|
|
|
postAction(this.url.insertUrl,params).then((res)=>{
|
|
@@ -303,7 +190,7 @@
|
|
|
created: function () {
|
|
|
let params = {};
|
|
|
params.pageSize = '1000';
|
|
|
- postAction(this.url.campaignTemplateListUrl, params).then((res) => {
|
|
|
+ postAction(this.url.campaignListUrl, params).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.campaignList = res.result.records
|
|
|
}
|