浏览代码

修改页面模板

syh 5 年之前
父节点
当前提交
271ec66ee0

+ 10 - 123
src/views/template/advertiseplan/create.vue

@@ -16,7 +16,7 @@
           @change="handleChange"
           @change="handleChange"
           :filterOption="filterOption"
           :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-select>
       </a-form-item>
       </a-form-item>
 
 
@@ -44,7 +44,8 @@
           @change="handleChange"
           @change="handleChange"
           :filterOption="filterOption"
           :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-select>
       </a-form-item>
       </a-form-item>
 
 
@@ -86,81 +87,14 @@
         </a-select>
         </a-select>
       </a-form-item>
       </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
       <a-form-item
-        label="上传封面"
+        label="模板名称"
         :labelCol="{lg: {span: 7}, sm: {span: 7}}"
         :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>
 
 
       <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 }"
         :wrapperCol="{ span: 24 }"
         style="text-align: center"
         style="text-align: center"
       >
       >
@@ -188,17 +122,12 @@
         headers: {
         headers: {
           authorization: 'authorization-text',
           authorization: 'authorization-text',
         },
         },
-        videoId:0,
-        imageId:0,
+        templateName:'',
         loading: false,
         loading: false,
-        imageUrl: '',
-        iteratorNum:1,
         campaignList: {},
         campaignList: {},
         deliverytargetList:{},
         deliverytargetList:{},
         userorentationList:{},
         userorentationList:{},
         budgetList:{},
         budgetList:{},
-        creativeType:'customize',
-        creativeText:'',
         deliveryRange:'default',
         deliveryRange:'default',
         campaignId:null,
         campaignId:null,
         deliverytargetId:null,
         deliverytargetId:null,
