|
|
@@ -1,11 +1,5 @@
|
|
|
<template>
|
|
|
<div class="version-information" style="margin-top: 0">
|
|
|
- <!-- <div class="columns">
|
|
|
- <div class="layoutItem" v-for="item in mainData" :key="item.i">
|
|
|
- <b>{{ item.i }}</b>
|
|
|
- : [{{ item.x }}, {{ item.y }}, {{ item.w }}, {{ item.h }}]
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
<div class="vueGridLayout" v-if="!editModelBool">
|
|
|
<div class="board" style="width: 100%">
|
|
|
<div class="home">
|
|
|
@@ -62,72 +56,13 @@
|
|
|
v-if="item.colorType === 'iconText'"
|
|
|
style="display: flex; height: 100%"
|
|
|
>
|
|
|
- <div
|
|
|
- style="padding: 0px 20px; text-align: center; margin: auto 0"
|
|
|
- >
|
|
|
- <img :src="item.iconPath" alt="" />
|
|
|
- </div>
|
|
|
- <div style="margin: auto 0">
|
|
|
- <div
|
|
|
- :style="{
|
|
|
- color: item.dataNameColor,
|
|
|
- 'font-size': item.dataNameFont + 'px',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ item.dataName }}
|
|
|
- </div>
|
|
|
- <div
|
|
|
- :style="{
|
|
|
- color: item.dataValueColor,
|
|
|
- 'font-size': item.dataValueFont + 'px',
|
|
|
- 'font-weight': 800,
|
|
|
- }"
|
|
|
- >
|
|
|
- {{
|
|
|
- item.textValue === null || item.textValue === ''
|
|
|
- ? '暂无数据'
|
|
|
- : item.textValue
|
|
|
- }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <divIconText :item="item"></divIconText>
|
|
|
</div>
|
|
|
<div v-if="item.colorType === 'echarts'">
|
|
|
- <div
|
|
|
- :style="{
|
|
|
- padding: '0px 5px',
|
|
|
- }"
|
|
|
- >
|
|
|
- <img :src="item.iconPath" alt="" />
|
|
|
- <span
|
|
|
- :style="{
|
|
|
- color: item.dataValueColor,
|
|
|
- 'font-weight': 800,
|
|
|
- 'padding-top': '1px',
|
|
|
- 'padding-left': '5px',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ item.dataName }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
+ <divEcharts :item="item"></divEcharts>
|
|
|
</div>
|
|
|
<div v-if="item.colorType === 'tabls'">
|
|
|
- <div
|
|
|
- :style="{
|
|
|
- padding: '0px 5px',
|
|
|
- }"
|
|
|
- >
|
|
|
- <img :src="item.iconPath" alt="" />
|
|
|
- <span
|
|
|
- :style="{
|
|
|
- color: item.dataValueColor,
|
|
|
- 'font-weight': 800,
|
|
|
- 'padding-top': '1px',
|
|
|
- 'padding-left': '5px',
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ item.dataName }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
+ <div-tabls :item="item"></div-tabls>
|
|
|
</div>
|
|
|
</grid-item>
|
|
|
</grid-layout>
|
|
|
@@ -162,9 +97,16 @@
|
|
|
<script>
|
|
|
import { dependencies, devDependencies } from '*/package.json'
|
|
|
import { GridLayout, GridItem } from 'vue-grid-layout'
|
|
|
+// 布局模板 开始
|
|
|
+import divIconText from './componentDiv/divIconText.vue'
|
|
|
+import divTabls from './componentDiv/divTabls.vue'
|
|
|
+import divEcharts from './componentDiv/divEcharts.vue'
|
|
|
+// 布局模板 结束
|
|
|
+// 编辑模板 开始
|
|
|
import iconText from './componentModel/iconText.vue'
|
|
|
import Echarts from './componentModel/echarts.vue'
|
|
|
import Atabls from './componentModel/Atabls.vue'
|
|
|
+// 编辑模板 结束
|
|
|
import * as api from '@/api/index/index.js'
|
|
|
|
|
|
import { useStore } from 'vuex'
|
|
|
@@ -178,6 +120,10 @@ export default defineComponent({
|
|
|
iconText,
|
|
|
Echarts,
|
|
|
Atabls,
|
|
|
+
|
|
|
+ divIconText,
|
|
|
+ divTabls,
|
|
|
+ divEcharts,
|
|
|
},
|
|
|
setup() {
|
|
|
const store = useStore()
|
|
|
@@ -194,7 +140,6 @@ export default defineComponent({
|
|
|
siteId: store.state.siteId,
|
|
|
})
|
|
|
.then((requset) => {
|
|
|
- console.log(requset.data)
|
|
|
mainData.value = requset.data
|
|
|
})
|
|
|
}
|