|
@@ -172,7 +172,9 @@ export default {
|
|
|
NoticeDialog
|
|
NoticeDialog
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
|
|
+ const { userInfo } = this.$store.getters
|
|
|
return {
|
|
return {
|
|
|
|
|
+ userInfo,
|
|
|
idKey: 'id',
|
|
idKey: 'id',
|
|
|
aliasKey: 'alias',
|
|
aliasKey: 'alias',
|
|
|
labelKey: 'name',
|
|
labelKey: 'name',
|
|
@@ -227,23 +229,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
loadMenus() {
|
|
loadMenus() {
|
|
|
this.swipes = [{}]
|
|
this.swipes = [{}]
|
|
|
- getMenuData().then(response => {
|
|
|
|
|
- this.swipes = [
|
|
|
|
|
- { image: './images/swipes/banner1.png' },
|
|
|
|
|
- { image: './images/swipes/banner2.png' },
|
|
|
|
|
- { image: './images/swipes/banner3.png' }
|
|
|
|
|
- ]
|
|
|
|
|
-
|
|
|
|
|
- const data = response.data
|
|
|
|
|
- const listData = data.filter((d) => {
|
|
|
|
|
- return d.id !== '0'
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- this.dashboards = TreeUtils.transformToTreeFormat(listData, {
|
|
|
|
|
- idKey: this.idKey,
|
|
|
|
|
- parentIdKey: this.parentIdKey,
|
|
|
|
|
- childrenKey: this.childrenKey
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.swipes = [
|
|
|
|
|
+ { image: './images/swipes/banner1.png' },
|
|
|
|
|
+ { image: './images/swipes/banner2.png' },
|
|
|
|
|
+ { image: './images/swipes/banner3.png' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ if (this.userInfo.employee.jiNengZhiCheng !== 'inside' && this.userInfo.employee.isSuper === 'N') {
|
|
|
|
|
+ this.dashboards = []
|
|
|
if (this.$utils.isNotEmpty(this.dashboards)) {
|
|
if (this.$utils.isNotEmpty(this.dashboards)) {
|
|
|
const activeDashboards = []
|
|
const activeDashboards = []
|
|
|
this.dashboards.forEach((d) => {
|
|
this.dashboards.forEach((d) => {
|
|
@@ -251,12 +243,32 @@ export default {
|
|
|
})
|
|
})
|
|
|
this.activeDashboards = activeDashboards
|
|
this.activeDashboards = activeDashboards
|
|
|
}
|
|
}
|
|
|
- this.emptyData = !(listData.length > 0)
|
|
|
|
|
- }).catch((e) => {
|
|
|
|
|
- this.emptyData = true
|
|
|
|
|
- this.resultType = 'error'
|
|
|
|
|
- this.resultMessage = e.message
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.emptyData = !(this.dashboards.length > 0)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ getMenuData().then(response => {
|
|
|
|
|
+ const data = response.data
|
|
|
|
|
+ const listData = data.filter((d) => {
|
|
|
|
|
+ return d.id !== '0'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.dashboards = TreeUtils.transformToTreeFormat(listData, {
|
|
|
|
|
+ idKey: this.idKey,
|
|
|
|
|
+ parentIdKey: this.parentIdKey,
|
|
|
|
|
+ childrenKey: this.childrenKey
|
|
|
|
|
+ })
|
|
|
|
|
+ if (this.$utils.isNotEmpty(this.dashboards)) {
|
|
|
|
|
+ const activeDashboards = []
|
|
|
|
|
+ this.dashboards.forEach((d) => {
|
|
|
|
|
+ activeDashboards.push(d[this.aliasKey])
|
|
|
|
|
+ })
|
|
|
|
|
+ this.activeDashboards = activeDashboards
|
|
|
|
|
+ }
|
|
|
|
|
+ this.emptyData = !(listData.length > 0)
|
|
|
|
|
+ }).catch((e) => {
|
|
|
|
|
+ this.emptyData = true
|
|
|
|
|
+ this.resultType = 'error'
|
|
|
|
|
+ this.resultMessage = e.message
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
loadCountInfo() {
|
|
loadCountInfo() {
|
|
|
getInfoCount().then(response => {
|
|
getInfoCount().then(response => {
|