浏览代码

批量修改

zhuxinbo 5 年之前
父节点
当前提交
bb6942ede0

+ 1 - 1
src/views/errorPage.vue

@@ -39,7 +39,7 @@
     },
     methods: {
       handleToHome() {
-         this.$router.push({name: 'login'})
+         this.$router.replace({name: 'login'})
       }
     },
     mounted() {

文件差异内容过多而无法显示
+ 509 - 483
src/views/modules/kuaishouapp/account/accountIndex.vue


+ 97 - 87
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -73,7 +73,7 @@
               :pagination="ipagination" :scroll="{ x: 2500 }" :rowSelection="{
                 selectedRowKeys: selectedRowKeys,
                 onChange: onSelectChange
-              }" style="margin-top:30px">
+              }" style="margin-top:30px" :loading="loadingList">
               <!-- getCheckboxProps: getCheckboxProps -->
               <a slot="unitName" slot-scope="text, record" @click="toDetail(record)">{{ text }}</a>
               <span slot="action" slot-scope="text, record">
@@ -129,6 +129,7 @@
       </a-card>
     </a-row>
     <editGroup ref="editGroup" @getList="getDataList" />
+    <editGroupNew ref="editGroupNew" @getList="getDataList" />
     <a-modal title="批量修改" v-model="visibleEditAll" :width="900">
       <editAllGroup :populationData.sync="populationData" ref="population" />
       <template slot="footer">
@@ -212,6 +213,13 @@
           v-if="getData('createCount')>1&&getData('createType')=='2'">
           <a-input v-for="(item,key) in unitNameList" :key="key" v-model="item.unitName" />
         </a-form-item>
+        <a-form-item label="是否修改" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }" v-if="getData('createCount')>1">
+          <a-radio-group buttonStyle="solid" v-model="editOk">
+            <a-radio-button value="1">否</a-radio-button>
+            <a-radio-button value="2">是</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
       </a-form>
       <template slot="footer">
         <a-button key="submit" type="primary" @click="handleSubmitCopy" :loading='loading'>
@@ -238,6 +246,7 @@
   } from 'vuex'
 
   import editGroup from './editGroup'
