浏览代码

智能投放v2.0-基本测试完毕

朱鑫波 3 年之前
父节点
当前提交
794632058d
共有 1 个文件被更改,包括 33 次插入12 次删除
  1. 33 12
      src/views/modules/autoLaunchRevision/createLaunch.vue

+ 33 - 12
src/views/modules/autoLaunchRevision/createLaunch.vue

@@ -27,6 +27,7 @@
 }
 }
 .card-person {
 .card-person {
     width: 300px;
     width: 300px;
+    margin-right: 10px;
     /deep/.ant-card-body {
     /deep/.ant-card-body {
         padding: 0px;
         padding: 0px;
     }
     }
@@ -47,7 +48,7 @@
     display: flex;
     display: flex;
     flex-wrap: wrap;
     flex-wrap: wrap;
     margin-right: -10px;
     margin-right: -10px;
-    justify-content: space-between;
+    justify-content: flex-start;
     .card-item {
     .card-item {
         width: calc(33% - 10px);
         width: calc(33% - 10px);
         margin-bottom: 10px;
         margin-bottom: 10px;
@@ -1870,7 +1871,7 @@ li.chouzhen.first:before {
                         :title="item.targetName"
                         :title="item.targetName"
                         class="card-person card-item"
                         class="card-person card-item"
                         v-for="(item, index) in personList"
                         v-for="(item, index) in personList"
-                        :key="index"
+                        :key="item.id"
                     >
                     >
                         <div slot="extra">
                         <div slot="extra">
                             <a-checkbox :value="item.id" @change="setData(item.id)"></a-checkbox>
                             <a-checkbox :value="item.id" @change="setData(item.id)"></a-checkbox>
@@ -3461,7 +3462,9 @@ export default {
                                     appId: { key: result.result[0].appId },
                                     appId: { key: result.result[0].appId },
                                     schemaUri: res.result.schemaUri,
                                     schemaUri: res.result.schemaUri,
                                     useChannel: this.useChannel,
                                     useChannel: this.useChannel,
-                                    siteId: data.siteId
+                                    siteId: data.siteId,
+                                    useAppMarket: data.useAppMarket ? (data.useAppMarket == 1 ? true : false) : false,
+                                    appStore: data.appStore ? JSON.parse(data.appStore) : []
                                 }
                                 }
                             }
                             }
                         })
                         })
@@ -3597,7 +3600,9 @@ export default {
                                 ...res[1],
                                 ...res[1],
                                 ...res[2],
                                 ...res[2],
                                 ...this.showCreativeData,
                                 ...this.showCreativeData,
-                                ...this.formInformaData
+                                ...this.formInformaData,
+                                appStore: this.appDetail.appStore ? JSON.stringify(this.appDetail.appStore) : '[]',
+                                useAppMarket: this.appDetail.useAppMarket
                             }
                             }
                             if (this.budgetType === '2') {
                             if (this.budgetType === '2') {
                                 params.campaignDayBudget = params.campaignDayBudget * 1000
                                 params.campaignDayBudget = params.campaignDayBudget * 1000
@@ -3676,6 +3681,7 @@ export default {
                             params.sourceMaterial = JSON.stringify(params.sourceMaterial)
                             params.sourceMaterial = JSON.stringify(params.sourceMaterial)
                             params.sceneId = JSON.stringify(params.sceneId)
                             params.sceneId = JSON.stringify(params.sceneId)
                             params.autoTargetArray = JSON.stringify(params.autoTargetArray)
                             params.autoTargetArray = JSON.stringify(params.autoTargetArray)
+                            params.useAppMarket = params.useAppMarket ? 1 : 0
                             if (this.$route.query.id) {
                             if (this.$route.query.id) {
                                 params.id = this.$route.query.id
                                 params.id = this.$route.query.id
                                 this.postDataAction('/auto/aiKuaishouAccountAutoStrategy/edit', params).then(res => {
                                 this.postDataAction('/auto/aiKuaishouAccountAutoStrategy/edit', params).then(res => {
@@ -3893,13 +3899,14 @@ export default {
                 this.checkPersonElse.push(...data)
                 this.checkPersonElse.push(...data)
                 this.checkPersonElse = [...new Set(this.checkPersonElse)]
                 this.checkPersonElse = [...new Set(this.checkPersonElse)]
             } else {
             } else {
-                data.findIndex(item => item === this.checkPersonOne) > -1
-                this.checkPersonElse.splice(
-                    this.checkPersonElse.findIndex(item => item === this.checkPersonOne),
-                    1
-                )
+                if (this.checkPersonElse.findIndex(item => item === this.checkPersonOne) > -1) {
+                    this.checkPersonElse.splice(
+                        this.checkPersonElse.findIndex(item => item === this.checkPersonOne),
+                        1
+                    )
+                }
             }
             }
-
+            console.log(data, this.checkPersonOne, this.checkPersonElse)
             this.sumContent = this.checkPersonElse.length
             this.sumContent = this.checkPersonElse.length
             var dataCount = 10
             var dataCount = 10
             if (this.sumContent > dataCount) {
             if (this.sumContent > dataCount) {
@@ -4351,11 +4358,25 @@ export default {
                     params.ids = id
                     params.ids = id
                     that.getAction('/auto/aiKuaishouAccountAutoTarget/deleteBatch', params).then(res => {
                     that.getAction('/auto/aiKuaishouAccountAutoTarget/deleteBatch', params).then(res => {
                         if (res.success) {
                         if (res.success) {
-                            var index = that.checkPerson.findIndex(item => item.id == id)
+                            var index = that.checkPerson.findIndex(item => item == id)
+                            var indexAll = that.checkPersonElse.findIndex(item => item == id)
+                            var indexShow = that.showCheckPerson.findIndex(item => item.id == id)
                             if (index > -1) {
                             if (index > -1) {
                                 that.checkPerson.splice(index, 1)
                                 that.checkPerson.splice(index, 1)
                             }
                             }
-                            that.getTargetPerson()
+                            if (indexAll > -1) {
+                                that.checkPersonElse.splice(index, 1)
+                            }
+                            if (indexShow > -1) {
+                                that.showCheckPerson.splice(index, 1)
+                            }
+
+                            that.$nextTick(() => {
+                                that.checkPerson = that.checkPersonElse
+                                that.sumContent = that.checkPersonElse.length
+
+                                that.getTargetPerson()
+                            })
                         } else {
                         } else {
                             that.$message.error(res.messsage)
                             that.$message.error(res.messsage)
                         }
                         }