Commit 79d2173c by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !37
parents 58c8bca8 5519c273
......@@ -3,6 +3,8 @@ VUE_APP_LIB_BASE_URL=/systemManageShell/
VUE_APP_CUSTOMER_MENU_CODE=0001
VUE_APP_BASE_MENU_CODE=0002
VUE_APP_SYSTEM_MENU_CODE=0003
VUE_APP_STATISTICS_MENU_CODE=0044
VUE_APP_DEVICE_MENU_CODE=0048
VUE_APP_DASHBOARD_CODE=0079
VUE_APP_WHITE_LIST=/login,/404,/401
VUE_APP_LIB_MANAGER=http://ex-dev-dcxy-static.168cad.top
......
import { mapGetters, mapActions } from 'vuex';
import store from './store';
export default {
......@@ -7,8 +6,13 @@ export default {
type: Number,
},
},
data() {
return {
storeIndex: 0,
};
},
created() {
store.install(this.$store);
this.storeIndex = store.install(this.$store);
},
mounted() {
if (this.dashboardArea && !this.dashboardArea.length) {
......@@ -25,10 +29,19 @@ export default {
},
},
computed: {
...mapGetters('dashboardArea', ['dashboardArea']),
dashboardArea() {
return this.$store.getters[
`dashboardArea${this.storeIndex}/dashboardArea`
];
},
},
methods: {
...mapActions('dashboardArea', ['fetchDashboardAreaList']),
fetchDashboardAreaList(entity) {
return this.$store.dispatch(
`dashboardArea${this.storeIndex}/fetchDashboardAreaList`,
entity
);
},
getAreaName(id) {
let item = this.dashboardArea.find(area => area.id === id);
if (item) {
......
import areaStroe from './areaStore';
let index = 0;
export default {
install(store) {
if (!store.state.base) {
......@@ -7,11 +9,15 @@ export default {
state: {},
});
}
if (!store.state.base.dashboardArea) {
store.registerModule(['base', 'dashboardArea'], areaStroe);
if (!store.state.base['dashboardArea' + index]) {
store.registerModule(['base', 'dashboardArea' + index], areaStroe);
} else {
index++;
store.registerModule(['base', 'dashboardArea' + index], areaStroe);
}
return index;
},
uninstall(store) {
store.unregisterModule(['base', 'dashboardArea']);
store.unregisterModule(['base', 'dashboardArea' + index]);
},
};
......@@ -78,7 +78,7 @@ export default {
},
'g2-legend': {
width: '230px',
maxHeight: '',
'max-height': this.height + 'px',
// left: '-20px',
},
'g2-legend-list-item': {
......
......@@ -143,6 +143,11 @@ export default {
});
this.chart.source(dv, {
index: {
type: 'linear',
min: 0,
max: this.dataList.length - 1,
},
rechargeMoney: {
alias: '充值金额',
},
......@@ -294,6 +299,8 @@ export default {
// this.chart.changeHeight(height);
this.updateSlider();
this.updateData();
console.log(this.chart.getYScales());
} else {
this.initData();
this.initSlider();
......
......@@ -40,12 +40,7 @@
src="@/assets/images/layout/icon_jichu@2x.png"
/>
</MenuItem>
<!-- <MenuItem menuName="统计系统">
<img
slot="icon"
src="@/assets/images/layout/icon_tongji@2x.png"
/>
</MenuItem> -->
<MenuItem
v-if="systemManage && systemManage.length"
menuName="系统管理"
......@@ -57,6 +52,28 @@
src="@/assets/images/layout/icon_xitong@2x.png"
/>
</MenuItem>
<MenuItem
v-if="statisticsManage && statisticsManage.length"
menuName="统计系统"
:menuList="statisticsManage[0].children"
:selectRouteMenu="selectRouteMenu"
>
<img
slot="icon"
src="@/assets/images/layout/icon_baobiao.png"
/>
</MenuItem>
<MenuItem
v-if="deviceManage && deviceManage.length"
menuName="设备系统"
:menuList="deviceManage[0].children"
:selectRouteMenu="selectRouteMenu"
>
<img
slot="icon"
src="@/assets/images/layout/icon_shebei.png"
/>
</MenuItem>
<div @click="() => toggleFastLink(false)">
<MenuItem menuName="全业态">
<img
......@@ -152,6 +169,18 @@ export default {
);
return item ? true : false;
},
statisticsManage() {
let item = this.routers.find(
menu => menu.menuCode === process.env.VUE_APP_STATISTICS_MENU_CODE
);
return item ? formatRouteLink([item]) : null;
},
deviceManage() {
let item = this.routers.find(
menu => menu.menuCode === process.env.VUE_APP_DEVICE_MENU_CODE
);
return item ? formatRouteLink([item]) : null;
},
// collectRouteList() {
// let list = this.collectList.map(item => {
// let id = item.menuId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment