| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <div style="width: 100%; height: 100%;overflow: hidden"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5" :sm="24"> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | </a-col> |
| | | <a-col :md="24-5" :sm="24"> |
| | | <statistical-analysis-main :equip="selectEquementnode"></statistical-analysis-main> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5" :sm="24"> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | </a-col> |
| | | <a-col :md="24-5" :sm="24"> |
| | | <statistical-analysis-main :equip="selectEquipmentNode"></statistical-analysis-main> |
| | | </a-col> |
| | | </a-row> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTree from '../common/BaseTree' |
| | | import StatisticalAnalysisMain from './modules/StatisticalAnalysis/StatisticalAnalysisMain' |
| | | |
| | | export default { |
| | | name: 'StatisticalAnalysis', |
| | | components:{ |
| | | components: { |
| | | BaseTree, |
| | | StatisticalAnalysisMain |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '设å¤ä¿¡æ¯', |
| | | selectEquementnode:{}, |
| | | equipmentStatisticsInfo:{}, |
| | | url:{ |
| | | equipmentStatistics:"/mdc/equipment/equipmentStatistics" |
| | | } |
| | | selectEquipmentNode: {} |
| | | } |
| | | }, |
| | | methods: { |
| | | changeSelectionNode(val){ |
| | | this.selectEquementnode = val |
| | | changeSelectionNode(val) { |
| | | this.selectEquipmentNode = val |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | </script> |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <div style="width: 100%; height: 100%;overflow: hidden"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5" :sm="24"> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | </a-col> |
| | | <a-col :md="24-5" :sm="24"> |
| | | <statistics-legend :equip="selectEquementnode"></statistics-legend> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5" :sm="24"> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | </a-col> |
| | | <a-col :md="24-5" :sm="24"> |
| | | <statistics-legend :equip="selectEquipmentNode"></statistics-legend> |
| | | </a-col> |
| | | </a-row> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTree from '../common/BaseTree' |
| | | import StatisticsLegend from './modules/StatisticsChart/StatisticsLegend' |
| | | |
| | | export default { |
| | | name: 'StatisticsChart', |
| | | components:{ |
| | | components: { |
| | | BaseTree, |
| | | StatisticsLegend |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '设å¤ä¿¡æ¯', |
| | | selectEquementnode:{}, |
| | | equipmentStatisticsInfo:{}, |
| | | url:{ |
| | | equipmentStatistics:"/mdc/equipment/equipmentStatistics" |
| | | } |
| | | selectEquipmentNode: {} |
| | | } |
| | | }, |
| | | methods: { |
| | | changeSelectionNode(val){ |
| | | this.selectEquementnode = val |
| | | changeSelectionNode(val) { |
| | | this.selectEquipmentNode = val |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <a-modal title="计ç®OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee" |
| | | :maskClosable="false"> |
| | | <j-modal title="计ç®OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee" |
| | | :maskClosable="false" :confirmLoading="confirmLoading"> |
| | | <a-form-model :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ¥æ"> |
| | | <a-range-picker v-model="dates" style="width: 100%" value-format="YYYY-MM-DD" |
| | | @change="dateParamChange"></a-range-picker> |
| | | @change="dateParamChange" :allow-clear="false"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-modal> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | visible: false, |
| | | model: {}, |
| | | dates: [], |
| | | confirmLoading: false, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 3 } |
| | |
| | | }, |
| | | methods: { |
| | | handleComputeOee() { |
| | | console.log('model', this.model) |
| | | if (this.dates.length === 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.confirmLoading = true |
| | | const that = this |
| | | mdcApi.computeOeeApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.visible = false |
| | | that.handleModalClose() |
| | | } else { |
| | | this.$notification.error({ |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: '计ç®å¤±è´¥' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: '计ç®å¤±è´¥' |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | }, |
| | | |
| | |
| | | <template> |
| | | <div id="StatisticsLegend" style="width: 100%; height: 100%; overflow: hidden;display: flex;flex-direction: column;background-color: #f5f4f4"> |
| | | <div id="StatisticsLegend" |
| | | style="width: 100%; height: 100%; overflow: hidden;display: flex;flex-direction: column;background-color: #f5f4f4"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; height: 44px; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" :readOnly="readOnly" v-model="queryParam.tierName"></a-input> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" readOnly v-model="queryParam.tierName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="æ¥æ"> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' |
| | | @change="dateChange" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!--弿ºç--> |
| | | <div class="PowerOnRate Line-box"> |
| | | <!--<div class="title">--> |
| | | <!--<div class="circle"></div>--> |
| | | <!--<div class="text">å©ç¨ç</div>--> |
| | | <!--</div>--> |
| | | <div class="PowerOnRate-box box-bottom"> |
| | | <!--<div class="PowerOnRate-left" ref="PowerOnRatePie" id="PowerOnRatePie"></div>--> |
| | | <div class="PowerOnRate_text" style="width: 8%;"> |
| | | <p>弿ºç</p> |
| | | <p>{{UtilizationHeight}}%</p> |
| | | <p>å©ç¨ç</p> |
| | | <p>{{StatCharUsedRate}}%</p> |
| | | </div> |
| | | <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div> |
| | | <div class="PowerOnRate_text" style="width: 8%"> |
| | | <table width="85px;" align="center"> |
| | | <tr> |
| | | <td align="right"><div style="width: 15px;height: 15px;background-color: #6496e9;position: static;"/></td> |
| | | <td align="left">弿º</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right"><div style="width: 15px;height: 15px;background-color: #A8A8A8;position: static;"/></td> |
| | | <td align="left">å
³æº</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right"><div style="width: 15px;height: 15px;background-color: #4ecee1"/></td> |
| | | <td align="left">è¿è¡</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right"><div style="width: 15px;height: 15px;background-color: #FCCE10"/></td> |
| | | <td align="left">å¾
æº</td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <!--弿ºç--> |
| | | <div class="PowerOnRate Line-box"> |
| | | <div class="PowerOnRate-box box-bottom"> |
| | | <div class="PowerOnRate_text" style="width: 8%;"> |
| | | <p>弿ºç</p> |
| | | <p>{{UtilizationHeight}}%</p> |
| | | <p>å©ç¨ç</p> |
| | | <p>{{StatCharUsedRate}}%</p> |
| | | </div> |
| | | <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div> |
| | | <div class="PowerOnRate_text" style="width: 8%"> |
| | | <table width="85px;" align="center"> |
| | | <tr> |
| | | <td align="right"> |
| | | <div style="width: 15px;height: 15px;background-color: #6496e9;position: static;"/> |
| | | </td> |
| | | <td align="left">弿º</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right"> |
| | | <div style="width: 15px;height: 15px;background-color: #A8A8A8;position: static;"/> |
| | | </td> |
| | | <td align="left">å
³æº</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right"> |
| | | <div style="width: 15px;height: 15px;background-color: #4ecee1"/> |
| | | </td> |
| | | <td align="left">è¿è¡</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right"> |
| | | <div style="width: 15px;height: 15px;background-color: #FCCE10"/> |
| | | </td> |
| | | <td align="left">å¾
æº</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å©ç¨çåå¼å¨ç--> |
| | | <div class="UtilizationStartup"> |
| | | <div class="Utilization Line-box"> |
| | | <div class="title"> |
| | | <!--<div class="circle"></div>--> |
| | | <!--<div class="text"></div>--> |
| | | <!--å©ç¨çåå¼å¨ç--> |
| | | <div class="UtilizationStartup"> |
| | | <div class="Utilization Line-box"> |
| | | <div class="title"> |
| | | </div> |
| | | <div class="Utilization-box box-bottom"> |
| | | <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div> |
| | | </div> |
| | | </div> |
| | | <div class="Utilization-box box-bottom"> |
| | | <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div> |
| | | <div class="Startup Line-box"> |
| | | <div class="title"> |
| | | </div> |
| | | <div class="Startup-box box-bottom"> |
| | | <div class="Startup-right" ref="StartupLine" id="StartupLine"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="Startup Line-box"> |
| | | <div class="title"> |
| | | <!--<div class="circle"></div>--> |
| | | <!--<div class="text"></div>--> |
| | | </div> |
| | | <div class="Startup-box box-bottom"> |
| | | <div class="Startup-right" ref="StartupLine" id="StartupLine"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import * as echarts from 'echarts' |
| | | import * as eCharts from 'echarts' |
| | | |
| | | export default { |
| | | name: 'StatisticalAnalysisMain', |
| | | props: { equip: {} }, |
| | | data(){ |
| | | return{ |
| | | readOnly:true, |
| | | showday:true, |
| | | StatCharOpeningRate:0, |
| | | StatCharUsedRate:0, |
| | | StatCharUsedopeningRate:0, |
| | | openingLong:0, |
| | | waitingLong:0, |
| | | processLong:0, |
| | | closedLong:0, |
| | | totalLong:0, |
| | | UtilizationHeight:0, |
| | | StartupHeight:0, |
| | | quip:{}, |
| | | data() { |
| | | return { |
| | | StatCharOpeningRate: 0, |
| | | StatCharUsedRate: 0, |
| | | StatCharUsedOpeningRate: 0, |
| | | openingLong: 0, |
| | | waitingLong: 0, |
| | | processLong: 0, |
| | | closedLong: 0, |
| | | totalLong: 0, |
| | | UtilizationHeight: 0, |
| | | StartupHeight: 0, |
| | | PowerOnRateLine: null, |
| | | UtilizationLine: null, |
| | | StartupLine: null, |
| | | dates: [], |
| | | queryParam: {}, |
| | | queryParams:{ |
| | | collectTime:null, |
| | | queryParams: { |
| | | collectTime: null |
| | | }, |
| | | shiftSubList: [], |
| | | shiftList: [], |
| | | spinning: false, |
| | | url: { |
| | | getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid', |
| | | dayStatisticalRate:'/mdc/efficiencyReport/dayStatisticalRate', |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction', |
| | | }, |
| | | dayStatisticalRate: '/mdc/efficiencyReport/dayStatisticalRate', |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction' |
| | | } |
| | | } |
| | | }, |
| | | created(){ |
| | | // let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); |
| | | this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD') |
| | | this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD') |
| | | created() { |
| | | this.queryParams.collectTime = moment().add(-1, 'd').format('YYYY-MM-DD') |
| | | this.queryParams.dateTime = moment().add(-1, 'd').format('YYYYMMDD') |
| | | this.initEquipmentNode() |
| | | // this.queryStatistical(); |
| | | // this.getTime(37800); |
| | | }, |
| | | |
| | | methods:{ |
| | | disabledDate(current){ |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 1); |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | beforeDestroy() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | methods: { |
| | | disabledDate(current) { |
| | | //Can not select days before today and today |
| | | return current && current > moment().subtract('days', 1) |
| | | }, |
| | | //æç§è®¡ç®æå¯¹åºçæ¶åç§ç彿° |
| | | getTime(time){ |
| | | getTime(time) { |
| | | //转æ¢ä¸ºæ¶åç§ |
| | | let h = Math.round(time / 60 / 60) |
| | | h = h <10 ? '0' + h : h |
| | | h = h < 10 ? '0' + h : h |
| | | //ä½ä¸ºè¿åå¼è¿å |
| | | // console.log(h); |
| | | return h; |
| | | return h |
| | | }, |
| | | moment, |
| | | draw(){ |
| | | draw() { |
| | | //å¼å§æ¶é´\å
³æºæ¶é´\è¿è¡æ¶é´\å¾
æºæ¶é´ |
| | | let PowerOnRateLine = this.$echarts.init(document.getElementById('PowerOnRateLine'), 'macarons'); |
| | | this.PowerOnRateLine = this.$echarts.init(document.getElementById('PowerOnRateLine'), 'macarons') |
| | | let PowerOnRateLine_option = { |
| | | tooltip:{ |
| | | trigger: 'axis', |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | |
| | | top: 60, |
| | | containLabel: true |
| | | }, |
| | | // toolbox: { |
| | | // show : true, |
| | | // padding: 15, |
| | | // feature : { |
| | | // saveAsImage : {show: true,title:'ä¿åå¾ç',name :'è®¾å¤æçç»è®¡æ¥è¡¨'} |
| | | // } |
| | | // }, |
| | | xAxis :{ |
| | | type : 'category', |
| | | data:['弿ºæ¶é¿','å
³æºæ¶é¿','è¿è¡æ¶é¿','å¾
æºæ¶é¿'], |
| | | axisLabel:{ //åæ è½´åä½é¢è² |
| | | textStyle:{ |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['弿ºæ¶é¿', 'å
³æºæ¶é¿', 'è¿è¡æ¶é¿', 'å¾
æºæ¶é¿'], |
| | | axisLabel: { //åæ è½´åä½é¢è² |
| | | textStyle: { |
| | | color: '#000' |
| | | } |
| | | }, |
| | | axisLine:{ |
| | | lineStyle:{ |
| | | color:"#e5e5e5" |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#e5e5e5' |
| | | } |
| | | }, |
| | | axisTick:{ //yè½´å»åº¦çº¿ |
| | | show:false |
| | | axisTick: { //yè½´å»åº¦çº¿ |
| | | show: false |
| | | }, |
| | | splitLine:{ //ç½æ ¼ |
| | | show: false, |
| | | splitLine: { //ç½æ ¼ |
| | | show: false |
| | | }, |
| | | boundaryGap: true, |
| | | boundaryGap: true |
| | | }, |
| | | yAxis :{ |
| | | yAxis: { |
| | | name: 'æ¶é´/å°æ¶', |
| | | type : 'value', |
| | | axisLabel:{ //åæ è½´åä½é¢è² |
| | | textStyle:{ |
| | | type: 'value', |
| | | axisLabel: { //åæ è½´åä½é¢è² |
| | | textStyle: { |
| | | color: '#000' |
| | | } |
| | | }, |
| | | axisLine:{ |
| | | show:false, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisTick:{ //yè½´å»åº¦çº¿ |
| | | show:false |
| | | axisTick: { //yè½´å»åº¦çº¿ |
| | | show: false |
| | | }, |
| | | splitLine:{ //ç½æ ¼ |
| | | splitLine: { //ç½æ ¼ |
| | | show: true, |
| | | color:'#dadde4', |
| | | lineStyle:{ |
| | | type:"dashed" |
| | | color: '#dadde4', |
| | | lineStyle: { |
| | | type: 'dashed' |
| | | } |
| | | } |
| | | }, |
| | | series:[ |
| | | // { |
| | | // name:'æ²çº¿', |
| | | // type: 'line', |
| | | // smooth:true, |
| | | // symbol: 'circle', |
| | | // symbolSize: 8, |
| | | // label:{ |
| | | // show:true, |
| | | // position:"top", |
| | | // textStyle:{ |
| | | // color:'#000', |
| | | // }, |
| | | // formatter:"æ¶é¿ï¼{c}H" |
| | | // }, |
| | | // itemStyle: { |
| | | // color: "rgb(87, 120, 225)", |
| | | // borderColor: "#fff", |
| | | // borderWidth: 2, |
| | | // shadowColor: 'rgba(0, 0, 0, .3)', |
| | | // }, |
| | | // lineStyle: { |
| | | // normal: { |
| | | // color:"rgb(87, 120, 225)", |
| | | // shadowColor: 'rgba(87, 120, 225, .4)', |
| | | // shadowBlur: 8, |
| | | // shadowOffsetY: 10, |
| | | // shadowOffsetX: 0, |
| | | // }, |
| | | // }, |
| | | // areaStyle: { |
| | | // normal: { |
| | | // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | // offset: 0, |
| | | // color: 'rgba(87, 120, 225, .6)' |
| | | // }, { |
| | | // offset: 1, |
| | | // color: 'rgba(87, 120, 225, .3)' |
| | | // }]), |
| | | // } |
| | | // }, |
| | | // data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], |
| | | // }, |
| | | series: [ |
| | | { |
| | | name:'æ±ç¶å¾', |
| | | name: '', |
| | | type: 'bar', |
| | | data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], |
| | | // data:[22,3,4,5], |
| | | data: [this.openingLong, this.closedLong, this.processLong, this.waitingLong], |
| | | barWidth: 25, |
| | | label:{ |
| | | show:true, |
| | | position:"top", |
| | | textStyle:{ |
| | | color:'#000', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | textStyle: { |
| | | color: '#000' |
| | | }, |
| | | // formatter:"æ¶é¿ï¼{c}H", |
| | | formatter:params=>{ |
| | | const value=String(params.value) |
| | | return value.length==2&&value[0]==='0'?`æ¶é¿ï¼${value.slice(1)}H`:`æ¶é¿ï¼${value}H` |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? `æ¶é¿ï¼${value.slice(1)}H` : `æ¶é¿ï¼${value}H` |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: function(params) { |
| | | let colorList = [ |
| | | ["#6496e9","#6bded3"], |
| | | ["#849db8","#b4b8cc"], |
| | | ["#4fe1c5","#4ecee1"], |
| | | // ["#9978fa","#88a1fa"], |
| | | ["#ffbb65","#fdc68b"], |
| | | ]; |
| | | // return colorList[params.dataIndex]; |
| | | let colorItem = colorList[params.dataIndex]; |
| | | return new echarts.graphic.LinearGradient(0,0,0,1,[{ |
| | | offset:0, |
| | | color:colorItem[0] |
| | | ['#6496e9', '#6bded3'], |
| | | ['#849db8', '#b4b8cc'], |
| | | ['#4fe1c5', '#4ecee1'], |
| | | ['#ffbb65', '#fdc68b'] |
| | | ] |
| | | let colorItem = colorList[params.dataIndex] |
| | | return new eCharts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: colorItem[0] |
| | | }, |
| | | { |
| | | offset:1, |
| | | color:colorItem[1] |
| | | }],false) |
| | | offset: 1, |
| | | color: colorItem[1] |
| | | }], false) |
| | | }, |
| | | barBorderRadius: [5, 5, 0, 0], |
| | | barBorderRadius: [5, 5, 0, 0] |
| | | } |
| | | }, |
| | | } |
| | | }] |
| | | } |
| | | PowerOnRateLine.setOption(PowerOnRateLine_option); |
| | | this.PowerOnRateLine.setOption(PowerOnRateLine_option) |
| | | |
| | | //弿ºæ¶é´\å
³æºæ¶é´ |
| | | let UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons'); |
| | | let statChartPieOption1 = { |
| | | // title: { |
| | | // x: 'left', |
| | | // subtext: '弿ºæç', |
| | | // textStyle: { |
| | | // color: '#268e80', |
| | | // fontSize: 20, |
| | | // |
| | | // }, |
| | | // }, |
| | | this.UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons') |
| | | let statChartPieOption1 = { |
| | | tooltip: { |
| | | trigger: 'item', |
| | | // formatter: "{a} <br/>{b} : {c} ({d}%)"ï¼ |
| | | formatter:params=>{ |
| | | const value=String(params.value) |
| | | return value.length==2&&value[0]==='0'?`${params.seriesName}<br/>${params.name}ï¼${value.slice(1)}Hï¼${params.percent}%ï¼`:`${params.seriesName}<br/>${params.name}ï¼${value}Hï¼${params.percent}%ï¼` |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? `${params.seriesName}<br/>${params.name}ï¼${value.slice(1)}Hï¼${params.percent}%ï¼` : `${params.seriesName}<br/>${params.name}ï¼${value}Hï¼${params.percent}%ï¼` |
| | | } |
| | | }, |
| | | legend: { |
| | |
| | | name: '弿ºæç', |
| | | type: 'pie', |
| | | radius: '70%', |
| | | /*center: ['55%', '55%'],*/ |
| | | itemStyle: { |
| | | normal: { |
| | | color: function (params) { |
| | | let colorList = [ '#6496e9','#849db8']; |
| | | color: function(params) { |
| | | let colorList = ['#6496e9', '#849db8'] |
| | | return colorList[params.dataIndex] |
| | | }, |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | // formatter: '{b}\n{c}', |
| | | // formatter:params=>String(params.value).length==2?params.name+String(params.value).slice(1):params.name+String(params.value) |
| | | formatter:params=>{ |
| | | const value=String(params.value) |
| | | return value.length==2&&value[0]==='0'?params.name+' '+value.slice(1)+'H':params.name+' '+value+'H' |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? params.name + ' ' + value.slice(1) + 'H' : params.name + ' ' + value + 'H' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data: [{value: this.openingLong, name: '弿ºæ¶é´'}, |
| | | {value: this.closedLong, name: 'å
³æºæ¶é´'}] |
| | | data: [{ value: this.openingLong, name: '弿ºæ¶é´' }, |
| | | { value: this.closedLong, name: 'å
³æºæ¶é´' }] |
| | | }] |
| | | }; |
| | | UtilizationLine.setOption(statChartPieOption1); |
| | | } |
| | | this.UtilizationLine.setOption(statChartPieOption1) |
| | | |
| | | //è¿è¡æ¶é´\å¾
æºæ¶é´ |
| | | let StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons'); |
| | | this.StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons') |
| | | let statChartPieOption2 = { |
| | | // title: { |
| | | // x: 'left', |
| | | // subtext: 'è¿è¡æç' |
| | | // }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | // formatter: "{a} <br/>{b} : {c} ({d}%)", |
| | | formatter:params=>{ |
| | | const value=String(params.value) |
| | | return value.length==2&&value[0]==='0'?`${params.seriesName}<br/>${params.name}ï¼${value.slice(1)}Hï¼${params.percent}%ï¼`:`${params.seriesName}<br/>${params.name}ï¼${value}Hï¼${params.percent}%ï¼` |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? `${params.seriesName}<br/>${params.name}ï¼${value.slice(1)}Hï¼${params.percent}%ï¼` : `${params.seriesName}<br/>${params.name}ï¼${value}Hï¼${params.percent}%ï¼` |
| | | } |
| | | }, |
| | | legend: { |
| | |
| | | radius: '70%', |
| | | itemStyle: { |
| | | normal: { |
| | | color: function (params) { |
| | | var colorList = ['#4ecee1', '#FCCE10']; |
| | | color: function(params) { |
| | | var colorList = ['#4ecee1', '#FCCE10'] |
| | | return colorList[params.dataIndex] |
| | | }, |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | // formatter: '{b}\n{c}', |
| | | formatter:params=>{ |
| | | const value=String(params.value) |
| | | return value.length==2&&value[0]==='0'?params.name+' '+value.slice(1)+'H':params.name+' '+value+'H' |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? params.name + ' ' + value.slice(1) + 'H' : params.name + ' ' + value + 'H' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data: [{value: this.processLong, name: 'è¿è¡æ¶é´'}, |
| | | {value: this.waitingLong, name: 'å¾
æºæ¶é´'}] |
| | | data: [{ value: this.processLong, name: 'è¿è¡æ¶é´' }, |
| | | { value: this.waitingLong, name: 'å¾
æºæ¶é´' }] |
| | | }] |
| | | }; |
| | | StartupLine.setOption(statChartPieOption2); |
| | | } |
| | | this.StartupLine.setOption(statChartPieOption2) |
| | | }, |
| | | queryStatistical(){ |
| | | getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ |
| | | if(res.success) { |
| | | // console.log(res); |
| | | this.StatCharOpeningRate = res.result.openRate; |
| | | //å©ç¨ç |
| | | this.StatCharUsedRate = res.result.utilizationRate; |
| | | //弿ºç |
| | | this.UtilizationHeight = res.result.openRate; |
| | | this.StatCharUsedopeningRate = res.result.StartupHeight; |
| | | this.StartupHeight = res.result.StartupHeight; |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong); |
| | | this.processLong = this.getTime(res.result.processLong); |
| | | this.closedLong = this.getTime(res.result.closeLong); |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); |
| | | this.draw(); |
| | | } |
| | | }) |
| | | queryStatistical() { |
| | | this.spinning = true |
| | | getAction(this.url.dayStatisticalRate, this.queryParams) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.StatCharOpeningRate = res.result.openRate |
| | | //å©ç¨ç |
| | | this.StatCharUsedRate = res.result.utilizationRate |
| | | //弿ºç |
| | | this.UtilizationHeight = res.result.openRate |
| | | this.StatCharUsedOpeningRate = res.result.StartupHeight |
| | | this.StartupHeight = res.result.StartupHeight |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong) |
| | | this.processLong = this.getTime(res.result.processLong) |
| | | this.closedLong = this.getTime(res.result.closeLong) |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong) |
| | | this.draw() |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | dataChange(val) { |
| | | this.queryParam.collectTime1 = ""; |
| | | if(val){ |
| | | dateChange(val) { |
| | | this.queryParam.collectTime1 = '' |
| | | if (val) { |
| | | this.queryParams.dateTime = val.format('YYYYMMDD') |
| | | this.queryParams.collectTime = val.format('YYYY-MM-DD'); |
| | | this.queryParams.collectTime = val.format('YYYY-MM-DD') |
| | | } |
| | | }, |
| | | initEquipmentNode() { |
| | | this.spinning = true |
| | | let _this = this |
| | | getAction(this.url.getBaseTree).then((res) => { |
| | | if (res.success) { |
| | | if(res.result[0]){ |
| | | if (res.result[0]) { |
| | | _this.$set(this.queryParam, 'tierName', res.result[0].title) |
| | | _this.$set(this.queryParams, 'parentId', res.result[0].key) |
| | | } |
| | | // console.log(res.result[0].entity.tierName) |
| | | _this.queryStatistical() |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | // getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => { |
| | | // if (res.success) { |
| | | // if (res.result) { |
| | | // _this.$set(this.queryParam, 'tierName', res.result.tierName) |
| | | // _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId) |
| | | // // _this.quip = res.result |
| | | // _this.searchQuery() |
| | | // } else { |
| | | // _this.$message.warning('请é
置设å¤ï¼') |
| | | // } |
| | | // } |
| | | // }) |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.queryParams = { |
| | | collectTime:moment().add(-1,'d').format('YYYY-MM-DD'), |
| | | dateTime:moment().add(-1,'d').format('YYYYMMDD') |
| | | collectTime: moment().add(-1, 'd').format('YYYY-MM-DD'), |
| | | dateTime: moment().add(-1, 'd').format('YYYYMMDD') |
| | | } |
| | | this.initEquipmentNode() |
| | | // this.dates = [] |
| | | // this.queryStatistical() |
| | | // this.onClearSelected() |
| | | }, |
| | | searchQuery(){ |
| | | this.queryStatistical(); |
| | | searchQuery() { |
| | | this.queryStatistical() |
| | | }, |
| | | |
| | | handleWindowResize() { |
| | | if (this.PowerOnRateLine) this.PowerOnRateLine.resize() |
| | | if (this.UtilizationLine) this.UtilizationLine.resize() |
| | | if (this.StartupLine) this.StartupLine.resize() |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.$set(this.queryParam, 'equipmentId', val.equipmentId) |
| | | this.queryParams.parentId = '' |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | }else{ |
| | | } else { |
| | | this.queryParams.parentId = val.key |
| | | this.queryParams.equipmentId = '' |
| | | this.$set(this.queryParam, 'tierName', val.title) |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .charContent{ |
| | | <style scoped lang="less"> |
| | | @media screen and (min-width: 1920px) { |
| | | #StatisticsLegend { |
| | | height: 748px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | #StatisticsLegend { |
| | | height: 748px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | #StatisticsLegend { |
| | | height: 600px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | #StatisticsLegend { |
| | | height: 501px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | #StatisticsLegend { |
| | | height: 501px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-spin-nested-loading { |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | | @media screen and (min-width: 1920px){ |
| | | #StatisticsLegend{ |
| | | height: 748px!important; |
| | | overflow: scroll; |
| | | flex-direction: column; |
| | | |
| | | .ant-spin-container { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .ant-spin-blur { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | #StatisticsLegend{ |
| | | height: 748px!important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | #StatisticsLegend{ |
| | | height: 600px!important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | #StatisticsLegend{ |
| | | height: 501px!important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | #StatisticsLegend{ |
| | | height: 501px!important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | #StatisticsLegend .PowerOnRate{ |
| | | |
| | | #StatisticsLegend .PowerOnRate { |
| | | flex: 1; |
| | | margin-bottom: 15px; |
| | | background-color: #fff; |
| | | } |
| | | #StatisticsLegend .UtilizationStartup{ |
| | | |
| | | #StatisticsLegend .UtilizationStartup { |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | | #StatisticsLegend .UtilizationStartup>div{ |
| | | |
| | | #StatisticsLegend .UtilizationStartup > div { |
| | | flex: 1; |
| | | background-color: #fff; |
| | | } |
| | | #StatisticsLegend .UtilizationStartup .Utilization{ |
| | | |
| | | #StatisticsLegend .UtilizationStartup .Utilization { |
| | | margin-right: 15px; |
| | | } |
| | | .title{ |
| | | |
| | | .title { |
| | | display: flex; |
| | | align-items: center; |
| | | padding-left: 15px; |
| | | padding-top: 5px; |
| | | } |
| | | .title .circle{ |
| | | width: 15px; |
| | | height: 15px; |
| | | background-color: #7282ec; |
| | | border-radius: 100%; |
| | | margin-right: 10px; |
| | | } |
| | | .title .text{ |
| | | font-size: 2vh; |
| | | } |
| | | .Line-box{ |
| | | |
| | | .Line-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .Line-box .box-bottom{ |
| | | |
| | | .Line-box .box-bottom { |
| | | flex: 1; |
| | | } |
| | | .PowerOnRate-box{ |
| | | |
| | | .PowerOnRate-box { |
| | | display: flex; |
| | | } |
| | | .PowerOnRate-box .PowerOnRate-left{ |
| | | width: 25%; |
| | | } |
| | | .PowerOnRate-box .PowerOnRate_text{ |
| | | |
| | | .PowerOnRate-box .PowerOnRate_text { |
| | | width: 10%; |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | justify-content: center; |
| | | font-weight: 800; |
| | | } |
| | | .PowerOnRate-box .PowerOnRate-right{ |
| | | flex: 1; |
| | | } |
| | | .Utilization-box{ |
| | | display: flex; |
| | | } |
| | | .Utilization-box .Utilization-left{ |
| | | width: 25%; |
| | | } |
| | | .Utilization-box .Utilization-right{ |
| | | flex: 1; |
| | | } |
| | | .Startup-box{ |
| | | display: flex; |
| | | } |
| | | .Startup-box .Startup-left{ |
| | | width: 25%; |
| | | } |
| | | .Startup-box .Startup-right{ |
| | | flex: 1; |
| | | } |
| | | .left{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .left .left-box{ |
| | | width: 65%; |
| | | height: 60%; |
| | | margin: 0 auto; |
| | | overflow: hidden; |
| | | border-radius: 8px; |
| | | |
| | | /*border: 6px solid red;*/ |
| | | /*!*background-color: yellow;*!*/ |
| | | /*border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1;*/ |
| | | .PowerOnRate-box .PowerOnRate-right { |
| | | flex: 1; |
| | | } |
| | | .left-box-con{ |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | text-align: center; |
| | | border: 6px solid red; |
| | | /*background-color: yellow;*/ |
| | | border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1; |
| | | } |
| | | .left .left-box .Rate-box-kong{ |
| | | width: 100%; |
| | | background: -moz-linear-gradient(bottom, #b5dec2 0%, #f4f5ba 100%); |
| | | background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%,#b5dec2), color-stop(100%,#f4f5ba)); |
| | | background: -webkit-linear-gradient(bottom, #b5dec2 0%,#f4f5ba 100%); |
| | | background: -o-linear-gradient(bottom, #b5dec2 0%,#f4f5ba 100%); |
| | | background: -ms-linear-gradient(bottom, #b5dec2 0%,#f4f5ba 100%); |
| | | background: linear-gradient(to top, #b5dec2 0%,#f4f5ba 100%); |
| | | } |
| | | .left .left-box .Rate-box{ |
| | | position: absolute; |
| | | text-align: center; |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: 89%; |
| | | /*background-color: green;*/ |
| | | background: -moz-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%); |
| | | background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%,#06a8f8), color-stop(100%,#2bf3c7)); |
| | | background: -webkit-linear-gradient(bottom, #06a8f8 0%,#2bf3c7 100%); |
| | | background: -o-linear-gradient(bottom, #06a8f8 0%,#2bf3c7 100%); |
| | | background: -ms-linear-gradient(bottom, #06a8f8 0%,#2bf3c7 100%); |
| | | background: linear-gradient(to top, #06a8f8 0%,#2bf3c7 100%); |
| | | } |
| | | .left .left-box .Rate-box p{ |
| | | position: absolute; |
| | | bottom: 0; |
| | | color: #fff; |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | .con-left{ |
| | | |
| | | .Utilization-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | flex-wrap: wrap; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | } |
| | | .con-left>span{ |
| | | |
| | | .Utilization-box .Utilization-right { |
| | | flex: 1; |
| | | } |
| | | |
| | | .Startup-box { |
| | | display: flex; |
| | | } |
| | | |
| | | .Startup-box .Startup-right { |
| | | flex: 1; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div id="StatisticsLegend" |
| | | style="width: 100%; height: 100%; overflow: hidden;display: flex;flex-direction: column;background-color: #f5f4f4"> |
| | | style="overflow: hidden;display: flex;flex-direction: column;background-color: #f5f4f4"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; height: 44px; background-color: #fff" class="table-page-search-wrapper"> |
| | | <div style=" background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" :readOnly="readOnly" v-model="queryParam.tierName"></a-input> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" readOnly v-model="queryParam.tierName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!--弿ºç--> |
| | | <div class="PowerOnRate Line-box"> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">å©ç¨ç</div> |
| | | </div> |
| | | <div class="PowerOnRate-box box-bottom"> |
| | | <div class="PowerOnRate-left" ref="PowerOnRatePie" id="PowerOnRatePie"></div> |
| | | <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div> |
| | | </div> |
| | | </div> |
| | | <!--å©ç¨çåå¼å¨ç--> |
| | | <div class="UtilizationStartup"> |
| | | <div class="Utilization Line-box"> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">弿ºç</div> |
| | | </div> |
| | | <div class="Utilization-box box-bottom"> |
| | | <div class="Utilization-left left"> |
| | | <div class="left-box"> |
| | | <div class="left-box-con"> |
| | | <div class="Rate-box-kong" :style="{height:100-UtilizationHeight+'%'}"></div> |
| | | <div class="Rate-box" :style="{height:UtilizationHeight+'%'}"> |
| | | <p class="Rate-box-text"> |
| | | <span ref="UtilizationRate">{{UtilizationHeight}}%</span> |
| | | <br> |
| | | 弿ºç |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div> |
| | | </div> |
| | | </div> |
| | | <div class="Startup Line-box"> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">å¼å¨ç</div> |
| | | </div> |
| | | <div class="Startup-box box-bottom"> |
| | | <div class="Startup-left left" ref="StartupRate"> |
| | | <div class="left-box"> |
| | | <div class="left-box-con"> |
| | | <div class="Rate-box-kong" :style="{height:100-StartupHeight+'%'}"></div> |
| | | <div class="Rate-box" :style="{height:StartupHeight+'%'}"> |
| | | <p class="Rate-box-text"> |
| | | <span>{{StatCharUsedopeningRate}}%</span> |
| | | <br> |
| | | å¼å¨ç |
| | | </p> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="Startup-right" ref="StartupLine" id="StartupLine"></div> |
| | | <a-spin :spinning="spinning"> |
| | | <!--弿ºç--> |
| | | <div class="PowerOnRate Line-box"> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">å©ç¨ç</div> |
| | | </div> |
| | | <div class="PowerOnRate-box box-bottom"> |
| | | <div class="PowerOnRate-left" ref="PowerOnRatePie" id="PowerOnRatePie"></div> |
| | | <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å©ç¨çåå¼å¨ç--> |
| | | <div class="UtilizationStartup"> |
| | | <div class="Utilization Line-box"> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">弿ºç</div> |
| | | </div> |
| | | <div class="Utilization-box box-bottom"> |
| | | <div class="Utilization-left left"> |
| | | <div class="left-box"> |
| | | <div class="left-box-con"> |
| | | <div class="Rate-box-kong" :style="{height:100-UtilizationHeight+'%'}"></div> |
| | | <div class="Rate-box" :style="{height:UtilizationHeight+'%'}"> |
| | | <p class="Rate-box-text"> |
| | | <span ref="UtilizationRate">{{UtilizationHeight}}%</span> |
| | | <br> |
| | | 弿ºç |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div> |
| | | </div> |
| | | </div> |
| | | <div class="Startup Line-box"> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">å¼å¨ç</div> |
| | | </div> |
| | | <div class="Startup-box box-bottom"> |
| | | <div class="Startup-left left" ref="StartupRate"> |
| | | <div class="left-box"> |
| | | <div class="left-box-con"> |
| | | <div class="Rate-box-kong" :style="{height:100-StartupHeight+'%'}"></div> |
| | | <div class="Rate-box" :style="{height:StartupHeight+'%'}"> |
| | | <p class="Rate-box-text"> |
| | | <span>{{StatCharUsedOpeningRate}}%</span> |
| | | <br> |
| | | å¼å¨ç |
| | | </p> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="Startup-right" ref="StartupLine" id="StartupLine"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import * as echarts from 'echarts' |
| | | import { getAction } from '@/api/manage' |
| | | import * as eCharts from 'echarts' |
| | | |
| | | export default { |
| | | name: 'StatisticsLegend', |
| | | props: { equip: {} }, |
| | | data() { |
| | | return { |
| | | readOnly: true, |
| | | showday: true, |
| | | StatCharOpeningRate: 0, |
| | | StatCharUsedRate: 0, |
| | | StatCharUsedopeningRate: 0, |
| | | StatCharUsedOpeningRate: 0, |
| | | openingLong: 0, |
| | | waitingLong: 0, |
| | | processLong: 0, |
| | |
| | | totalLong: 0, |
| | | UtilizationHeight: 0, |
| | | StartupHeight: 0, |
| | | quip: {}, |
| | | dates: [], |
| | | queryParam: {}, |
| | | queryParams: { |
| | | collectTime: undefined |
| | | }, |
| | | shiftSubList: [], |
| | | shiftList: [], |
| | | PowerOnRatePie: null, |
| | | PowerOnRateLine: null, |
| | | UtilizationLine: null, |
| | | StartupLine: null, |
| | | spinning: false, |
| | | url: { |
| | | getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid', |
| | | dayStatisticalRate: '/mdc/efficiencyReport/dayStatisticalRate', |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction' |
| | | } |
| | |
| | | this.queryParams.dateTime = moment().add(-1, 'd').format('YYYYMMDD') |
| | | this.initEquipmentNode() |
| | | }, |
| | | |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | beforeDestroy() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | methods: { |
| | | disabledDate(current) { |
| | | //Can not slect days before today and today |
| | |
| | | // console.log(h); |
| | | return h |
| | | }, |
| | | moment, |
| | | draw() { |
| | | //å©ç¨ç |
| | | //é¥¼å¾ |
| | | let PowerOnRatePie = this.$echarts.init(document.getElementById('PowerOnRatePie'), 'macarons') |
| | | this.PowerOnRatePie = this.$echarts.init(document.getElementById('PowerOnRatePie'), 'macarons') |
| | | let PowerOnRatePie_option = { |
| | | // color: ["#3859fa", '#ccc'], |
| | | title: { |
| | |
| | | data: [{ |
| | | value: 100, |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | color: new eCharts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: '#88a8fd' |
| | | }, |
| | |
| | | } |
| | | ] |
| | | } |
| | | PowerOnRatePie.setOption(PowerOnRatePie_option) |
| | | let PowerOnRateLine = this.$echarts.init(document.getElementById('PowerOnRateLine'), 'macarons') |
| | | this.PowerOnRatePie.setOption(PowerOnRatePie_option) |
| | | this.PowerOnRateLine = this.$echarts.init(document.getElementById('PowerOnRateLine'), 'macarons') |
| | | let PowerOnRateLine_option = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | bottom: '3%', |
| | | top: 60, |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | // selected:{ |
| | | // "æ²çº¿":false, |
| | | // }, |
| | | top: '0', |
| | | right: '10', |
| | | //设置åéå¤éæ¨¡å¼ |
| | | // selectedMode:'single', |
| | | icon: 'pin', |
| | | data: [ |
| | | // { |
| | | // name:'æ²çº¿', |
| | | // textStyle:{ |
| | | // padding:4, |
| | | // color:'#e957ff', |
| | | // // borderWidth:1, |
| | | // fontSize:16, |
| | | // // borderColor:'#50E6D7' |
| | | // } |
| | | // }, |
| | | { |
| | | name: 'æ±ç¶å¾', |
| | | textStyle: { |
| | | padding: 4, |
| | | fontSize: 16, |
| | | color: '#9996f8' |
| | | // borderWidth:1, |
| | | // borderColor:'#50E6D7' |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | |
| | | } |
| | | }, |
| | | series: [ |
| | | // { |
| | | // name:'æ²çº¿', |
| | | // type: 'line', |
| | | // smooth:true, |
| | | // symbol: 'circle', |
| | | // symbolSize: 8, |
| | | // label:{ |
| | | // show:true, |
| | | // position:"top", |
| | | // textStyle:{ |
| | | // color:'#000', |
| | | // }, |
| | | // formatter:"æ¶é¿ï¼{c}H" |
| | | // }, |
| | | // itemStyle: { |
| | | // color: "rgb(87, 120, 225)", |
| | | // borderColor: "#fff", |
| | | // borderWidth: 2, |
| | | // shadowColor: 'rgba(0, 0, 0, .3)', |
| | | // }, |
| | | // lineStyle: { |
| | | // normal: { |
| | | // color:"rgb(87, 120, 225)", |
| | | // shadowColor: 'rgba(87, 120, 225, .4)', |
| | | // shadowBlur: 8, |
| | | // shadowOffsetY: 10, |
| | | // shadowOffsetX: 0, |
| | | // }, |
| | | // }, |
| | | // areaStyle: { |
| | | // normal: { |
| | | // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | // offset: 0, |
| | | // color: 'rgba(87, 120, 225, .6)' |
| | | // }, { |
| | | // offset: 1, |
| | | // color: 'rgba(87, 120, 225, .3)' |
| | | // }]), |
| | | // } |
| | | // }, |
| | | // data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], |
| | | // }, |
| | | { |
| | | name: 'æ±ç¶å¾', |
| | | name: '', |
| | | type: 'bar', |
| | | data: [this.openingLong, this.closedLong, this.processLong, this.waitingLong], |
| | | // data:[22,3,5,6], |
| | | barWidth: 25, |
| | | label: { |
| | | show: true, |
| | |
| | | textStyle: { |
| | | color: '#000' |
| | | }, |
| | | // formatter:"æ¶é¿ï¼{c}H", |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? `æ¶é¿ï¼${value.slice(1)}H` : `æ¶é¿ï¼${value}H` |
| | |
| | | ['#6496e9', '#6bded3'], |
| | | ['#849db8', '#b4b8cc'], |
| | | ['#4fe1c5', '#4ecee1'], |
| | | // ["#9978fa","#88a1fa"], |
| | | ['#ffbb65', '#fdc68b'] |
| | | ] |
| | | // return colorList[params.dataIndex]; |
| | | let colorItem = colorList[params.dataIndex] |
| | | return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | return new eCharts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: colorItem[0] |
| | | }, |
| | |
| | | } |
| | | }] |
| | | } |
| | | PowerOnRateLine.setOption(PowerOnRateLine_option) |
| | | this.PowerOnRateLine.setOption(PowerOnRateLine_option) |
| | | //弿ºç |
| | | let UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons') |
| | | this.UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons') |
| | | let UtilizationLine_option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | type: 'category', |
| | | data: ['弿ºæ¶é¿', 'æ»æ¶é¿'], |
| | | axisLine: { |
| | | lineStyle: { |
| | | // color: 'rgba(70, 196, 255, .8)' |
| | | } |
| | | lineStyle: {} |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | // color: 'rgba(111, 132, 189, 1)', |
| | | textStyle: { |
| | | fontSize: 14 |
| | | } |
| | |
| | | yAxis: [{ |
| | | type: 'value', |
| | | name: 'æ¶é´/å°æ¶', |
| | | nameTextStyle: { |
| | | // color: 'rgba(111, 132, 189, 1)' |
| | | }, |
| | | nameTextStyle: {}, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | // color: 'rgba(111, 132, 189, 1)', |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | // color: 'rgba(70, 196, 255, .3)' |
| | | } |
| | | lineStyle: {} |
| | | } |
| | | }], |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | data: [this.openingLong, this.totalLong], |
| | | // data:[22,22], |
| | | barWidth: 25, |
| | | label: { |
| | | show: true, |
| | |
| | | textStyle: { |
| | | color: '#000' |
| | | }, |
| | | // formatter:"æ¶é¿ï¼{c}H", |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? `æ¶é¿ï¼${value.slice(1)}H` : `æ¶é¿ï¼${value}H` |
| | |
| | | ['#6496e9', '#6bded3'], |
| | | ['#9978fa', '#88a1fa'] |
| | | ] |
| | | // return colorList[params.dataIndex]; |
| | | let colorItem = colorList[params.dataIndex] |
| | | return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | return new eCharts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: colorItem[0] |
| | | }, |
| | |
| | | } |
| | | }] |
| | | } |
| | | UtilizationLine.setOption(UtilizationLine_option) |
| | | this.UtilizationLine.setOption(UtilizationLine_option) |
| | | //å¼å¨ç |
| | | let StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons') |
| | | this.StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons') |
| | | let StartupLine_option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | type: 'category', |
| | | data: ['è¿è¡æ¶é¿', '弿ºæ¶é¿'], |
| | | axisLine: { |
| | | lineStyle: { |
| | | // color: 'rgba(70, 196, 255, .8)' |
| | | } |
| | | lineStyle: {} |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | // color: 'rgba(111, 132, 189, 1)', |
| | | textStyle: { |
| | | fontSize: 14 |
| | | } |
| | |
| | | yAxis: [{ |
| | | type: 'value', |
| | | name: 'æ¶é´/å°æ¶', |
| | | nameTextStyle: { |
| | | // color: 'rgba(111, 132, 189, 1)' |
| | | }, |
| | | nameTextStyle: {}, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | // color: 'rgba(111, 132, 189, 1)', |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | // color: 'rgba(70, 196, 255, .3)' |
| | | } |
| | | lineStyle: {} |
| | | } |
| | | }], |
| | | series: [{ |
| | | type: 'bar', |
| | | data: [this.processLong, this.openingLong], |
| | | // data:[22,22], |
| | | barWidth: 25, |
| | | label: { |
| | | show: true, |
| | |
| | | textStyle: { |
| | | color: '#000' |
| | | }, |
| | | // formatter:"æ¶é¿ï¼{c}H", |
| | | formatter: params => { |
| | | const value = String(params.value) |
| | | return value.length == 2 && value[0] === '0' ? `æ¶é¿ï¼${value.slice(1)}H` : `æ¶é¿ï¼${value}H` |
| | |
| | | ['#4fe1c5', '#4ecee1'], |
| | | ['#6496e9', '#6bded3'] |
| | | ] |
| | | // return colorList[params.dataIndex]; |
| | | let colorItem = colorList[params.dataIndex] |
| | | return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | return new eCharts.graphic.LinearGradient(0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: colorItem[0] |
| | | }, |
| | |
| | | } |
| | | }] |
| | | } |
| | | StartupLine.setOption(StartupLine_option) |
| | | this.StartupLine.setOption(StartupLine_option) |
| | | }, |
| | | queryStatistical() { |
| | | getAction(this.url.dayStatisticalRate, this.queryParams).then(res => { |
| | | if (res.success) { |
| | | this.StatCharOpeningRate = res.result.openRate |
| | | this.StatCharUsedRate = res.result.utilizationRate |
| | | this.UtilizationHeight = res.result.openRate |
| | | this.StatCharUsedopeningRate = res.result.usedOpenRate |
| | | this.StartupHeight = res.result.usedOpenRate |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong) |
| | | this.processLong = this.getTime(res.result.processLong) |
| | | this.closedLong = this.getTime(res.result.closeLong) |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong) |
| | | this.draw() |
| | | } |
| | | }) |
| | | this.spinning = true |
| | | getAction(this.url.dayStatisticalRate, this.queryParams) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.StatCharOpeningRate = res.result.openRate |
| | | this.StatCharUsedRate = res.result.utilizationRate |
| | | this.UtilizationHeight = res.result.openRate |
| | | this.StatCharUsedOpeningRate = res.result.usedOpenRate |
| | | this.StartupHeight = res.result.usedOpenRate |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong) |
| | | this.processLong = this.getTime(res.result.processLong) |
| | | this.closedLong = this.getTime(res.result.closeLong) |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong) |
| | | this.draw() |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | dataChange(val) { |
| | | if (val) { |
| | |
| | | }, |
| | | initEquipmentNode() { |
| | | let _this = this |
| | | this.spinning = true |
| | | getAction(this.url.getBaseTree).then((res) => { |
| | | if (res.success) { |
| | | const { isEquipment, productionId, tierName } = this.$route.params |
| | |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | }, |
| | | searchReset() { |
| | |
| | | }, |
| | | searchQuery() { |
| | | this.queryStatistical() |
| | | }, |
| | | |
| | | handleWindowResize() { |
| | | if (this.PowerOnRatePie) this.PowerOnRatePie.resize() |
| | | if (this.PowerOnRateLine) this.PowerOnRateLine.resize() |
| | | if (this.UtilizationLine) this.UtilizationLine.resize() |
| | | if (this.StartupLine) this.StartupLine.resize() |
| | | } |
| | | }, |
| | | watch: { |
| | | equip(val) { |
| | | // console.log(val); |
| | | if (val && val.equipmentId) { |
| | | this.$set(this.queryParam, 'tierName', val.title) |
| | | this.$set(this.queryParam, 'equipmentId', val.equipmentId) |
| | |
| | | } |
| | | this.searchQuery() |
| | | } |
| | | // this.searchQuery(); |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .charContent { |
| | | display: flex; |
| | | } |
| | | |
| | | <style scoped lang="less"> |
| | | @media screen and (min-width: 1920px) { |
| | | #StatisticsLegend { |
| | | height: 748px !important; |
| | |
| | | #StatisticsLegend { |
| | | height: 501px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-spin-nested-loading { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .ant-spin-container { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .ant-spin-blur { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | |
| | | margin: 0 auto; |
| | | overflow: hidden; |
| | | border-radius: 8px; |
| | | |
| | | /*border: 6px solid red;*/ |
| | | /*!*background-color: yellow;*!*/ |
| | | /*border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1;*/ |
| | | } |
| | | |
| | | .left-box-con { |
| | |
| | | position: relative; |
| | | text-align: center; |
| | | border: 6px solid red; |
| | | /*background-color: yellow;*/ |
| | | border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1; |
| | | } |
| | | |
| | |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: 89%; |
| | | /*background-color: green;*/ |
| | | background: -moz-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%); |
| | | background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%, #06a8f8), color-stop(100%, #2bf3c7)); |
| | | background: -webkit-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%); |
| | |
| | | color: #fff; |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | |
| | | .con-left { |
| | | display: flex; |
| | | flex-direction: column; |
| | | flex-wrap: wrap; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | } |
| | | |
| | | .con-left > span { |
| | | flex: 1; |
| | | } |
| | | </style> |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-spin :spinning="echartLoading"> |
| | | <a-spin :spinning="eChartLoading"> |
| | | <div style="width: 100%;height: 100%;display: flex;"> |
| | | <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div> |
| | | <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div> |
| | |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import { |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@/api/manage' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | |
| | | const columns = [ |
| | | { title: 'æ¥è¦å·', dataIndex: 'alarmCode', key: 'alarmCode', align: 'center' }, |
| | |
| | | ] |
| | | |
| | | export default { |
| | | // mixins: [JeecgListMixin], |
| | | name: 'alarmAnalysisMain', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | /* tableå è½½ç¶æ */ |
| | | outerDataLoading: false, |
| | | innerDataLoading: false, |
| | | echartLoading: false, |
| | | eChartLoading: false, |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | | TreeIDOne: 1, |
| | | TreeIDTwo: 2, |
| | | deviceTypeDict: '', |
| | | dates: [], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParams: {}, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | | efficiencyOptions: [ |
| | | { label: 'å©ç¨ç', value: 'lyl' }, |
| | | { label: '弿ºç', value: 'kjl' }, |
| | | { label: '弿ºæ¶é´', value: 'kjsj' }, |
| | | { label: 'å å·¥æ¶é´', value: 'jgsj' }, |
| | | { label: 'å¾
æºæ¶é´', value: 'djsj' }, |
| | | { label: 'å
³æºæ¶é´', value: 'gjsj' } |
| | | ], |
| | | checkedList: ['lyl'], |
| | | dataList: [], |
| | | url: { |
| | | efficiencyList: '/mdc/alarmAnalyze/alarmList', |
| | | listByType: '/mdc/MdcUtilizationRate/getByType', |
| | | alarmTrend: '/mdc/alarmAnalyze/alarmTrend', |
| | | equipmentAlarmList: '/mdc/alarmAnalyze/equipmentAlarmList' |
| | | }, |
| | | tableHeads: [], |
| | | pieDate: [0], |
| | | XData: [0], |
| | | YData: [0], |
| | | columns, |
| | | innerColumns, |
| | | hasRequsetAlarmCodeList: [] |
| | | hasRequestAlarmCodeList: [] |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData1() |
| | | |
| | | }, |
| | | mounted() { |
| | | this.drawWrin() |
| | |
| | | } |
| | | }, |
| | | filters: { |
| | | numFilter(value) { |
| | | if (value) { |
| | | return parseFloat((value * 100).toFixed(2)) |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | |
| | | }, |
| | | TableDraw(key, val) { |
| | | let that = this |
| | | that.echartLoading = true |
| | | that.eChartLoading = true |
| | | that.queryParam.alarmCode = val.alarmCode |
| | | console.log(this.queryParam) |
| | | getAction(that.url.alarmTrend, that.queryParam) |
| | | .then(res => { |
| | | if (res.success) { |
| | |
| | | that.XData = res.result.dateCountList.map(item => item.key) |
| | | that.YData = res.result.dateCountList.map(item => item.count) |
| | | |
| | | // this.tableHeads = res.result.dates |
| | | // this.dataList = res.result |
| | | // this.draw() |
| | | // this.checkSameData(this.dataList) |
| | | // this.checkSameData1(this.dataList) |
| | | // this.checkSameData2(this.dataList) |
| | | // this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | that.drawWrin() |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.echartLoading = false |
| | | that.eChartLoading = false |
| | | }) |
| | | console.log(this.YData) |
| | | |
| | | }, |
| | | disabledDate(current) { |
| | |
| | | }, |
| | | loadData1() { |
| | | this.outerDataLoading = true |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | getAction(this.url.efficiencyList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | // this.tableHeads = res.result.dates |
| | | this.dataList = res.result |
| | | this.hasRequsetAlarmCodeList = [] |
| | | // this.draw() |
| | | // this.checkSameData(this.dataList) |
| | | // this.checkSameData1(this.dataList) |
| | | // this.checkSameData2(this.dataList) |
| | | // this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | |
| | | this.hasRequestAlarmCodeList = [] |
| | | } |
| | | }).finally(() => { |
| | | this.outerDataLoading = false |
| | |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '<br/>{b} : {c} ({d}%)' |
| | | formatter: '{b} : {c} ({d}%)' |
| | | }, |
| | | calculable: true, |
| | | series: [{ |
| | | type: 'pie', |
| | | radius: '60%', |
| | | label: { |
| | | show: true, |
| | | formatter: '{b}\n{c}', |
| | | color: 'inherit' |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: function(params) { |
| | | var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] |
| | | return colorList[params.dataIndex] |
| | | }, |
| | | label: { |
| | | show: true, |
| | | // position: 'top', |
| | | formatter: '{b}\n{c}', |
| | | color: function(params) { |
| | | var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] |
| | | return colorList[params.dataIndex] |
| | | } |
| | | } |
| | | color: function(params) { |
| | | const colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] |
| | | return colorList[params.dataIndex % colorList.length] |
| | | } |
| | | }, |
| | | data: this.pieDate |
| | |
| | | let _this = this |
| | | // å½å±å¼æ¶è¥è¯¥è¡æªè¢«å±å¼è¿æä¼è¯·æ±åå°æ°æ®ï¼å±å¼è¿çæ°æ®ä¼è¢«ç¼åæ ééå¤è¯·æ± |
| | | this.queryParam.alarmCode = record.alarmCode |
| | | if (expanded && !this.hasRequsetAlarmCodeList.includes(record.alarmCode)) { |
| | | if (expanded && !this.hasRequestAlarmCodeList.includes(record.alarmCode)) { |
| | | this.innerDataLoading = true |
| | | getAction(this.url.equipmentAlarmList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | |
| | | item.innerDataList = res.result |
| | | } |
| | | }) |
| | | _this.hasRequsetAlarmCodeList.push(record.alarmCode) |
| | | _this.hasRequestAlarmCodeList.push(record.alarmCode) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | |
| | | :loading="cardLoading" |
| | | :bordered="false" |
| | | title="å·¥å
·ä¿¡æ¯" |
| | | style="height: 100%;" |
| | | > |
| | | <a-spin :spinning="loading"> |
| | | <a-alert |
| | |
| | | /> |
| | | |
| | | <!-- showLine --> |
| | | <a-tree |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px;max-height: 400px; min-height: 400px"> |
| | | <a-tree |
| | | :checkStrictly="checkStrictly" |
| | | |
| | | :selectedKeys="selectedKeys" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="treeDataSource" |
| | | |
| | | :defaultExpandAll="true" |
| | | @select="onSelect" |
| | | @expand="onExpand" |
| | |
| | | |
| | | </template> |
| | | </a-tree> |
| | | </div> |
| | | |
| | | </a-spin> |
| | | </a-card> |
| | | </template> |
| | |
| | | this.expandedKeys = this.allTreeKeys; |
| | | }, |
| | | closeAll() { |
| | | this.expandedKeys = this.allSiteIds; |
| | | this.expandedKeys = []; |
| | | }, |
| | | refreshTree() { |
| | | this.queryTreeData(); |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <a-card :bordered="false" style="flex: 1;overflow:auto;max-height: 600px; min-height: 600px"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '50'], |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | } else { |
| | | this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | //this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | this.ipagination.total = 0 |
| | | } |
| | | }) |
| | |
| | | this.loading = false; |
| | | }); |
| | | } else { |
| | | this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | //this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | |
| | | :loading="cardLoading" |
| | | :bordered="false" |
| | | title="å·¥å
·åç±»" |
| | | style="height: 100%;" |
| | | > |
| | | <a-spin :spinning="loading"> |
| | | <a-alert |
| | |
| | | /> |
| | | |
| | | <!-- showLine --> |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px;max-height: 400px; min-height: 400px"> |
| | | <a-tree |
| | | :checkStrictly="checkStrictly" |
| | | |
| | |
| | | |
| | | </template> |
| | | </a-tree> |
| | | </div> |
| | | </a-spin> |
| | | </a-card> |
| | | </template> |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <a-card :bordered="false" style="flex: 1;overflow:auto;max-height: 600px; min-height: 600px"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '50'], |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | } else { |
| | | this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | //this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | this.ipagination.total = 0 |
| | | } |
| | | }) |
| | |
| | | this.loading = false; |
| | | }); |
| | | } else { |
| | | this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | //this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | } |
| | | }, |
| | | onClearSelected() { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card> |
| | | <!-- æä½æé® --> |
| | | <a-button type="primary" @click="handlePrint">çæå¹¶æå°äºç»´ç </a-button> |
| | | <a-button @click="handleBatchGenerate">æ¹éçæäºç»´ç </a-button> |
| | | |
| | | <!-- éèçæå°åºå --> |
| | | <div id="printContainer" v-show="false"> |
| | | <img :src="qrData.image" alt="äºç»´ç " style="width: 5cm; height: 5cm;"> |
| | | <div style="margin-top: 10px; font-size: 16px;" class="qr-content">{{ qrData.content }}</div> |
| | | </div> |
| | | |
| | | <div id="printArea" style="display: block;"> |
| | | <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> |
| | | <img :src="item.base64" alt="QR Code"> |
| | | <p>{{ item.content }}</p> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import printJS from 'print-js'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | qrData: { |
| | | image: '', |
| | | content: '' |
| | | }, |
| | | qrList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | // çæå¹¶æå°äºç»´ç |
| | | handlePrint() { |
| | | |
| | | getAction('/tms/qyCode/generate').then(res => { |
| | | if (res.success) { |
| | | this.qrData = res.result; |
| | | // ç¡®ä¿DOMæ´æ°åæ§è¡æå° |
| | | this.$nextTick(() => { |
| | | this.printQrCode(); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // æ§è¡æå°æä½ |
| | | printQrCode() { |
| | | // 1. å建æå°å
容 |
| | | const printContent = document.getElementById('printContainer').innerHTML; |
| | | |
| | | // 2. å建æå°çªå£ |
| | | const printWindow = window.open('', '_blank'); |
| | | |
| | | // 3. åå
¥æå°å
容 |
| | | printWindow.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>äºç»´ç æå°</title> |
| | | <style> |
| | | body { |
| | | margin: 0; |
| | | padding: 0; |
| | | font-family: Arial, sans-serif; |
| | | } |
| | | @media print { |
| | | @page { |
| | | size: auto; |
| | | margin: 0; |
| | | } |
| | | body { |
| | | margin: 0; |
| | | } |
| | | } |
| | | .qr-label { |
| | | width: 60mm; |
| | | height: 40mm; |
| | | padding: 2mm; |
| | | box-sizing: border-box; |
| | | border: 1px dotted #ccc; /* æå°æ¶ä¸ä¼æ¾ç¤º */ |
| | | text-align: center; |
| | | } |
| | | .qr-image { |
| | | width: 30mm; |
| | | height: 30mm; |
| | | display: block; |
| | | margin: 0 auto; |
| | | } |
| | | .qr-content { |
| | | font-size: 10pt; |
| | | margin-top: 1mm; |
| | | word-break: break-all; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | ${printContent} |
| | | <script> |
| | | // èªå¨è§¦åæå°å¹¶å
³éçªå£ |
| | | window.onload = function() { |
| | | setTimeout(function() { |
| | | window.print(); |
| | | window.onafterprint = function() { |
| | | window.close(); |
| | | }; |
| | | // å
¼å®¹Safari |
| | | if (window.matchMedia) { |
| | | const mediaQueryList = window.matchMedia('print'); |
| | | mediaQueryList.addListener(function(mql) { |
| | | if (!mql.matches) { |
| | | setTimeout(function() { |
| | | window.close(); |
| | | }, 300); |
| | | } |
| | | }); |
| | | } |
| | | }, 100); |
| | | }; |
| | | <\/script> |
| | | </body> |
| | | </html> |
| | | `); |
| | | |
| | | printWindow.document.close(); |
| | | }, |
| | | |
| | | // æ¹éçæäºç»´ç |
| | | async handleBatchGenerate() { |
| | | getAction('/tms/qyCode/batchGenerate').then(res => { |
| | | if (res.success) { |
| | | this.qrList = res.result.map((content, i) => ({ |
| | | content:res.result[i].content, |
| | | base64: res.result[i].image |
| | | })); |
| | | this.handleBacthPrint(); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æ§è¡æå° |
| | | handleBacthPrint() { |
| | | this.$nextTick(() => { |
| | | printJS({ |
| | | printable: 'printArea', |
| | | type: 'html', |
| | | style: ` |
| | | .qrcode-item { |
| | | page-break-inside: avoid; |
| | | margin: 10px; |
| | | text-align: center; |
| | | } |
| | | img { width: 100px; height: 100px; } |
| | | `, |
| | | scanStyles: false |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :loading="cardLoading" |
| | | :bordered="false" |
| | | title="å·¥å
·ä¿¡æ¯" |
| | | style="height: 100%;" |
| | | > |
| | | <a-spin :spinning="loading"> |
| | | <a-alert |
| | |
| | | /> |
| | | |
| | | <!-- showLine --> |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px;max-height: 400px; min-height: 400px"> |
| | | <a-tree |
| | | :checkStrictly="checkStrictly" |
| | | |
| | |
| | | |
| | | </template> |
| | | </a-tree> |
| | | </div> |
| | | </a-spin> |
| | | </a-card> |
| | | </template> |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <a-card :bordered="false" style="flex: 1;overflow:auto;max-height: 600px; min-height: 600px"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '50'], |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | |
| | | onSelectChange(selectedRowKeys,selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows |
| | | console.log("22222",selectedRowKeys) |
| | | //éè¿idæ¥è¯¢ç®¡çåæ°ååæ°æ°æ® |
| | | getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { |
| | | if (res.success) { |
| | |
| | | this.ipagination.total = res.result.total |
| | | //é»è®¤éä¸ç¬¬ä¸æ¡æ°æ® |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | this.onSelectChange(this.selectedRowKeys,this.selectionRows) |
| | | console.log("1111111",this.selectedRowKeys,this.selectionRows) |
| | | } else { |
| | | this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | //this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | this.ipagination.total = 0 |
| | | } |
| | | }) |
| | |
| | | this.loading = false; |
| | | }); |
| | | } else { |
| | | this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | // this.$message.warning("è¯·éæ©å¶åèç¹è¿è¡æ¥è¯¢"); |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | console.log("111",this.model.id) |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |