zhuxinbo преди 5 години
родител
ревизия
3d7b9e97c6

+ 14 - 21
src/views/modules/Statistics/components/Treeselect.vue

@@ -58,29 +58,22 @@ export default {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     update(node, id) {
       console.log(node, id)
-      if (node.children == null) {
-        getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: node.id }).then(res => {
-          console.log(res)
-          if (res.code == 0) {
-            if (res.result.length > 0) {
-              node.children = res.result.map(item => {
-                return {
-                  id: item.accountId,
-                  label: item.authName + '         ' + item.userName
-                }
-              })
-              this.value = res.result.map(item => {
-                return item.accountId
-              })
-            } else {
-              this.$message.error('该项目下无账号')
-              this.value = []
-            }
+      getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: node.id }).then(res => {
+        console.log(res)
+        if (res.code == 0) {
+          if (res.result.length > 0) {
+            node.children = res.result.map(item => {
+              return {
+                id: item.accountId,
+                label: item.userName + '         ' + item.authName
+              }
+            })
           } else {
-            new Error('Failed to load options: network error.')
           }
-        })
-      }
+        } else {
+          new Error('Failed to load options: network error.')
+        }
+      })
     },
     emitValue() {
       this.$emit('update:appId', this.value)

+ 3 - 11
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -141,7 +141,7 @@ th div {
           typeThan="discountCostProportion"
         ></lifting>
       </a-col>
-      <a-col  :sm="24" :md="12" :xl="12" :xxl="5">
+      <a-col :sm="24" :md="12" :xl="12" :xxl="5">
         <lifting
           :kuaishou.sync="kuaishou"
           :active.sync="active"
@@ -150,7 +150,7 @@ th div {
           typeThan="photoClickProportion"
         ></lifting>
       </a-col>
-      <a-col  :sm="24" :md="12" :xl="12" :xxl="5">
+      <a-col :sm="24" :md="12" :xl="12" :xxl="5">
         <lifting
           :kuaishou.sync="kuaishou"
           :active.sync="active"
@@ -1088,15 +1088,7 @@ export default {
   watch: {},
   distoryed() {},
   mounted: function() {
-    this.$nextTick(() => {
-      getAdvertiserList().then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          this.list = res.result
-          this.options = res.result
-        }
-      })
-    })
+    this.$nextTick(() => {})
   }
 }
 </script>

+ 1 - 1
src/views/modules/advertiser/AdvertiserList.vue

@@ -307,7 +307,7 @@
         params.advertiserId = this.record.id;
         params.advertiser_name = this.record.name;
         params.userId = this.userInfo().id;
-        params.userName = this.userInfo().username
+        params.userName = this.userInfo().realname
         params.projectId = this.record.projectId
         params.projectName = this.record.projectName
 

+ 13 - 3
src/views/modules/advertiser/ProjectMemberList.vue

@@ -57,7 +57,7 @@
     <a-modal title="查看项目成员" v-model="visible" @ok="handleOk" width="800px">
       <div style="display:flex;line-height:50px;flex-wrap: wrap;">
         <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
-          <a-tag color="#2db7f5"
+          <a-tag color="#2db7f5" @close="log(item.id)" closable
             >{{ item.userName }}
             <a-divider type="vertical" />
             {{ item.roleCode | roleCode }}</a-tag
@@ -125,7 +125,7 @@
 
 <script>
 import ProjectMemberModal from './modules/ProjectMemberModal'
-import { httpAction, getAction } from '@/api/manage'
+import { httpAction, getAction, deleteAction } from '@/api/manage'
 
 import { mapGetters } from 'vuex'
 
@@ -154,6 +154,7 @@ export default {
         projectId: '',
         userId: ''
       },
+      projectId: '',
       user: '',
       tabListNoTitle: [
         {
@@ -238,6 +239,14 @@ export default {
       }
       this.member = jsonArr
     },
+    log(id) {
+      deleteAction('/ctop/projectMember/delete', { id: id }).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.getMemberList(this.projectId)
+        }
+      })
+    },
     onTabChange(key, type) {
       console.log(key, type)
       this[type] = key
@@ -363,6 +372,7 @@ export default {
     handleAdd() {},
     handleEdit(item) {
       if (this.noTitleKey == 'myProject') {
+        this.projectId = item.id
         this.getMemberList(item.id)
       } else {
         console.log(item)
@@ -380,7 +390,7 @@ export default {
       params.advertiserId = this.record.advertiserId
       params.advertiser_name = this.record.advertiserName
       params.userId = this.userInfo().id
-      params.userName = this.userInfo().username
+      params.userName = this.userInfo().realname
       params.projectId = this.record.projectId
       params.projectName = this.record.projectName