|
|
@@ -11,6 +11,7 @@
|
|
|
</div>
|
|
|
<div class="box-main border-box">
|
|
|
<m-card shadow="never" class="fullHeight" :bodyStyle="{ height: '100%' }">
|
|
|
+ <el-empty v-if="empty"></el-empty>
|
|
|
<PrivateChartEditShow
|
|
|
ref="privateChartEditShowRefs"
|
|
|
class="fullscreen"
|
|
|
@@ -45,6 +46,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
loading: false,
|
|
|
+ empty: false,
|
|
|
key: null,
|
|
|
option: {
|
|
|
xAxisData: []
|
|
|
@@ -55,21 +57,26 @@ export default {
|
|
|
methods: {
|
|
|
async open (item) {
|
|
|
this.$refs.dialog.open()
|
|
|
- this.loading = true
|
|
|
+ // this.loading = true
|
|
|
this.$nextTick(async () => {
|
|
|
// 实例化图例
|
|
|
this.$refs.privateChartEditShowRefs.onInit()
|
|
|
if (!item.data) {
|
|
|
- // 获取初始化设置
|
|
|
- const { key } = this.$refs.privateChartEditTypeRefs.getDefault()
|
|
|
- this.key = key
|
|
|
- this.option.xAxisData = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
|
|
|
- this.setData()
|
|
|
- this.loading = false
|
|
|
+ this.empty = true
|
|
|
+ return
|
|
|
}
|
|
|
+ this.empty = false
|
|
|
+ // // 获取初始化设置
|
|
|
+ // const { key } = this.$refs.privateChartEditTypeRefs.getDefault()
|
|
|
+ // this.key = key
|
|
|
+ // this.option.xAxisData = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
|
|
|
+ // this.setData()
|
|
|
+ // this.loading = false
|
|
|
+ // }
|
|
|
})
|
|
|
},
|
|
|
setData () {
|
|
|
+ this.empty = false
|
|
|
this.$refs.privateChartEditShowRefs.setData(this.data, this.key, this.option)
|
|
|
},
|
|
|
// 改变整体option
|