+  import editGroupNew from './editGroupNew'
   import editAllGroup from './editAllGroup'
 
   var columns = [{
@@ -482,11 +491,14 @@
       ARow,
       countTo,
       editGroup,
-      editAllGroup
+      editAllGroup,
+      editGroupNew
     },
 
     data: function () {
       return {
+        editOk: '1',
+        loadingList: false,
         visible: false,
         visibleData: null,
         visibleEditAll: false,
@@ -1014,6 +1026,7 @@
         this.getDataList(key)
       },
       getDataList(id) {
+        this.loadingList = true
         this.dataList = []
         var params = {}
         params.campaignId = id
@@ -1022,6 +1035,7 @@
         params.pageSize = this.ipagination.pageSize
         getAction('/kuaishou/batch/getUnitList', params).then(res => {
           if (res.success) {
+            this.loadingList = false
             this.dataList = res.result.records.map((v, index) => {
               return {
                 ...v,
@@ -1034,6 +1048,9 @@
               }
             })
             this.ipagination.total = res.result.total
+          } else {
+            this.loadingList = false
+            this.$message.error(res.message)
           }
         })
       },
@@ -1088,99 +1105,92 @@
 
           // postAction('/kuaishou/batch/copyUnit', params).then(res => {})
         } else if (this.getData('createCount') > 1) {
-          this.loading = true
-          //  v-if="getData('createCount')>1&&getData('createType')=='2'">
-          //           <a-input v-for="(item,key) in unitNameList"
-
-          if (this.getData('createType') == '1') {
-            var params = {
-              // ...this.copyData,
-              // groupArr: groupArr,
-              type: 'copy',
-              unitId: this.copyData.unitId,
-              copyToCampaignId: this.getData('campaignId'),
-              createCount: this.getData('createCount'),
-              createType: this.getData('createType'),
-              accountId: this.copyData.accountId
-            }
-            postAction('/kuaishou/batch/copyUnit', params).then(res => {
-              if (res.success) {
-                //   visibleData
-                if (res.result.failCount > 0) {
-                  this.visible = true
-                  this.visibleData = res.result
-                } else {
-                  this.$message.success('批量复制成功')
-                  this.allMoneyBidProportion = 1.2
-                  this.selectedRowKeysValue = []
-                  this.selectedRowKeys = []
+          if (this.editOk == '1') {
+            this.loading = true
+            if (this.getData('createType') == '1') {
+              var params = {
+                // ...this.copyData,
+                // groupArr: groupArr,
+                type: 'copy',
+                unitId: this.copyData.unitId,
+                copyToCampaignId: this.getData('campaignId'),
+                createCount: this.getData('createCount'),
+                createType: this.getData('createType'),
+                accountId: this.copyData.accountId
+              }
+              postAction('/kuaishou/batch/copyUnit', params).then(res => {
+                if (res.success) {
+                  //   visibleData
+                  if (res.result.failCount > 0) {
+                    this.visible = true
+                    this.visibleData = res.result
+                  } else {
+                    this.$message.success('批量复制成功')
+                    this.allMoneyBidProportion = 1.2
+                    this.selectedRowKeysValue = []
+                    this.selectedRowKeys = []
 
+                  }
+                  setTimeout(() => {
+                    this.visibleCopy = false
+                    this.loading = false
+                    this.getDataList(localStorage.getItem('advertisingGroupKey'))
+                  }, 3000)
+                  // this.getDataList(localStorage.getItem('advertisingGroupKey'))
                 }
-                setTimeout(() => {
-                  this.visibleCopy = false
-                  this.loading = false
-                  this.getDataList(localStorage.getItem('advertisingGroupKey'))
-                }, 3000)
-                // this.getDataList(localStorage.getItem('advertisingGroupKey'))
+              })
+            } else if (this.getData('createType') == '2') {
+              var params = {
+                // ...this.copyData,
+                // groupArr: groupArr,
+                type: 'copy',
+                unitId: this.copyData.unitId,
+                copyToCampaignId: this.getData('campaignId'),
+                createCount: this.getData('createCount'),
+                createType: this.getData('createType'),
+                accountId: this.copyData.accountId,
+                unitNames: this.unitNameList.map(item => {
+                  return item.unitName
+                })
               }
-            })
-          } else if (this.getData('createType') == '2') {
-            var params = {
-              // ...this.copyData,
-              // groupArr: groupArr,
-              type: 'copy',
-              unitId: this.copyData.unitId,
-              copyToCampaignId: this.getData('campaignId'),
-              createCount: this.getData('createCount'),
-              createType: this.getData('createType'),
-              accountId: this.copyData.accountId,
-              unitNames: this.unitNameList.map(item => {
-                return item.unitName
+              postAction('/kuaishou/batch/copyUnit', params).then(res => {
+                if (res.success) {
+                  if (res.result.failCount > 0) {
+                    this.visible = true
+                    this.visibleData = res.result
+                  } else {
+                    this.$message.success('批量复制成功')
+                    this.allMoneyBidProportion = 1.2
+                    this.selectedRowKeysValue = []
+                    this.selectedRowKeys = []
+                  }
+                  setTimeout(() => {
+                    this.visibleCopy = false
+                    this.loading = false
+                    this.getDataList(localStorage.getItem('advertisingGroupKey'))
+                  }, 3000)
+
+                  // this.getDataList(localStorage.getItem('advertisingGroupKey'))
+                }
               })
             }
-            postAction('/kuaishou/batch/copyUnit', params).then(res => {
-              if (res.success) {
-                if (res.result.failCount > 0) {
-                  this.visible = true
-                  this.visibleData = res.result
-                } else {
-                  this.$message.success('批量复制成功')
-                  this.allMoneyBidProportion = 1.2
-                  this.selectedRowKeysValue = []
-                  this.selectedRowKeys = []
+          } else {
+            this.visibleCopy = false
+            if (this.getData('createType') == '1') {
+              this.$refs.editGroupNew.handleOk(this.copyData, 'typeOne', this.getData('campaignId'), [], this.getData(
+                'createCount'))
+
+            } else if (this.getData('createType') == '2') {
+              this.unitNameList.map(item => {
+                return {
+                  unitName: item.unitName
                 }
-                setTimeout(() => {
-                  this.visibleCopy = false
-                  this.loading = false
-                  this.getDataList(localStorage.getItem('advertisingGroupKey'))
-                }, 3000)
+              })
+              this.$refs.editGroupNew.handleOk(this.copyData, 'typeTwo', this.getData('campaignId'), this.unitNameList,
+                this.getData('createCount'))
 
-                // this.getDataList(localStorage.getItem('advertisingGroupKey'))
-              }
-            })
+            }
           }
-          //   var groupArr = this.allForm.group.map(item => {
-          //     return {
-          //       ...item,
-          //       cpaBid: item.cpaBid != '' ? item.cpaBid * 1000 : '',
-          //       bid: item.bid != '' ? item.bid * 1000 : '',
-          //       deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
-          //       ocpxActionType: item.bidType,
-          //       bidType: item.bidType == '1' ? '2' : '6'
-          //     }
-          //   })
-
-
-          // postAction('/kuaishou/batch/createUnit', params).then(res => {
-          //   if (res.success) {
-          //     this.loading = false
-          //     this.visibleCopy = false
-          //     this.form.resetFields()
-          //     this.getDataList(localStorage.getItem('advertisingGroupKey'))
-
-          //     this.allForm.group = []
-          //   }
-          // })
         }
 
 

+ 13 - 11
src/views/modules/kuaishouapp/account/copyGroup.vue

@@ -207,7 +207,7 @@
                   </a-form-item>
                   <a-form-item label="深度转化目标" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                     :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
-                      (item.bidType == '180' || item.bidType == '53') &&
+                      (item.bidType == 180 || item.bidType == 53) &&
                         allForm.groupTypeData.deepConversionTypes.length > 0
                     ">
                     <a-select v-model="item.deepConversionType" allowClear>
@@ -224,7 +224,7 @@
                     </a-radio-group>
                   </a-form-item>
                   <a-form-item label="出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
-                    :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType == '1'">
+                    :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType == 1">
                     <a-input-number v-model="item.bid" @change="showTip(index)"
                       :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                     </a-input-number>
@@ -236,14 +236,14 @@
                       :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                     </a-input-number>
                     <span style="color:red" v-if="item.showTipCheck">{{
-                      item.bidType == '2'
+                      item.bidType == 2
                         ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                         : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                     }}</span>
                   </a-form-item>
                   <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                     :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
-                      (item.bidType == '180' || item.bidType == '53') &&
+                      (item.bidType == 180 || item.bidType == 53) &&
                         allForm.groupTypeData.deepConversionTypes.length > 0 &&
                         item.deepConversionType != ''
                     ">
@@ -399,13 +399,13 @@
 
       },
       showTip(index) {
-        if (this.allForm.group[index].bidType == '1') {
+        if (this.allForm.group[index].bidType == 1) {
           if (this.allForm.group[index].bid < 0.2 || this.allForm.group[index].bid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else if (this.allForm.group[index].bidType == '2') {
+        } else if (this.allForm.group[index].bidType == 2) {
           if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
@@ -598,7 +598,7 @@
 
               this.populationData = dataJson
               this.populationData.population = dataJson.population ? JSON.parse(dataJson.population) : null
-              this.populationData.excludePopulation = dataJson.population ? JSON.parse(dataJson
+              this.populationData.excludePopulation = dataJson.excludePopulation ? JSON.parse(dataJson
                 .excludePopulation) : null
 
               this.populationData.devicePrice = dataJson.devicePrice ? JSON.parse(dataJson.devicePrice) : null
@@ -634,9 +634,9 @@
               this.populationData.allForm.appType = dataJson.appInterest ? '1' : dataJson.appIds ? '2' : '0'
               this.populationData.allForm.fansStar = dataJson.fansStar ? '1' : '0'
               this.populationData.allForm.interestVideo = dataJson.interestVideo ? '1' : '0'
-              this.populationData.allForm.platform_os = dataJson.platformOs + ''
-              this.populationData.allForm.businessInterestType = dataJson.businessInterest ? '2' : '0'
-              this.populationData.allForm.isOpen = dataJson.isOpen + ''
+              this.populationData.allForm.platform_os = dataJson.platformOs
+              this.populationData.allForm.businessInterestType = dataJson.businessInterest ? 2 : 0
+              this.populationData.allForm.isOpen = dataJson.isOpen
               this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
               this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
               this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
@@ -669,7 +669,7 @@
                 bid: item.bid != '' ? item.bid * 1000 : '',
                 deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
                 ocpxActionType: item.bidType,
-                bidType: item.bidType == '1' ? '2' : '6'
+                bidType: item.bidType == 1 ? 2 : 6
               }
             })
             var json = {
@@ -712,6 +712,8 @@
                   this.$emit('update:jihua', false)
                 }
 
+              } else {
+                this.$message.error(res.message)
               }
             })
           }

+ 12 - 11
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -204,7 +204,7 @@
                     </a-form-item>
                     <a-form-item label="深度转化目标" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
-                        (item.bidType == '180' || item.bidType == '53') &&
+                        (item.bidType == 180 || item.bidType == 53) &&
                           allForm.groupTypeData.deepConversionTypes.length > 0
                       ">
                       <a-select v-model="item.deepConversionType" allowClear>
@@ -221,7 +221,7 @@
                       </a-radio-group>
                     </a-form-item>
                     <a-form-item label="出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
-                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType == '1'">
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType ==1">
                       <a-input-number v-model="item.bid" @change="showTip(index)"
                         :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                       </a-input-number>
@@ -233,14 +233,14 @@
                         :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                       </a-input-number>
                       <span style="color:red" v-if="item.showTipCheck">{{
-                        item.bidType == '2'
+                        item.bidType == 2
                           ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
-                        (item.bidType == '180' || item.bidType == '53') &&
+                        (item.bidType == 180 || item.bidType == 53) &&
                           allForm.groupTypeData.deepConversionTypes.length > 0 &&
                           item.deepConversionType != ''
                       ">
@@ -399,13 +399,13 @@
 
       },
       showTip(index) {
-        if (this.allForm.group[index].bidType == '1') {
+        if (this.allForm.group[index].bidType == 1) {
           if (this.allForm.group[index].bid < 0.2 || this.allForm.group[index].bid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else if (this.allForm.group[index].bidType == '2') {
+        } else if (this.allForm.group[index].bidType == 2) {
           if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
@@ -584,7 +584,7 @@
 
             this.populationData = dataJson
             this.populationData.population = dataJson.population ? JSON.parse(dataJson.population) : null
-            this.populationData.excludePopulation = dataJson.population ? JSON.parse(dataJson.excludePopulation) :
+            this.populationData.excludePopulation = dataJson.excludePopulation ? JSON.parse(dataJson.excludePopulation) :
               null
 
             this.populationData.devicePrice = dataJson.devicePrice ? JSON.parse(dataJson.devicePrice) : null
@@ -620,9 +620,9 @@
             this.populationData.allForm.appType = dataJson.appInterest ? '1' : dataJson.appIds ? '2' : '0'
             this.populationData.allForm.fansStar = dataJson.fansStar ? '1' : '0'
             this.populationData.allForm.interestVideo = dataJson.interestVideo ? '1' : '0'
-            this.populationData.allForm.platform_os = dataJson.platformOs + ''
-            this.populationData.allForm.businessInterestType = dataJson.businessInterest ? '2' : '0'
-            this.populationData.allForm.isOpen = dataJson.isOpen + ''
+            this.populationData.allForm.platform_os = dataJson.platformOs
+            this.populationData.allForm.businessInterestType = dataJson.businessInterest ? 2 : 0
+            this.populationData.allForm.isOpen = dataJson.isOpen
             this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
             this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
             this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
@@ -653,7 +653,7 @@
                 bid: item.bid != '' ? item.bid * 1000 : '',
                 deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
                 ocpxActionType: item.bidType,
-                bidType: item.bidType == '1' ? '2' : '6'
+                bidType: item.bidType == 1 ? 2 : 6
               }
             })[0]
             var json = {
@@ -696,6 +696,7 @@
                   this.loading = false
                 } else {
                   this.loading = false
+                  this.$message.error(res.message)
                 }
               })
             } else if (this.typeCopy == 'copy') {

+ 908 - 0
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -0,0 +1,908 @@
+<style>
+  #table_time_selected1 tr {
+    border: 1px solid rgb(102, 162, 243);
+  }
+
+  .plug-timer-grid th {
+    line-height: 25px;
+  }
+
+  .group-creat .ant-form-item-required::before {
+    display: inline-block;
+    margin-right: 4px;
+    color: #f5222d;
+    font-size: 14px;
+    font-family: SimSun, sans-serif;
+    line-height: 1;
+    content: '';
+  }
+
+  .else-label .ant-form-item-label label::after {
+    content: '';
+    position: relative;
+    top: -0.5px;
+    margin: 0 8px 0 2px;
+  }
+</style>
+<template>
+  <a-modal v-model="visible" title="修改广告组信息" :width="900" v-if="visible">
+    <a-form @submit="handleSubmit" :form="form">
+      <a-form-item label="目标应用" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '2'">
+        <a-select disabled v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch
+          allowClear placeholder="选择应用目标" optionFilterProp="children" style="width: 500px" @focus="handleFocus"
+          @blur="handleBlur" @change="handleChange" :filterOption="filterOption">
+          <a-select-option value="0">请选择目标应用</a-select-option>
+          <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
+            {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
+              appModel.platform | platform
+            }}
+          </a-select-option>
+        </a-select>
+        <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
+        <creat-application ref="application" />
+      </a-form-item>
+      <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '3'">
+        <a-radio-group buttonStyle="solid"
+          v-decorator="['urlType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '1' }]">
+          <a-radio-button value="1">淘宝商品</a-radio-button>
+          <a-radio-button value="2">淘客商品</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
+      <a-form-item :label="campaignType == '3' ? ' ' : '链接'" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType != '2'"
+        :class="{ elseLabel: campaignType == '3' }">
+        <!-- 请填写以http://或者https://开头的落地页地址,长度不超过1000个字符 -->
+        <a-input placeholder="请填写链接"
+          v-decorator="['url', { rules: [{ required: true, message: ' ' }, { validator: handleConfirmValue }] }]" />
+      </a-form-item>
+      <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label"
+        v-if="campaignType == '2'&&(getPlatForm(getData('appId'))=='1'||getPlatForm(getData('appId'))=='2')">
+
+        <a-checkbox @change="onChange" :checked="allForm.useAppMarket">
+          优先从系统应用商店下载
+        </a-checkbox>
+      </a-form-item>
+      <div style="text-align:center;font-size:16px;margin-bottom:10px">
+        目标人群
+      </div>
+      <a-form-item label="选择模板" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
+        <a-select showSearch allowClear placeholder="选择模板" optionFilterProp="children" style="width: 500px"
+          @change="handleChangeMould" :filterOption="filterOption">
+          <a-select-option v-for="(appModel, index) in dataList" :key="index" :value="appModel.id">
+            {{ appModel.templateName }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <targeted-population ref="population" :populationData.sync="populationData"
+        :platform="getPlatForm(getData('appId'))" />
+      <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label">
+        <div style="display:flex;">
+          <a-checkbox :checked="checkedTrue" @change="getCheck">
+            是否设置为模板
+          </a-checkbox>
+          <a-input v-model="nameValue" v-if="checkedTrue" placeholder="请输入模板名称" style="width:70%" />
+        </div>
+      </a-form-item>
+
+      <div style="text-align:center;font-size:16px">
+        预算和排期
+      </div>
+
+      <a-form-item label="单日预算" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
+        <a-radio-group buttonStyle="solid" v-model="allForm.dayBudget">
+          <a-radio-button value="0">不限</a-radio-button>
+          <a-radio-button value="1">统一预算</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
+      <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="allForm.dayBudget == '1'">
+        <a-input placeholder="不小于100,不超过100000000,仅支持输入自然数" v-decorator="[
+            'dayBudget',
+            {
+              rules: [{ required: true, message: '请填写预算' }, { validator: budgetValue }]
+            }
+          ]" />
+      </a-form-item>
+      <a-form-item label="投放方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
+        <a-radio-group buttonStyle="solid" v-decorator="['speed', { initialValue: 1 }]">
+          <a-radio-button :value="1">正常投放</a-radio-button>
+          <a-radio-button :value="2">平滑投放</a-radio-button>
+        </a-radio-group>
+        <br />
+        <span>
+          {{ getData('speed') == '2' ? '平滑匀速投放' : '尽快展示广告消耗预算' }}
+        </span>
+      </a-form-item>
+      <a-form-item label="排期" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
+        <!-- v-decorator="['speed', { initialValue: '1' }]" -->
+        <a-radio-group buttonStyle="solid" v-model="allForm.time" @change="setTime">
+          <a-radio-button value="1">从今天开始长期投放</a-radio-button>
+          <a-radio-button value="2">设置开始和结束日期</a-radio-button>
+        </a-radio-group>
+        <br />
+        <a-range-picker v-if="allForm.time == '2'" v-model="timeRange" format="YYYY-MM-DD" :allowClear="false" />
+      </a-form-item>
+      <a-form-item label="投放时段" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
+        <!-- v-decorator="['speed', { initialValue: '1' }]" -->
+        <a-radio-group buttonStyle="solid" v-model="allForm.scheduleTime" @change="setTimeAll">
+          <a-radio-button value="1">全天</a-radio-button>
+          <a-radio-button value="2">特定时间</a-radio-button>
+        </a-radio-group>
+        <br />
+        <selectCheckAll style="width:100%" v-show="allForm.scheduleTime == '2'"
+          :scheduleTime.sync="allForm.scheduleTimeData" ref="selectCheck" />
+      </a-form-item>
+
+      <a-form-item label="创意展现方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
+        <!-- v-decorator="['speed', { initialValue: '1' }]" -->
+        <a-radio-group buttonStyle="solid" v-decorator="['showMode', { initialValue: 2 }]">
+          <a-radio-button :value="2">智能优选</a-radio-button>
+          <a-radio-button :value="1">随机轮播</a-radio-button>
+        </a-radio-group>
+        <br />
+        <span>
+          {{
+            getData('showMode') == 1
+              ? '广告组包含的广告创意将随机展现'
+              : '每一次展现的时候,系统会进行CTR预估,预估CTR高的会得到展现机会'
+          }}
+        </span>
+      </a-form-item>
+      <a-form-item label="场景广告位" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
+        <!-- v-decorator="['speed', { initialValue: '1' }]" -->
+        <a-radio-group buttonStyle="solid" v-decorator="['sceneId', { initialValue: '1' }]">
+          <a-radio-button value="1">优选广告位</a-radio-button>
+          <a-radio-button value="2">按场景选择广告位</a-radio-button>
+        </a-radio-group>
+        <!-- getData('speed') == '2' -->
+        <br>
+
+      </a-form-item>
+      <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="getData('sceneId') == '2'">
+        <a-checkbox-group :defaultValue="[7]" v-model="allForm.sceneId">
+          <a-checkbox :value="7">信息流广告</a-checkbox>
+          <a-checkbox :value="6">上下滑大屏广告</a-checkbox>
+          <a-checkbox :value="3">视频播放页广告</a-checkbox>
+        </a-checkbox-group>
+      </a-form-item>
+      <div style="text-align:center;font-size:16px">优化目标和计费</div>
+      <a-form-item label=" " :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+        :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }" class="else-label">
+        <div style="width:100%">
+          <a-layout>
+            <a-layout-content style="padding:10px;">
+              <!-- <div :style="{ marginBottom: '16px' }">
+                <a-button @click="addGroup" :disabled="allForm.group.length > 10">添加广告组</a-button>
+              </div> -->
+              <a-row>
+                <a-col :sm="24" :md="24" :xl="24" :xxl="24" v-for="(item, index) of allForm.group" :key="index">
+                  <a-card title :ref="item" style="height:435px">
+                    <div style="clear:both"></div>
+                    <a-form-item label="优化目标" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }">
+                      <a-radio-group buttonStyle="solid" v-model="item.bidType" @change="resData(index)">
+                        <a-radio-button :value="1">点击数</a-radio-button>
+                        <a-radio-button :value="2">行为数</a-radio-button>
+                        <a-radio-button :value="180"
+                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-radio-button>
+                        <a-radio-button :value="53" v-if="
+                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                          ">表单提交</a-radio-button>
+                      </a-radio-group>
+                    </a-form-item>
+                    <a-form-item label="深度转化目标" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
+                        (item.bidType == 180 || item.bidType == 53) &&
+                          allForm.groupTypeData.deepConversionTypes.length > 0
+                      ">
+                      <a-select v-model="item.deepConversionType" allowClear>
+                        <a-select-option :value="items.deepConversionType"
+                          v-for="(items, index) of allForm.groupTypeData.deepConversionTypes" :key="index">
+                          {{ items.desc }}</a-select-option>
+                      </a-select>
+                    </a-form-item>
+
+                    <a-form-item label="计费方式" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }">
+                      <a-radio-group :defaultValue="1">
+                        <a-radio :value="1">点击计费</a-radio>
+                      </a-radio-group>
+                    </a-form-item>
+                    <a-form-item label="出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType ==1">
+                      <a-input-number v-model="item.bid" @change="showTip(index)"
+                        :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
+                      </a-input-number>
+                      <span style="color:red" v-if="item.showTipCheck">不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span>
+                    </a-form-item>
+                    <a-form-item label="目标成本" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-else>
+                      <a-input-number v-model="item.cpaBid" @change="showTip(index)"
+                        :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
+                      </a-input-number>
+                      <span style="color:red" v-if="item.showTipCheck">{{
+                        item.bidType == 2
+                          ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
+                          : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
+                      }}</span>
+                    </a-form-item>
+                    <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
+                        (item.bidType == 180 || item.bidType == 53) &&
+                          allForm.groupTypeData.deepConversionTypes.length > 0 &&
+                          item.deepConversionType != ''
+                      ">
+                      <a-input-number v-model="item.deepConversionBid" @change="deep_conversion_bidTip(index)"
+                        :style="{ borderColor: item.deepConversionBidCheck ? 'red' : '#d9d9d9' }" style="width:100%"
+                        :disabled="item.cpaBid == ''"></a-input-number>
+                      <span style="color:red" v-if="item.deepConversionBidCheck">深度转化目标成本必须高于优化目标成本,且不得高于3000元</span>
+                    </a-form-item>
+                    <a-form-item label="广告组名称" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+                      v-if="item.unitName.length>0&&item.unitName[0].unitName">
+                      <a-input v-for="(nameElse,index) in item.unitName" v-model="nameElse.unitName" :key="index">
+                      </a-input>
+                      <!-- <span style="color:red" v-if="item.unitNameCheck">广告组名称重复</span> -->
+                    </a-form-item>
+                    <a-form-item label="广告组名称" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-else>
+                      <a-input v-for="(nameElse,index) in item.unitName" :value="nameElse" disabled :key="index">
+                      </a-input>
+                      <!-- <span style="color:red" v-if="item.unitNameCheck">广告组名称重复</span> -->
+                    </a-form-item>
+                  </a-card>
+                </a-col>
+              </a-row>
+            </a-layout-content>
+          </a-layout>
+        </div>
+      </a-form-item>
+    </a-form>
+    <template slot="footer">
+      <a-button key="submit" type="primary" @click="handleSubmit" :loading="loading">
+        确定
+      </a-button>
+    </template>
+    <a-modal v-model="visibleFail" title="错误信息" onOk="handleOk" :footer="null">
+      <div v-if="visibleData">
+        复制条数:{{ visibleData.totalCount }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败条数:{{ visibleData.failCount }}
+        <div style="margin-top:20px">
+          <p v-for="(item, index) of visibleData.failInfo" :key="index">
+            <span>名称:{{ item.campaignName?item.campaignName:item.unitName }}</span><br />
+            <span>错误信息:{{ item.message }}</span>
+          </p>
+        </div>
+      </div>
+    </a-modal>
+  </a-modal>
+
+</template>
+
+<script>
+  import {
+    getAction,
+    postAction,
+    deleteAction,
+    putAction
+  } from '@/api/manage'
+  import moment from 'moment'
+  import {
+    mapGetters
+  } from 'vuex'
+  import jq from 'jquery'
+  import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+  import targetedPopulation from '@/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue'
+
+  import creatApplication from '@/views/modules/kuaishouapp/account/stepForm/stepModule/creatApplication.vue'
+
+  import selectCheckAll from '@/views/modules/kuaishouapp/account/stepForm/stepModule/test'
+  import pick from 'lodash.pick'
+  export default {
+    name: 'new-mould',
+    components: {
+      targetedPopulation,
+      Treeselect,
+      creatApplication,
+      selectCheckAll
+    },
+    data() {
+      return {
+        checkedTrue: false,
+        nameValue: '',
+        visible: false,
+        visibleFail: false,
+        visibleData: null,
+        timeRange: [],
+        form: this.$form.createForm(this),
+        step: 0,
+        people: '2',
+        targeted: '2',
+        topMiddle: false,
+        topMiddleNo: false,
+        keyValue: '',
+        keyValueNo: '',
+        selectedRowKeys: [],
+        selectedRowKeysValue: [],
+        selectedRowKeysNo: [],
+        selectedRowKeysValueNo: [],
+        data: [],
+        populationData: {},
+        url: {
+          insertTemplateUrl: '/kuaishou/create/createGroups',
+          userAllocationList: '/ctop/userAllocation/list',
+          campaignList: '/kuaishou/kuaiShouCampaignTemplate/list',
+          getDeepConversionUrl: '/kuaishou/kuaiShouConversionTypes/getIsActivate',
+          getCampaignTemplate: '/kuaishou/kuaiShouCampaignTemplate/getKuaiShouCampaignTemplate',
+          appListUrl: '/kuaishou/kuaiShouCreateAppTemplate/list'
+        },
+        appList: [],
+        appId: '',
+        loading: false,
+        campaignTemplateId: '',
+        campaignType: '2',
+        maxBid: 0,
+        allForm: {
+          dayBudget: '0',
+          time: '1',
+          scheduleTime: '1',
+          scheduleTimeData: '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
+          group: [],
+          groupTypeData: null,
+          fail: [],
+          success: [],
+          sceneId: [7],
+          useAppMarket: false
+        },
+        typeCopy: "typeOne",
+        dataList: [],
+        unitId: '',
+        oneCampaignId: '',
+        copyCampaignId: '',
+        countAll: 0
+      }
+    },
+    computed: {},
+    filters: {
+      platform(str) {
+        var data = {
+          1: 'Android应用下载',
+          2: 'Android网页游戏',
+          3: 'iOS应用下载',
+          4: 'iOS网页游戏'
+        }
+        return data[str]
+      }
+    },
+    methods: {
+      getCheck(e) {
+        this.checkedTrue = e.target.checked
+      },
+      resData(index) {
+        this.allForm.group[index].bid = ''
+        this.allForm.group[index].cpaBid = ''
+        this.allForm.group[index].showTipCheck = false
+        this.allForm.group[index].deepConversionBidCheck = false
+        this.allForm.group[index].deepConversionType = ''
+        this.allForm.group[index].deepConversionBid = ''
+      },
+      removeGroup(index) {
+        this.allForm.group.splice(index, 1)
+      },
+      deep_conversion_bidTip(index) {
+        if (
+          this.allForm.group[index].deepConversionBid < this.allForm.group[index].cpaBid ||
+          this.allForm.group[index].deepConversionBid > 3000
+        ) {
+          this.allForm.group[index].deepConversionBidCheck = true
+        } else {
+          this.allForm.group[index].deepConversionBidCheck = false
+        }
+      },
+      checkGroup(e, index) {
+        if (e.target.value != '') {
+          getAction('/kuaishou/batch/checkUnitName', {
+            campaignId: localStorage.getItem('advertisingGroupKey'),
+            unitName: e.target.value
+          }).then(res => {
+            this.allForm.group[index].unitNameCheck = !res.result
+          })
+        }
+
+      },
+      showTip(index) {
+        if (this.allForm.group[index].bidType == 1) {
+          if (this.allForm.group[index].bid < 0.2 || this.allForm.group[index].bid > this.maxBid) {
+            this.allForm.group[index].showTipCheck = true
+          } else {
+            this.allForm.group[index].showTipCheck = false
+          }
+        } else if (this.allForm.group[index].bidType == 2) {
+          if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
+            this.allForm.group[index].showTipCheck = true
+          } else {
+            this.allForm.group[index].showTipCheck = false
+          }
+        } else {
+          if (this.allForm.group[index].cpaBid < 5 || this.allForm.group[index].cpaBid > this.maxBid) {
+            this.allForm.group[index].showTipCheck = true
+          } else {
+            this.allForm.group[index].showTipCheck = false
+          }
+        }
+      },
+      getScheduleTime(item) {
+        this.allForm.scheduleTimeData = item
+      },
+      setTime(e) {
+        //   console.log(moment('2019-12-27'))
+        if (e.target.value == '2') {
+          this.timeRange[0] = moment().startOf('day')
+          this.timeRange[1] = moment().add(1, 'months')
+        }
+      },
+      setTimeAll(e) {
+        //   console.log(moment('2019-12-27'))
+        //   if (e.target.value == '2') {
+        //     this.$refs.selectCheck.init()
+        //   } else {
+        //   }
+      },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
+      handleConfirmValue(rule, value, callback) {
+        if (this.campaignType == '3') {
+          if (value == '') {
+            callback('请填写链接')
+          }
+        } else if (this.campaignType == '4') {
+          if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value != '' && value.length < 10000) {
+            callback()
+          } else {
+            callback('链接不能为空且开头为http://或https://,并且长度小于10000')
+          }
+        } else if (this.campaignType == '5') {
+          if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value != '' && value.length < 10000) {
+            callback()
+          } else {
+            callback('链接不能为空且开头为http://或https://,并且长度小于10000')
+          }
+        }
+      },
+      budgetValue(rule, value, callback) {
+        if (value < 100 || value > 100000000) {
+          callback('不小于100,不超过100000000,仅支持输入自然数')
+        }
+        callback()
+      },
+      handleConfirmBid(rule, value, callback) {
+        if (this.bid == 0 || this.bid <= 0.2 || this.bid >= 100) {
+          callback('不得低于0.2元,不得高于100元')
+        }
+        callback()
+      },
+
+      handleConfirmCpaBid(rule, value, callback) {
+        if (this.ocpxActionType == '2' && (this.cpaBid == 0 || this.cpaBid <= 1 || this.cpaBid >= 3000)) {
+          callback('金额不得低于1元,不得高于3000元')
+        }
+        if (this.ocpxActionType == '180' && (this.cpaBid == 0 || this.cpaBid <= 5 || this.cpaBid >= 3000)) {
+          callback('金额不得低于5元,不得高于3000元')
+        }
+        callback()
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedRowKeys = selectedRowKeys
+        this.selectedRowKeysValue = selectionRows.map(item => {
+          return {
+            orientationId: item.orientationId,
+            orientationName: item.orientationName
+          }
+        })
+      },
+      getCheckboxProps(record) {
+        return {
+          props: {
+            disabled: this.selectedRowKeysValueNo.some(item => item.orientationId === record.orientationId)
+          }
+        }
+      },
+      onSelectChangeNo(selectedRowKeys, selectionRows) {
+        this.selectedRowKeysNo = selectedRowKeys
+        this.selectedRowKeysValueNo = selectionRows.map(item => {
+          return {
+            orientationId: item.orientationId,
+            orientationName: item.orientationName
+          }
+        })
+      },
+      getCheckboxPropsNo(record) {
+        return {
+          props: {
+            disabled: this.selectedRowKeysValue.some(item => item.orientationId === record.orientationId)
+          }
+        }
+      },
+      okSelect() {
+        this.keyValue = ''
+        this.topMiddle = false
+        for (let i = 0; i < this.selectedRowKeysValue.length; i++) {
+          this.keyValue += this.selectedRowKeysValue[i].orientationName + '   '
+        }
+      },
+      okSelectNo() {
+        this.keyValueNo = ''
+        this.topMiddleNo = false
+        for (let i = 0; i < this.selectedRowKeysValueNo.length; i++) {
+          this.keyValueNo += this.selectedRowKeysValueNo[i].orientationName + '   '
+        }
+      },
+      radioChange() {
+        this.selectedRowKeys = []
+        this.selectedRowKeysValue = []
+        this.selectedRowKeysNo = []
+        this.selectedRowKeysValueNo = []
+        this.keyValue = ''
+        this.keyValueNo = ''
+      },
+
+      addApplication() {
+        this.$refs.application.showApplication()
+      },
+      handleOk(item, type, campaignId, unitNameCopy, count) {
+        this.visible = true
+        //   /kuaishou/batch/getUnitDetail
+        this.typeCopy = type
+        this.countAll = count
+        if (campaignId) {
+          this.oneCampaignId = item.campaignId
+          this.copyCampaignId = campaignId
+        }
+        console.log(item.campaignId, campaignId)
+        this.unitId = item.unitId
+        var params = {}
+        params.accountId = item.accountId
+        params.unitId = item.unitId
+        getAction('/kuaishou/batch/getUnitDetail', params).then(res => {
+          if (res.success) {
+            var dataJson = {
+              ...res.result.baseInfo,
+              ...res.result.appInfo,
+              ...res.result.target
+            }
+            //   dataJson.useAppMarket = dataJson.useAppMarket==0?false:true
+            dataJson.dayBudget = dataJson.dayBudget / 1000
+            dataJson.sceneId = JSON.parse(dataJson.sceneId)[0] == '1' ? '1' : '2'
+            this.allForm.useAppMarket = dataJson.useAppMarket ? (dataJson.useAppMarket == 0 ? false : true) : false
+            this.allForm.sceneId = JSON.parse(dataJson.sceneId)[0] == '1' ? [7] : JSON.parse(res.result.baseInfo
+              .sceneId)
+            console.log(this.allForm.sceneId)
+            this.allForm.dayBudget = dataJson.dayBudget == 0 ? '0' : '1'
+            this.allForm.time = dataJson.endTime ? '2' : '1'
+            this.timeRange = [moment(dataJson.beginTime), moment(dataJson.endTime)]
+            this.allForm.scheduleTime = dataJson.scheduleTime.indexOf('1') != -1 ? '2' : '1'
+            this.allForm.scheduleTimeData = dataJson.scheduleTime
+            this.allForm.group = [{
+              bidType: dataJson.ocpxActionType,
+              bid: dataJson.bid,
+              cpaBid: dataJson.cpaBid / 1000,
+              showTipCheck: false,
+              deepConversionBidCheck: false,
+              unitName: type == 'typeOne' ? [dataJson.unitName] : unitNameCopy,
+              unitNameCheck: false,
+              deepConversionType: dataJson.deepConversionType,
+              deepConversionBid: dataJson.deepConversionBid / 1000
+            }]
+
+            this.populationData = dataJson
+            this.populationData.population = dataJson.population ? JSON.parse(dataJson.population) : null
+            this.populationData.excludePopulation = dataJson.excludePopulation ? JSON.parse(dataJson.excludePopulation) :
+              null
+
+            this.populationData.devicePrice = dataJson.devicePrice ? JSON.parse(dataJson.devicePrice) : null
+            this.populationData.appInterest = dataJson.appInterest ? JSON.parse(dataJson.appInterest) : null
+            this.populationData.businessInterest = dataJson.businessInterest ?
+              JSON.parse(dataJson.businessInterest) :
+              null
+            this.populationData.fansStar = dataJson.fansStar ? JSON.parse(dataJson.fansStar) : null
+            this.populationData.interestVideo = dataJson.interestVideo ? JSON.parse(dataJson.interestVideo) : null
+            this.populationData.deviceBrand = dataJson.deviceBrand ? JSON.parse(dataJson.deviceBrand) : null
+
+            this.populationData.age = dataJson.ageMin ? [dataJson.ageMin, dataJson.ageMax] : []
+            this.populationData.agesRange = dataJson.agesRange ? JSON.parse(dataJson.agesRange) : []
+            this.populationData.devicePrice = dataJson.devicePrice ? dataJson.devicePrice : null
+            this.populationData.allForm = {}
+            this.populationData.allForm.regionType =
+              dataJson.region && JSON.parse(dataJson.region).length > 0 ? 'limit' : 'noLimit'
+
+            this.populationData.allForm.region = dataJson.region
+            // postAction('/kuaishou/batch/getRegionDetail', {
+            //   regionArr: dataJson.region
+            // }).then(res => {
+            //   console.log(res, 11111)
+            //   if (res.success) {
+            //     this.populationData.allForm.region = res.result
+            //   }
+            // })
+
+            this.populationData.allForm.ageType =
+              dataJson.agesRange.length > 0 ? 'ageLimit' : dataJson.ageMin ? 'ageCustom' : 'noLimit'
+            this.populationData.allForm.device = dataJson.deviceBrand ? '1' : '0'
+            this.populationData.allForm.price = dataJson.devicePrice ? '1' : '0'
+            this.populationData.allForm.appType = dataJson.appInterest ? '1' : dataJson.appIds ? '2' : '0'
+            this.populationData.allForm.fansStar = dataJson.fansStar ? '1' : '0'
+            this.populationData.allForm.interestVideo = dataJson.interestVideo ? '1' : '0'
+            this.populationData.allForm.platform_os = dataJson.platformOs
+            this.populationData.allForm.businessInterestType = dataJson.businessInterest ? 2 : 0
+            this.populationData.allForm.isOpen = dataJson.isOpen
+            this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
+            this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
+            this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
+
+            this.$nextTick(() => {
+              this.form.setFieldsValue(pick(dataJson, ['appId', 'urlType', 'url', 'dayBudget', 'speed',
+                'showMode', 'sceneId'
+              ]))
+            })
+          }
+        })
+      },
+      handleCancel(e) {
+        this.visible = false
+      },
+      handleSubmit(e) {
+        //   this.$refs.population.handleSubmit()
+
+        e.preventDefault()
+        this.$refs.population.handleSubmit()
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            this.loading = true
+
+            var json = {
+              ...values,
+              sceneId: values.sceneId == 1 ? [values.sceneId] : this.allForm.sceneId,
+              dayBudget: values.dayBudget * 1000
+            }
+            var params = {
+              ...this.populationData,
+              ...json,
+
+              accountId: localStorage.getItem('accountId'),
+              unitId: this.unitId,
+              unitType: 4,
+              beginTime: this.allForm.time == '2' ? moment(this.timeRange[0]).format('YYYY-MM-DD') : moment()
+                .startOf('day').format('YYYY-MM-DD'),
+              endTime: this.allForm.time == '2' ? moment(this.timeRange[1]).format('YYYY-MM-DD') : '',
+              scheduleTime: this.allForm.scheduleTimeData
+            }
+            if (this.allForm.useAppMarket == true || this.allForm.useAppMarket == false) {
+              params.useAppMarket = this.allForm.useAppMarket ? 1 : 0
+            }
+            if (this.checkedTrue) {
+              var data = this.populationData
+              postAction('/kuaishou/batch/addDirectionalTemplate', {
+                accountId: localStorage.getItem('accountId'),
+                templateName: this.nameValue,
+                templateContent: JSON.stringify(this.populationData)
+              }).then(res => {})
+            }
+            if (this.typeCopy == 'typeOne') {
+              var groupArr = this.allForm.group.map(item => {
+                return {
+                  ...item,
+                  unitName: item.unitName[0],
+                  cpaBid: item.cpaBid != '' ? item.cpaBid * 1000 : '',
+                  bid: item.bid != '' ? item.bid * 1000 : '',
+                  deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
+                  ocpxActionType: item.bidType,
+                  bidType: item.bidType == 1 ? 2 : 6
+                }
+              })[0]
+              var param = {
+                ...params,
+                groupArr: groupArr
+              }
+              param.createType = '1'
+              param.createCount = this.countAll
+              param.type = 'copy'
+              param.copyUnitId = this.unitId
+              param.campaignId = this.oneCampaignId
+              param.copyToCampaignId = this.copyCampaignId
+              postAction('/kuaishou/batch/copyUnitUpdate', param).then(res => {
+                if (res.success) {
+                  if (res.result.failInfo.length > 0) {
+                    this.form.setFieldsValue(pick(param, ['sceneId']))
+                    this.loading = false
+                    this.visibleData = res.result
+                    this.visibleFail = true
+                  } else {
+                    this.visible = false
+                    this.$emit('getList', localStorage.getItem('advertisingGroupKey'))
+                    this.loading = false
+                  }
+
+                } else {
+                  this.loading = false
+                  this.$message.error(res.message)
+                }
+              })
+            } else if (this.typeCopy == 'typeTwo') {
+              var groupArrTwo = this.allForm.group.map(item => {
+                return {
+                  ...item,
+                  cpaBid: item.cpaBid != '' ? item.cpaBid * 1000 : '',
+                  bid: item.bid != '' ? item.bid * 1000 : '',
+                  deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
+                  ocpxActionType: item.bidType,
+                  bidType: item.bidType == 1 ? 2 : 6
+                }
+              })[0]
+              console.log(groupArrTwo)
+              params.type = 'copy'
+              params.createType = '2'
+              params.createCount = this.countAll
+              params.copyUnitId = this.unitId
+              params.copyToCampaignId = this.copyCampaignId
+              params.campaignId = this.oneCampaignId
+              params.createCount = 1
+              params.groupArr = groupArrTwo
+              params.unitNames = groupArrTwo.unitName.map(item => {
+                return item.unitName
+              })
+              postAction('/kuaishou/batch/copyUnitUpdate', params).then(res => {
+                if (res.success) {
+                  if (res.result.failInfo.length > 0) {
+                    this.form.setFieldsValue(pick(params, ['sceneId']))
+                    this.loading = false
+                    this.visibleData = res.result
+                    this.visibleFail = true
+                  } else {
+                    setTimeout(() => {
+                      this.visible = false
+                      this.loading = false
+                      this.$emit('getList', localStorage.getItem('advertisingGroupKey'))
+                    }, 1000)
+                  }
+
+                } else {
+                  this.loading = false
+                  this.$message.error(res.message)
+                }
+
+              })
+            }
+
+          }
+        })
+      },
+      onChange(e) {
+        this.allForm.useAppMarket = e.target.checked
+        //   console.log(value)
+      },
+      handleChange(value) {
+        //   this.$refs.population.getAppList(value)
+      },
+      handleChangeMould(value) {
+        if (value) {
+          this.populationData = JSON.parse(
+            this.dataList.filter(item => {
+              return item.id == value
+            })[0].templateContent
+          )
+        } else {
+          this.populationData = {}
+        }
+      },
+      getPlatForm(appId) {
+        if (appId) {
+          var data = this.appList.filter(item => {
+            return item.appId == appId
+          })
+          return data[0].platform
+        }
+      },
+      handleBlur() {
+        console.log('blur')
+      },
+      handleFocus() {
+        console.log('focus')
+      },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      prevStep() {
+        this.$emit('prevStep', this.campaignId ? this.campaignId : localStorage.getItem('campaignId'))
+      },
+      getMould() {
+        let params = {}
+        params.accountId = localStorage.getItem('accountId')
+        getAction('/kuaishou/batch/getDirectionalTemplate', params).then(res => {
+          console.log(res)
+          if (res.success) {
+            this.dataList = res.result.map((item, index) => {
+              return {
+                ...item,
+                key: index
+              }
+            })
+          }
+        })
+      },
+
+      getAppList() {
+        let params = {}
+        params.accountId = localStorage.getItem('accountId')
+        getAction('/kuaishou/batch/getAppList', params).then(res => {
+          if (res.success) {
+            this.appList = res.result.map((item, index) => {
+              return {
+                ...item,
+                key: index
+              }
+            })
+          }
+        })
+      },
+      // getPeople(e) {
+      //   console.log(e.target.value)
+      //   if (e.target.value == 3) {
+      //     getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountId') }).then(res => {
+      //       if (res.success) {
+      //         this.data = res.result.map((item, index) => {
+      //           return {
+      //             ...item,
+      //             key: index
+      //           }
+      //         })
+      //       }
+      //     })
+      //   }
+      // },
+      getCampaignList() {
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.campaignId = this.campaignId ? this.campaignId : localStorage.getItem('campaignId')
+        getAction('/kuaishou/batch/getCampaignList', params).then(res => {
+          if (res.success) {
+            this.campaignType = res.result.records[0].campaignType
+          }
+        })
+      },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      }
+    },
+    mounted: function () {
+      this.getAppList()
+      this.getCampaignList()
+      this.getMould()
+      getAction('/kuaishou/batch/getIsActivate', {
+        accountId: localStorage.getItem('accountId')
+      }).then(res => {
+        if (res.success) {
+          this.allForm.groupTypeData = res.result
+        }
+      })
+      getAction('/kuaishou/batch/getProjectMaxBid', {
+        accountId: localStorage.getItem('accountId')
+      }).then(res => {
+        if (res.success) {
+          this.maxBid = res.result / 1000
+        }
+      })
+    }
+  }
+</script>

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

