Explorar el Código

修改不限,人群包问题

朱鑫波 hace 3 años
padre
commit
4094951f8c

+ 3 - 3
src/views/modules/autoLaunch/directional/components/templateModal.vue

@@ -213,7 +213,7 @@ export default {
           this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
           this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
           this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
-          this.populationData.allForm.behaviorInterest = dataJson.label ? '1' : '0'
+          this.populationData.allForm.behaviorInterest = dataJson.label&&dataJson.label!='[]' ? '1' : '0'
           this.populationData.allForm.checkArr =
             this.populationData.allForm.appType == '2' ? JSON.parse(dataJson.appIds) : []
           this.populationData.projectId = dataJson.projectId + ''
@@ -252,8 +252,8 @@ export default {
                   templateName: values.templateName,
                   projectId: this.projectId,
                 }
-                params.label = JSON.stringify(params.behavior)
-                params.interestLabel = JSON.stringify(params.interest)
+                params.label = params.behavior?JSON.stringify(params.behavior):'[]'
+                params.interestLabel = params.interest?JSON.stringify(params.interest):'[]'
                 if (this.type == 'add') {
                   postAction('/kuaishouDirectionalPackage/createDirectionalPackage', params).then((res) => {
                     if (res.success) {

+ 1 - 1
src/views/modules/autoLaunch/material-all/components/templateModal.vue

@@ -185,7 +185,7 @@ export default {
           this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
           this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
           this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
-          this.populationData.allForm.behaviorInterest = dataJson.label=='[]' ? '1' : '0'
+          this.populationData.allForm.behaviorInterest = dataJson.label&&dataJson.label!='[]' ? '1' : '0'
           this.populationData.allForm.checkArr =
             this.populationData.allForm.appType == '2' ? JSON.parse(dataJson.appIds) : []
           this.populationData.projectId = dataJson.projectId + ''

+ 8 - 1
src/views/modules/crowd-control/crowd-control.vue

@@ -47,6 +47,7 @@
                 :columns="columns"
                 :dataSource="dataSource"
                 :pagination="false"
+                :loading="dataLoading"
             >
                 <span slot="action" slot-scope="text, record">
                     <a @click="handleEdit(record)">推送</a>
@@ -68,6 +69,7 @@
                 </span>
             </a-table>
             <a-pagination
+                v-if="dataSource.length>0"
                 class="pagin-table-class"
                 :total="totalAll"
                 :show-total="total => `共 ${totalAll} 条`"
@@ -262,6 +264,7 @@ export default {
     data() {
         let that = this;
         return {
+            dataLoading: false,
             src: '/kuaishouPopulationPackage/getAccountByProjectId',
             unitAccountId: '',
             personResourceDisabled: false,
@@ -509,16 +512,20 @@ export default {
                 pageNo: this.tablePag.page,
                 pageSize: this.tablePag.size
             };
-            this.dataSource = []
+            this.dataSource = [];
+            this.dataLoading = true;
             getAction('/kuaishouPopulationPackage/list', paramsData).then(result => {
                 if (result.code === 200) {
+                    this.dataLoading = false;
                     this.dataSource = result.result.list || [];
                     this.totalAll = result.result.total || 0;
                 }
                 else {
+                    this.dataLoading = false;
                     this.$message.error(result.message);
                 }
             }).catch(error => {
+                this.dataLoading = false;
                 console.log(error, 'eeee');
             });
         },