소스 검색

修改内容

zhuxinbo 5 년 전
부모
커밋
3598d5ac31

+ 2 - 1
src/views/modules/kuaishouapp/account/originality.vue

@@ -162,7 +162,8 @@ export default {
         42: '审核未通过',
         46: '已暂停',
         52: '投放中',
-        53: '作品异常'
+        53: '作品异常',
+        54: '视频审核通过'
       }
       return data[sta]
     },

+ 6 - 3
src/views/modules/kuaishouapp/account/stepForm/Step1.vue

@@ -114,7 +114,7 @@
       </a-form-item> -->
 
       <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
-        <a-button htmlType="submit" type="primary">下一步</a-button>
+        <a-button htmlType="submit" type="primary" :loading="loading">下一步</a-button>
         <!-- <a-button style="margin-left: 8px">保存</a-button> -->
       </a-form-item>
     </a-form>
@@ -146,7 +146,7 @@ export default {
       showUrlType: false,
       channelType: '1',
       showChannelType: false,
-
+      loading: false,
       form: this.$form.createForm(this),
       url: {
         dictListUrl: 'toutiao/dictitem/list',
@@ -177,6 +177,7 @@ export default {
       e.preventDefault()
       this.form.validateFields((err, values) => {
         if (!err) {
+          this.loading = true
           console.log('Received values of form: ', values)
           let params = {}
           params.type = this.type
@@ -190,10 +191,12 @@ export default {
             console.log(res)
             if (res.success) {
               this.$message.success('创建成功')
-              localStorage.setItem("campaignId",res.result)
+              localStorage.setItem('campaignId', res.result)
+              this.loading = false
               this.nextStep(res.result)
             } else {
               this.$message.error(res.message)
+              this.loading = false
             }
           })
         }

+ 26 - 7
src/views/modules/kuaishouapp/account/stepForm/Step2.vue

@@ -132,6 +132,7 @@
               :dataSource="data"
               bordered
               :pagination="false"
+              :scroll="{ y: 300 }"
               :rowSelection="{
                 selectedRowKeys: selectedRowKeys,
                 onChange: onSelectChange,
@@ -171,6 +172,7 @@
               :dataSource="data"
               bordered
               :pagination="false"
+              :scroll="{ y: 300 }"
               :rowSelection="{
                 selectedRowKeys: selectedRowKeysNo,
                 onChange: onSelectChangeNo,
@@ -191,7 +193,11 @@
       <div style="text-align:center;font-size:16px">
         目标人群
       </div>
-      <targeted-population ref="population" :populationData.sync="populationData" />
+      <targeted-population
+        ref="population"
+        :populationData.sync="populationData"
+        :platform="getPlatForm(getData('appId'))"
+      />
       <div style="text-align:center;font-size:16px">
         预算和排期
       </div>
@@ -487,7 +493,8 @@ const columns = [
   {
     title: '人群',
     dataIndex: 'orientation_name',
-    scopedSlots: { customRender: 'orientation_name' }
+    scopedSlots: { customRender: 'orientation_name' },
+    width: 150
   },
   {
     title: '属性',
@@ -516,7 +523,8 @@ const columns = [
         .toString()
         .toLowerCase()
         .includes(value.toLowerCase()),
-    scopedSlots: { customRender: 'population_type' }
+    scopedSlots: { customRender: 'population_type' },
+    width: 150
   },
   {
     title: '创建时间',
@@ -831,7 +839,7 @@ export default {
       this.form.validateFields((err, values) => {
         if (!err) {
           console.log(this.populationData)
-
+          this.loading = SVGComponentTransferFunctionElement
           var groupArr = this.allForm.group.map(item => {
             return {
               ...item,
@@ -870,7 +878,9 @@ export default {
             accountId: localStorage.getItem('accountId'),
             campaignId: localStorage.getItem('campaignId'),
             unit_type: 4,
-            begin_time: moment(this.timeRange[0]).format('YYYY-MM-DD')
+            begin_time: moment(this.timeRange[0]).format('YYYY-MM-DD'),
+            end_time: this.allForm.time == '2' ? moment(this.timeRange[1]).format('YYYY-MM-DD') : '',
+            schedule_time: this.allForm.scheduleTimeData
           }
 
           postAction('/kuaishou/batch/createUnit', params).then(res => {
@@ -878,7 +888,7 @@ export default {
               this.visible = true
               this.allForm.fail = res.result.fail
               this.allForm.success = res.result.success
-
+              this.loading = false
               if (res.result.success.length > 0) {
                 var dataJson = JSON.stringify(
                   res.result.success.map(item => {
@@ -887,6 +897,8 @@ export default {
                 )
                 localStorage.setItem('pans', dataJson)
               }
+            } else {
+              this.loading = false
             }
           })
         }
@@ -896,9 +908,16 @@ export default {
       console.log(value)
     },
     handleChange(value) {
-      console.log(`selected ${value}`)
       //   this.$refs.population.getAppList(value)
     },
+    getPlatForm(appId) {
+      if (appId) {
+        var data = this.appList.filter(item => {
+          return item.appId == appId
+        })
+        return data[0].platform
+      }
+    },
     handleBlur() {
       console.log('blur')
     },

+ 25 - 4
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -121,7 +121,7 @@
       </a-tab-pane>
     </a-tabs>
     <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
-      <a-button type="primary" @click="handleSubmit">提交</a-button>
+      <a-button type="primary" @click="handleSubmit" :loading="loading">提交</a-button>
     </a-form-item>
     <checkMatemal ref="check" @showVideo="showData"></checkMatemal>
     <a-modal v-model="visible" title="广告创意创建情况">
@@ -177,7 +177,8 @@ export default {
       list: [],
       vertical: 'vertical',
       appList: [],
-      visible: false
+      visible: false,
+      loading: false
     }
   },
   methods: {
@@ -264,8 +265,17 @@ export default {
       //   this.nextStep()
       e.preventDefault()
       var index = this.pans.findIndex(item => item.key === this.pansKey)
+      var data = this.pans[index].list.map(item => {
+        return item.imageList.length
+      })
+      console.log(eval(data.join('+')), data)
+      if (eval(data.join('+')) > 15) {
+        this.$message.error('封面最多15张')
+        return
+      }
       this.form.validateFields((err, values) => {
         if (!err) {
+          this.loading = true
           var dataJson = this.pans[index].list.map(item => {
             return {
               description: item.description,
@@ -275,7 +285,6 @@ export default {
               photo_id: item.videoList.photoId
             }
           })
-
           var params = { dataJson, ...values, unitId: this.pansKey, accountId: localStorage.getItem('accountId') }
           console.log(params)
           postAction('/kuaishou/batch/createCreative', params).then(res => {
@@ -284,6 +293,9 @@ export default {
               this.visible = true
               this.allForm.fail = res.result.fail
               this.allForm.success = res.result.success
+              this.loading = false
+            } else {
+              this.loading = false
             }
           })
         }
@@ -302,7 +314,16 @@ export default {
       this.pans[index].list.push({
         videoList: '',
         imageList: [],
-        name: '',
+        name:
+          this.getData('creative_material_type') == '1'
+            ? '自定义创意_竖版视频_' +
+              Math.random()
+                .toString(36)
+                .substr(2, 4)
+            : '自定义创意_横版视频_' +
+              Math.random()
+                .toString(36)
+                .substr(2, 4),
         description: '',
         creative_material_type: '1',
         action_bar_text: ''

+ 7 - 1
src/views/modules/kuaishouapp/account/stepForm/stepModule/checkMatemal.vue

@@ -169,7 +169,13 @@ export default {
         }
       } else {
         //内容
-        this.joinVideo.image = checkedList
+        if (this.checkArr.length > 15) {
+          this.$message.error('封面最多选择15张')
+          this.checkArr.pop()
+          this.joinVideo.image = this.checkArr
+        } else {
+          this.joinVideo.image = checkedList
+        }
       }
     }
   }

+ 18 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -524,6 +524,24 @@ export default {
       default() {
         return null
       }
+    },
+    platform: {
+      default() {
+        return null
+      }
+    }
+  },
+  watch: {
+    platform(n, o) {
+      console.log(n, o)
+      if (n == 1 || n == 2) {
+        // platform_os
+        this.form.setFieldsValue({ platform_os: '1' })
+      } else if (n == 3 || n == 4) {
+        this.form.setFieldsValue({ platform_os: '2' })
+      } else {
+        this.form.setFieldsValue({ platform_os: '0' })
+      }
     }
   },
   directives: { clickoutside },

+ 6 - 3
src/views/modules/material/videoMaterial.vue

@@ -1293,7 +1293,8 @@ export default {
               item.roleCode == 'clip' ||
               item.roleCode == 'plan' ||
               item.roleCode == 'designTeamLeader' ||
-              item.roleCode == 'shot'
+              item.roleCode == 'shot' ||
+              item.roleCode == 'plane'
             ) {
               return { userId: item.userId, userName: item.userName }
             }
@@ -1303,7 +1304,8 @@ export default {
               item.roleCode == 'clip' ||
               item.roleCode == 'shot' ||
               item.roleCode == 'plan' ||
-              item.roleCode == 'designTeamLeader'
+              item.roleCode == 'designTeamLeader' ||
+              item.roleCode == 'plane'
             ) {
               return { userId: item.userId, userName: item.userName }
             }
@@ -1313,7 +1315,8 @@ export default {
               item.roleCode == 'shot' ||
               item.roleCode == 'plan' ||
               item.roleCode == 'designTeamLeader' ||
-              item.roleCode == 'clip'
+              item.roleCode == 'clip' ||
+              item.roleCode == 'plane'
             ) {
               return { userId: item.userId, userName: item.userName }
             }

+ 2 - 2
vue.config.js

@@ -65,8 +65,8 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.133:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.174:8080', //请求本地 需要jeecg-boot后台项目  祚云