|
|
@@ -44,19 +44,30 @@ export default {
|
|
|
created() {},
|
|
|
data() {
|
|
|
return {
|
|
|
- layout: [
|
|
|
- { x: 6, y: 0, w: 6, h: 16, i: '5', name: 'LineChartWidget' },
|
|
|
- { x: 0, y: 0, w: 3, h: 4, i: '2', name: 'PriceWidget' },
|
|
|
- { x: 3, y: 0, w: 3, h: 4, i: '1', name: 'NumWidget' },
|
|
|
- // { x: 0, y: 12, w: 6, h: 6, i: '4', name: 'BarChartWidget' },
|
|
|
- { x: 0, y: 4, w: 6, h: 12, i: '6', name: 'PieChartWidget' },
|
|
|
- { x: 0, y: 20, w: 12, h: 10, i: '6', name: 'TopWidget' }
|
|
|
- ],
|
|
|
+ layout: [],
|
|
|
editable: false,
|
|
|
info: {}
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
+ if (this.$store.state.userInfo.company) {
|
|
|
+ this.layout = [
|
|
|
+ { x: 0, y: 0, w: 6, h: 4, i: '2', name: 'PriceWidget' },
|
|
|
+ { x: 6, y: 0, w: 6, h: 4, i: '1', name: 'NumWidget' },
|
|
|
+ // { x: 0, y: 12, w: 6, h: 6, i: '4', name: 'BarChartWidget' },
|
|
|
+ { x: 0, y: 4, w: 12, h: 12, i: '6', name: 'PieChartWidget' }
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ this.layout = [
|
|
|
+ { x: 6, y: 0, w: 6, h: 16, i: '5', name: 'LineChartWidget' },
|
|
|
+ { x: 0, y: 0, w: 3, h: 4, i: '2', name: 'PriceWidget' },
|
|
|
+ { x: 3, y: 0, w: 3, h: 4, i: '1', name: 'NumWidget' },
|
|
|
+ // { x: 0, y: 12, w: 6, h: 6, i: '4', name: 'BarChartWidget' },
|
|
|
+ { x: 0, y: 4, w: 6, h: 12, i: '6', name: 'PieChartWidget' },
|
|
|
+ // { x: 0, y: 20, w: 6, h: 10, i: '8', name: 'MonthWidget' },
|
|
|
+ { x: 6, y: 20, w: 12, h: 10, i: '7', name: 'TopWidget' }
|
|
|
+ ];
|
|
|
+ }
|
|
|
this.$http.get('/statistic/total').then(res => {
|
|
|
this.info = res;
|
|
|
});
|