@@ -35,7 +35,7 @@
               <a-button @click="editStatus" style="margin:0 0 15px 15px" type="primary">确认</a-button>
             </div>
             <a-table :columns="columns" :dataSource="dataList" bordered :scroll="{ x: true }" :customRow="rowClick"
-              size="middle" :pagination="ipagination"
+              size="middle" :pagination="ipagination" :loading="loadingList"
               :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
               <span slot="action" slot-scope="text, record">
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
@@ -225,7 +225,7 @@
         manyTwo: null,
         columns,
         dataList: [],
-
+        loadingList: false,
         rowClick: (record, index) => ({
           // 事件
           on: {
@@ -489,6 +489,7 @@
         }
       },
       getDataList(id) {
+        this.loadingList = true
         this.dataList = []
         var params = {}
         params.unitId = id
@@ -497,6 +498,7 @@
         params.pageSize = this.ipagination.pageSize
         getAction('/kuaishou/batch/getCreativeList', params).then(res => {
           if (res.code == 0) {
+            this.loadingList = false
             this.dataList = res.result.records.map((v, index) => {
               return {
                 ...v,
@@ -506,6 +508,9 @@
               }
             })
             this.ipagination.total = res.result.total
+          } else {
+            this.$message.error(res.message)
+            this.loadingList = false
           }
         })
       },

+ 13 - 12
src/views/modules/kuaishouapp/account/stepForm/Step2.vue

@@ -234,18 +234,18 @@
                     <a-form-item label="优化目标" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }">
                       <a-radio-group buttonStyle="solid" v-model="item.bidType" @change="resData(index)">
