Ver código fonte

用户热力图

lihongxiao 1 ano atrás
pai
commit
41020b74da

+ 3 - 2
src/views/PeopleManage/PcLoginRecord.vue

@@ -313,7 +313,7 @@ export default {
     return {
       deptPeopleVisible: false,
       deptPeopleType: 0,
-      deptPeopleId: '',
+      deptPeopleId: null,
       ztreeNodes: [],
       ztreeNodeAll: {},
       deptPeopleValue: true,
@@ -486,7 +486,7 @@ export default {
     },
 
     queryAnalysis(param) {
-      this.$api.user.ipAddrGetPcAddress({ source: this.source, ...param }).then((res) => {
+      this.$api.user.ipAddrGetPcAddress({ source: this.source, ...param,type:this.deptPeopleType,queryId:this.deptPeopleId  }).then((res) => {
         if (res.code == 200) {
           this.onlineHisData = res.data.onlineNum
           this.formatAnalysisDate(res.data.list)
@@ -510,6 +510,7 @@ export default {
                 id: item.id,
                 userId: item.userId,
                 address: item.address,
+                deptName: item.deptName,
                 leaderName: item.leaderName ? item.leaderName : '无',
                 // onlineImg: item.status ? "Frame-1(2).png" : "Frame(2).png",
                 onlineImg: "Frame-1(2).png",

+ 10 - 2
src/views/PeopleManage/UserMap.vue

@@ -324,7 +324,7 @@ export default {
     return {
       deptPeopleVisible:false,
       deptPeopleType:0,
-      deptPeopleId:'',
+      deptPeopleId:null,
       ztreeNodes:[],
       ztreeNodeAll:{},
       deptPeopleValue:true,
@@ -492,7 +492,14 @@ export default {
       this.queryAnalysis({ startTime: val[0], endTime: val[1] });
     },
     queryAnalysis(param) {
-      this.$api.user.getGeographyPosition({ source: this.source, ...param }).then((res) => {
+      // let data={}
+      // if(this.deptPeopleType==1){
+      //   data={
+      //     type:this.deptPeopleType,
+      //     queryId:this.deptPeopleId
+      //   }
+      // }
+      this.$api.user.getGeographyPosition({ source: this.source, ...param,type:this.deptPeopleType,queryId:this.deptPeopleId }).then((res) => {
         if (res.code == 200) {
           this.onlineHisData = res.data.onlineNum
           this.formatAnalysisDate(res.data.list)
@@ -513,6 +520,7 @@ export default {
                 userName: item.userName,
                 id: item.userId,
                 address: item.address,
+                deptName: item.deptName,
                 onlineImg: item.status ? "Frame-1(2).png" : "Frame(2).png",
                 // status: item.status ? "在线" : "离线",
                 status: item.status ? "#1CE247" : "#B2B2B2",