Pārlūkot izejas kodu

bi大数据

newStyle
风继续吹 pirms 1 gada
vecāks
revīzija
c1fbc6cf79
38 mainītis faili ar 3045 papildinājumiem un 263 dzēšanām
  1. Binārs
      public/img/bidata/bgdsada@x2.png
  2. Binārs
      public/img/bidata/head.png
  3. Binārs
      public/img/bidata/ic_bg1@2x.png
  4. Binārs
      public/img/bidata/ic_bg2@2x.png
  5. Binārs
      public/img/bidata/ic_bg3@2x.png
  6. Binārs
      public/img/bidata/ic_bg4@2x.png
  7. Binārs
      public/img/bidata/ic_bg5@2x.png
  8. Binārs
      public/img/bidata/ic_bg@2x.png
  9. Binārs
      public/img/bidata/ic_map_bg@2x.png
  10. Binārs
      public/img/bidata/ic_sssp_bg@2x.png
  11. Binārs
      public/img/bidata/itembg.png
  12. Binārs
      public/img/bidata/jiedailiang@2x.png
  13. Binārs
      public/img/bidata/listbg1@2x.png
  14. Binārs
      public/img/bidata/listbg@2x.png
  15. Binārs
      public/img/bidata/lsideActive.png
  16. Binārs
      public/img/bidata/rsideActive.png
  17. Binārs
      public/img/bidata/titlebg@2x.png
  18. Binārs
      public/img/bidata/titlelside.png
  19. Binārs
      public/img/bidata/wei.png
  20. Binārs
      public/img/bidata/weu@2x.png
  21. Binārs
      public/img/sohu.png
  22. Binārs
      public/sh.png
  23. +1
    -1
      src/App.vue
  24. +58
    -1
      src/api/modules/http.js
  25. +7
    -7
      src/mixins/color.js
  26. +2129
    -0
      src/page/bi/bi.vue
  27. +58
    -0
      src/page/bi/common/title.vue
  28. +511
    -0
      src/page/bi/index.js
  29. +8
    -2
      src/page/check/index.vue
  30. +2
    -0
      src/page/index/index.vue
  31. +2
    -2
      src/page/index/logo.vue
  32. +60
    -54
      src/page/index/sidebar/sidebarItem.vue
  33. +3
    -1
      src/page/index/top/index.vue
  34. +19
    -4
      src/page/index/top/top-menu.vue
  35. +0
    -2
      src/page/login/index.vue
  36. +168
    -171
      src/router/page/index.js
  37. +18
    -17
      src/store/modules/user.js
  38. +1
    -1
      src/views/Statistics/reportDetail.vue

Binārs
public/img/bidata/bgdsada@x2.png Parādīt failu

Pirms Pēc
Platums: 1868  |  Augstums: 50  |  Izmērs: 12 KiB

Binārs
public/img/bidata/head.png Parādīt failu

Pirms Pēc
Platums: 3840  |  Augstums: 132  |  Izmērs: 87 KiB

Binārs
public/img/bidata/ic_bg1@2x.png Parādīt failu

Pirms Pēc
Platums: 336  |  Augstums: 336  |  Izmērs: 75 KiB

Binārs
public/img/bidata/ic_bg2@2x.png Parādīt failu

Pirms Pēc
Platums: 336  |  Augstums: 336  |  Izmērs: 80 KiB

Binārs
public/img/bidata/ic_bg3@2x.png Parādīt failu

Pirms Pēc
Platums: 336  |  Augstums: 336  |  Izmērs: 72 KiB

Binārs
public/img/bidata/ic_bg4@2x.png Parādīt failu

Pirms Pēc
Platums: 336  |  Augstums: 336  |  Izmērs: 73 KiB

Binārs
public/img/bidata/ic_bg5@2x.png Parādīt failu

Pirms Pēc
Platums: 336  |  Augstums: 336  |  Izmērs: 72 KiB

Binārs
public/img/bidata/ic_bg@2x.png Parādīt failu

Pirms Pēc
Platums: 3840  |  Augstums: 2160  |  Izmērs: 4.9 MiB

Binārs
public/img/bidata/ic_map_bg@2x.png Parādīt failu

Pirms Pēc
Platums: 1872  |  Augstums: 1084  |  Izmērs: 51 KiB

Binārs
public/img/bidata/ic_sssp_bg@2x.png Parādīt failu

Pirms Pēc
Platums: 1872  |  Augstums: 488  |  Izmērs: 28 KiB