-                        <a-radio-button value="1">点击数</a-radio-button>
-                        <a-radio-button value="2">行为数</a-radio-button>
-                        <a-radio-button value="180"
+                        <a-radio-button :value="1">点击数</a-radio-button>
+                        <a-radio-button :value="2">行为数</a-radio-button>
+                        <a-radio-button :value="180"
                           v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-radio-button>
-                        <a-radio-button value="53" v-if="
+                        <a-radio-button :value="53" v-if="
                             (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-radio-button>
                       </a-radio-group>
                     </a-form-item>
                     <a-form-item label="深度转化目标" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
-                        (item.bidType == '180' || item.bidType == '53') &&
+                        (item.bidType == 180 || item.bidType == 53) &&
                           allForm.groupTypeData.deepConversionTypes.length > 0
                       ">
                       <a-select v-model="item.deepConversionType" allowClear>
@@ -262,7 +262,7 @@
                       </a-radio-group>
                     </a-form-item>
                     <a-form-item label="出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
-                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType == '1'">
+                      :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="item.bidType == 1">
                       <a-input-number v-model="item.bid" @change="showTip(index)"
                         :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                       </a-input-number>
@@ -274,14 +274,14 @@
                         :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                       </a-input-number>
                       <span style="color:red" v-if="item.showTipCheck">{{
-                        item.bidType == '2'
+                        item.bidType == 2
                           ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
-                        (item.bidType == '180' || item.bidType == '53') &&
+                        (item.bidType == 180 || item.bidType == 53) &&
                           allForm.groupTypeData.deepConversionTypes.length > 0 &&
                           item.deepConversionType != ''
                       ">
@@ -591,7 +591,7 @@
       },
       addGroup() {
         this.allForm.group.push({
-          bidType: '2',
+          bidType: 2,
           bid: '',
           cpaBid: '',
           showTipCheck: false,
@@ -640,13 +640,13 @@
 
       },
       showTip(index) {
-        if (this.allForm.group[index].bidType == '1') {
+        if (this.allForm.group[index].bidType == 1) {
           if (this.allForm.group[index].bid < 0.2 || this.allForm.group[index].bid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else if (this.allForm.group[index].bidType == '2') {
+        } else if (this.allForm.group[index].bidType == 2) {
           if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
@@ -805,7 +805,7 @@
                 bid: item.bid != '' ? item.bid * 1000 : '',
                 deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
                 ocpxActionType: item.bidType,
-                bidType: item.bidType == '1' ? '2' : '6'
+                bidType: item.bidType == 1 ? 2 : 6
               }
             })
             var json = {
@@ -859,6 +859,7 @@
                 }
               } else {
                 this.loading = false
+                this.$message.error(res.message)
               }
             })
           }

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

@@ -287,7 +287,7 @@
     <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemal" @ok="handleOkShow" :width="1000">
       <a-tabs type="card" @change="callback" v-model="active" class="check-video">
         <a-tab-pane :tab="item.label" v-for="item of tab" :key="item.value">
-          <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" v-if="active==0" />
+          <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
           <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
             <a-checkbox-group v-model="checkVideo" @change="onChangeVideo">
               <li v-for="(item,index) of dataSource" :key="index" class="chouzhen">
@@ -744,12 +744,13 @@
           this.checkVideo = []
           this.active = 0
           this.time = []
+          this.channelType = 0
           //   var params = {}
           //   params.accountId = localStorage.getItem('accountId')
           //   params.materialType = this.getData('creativeMaterialType')
           //   params.pageSize = this.ipagination.pageSize
           //   params.pageNo = this.ipagination.current
-          //   params.channelType = 0
+          //   params.params.channelType = 0 = 0
           //   this.showVideoList('/kuaishou/batch/getVideoList', params)
         } else {
           this.$refs.check.showCheck(
@@ -854,6 +855,7 @@
                 this.loading = false
               } else {
                 this.loading = false
+                this.$message.error(res.message)
               }
             })
           }

