123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146 |
- <template>
- <div class="app-container">
- <el-row>
- <el-col :span="12">
- <div class="generalTitle"> 现代牧业设备管理系统 </div>
- </el-col>
- <el-col :span="12">
- <div class="date"> {{ row1.date }} </div>
- </el-col>
- </el-row>
- <el-row :gutter="5" class="row2">
- <el-col :span="10">
- <dv-border-box-8 :dur="-1" style="height:500px;">
- <!-- <div class="Title">费用统计</div> -->
- <div id="row2Chart1" style="width: 100%;height:450px;" />
- <el-row :gutter="5" class="groupNews">
- <el-col :span="6">
- <dv-border-box-8 :dur="-1" class="news">
- <b>设备指标预算</b><br>
- <span>{{ row2.chart1.list.monthBudgets }}万元</span>
- </dv-border-box-8>
- </el-col>
- <el-col :span="6">
- <dv-border-box-8 :dur="-1" class="news">
- <b>迄今预算</b><br>
- <span>{{ row2.chart1.list.budget }}万元</span>
- </dv-border-box-8>
- </el-col>
- <el-col :span="6">
- <dv-border-box-8 :dur="-1" class="news">
- <b>设备指标实际</b><br>
- <span>{{ row2.chart1.list.sumPrice }}万元</span>
- </dv-border-box-8>
- </el-col>
- <el-col :span="6">
- <dv-border-box-8 :dur="-1" class="news">
- <b>迄今达成率</b><br>
- <span>{{ row2.chart1.list.donerate }}</span>
- </dv-border-box-8>
- </el-col>
- </el-row>
- <div v-if="row2.chart1.isPastureList" class="pastureNews">
- <dv-border-box-8 :dur="-1" class="newsTitle"><b>{{ row2.chart1.pasture.pastureName }}</b></dv-border-box-8>
- <dv-border-box-8 :dur="-1" class="news2">
- <div>
- <b>设备指标预算:</b><span>{{ row2.chart1.pasture.list.monthBudgets }}万元</span><br>
- <b>设备指标实际:</b><span>{{ row2.chart1.pasture.list.sumPrice }}万元</span><br>
- <b>迄今达成率:</b><span>{{ row2.chart1.pasture.list.donerate }}</span>
- </div>
- </dv-border-box-8>
- </div>
- </dv-border-box-8>
- </el-col>
- <el-col :span="14">
- <el-row>
- <el-col :span="12">
- <dv-border-box-8 :dur="-1" style="height:500px;">
- <div class="Title">集团分项总指标</div>
- <div id="row2Chart2" style="width: 100%;height:480px;" />
- <!-- <div class="Indexbutton">
- <a @click="form_seeDetails('row2Chart2')">查看详情</a>
- </div> -->
- </dv-border-box-8>
- </el-col>
- <el-col :span="12">
- <dv-border-box-8 :dur="-1" style="height:500px;">
- <div class="Title">各中心总指标</div>
- <div id="row2Chart3" style="width: 100%;height:480px;" />
- <div class="Indexbutton">
- <a @click="form_seeDetails('row2Chart3')">查看详情</a>
- </div>
- </dv-border-box-8>
- </el-col>
- <el-col :span="24" style="display:none">
- <dv-border-box-8 :dur="-1" style="height:250px;">
- <div class="Title">资产运转率</div>
- <div id="row2Chart4" style="width: 100%;height:190px;" />
- <div class="Indexbutton">
- <a @click="form_seeDetails('row2Chart4')">查看详情</a>
- </div>
- </dv-border-box-8>
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- <el-row :gutter="5" style="height:300px;color: #fff;">
- <el-col :span="24">
- <dv-border-box-8 :dur="-1" style="height:300px;">
- <div class="Title">费用统计</div>
- <div class="costStatistics">
- <div class="content">
- <dv-border-box-8 :dur="-1" style="height:260px;">
- <div class="title">
- <svg-icon icon-class="维修成本分析" />
- 维修费
- </div>
- <div class="small-title">
- 单头牛实际: 集团:<span>0.62</span> 一中心:<span>0.62</span> 二中心:<span>0.62</span> 三中心:<span>0.62</span>
- </div>
- <el-row :gutter="5" style="height:260px;color: #fff;">
- <el-col :span="24" style="padding:0 10px 0 10px ;">
- <dv-border-box-12 :dur="-1" style="height:200px;">
- <div id="row3Chart1" style="width: 98%;height:200px;" />
- </dv-border-box-12>
- <div class="Indexbutton">
- <a @click="form_seeDetails('row3Chart1')">查看详情</a>
- </div>
- </el-col>
- </el-row>
- </dv-border-box-8>
- </div>
- <div class="content">
- <dv-border-box-8 :dur="-1" style="height:260px;">
- <div class="title">
- <svg-icon icon-class="水量分析" />
- 水费
- </div>
- <div class="small-title">
- 单头牛实际: 集团:<span>0.62</span> 一中心:<span>0.62</span> 二中心:<span>0.62</span> 三中心:<span>0.62</span>
- </div>
- <el-row :gutter="5" style="height:260px;color: #fff;">
- <el-col :span="24" style="padding:0 10px 0 10px ;">
- <dv-border-box-12 :dur="-1" style="height:200px;">
- <div id="row3Chart2" style="width: 98%;height:200px;" />
- </dv-border-box-12>
- <div class="Indexbutton">
- <a @click="form_seeDetails('row3Chart2')">查看详情</a>
- </div>
- </el-col>
- </el-row>
- </dv-border-box-8>
- </div>
- <div class="content">
- <dv-border-box-8 :dur="-1" style="height:260px;">
- <div class="title">
- <svg-icon icon-class="电量分析" />
- 电费
- </div>
- <div class="small-title">
- 单头牛实际: 集团:<span>0.62</span> 一中心:<span>0.62</span> 二中心:<span>0.62</span> 三中心:<span>0.62</span>
- </div>
- <el-row :gutter="5" style="height:260px;color: #fff;">
- <el-col :span="24" style="padding:0 10px 0 10px ;">
- <dv-border-box-12 :dur="-1" style="height:200px;">
- <div id="row3Chart3" style="width: 98%;height:200px;" />
- </dv-border-box-12>
- <div class="Indexbutton">
- <a @click="form_seeDetails('row3Chart3')">查看详情</a>
- </div>
- </el-col>
- </el-row>
- </dv-border-box-8>
- </div>
- <div class="content">
- <dv-border-box-8 :dur="-1" style="height:260px;">
- <div class="title">
- <svg-icon icon-class="燃动分析" />
- 燃动费
- </div>
- <div class="small-title">
- 单头牛实际: 集团:<span>0.62</span> 一中心:<span>0.62</span> 二中心:<span>0.62</span> 三中心:<span>0.62</span>
- </div>
- <el-row :gutter="5" style="height:260px;color: #fff;">
- <el-col :span="24" style="padding:0 10px 0 10px;">
- <dv-border-box-12 :dur="-1" style="height:200px;">
- <div id="row3Chart4" style="width: 98%;height:200px;" />
- </dv-border-box-12>
- <div class="Indexbutton">
- <a @click="form_seeDetails('row3Chart4')">查看详情</a>
- </div>
- </el-col>
- </el-row>
- </dv-border-box-8>
- </div>
- </div>
- </dv-border-box-8>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import { GetReportform, GetDataByName } from '@/api/common'
- import Cookies from 'js-cookie'
- import { parseTime } from '@/utils/index.js'
- import echarts from 'echarts'
- import 'echarts/map/js/china'
- import $ from 'jquery'
- require('echarts/theme/macarons')
- export default {
- name: 'DashboardEditor',
- data() {
- return {
- row1: {
- date: parseTime(new Date(), '{y}-{m}-{d}')
- },
- row2: {
- chart1: {
- // 地图
- getdataListParm: {
- name: 'homepagePastureInfor',
- parammaps: {}
- },
- data: [],
- Chart: null,
- // 预算、实际、达成率
- get_table_dataParm: {
- name: 'homepageRate',
- parammaps: {
- pastureName: '现代牧业'
- }
- },
- list: {},
- isPastureList: false,
- pasture: {
- getdataListParm: {
- name: 'homepageRate',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureName: ''
- }
- },
- pastureName: '',
- listLoading: true,
- total: 0,
- list: []
- }
- },
- chart2: {
- getdataListParm: {
- name: 'homepageEqstatus',
- parammaps: {
- pastureName: '现代牧业'
- }
- },
- data: [],
- Chart: null
- },
- chart3: {
- getdataListParm: {
- name: 'homepageUkdoneRatePasture',
- page: 1,
- offset: 1,
- pagecount: 0,
- returntype: 'Map',
- parammaps: {}
- },
- tableKey: 0,
- listLoading: true,
- total: 0,
- list: [],
- isType: false,
- isPasture: true
- },
- chart4: {
- getdataListParm: {
- name: 'homepageEqRunstatueListPasture',
- parammaps: {
- type: '牧场'
- }
- },
- data: [],
- Chart: null
- }
- },
- row3: {
- chart1: {
- getdataListParm: {
- name: 'homepageFeeWX',
- parammaps: {
- type: '至今',
- pastureName: '现代牧业'
- }
- },
- data: [],
- Chart: null,
- list: {}
- },
- chart2: {
- getdataListParm: {
- name: 'homepageFeeWater',
- parammaps: {
- type: '至今',
- pastureName: '现代牧业'
- }
- },
- data: [],
- Chart: null,
- list: {}
- },
- chart3: {
- getdataListParm: {
- name: 'homepageFeeElec',
- parammaps: {
- type: '至今',
- pastureName: '现代牧业'
- }
- },
- data: [],
- Chart: null,
- list: {}
- },
- chart4: {
- getdataListParm: {
- name: 'homepageFeeDiesel',
- parammaps: {
- type: '至今',
- pastureName: '现代牧业'
- }
- },
- data: [],
- Chart: null,
- list: {}
- }
- },
- rowStyle: { maxHeight: 20 + 'px', height: 20 + 'px', background: '#003366', color: '#fff', fontSize: '8px' },
- cellStyle: { padding: 0 + 'px', background: '#003366', color: '#fff', fontSize: '8px' }
- }
- },
- created() {
- this.getRow2List1()
- this.getRow2Chart1()
- },
- methods: {
- form_seeDetails(item) {
- if (item == 'row2Chart2') {
- console.log('设备状态统计')
- this.$router.push('/report/EquipmentOverview')
- } else if (item == 'row2Chart3') {
- console.log('各中心总指标')
- this.$router.push('/report/EquipmentIndex')
- } else if (item == 'row2Chart4') {
- console.log('资产运转率')
- this.$router.push('/report/EquipmentOperation')
- } else if (item == 'row3Chart1') {
- console.log('维修费')
- this.$router.push('/report/QueryRepair')
- } else if (item == 'row3Chart2') {
- console.log('水费')
- this.$router.push('/report/QueryWater')
- } else if (item == 'row3Chart3') {
- console.log('电费')
- this.$router.push('/report/QueryElec')
- } else if (item == 'row3Chart4') {
- console.log('燃动费')
- this.$router.push('/report/QueryCombustion')
- }
- },
- getRow2List1() {
- GetDataByName(this.row2.chart1.get_table_dataParm).then(response => {
- if (response.data.list !== null) {
- this.row2.chart1.list = response.data.list[0]
- } else {
- this.row2.chart1.list.donerate = ''
- this.row2.chart1.list.monthBudgets = ''
- this.row2.chart1.list.sumPrice = ''
- }
- })
- },
- getRow2Chart1() {
- GetReportform(this.row2.chart1.getdataListParm).then(response => {
- console.log('row2图2', response)
- if (response.data !== null) {
- this.row2.chart1.data = response.data
- } else {
- this.row2.chart1.data = []
- }
- this.getRow2Chart2()
- this.roadRow2Chart1(this.row2.chart1.data)
- })
- },
- roadRow2Chart1(chart_data1) {
- if (this.row2.chart1.Chart != null) {
- this.row2.chart1.Chart.dispose()
- }
- this.row2.chart1.Chart = echarts.init(document.getElementById('row2Chart1'))
- var uploadedDataURL = '/datas/myMap.json'
- var that = this
- $.getJSON(uploadedDataURL, function(geoJson) {
- echarts.registerMap('china', geoJson)
- var geoCoordMap = chart_data1.data1[0]
- var data = chart_data1.data2
- console.log('geoCoordMap', JSON.stringify(geoCoordMap) )
- console.log('data', JSON.stringify(data))
- var max = 480; var min = 9
- var maxSize4Pin = 100; var minSize4Pin = 20
- var convertData = function(data) {
- var res = []
- for (var i = 0; i < data.length; i++) {
- var geoCoord = geoCoordMap[data[i].name]
- if (geoCoord) {
- res.push({ name: data[i].name, value: geoCoord.concat(data[i].value) })
- }
- }
- return res
- }
- console.log('convertData', JSON.stringify(convertData))
- var conDatatest1 = convertData(data)
- console.log('convertData Data', JSON.stringify(conDatatest1))
- var symbolImg = 'image://' + require('@/assets/images/1.png') // 或者import引入在拼接也行
- var option = {
- title: '',
- legend: {
- orient: 'vertical',
- y: 'bottom',
- x: 'right',
- data: ['pm2.5'],
- textStyle: {
- color: '#fff'
- }
- },
- visualMap: {
- show: false,
- min: 0,
- max: 600,
- left: 'left',
- top: 'bottom',
- text: ['高', '低'], // 文本,默认为数值文本
- calculable: true,
- seriesIndex: [1],
- inRange: {}
- },
- geo: {
- map: 'china',
- show: true,
- roam: true, // 鼠标滚动放大缩小
- label: {
- normal: {
- show: false
- },
- emphasis: {
- show: false
- }
- },
- itemStyle: {
- normal: {
- areaColor: '#3a7fd5',
- borderColor: '#0a53e9', // 线
- shadowColor: '#092f8f', // 外发光
- shadowBlur: 20
- },
- emphasis: {
- areaColor: '#0a2dae' // 悬浮区背景
- }
- }
- },
- series: [{
- symbolSize: 5,
- label: {
- normal: {
- formatter: '{b}',
- position: 'bottom',
- lineHeight: 30,
- show: true
- },
- emphasis: {
- show: true
- }
- },
- itemStyle: {
- normal: {
- color: '#fff'
- }
- },
- name: 'light',
- type: 'scatter',
- coordinateSystem: 'geo',
- data: convertData(data)
- }, {
- type: 'map',
- map: 'china',
- geoIndex: 0,
- aspectScale: 0.75, // 长宽比
- showLegendSymbol: false, // 存在legend时显示
- label: {
- normal: {
- show: false
- },
- emphasis: {
- show: false,
- textStyle: {
- color: '#fff'
- }
- }
- },
- roam: true,
- itemStyle: {
- normal: {
- areaColor: '#031525',
- borderColor: '#FFFFFF'
- },
- emphasis: {
- areaColor: '#2B91B7'
- }
- },
- animation: false,
- data: data
- }, {
- name: 'Top 5',
- type: 'scatter',
- coordinateSystem: 'geo',
- // symbol: 'pin',
- symbol: symbolImg,
- symbolSize: [20, 20],
- right: 100,
- label: {
- normal: {
- show: false,
- textStyle: { color: '#fff', fontSize: 9 },
- formatter(value) {
- return value.data.value[2]
- }
- }
- },
- itemStyle: {
- normal: {
- color: '#D8BC37',
- marginRight: 100
- }
- },
- data: convertData(data),
- showEffectOn: 'render',
- rippleEffect: {
- brushType: 'stroke'
- },
- hoverAnimation: true,
- zlevel: 1
- }]
- }
- that.row2.chart1.Chart.setOption(option)
- that.row2.chart1.Chart.on('click', function(param, i) {
- if (param.value.length !== undefined) {
- console.log(param)
- that.row2.chart2.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart3.getdataListParm.name = 'homepageUkdoneRateEqclass'
- that.row2.chart3.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart3.isType = true
- that.row2.chart3.isPasture = false
- that.row2.chart4.getdataListParm.name = 'homepageEqRunstatueListEqclass'
- that.row2.chart4.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart4.getdataListParm.parammaps.type = '设备类别'
- that.row2.chart1.pasture.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart1.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart2.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart3.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart4.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart1.pasture.pastureName = param.name
- that.getRow2PastureList()
- that.getRow2Chart2()
- } else {
- that.row2.chart2.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row2.chart3.isType = false
- that.row2.chart3.isPasture = true
- that.row2.chart3.getdataListParm.name = 'homepageUkdoneRatePasture'
- that.row2.chart3.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row2.chart4.getdataListParm.name = 'homepageEqRunstatueListPasture'
- that.row2.chart4.getdataListParm.parammaps.type = '牧场'
- that.row2.chart4.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart1.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart2.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart3.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart4.getdataListParm.parammaps.pastureName = '现代牧业'
- that.getRow2Chart1()
- that.row2.chart1.isPastureList = false
- }
- })
- window.onresize = function() {
- that.row2.chart1.Chart.resize()
- }
- })
- },
- // 牧场
- getRow2PastureList() {
- this.row2.chart1.pasture.listLoading = true
- GetDataByName(this.row2.chart1.pasture.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.row2.chart1.pasture.list = response.data.list[0]
- console.log('牧场数据', this.row2.chart1.pasture.list)
- this.row2.chart1.isPastureList = true
- } else {
- this.row2.chart1.pasture.list.donerate = ''
- this.row2.chart1.pasture.list.monthBudgets = ''
- this.row2.chart1.pasture.list.sumPrice = ''
- }
- setTimeout(() => {
- this.row2.chart1.pasture.listLoading = false
- }, 100)
- })
- },
- // 集团分项总指标
- getRow2Chart2() {
- GetReportform(this.row2.chart2.getdataListParm).then(response => {
- console.log('row2图2', response)
- if (response.data !== null) {
- this.row2.chart2.data = response.data
- this.row2.chart2.data = {
- data1:['维修','水','电','燃动'],
- data2:[200,100,70,50],
- data3:[190,90,60,40],
- data4:[180,80,70,50],
- data5:[160,80,70,50]
- }
- } else {
- this.row2.chart2.data = []
- }
- this.getRow2Chart3()
- this.roadRow2Chart2(this.row2.chart2.data)
- })
- },
- roadRow2Chart2(chart_data1) {
- if (this.row2.chart2.Chart != null) {
- this.row2.chart2.Chart.dispose()
- }
- this.row2.chart2.Chart = echarts.init(document.getElementById('row2Chart2'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- color: ['#769cfc','#19FA60','#FF9733',' #FFFF00'],
- grid: { left: '3%', right: '13%', top: '15%', bottom: '4%', containLabel: true },
- legend: {
- data: ['迄今预算', '今年实际', '去年同期实际', '单头牛实际'], textStyle: { color: '#fff' }
- },
- xAxis: [{ type: 'category', name: '设备类别', data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '费用/百万', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff' }}}],
- series: [
- { type: 'bar', barWidth: 20, data: chart_data1.data2, name:'迄今预算', emphasis: { label: { show: true, position: 'inside' }} },
- { type: 'bar', barWidth: 20, data: chart_data1.data3, name:'今年实际', emphasis: { label: { show: true, position: 'inside' }} },
- { type: 'bar', barWidth: 20, data: chart_data1.data4, name:'去年同期实际', emphasis: { label: { show: true, position: 'inside' }} },
- { type: 'line', data: chart_data1.data5, name:'单头牛实际', emphasis: { label: { show: true, position: 'inside' }} }
- ]
- }
- this.row2.chart2.Chart.setOption(option)
- window.onresize = function() {
- this.row2.chart2.Chart.resize()
- }
- },
- // 保养完成率
- getRow2Chart3() {
- this.row2.chart3.listLoading = true
- GetDataByName(this.row2.chart3.getdataListParm).then(response => {
- if (response.data !== null) {
- this.row2.chart3.data = response.data
- this.row2.chart3.data = {
- data1:['一中心','二中心','三中心'],
- data2:[200,100,70],
- data3:[190,90,60],
- data4:[10,80,70]
- }
- } else {
- this.row2.chart3.data = []
- }
- this.getRow2Chart4()
- this.roadRow2Chart3(this.row2.chart3.data)
- setTimeout(() => {
- this.row2.chart3.listLoading = false
- }, 100)
- })
- },
- roadRow2Chart3(chart_data1) {
- if (this.row2.chart3.Chart != null) {
- this.row2.chart3.Chart.dispose()
- }
- this.row2.chart3.Chart = echarts.init(document.getElementById('row2Chart3'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- color: ['#769cfc','#19FA60',' #FFFF00'],
- grid: { left: '3%', right: '13%', top: '15%', bottom: '4%', containLabel: true },
- legend: {
- data: ['设备指标迄今预算', '设备指标迄今实际', '完成率'], textStyle: { color: '#fff'}
- },
- xAxis: [{ type: 'category', name: '', data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [
- { type: 'value', name: '费用/百万', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff' }}},
- { type: 'value', name: '', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value} %' },axisLine: { lineStyle: { color: '#fff' }} }
- ],
- series: [
- { type: 'bar', barWidth: 20, data: chart_data1.data2, name:'设备指标迄今预算', emphasis: { label: { show: true, position: 'inside' }} },
- { type: 'bar', barWidth: 20, data: chart_data1.data3, name:'设备指标迄今实际', emphasis: { label: { show: true, position: 'inside' }} },
- { type: 'line', data: chart_data1.data4, name:'完成率', emphasis: { label: { show: true, position: 'inside' }} }
- ]
- }
- this.row2.chart3.Chart.setOption(option)
- window.onresize = function() {
- this.row2.chart3.Chart.resize()
- }
- },
- // 资产运转率
- getRow2Chart4() {
- GetReportform(this.row2.chart4.getdataListParm).then(response => {
- console.log('row2图4', response)
- if (response.data !== null) {
- this.row2.chart4.data = response.data
- } else {
- this.row2.chart4.data = []
- }
- this.getRow3Chart1()
- this.roadRow2Chart4(this.row2.chart4.data)
- })
- },
- roadRow2Chart4(chart_data1) {
- if (this.row2.chart4.Chart != null) {
- this.row2.chart4.Chart.dispose()
- }
- this.row2.chart4.Chart = echarts.init(document.getElementById('row2Chart4'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- color: ['#769cfc'],
- grid: { left: '3%', right: '8%', top: '15%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: chart_data1.data3[0],
- axisLabel: {
- interval: 0,
- rotate: 40
- },
- data: chart_data1.data1, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '%', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff' }}}],
- series: [
- {
- type: 'bar',
- data: chart_data1.data2,
- emphasis: { label: { show: true, position: 'inside' }}
- }
- ]
- }
- this.row2.chart4.Chart.setOption(option)
- window.onresize = function() {
- this.row2.chart4.Chart.resize()
- }
- },
- getRow3Chart1() {
- GetReportform(this.row3.chart1.getdataListParm).then(response => {
- console.log('row3图1', response)
- if (response.data !== null) {
- this.row3.chart1.data.data1 = response.data.data1
- this.row3.chart1.data.data2 = response.data.data2
- this.row3.chart1.data.data3 = response.data.data3
- this.row3.chart1.data.data4 = response.data.data4
- this.row3.chart1.data.data5 = response.data.data5
- this.row3.chart1.list.data1 = response.data.data6[0]
- this.row3.chart1.list.data2 = response.data.data7[0]
- this.row3.chart1.list.data3 = response.data.data8[0]
- this.$forceUpdate()
- } else {
- this.row3.chart1.data = {}
- this.row3.chart1.list = {}
- }
- this.getRow3Chart2()
- this.roadRow3Chart1(this.row3.chart1.data)
- })
- },
- roadRow3Chart1(chart_data1) {
- if (this.row3.chart1.Chart != null) {
- this.row3.chart1.Chart.dispose()
- }
- this.row3.chart1.Chart = echarts.init(document.getElementById('row3Chart1'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- legend: {
- data: [
- { name: '迄今预算', icon: 'circle' },
- { name: '今年实际', icon: 'circle' },
- { name: '去年同期实际', icon: 'circle' }
- ],
- itemWidth: 5,
- itemHeight: 5,
- itemGap: 5,
- y: 10,
- textStyle: { color: '#fff', fontSize: '10' }
- },
- color: ['#769cfc','#19FA60','#FF9733'],
- grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: '时间', nameTextStyle: { padding: [0, 0, -20, -30] }, data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff', width: 1 }}}],
- series: [
- {
- name: '迄今预算',
- textStyle: {
- fontSize: 12,
- fontWeight: 'bolder',
- color: '#fff'
- },
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data2,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '今年实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data3,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '去年同期实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data5,
- emphasis: { label: { show: true, position: 'inside' }}
- }
- ]
- }
- this.row3.chart1.Chart.setOption(option)
- window.onresize = function() {
- this.row3.chart1.Chart.resize()
- }
- },
- getRow3Chart2() {
- GetReportform(this.row3.chart2.getdataListParm).then(response => {
- console.log('row3图2', response)
- if (response.data !== null) {
- this.row3.chart2.data.data1 = response.data.data1
- this.row3.chart2.data.data2 = response.data.data2
- this.row3.chart2.data.data3 = response.data.data3
- this.row3.chart2.data.data4 = response.data.data4
- this.row3.chart2.data.data5 = response.data.data5
- this.row3.chart2.list.data1 = response.data.data6[0]
- this.row3.chart2.list.data2 = response.data.data7[0]
- this.row3.chart2.list.data3 = response.data.data8[0]
- this.$forceUpdate()
- } else {
- this.row3.chart2.data = {}
- this.row3.chart2.list = {}
- }
- this.getRow3Chart3()
- this.roadRow3Chart2(this.row3.chart2.data)
- })
- },
- roadRow3Chart2(chart_data1) {
- if (this.row3.chart2.Chart != null) {
- this.row3.chart2.Chart.dispose()
- }
- this.row3.chart2.Chart = echarts.init(document.getElementById('row3Chart2'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- legend: {
- data: [
- { name: '迄今预算', icon: 'circle' },
- { name: '今年实际', icon: 'circle' },
- { name: '去年同期实际', icon: 'circle' }
- ],
- itemWidth: 5,
- itemHeight: 5,
- itemGap: 5,
- y: 10,
- textStyle: { color: '#fff', fontSize: '10' }
- },
- color: ['#769cfc','#19FA60','#FF9733'],
- grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: '时间', nameTextStyle: { padding: [0, 0, -20, -30] }, data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff', width: 1 }}}],
- series: [
- {
- name: '迄今预算',
- textStyle: {
- fontSize: 12,
- fontWeight: 'bolder',
- color: '#fff'
- },
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data2,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '今年实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data3,
- emphasis: { label: { show: true, position: 'inside' }}
- },{
- name: '去年同期实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data5,
- emphasis: { label: { show: true, position: 'inside' }}
- }
- ]
- }
- this.row3.chart2.Chart.setOption(option)
- window.onresize = function() {
- this.row3.chart2.Chart.resize()
- }
- },
- getRow3Chart3() {
- GetReportform(this.row3.chart3.getdataListParm).then(response => {
- console.log('row3图3', response)
- if (response.data !== null) {
- this.row3.chart3.data.data1 = response.data.data1
- this.row3.chart3.data.data2 = response.data.data2
- this.row3.chart3.data.data3 = response.data.data3
- this.row3.chart3.data.data4 = response.data.data4
- this.row3.chart3.data.data5 = response.data.data5
- this.row3.chart3.list.data1 = response.data.data6[0]
- this.row3.chart3.list.data2 = response.data.data7[0]
- this.row3.chart3.list.data3 = response.data.data8[0]
- this.$forceUpdate()
- } else {
- this.row3.chart3.data = {}
- this.row3.chart3.list = {}
- }
- this.getRow3Chart4()
- this.roadRow3Chart3(this.row3.chart3.data)
- })
- },
- roadRow3Chart3(chart_data1) {
- if (this.row3.chart3.Chart != null) {
- this.row3.chart3.Chart.dispose()
- }
- this.row3.chart3.Chart = echarts.init(document.getElementById('row3Chart3'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- legend: {
- data: [
- { name: '迄今预算', icon: 'circle' },
- { name: '今年实际', icon: 'circle' },
- { name: '去年同期实际', icon: 'circle' }
- ],
- itemWidth: 5,
- itemHeight: 5,
- itemGap: 5,
- y: 10,
- textStyle: { color: '#fff', fontSize: '10' }
- },
- color: ['#769cfc','#19FA60','#FF9733'],
- grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: '时间', nameTextStyle: { padding: [0, 0, -20, -30] }, data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff', width: 1 }}}],
- series: [
- {
- name: '今年预算',
- textStyle: {
- fontSize: 12,
- fontWeight: 'bolder',
- color: '#fff'
- },
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data2,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '今年实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data3,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '去年同期实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data5,
- emphasis: { label: { show: true, position: 'inside' }}
- }
- ]
- }
- this.row3.chart3.Chart.setOption(option)
- window.onresize = function() {
- this.row3.chart3.Chart.resize()
- }
- },
- getRow3Chart4() {
- GetReportform(this.row3.chart4.getdataListParm).then(response => {
- console.log('row3图4', response)
- if (response.data !== null) {
- this.row3.chart4.data.data1 = response.data.data1
- this.row3.chart4.data.data2 = response.data.data2
- this.row3.chart4.data.data3 = response.data.data3
- this.row3.chart4.data.data4 = response.data.data4
- this.row3.chart4.data.data5 = response.data.data5
- this.row3.chart4.list.data1 = response.data.data6[0]
- this.row3.chart4.list.data2 = response.data.data7[0]
- this.row3.chart4.list.data3 = response.data.data8[0]
- this.$forceUpdate()
- } else {
- this.row3.chart4.data = {}
- this.row3.chart4.list = {}
- }
- this.roadRow3Chart4(this.row3.chart4.data)
- })
- },
- roadRow3Chart4(chart_data1) {
- if (this.row3.chart4.Chart != null) {
- this.row3.chart4.Chart.dispose()
- }
- this.row3.chart4.Chart = echarts.init(document.getElementById('row3Chart4'))
- var option = {
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- legend: {
- data: [
- { name: '迄今预算', icon: 'circle' },
- { name: '今年实际', icon: 'circle' },
- { name: '去年同期实际', icon: 'circle' }
- ],
- itemWidth: 5,
- itemHeight: 5,
- itemGap: 5,
- y: 10,
- textStyle: { color: '#fff', fontSize: '10' }
- },
- color: ['#769cfc','#19FA60','#FF9733'],
- grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: '时间', nameTextStyle: { padding: [0, 0, -20, -30] }, data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff', width: 1 }}}],
- series: [
- {
- name: '今年预算',
- textStyle: {
- fontSize: 12,
- fontWeight: 'bolder',
- color: '#fff'
- },
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data2,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '今年实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data3,
- emphasis: { label: { show: true, position: 'inside' }}
- }, {
- name: '去年同期实际',
- type: 'bar',
- barWidth: 10,
- data: chart_data1.data5,
- emphasis: { label: { show: true, position: 'inside' }}
- }
- ]
- }
- this.row3.chart4.Chart.setOption(option)
- window.onresize = function() {
- this.row3.chart4.Chart.resize()
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .app-container {
- background-color: #003366; color: #fff;min-height: 100vh;
- .Title{height: 30px;line-height: 30px;text-align: left;padding-left: 10px;}
- .title{height: 30px;line-height: 30px;text-align: center;}
- .generalTitle{width: 100%;margin-left:150px;text-align: right;font-size: 30px;line-height: 60px;font-weight: 600;}
- .date{width: 100%;text-align: right;font-size: 14px;line-height: 60px;padding-right: 20px;}
- .Indexbutton{
- height: 20px;position: relative;width: 100%;
- a{display: inline-block;height: 20px;line-height: 20px;font-size:10px;text-align: center;background: #769cfc;color: #fff;border-radius: 2px;width: 55px;position: absolute;left: 0;right: 0;top: 5px;bottom: 0;margin: 0 auto;}
- }
- .IndexTable{
- padding: 0 10px;
- .Indextable{background: #003366;}
- }
- .row2{
- height:500px;position: relative;
- .groupNews{
- height:60px;width:70%;z-index: 1;position:absolute;top: 5px;left: 10px;
- .news{
- height:60px;text-align: center;
- b{line-height: 30px;font-size: 14px;}
- span{line-height: 20px;font-size: 12px;}
- }
- }
- .pastureNews{
- height:150px;width:40%;z-index: 1;position:absolute;bottom: 20px;left: 10px;background: #055597;
- .newsTitle{height: 30px;line-height: 30px;padding-left: 10px;}
- .news2{
- height: 120px;padding-left: 10px;font-size: 12px;
- div{
- padding-top: 10px;line-height: 30px;
- b{font-weight: 400;}
- }
- }
- }
- }
- // row3
- .costStatistics{
- display: flex;justify-content: space-between;margin: 0 5px;
- .content{
- flex: 1 1 1 1 auto;
- width: 100%;
- .contentLeft{
- height: 200px;position:relative;
- div{
- font-size: 10px;width: 100%;text-align: center;height: 130px;
- position: absolute; top: 0; bottom:0; left: 0; right: 0; margin: auto;
- b{display: block;line-height: 22px;height: 22px;margin-top: 10px;}
- span{display: block;line-height: 22px;height: 22px;}
- }
- b:nth-child(1){
- margin-top: -10px;
- }
- }
- }
- }
- }
- /deep/ .el-table__body-wrapper::-webkit-scrollbar {
- display:block;
- width: 8px;
- height: 8px;
- background-color: rgba(245, 245, 245, 0.47);
- }
- /*定义滚动条的轨道,内阴影及圆角*/
- /deep/ .el-table__body-wrapper::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
- border-radius: 10px;
- background-color: #f5f5f5;
- }
- /*定义滑块,内阴影及圆角*/
- /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
- /*width: 10px;*/
- height: 20px;
- border-radius: 10px;
- -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
- background-color: rgba(85, 85, 85, 0.25);
- }
- .small-title{
- font-size: 12px;padding-left: 10px;
- span{
- margin: 0 5px;
- }
- }
- </style>
|