|
|
@@ -1,30 +1,90 @@
|
|
|
<template>
|
|
|
<div class="dashboard">
|
|
|
- <grid-layout
|
|
|
- style="margin: 0 -10px;"
|
|
|
- :layout="layout"
|
|
|
- :col-num="12"
|
|
|
- :row-height="30"
|
|
|
- :is-draggable="editable"
|
|
|
- :is-resizable="editable"
|
|
|
- :is-mirrored="false"
|
|
|
- :vertical-compact="true"
|
|
|
- :margin="[10, 10]"
|
|
|
- :use-css-transforms="true"
|
|
|
- >
|
|
|
- <grid-item
|
|
|
- v-for="item in layout"
|
|
|
- class="widget-wrapper"
|
|
|
- :x="item.x"
|
|
|
- :y="item.y"
|
|
|
- :w="item.w"
|
|
|
- :h="item.h"
|
|
|
- :i="item.i"
|
|
|
- :key="item.i"
|
|
|
+ <el-tabs type="border-card" v-if="companyId === 1 || companyId === '1'">
|
|
|
+ <el-tab-pane label="Raex绿洲">
|
|
|
+ <grid-layout
|
|
|
+ style="margin: 0 -10px;"
|
|
|
+ :layout="layout"
|
|
|
+ :col-num="12"
|
|
|
+ :row-height="30"
|
|
|
+ :is-draggable="editable"
|
|
|
+ :is-resizable="editable"
|
|
|
+ :is-mirrored="false"
|
|
|
+ :vertical-compact="true"
|
|
|
+ :margin="[10, 10]"
|
|
|
+ :use-css-transforms="true"
|
|
|
+ >
|
|
|
+ <grid-item
|
|
|
+ v-for="item in layout"
|
|
|
+ class="widget-wrapper"
|
|
|
+ :x="item.x"
|
|
|
+ :y="item.y"
|
|
|
+ :w="item.w"
|
|
|
+ :h="item.h"
|
|
|
+ :i="item.i"
|
|
|
+ :key="item.i"
|
|
|
+ >
|
|
|
+ <component :is="item.name" :info="info"></component>
|
|
|
+ </grid-item>
|
|
|
+ </grid-layout>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="业绩统计">
|
|
|
+ <grid-layout
|
|
|
+ style="margin: 0 -10px;"
|
|
|
+ :layout="layout"
|
|
|
+ :col-num="12"
|
|
|
+ :row-height="30"
|
|
|
+ :is-draggable="editable"
|
|
|
+ :is-resizable="editable"
|
|
|
+ :is-mirrored="false"
|
|
|
+ :vertical-compact="true"
|
|
|
+ :margin="[10, 10]"
|
|
|
+ :use-css-transforms="true"
|
|
|
+ >
|
|
|
+ <grid-item
|
|
|
+ v-for="item in layout2"
|
|
|
+ class="widget-wrapper"
|
|
|
+ :x="item.x"
|
|
|
+ :y="item.y"
|
|
|
+ :w="item.w"
|
|
|
+ :h="item.h"
|
|
|
+ :i="item.i"
|
|
|
+ :key="item.i"
|
|
|
+ >
|
|
|
+ <component :is="item.name" :info="info"></component>
|
|
|
+ </grid-item>
|
|
|
+ </grid-layout>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+ <grid-layout
|
|
|
+ style="margin: 0 -10px;"
|
|
|
+ :layout="layout"
|
|
|
+ :col-num="12"
|
|
|
+ :row-height="30"
|
|
|
+ :is-draggable="editable"
|
|
|
+ :is-resizable="editable"
|
|
|
+ :is-mirrored="false"
|
|
|
+ :vertical-compact="true"
|
|
|
+ :margin="[10, 10]"
|
|
|
+ :use-css-transforms="true"
|
|
|
>
|
|
|
- <component :is="item.name" :info="info"></component>
|
|
|
- </grid-item>
|
|
|
- </grid-layout>
|
|
|
+ <grid-item
|
|
|
+ v-for="item in layout"
|
|
|
+ class="widget-wrapper"
|
|
|
+ :x="item.x"
|
|
|
+ :y="item.y"
|
|
|
+ :w="item.w"
|
|
|
+ :h="item.h"
|
|
|
+ :i="item.i"
|
|
|
+ :key="item.i"
|
|
|
+ >
|
|
|
+ <component :is="item.name" :info="info"></component>
|
|
|
+ </grid-item>
|
|
|
+ </grid-layout>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- <el-button v-if="editable" @click="save">保存</el-button>
|
|
|
<el-button v-else @click="editable = true">编辑</el-button> -->
|
|
|
</div>
|
|
|
@@ -48,6 +108,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
layout: [],
|
|
|
+ layout2: [],
|
|
|
editable: false,
|
|
|
info: {}
|
|
|
};
|
|
|
@@ -70,16 +131,16 @@ export default {
|
|
|
{ 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: 6, h: 10, i: '7', name: 'TopWidget' },
|
|
|
- { x: 6, y: 20, w: 12, h: 10, i: '9', name: 'UserHoldTop' },
|
|
|
- { x: 6, y: 20, w: 12, h: 10, i: '10', name: 'OtherStatistic' }
|
|
|
+ { x: 6, y: 20, w: 12, h: 10, i: '9', name: 'UserHoldTop' }
|
|
|
];
|
|
|
+ this.layout2 = [{ x: 6, y: 0, w: 12, h: 12, i: '10', name: 'OtherStatistic' }];
|
|
|
} else {
|
|
|
this.layout = [
|
|
|
{ x: 0, y: 0, w: 6, h: 4, i: '2', name: 'PriceWidget' },
|
|
|
{ x: 6, y: 3, 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: 6, h: 12, i: '6', name: 'PieChartWidget' },
|
|
|
- { x: 6, y: 4, w: 6, h: 12, i: '8', name: 'MonthWidget' },
|
|
|
+ { x: 6, y: 4, w: 6, h: 12, i: '8', name: 'MonthWidget' }
|
|
|
];
|
|
|
}
|
|
|
}
|