Binārs
public/img/bidata/itembg.png Parādīt failu

Pirms Pēc
Platums: 444  |  Augstums: 228  |  Izmērs: 13 KiB

Binārs
public/img/bidata/jiedailiang@2x.png Parādīt failu

Pirms Pēc
Platums: 270  |  Augstums: 76  |  Izmērs: 12 KiB

Binārs
public/img/bidata/listbg1@2x.png Parādīt failu

Pirms Pēc
Platums: 224  |  Augstums: 224  |  Izmērs: 69 KiB

Binārs
public/img/bidata/listbg@2x.png Parādīt failu

Pirms Pēc
Platums: 296  |  Augstums: 216  |  Izmērs: 23 KiB

Binārs
public/img/bidata/lsideActive.png Parādīt failu

Pirms Pēc
Platums: 44  |  Augstums: 28  |  Izmērs: 1.0 KiB

Binārs
public/img/bidata/rsideActive.png Parādīt failu

Pirms Pēc
Platums: 44  |  Augstums: 28  |  Izmērs: 1.0 KiB

Binārs
public/img/bidata/titlebg@2x.png Parādīt failu

Pirms Pēc
Platums: 920  |  Augstums: 96  |  Izmērs: 4.0 KiB

Binārs
public/img/bidata/titlelside.png Parādīt failu

Pirms Pēc
Platums: 76  |  Augstums: 76  |  Izmērs: 2.5 KiB

Binārs
public/img/bidata/wei.png Parādīt failu

Pirms Pēc
Platums: 260  |  Augstums: 30  |  Izmērs: 2.1 KiB

Binārs
public/img/bidata/weu@2x.png Parādīt failu

Pirms Pēc
Platums: 516  |  Augstums: 278  |  Izmērs: 116 KiB

Binārs
public/img/sohu.png Parādīt failu

Pirms Pēc
Platums: 104  |  Augstums: 104  |  Izmērs: 6.2 KiB Platums: 1600  |  Augstums: 1600  |  Izmērs: 206 KiB

Binārs
public/sh.png Parādīt failu

Pirms Pēc
Platums: 400  |  Augstums: 400  |  Izmērs: 45 KiB Platums: 1600  |  Augstums: 1600  |  Izmērs: 206 KiB

+ 1
- 1
src/App.vue Parādīt failu

@@ -1,6 +1,6 @@
<template>
<div id="app">
<router-view/>
<router-view></router-view>
</div>
</template>



+ 58
- 1
src/api/modules/http.js Parādīt failu

@@ -1341,4 +1341,61 @@ export function findHouseListByAccount(params) {
method: 'get',
params
})
}
}


/**
* Bi数据模块
*
*/

// 用户总览
export function biDataOverview(data) {
return request({
url: 'autoSR/biData/dataOverview',
method: 'post',
data
})
}

// 获取公司接口
export function biGetOrgCodeList(params) {
return request({
url: 'autoSR/monthly/getOrgCodeList',
method: 'get',
params
})
}



// bi总览弹窗
export function biChooseDataTable(params) {
return request({
url: 'autoSR/biData/chooseDataTable',
method: 'get',
params
})
}



// bi案场详情顶部对比数据
export function biTopStatisticData(data) {
return request({
url: 'autoSR/biData/topStatisticData',
method: 'post',
data
})
}


// bi案场详情柱状图数据
export function biRankingData(data) {
return request({
url: 'autoSR/biData/rankingData',
method: 'post',
data
})
}


+ 7
- 7
src/mixins/color.js Parādīt failu