@@ -207,7 +136,7 @@
         form: this.$form.createForm(this),
         form: this.$form.createForm(this),
         url: {
         url: {
           dictListUrl: 'toutiao/dictitem/list',
           dictListUrl: 'toutiao/dictitem/list',
-          campaignTemplateListUrl:'/template/campaign/list',
+          campaignListUrl:'/template/campaign/data/list',
           budgetTemplateListUrl:'/template/budget/list',
           budgetTemplateListUrl:'/template/budget/list',
           deliverytargetTemplateListUrl:'/template/deliverytarget/list',
           deliverytargetTemplateListUrl:'/template/deliverytarget/list',
           userorentationTemplateListUrl:'/template/userorentation/list',
           userorentationTemplateListUrl:'/template/userorentation/list',
@@ -217,45 +146,6 @@
     },
     },
     methods: {
     methods: {
       moment,
       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) {
       handleChange (value) {
         console.log(`selected ${value}`);
         console.log(`selected ${value}`);
       },
       },
@@ -280,10 +170,7 @@
             params.userOrentationTemplateId = this.userorentationId;
             params.userOrentationTemplateId = this.userorentationId;
             params.budgetTemplateId = this.budgetId;
             params.budgetTemplateId = this.budgetId;
             params.deliveryTargetTemplateId = this.deliverytargetId;
             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)
             console.log(params)
             postAction(this.url.insertUrl,params).then((res)=>{
             postAction(this.url.insertUrl,params).then((res)=>{
@@ -303,7 +190,7 @@
     created: function () {
     created: function () {
       let params = {};
       let params = {};
       params.pageSize = '1000';
       params.pageSize = '1000';
-      postAction(this.url.campaignTemplateListUrl, params).then((res) => {
+      postAction(this.url.campaignListUrl, params).then((res) => {
         if (res.success) {
         if (res.success) {
           this.campaignList = res.result.records
           this.campaignList = res.result.records
         }
         }

+ 10 - 1
src/views/template/budget/create.vue

@@ -114,6 +114,13 @@
       </a-form-item>
       </a-form-item>
 
 
       <a-form-item
       <a-form-item
+        label="模板名称"
+        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+        <a-input v-model="templateName"></a-input>
+      </a-form-item>
+
+      <a-form-item
         :wrapperCol="{ span: 24 }"
         :wrapperCol="{ span: 24 }"
         style="text-align: center"
         style="text-align: center"
       >
       >
@@ -133,6 +140,7 @@
     name: 'BaseForm',
     name: 'BaseForm',
     data() {
     data() {
       return {
       return {
+        templateName:'',
         startDate:moment(new Date(), "YYYY-MM-dd"),
         startDate:moment(new Date(), "YYYY-MM-dd"),
         endDate:moment(new Date(), "YYYY-MM-dd"),
         endDate:moment(new Date(), "YYYY-MM-dd"),
         convertPrice: 0,
         convertPrice: 0,
@@ -155,7 +163,7 @@
         form: this.$form.createForm(this),
         form: this.$form.createForm(this),
         url: {
         url: {
           dictListUrl: 'toutiao/dictitem/list',
           dictListUrl: 'toutiao/dictitem/list',
-          insertUrl:'toutiao/budget/template/insert'
+          insertUrl:'template/budget/insert'
         }
         }
       }
       }
     },
     },
@@ -184,6 +192,7 @@
             params.convertPrice = this.convertPrice;
             params.convertPrice = this.convertPrice;
             params.filterType = this.filterType;
             params.filterType = this.filterType;
             params.dateQuantumRange = this.dateQuantumRange;
             params.dateQuantumRange = this.dateQuantumRange;
+            params.name = this.templateName;
             console.log(params)
             console.log(params)
             postAction(this.url.insertUrl,params).then((res)=>{
             postAction(this.url.insertUrl,params).then((res)=>{
               console.log(res)
               console.log(res)

+ 1 - 1
src/views/template/campaign/create.vue

@@ -58,7 +58,7 @@
         promotionPurposeList: {},
         promotionPurposeList: {},
         showBudgetDaily:false,
         showBudgetDaily:false,
         campaignName:'APP_'+moment(new Date()),
         campaignName:'APP_'+moment(new Date()),
-        campaignBudget:'UNLIMITED',
+        campaignBudget:'BUDGET_MODE_INFINITE',
         budgetDaily:0,
         budgetDaily:0,
         form: this.$form.createForm(this),
         form: this.$form.createForm(this),
         url: {
         url: {

+ 2 - 0
src/views/template/deliverytarget/create.vue

@@ -108,6 +108,7 @@
     name: 'BaseForm',
     name: 'BaseForm',
     data() {
     data() {
       return {
       return {
+        templateName:'',
         deliveryTarget:'a',
         deliveryTarget:'a',
         packageName:'',
         packageName:'',
         downloadType:'DOWNLOAD_URL',
         downloadType:'DOWNLOAD_URL',
@@ -149,6 +150,7 @@
             params.openUrlStatus = this.openUrlStatus;
             params.openUrlStatus = this.openUrlStatus;
             params.openUrlCreateMode = this.openUrlCreateMode;
             params.openUrlCreateMode = this.openUrlCreateMode;
             params.redirectUrl = this.redirectUrl;
             params.redirectUrl = this.redirectUrl;
+            params.name = this.templateName;
             console.log(params)
             console.log(params)
             postAction(this.url.insertUrl,params).then((res)=>{
             postAction(this.url.insertUrl,params).then((res)=>{
               console.log(res)
               console.log(res)

+ 8 - 0
src/views/template/userorientation/create.vue

@@ -279,6 +279,13 @@
         </a-select>
         </a-select>
       </a-form-item>
       </a-form-item>
 
 
+      <a-form-item
+        label="模板名称"
+        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+        <a-input v-model="templateName"></a-input>
+      </a-form-item>
+
 
 
       <a-form-item
       <a-form-item
         :wrapperCol="{ span: 24 }"
         :wrapperCol="{ span: 24 }"
@@ -299,6 +306,7 @@
       return {
       return {
         form: this.$form.createForm(this),
         form: this.$form.createForm(this),
         gender: {},
         gender: {},
+        templateName:'',
         toutiaoSex: {},
         toutiaoSex: {},
         ageRange: [],
         ageRange: [],
         toutiaoAgeRange: {},
         toutiaoAgeRange: {},