| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923 |
- <!-- -->
- <template>
- <div>
- <el-row>
- <el-container>
- <el-header style="height: 5vh;padding: 10px 10px;">
- <el-form :inline="true" class="demo-form-inline">
- <el-form-item label="统计分类">
- <el-select v-model="search_type" placeholder="统计分类" @change="changeType" >
- <el-option label="专业" value="1"></el-option>
- <el-option label="责任主体" value="2"></el-option>
- <el-option label="地区" value="3"></el-option>
- <el-option label="问题发生频度" value="4"></el-option>
- <el-option label="贫困地区" value="5"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="对比年度">
- <el-select v-model="search_year" placeholder="对比年度" @change="addContrastYear" clearable >
- <el-option v-for="item in yearList" :label="item.year" :value="item.year" :key="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="批次">
- <el-select v-model="search_batch" placeholder="批次">
- <el-option v-for="item in pcList" :label="item.batch" :value="item.batch" :key="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="督查状态">
- <el-select v-model="search_status" placeholder="督查状态">
- <el-option label="专家" value="3" ></el-option>
- <el-option label="提交意见稿" value="4" ></el-option>
- <el-option label="成果讨论阶段" value="5" ></el-option>
- <el-option label="中心修改阶段" value="6" ></el-option>
- <el-option label="四局修改阶段" value="7" ></el-option>
- </el-select>
- </el-form-item>
- <el-button type="primary" size="mini" @click="searchData">查询</el-button>
- </el-form>
- </el-header>
- <el-main style="padding:0;">
- <el-row>
- <el-col :span="12">
- <div style="width:100%;" :style="{'height': colHeight/2 - 40 + 'px'}" ref="pie_chart" ></div>
- </el-col>
- <el-col :span="12">
- <div style="width:100%;" :style="{'height': colHeight/2 - 40 + 'px'}" ref="total_bar_chart"></div>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <div style="width:100%;" :style="{'height': colHeight/2 - 40 + 'px'}" ref="normal_bar_chart"></div>
- </el-col>
- <el-col :span="12">
- <div style="width:100%;" :style="{'height': colHeight/2 - 40 + 'px'}" ref="serious_bar_chart"></div>
- </el-col>
- </el-row>
- </el-main>
- </el-container>
- </el-row>
- </div>
- </template>
- <script>
- //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- //例如:import 《组件名称》 from '《组件路径》';
- import echarts from 'echarts'
- import request from "../../../utils/gw_ajax_request"
- import {
- getTree,
- } from "../../../api/InspectionReport.js";
- export default {
- //import引入的组件需要注入到对象中才能使用
-
- components: {},
- data() {
- //这里存放数据
- return {
- //专业饼图数据
- countToNormal:0,
- countToHeavier:0,
- countToSerious:0,
- countTotalHeavierAndSerious:0,
- countTotalNormal:0,
- countToNormal_DB:0,
- countToHeavier_DB:0,
- countToSerious_DB:0,
- countTotalHeavierAndSerious_DB:0,
- countTotalNormal_DB:0,
- echartData_ProfessionOrPoverty:[],
- //责任主体饼图数据
- mainBodyNum:[],
- normalNum:[],
- heavierNum:[],
- seriousNum:[],
- xName:[],
- //地区数据
- areaData:[],
- avgNumOfArea:0,
- avgAreaLists:[],
- //发现问题的专业分布情况
- problemNumCount:[],
- problemNumCount_DB:[],
- problemNumName:[],
- proportionLists:[],
- proportionLists_DB:[],
- heavierAndSeriousLists:[],
- heavierAndSeriousLists_DB:[],
- problemNumCountHeavier:[],
- problemNumCountSerious:[],
- problemNumNameHeavierAndSerious:[],
- problemNumNameHeavierAndSeriousZb:[],
- problemNumCountHeavier_DB:[],
- problemNumCountSerious_DB:[],
- problemNumNameHeavierAndSerious_DB:[],
- problemNumNameHeavierAndSeriousZb_DB:[],
- problemNumCountNormal:[],
- problemNumNameNormal:[],
- problemNumNameNormalZb:[],
- problemNumCountNormal_DB:[],
- problemNumNameNormal_DB:[],
- problemNumNameNormalZb_DB:[],
- normalLists:[],
- normalLists_DB:[],
- yearList:[],
- pcList:[],
- needToChangeChart_pie:true,
- needToChangeChart_responsible_bar:false,
- search_type:"1",
- search_year:"",
- search_batch:"",
- search_status:"",
- filterText: '',
- region:"",
- leftWidth: 4,
- rightWidth: 20,
- isOpen: true,
- treeDataLists: [],
- defaultExpanded:[],//树默认展开节点数组
- defaultProps: {
- children: 'children',
- label: 'pnm'
- },
- colHeight:window.innerHeight - 90,
- proCountNum:[128,115,100,94,86,50],
- proporNum:[22,20,17,16,15,9],
- addYear:[],
- addYearTotal_BarLineChart:[],
- addYearNormal_BarLineChart:[]
- };
- },
- //监听属性 类似于data概念
- computed: {},
- //监控data中的数据变化
- watch: {
- filterText(val) {
- this.$refs.tree2.filter(val);
- },
- // search_type(n,o){
- // if( n == '2'){
- // this.needToChangeChart_pie = false;
- // this.needToChangeChart_responsible_bar = true;
- // this.init_Responsible_BarLineChart();
- // }
- // }
- },
- //方法集合
- methods: {
- async getYearPc(){
- await request.post(`/tac/insp/year/list`,{}).then(res =>{
- if(res.success){
- this.$nextTick(() =>{
- this.yearList = res.data;
- })
- }
- })
- request.post(`/tac/insp/batch/list`,{}).then(res =>{
- if(res.success){
- this.pcList = res.data;
- }
- })
- },
- //饼图-专业
- getDataChartData(){
- var _self = this;
- request.post(`/tac/pblm/info/countPblmInfoByStb`,{}).then(res =>{//正确的接口地址
- // request.post(`/tac/pblm/info/countPblmInfoBySub`,{}).then(res =>{//测试接口地址
-
- if(res.success){
- res.data.sort(function (a, b) {
- var value1 = a['count'];
- var value2 = b['count'];
- return value2 - value1;
- });
- res.data.forEach(ele => {
- _self.countToNormal += Number(ele.normal);
- _self.countToHeavier += Number(ele.heavier);
- _self.countToSerious += Number(ele.serious);
-
- });
- _self.echartData_ProfessionOrPoverty = [
- {
- "value":_self.countToNormal,
- "name": "一般问题"
- },
- {
- "value":_self.countToHeavier,
- "name": "严重问题"
- },
- {
- "value":_self.countToSerious,
- "name": "较重问题"
- },
- ]
- this.initPieChart();
- }
- })
- },
- //柱状图-发现问题的专业分布情况
- getBarChartData(){
- var _self = this;
- let params = {
- "year" : _self.search_year
- }
- request.post(`/tac/pblm/info/countPblmInfoByStb`,{params}).then(res =>{//正确的接口地址
- // request.post(`/tac/pblm/info/countPblmInfoBySub`,{}).then(res =>{//测试接口地址
- let countTotal = 0;
- _self.countTotalHeavierAndSerious = 0;
- _self.countTotalNormal = 0;
- if(res.success){
- res.data.sort(function (a, b) {
- var value1 = a['count'];
- var value2 = b['count'];
- return value2 - value1;
- });
- res.data.forEach(ele => {
- _self.problemNumCount.push(Number(ele.count));
- _self.problemNumName.push(ele.name);
- countTotal += Number(ele.count);
- _self.heavierAndSeriousLists.push({
- "countSum":Number(ele.heavier) + Number(ele.serious),
- "heavier":Number(ele.heavier),
- "serious":Number(ele.serious),
- "name":ele.name,
- })
- _self.normalLists.push({
- "normal":Number(ele.normal),
- "name":ele.name,
- })
- });
- _self.heavierAndSeriousLists.sort(
- function (a, b) {
- var value1 = a['countSum'];
- var value2 = b['countSum'];
- return value2 - value1;
- });
- _self.normalLists.sort(
- function (a, b) {
- var value1 = a['normal'];
- var value2 = b['normal'];
- return value2 - value1;
- });
- _self.heavierAndSeriousLists.forEach(ele =>{
- _self.countTotalHeavierAndSerious += Number(ele.countSum);
- })
- _self.normalLists.forEach(ele =>{
- _self.countTotalNormal += Number(ele.normal);
- })
- _self.heavierAndSeriousLists.forEach(ele =>{
- _self.problemNumCountHeavier.push(Number(ele.heavier));
- _self.problemNumCountSerious.push(Number(ele.serious));
- _self.problemNumNameHeavierAndSerious.push(ele.name);
- _self.problemNumNameHeavierAndSeriousZb.push(parseInt((ele.countSum / _self.countTotalHeavierAndSerious) * 100));
- })
- _self.normalLists.forEach(ele =>{
- _self.problemNumCountNormal.push(Number(ele.normal));
- _self.problemNumNameNormal.push(ele.name);
- _self.problemNumNameNormalZb.push(parseInt((ele.normal / _self.countTotalNormal) * 100));
- })
- _self.problemNumCount.forEach(ele => {
- _self.proportionLists.push((ele / countTotal) * 100);
- });
-
- this.init_Total_BarLineChart();
- this.init_Serious_BarLineChart();
- this.init_Normal_BarLineChart();
- }
- })
- },
- getBarChartData_DB(){
- var _self = this;
- let params = {
- "year" : _self.search_year
- }
- request.post(`/tac/pblm/info/countPblmInfoByStb`,params).then(res =>{//正确的接口地址
- // request.post(`/tac/pblm/info/countPblmInfoBySub`,{}).then(res =>{//测试接口地址
- let countTotal = 0;
- _self.countTotalHeavierAndSerious_DB = 0;
- _self.countTotalNormal_DB = 0;
- if(res.success){
- res.data.sort(function (a, b) {
- var value1 = a['count'];
- var value2 = b['count'];
- return value2 - value1;
- });
- res.data.forEach(ele => {
- _self.problemNumCount_DB.push(Number(ele.count));
- // _self.problemNumName.push(ele.name);
- countTotal += Number(ele.count);
- _self.heavierAndSeriousLists_DB.push({
- "countSum":Number(ele.heavier) + Number(ele.serious),
- "heavier":Number(ele.heavier),
- "serious":Number(ele.serious),
- "name":ele.name,
- })
- _self.normalLists_DB.push({
- "normal":Number(ele.normal),
- "name":ele.name,
- })
- });
- _self.heavierAndSeriousLists_DB.sort(
- function (a, b) {
- var value1 = a['countSum'];
- var value2 = b['countSum'];
- return value2 - value1;
- });
- _self.normalLists_DB.sort(
- function (a, b) {
- var value1 = a['normal'];
- var value2 = b['normal'];
- return value2 - value1;
- });
- _self.heavierAndSeriousLists_DB.forEach(ele =>{
- _self.countTotalHeavierAndSerious += Number(ele.countSum);
- })
- _self.normalLists_DB.forEach(ele =>{
- _self.countTotalNormal_DB += Number(ele.normal);
- })
- _self.heavierAndSeriousLists_DB.forEach(ele =>{
- _self.problemNumCountHeavier_DB.push(Number(ele.heavier));
- _self.problemNumCountSerious_DB.push(Number(ele.serious));
- // _self.problemNumNameHeavierAndSerious_DB.push(ele.name);
- _self.problemNumNameHeavierAndSeriousZb_DB.push(parseInt((ele.countSum / _self.countTotalHeavierAndSerious_DB) * 100));
- })
- _self.normalLists_DB.forEach(ele =>{
- _self.problemNumCountNormal_DB.push(Number(ele.normal));
- // _self.problemNumNameNormal_DB.push(ele.name);
- _self.problemNumNameNormalZb_DB.push(parseInt((ele.normal / _self.countTotalNormal_DB) * 100));
- })
- _self.problemNumCount_DB.forEach(ele => {
- _self.proportionLists_DB.push((ele / countTotal) * 100);
- });
-
- this.init_Total_BarLineChart();
- this.init_Serious_BarLineChart();
- this.init_Normal_BarLineChart();
- }
- })
- },
- //饼图-责任主体
- getResponsibilityData(){
- var _self = this;
- request.post(`/tac/pblm/info/countPblmInfoBySub`,{}).then(res =>{
- if(res.success){
- let count = 0;
- res.data.forEach(ele =>{
- //主体个数
- _self.mainBodyNum.push(Number(ele.count));
- _self.normalNum.push(Number(ele.normal));
- _self.heavierNum.push(Number(ele.heavier));
- _self.seriousNum.push(Number(ele.serious));
- _self.xName.push(ele.name);
-
- })
-
- this.initPieChart();
- }
- })
- },
-
- //柱图-地区
- getAreaData(){
- var _self = this;
- request.post(`/tac/pblm/info/countPblmInfoByAdCode`,{}).then(res =>{
- if(res.success){
- let countNum = 0;
- res.data.sort(function (a, b) {
- var value1 = a['count'];
- var value2 = b['count'];
- return value2 - value1;
- });
- res.data.forEach(ele =>{
- _self.areaData.push(Number(ele.count));
- _self.xName.push(ele.name);
- countNum += Number(ele.count);
- })
- // _self.areaData.sort(function(a, b){
- // return b - a
- // });
- _self.avgNumOfArea = countNum / res.data.length;
- for(let i = 0; i < res.data.length; i++){
- _self.avgAreaLists.push(parseInt(_self.avgNumOfArea));
- }
- this.initPieChart();
- }
- })
- },
- //饼图-贫困地区
- getPovertyData(){
- var _self = this;
- let params = {
- 'isPoverty': "1",
- };
- request.post(`/tac/pblm/info/countPblmInfoByAdCode`,{params}).then(res =>{
- if(res.success){
- if(res.success){
- if(res.data.length != 0){
- res.data.forEach(ele => {
- _self.countToNormal += Number(ele.normal);
- _self.countToHeavier += Number(ele.heavier);
- _self.countToSerious += Number(ele.serious);
- });
- _self.echartData_ProfessionOrPoverty = [
- {
- "value":_self.countToNormal,
- "name": "一般问题"
- },
- {
- "value":_self.countToHeavier,
- "name": "严重问题"
- },
- {
- "value":_self.countToSerious,
- "name": "较重问题"
- },
- ]
- }else{
- _self.echartData_ProfessionOrPoverty = [
- {
- "value":0,
- "name": "一般问题"
- },
- {
- "value":0,
- "name": "严重问题"
- },
- {
- "value":0,
- "name": "较重问题"
- },
- ]
- }
- this.initPieChart();
- }
- }
- })
- },
- getTreeData:function(){
- let _self = this;
- getTree('008','1').then((res)=>{
- _self.treeDataLists =_self.filterTreeData(res.data[0].children,9);
- _self.treeDataLists;
- // 默认隐藏到批次
- // _self.treeDataLists.forEach((element) => {
- // _self.defaultExpanded.push(element.id);
- // });
- });
- _self.defaultExpanded.unshift("008");
- },
- compare(value1, value2) {
- if(value1 > value2){
- return -1;
- }else if(value1 < value2){
- return 1;
- }else{
- return 0;
- }
- },
- /**
- * 通过判断某个属性,截取全部树结构中符合该条件的节点
- * @param {String} arr 旧树结构数据
- * @param {String} id the old mime-type
- * @return the new mime-type
- */
- filterTreeData(arr, id) {
- var _self = this;
- for (var i = 0; i < arr.length; i++) {
- var el = arr[i]
- if (el.id.length <= id) {
- if (el.children && el.children.length) {
- _self.filterTreeData(el.children, id)
- }
- } else {
- arr.splice(i, arr.length)
- }
- }
- return arr
- },
- closeLeft(){
- this.isOpen = false
- this.leftWidth = 0
- this.rightWidth = 24
- },
- openLeft(){
- this.isOpen = true
- this.leftWidth = 5
- this.rightWidth = 19
- },
- filterNode(value, data) {
- if (!value) return true;
- return data.pnm.indexOf(value) !== -1;
- },
-
- //树节点点击事件
- treeNodeClickHandler:function(data,node,tree){
- if(node.childNodes.length == 0){
- this.currentNodeId = data.id;
- this.projectName = data.pnm;
- this.objId = data.objId;
- this.inspGroupId = data.pid;
- this.reallMenuLists = [];
- this.getMenu();
- }else{
- return;
- }
- },
- changeType(item){
- // alert(this.search_type)
- this.xName = [];
- this.mainBodyNum = [];
- this.normalNum = [];
- this.heavierNum = [];
- this.seriousNum = [];
- this.areaData = [];
- this.problemNumCount = [];
- this.problemNumName = [];
- this.proportionLists = [];
- this.problemNumCount=[],
- this.problemNumCount_DB=[];
- this.proportionLists_DB=[];
- this.heavierAndSeriousLists=[];
- this.heavierAndSeriousLists_DB=[];
- this.problemNumCountHeavier=[];
- this.problemNumCountSerious=[];
- this.problemNumNameHeavierAndSerious=[];
- this.problemNumNameHeavierAndSeriousZb=[];
- this.problemNumCountHeavier_DB=[];
- this.problemNumCountSerious_DB=[];
- this.problemNumNameHeavierAndSerious_DB=[];
- this.problemNumNameHeavierAndSeriousZb_DB=[];
- this.problemNumCountNormal=[];
- this.problemNumNameNormal=[];
- this.problemNumNameNormalZb=[];
- this.problemNumCountNormal_DB=[];
- this.problemNumNameNormal_DB=[];
- this.problemNumNameNormalZb_DB=[];
- this.countToNormal = 0;
- this.countToHeavier = 0;
- this.countToSerious = 0;
- this.countTotalHeavierAndSerious = 0;
- this.countTotalNormal = 0;
- if(item == 1){
- this.getDataChartData();
- }else if(item == 2){
- this.getResponsibilityData();
- }else if (item == 3){
- this.getAreaData();
- }else{
- this.getPovertyData();
- }
- },
- initPieChart:function(){
- var _self = this;
- let chart = echarts.init(this.$refs['pie_chart']);
- var scale = 1;
- var echartData = _self.echartData_ProfessionOrPoverty;
- // var echartData_poverty = [{
- // value: 159,
- // name: '一般问题'
- // }, {
- // value: 16,
- // name: '严重问题'
- // }, {
- // value: 94,
- // name: '较重问题'
- // }]
- var rich = {
- yellow: {
- color: "#ffc72b",
- fontSize: 30 * scale,
- padding: [5, 4],
- align: 'center'
- },
- black: {
- // color: "#3a3a3a",
- fontSize: 30 * scale,
- padding: [5, 4],
- align: 'center'
- },
- blackSmall: {
- // color: "#3a3a3a",
- fontSize: 16 * scale,
- padding: [5, 4],
- align: 'center'
- },
- total: {
- // color: "#ffc72b",
- fontSize: 40 * scale,
- align: 'center'
- },
- white: {
- // color: "#fff",
- align: 'center',
- fontSize: 14 * scale,
- padding: [21, 0]
- },
- blue: {
- color: '#49dff0',
- fontSize: 16 * scale,
- align: 'center'
- },
- hr: {
- borderColor: '#3a3a3a',
- width: '100%',
- borderWidth: 1,
- height: 0,
- }
- }
- let option = {
- title: {
- text:'发现问题的严重程度分布情况',
- top: '3%',
- left: '10%',
- // padding:[24,0],
- textStyle:{
- // color:'#fff',
- fontSize:18*scale,
- align:'center'
- }
- },
-
- legend: {
- // selectedMode:false,
- formatter: function(name) {
- var total = 0; //各科正确率总和
- var averagePercent; //综合正确率
- echartData.forEach(function(value, index, array) {
- total += value.value;
- });
- return '{total|' + total + '}';
- },
- data: [echartData[0].name],
- // data: ['高等教育学'],
- // itemGap: 50,
- left: 'center',
- top: 'center',
- icon: 'none',
- align:'center',
- textStyle: {
- // color: "#fff",
- fontSize: 16 * scale,
- rich: rich
- },
- },
- series: [{
- name: '总考生数量',
- type: 'pie',
- radius: ['40%', '50%'],
- // hoverAnimation: false,
- color: ['#5ce9c7', '#fed172', '#fb6086'],
- label: {
- normal: {
- formatter: function(params, ticket, callback) {
- var total = 0;
- var percent = 0;
- echartData.forEach(function(value, index, array) {
- total += value.value;
- });
- if(total != 0){
- percent = ((params.value / total) * 100).toFixed(1);
- return '{blackSmall|' + params.name + '}{black|' + params.value + '}\n{blue|' + percent + '%}';
- }else{
- return '{blackSmall|' + params.name + '}{black|' + params.value + '}\n{blue|' + "0" + '%}';
- }
-
- },
- rich: rich
- },
- },
- data: echartData
- }]
- };
- let option_responsible = {
- title: {
- text: '相关责任主体问题分布情况',
- textStyle: {
- align: 'center',
- // color: '#fff',
- fontSize: 20,
- },
- top: '3%',
- left: '10%',
- },
- // backgroundColor: '#0f375f',
- grid: {
- top: "25%",
- bottom: "10%"
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- label: {
- show: true
- }
- }
- },
- legend: {
- data: ["主体个数", "一般问题", "较重问题", "严重问题"],
- top: "15%",
- textStyle: {
- // color: "#ffffff"
- }
- },
- xAxis: {
- data: _self.xName,
-
- axisLine: {
- show: true //隐藏X轴轴线
- },
-
- axisTick: {
- show: true //隐藏X轴刻度
- },
- axisLabel: {
- rotate:20,
- show: true,
- textStyle: {
- // color: "#ebf8ac" //X轴文字颜色
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#01FCE3'
- }
- },
- },
- yAxis: [{
- type: "value",
- name: "个",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: true
- },
- axisLine: {
- show: true
- },
- axisLabel: {
- show: true,
- textStyle: {
- // color: "#ebf8ac"
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#FFFFFF'
- }
- },
- },
- {
- type: "value",
- name: "主体个数",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- position: "right",
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisLabel: {
- show: true,
- // formatter: "{value} %", //右侧Y轴文字显示
- textStyle: {
- // color: "#ebf8ac"
- }
- }
- },
- {
- type: "value",
- gridIndex: 0,
- min: 50,
- max: 100,
- splitNumber: 8,
- splitLine: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: false
- },
- splitArea: {
- show: true,
- areaStyle: {
- color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"]
- }
- }
- }
- ],
- series: [{
- name: "主体个数",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#49dff0"
- },
- lineStyle: {
- color: "#49dff0"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- data: _self.mainBodyNum
- },
- {
- name: "一般问题",
- stack: "总量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#5ce9c7"
- }
- },
- data: _self.normalNum
- },
- {
- name: "较重问题",
- stack: "总量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#fed172"
- }
- },
- data: _self.heavierNum
- },
- {
- name: "严重问题",
- stack: "总量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#fb6086"
- }
- },
- data: _self.seriousNum
- }
- ]
- };
- let option_area = {
- title: {
- text: '重大水利工程各地区问题分布情况',
- textStyle: {
- align: 'center',
- // color: '#fff',
- fontSize: 20,
- },
- top: '3%',
- left: '10%',
- },
- // backgroundColor: '#0f375f',
- grid: {
- top: "25%",
- bottom: "10%"
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- label: {
- show: true
- }
- }
- },
- legend: {
- data: ["平均", "问题数量"],
- top: "15%",
- textStyle: {
- // color: "#ffffff"
- }
- },
- xAxis: {
- data:_self.xName,
- axisLine: {
- show: true //隐藏X轴轴线
- },
-
- axisTick: {
- show: true //隐藏X轴刻度
- },
- axisLabel: {
- rotate:15,
- show: true,
- textStyle: {
- // color: "#ebf8ac" //X轴文字颜色
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#01FCE3'
- }
- },
- },
- yAxis: [{
- type: "value",
- name: "个",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: true
- },
- axisLine: {
- show: true
- },
- axisLabel: {
- show: true,
- textStyle: {
- // color: "#ebf8ac"
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#FFFFFF'
- }
- },
- },
- {
- type: "value",
- name: "平均",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- position: "right",
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- max: 40,
- min: 0,
- axisLabel: {
- show: true,
- // formatter: "{value} %", //右侧Y轴文字显示
- textStyle: {
- // color: "#ebf8ac"
- }
- }
- },
- {
- type: "value",
- gridIndex: 0,
- min: 50,
- max: 100,
- splitNumber: 8,
- splitLine: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: false
- },
- splitArea: {
- show: true,
- areaStyle: {
- color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"]
- }
- }
- }
- ],
- series: [{
- name: "平均值",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: false, //显示所有图形。
- // symbol: "circle", //标记的图形为实心圆
- // symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#fb6086"
- },
- lineStyle: {
- color: "#fb6086"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- // data: [20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20]
- data: _self.avgAreaLists
- },
- {
- name: "问题数量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#0195f2"
- }
- },
- data: _self.areaData
- }
- ]
- };
- let option_poverty = {
- title: {
- text:'贫困地区发现问题的严重程度分布情况',
- top: '3%',
- left: '10%',
- // padding:[24,0],
- textStyle:{
- // color:'#fff',
- fontSize:18*scale,
- align:'center'
- }
- },
-
- legend: {
- // selectedMode:false,
- formatter: function(name) {
- var total = 0; //各科正确率总和
- var averagePercent; //综合正确率
- echartData.forEach(function(value, index, array) {
- total += value.value;
- });
- return '{total|' + total + '}';
- },
- data: [echartData[0].name],
- // data: ['高等教育学'],
- // itemGap: 50,
- left: 'center',
- top: 'center',
- icon: 'none',
- align:'center',
- textStyle: {
- // color: "#fff",
- fontSize: 16 * scale,
- rich: rich
- },
- },
- series: [{
- name: '总考生数量',
- type: 'pie',
- radius: ['40%', '50%'],
- // hoverAnimation: false,
- color: ['#5ce9c7', '#fed172', '#fb6086'],
- label: {
- normal: {
- formatter: function(params, ticket, callback) {
- var total = 0;
- var percent = 0;
- echartData.forEach(function(value, index, array) {
- total += value.value;
- });
- if(total != 0){
- percent = ((params.value / total) * 100).toFixed(1);
- return '{blackSmall|' + params.name + '}{black|' + params.value + '}\n{blue|' + percent + '%}';
- }else{
- return '{blackSmall|' + params.name + '}{black|' + params.value + '}\n{blue|' + "0" + '%}';
- }
- },
- rich: rich
- },
- },
- data: echartData
- }]
- };
- if(_self.search_type == "1"){
- chart.clear();
- chart.setOption(option);
- }else if(_self.search_type == "2"){
- chart.clear();
- chart.setOption(option_responsible);
- }else if(_self.search_type == "3"){
- chart.clear();
- chart.setOption(option_area);
- }else if(_self.search_type == "5"){
- chart.clear();
- chart.setOption(option_poverty);
- }else{
- alert(1);
- }
- },
- init_Total_BarLineChart:function(){
- var _self = this;
- let chart = echarts.init(this.$refs['total_bar_chart']);
- let option = {
- title: {
- text: '发现问题的专业分布情况',
- textStyle: {
- align: 'center',
- // color: '#fff',
- fontSize: 20,
- },
- top: '3%',
- left: '10%',
- },
- // backgroundColor: '#0f375f',
- grid: {
- top: "25%",
- bottom: "15%"
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- label: {
- show: true
- }
- }
- },
- legend: {
- data: ["占比", "问题数量"],
- top: "15%",
- textStyle: {
- // color: "#ffffff"
- }
- },
- xAxis: {
- // data: [
- // "工程质量管理",
- // "安全生产管理",
- // "前期与设计",
- // "建设与管理",
- // "资金使用与管理",
- // "计划下达与执行",
-
- // ],
- data: _self.problemNumName,
- axisLine: {
- show: true //隐藏X轴轴线
- },
-
- axisTick: {
- show: true //隐藏X轴刻度
- },
- axisLabel: {
- rotate:15,
- show: true,
- textStyle: {
- // color: "#ebf8ac" //X轴文字颜色
- }
- },
-
- axisLine: {
- lineStyle: {
- // color: '#01FCE3'
- }
- },
- },
- yAxis: [{
- type: "value",
- name: "个",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: true
- },
- axisLine: {
- show: true
- },
- axisLabel: {
- show: true,
- textStyle: {
- // color: "#ebf8ac"
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#FFFFFF'
- }
- },
- },
- {
- type: "value",
- name: "占比",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- position: "right",
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisLabel: {
- show: true,
- formatter: "{value} %", //右侧Y轴文字显示
- textStyle: {
- // color: "#ebf8ac"
- }
- }
- },
- {
- type: "value",
- gridIndex: 0,
- min: 50,
- max: 100,
- splitNumber: 8,
- splitLine: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: false
- },
- splitArea: {
- show: true,
- areaStyle: {
- color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"]
- }
- }
- }
- ],
- series: [{
- name: "占比",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#49dff0"
- },
- lineStyle: {
- color: "#49dff0"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- data: _self.proportionLists
- },
- {
- name: "问题数量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: "#00FFE3"
- },
- {
- offset: 1,
- color: "#4693EC"
- }
- ])
- }
- },
- data: _self.problemNumCount
- }
- ]
- };
- _self.addYearTotal_BarLineChart = [
- {
- name: "占比",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#49dff0"
- },
- lineStyle: {
- color: "#49dff0"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- data: _self.proportionLists_DB
- },
- {
- name: "问题数量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: "#00FFE3"
- },
- {
- offset: 1,
- color: "#4693EC"
- }
- ])
- }
- },
- data: _self.problemNumCount_DB
- }
- ]
- if(this.search_year != "" ){
- option.series = option.series.concat(_self.addYearTotal_BarLineChart);
- }
- chart.setOption(option);
- },
- init_Serious_BarLineChart:function(){
- var _self = this;
- let chart = echarts.init(this.$refs['normal_bar_chart']);
- let option = {
- title: {
- text: _self.countTotalHeavierAndSerious + '个严重和较重问题分布情况',
- textStyle: {
- align: 'center',
- // color: '#fff',
- fontSize: 20,
- },
- top: '3%',
- left: '10%',
- },
- // backgroundColor: '#0f375f',
- grid: {
- top: "25%",
- bottom: "15%"
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- label: {
- show: true
- }
- }
- },
- legend: {
- data: ["占比", "较重问题", "严重问题"],
- top: "15%",
- textStyle: {
- // color: "#ffffff"
- }
- },
- xAxis: {
- // data: [
- // "工程质量管理",
- // "安全生产管理",
- // "前期与设计",
- // "建设与管理",
- // "资金使用与管理",
- // "计划下达与执行",
-
- // ],
- data:_self.problemNumNameHeavierAndSerious,
- axisLine: {
- show: true //隐藏X轴轴线
- },
-
- axisTick: {
- show: true //隐藏X轴刻度
- },
- axisLabel: {
- rotate:15,
- show: true,
- textStyle: {
- // color: "#ebf8ac" //X轴文字颜色
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#01FCE3'
- }
- },
- },
- yAxis: [{
- type: "value",
- name: "个",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: true
- },
- axisLine: {
- show: true
- },
- axisLabel: {
- show: true,
- textStyle: {
- // color: "#ebf8ac"
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#FFFFFF'
- }
- },
- },
- {
- type: "value",
- name: "占比",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- position: "right",
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisLabel: {
- show: true,
- formatter: "{value} %", //右侧Y轴文字显示
- textStyle: {
- // color: "#ebf8ac"
- }
- }
- },
- {
- type: "value",
- gridIndex: 0,
- min: 50,
- max: 100,
- splitNumber: 8,
- splitLine: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: false
- },
- splitArea: {
- show: true,
- areaStyle: {
- color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"]
- }
- }
- }
- ],
- series: [{
- name: "占比",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#49dff0"
- },
- lineStyle: {
- color: "#49dff0"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- // data: [23,21,16,16,16,8]
- data: _self.problemNumNameHeavierAndSeriousZb
- },
- {
- name: "较重问题",
- stack: "总量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#fed172"
- }
- },
- // data: [47,47,35,36,35,15]
- data: _self.problemNumCountHeavier
-
- },
- {
- name: "严重问题",
- stack: "总量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#fb6086"
- }
- },
- // data: [7,4,3,2,2,5]
- data: _self.problemNumCountSerious
-
- },
-
- ]
- };
- _self.addYear=[
- {
- name: "占比1",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#F6931C"
- },
- lineStyle: {
- color: "#F6931C"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- data: _self.problemNumNameHeavierAndSeriousZb_DB
- },
- {
- name: "较重问题",
- stack: "总量1",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#fed172"
- }
- },
- data: _self.problemNumCountHeavier_DB
- },
- {
- name: "严重问题",
- stack: "总量1",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#fb6086"
- }
- },
- data: _self.problemNumCountSerious_DB
- }
- ]
- if(this.search_year != "" ){
- option.series = option.series.concat(_self.addYear);
- }
- chart.setOption(option);
- },
- init_Normal_BarLineChart:function(){
- var _self = this;
- let chart = echarts.init(this.$refs['serious_bar_chart']);
- let option = {
- title: {
- text: _self.countTotalNormal + '个一般问题分布情况',
- textStyle: {
- align: 'center',
- // color: '#fff',
- fontSize: 20,
- },
- top: '3%',
- left: '10%',
- },
- // backgroundColor: '#0f375f',
- grid: {
- top: "25%",
- bottom: "15%"
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- label: {
- show: true
- }
- }
- },
- legend: {
- data: ["占比", "问题数量"],
- top: "15%",
- textStyle: {
- // color: "#ffffff"
- }
- },
- xAxis: {
- data: _self.problemNumNameNormal,
-
- axisLine: {
- show: true //隐藏X轴轴线
- },
-
- axisTick: {
- show: true //隐藏X轴刻度
- },
- axisLabel: {
- rotate:15,
- show: true,
- textStyle: {
- // color: "#ebf8ac" //X轴文字颜色
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#01FCE3'
- }
- },
- },
- yAxis: [{
- type: "value",
- name: "个",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: true
- },
- axisLine: {
- show: true
- },
- axisLabel: {
- show: true,
- textStyle: {
- // color: "#ebf8ac"
- }
- },
- axisLine: {
- lineStyle: {
- // color: '#FFFFFF'
- }
- },
- },
- {
- type: "value",
- name: "占比",
- nameTextStyle: {
- // color: "#ebf8ac"
- },
- position: "right",
- splitLine: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisLabel: {
- show: true,
- formatter: "{value} %", //右侧Y轴文字显示
- textStyle: {
- // color: "#ebf8ac"
- }
- }
- },
- {
- type: "value",
- gridIndex: 0,
- min: 50,
- max: 100,
- splitNumber: 8,
- splitLine: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: false
- },
- splitArea: {
- show: true,
- areaStyle: {
- color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"]
- }
- }
- }
- ],
- series: [{
- name: "占比",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#49dff0"
- },
- lineStyle: {
- color: "#49dff0"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- // data: [23,19,18,17,15,9]
- data: _self.problemNumNameNormalZb
- },
- {
- name: "问题数量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#5ce9c7"
- }
- },
- data: _self.problemNumCountNormal
- }
- ]
- };
- _self.addYearNormal_BarLineChart = [
- {
- name: "占比",
- type: "line",
- yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-
- showAllSymbol: true, //显示所有图形。
- symbol: "circle", //标记的图形为实心圆
- symbolSize: 10, //标记的大小
- itemStyle: {
- //折线拐点标志的样式
- color: "#49dff0"
- },
- lineStyle: {
- color: "#49dff0"
- },
- areaStyle:{
- color: "rgba(5,140,255, 0.2)"
- },
- // data: [23,19,18,17,15,9]
- data: _self.problemNumNameNormalZb_DB
- },
- {
- name: "问题数量",
- type: "bar",
- barWidth: 25,
- itemStyle: {
- normal: {
- color: "#5ce9c7"
- }
- },
- data: _self.problemNumCountNormal_DB
- }
- ]
- if(this.search_year != "" ){
- option.series = option.series.concat(_self.addYearNormal_BarLineChart);
- }
- chart.setOption(option);
- },
- searchData(){
- this.heavierAndSeriousLists_DB=[];
- this.countTotalHeavierAndSerious_DB=[];
- this.problemNumCountHeavier_DB=[];
- this.problemNumCountSerious_DB=[];
- this.problemNumNameHeavierAndSeriousZb_DB=[];
- this.normalLists_DB=[];
- this.countTotalNormal_DB=[];
- this.problemNumCountNormal_DB=[];
- this.problemNumNameNormalZb_DB=[];
- this.search_year.toString();
- this.getBarChartData_DB();
- }
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {
- },
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- this.getYearPc();
-
- // this.getTreeData();
- this.getDataChartData();
- this.getBarChartData();
- // this.init_Total_BarLineChart();
- // this.init_Normal_BarLineChart();
- // this.init_Serious_BarLineChart();
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- }
- </script>
- <style lang="scss">
- .filter_tree{
- .el-tree-node__label{
- color: #666;
- font-size: large;
- }
- }
- .filter_tree.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
- background-color: #c7e9fe;
- }
- .assistant_btn{
- position: absolute;
- bottom: -10px;
- right: 20px;
- z-index: 999;
- }
- .open_board{
- position: absolute;
- bottom: 0;
- left: 0;
- width: 24px;
- height: 30px;
- line-height: 30px;
- border: solid 1px #ddd;
- border-top-right-radius: 5px;
- border-bottom-right-radius: 5px;
- text-align: center;
- background-color: #bbebff;
- cursor: pointer;
- }
- </style>
|