@@ -8,13 +8,13 @@ export default function() {
themeVal: ORIGINAL_THEME
}
},
created() {
if (document.domain == 'focus.hfju.com' || document.domain == 'focus.aihxz.com' || document.domain == 'localhost') {
this.themeVal = '#ff4500'
} else {
this.themeVal = this.theme
}
},
// created() {
// if (document.domain == 'focus.hfju.com' || document.domain == 'focus.aihxz.com' || document.domain == 'localhost') {
// this.themeVal = '#ff4500'
// } else {
// this.themeVal = this.theme
// }
// },
watch: {
themeVal(val, oldVal) {
console.log(val, oldVal)


+ 2129
- 0
src/page/bi/bi.vue
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 58
- 0
src/page/bi/common/title.vue Parādīt failu

@@ -0,0 +1,58 @@
<template>
<div class="title">
<div class="lside">
<img src="/img/bidata/titlelside.png" alt="" />
<span>{{ title }}</span>
</div>
<div class="rside">
<slot name="rside"></slot>
</div>
</div>
</template>

<script>
export default {
name: 'titles',
props: {
title: {
type: String,
default: "",
},
},
};
</script>

<style lang="scss" scoped>
.title {
flex-shrink: 0;
width: 100%;
height: 48px;
display: flex;
align-items: center;
background: url("/img/bidata/titlebg@2x.png") no-repeat;
background-size: 100% 100%;

.lside {
flex-grow: 1;
display: flex;
align-items: center;

img {
margin-right: 2px;
width: 38px;
height: 38px;
}

span {
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #34dbfc;
}
}

.rside {
flex-shrink: 0;
}
}
</style>

+ 511
- 0
src/page/bi/index.js Parādīt failu

@@ -0,0 +1,511 @@
// 定义循环所展示table的表头
// 录音未开启
const recordingNotTurned = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '设备号',
showParams: 'imei',
},
{
showTitle: '设备状态',
showParams: 'onLine',
},
{
showTitle: '顾问',
showParams: 'agentName',
},
{
showTitle: '接待开启时间',
showParams: 'startTime',
},
]

// 录音未合并
const recordingNotMerged = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '顾问',
showParams: 'agentName',
},
{
showTitle: '设备号',
showParams: 'imei',
},
{
showTitle: '接待开启时间',
showParams: 'startTime',
},
{
showTitle: '客户姓名',
showParams: 'name',
},
]

// 录音待上传
const RecordingToBeUploaded = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '设备号',
showParams: 'imei',
},
{
showTitle: '设备状态',
showParams: 'onLine',
},
{
showTitle: '顾问',
showParams: 'agentName',
},
{
showTitle: '待上传文件',
showParams: 'fileCount',
},
]

// 违禁待处理
const ProhibitedPendingProcessing = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '数量',
showParams: 'value',
},
]

// 无效待审核
const InvalidPendingReview = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '数量',
showParams: 'value',
},
]
// 正在接待
const Receiving = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '顾问',
showParams: 'agentName',
},
{
showTitle: '接待开启时间',
showParams: 'startTime',
},
]

// 无录音
const NoRecording = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '数量',
showParams: 'value',
},
]

// 平均销讲执行率
const AverageSalesExecutionRate = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '执行率',
showParams: 'value',
},
]

// 平均接待时长
const AverageReceptionDuration = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '时长',
showParams: 'value',
},
]

// 复访接待
const FollowUpReception = [
{
showTitle: '项目',
showParams: 'houseName',
},
{
showTitle: '数量',
showParams: 'value',
},
]

const caseRankingList = [
{
title: '接待量',
params: 'receptionCount',
unit: '次',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '有效接待',
params: 'activeCustomer',
unit: '次',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '复访接待',
params: 'visitRecord',
unit: '次',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '违禁接待',
params: 'prohibitedCount',
unit: '次',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '平均接待时长',
params: 'avgDuration',
unit: '分',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '平均销讲执行率',
params: 'avgFraction',
unit: '%',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '平均挖掘执行率',
params: 'avgWordFraction',
unit: '%',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
{
title: '平均挖掘成功率',
params: 'avgWordFinishFraction',
unit: '%',
resultA: 0, // 展示数据
resultB: 0, // 上升下降
},
]

const ruleTypeList = [
{
title: '前10名',
value: 1,
},
{
title: '后10名',
value: 2,
},
]
const rankingTypeList = [
{
title: '按项目',
value: 1,
disabled: false
},
{
title: '按城市',
value: 2,
disabled: false
},
{
title: '按区域',
value: 3,
disabled: true
},
]

const lsideDataList = [
{
title: "接待量排名 (Top10)",
params: "receptionRankingByHouseTop10", //接待排名(按项目)
params1: "receptionRankingByCityTop10", // 接待排名(按城市)

activeName: "receptionRankingByHouseTop10", //
},
{
title: "有效接待排名 (Top10)",
params: "activeReceptionByHouseTop10", //
params1: "activeReceptionByCityTop10", // 接待排名(按城市)

activeName: "activeReceptionByHouseTop10", //
},
{
title: "违禁接待排名 (Top10)",
params: "violatedReceptionByHouseTop10", //
params1: "violatedReceptionByCityTop10", // 接待排名(按城市)

activeName: "violatedReceptionByHouseTop10", //
},
{
title: "复访接待排名 (Top10)",
params: "visitReceptionByHouseTop10", //
params1: "visitReceptionByCityTop10", // 接待排名(按城市)

activeName: "visitReceptionByHouseTop10", //
},
]

const rsideDataList = [
// 右侧菜单列表
{
title: "到访次数分布",
params: "visitReceptionDistribute", //
},
{
title: "无效接待原因分布",
params: "invalidReceptionDistribute", //
},
{
title: "客户意向度分布",
params: "levelFractionDistribute", //
},
{
title: "客户等级分布",
params: "systemLevelDistribute", //
},
]

const jiedaiList = [
{
title: "正在接待",
params: "receptionNow", // 对应后端字段名
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 6, // 接口入参
tableListName: "Receiving", // 对应index.js里的常量名称
},
{
title: "无录音",
params: "noRecording", // 对应后端字段名
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 7, // 接口入参
tableListName: "NoRecording", // 对应index.js里的常量名称
},
{
title: "平均销讲执行率",
params: "avgFraction", // 对应后端字段名
unit: "%",
bgImg: "/img/bidata/listbg1@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 8, // 接口入参
tableListName: "AverageSalesExecutionRate", // 对应index.js里的常量名称
},
{
title: "平均接待时长",
params: "avgDuration", // 对应后端字段名
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 9, // 接口入参
tableListName: "AverageReceptionDuration", // 对应index.js里的常量名称
},
{
title: "复访接待",
params: "visitRecord", // 对应后端字段名
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 10, // 接口入参
tableListName: "FollowUpReception", // 对应index.js里的常量名称
},
]

const stayHandleList = [
{
title: "录音未开启",
params: "notOpenRecord", // 对应后端字段名
img: "/img/bidata/ic_bg1@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#F74E52", // 字体颜色
dataType: 1, // 接口入参
tableListName: "recordingNotTurned", // 对应index.js里的常量名称
},
{
title: "录音未合并",
params: "notMergeRecord", // 对应后端字段名
img: "/img/bidata/ic_bg5@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 2, // 接口入参
tableListName: "recordingNotMerged", // 对应index.js里的常量名称
},
{
title: "录音待上传",
params: "notUploadFile", // 对应后端字段名
img: "/img/bidata/ic_bg2@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 3, // 接口入参
tableListName: "RecordingToBeUploaded", // 对应index.js里的常量名称
},
{
title: "违禁待处理",
params: "violatedCount", // 对应后端字段名
img: "/img/bidata/ic_bg3@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#F74E52", // 字体颜色
dataType: 4, // 接口入参
tableListName: "ProhibitedPendingProcessing", // 对应index.js里的常量名称
},
{
title: "无效待审核",
params: "auditReception", // 对应后端字段名
img: "/img/bidata/ic_bg4@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 5, // 接口入参
tableListName: "InvalidPendingReview", // 对应index.js里的常量名称
},
]
const dateSelect = [
{
title: "近7天",
value: 1,
},
{
title: "近15天",
value: 3,
},
{
title: "近30天",
value: 2,
},
]

const headList = [
{
title: "实时总览",
showInput: false,
show: false,
methods: "initPageRealTimeOverview",
},
{
title: "接待分析",
showInput: true,
show: false,
methods: "",
},
{
title: "销讲执行分布",
showInput: true,
show: false,
methods: "",
},
{
title: "案场排名",
showInput: false,
show: false,
methods: "initCaseRanking",
},
{
title: "设备监控中心",
showInput: true,
show: false,
methods: "",
},
{
title: "违禁预警",
showInput: false,
show: false,
methods: "",
},
]

// 案场排名柱状图
const rankingEchartsBarList = [
{
title: "接待量排名(top10)",
params: 'receptionRanking',
},
{
title: "有效接待排名(top10)",
params: 'activeCustomerRanking',
},
{
title: "违禁接待排名(top10)",
params: 'visitRecordRanking',
},
{
title: "复访接待排名(top10)",
params: 'prohibitedRanking',
},
{
title: "平均接待时长排名(top10)",
params: 'avgDurationRanking',
},
{
title: "平均销讲执行排名(top10)",
params: 'avgFractionRanking',
},
{
title: "平均挖掘执行排名(top10)",
params: 'avgWordFractionRanking',
},
{
title: "平均挖掘成功排名(top10)",
params: 'avgWordFinishFractionRanking',
},
]

export {
recordingNotTurned,
recordingNotMerged,
RecordingToBeUploaded,
Receiving,
ProhibitedPendingProcessing,
InvalidPendingReview,
NoRecording,
AverageSalesExecutionRate,
AverageReceptionDuration,
FollowUpReception,
caseRankingList,
ruleTypeList,
rankingTypeList,
lsideDataList,
rsideDataList,
jiedaiList,
stayHandleList,
dateSelect,
headList,
rankingEchartsBarList,
}

+ 8
- 2
src/page/check/index.vue Parādīt failu

@@ -11,7 +11,7 @@
<!-- 质控后台 -->
<div class="tab" @click="goindex(0)" v-if="tabFlag1">
<div>
<img v-if="url == 'focus.hfju.com' || url == 'focus.aihxz.com' || url == 'localhost'" src="/img/sohu.png" alt="" style="padding: 8px 0;"/>
<img class="imgs" v-if="url == 'focus.hfju.com' || url == 'focus.aihxz.com' || url == 'localhost'" src="/img/sohu.png" alt="" style="padding: 8px 0;"/>
<img v-else src="/logoPng.png" alt="" style="padding: 8px 0;"/>
</div>
<div class="text">AI销讲助手后台</div>
@@ -324,10 +324,16 @@ export default {
height: 88px;
width: 88px;
margin-top: 47px;
margin-bottom: 30px;
}
.imgs {
width: 100px;
height: 110px;
margin-top: 35px;
margin-bottom: 18px;
}
.text {
font-size: 20px;
margin-top: 30px;
color: #333333;
line-height: 20px;
}


+ 2
- 0
src/page/index/index.vue Parādīt failu

@@ -99,6 +99,8 @@ export default {
// console.log(data,'这里是data');
if (data.length !== 0) {
this.$router.$avueRouter.formatRoutes(data, true);
console.log(this.$router)
// this.$router.options.routes.find
}
});
},


