| | |
| | | <template> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <basic-container class="cur-house-hold-box"> |
| | | <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" v-model="form" |
| | | :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" |
| | | <div class="cur-house-hold-supervision-page" v-loading="loading"> |
| | | <div class="echarts-wrap"> |
| | | <div class="echarts-cell"> |
| | | <box-title :title="'分类统计'" :classVal="9" :classStyle="'echarts-title'"></box-title> |
| | | <div class="echarts-item" id="echarts"></div> |
| | | </div> |
| | | |
| | | <div class="echarts-cell"> |
| | | <box-title :title="'区域统计'" :classVal="9" :classStyle="'echarts-title'"></box-title> |
| | | <div class="echarts-item" id="bar-echarts"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="cur-from-box"> |
| | | <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" |
| | | v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" |
| | | :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | |
| | | @click="manageLabel(row)">标签 |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | <template slot="menuLeft"> |
| | | <div class="echarts-wrap-box"> |
| | | <div class="echarts-item-box" id="echarts"></div> |
| | | <div class="echarts-item-box" id="bar-echarts"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"> |
| | | {{ textDispose(row, 'phoneflag', 'phone') }} |
| | |
| | | {{ labelDispose(row.userHouseLabelVOList) }} |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | </div> |
| | | |
| | | <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px"> |
| | | |
| | |
| | | <el-dialog title="住户管理" append-to-body :visible.sync="householdManagerVisible" width="70%" height="60%"> |
| | | <!-- <householdManager ref="householdManager" /> --> |
| | | </el-dialog> |
| | | |
| | | |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import func from "@/util/func" |
| | | // import householdManager from "./components/householdManager" |
| | | import Qs from "qs" |
| | | import * as echarts from 'echarts'; |
| | | import * as echarts from 'echarts' |
| | | import { |
| | | getTreeList |
| | | } from '@/api/label/label' |
| | | import boxTitle from "../place/components/boxTitle.vue" |
| | | |
| | | export default { |
| | | components: { |
| | | boxTitle |
| | | // householdManager |
| | | }, |
| | | data() { |
| | |
| | | viewBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | |
| | | column: [{ |
| | | label: "房屋编号", |
| | | prop: "houseCode", |
| | |
| | | }, |
| | | mounted() { |
| | | this.getLabelCount() |
| | | this.setBarEchartsOption(); |
| | | this.setBarEchartsOption() |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | getLabelCount() { |
| | | getTreeList().then(res => { |
| | | const data = res.data.data |
| | | let list = data[1].children; |
| | | this.labelCountList = list; |
| | | let list = data[1].children |
| | | this.labelCountList = list |
| | | this.$nextTick(() => { |
| | | this.setEchartsOption(list) |
| | | }) |
| | |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | orient: 'horizontal', |
| | | left: 'center', |
| | | top: 'bottom', |
| | | orient: 'vertical', |
| | | right: 30, |
| | | bottom: 10 |
| | | }, |
| | | // labelLine: { |
| | | // length: 15, |
| | |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | center: '50%', |
| | | radius: '50%', //修改大小 |
| | | center: ['36%', '50%'], |
| | | radius: '80%', //修改大小 |
| | | data: [], |
| | | emphasis: { |
| | | itemStyle: { |
| | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | let myEchart = document.getElementById('echarts'); //获取类名 |
| | | let myCharts = echarts.init(myEchart); |
| | | } |
| | | let myEchart = document.getElementById('echarts') //获取类名 |
| | | let myCharts = echarts.init(myEchart) |
| | | for (let i = 0, ii = data.length; i < ii; i++) { |
| | | option.series[0].data.push({ |
| | | name: data[i].name, |
| | | value: data[i].count, |
| | | id: data[i].id |
| | | }); |
| | | option && myCharts.setOption(option); |
| | | }) |
| | | option && myCharts.setOption(option) |
| | | myCharts.on('click', (params) => { |
| | | console.log(params) |
| | | this.query.labelId = params.data.id; |
| | | this.query.labelId = params.data.id |
| | | this.onLoad(this.page, this.query) |
| | | }) |
| | | } |
| | |
| | | }, |
| | | |
| | | setBarEchartsOption() { |
| | | var chartDom = document.getElementById('bar-echarts'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | var chartDom = document.getElementById('bar-echarts') |
| | | var myChart = echarts.init(chartDom) |
| | | var option |
| | | |
| | | option = { |
| | | tooltip: { |
| | |
| | | data: [10, 52, 200, 334, 390, 330, 220] |
| | | } |
| | | ] |
| | | }; |
| | | } |
| | | |
| | | option && myChart.setOption(option); |
| | | option && myChart.setOption(option) |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .box { |
| | | height: 800px; |
| | | } |
| | | |
| | | .el-scrollbar { |
| | | height: 100%; |
| | | } |
| | | |
| | | .box .el-scrollbar__wrap { |
| | | overflow: scroll; |
| | | } |
| | | |
| | | .echarts-wrap-box { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0; |
| | | margin-bottom: 20px; |
| | | |
| | | .echarts-item-box { |
| | | width: 48%; |
| | | height: 300px; |
| | | border: 1px solid #999; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped></style> |