Browse Source

修改携带参数跳转个人页

朱鑫波 4 years ago
parent
commit
436551323d

+ 16 - 2
src/views/modules/stockWatch/modules/keep-manage/keep-manage.vue

@@ -3,7 +3,7 @@
         <a-spin :spinning="accountPageSpinning">
             <a-row :gutter="24">
                 <a-col :sm="18" :md="18" :xl="18" class="keep-manage-col">
-                    <a-card title="运营人员" class="card-content echarts-card">
+                    <a-card title="数据趋势" class="card-content echarts-card">
                         <div class="person-content-title" slot="extra">
                             <div class="content-title-acount"></div>
                             <div class="content-title-checkout">
@@ -107,7 +107,13 @@
                         :loading="echartsLoading"
                         ref="accountTable"
                         >
-                            <a-table-column key="realName" data-index="realName" title="运营人员" align="center"/>
+                            <a-table-column key="realName" data-index="realName" title="运营人员" align="center">
+                                <template slot-scope="tags,records">
+                                    <a @click="toPerson(records)">
+                                        {{ tags }}
+                                    </a>
+                                </template>
+                            </a-table-column>
                             <a-table-column key="accountCount" data-index="accountCount" title="账户数量"  align="center"/>
                             <a-table-column key="charge" data-index="charge" title="花费"  align="center"/>
                             <a-table-column key="weekCharge" data-index="weekCharge"  align="center">
@@ -545,6 +551,14 @@ export default {
             this.getPersonList();
         },
 
+        //跳转个人页面
+        toPerson(records) {
+
+            this.$nextTick(() => {
+                this.$router.push('/modules/stockWatch/modules/keep-person/keep-person?person=' + records.userId );
+            })
+        },
+
         //点击跳转盯盘详情页
         toDetail(item) {
             let params = {};

+ 2 - 2
src/views/modules/stockWatch/modules/keep-person/keep-person.vue

@@ -361,7 +361,7 @@ export default {
         //获取个人绩效
         getPersonAchievements() {
             let params = {}
-            params.userId = this.userInfo().id
+            params.userId = this.$route.query.person ? this.$route.query.person : this.userInfo().id;
             this.getAction('/etl/reportAccountHourly/personalAchievements', params).then(res => {
                 if(res.success) {
                     this.personData = res.result
@@ -378,7 +378,7 @@ export default {
         getPersonList(data) {
             this.loading = true;
             let params = {};
-            params.userId = this.userInfo().id;
+            params.userId = this.$route.query.person ? this.$route.query.person : this.userInfo().id;;
             params.startTime = this.dateValue.length === 2 ? moment(this.dateValue[0]).format('YYYY-MM-DD') : null;
             params.endTime = this.dateValue.length === 2 ? moment(this.dateValue[1]).format('YYYY-MM-DD') : null;
             params.pageNo = this.ipagination.current;