+ 2
- 2
src/page/index/logo.vue Parādīt failu

@@ -71,8 +71,8 @@ export default {
}
.logoIcons {
display: block;
width: 50px;
height: 38px;
width: 40px;
height: 40px;
background: url('/img/sohu.png') no-repeat;
background-size: 100%;
}


+ 60
- 54
src/page/index/sidebar/sidebarItem.vue Parādīt failu

@@ -5,31 +5,34 @@
v-if="validatenull(item[childrenKey]) && vaildRoles(item)"
:index="item[pathKey]"
:key="item[labelKey]"
:class="{'is-active':vaildAvtive(item)}"
@click="open(item)">
<i :class="item[iconKey]"/>
<span
slot="title"
:alt="item[pathKey]">{{ item[labelKey] }}</span>
:class="{ 'is-active': vaildAvtive(item) }"
@click="open(item)"
>
<i :class="item[iconKey]" />
<span slot="title" :alt="item[pathKey]">{{ item[labelKey] }}</span>
</el-menu-item>
<el-submenu
v-else-if="!validatenull(item[childrenKey])&&vaildRoles(item)"
v-else-if="!validatenull(item[childrenKey]) && vaildRoles(item)"
:index="item[pathKey]"
:key="item[labelKey]">
:key="item[labelKey]"
>
<template slot="title">
<i :class="item[iconKey]"/>
<i :class="item[iconKey]" />
<span
slot="title"
:class="{'el-menu--display':collapse && first}">{{ item[labelKey] }}</span>
:class="{ 'el-menu--display': collapse && first }"
>{{ item[labelKey] }}</span
>
</template>
<template v-for="(child,cindex) in item[childrenKey]">
<template v-for="(child, cindex) in item[childrenKey]">
<el-menu-item
v-if="validatenull(child[childrenKey])"
:index="child[pathKey],cindex"
:class="{'is-active':vaildAvtive(child)}"
:index="(child[pathKey], cindex)"
:class="{ 'is-active': vaildAvtive(child) }"
:key="child[labelKey]"
@click="open(child)">
<i :class="child[iconKey]"/>
@click="open(child)"
>
<i :class="child[iconKey]" />
<span slot="title">{{ child[labelKey] }}</span>
</el-menu-item>
<sidebar-item
@@ -38,90 +41,93 @@
:key="cindex"
:props="props"
:screen="screen"
:collapse="collapse"/>
:collapse="collapse"
/>
</template>
</el-submenu>
</template>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { validatenull } from '@/util/validate'
import config from './config.js'
import { mapGetters } from "vuex";
import { validatenull } from "@/util/validate";
import config from "./config.js";
export default {
name: 'SidebarItem',
name: "SidebarItem",
props: {
menu: {
type: Array
type: Array,
},
screen: {
type: Number
type: Number,
},
first: {
type: Boolean,
default: false
default: false,
},
props: {
type: Object,
default: () => {
return {}
}
return {};
},
},
collapse: {
type: Boolean
}
type: Boolean,
},
},
data() {
return {
config: config
}
config: config,
};
},
created() {},
mounted() {},
computed: {
...mapGetters(['roles']),
...mapGetters(["roles"]),
labelKey() {
return this.props.label || this.config.propsDefault.label
return this.props.label || this.config.propsDefault.label;
},
pathKey() {
return this.props.path || this.config.propsDefault.path
return this.props.path || this.config.propsDefault.path;
},
iconKey() {
return this.props.icon || this.config.propsDefault.icon
return this.props.icon || this.config.propsDefault.icon;
},
childrenKey() {
return this.props.children || this.config.propsDefault.children
return this.props.children || this.config.propsDefault.children;
},
nowTagValue() {
return this.$router.$avueRouter.getValue(this.$route)
}
return this.$router.$avueRouter.getValue(this.$route);
},
},
methods: {
vaildAvtive(item) {
const groupFlag = (item['group'] || []).some(ele =>
const groupFlag = (item["group"] || []).some((ele) =>
this.$route.path.includes(ele)
)
return this.nowTagValue === item[this.pathKey] || groupFlag
);
return this.nowTagValue === item[this.pathKey] || groupFlag;
},
vaildRoles(item) {
item.meta = item.meta || {}
return item.meta.roles ? item.meta.roles.includes(this.roles) : true
item.meta = item.meta || {};
return item.meta.roles ? item.meta.roles.includes(this.roles) : true;
},
validatenull(val) {
return validatenull(val)
return validatenull(val);
},
open(item) {
if (this.screen <= 1) this.$store.commit('SET_COLLAPSE')
this.$router.$avueRouter.group = item.group
this.$router.push({
path: this.$router.$avueRouter.getPath({
name: item[this.labelKey],
src: item[this.pathKey]
}),
query: item.query
}).catch(() => {})
}
}
}
if (this.screen <= 1) this.$store.commit("SET_COLLAPSE");
this.$router.$avueRouter.group = item.group;
this.$router
.push({
path: this.$router.$avueRouter.getPath({
name: item[this.labelKey],
src: item[this.pathKey],
}),
query: item.query,
})
.catch(() => {});
},
},
};
</script>


+ 3
- 1
src/page/index/top/index.vue Parādīt failu

@@ -19,7 +19,6 @@
</div>
</div>
<div class="top-bar__title" style="display: flex; align-items: center">
<top-menu />
<div
style="
line-height: 32px;
@@ -94,6 +93,9 @@
}}</el-button
>
</div>

<top-menu />

</div>
<div class="top-bar__right">
<el-tooltip


+ 19
- 4
src/page/index/top/top-menu.vue Parādīt failu

@@ -10,8 +10,9 @@
:key="index"
@click.native="openMenu(item)">
<template slot="title">
<i :class="item.icon"/>
<span>{{ item.label }}</span>
<el-button :icon="item.icon" type="primary">{{ item.label }}</el-button>
<!-- <i :class="item.icon"/> -->
<!-- <span>{{ item.label }}</span> -->
</template>
</el-menu-item>
</template>
@@ -37,16 +38,30 @@ export default {
this.getUserInfo()
},
computed: {
...mapGetters(['menu'])
...mapGetters(['menu', 'permissions'])
},

watch: {
permissions() {
this.getTopMenu()
}
},
methods: {
getTopMenu() {
this.$store.dispatch("GetTopMenu").then(res => {
this.items = res;
if (this.permissions['bidataIndex']) {
this.items.push({
path: '/bi',
name: 'Bi数据',
label: 'Bi数据',
})
}
});
},
openMenu(item) {
this.Index.openMenu(item)
this.$router.push(item.path)
// this.Index.openMenu(item)
},
getUserInfo() {
// 更新sessionStore 权限信息


+ 0
- 2
src/page/login/index.vue Parādīt failu

@@ -7,8 +7,6 @@
url == 'focus.hfju.com' || url == 'focus.aihxz.com'|| url == 'localhost'
"
src="/img/sohu.png"
alt=""
style="margin: 10px auto"
/>
<img
v-else


+ 168
- 171
src/router/page/index.js Parādīt failu

@@ -1,183 +1,180 @@
import Layout from '@/page/index/'

export default [{
path: '/login',
name: '登录页',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/login/index'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
}, {
path: '/wel',
component: Layout,
redirect: '/wel/index',
children: [
{
path: 'index',
name: '首页',
component: () =>
import(/* webpackChunkName: "views" */ '@/page/wel')
},
{
path: '/message',
component: () => import(/* webpackChunkName: "views" */ '@/views/msg/index'),
name: '公告列表',
},
export default [
{
path: '/login',
name: '登录页',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/login/index'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
path: '/wel',
component: Layout,
redirect: '/wel/index',
children: [
{
path: 'index',
name: '首页',
component: () =>
import(/* webpackChunkName: "views" */ '@/page/wel')
},
{
path: '/message',
component: () => import(/* webpackChunkName: "views" */ '@/views/msg/index'),
name: '公告列表',
},

{
path: '/message/detail',
component: () => import(/* webpackChunkName: "views" */ '@/views/msg/detail'),
name: '公告详情',
},
{
path: '/reportExcel/dayReport',
component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/dayReport'),
name: '报告详情', // 日报
},
{
path: '/reportExcel/weekReport',
component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/weekReport'),
name: '报告详情', // 周报
},
{
path: '/message/detail',
component: () => import(/* webpackChunkName: "views" */ '@/views/msg/detail'),
name: '公告详情',
},
{
path: '/reportExcel/dayReport',
component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/dayReport'),
name: '报告详情', // 日报
},
{
path: '/reportExcel/weekReport',
component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/weekReport'),
name: '报告详情', // 周报
},


{
path: '/suglist',
component: () => import(/* webpackChunkName: "views" */"@/views/building/sugList")
},
{
path: '/suglist',
component: () => import(/* webpackChunkName: "views" */"@/views/building/sugList")
},


{
path: '/sugdetail',
component: () => import(/* webpackChunkName: "views" */"@/views/building/sugDetail")
},
{
path: '/Statistics/createReport',
name: '创建报告',
component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/createReport")
},
{
path: '/Statistics/reportDetail',
name: '报告详情',
component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/reportDetail")
{
path: '/sugdetail',
component: () => import(/* webpackChunkName: "views" */"@/views/building/sugDetail")
},
{
path: '/Statistics/createReport',
name: '创建报告',
component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/createReport")
},
{
path: '/Statistics/reportDetail',
name: '报告详情',
component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/reportDetail")
},

]
},
{
path: '/lock',
name: '锁屏页',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/lock/index'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
path: '/404',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/error-page/404'),
name: '404',
meta: {
keepAlive: true,
isTab: false,
isAuth: true
}

]
},
{
path: '/lock',
name: '锁屏页',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/lock/index'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
path: '/404',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/error-page/404'),
name: '404',
meta: {
keepAlive: true,
isTab: false,
isAuth: true
}
},
{
path: '/403',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/error-page/403'),
name: '403',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
// 选择角色
path: '/check',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/check/index'),
name: '角色选择',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
// 选择角色
path: '/chose',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/check/chose'),
name: '选择',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
path: '/500',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/error-page/500'),
name: '500',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
path: '/',
name: '主页',
redirect: '/check'
},
{
path: '/myiframe',
component: Layout,
redirect: '/myiframe',
children: [{
path: ':routerPath',
name: 'iframe',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/iframe/main'),
props: true
}]
},
{
path: '*',
redirect: '/404'
},
{
path: '/authredirect',
name: '授权页',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/login/authredirect'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},

},
{
path: '/403',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/error-page/403'),
name: '403',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
// 选择角色
path: '/check',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/check/index'),
name: '角色选择',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
// 选择角色
path: '/chose',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/check/chose'),
name: '选择',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
// {
// // 项目选择
// path: '/building/chose',
// component: () =>
// import(/* webpackChunkName: "page" */ '@/views/building/chose'),
// name: '项目选择',
// meta: {
// keepAlive: true,
// isTab: false,
// isAuth: false
// }
// },
{
path: '/500',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/error-page/500'),
name: '500',
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
{
path: '/',
name: '主页',
redirect: '/check'
},
{
path: '/myiframe',
component: Layout,
redirect: '/myiframe',
children: [{
path: ':routerPath',
name: 'iframe',
{
path: '/bi',
name: 'BI数据',
component: () =>
import(/* webpackChunkName: "page" */ '@/components/iframe/main'),
props: true
}]
},
{
path: '*',
redirect: '/404'
},
{
path: '/authredirect',
name: '授权页',
component: () =>
import(/* webpackChunkName: "page" */ '@/page/login/authredirect'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
},
import(/* webpackChunkName: "page" */ '@/page/bi/bi'),
},
]

+ 18
- 17
src/store/modules/user.js Parādīt failu

@@ -1,10 +1,10 @@
import {getStore, setStore} from '@/util/store'
import {isURL, validatenull} from '@/util/validate'
import {loginByMobile, loginBySocial, loginByUsername,getUserInfo, logout, refreshToken} from '@/api/login'
import {deepClone, encryption} from '@/util/util'
import { getStore, setStore } from '@/util/store'
import { isURL, validatenull } from '@/util/validate'
import { loginByMobile, loginBySocial, loginByUsername, getUserInfo, logout, refreshToken } from '@/api/login'
import { deepClone, encryption } from '@/util/util'
import webiste from '@/const/website'
import {resetRouter} from '@/router/router'
import {getMenu, getTopMenu} from '@/api/admin/menu'
import { resetRouter } from '@/router/router'
import { getMenu, getTopMenu } from '@/api/admin/menu'

function addPath(ele, first) {
const menu = webiste.menu
@@ -53,7 +53,7 @@ const user = {
},
actions: {
// 根据用户名登录
LoginByUsername({commit}, userInfo) {
LoginByUsername({ commit }, userInfo) {
const user = encryption({
data: userInfo,
key: 'pigxpigxpigxpigx',
@@ -76,7 +76,7 @@ const user = {
})
},
// 根据手机号登录
LoginByPhone({commit}, userInfo) {
LoginByPhone({ commit }, userInfo) {
return new Promise((resolve, reject) => {
loginByMobile(userInfo.mobile, userInfo.code).then(response => {
// const data = response.data
@@ -94,7 +94,7 @@ const user = {
})
},
// 根据OpenId登录
LoginBySocial({commit}, param) {
LoginBySocial({ commit }, param) {
return new Promise((resolve, reject) => {
loginBySocial(param.state, param.code).then(response => {
const data = response
@@ -111,7 +111,7 @@ const user = {
})
},
// 刷新token
RefreshToken({commit, state}) {
RefreshToken({ commit, state }) {
return new Promise((resolve, reject) => {
refreshToken(state.refresh_token).then(response => {
const data = response
@@ -126,9 +126,9 @@ const user = {
})
},
// 查询用户信息
GetUserInfo({commit}) {
GetUserInfo({ commit }) {
return new Promise((resolve, reject) => {
getUserInfo({orgType:localStorage.getItem('orgType')}).then((res) => {
getUserInfo({ orgType: localStorage.getItem('orgType') }).then((res) => {
const data = res.data || {}
commit('SET_USER_INFO', data.sysUser)
commit('SET_ROLES', data.roles || [])
@@ -140,7 +140,7 @@ const user = {
})
},
// 登出
LogOut({commit}) {
LogOut({ commit }) {
return new Promise((resolve, reject) => {
logout().then(() => {
resetRouter();
@@ -160,7 +160,7 @@ const user = {
})
},
// 注销session
FedLogOut({commit}) {
FedLogOut({ commit }) {
return new Promise(resolve => {
resetRouter();
commit('SET_MENU', [])
@@ -175,7 +175,7 @@ const user = {
})
},
// 获取系统菜单
GetMenu({commit}, obj) {
GetMenu({ commit }, obj) {
return new Promise(resolve => {
getMenu(obj.id).then((res) => {
const data = res.data
@@ -184,7 +184,8 @@ const user = {
addPath(ele)
})
let type = obj.type
commit('SET_MENU', {type, menu})
console.log(menu)
commit('SET_MENU', { type, menu })
resolve(menu)
})
})
@@ -233,7 +234,7 @@ const user = {
})
},
SET_MENU: (state, params = {}) => {
let {menu, type} = params;
let { menu, type } = params;
if (type !== false) state.menu = menu
setStore({
name: 'menu',


+ 1
- 1
src/views/Statistics/reportDetail.vue Parādīt failu

@@ -2290,7 +2290,7 @@ export default {
text: " {a|}",
x: "center",
y: "center",
subtext,
subtext: '糟糕!数据不见了',
itemGap: -20,
textStyle: {
rich: {


Notiek ielāde…
Atcelt
Saglabāt