|
|
@@ -1,14 +1,275 @@
|
|
|
<template>
|
|
|
- <div class="widget">
|
|
|
- 数据关联性
|
|
|
+ <div class="page-panel">
|
|
|
+ <div class="params-panel">
|
|
|
+ <div class="head-title">显示设置</div>
|
|
|
+ <el-form ref="form" :model="form" label-width="auto" size="small">
|
|
|
+ <el-form-item label="分析范围" label-width="68px">
|
|
|
+ <el-radio-group v-model="form.radio">
|
|
|
+ <div class="extent-item" style="margin-bottom:15px;margin-top: 10px;">
|
|
|
+ <el-radio :label="1">地图范围</el-radio>
|
|
|
+ </div>
|
|
|
+ <div class="extent-item">
|
|
|
+ <el-radio :label="2">自定义范围</el-radio>
|
|
|
+ <el-button type="text" class="iconfont icontyhz1" title="圆"></el-button>
|
|
|
+ <el-button type="text" class="iconfont iconjx" title="矩形"></el-button>
|
|
|
+ <el-button type="text" class="iconfont icondbxhz" title="多边形"></el-button>
|
|
|
+ </div>
|
|
|
+ <div class="extent-item">
|
|
|
+ <el-radio :label="3">
|
|
|
+ <el-dropdown>
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 排水分区
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="a">排水分区</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="b">行政区</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-radio>
|
|
|
+ <el-select v-model="model" placeholder="" style="width:125px">
|
|
|
+ <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="监测站点">
|
|
|
+ <el-select v-model="form.siteId" filterable placeholder="选择站点" style="width:158px">
|
|
|
+ <el-option v-for="(item,index) in siteOption" :key="index" :label="item.siteName" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button type="warning">图上选择</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label-width="0">
|
|
|
+ <el-button type="primary" style="width:100%">分析</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <!-- 结果 -->
|
|
|
+ <div class="result-box">
|
|
|
+ <div class="head-title">分析结果概览</div>
|
|
|
+ <div class="res-items">
|
|
|
+ <div class="res-item">
|
|
|
+ <span>历史管网</span>
|
|
|
+ <span>10.89km|32个</span>
|
|
|
+ </div>
|
|
|
+ <div class="res-item">
|
|
|
+ <span>现状管网</span>
|
|
|
+ <span>13.24km|32个</span>
|
|
|
+ </div>
|
|
|
+ <div class="res-item">
|
|
|
+ <span>新建管网</span>
|
|
|
+ <span>1.29km|18个</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table :data="tableData" style="width: 100%" :header-cell-style="{ background: 'rgba(45, 116, 231,0.2)',
|
|
|
+ color: '#333333', height: '40px', textAlign: 'center' }" height="200px">
|
|
|
+ <template slot="empty">
|
|
|
+ <img src="@/assets/icon/null.png" alt="暂无数据" style="width:100px" />
|
|
|
+ </template>
|
|
|
+ <el-table-column label="序号" align="center" width="70">
|
|
|
+ <template slot-scope="scope">{{scope.$index+1}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="新建管网工程" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="address" label="竣工时间" align="center"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="head-title">
|
|
|
+ <span>缺陷数量统计</span>
|
|
|
+ <span type="text" class="link-btn" @click="defectView()">查看详情</span>
|
|
|
+ </div>
|
|
|
+ <div class="chart-box" id="pipeChart"></div>
|
|
|
+ <div class="head-title">
|
|
|
+ <span>水质监测情况</span>
|
|
|
+ <span type="text" class="link-btn" @click="monitorView()">查看详情</span>
|
|
|
+ </div>
|
|
|
+ <div class="chart-box" id="facilityChart"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script lang="ts">
|
|
|
-import { Vue, Component, Prop } from 'vue-property-decorator'
|
|
|
+<script>
|
|
|
+import historyCurve from '@/views/spectrum/common/historyCurve/index'
|
|
|
|
|
|
-@Component({})
|
|
|
-export default class Widget extends Vue {}
|
|
|
+import * as echarts from 'echarts'
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ historyCurve
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ num: 200
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.loadPipeLineChart()
|
|
|
+ this.loadFacilityChart()
|
|
|
+ },
|
|
|
+ destroyed() {},
|
|
|
+ methods: {
|
|
|
+ loadPipeLineChart() {
|
|
|
+ let chartDom = document.getElementById('pipeChart')
|
|
|
+ let myChart = echarts.init(chartDom)
|
|
|
+ let option = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ axisPointer: {
|
|
|
+ type: 'shadow'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ['jgqx', 'gnqx'],
|
|
|
+ orient: 'horizontal',
|
|
|
+ left: 'center',
|
|
|
+ itemWidth: 10,
|
|
|
+ itemHeight: 10,
|
|
|
+ bottom: 0,
|
|
|
+ textStyle: {
|
|
|
+ color: '#959595',
|
|
|
+ fontSize: 11,
|
|
|
+ fontWeight: '500'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: '8%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '15%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: [
|
|
|
+ {
|
|
|
+ type: 'category',
|
|
|
+ data: ['历史管网', '现状管网', '新建管网'],
|
|
|
+ axisTick: {
|
|
|
+ alignWithLabel: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis: [
|
|
|
+ {
|
|
|
+ type: 'value'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: 'jgqx',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: '30%',
|
|
|
+ data: [90, 160, 20],
|
|
|
+ itemStyle: {
|
|
|
+ color: '#3aa1ff'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'gnqx',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: '30%',
|
|
|
+ data: [20, 80, 9],
|
|
|
+ itemStyle: {
|
|
|
+ color: '#4ecb73'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ option && myChart.setOption(option)
|
|
|
+ },
|
|
|
+ loadFacilityChart() {
|
|
|
+ let chartDom = document.getElementById('facilityChart')
|
|
|
+ let myChart = echarts.init(chartDom)
|
|
|
+ let option = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ axisPointer: {
|
|
|
+ type: 'shadow'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ['jgqx', 'gnqx'],
|
|
|
+ orient: 'horizontal',
|
|
|
+ left: 'center',
|
|
|
+ itemHeight: 10,
|
|
|
+ bottom: 0,
|
|
|
+ textStyle: {
|
|
|
+ color: '#959595',
|
|
|
+ fontSize: 11,
|
|
|
+ fontWeight: '500'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: '8%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '15%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: [
|
|
|
+ {
|
|
|
+ type: 'category',
|
|
|
+ data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
|
+ axisTick: {
|
|
|
+ alignWithLabel: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis: [
|
|
|
+ {
|
|
|
+ type: 'value'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: 'jgqx',
|
|
|
+ type: 'line',
|
|
|
+ data: [90, 160, 200, 334, 390, 330, 220, 90, 160, 200, 334, 390],
|
|
|
+ itemStyle: {
|
|
|
+ color: '#3aa1ff'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'gnqx',
|
|
|
+ type: 'line',
|
|
|
+ data: [60, 130, 150, 256, 300, 290, 140, 50, 110, 140, 264, 300],
|
|
|
+ itemStyle: {
|
|
|
+ color: '#4ecb73'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ option && myChart.setOption(option)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 缺陷查看
|
|
|
+ */
|
|
|
+ defectView() {
|
|
|
+ const data = {
|
|
|
+ pathId: '/spectrum/reform/relevance/defect',
|
|
|
+ widgetid: 'FullPanel',
|
|
|
+ label: '管网缺陷信息',
|
|
|
+ param: {}
|
|
|
+ }
|
|
|
+ this.$store.dispatch('map/handelClose', data)
|
|
|
+ this.$store.dispatch('map/changeMethod', data)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 监测查看
|
|
|
+ */
|
|
|
+ monitorView() {
|
|
|
+ const data = {
|
|
|
+ pathId: '/spectrum/reform/monitorView',
|
|
|
+ widgetid: 'FullPanel',
|
|
|
+ label: '监测查看',
|
|
|
+ param: {}
|
|
|
+ }
|
|
|
+ this.$store.dispatch('map/handelClose', data)
|
|
|
+ this.$store.dispatch('map/changeMethod', data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss"></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+@import './css.scss';
|
|
|
+</style>
|