朱鑫波 %!s(int64=4) %!d(string=hai) anos
pai
achega
519990abee

+ 31 - 0
src/views/modules/autoLaunch/application/application.vue

@@ -44,6 +44,9 @@
                             <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
                             <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button">重置</a-button>
                             <a-button type="primary" @click="addNewApp(null)">添加应用</a-button>
+                             <a-button type="primary" @click="handleUpdatePerson"  class="middle-button" v-if="realShow" :loading="realLoading">
+                                更新应用
+                            </a-button>
                         </span>
                         
                     </a-col>
@@ -338,6 +341,7 @@ import selectTable from '@/views/modules/Statistics/components/selectPagination.
 import BMF from 'browser-md5-file';
 import creatApplication from './components/creatApplication.vue'
 import editApplication from './components/editApplication.vue'
+import { mapGetters } from 'vuex'
 let retargetColumns=[
     {
         title: '人群包',
@@ -561,6 +565,8 @@ export default {
             acountRelaxDetail: {},
             causeDetailData: {},
             editPerson: null,
+            realShow: false,
+            realLoading: false
         };
     },
     watch: {
@@ -648,9 +654,18 @@ export default {
         this.form = this.$form.createForm(this);
     },
     mounted() {
+        this.realShow = this.userInfo().realname === '管理员' ? true : false
+        if(!this.realShow) {
+            getAction('/kuaishou/batch/syncUserAppList',{ userId:this.userInfo().id, type:0}).then(res => {
+                if(res.success) {
+                    // this.$message.success('更新成功');
+                }
+            })
+        }
         this.handleGetTableList({});
     },
     methods: {
+        ...mapGetters(['nickname', 'avatar', 'userInfo']),
         addNewApp() {   
             this.$refs.application.showApplication()
         },
@@ -1078,6 +1093,22 @@ export default {
             this.$refs.selectTable.keyValue = "";
             this.$refs.selectTable.getData()
         },
+        handleUpdatePerson() {
+            if(this.realShow) {
+                this.realLoading = true;
+                getAction('/kuaishou/batch/syncUserAppList',{ userId:this.userInfo().id, type:0}).then(res => {
+                    if(res.success) {
+                        this.$message.success('更新成功');
+                        this.realLoading = false;
+                        this.handleResetForm();
+                    }
+                    else {
+                        this.realLoading = false;
+                        this.$message.error('更新失败');
+                    }
+                })
+            }
+        },
     }
 };
 </script>

+ 32 - 2
src/views/modules/crowd-control/crowd-control.vue

@@ -25,9 +25,12 @@
                         <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                             <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
                             <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button">重置</a-button>
-                             <a-button type="primary" @click="handleUploadPerson">
+                             <a-button type="primary" @click="handleUploadPerson" class="middle-button">
                                 上传人群包
                             </a-button>
+                             <a-button type="primary" @click="handleUpdatePerson" v-if="realShow" :loading="realLoading">
+                                更新人群
+                            </a-button>
                            
                         </span>
                         
@@ -243,7 +246,7 @@ import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
 import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
 import AppMarketService from './crowd-control-service';
 import BMF from 'browser-md5-file';
-
+import { mapGetters } from 'vuex';
 let COS = require('cos-js-sdk-v5');
 let cos = new COS({
     SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
@@ -394,6 +397,8 @@ export default {
                     this.handleAcountRelax(this.relaxStatus  ,this.acountRelaxDetail)
                 }
             },
+            realShow: false,
+            realLoading: false
         };
     },
     watch: {
@@ -407,9 +412,18 @@ export default {
         this.form = this.$form.createForm(this);
     },
     mounted() {
+        this.realShow = this.userInfo().realname === '管理员' ? true : false
+        if(!this.realShow) {
+            getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:1}).then(res => {
+                if(res.success) {
+
+                }
+            })
+        }
         this.handleGetTableList({});
     },
     methods: {
+        ...mapGetters(['nickname', 'avatar', 'userInfo']),
         handleAgian(val) {
             let params = {};
             params.id = val.id;
@@ -726,6 +740,22 @@ export default {
         handleUploadPerson() {
             this.personVisible = true;
         },
+        handleUpdatePerson() {
+            if(this.realShow) {
+                this.realLoading = true;
+                getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:0}).then(res => {
+                    if(res.success) {
+                        this.realLoading = false;
+                        this.$message.success('更新成功');
+                        this.handleResetForm();
+                    }
+                    else {
+                        this.realLoading = false;
+                        this.$message.error('更新失败');
+                    }
+                })
+            }
+        },
         handleOk() {
             this.$refs.ruleForm.validate(valid => {
                 if (valid) {

+ 2 - 2
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
@@ -86,7 +86,7 @@ module.exports = {
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',
-       target:'http://139.186.165.84:8806', //测试
+      //  target:'http://139.186.165.84:8806', //测试
 
         ws: false,