+ 22 - 25
src/views/modules/kuaishouapp/account/stepForm/stepModule/selectRegion.vue

@@ -144,14 +144,7 @@
   export default {
     name: 'ByteDanceUserOrientationTemplateList',
     components: {},
-    props: {
-      dataValue: {
-        type: Array,
-        default () {
-          return []
-        }
-      }
-    },
+    props: ['dataValue'],
     data() {
       return {
         showClass: false,
@@ -175,21 +168,26 @@
     mounted() {
       this.$nextTick(() => {
         this.getData().then(() => {
-          postAction('/kuaishou/batch/getRegionDetail', {
-            regionArr: this.dataValue
-          }).then(res => {
-            if (res.success) {
-              //   this.populationData.allForm.region = res.result
-              this.checkData = res.result
-              this.checkMatched = res.result.map(item => {
-                return item.value
-              })
-              this.checkMatchedCity = res.result.map(item => {
-                return item.value
-              })
-              this.$emit('update:checkData', this.checkData)
-            }
-          })
+          if (this.dataValue[0].value) {
+            return
+          } else {
+            postAction('/kuaishou/batch/getRegionDetail', {
+              regionArr: this.dataValue
+            }).then(res => {
+              if (res.success) {
+                //   this.populationData.allForm.region = res.result
+                this.checkData = res.result
+                this.checkMatched = res.result.map(item => {
+                  return item.value
+                })
+                this.checkMatchedCity = res.result.map(item => {
+                  return item.value
+                })
+                this.$emit('update:checkData', this.checkData)
+              }
+            })
+          }
+
           //   if (this.dataValue.length > 0) {
 
           //   }
@@ -202,8 +200,7 @@
         deep: true,
         immediate: true, // immediate选项可以开启首次赋值监听
         handler(n, o) {
-          console.log(n)
-          if (n.length > 0) {
+          if (n.length > 0 && n[0].value) {
             // this.getData().then(() => {
             console.log(1)
             //   if (n.length > 0) {

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

@@ -217,16 +217,16 @@ li:hover {
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
     >
       <a-radio-group buttonStyle="solid" v-model="allForm.platform_os">
-        <a-radio-button value="0" v-if="getApp == '0'">不限</a-radio-button>
-        <a-radio-button value="1" v-if="getApp == '0' || getApp == '1'">Android系统</a-radio-button>
-        <a-radio-button value="2" v-if="getApp == '0' || getApp == '2'">IOS系统</a-radio-button>
+        <a-radio-button :value="0" v-if="getApp == '0'">不限</a-radio-button>
+        <a-radio-button :value="1" v-if="getApp == '0' || getApp == '1'">Android系统</a-radio-button>
+        <a-radio-button :value="2" v-if="getApp == '0' || getApp == '2'">IOS系统</a-radio-button>
       </a-radio-group>
     </a-form-item>
     <a-form-item
       label=" "
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == '1'"
+      v-if="allForm.platform_os == 1"
       class="else-label"
     >
       <a-radio-group
@@ -248,7 +248,7 @@ li:hover {
       label=" "
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == '2'"
+      v-if="allForm.platform_os == 2"
       class="else-label"
     >
       <a-radio-group
@@ -267,7 +267,7 @@ li:hover {
       </a-radio-group>
     </a-form-item>
     <a-form-item
-      v-if="allForm.platform_os != '2'"
+      v-if="allForm.platform_os != 2"
       label="设备品牌"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
@@ -291,7 +291,7 @@ li:hover {
           <a-checkbox :value="8">魅族</a-checkbox>
           <a-checkbox :value="9">乐视</a-checkbox>
           <a-checkbox :value="10">其他</a-checkbox>
-          <a-checkbox :value="11" v-if="allForm.platform_os == '0'">苹果</a-checkbox>
+          <a-checkbox :value="11" v-if="allForm.platform_os == 0">苹果</a-checkbox>
         </a-checkbox-group>
       </div>
     </a-form-item>
@@ -326,7 +326,7 @@ li:hover {
       label="APP行为"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == '1'"
+      v-if="allForm.platform_os == 1"
     >
       <a-radio-group buttonStyle="solid" v-model="allForm.appType" @change="getAppType">
         <a-radio-button value="0">不限</a-radio-button>
@@ -338,7 +338,7 @@ li:hover {
       label=" "
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == '1' && allForm.appType == '1'"
+      v-if="allForm.platform_os == 1 && allForm.appType == '1'"
       class="else-label"
     >
       <a-select
@@ -358,7 +358,7 @@ li:hover {
       label=" "
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == '1' && allForm.appType == '2'"
+      v-if="allForm.platform_os == 1 && allForm.appType == '2'"
       class="else-label"
     >
       <div style="position:relative;" v-clickoutside="handleClose">
@@ -404,8 +404,8 @@ li:hover {
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
     >
       <a-radio-group buttonStyle="solid" @change="businessInterest" v-model="allForm.businessInterestType">
-        <a-radio-button value="0">不限</a-radio-button>
-        <a-radio-button value="2">兴趣标签</a-radio-button>
+        <a-radio-button :value="0">不限</a-radio-button>
+        <a-radio-button :value="2">兴趣标签</a-radio-button>
       </a-radio-group>
     </a-form-item>
     <a-form-item
@@ -413,7 +413,7 @@ li:hover {
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       class="else-label"
-      v-if="allForm.businessInterestType == '2'"
+      v-if="allForm.businessInterestType == 2"
     >
       <a-select
         mode="multiple"
@@ -523,8 +523,8 @@ li:hover {
           }
         ]" -->
       <a-radio-group buttonStyle="solid" v-model="allForm.isOpen">
-        <a-radio-button value="0">关闭</a-radio-button>
-        <a-radio-button value="1">开启</a-radio-button>
+        <a-radio-button :value="0">关闭</a-radio-button>
+        <a-radio-button :value="1">开启</a-radio-button>
       </a-radio-group>
     </a-form-item>
     <a-form-item
@@ -532,7 +532,7 @@ li:hover {
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       class="else-label"
-      v-if="allForm.isOpen == '1'"
+      v-if="allForm.isOpen == 1"
     >
       <a-checkbox :disabled="allForm.ageType != 'ageCustom'" :checked="allForm.noAgeBreak" @change="getAge"
         >不可突破年龄</a-checkbox
@@ -690,13 +690,13 @@ export default {
     platform(n, o) {
       if (n == 1 || n == 2) {
         // platform_os
-        this.allForm.platform_os = '1'
+        this.allForm.platform_os = 1
         // this.form.setFieldsValue({ platform_os: '1' })
       } else if (n == 3 || n == 4) {
-        this.allForm.platform_os = '2'
+        this.allForm.platform_os = 2
         // this.form.setFieldsValue({ platform_os: '2' })
       } else {
-        this.allForm.platform_os = '0'
+        this.allForm.platform_os = 0
         // this.form.setFieldsValue({ platform_os: '0' })
       }
     },
@@ -782,9 +782,9 @@ export default {
             appType: '0',
             fansStar: '0',
             interestVideo: '0',
-            platform_os: '0',
-            businessInterestType: '0',
-            isOpen: '0',
+            platform_os: 0,
+            businessInterestType: 0,
+            isOpen: 0,
             noAgeBreak: false,
             noGenderBreak: false,
             noAreaBreak: false
@@ -824,9 +824,9 @@ export default {
         appType: '0',
         fansStar: '0',
         interestVideo: '0',
-        platform_os: '0',
-        businessInterestType: '0',
-        isOpen: '0',
+        platform_os: 0,
+        businessInterestType: 0,
+        isOpen: 0,
         noAgeBreak: false,
         noGenderBreak: false,
         noAreaBreak: false,

+ 8 - 8
src/views/modules/kuaishouapp/groupCreate.vue

@@ -95,9 +95,9 @@
         :labelCol="{lg: {span: 7}, sm: {span: 7}}"
         :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
         <a-radio-group v-model="platformOs" @change="changePlatform">
-          <a-radio-button value='0'>不限</a-radio-button>
-          <a-radio-button value='1'>Android系统</a-radio-button>
-          <a-radio-button value='2'>IOS系统</a-radio-button>
+          <a-radio-button :value='0'>不限</a-radio-button>
+          <a-radio-button :value='1'>Android系统</a-radio-button>
+          <a-radio-button :value='2'>IOS系统</a-radio-button>
         </a-radio-group>
       </a-form-item>
 
@@ -452,7 +452,7 @@
         appId: '',
         redirectUrl: '',
         showPlatformOs: true,
-        platformOs: '0',
+        platformOs: 0,
         showAndroidOsa: false,
         androidOsv: '3',
         showIOSOsa: false,
@@ -478,10 +478,10 @@
 
 
       changePlatform() {
-        if (this.platformOs == '0') {
+        if (this.platformOs == 0) {
           this.showAndroidOsa = false;
           this.showIOSOsa = false;
-        } else if (this.platformOs == '1') {
+        } else if (this.platformOs == 1) {
           this.showAndroidOsa = true;
           this.showIOSOsa = false;
         } else {
@@ -709,9 +709,9 @@
             redundancyParams.appId = this.appId;
             redundancyParams.redirectUrl = this.redirectUrl;
             redundancyParams.platformOs = this.platformOs;
-            if (this.platformOs == '1') {
+            if (this.platformOs == 1) {
               redundancyParams.androidOsv = this.androidOsv
-            } else if (this.platformOs == '2') {
+            } else if (this.platformOs == 2) {
               redundancyParams.iosOsv = this.iosOsv
             }
 

+ 2 - 2
src/views/user/FStransfer.vue

@@ -58,7 +58,7 @@ export default {
         if(!this.code){
             this.code='code'
         }
-        getAction('sys/feishu/auth',{
+        getAction('/sys/feishu/auth',{
             code:this.code,
             state:this.state
         }).then((res)=>{
@@ -72,7 +72,7 @@ export default {
                 
             }else{
                 this.requestFailed(res)
-                this.$router.push({ name: 'login' })
+                this.$router.replace({ name: 'errorPage',query:{desc:res.message} })
             }
         });
 

+ 1 - 1
src/views/user/Login.vue

@@ -483,7 +483,7 @@
         window.location.href =
           "https://open.feishu.cn/open-apis/authen/v1/index?redirect_uri=http%3A%2F%2Fadsp.tjyourong.com.cn%2Fuser%2FFStransfer&app_id=cli_9e68af69ca34d00e&state=";
 
-
+        
         // getAction('/sys/feishu/url', {}).then((res) => {
         //   console.log(res);
         //   if (res.success) {

+ 2 - 2
vue.config.js

@@ -65,9 +65,9 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://192.168.1.23:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        target: 'http://192.168.1.23:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.22:8080', //请求本地 需要jeecg-boot后台项目  英豪
-        target: 'http://192.168.0.111:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.0.111:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.54:8080', //请求本地 需要jeecg-boot后台项目  孙震