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/ ...@@ -3,6 +3,8 @@ VUE_APP_LIB_BASE_URL=/systemManageShell/
VUE_APP_CUSTOMER_MENU_CODE=0001 VUE_APP_CUSTOMER_MENU_CODE=0001
VUE_APP_BASE_MENU_CODE=0002 VUE_APP_BASE_MENU_CODE=0002
VUE_APP_SYSTEM_MENU_CODE=0003 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_DASHBOARD_CODE=0079
VUE_APP_WHITE_LIST=/login,/404,/401 VUE_APP_WHITE_LIST=/login,/404,/401
VUE_APP_LIB_MANAGER=http://ex-dev-dcxy-static.168cad.top VUE_APP_LIB_MANAGER=http://ex-dev-dcxy-static.168cad.top
......
import { mapGetters, mapActions } from 'vuex';
import store from './store'; import store from './store';
export default { export default {
...@@ -7,8 +6,13 @@ export default { ...@@ -7,8 +6,13 @@ export default {
type: Number, type: Number,
}, },
}, },
data() {
return {
storeIndex: 0,
};
},
created() { created() {
store.install(this.$store); this.storeIndex = store.install(this.$store);
}, },
mounted() { mounted() {
if (this.dashboardArea && !this.dashboardArea.length) { if (this.dashboardArea && !this.dashboardArea.length) {
...@@ -25,10 +29,19 @@ export default { ...@@ -25,10 +29,19 @@ export default {
}, },
}, },
computed: { computed: {
...mapGetters('dashboardArea', ['dashboardArea']), dashboardArea() {
return this.$store.getters[
`dashboardArea${this.storeIndex}/dashboardArea`
];
},
}, },
methods: { methods: {
...mapActions('dashboardArea', ['fetchDashboardAreaList']), fetchDashboardAreaList(entity) {
return this.$store.dispatch(
`dashboardArea${this.storeIndex}/fetchDashboardAreaList`,
entity
);
},
getAreaName(id) { getAreaName(id) {
let item = this.dashboardArea.find(area => area.id === id); let item = this.dashboardArea.find(area => area.id === id);
if (item) { if (item) {
......
import areaStroe from './areaStore'; import areaStroe from './areaStore';
let index = 0;
export default { export default {
install(store) { install(store) {
if (!store.state.base) { if (!store.state.base) {
...@@ -7,11 +9,15 @@ export default { ...@@ -7,11 +9,15 @@ export default {
state: {}, state: {},
}); });
} }
if (!store.state.base.dashboardArea) { if (!store.state.base['dashboardArea' + index]) {
store.registerModule(['base', 'dashboardArea'], areaStroe); store.registerModule(['base', 'dashboardArea' + index], areaStroe);
} else {
index++;
store.registerModule(['base', 'dashboardArea' + index], areaStroe);
} }
return index;
}, },
uninstall(store) { uninstall(store) {
store.unregisterModule(['base', 'dashboardArea']); store.unregisterModule(['base', 'dashboardArea' + index]);
}, },
}; };
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
}, },
'g2-legend': { 'g2-legend': {
width: '230px', width: '230px',
maxHeight: '', 'max-height': this.height + 'px',
// left: '-20px', // left: '-20px',
}, },
'g2-legend-list-item': { 'g2-legend-list-item': {
......
...@@ -143,6 +143,11 @@ export default { ...@@ -143,6 +143,11 @@ export default {
}); });
this.chart.source(dv, { this.chart.source(dv, {
index: {
type: 'linear',
min: 0,
max: this.dataList.length - 1,
},
rechargeMoney: { rechargeMoney: {
alias: '充值金额', alias: '充值金额',
}, },
...@@ -294,6 +299,8 @@ export default { ...@@ -294,6 +299,8 @@ export default {
// this.chart.changeHeight(height); // this.chart.changeHeight(height);
this.updateSlider(); this.updateSlider();
this.updateData(); this.updateData();
console.log(this.chart.getYScales());
} else { } else {
this.initData(); this.initData();
this.initSlider(); this.initSlider();
......
...@@ -40,12 +40,7 @@ ...@@ -40,12 +40,7 @@
src="@/assets/images/layout/icon_jichu@2x.png" src="@/assets/images/layout/icon_jichu@2x.png"
/> />
</MenuItem> </MenuItem>
<!-- <MenuItem menuName="统计系统">
<img
slot="icon"
src="@/assets/images/layout/icon_tongji@2x.png"
/>
</MenuItem> -->
<MenuItem <MenuItem
v-if="systemManage && systemManage.length" v-if="systemManage && systemManage.length"
menuName="系统管理" menuName="系统管理"
...@@ -57,6 +52,28 @@ ...@@ -57,6 +52,28 @@
src="@/assets/images/layout/icon_xitong@2x.png" src="@/assets/images/layout/icon_xitong@2x.png"
/> />
</MenuItem> </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)"> <div @click="() => toggleFastLink(false)">
<MenuItem menuName="全业态"> <MenuItem menuName="全业态">
<img <img
...@@ -152,6 +169,18 @@ export default { ...@@ -152,6 +169,18 @@ export default {
); );
return item ? true : false; 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() { // collectRouteList() {
// let list = this.collectList.map(item => { // let list = this.collectList.map(item => {
// let id = item.menuId; // 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