|
@@ -51,22 +51,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="conten">
|
|
<div class="conten">
|
|
|
- <div class="letf letfHome"></div>
|
|
|
|
|
|
|
+ <!-- <div class="letf letfHome"></div> -->
|
|
|
<!-- <div class="right rightHome"></div> -->
|
|
<!-- <div class="right rightHome"></div> -->
|
|
|
- <div class="letf" v-if="0">
|
|
|
|
|
|
|
+ <div class="letf" >
|
|
|
<div class="title">
|
|
<div class="title">
|
|
|
- <h3>最新动态</h3>
|
|
|
|
|
- <el-button @click="$router.push('homeNews/1')">查看更多</el-button>
|
|
|
|
|
|
|
+ <h3>馆藏统计</h3>
|
|
|
|
|
+ <el-button @click="$router.push('/layout/statistics1')">查看更多</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="none" v-if="0">暂无数据</div>
|
|
|
|
|
- <ul class="txt" v-else>
|
|
|
|
|
- <li v-for="i in 20" :key="i">
|
|
|
|
|
- <span class="time">8月10日 18:01</span>
|
|
|
|
|
- <div class="dian" v-if="1"></div>
|
|
|
|
|
- <div class="dianX" v-else></div>
|
|
|
|
|
- <span>Admin1 保存了 入藏管理 待办事项</span>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
|
|
+ <!-- <div class="none" v-if="0">暂无数据</div> -->
|
|
|
|
|
+ <div class="echarts"></div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="right" >
|
|
<div class="right" >
|
|
|
<div class="title">
|
|
<div class="title">
|
|
@@ -83,12 +76,20 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+// ---------------------echarts
|
|
|
|
|
+import * as echarts from 'echarts/core'
|
|
|
|
|
+import { TooltipComponent } from 'echarts/components'
|
|
|
|
|
+import { PieChart } from 'echarts/charts'
|
|
|
|
|
+import { LabelLayout } from 'echarts/features'
|
|
|
|
|
+import { CanvasRenderer } from 'echarts/renderers'
|
|
|
|
|
+
|
|
|
import { getList as collect2 } from '@/apis/collect2'
|
|
import { getList as collect2 } from '@/apis/collect2'
|
|
|
import { getList as collect1 } from '@/apis/collect1'
|
|
import { getList as collect1 } from '@/apis/collect1'
|
|
|
import { getList as getList5 } from '@/apis/holding5'
|
|
import { getList as getList5 } from '@/apis/holding5'
|
|
|
import { getList as getList2 } from '@/apis/holding2'
|
|
import { getList as getList2 } from '@/apis/holding2'
|
|
|
import { getList as getList1 } from '@/apis/holding1'
|
|
import { getList as getList1 } from '@/apis/holding1'
|
|
|
import { getList } from '@/apis/holding'
|
|
import { getList } from '@/apis/holding'
|
|
|
|
|
+echarts.use([TooltipComponent, PieChart, CanvasRenderer, LabelLayout])
|
|
|
export default {
|
|
export default {
|
|
|
name: 'Home',
|
|
name: 'Home',
|
|
|
components: {},
|
|
components: {},
|
|
@@ -176,6 +177,34 @@ export default {
|
|
|
col2.data.list.forEach(v => {
|
|
col2.data.list.forEach(v => {
|
|
|
if (v.status === 1 || v.status === 0) this.dingdong[5].inoc++
|
|
if (v.status === 1 || v.status === 0) this.dingdong[5].inoc++
|
|
|
})
|
|
})
|
|
|
|
|
+ // 图表
|
|
|
|
|
+ const chartDom = document.querySelector('.echarts')
|
|
|
|
|
+ const myChart = echarts.init(chartDom)
|
|
|
|
|
+ const option = {
|
|
|
|
|
+ tooltip: {
|
|
|
|
|
+ trigger: 'item'
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ series: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'pie',
|
|
|
|
|
+ radius: ['40%', '70%'],
|
|
|
|
|
+ data: [
|
|
|
|
|
+ { value: 1048, name: '陶瓷 10.00%' },
|
|
|
|
|
+ { value: 735, name: '青铜 10.00%' },
|
|
|
|
|
+ { value: 580, name: '铁 10.00%' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ emphasis: {
|
|
|
|
|
+ itemStyle: {
|
|
|
|
|
+ shadowBlur: 10,
|
|
|
|
|
+ shadowOffsetX: 0,
|
|
|
|
|
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ option && myChart.setOption(option)
|
|
|
},
|
|
},
|
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
beforeMount () {}, // 生命周期 - 挂载之前
|
|
beforeMount () {}, // 生命周期 - 挂载之前
|
|
@@ -306,31 +335,19 @@ export default {
|
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
|
}
|
|
}
|
|
|
.letf {
|
|
.letf {
|
|
|
- position: relative;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
- .txt {
|
|
|
|
|
- .time {
|
|
|
|
|
- color: #999;
|
|
|
|
|
- }
|
|
|
|
|
- li {
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- color: black;
|
|
|
|
|
- margin: 28px;
|
|
|
|
|
- div {
|
|
|
|
|
- margin: 0 10px 0 18px;
|
|
|
|
|
- border: 3px solid #1890ff;
|
|
|
|
|
- width: 12px;
|
|
|
|
|
- height: 12px;
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
- }
|
|
|
|
|
- .dianX {
|
|
|
|
|
- border: 3px solid #ccc;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .echarts{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 80%;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ .title{
|
|
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
}
|
|
}
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
.right {
|
|
.right {
|
|
|
position: relative;
|
|
position: relative;
|
|
@@ -356,7 +373,7 @@ export default {
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
- height: 100px;
|
|
|
|
|
|
|
+ height: 118px;
|
|
|
float: left;
|
|
float: left;
|
|
|
width: 50%;
|
|
width: 50%;
|
|
|
border: 1px solid #ccc;
|
|
border: 1px solid #ccc;
|