1、用户管理页面修改身份字段名称为首页权限并调整其选项值
2、按照新需求完成客户操作工进入后页面所有布局100%
3、调整全局页脚内容
| | |
| | | :style="{background:$route.meta.title==='é¦é¡µ'?'#0F103A':'',color:$route.meta.title==='é¦é¡µ'?'#fff':''}"> |
| | | Copyright |
| | | <a-icon type="copyright"/> |
| | | 2019 <span>2015-2020 çµç§æºè½</span> |
| | | 2024 <span>2015-2025 çµç§æºè½</span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <template> |
| | | <Component :is="currentSignage" :productionCode="productionCode" @switchToBranchFactory="switchToBranchFactory"> |
| | | <template #back_nav> |
| | | <div class="back-nav" @click="backToLastSignage" v-if="userType===4"> |
| | | <dv-decoration-7>ä¸ä¸çº§</dv-decoration-7> |
| | | </div> |
| | | </template> |
| | | <Component :is="currentSignage" :userType="userType" :productionCode="productionCode" |
| | | @switchToNextSignage="switchToNextSignage" @backToLastSignage="backToLastSignage"> |
| | | </Component> |
| | | </template> |
| | | |
| | |
| | | import IndexSignage from './IndexSignage.vue' |
| | | import BranchFactorySignage from './BranchFactorySignage.vue' |
| | | import WorkshopSectionSignage from './WorkshopSectionSignage.vue' |
| | | import EquipmentSignage from './EquipmentSignage.vue' |
| | | |
| | | export default { |
| | | name: 'Analysis', |
| | | components: { |
| | | IndexSignage, |
| | | BranchFactorySignage, |
| | | WorkshopSectionSignage |
| | | WorkshopSectionSignage, |
| | | EquipmentSignage |
| | | }, |
| | | data() { |
| | | return { |
| | | currentSignage: '', |
| | | productionCode: '', |
| | | branchFactoryProductionCode: '', |
| | | workshopSectionProductionCode: '', |
| | | userType: '' |
| | | } |
| | | }, |
| | |
| | | this.userType = res.userType |
| | | switch (this.userType) { |
| | | case 1: |
| | | this.currentSignage = '' |
| | | this.currentSignage = 'EquipmentSignage' |
| | | break |
| | | case 2: |
| | | this.currentSignage = 'WorkshopSectionSignage' |
| | |
| | | |
| | | }, |
| | | |
| | | backToLastSignage() { |
| | | this.currentSignage = 'IndexSignage' |
| | | backToLastSignage(signageName) { |
| | | if (signageName === 'Index') this.productionCode = '' |
| | | if (signageName === 'WorkshopSection') this.productionCode = this.workshopSectionProductionCode |
| | | if (signageName === 'BranchFactory') this.productionCode = this.branchFactoryProductionCode |
| | | this.currentSignage = signageName + 'Signage' |
| | | }, |
| | | |
| | | switchToBranchFactory(value) { |
| | | console.log('åç»ä»¶value', value) |
| | | this.currentSignage = 'BranchFactorySignage' |
| | | this.productionCode = value |
| | | switchToNextSignage(params) { |
| | | console.log('åç»ä»¶params', params) |
| | | if (params.signageName === 'WorkshopSection') this.branchFactoryProductionCode = this.productionCode |
| | | if (params.signageName === 'Equipment') this.workshopSectionProductionCode = this.productionCode |
| | | this.$nextTick(() => { |
| | | this.productionCode = params.productionCode |
| | | this.currentSignage = params.signageName + 'Signage' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .back-nav { |
| | | width: 100px; |
| | | height: 30px; |
| | | color: #ccc; |
| | | position: absolute; |
| | | top: 25px; |
| | | left: 25px; |
| | | cursor: pointer; |
| | | z-index: 9999 |
| | | } |
| | | |
| | | </style> |
| | |
| | | <!--</div>--> |
| | | <div class="content-container"> |
| | | <div style="width: 25%" class="left-col"> |
| | | <slot name="back_nav"></slot> |
| | | <div class="back-nav" @click="$emit('backToLastSignage','Index')" v-if="userType===4"> |
| | | <dv-decoration-7>ä¸ä¸çº§</dv-decoration-7> |
| | | </div> |
| | | <dv-border-box-9 style="padding: 40px 20px 0"> |
| | | <!--<div class="first-title">M D C å
¥ ç½ æ» æ° : 6 0 3 å°</div>--> |
| | | <div id="running_state_chart" style="width:100%;height: 400px;"></div> |
| | |
| | | productionCode: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | userType: { |
| | | type: Number |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | |
| | | } else { |
| | | console.log('yAxisParams===========', params) |
| | | this.$emit('switchToBranchFactory', params.value) |
| | | this.$emit('switchToNextSignage', { signageName: 'WorkshopSection', productionCode: params.value }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | justify-content: space-between; |
| | | |
| | | .left-col { |
| | | .back-nav { |
| | | width: 100px; |
| | | height: 30px; |
| | | color: #eee; |
| | | position: absolute; |
| | | top: 25px; |
| | | left: 25px; |
| | | cursor: pointer; |
| | | z-index: 9999 |
| | | } |
| | | |
| | | .first-title { |
| | | color: #00A8AC; |
| | | font-size: 20px; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="page-container"> |
| | | <div class="content-container"> |
| | | <div style="width: 18%" class="left-col"> |
| | | <!--è¿åä¸ä¸çº§--> |
| | | <div class="back-nav" @click="$emit('backToLastSignage','WorkshopSection')" v-if="userType!==1"> |
| | | <dv-decoration-7>ä¸ä¸çº§</dv-decoration-7> |
| | | </div> |
| | | |
| | | <!--å½å设å¤ç¼å·--> |
| | | <dv-border-box-12 style="height: 80px;padding: 0 10px 0"> |
| | | <div class="equipmentId-container"> |
| | | {{equipmentId}} |
| | | </div> |
| | | </dv-border-box-12> |
| | | |
| | | <!--设å¤å表--> |
| | | <div style="height: 721px;overflow: auto;margin-top: 20px;"> |
| | | <table> |
| | | <tr> |
| | | <th>设å¤ç¼å·</th> |
| | | <th>åå·</th> |
| | | </tr> |
| | | <tr v-for="(item,index) in equipmentList" :key="index" @click="selectEquipment(item)"> |
| | | <td>{{item.equipmentId}}</td> |
| | | <td>{{item.equipmentType}}</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width: 81.8%" class="right-col"> |
| | | <!--å³ä¸è®¾å¤å项信æ¯åºå--> |
| | | <dv-border-box-12 style="height: 50%" class="right-top-row"> |
| | | <!--å项信æ¯å±ç¤ºåºå--> |
| | | <div style="display: flex;height: 70%"> |
| | | <dv-border-box-11 title="设å¤ä¿¡æ¯" class="info-container" style="flex:5;"> |
| | | <a-descriptions :column="3"> |
| | | <a-descriptions-item label="ç»ä¸ç¼å·"> |
| | | {{equipmentInfo.equipmentId}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="ABCæ è¯"> |
| | | {{equipmentInfo.ABCSymbol}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åç§°"> |
| | | {{equipmentInfo.equipmentName}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="åå·"> |
| | | {{equipmentInfo.equipmentType}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åç±»"> |
| | | {{equipmentInfo.equipmentCategory}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="å·¥åº"> |
| | | {{equipmentInfo.workArea}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="æä½ç³»ç»"> |
| | | {{equipmentInfo.driveType}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="è§æ ¼"> |
| | | {{equipmentInfo.standard}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="ç»´æ¤é¨é¨"> |
| | | {{equipmentInfo.depart}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="工段"> |
| | | {{equipmentInfo.workshopSection}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="æä½å·¥"> |
| | | {{equipmentInfo.operator}} |
| | | </a-descriptions-item> |
| | | </a-descriptions> |
| | | </dv-border-box-11> |
| | | |
| | | <dv-border-box-11 title="æä½è¯ä¿¡æ¯" class="info-container" style="flex:2;"> |
| | | <a-descriptions :column="1"> |
| | | <a-descriptions-item label="æä½è¯ç¼å·"> |
| | | {{equipmentInfo.equipmentId}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="å½å卿忰"> |
| | | {{equipmentInfo.ABCSymbol}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="åè¯æ¥æ"> |
| | | {{equipmentInfo.equipmentName}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="å¨ææªæ¢æ¥æ"> |
| | | {{equipmentInfo.equipmentType}} |
| | | </a-descriptions-item> |
| | | </a-descriptions> |
| | | </dv-border-box-11> |
| | | |
| | | <dv-border-box-11 title="ç»´æ¤ä¿¡æ¯" class="info-container" style="flex:2;"> |
| | | <a-descriptions :column="1"> |
| | | <a-descriptions-item label="䏿¬¡ä¸ä¿æ¥æ"> |
| | | {{equipmentInfo.equipmentId}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="䏿¬¡äºä¿æ¥æ"> |
| | | {{equipmentInfo.ABCSymbol}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="ææ¯ç¶æ"> |
| | | {{equipmentInfo.equipmentName}} |
| | | </a-descriptions-item> |
| | | </a-descriptions> |
| | | </dv-border-box-11> |
| | | </div> |
| | | |
| | | <!--åè½æé®åºå--> |
| | | <div style="display: flex;height: 30%;align-items: center;padding: 0 20px;color: #eee;"> |
| | | <div style="display: flex;justify-content:space-evenly;flex: 1"> |
| | | <div style="width: 45%;" class="info-card-container"> |
| | | <div class="info-card-title">æ¬ææ¥ä¿®æ°é</div> |
| | | <div class="info-card-value" style="color: #EAC910">20</div> |
| | | </div> |
| | | |
| | | <div style="width: 45%;" class="info-card-container"> |
| | | <div class="info-card-title">设å¤ç¶æï¼ç»´ä¿®ä¸çï¼</div> |
| | | <div class="info-card-value">ç»´ä¿®ä¸</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display: flex;justify-content: space-evenly;font-size: 20px;padding: 0 50px"> |
| | | <dv-decoration-11 style="width: 200px;height: 70px;margin: 0 10px">å¤ä»¶ä¿¡æ¯</dv-decoration-11> |
| | | <dv-decoration-11 style="width: 200px;height: 70px;margin: 0 10px">ä¿å
»è®¡å</dv-decoration-11> |
| | | <dv-decoration-11 style="width: 200px;height: 70px;margin: 0 10px">æ¥ä¿®</dv-decoration-11> |
| | | <dv-decoration-11 style="width: 200px;height: 70px;margin: 0 10px">设å¤ç次</dv-decoration-11> |
| | | </div> |
| | | </div> |
| | | </dv-border-box-12> |
| | | |
| | | <!--å³ä¸åé¡¹æ°æ®å¾è¡¨åºå--> |
| | | <dv-border-box-12 style="height: 50%" class="right-bottom-row"> |
| | | <div style="display: flex;justify-content:space-evenly;height: 100%"> |
| | | <div style="display: flex;flex-wrap: wrap;width: 30%;height: 100%"> |
| | | <div id="gauge_chart1" class="gauge-chart"></div> |
| | | <div id="gauge_chart2" class="gauge-chart"></div> |
| | | <div id="gauge_chart3" class="gauge-chart"></div> |
| | | <div id="gauge_chart4" class="gauge-chart"></div> |
| | | </div> |
| | | <div id="line_chart" style="width:40%;height: 100%;"></div> |
| | | <div style="width: 25%;height:100%;display: flex;align-items: center"> |
| | | <a-descriptions :column="2"> |
| | | <a-descriptions-item label="è¿è¡æ¨¡å¼"> |
| | | {{equipmentInfo.equipmentId}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="ç¨åºå·"> |
| | | {{equipmentInfo.ABCSymbol}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="主轴转é"> |
| | | {{equipmentInfo.equipmentName}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="主轴è´è·"> |
| | | {{equipmentInfo.equipmentType}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="主轴转é"> |
| | | {{equipmentInfo.equipmentCategory}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="主轴åç"> |
| | | {{equipmentInfo.workArea}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="è¿ç»åç"> |
| | | {{equipmentInfo.driveType}} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="æ¥è¦ä¿¡æ¯"> |
| | | {{equipmentInfo.standard}} |
| | | </a-descriptions-item> |
| | | </a-descriptions> |
| | | </div> |
| | | </div> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import signageApi from '@/api/signage' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'EquipmentSignage', |
| | | props: { |
| | | productionCode: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | userType: { |
| | | type: Number |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | equipmentList: [ |
| | | { |
| | | equipmentId: '2140223', |
| | | equipmentType: 'CV4160' |
| | | }, |
| | | { |
| | | equipmentId: '2140224', |
| | | equipmentType: 'CV4161' |
| | | }, |
| | | { |
| | | equipmentId: '2140225', |
| | | equipmentType: 'CV4162' |
| | | }, |
| | | { |
| | | equipmentId: '2140226', |
| | | equipmentType: 'CV4163' |
| | | }, |
| | | { |
| | | equipmentId: '2140227', |
| | | equipmentType: 'CV4164' |
| | | }, |
| | | { |
| | | equipmentId: '2140227', |
| | | equipmentType: 'CV4165' |
| | | }, |
| | | { |
| | | equipmentId: '2140228', |
| | | equipmentType: 'CV4166' |
| | | }, |
| | | { |
| | | equipmentId: '2140229', |
| | | equipmentType: 'CV4167' |
| | | }, |
| | | { |
| | | equipmentId: '2140230', |
| | | equipmentType: 'CV4168' |
| | | }, |
| | | { |
| | | equipmentId: '2140231', |
| | | equipmentType: 'CV4169' |
| | | }, |
| | | { |
| | | equipmentId: '2140232', |
| | | equipmentType: 'CV4170' |
| | | }, |
| | | { |
| | | equipmentId: '2140233', |
| | | equipmentType: 'CV4171' |
| | | } |
| | | ], |
| | | equipmentInfo: { |
| | | equipmentId: '2511563154', |
| | | ABCSymbol: '3312321421', |
| | | equipmentName: 'æºæ¢°ä¸å¿', |
| | | equipmentType: 'CV4160', |
| | | equipmentCategory: 'è½§æº', |
| | | workArea: 'Aååº', |
| | | driveType: 'JSOWJDF', |
| | | standard: 'æ ', |
| | | depart: 'è½§æºä¸å¿', |
| | | workshopSection: '407ä¸å·¥æ®µ', |
| | | operator: 'admin' |
| | | }, |
| | | lineChart: '', |
| | | lineChartData: [], |
| | | gaugeChart1: '', |
| | | gaugeChart2: '', |
| | | gaugeChart3: '', |
| | | gaugeChart4: '', |
| | | gaugeChartData1: [], |
| | | gaugeChartData2: [], |
| | | gaugeChartData3: [], |
| | | gaugeChartData4: [], |
| | | equipmentId: '2140223' |
| | | } |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | this.drawCharts() |
| | | this.getChartDataByApi() |
| | | }, |
| | | activated() { |
| | | this.handleWindowResize() |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | methods: { |
| | | selectEquipment(record) { |
| | | this.equipmentId = record.equipmentId |
| | | }, |
| | | |
| | | getChartDataByApi() { |
| | | |
| | | }, |
| | | |
| | | /* ç»å¶å¾è¡¨æ±æ»æ¹æ³ */ |
| | | drawCharts() { |
| | | this.drawGaugeChart() |
| | | this.drawLineChart() |
| | | }, |
| | | |
| | | /* ç»å¶ä»ªè¡¨çå¾è¡¨ */ |
| | | drawGaugeChart() { |
| | | const option = { |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: '', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 10, // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC', |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | grid: { |
| | | left: '1%', |
| | | top: '1%', |
| | | right: '10%', |
| | | bottom: '1%' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'å©ç¨ç', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | center: ['50%', '60%'], // é»è®¤å
¨å±å±
ä¸ |
| | | pointer: { |
| | | width: 6, |
| | | length: '50%', |
| | | itemStyle: { |
| | | color: 'inherit' |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: true, |
| | | length: 10, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 2 |
| | | } |
| | | }, |
| | | axisTick: { |
| | | length: 5, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false, |
| | | fontSize: 18, |
| | | formatter: function(value) { |
| | | return value + '%' |
| | | } |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { // 屿§lineStyleæ§å¶çº¿æ¡æ ·å¼ |
| | | color: [ //表çé¢è² |
| | | [0.3, '#E7781E'],//0-30%å¤çé¢è² |
| | | [0.7, '#C5C039'],//30%-60%å¤çé¢è² |
| | | [1, '#21C77F']//90%-100%å¤çé¢è² |
| | | ], |
| | | width: 15//表ç宽度 |
| | | } |
| | | }, |
| | | detail: { |
| | | formatter: '{score|{value}%}', |
| | | offsetCenter: [0, '50%'], |
| | | height: 30, |
| | | rich: { |
| | | score: { |
| | | fontSize: 20 |
| | | } |
| | | } |
| | | }, |
| | | data: [{ value: 100 }] |
| | | } |
| | | ] |
| | | } |
| | | this.drawGaugeChart1(option) |
| | | this.drawGaugeChart2(option) |
| | | this.drawGaugeChart3(option) |
| | | this.drawGaugeChart4(option) |
| | | }, |
| | | |
| | | /* ç»å¶å©ç¨ç仪表çå¾è¡¨ */ |
| | | drawGaugeChart1(opt) { |
| | | this.gaugeChart1 = this.$echarts.init(document.getElementById('gauge_chart1')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = 'å©ç¨ç' |
| | | this.gaugeChart1.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶å¼å¨ç仪表çå¾è¡¨ */ |
| | | drawGaugeChart2(opt) { |
| | | this.gaugeChart2 = this.$echarts.init(document.getElementById('gauge_chart2')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = 'å¼å¨ç' |
| | | this.gaugeChart2.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶å¼æºç仪表çå¾è¡¨ */ |
| | | drawGaugeChart3(opt) { |
| | | this.gaugeChart3 = this.$echarts.init(document.getElementById('gauge_chart3')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = '弿ºç' |
| | | this.gaugeChart3.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶OEE仪表çå¾è¡¨ */ |
| | | drawGaugeChart4(opt) { |
| | | this.gaugeChart4 = this.$echarts.init(document.getElementById('gauge_chart4')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = 'OEE' |
| | | this.gaugeChart4.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶æçº¿å¾ */ |
| | | drawLineChart() { |
| | | this.lineChart = this.$echarts.init(document.getElementById('line_chart')) |
| | | const newData = { |
| | | xAxis: ['1æ', '2æ', '3æ', '4æ', '5æ', '6æ', '7æ', '8æ', '9æ', '10æ', '11æ', '12æ'], |
| | | yAxis: [ |
| | | { |
| | | name: 'å©ç¨ç', |
| | | value: [20, 60, 50, 60, 20, 50, 60, 70, 23, 40, 60, 70] |
| | | }, |
| | | { |
| | | name: 'å¼å¨ç', |
| | | value: [23, 60, 44, 40, 74, 80, 60, 90, 70, 40, 70, 40] |
| | | }, |
| | | { |
| | | name: 'OEE', |
| | | value: [90, 70, 40, 70, 80, 60, 73, 60, 70, 90, 40, 65] |
| | | } |
| | | ], |
| | | yAxisName: 'æ´å¹´åº¦å©ç¨ç' |
| | | } |
| | | let legendData = [] |
| | | let seriesData = [] |
| | | let colorArr = ['#09F39E', '#A5F10D', '#09B3F6'] |
| | | legendData = newData.yAxis.map((item) => item.name) |
| | | seriesData = newData.yAxis.map((item1, index1) => { |
| | | return { |
| | | name: item1.name, |
| | | type: 'line', |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | itemStyle: { |
| | | color: colorArr[index1] |
| | | }, |
| | | lineStyle: { |
| | | width: 2 |
| | | }, |
| | | yAxisIndex: 1, |
| | | data: item1.value // æçº¿å¾çæ°æ® |
| | | } |
| | | }) |
| | | const option = { |
| | | grid: { |
| | | containLabel: true, |
| | | bottom: '3%', |
| | | top: '15%', |
| | | left: '2%', |
| | | right: '1%' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 20, |
| | | right: 'center', |
| | | data: legendData, |
| | | itemGap: 10, |
| | | textStyle: { |
| | | fontSize: 14, |
| | | color: '#ccc' |
| | | } |
| | | }, |
| | | xAxis: { |
| | | triggerEvent: true, |
| | | data: newData.xAxis || [], |
| | | axisLabel: { |
| | | interval: 0, |
| | | show: true, |
| | | fontSize: 12, |
| | | color: '#50729A' |
| | | // rotate: -30, |
| | | }, |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#50729A' |
| | | } |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | alignWithLabel: true |
| | | } |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | name: newData.yAxisName, |
| | | nameTextStyle: { |
| | | color: '#00A8AC', |
| | | fontSize: 18, |
| | | padding: [0, 0, 0, 90] |
| | | }, |
| | | nameGap: 25, |
| | | type: 'value', |
| | | position: 'left', |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#50729A' |
| | | } |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: '#3E4A82' |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | type: 'value', |
| | | position: 'right', |
| | | splitNumber: 5, |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#50729A' |
| | | }, |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#50729A' |
| | | } |
| | | }, |
| | | axisTick: { |
| | | show: true |
| | | }, |
| | | splitLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: '#3E4A82' |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | series: seriesData |
| | | } |
| | | this.lineChart.setOption(option, true) |
| | | }, |
| | | |
| | | /** |
| | | * çªå£å°ºå¯¸ååæ¶è§¦å |
| | | * è°æ´å¾è¡¨å°ºå¯¸ä»¥éåºå辨ç |
| | | */ |
| | | handleWindowResize() { |
| | | if (this.gaugeChart1) this.gaugeChart1.resize() |
| | | if (this.gaugeChart2) this.gaugeChart2.resize() |
| | | if (this.gaugeChart3) this.gaugeChart3.resize() |
| | | if (this.gaugeChart4) this.gaugeChart4.resize() |
| | | if (this.lineChart) this.lineChart.resize() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .page-container { |
| | | .content-container { |
| | | padding-top: 5px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .left-col { |
| | | padding: 0 10px 0; |
| | | |
| | | .back-nav { |
| | | width: 100px; |
| | | height: 30px; |
| | | color: #eee; |
| | | position: absolute; |
| | | top: 15px; |
| | | left: 15px; |
| | | cursor: pointer; |
| | | z-index: 9999 |
| | | } |
| | | |
| | | .equipmentId-container { |
| | | height: 100%; |
| | | color: #eee; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 30px |
| | | } |
| | | |
| | | table { |
| | | color: #eee; |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | border-spacing: 0; |
| | | border: 1px dashed; |
| | | |
| | | tr { |
| | | height: 60px; |
| | | text-align: center; |
| | | font-size: 18px; |
| | | position: relative; |
| | | |
| | | th, td { |
| | | border: 1px dashed; |
| | | } |
| | | |
| | | th { |
| | | font-weight: bold; |
| | | background-color: #10695D; |
| | | position: sticky; |
| | | z-index: 9999; |
| | | top: 0; |
| | | } |
| | | |
| | | td { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .right-col { |
| | | |
| | | .right-top-row { |
| | | .info-container { |
| | | margin: 5px; |
| | | padding: 70px 0 0 30px; |
| | | height: 100% |
| | | } |
| | | |
| | | .info-card-container { |
| | | background-color: #67C23A; |
| | | padding: 5px; |
| | | border-radius: 3px; |
| | | |
| | | .info-card-title { |
| | | font-weight: bold; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden |
| | | } |
| | | |
| | | .info-card-value { |
| | | text-align: center; |
| | | font-size: 30px; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden |
| | | } |
| | | } |
| | | } |
| | | |
| | | .right-bottom-row { |
| | | .gauge-chart { |
| | | width: 50%; |
| | | height: 50%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-descriptions { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item { |
| | | padding-bottom: 25px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | -ms-text-overflow: ellipsis; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-label, /deep/ .ant-descriptions-item-content { |
| | | color: #eee; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | console.log('seriesParams===========', params) |
| | | } else { |
| | | console.log('yAxisParams===========', params) |
| | | this.$emit('switchToBranchFactory', params.value) |
| | | this.$emit('switchToNextSignage', { signageName: 'BranchFactory', productionCode: params.value }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | <div class="page-container"> |
| | | <div class="content-container"> |
| | | <div style="width: 30%" class="left-col"> |
| | | <slot name="back_nav"></slot> |
| | | <div class="back-nav" @click="$emit('backToLastSignage','BranchFactory')" v-if="userType>=3"> |
| | | <dv-decoration-7>ä¸ä¸çº§</dv-decoration-7> |
| | | </div> |
| | | <dv-border-box-9 style="padding: 15px"> |
| | | <div id="tech_condition_chart" style="width:100%;height: 230px;"></div> |
| | | <div id="warranty_malfunction_chart" style="width:100%;height: 230px;"></div> |
| | | <div id="tech_condition_chart" style="width:100%;height: 240px;"></div> |
| | | <div id="warranty_malfunction_chart" style="width:100%;height: 240px;"></div> |
| | | <div style="display: flex;"> |
| | | |
| | | <div style="flex:0.5;display: flex;flex-direction:column;align-items: center"> |
| | |
| | | </dv-border-box-9> |
| | | </div> |
| | | <div style="width: 30%"> |
| | | <dv-border-box-9 style="padding: 30px 0"> |
| | | <div id="bar_chart" style="width:100%;height: 250px;"></div> |
| | | <div id="double_bar_chart" style="width:100%;height: 300px;"></div> |
| | | <div style="padding: 0 20px;"> |
| | | <dv-scroll-board :config="problemConfig" style="width:100%;height:220px"/> |
| | | <dv-border-box-9 style="padding: 15px"> |
| | | <a-form layout="inline" @keyup.enter.native="$emit('switchToNextSignage', { signageName: 'Equipment', productionCode: equipmentId })"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <!--<a-input v-model="equipmentId" size="large"></a-input>--> |
| | | <a-auto-complete |
| | | v-model="equipmentId" |
| | | placeholder="åè½¦é®æ¥è¯¢" |
| | | :allowClear="true" |
| | | size="large" |
| | | /> |
| | | </a-form-item> |
| | | </a-form> |
| | | <div style="display: flex;flex-wrap: wrap"> |
| | | <div id="gauge_chart1" style="width:50%;height: 200px;"></div> |
| | | <div id="gauge_chart2" style="width:50%;height: 200px;"></div> |
| | | <div id="gauge_chart3" style="width:50%;height: 200px;"></div> |
| | | <div id="gauge_chart4" style="width:50%;height: 200px;"></div> |
| | | </div> |
| | | <div id="bar_chart" style="width:100%;height: 330px;"></div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import signageApi from '@/api/signage' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'WorkshopSectionSignage', |
| | |
| | | productionCode: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | userType: { |
| | | type: Number |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | nextNextMonthMaintenancePlanNum: 0, |
| | | lineChart: '', |
| | | lineChartData: [], |
| | | gaugeChart1: '', |
| | | gaugeChart2: '', |
| | | gaugeChart3: '', |
| | | gaugeChart4: '', |
| | | gaugeChartData1: [], |
| | | gaugeChartData2: [], |
| | | gaugeChartData3: [], |
| | | gaugeChartData4: [], |
| | | barChart: '', |
| | | barChartData: [], |
| | | doubleBarChart: '', |
| | | doubleBarChartData: {}, |
| | | supportPlanList: [ |
| | | barChartData: [ |
| | | { |
| | | label: 'æ¬æä¸ä¿è®¡å', |
| | | value: 299, |
| | | background: '#719D8E' |
| | | name: '2640221', |
| | | value: 20 |
| | | }, |
| | | { |
| | | label: 'æ¬æå®æ', |
| | | value: 229, |
| | | background: '#409EFF' |
| | | name: '2640222', |
| | | value: 40 |
| | | }, |
| | | { |
| | | label: '䏿ä¸ä¿è®¡å', |
| | | value: 319, |
| | | background: '#A8985D' |
| | | name: '2640223', |
| | | value: 70 |
| | | }, |
| | | { |
| | | label: 'ä¸ä¸æä¸ä¿è®¡å', |
| | | value: 329, |
| | | background: '#58D9F9' |
| | | name: '2640224', |
| | | value: 30 |
| | | }, |
| | | { |
| | | name: '2640225', |
| | | value: 35 |
| | | }, |
| | | { |
| | | name: '2640226', |
| | | value: 80 |
| | | }, |
| | | { |
| | | name: '2640227', |
| | | value: 40 |
| | | }, |
| | | { |
| | | name: '12640220', |
| | | value: 60 |
| | | }, |
| | | { |
| | | name: '12640221', |
| | | value: 40 |
| | | }, |
| | | { |
| | | name: '12640222', |
| | | value: 35 |
| | | } |
| | | ], |
| | | maintenanceConfig: {}, |
| | | problemConfig: {} |
| | | equipmentId: '' |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | activated() { |
| | | console.log('触åactivated') |
| | | this.handleWindowResize() |
| | | if (this.barChartCarouselTime) clearInterval(this.barChartCarouselTime) |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleWindowResize) |
| | | if (this.barChartCarouselTime) clearInterval(this.barChartCarouselTime) |
| | | }, |
| | | methods: { |
| | | backToLastSignage() { |
| | | console.log('触åä¸ä¸çº§') |
| | | }, |
| | | |
| | | getChartDataByApi() { |
| | | this.getTechConditionDataByApi() |
| | | this.getWarrantyMalfunctionDataByApi() |
| | | this.getRunningStateDataByApi() |
| | | this.getMonthMaintenanceNumByApi() |
| | | this.getBarChartDataByApi() |
| | | this.getDoubleBarChartDataByApi() |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åææ¯ç¶æ */ |
| | |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤OEEç»è®¡ */ |
| | | getBarChartDataByApi() { |
| | | signageApi.getEquipmentOEEStatistics(this.productionCode) |
| | | .then(res => { |
| | | if (res.success) this.barChartData = res.result |
| | | this.drawBarChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤OEEåå©ç¨çå¯¹æ¯ */ |
| | | getDoubleBarChartDataByApi() { |
| | | signageApi.getEquipmentMonthStatisticsApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success) this.doubleBarChartData = res.result |
| | | this.drawDoubleBarChart() |
| | | }) |
| | | }, |
| | | |
| | | /* ç»å¶å¾è¡¨æ±æ»æ¹æ³ */ |
| | | drawCharts() { |
| | | this.drawRunningStateChart() |
| | | this.drawTechConditionChart() |
| | | this.drawWarrantyMalfunctionChart() |
| | | this.drawLineChart() |
| | | this.drawGaugeChart() |
| | | this.drawBarChart() |
| | | this.drawDoubleBarChart() |
| | | this.drawProblemChart() |
| | | }, |
| | | |
| | | /* ç»å¶ææ¯ç¶æé¥¼å¾ */ |
| | |
| | | { |
| | | type: 'pie', |
| | | // selectedMode: "single", |
| | | radius: ['30%', '50%'], |
| | | radius: ['40%', '60%'], |
| | | center: ['50%', '50%'], |
| | | color: [ |
| | | '#0AA012', |
| | |
| | | { |
| | | type: 'pie', |
| | | // selectedMode: "single", |
| | | radius: ['30%', '50%'], |
| | | radius: ['40%', '60%'], |
| | | center: ['50%', '50%'], |
| | | color: [ |
| | | '#00CED1', |
| | |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | roseType: 'angle', // ç«ç°å¾ |
| | | // roseType: 'angle', // ç«ç°å¾ |
| | | // selectedMode: "single", |
| | | radius: ['30%', '70%'], |
| | | radius: ['35%', '55%'], |
| | | center: ['50%', '50%'], |
| | | color: [ |
| | | '#686869', |
| | |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | fontSize: 30, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 10, |
| | | length: 10 |
| | | length2: 20, |
| | | length: 30 |
| | | }, |
| | | data: this.runningStateData |
| | | } |
| | |
| | | drawLineChart() { |
| | | this.lineChart = this.$echarts.init(document.getElementById('line_chart')) |
| | | const newData = { |
| | | xAxis: ['2640221', '2640223', '2640224', '2640225', '2640226', '2640227', '2640228', '2640229', '12640220', '12640221', '12640222'], |
| | | xAxis: ['3æ19æ¥', '3æ20æ¥', '3æ21æ¥', '3æ22æ¥', '3æ23æ¥', '3æ24æ¥', '3æ25æ¥'], |
| | | yAxis: [ |
| | | { |
| | | name: 'å©ç¨ç', |
| | | value: [20, 60, 55, 36, 52, 52, 63, 78, 23, 42, 65] |
| | | value: [200, 600, 550, 360, 520, 520, 630, 780, 230, 420, 650, 700] |
| | | }, |
| | | { |
| | | name: 'å¼å¨ç', |
| | | value: [23, 63, 44, 40, 74, 80, 60, 90, 70, 40, 70] |
| | | value: [230, 630, 440, 400, 740, 800, 600, 900, 700, 400, 700, 400] |
| | | }, |
| | | { |
| | | name: '弿ºç', |
| | | value: [90, 70, 40, 70, 80, 65, 73, 60, 70, 90, 40] |
| | | value: [900, 700, 400, 700, 800, 605, 730, 600, 700, 900, 400, 605] |
| | | } |
| | | ], |
| | | yAxisName: 'å7天å©ç¨ç' |
| | |
| | | data: item1.value // æçº¿å¾çæ°æ® |
| | | } |
| | | }) |
| | | |
| | | const option = { |
| | | grid: { |
| | | containLabel: true, |
| | |
| | | data: legendData, |
| | | itemGap: 10, |
| | | textStyle: { |
| | | fontSize: 16, |
| | | fontSize: 14, |
| | | color: '#ccc' |
| | | } |
| | | }, |
| | |
| | | triggerEvent: true, |
| | | data: newData.xAxis || [], |
| | | axisLabel: { |
| | | interval: 1, |
| | | interval: 0, |
| | | show: true, |
| | | fontSize: 12, |
| | | color: '#50729A', |
| | | color: '#50729A' |
| | | // rotate: -30, |
| | | }, |
| | | axisLine: { |
| | |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | alignWithLabel:true, |
| | | alignWithLabel: true |
| | | } |
| | | }, |
| | | yAxis: [ |
| | |
| | | fontSize: 18, |
| | | padding: [0, 0, 0, 80] |
| | | }, |
| | | nameGap: 30, |
| | | type: 'value', |
| | | position: 'left', |
| | | axisLine: { |
| | |
| | | splitNumber: 5, |
| | | axisLabel: { |
| | | show: true, |
| | | fontSize: 16, |
| | | color: '#50729A' |
| | | }, |
| | | axisLine: { |
| | |
| | | } |
| | | } |
| | | ], |
| | | series: seriesData |
| | | series: seriesData, |
| | | // dataZoom: { |
| | | // show: false, |
| | | // startValue: 0, // ä»å¤´å¼å§ã |
| | | // endValue: 5 // 䏿¬¡æ§å±ç¤ºå 个 |
| | | // } |
| | | } |
| | | this.lineChart.setOption(option, true) |
| | | // if (newData.xAxis.length <= 6) return |
| | | // this.lineChartCarouselTime = setInterval(() => { |
| | | // this.barChartData.push(this.barChartData.shift()) |
| | | // newData.xAxis.push(newData.xAxis.shift()) |
| | | // newData.yAxis.forEach(item => item.value.push(item.value.shift())) |
| | | // this.$nextTick(() => { |
| | | // this.lineChart.setOption(option, true) |
| | | // }) |
| | | // }, 3000) |
| | | }, |
| | | |
| | | /* ç»å¶ä»ªè¡¨çå¾è¡¨ */ |
| | | drawGaugeChart() { |
| | | const option = { |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: '', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC', |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | grid: { |
| | | left: '1%', |
| | | top: '1%', |
| | | right: '10%', |
| | | bottom: '1%' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'å©ç¨ç', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | center: ['50%', '60%'], // é»è®¤å
¨å±å±
ä¸ |
| | | pointer: { |
| | | width: 6, |
| | | length: '50%', |
| | | itemStyle: { |
| | | color: 'inherit' |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: true, |
| | | length: 10, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 2 |
| | | } |
| | | }, |
| | | axisTick: { |
| | | length: 5, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false, |
| | | fontSize: 18, |
| | | formatter: function(value) { |
| | | return value + '%' |
| | | } |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { // 屿§lineStyleæ§å¶çº¿æ¡æ ·å¼ |
| | | color: [ //表çé¢è² |
| | | [0.3, '#E7781E'],//0-30%å¤çé¢è² |
| | | [0.7, '#C5C039'],//30%-60%å¤çé¢è² |
| | | [1, '#21C77F']//90%-100%å¤çé¢è² |
| | | ], |
| | | width: 15//表ç宽度 |
| | | } |
| | | }, |
| | | detail: { |
| | | formatter: '{score|{value}%}', |
| | | offsetCenter: [0, '50%'], |
| | | height: 30, |
| | | rich: { |
| | | score: { |
| | | fontSize: 20 |
| | | } |
| | | } |
| | | }, |
| | | data: [{ value: 100 }] |
| | | } |
| | | ] |
| | | } |
| | | this.drawGaugeChart1(option) |
| | | this.drawGaugeChart2(option) |
| | | this.drawGaugeChart3(option) |
| | | this.drawGaugeChart4(option) |
| | | }, |
| | | |
| | | /* ç»å¶å©ç¨ç仪表çå¾è¡¨ */ |
| | | drawGaugeChart1(opt) { |
| | | this.gaugeChart1 = this.$echarts.init(document.getElementById('gauge_chart1')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = 'å©ç¨ç' |
| | | this.gaugeChart1.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶å¼å¨ç仪表çå¾è¡¨ */ |
| | | drawGaugeChart2(opt) { |
| | | this.gaugeChart2 = this.$echarts.init(document.getElementById('gauge_chart2')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = 'å¼å¨ç' |
| | | this.gaugeChart2.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶å¼æºç仪表çå¾è¡¨ */ |
| | | drawGaugeChart3(opt) { |
| | | this.gaugeChart3 = this.$echarts.init(document.getElementById('gauge_chart3')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = '弿ºç' |
| | | this.gaugeChart3.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶OEE仪表çå¾è¡¨ */ |
| | | drawGaugeChart4(opt) { |
| | | this.gaugeChart4 = this.$echarts.init(document.getElementById('gauge_chart4')) |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = 'OEE' |
| | | this.gaugeChart4.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶åæ±å¾ */ |
| | | drawBarChart() { |
| | | this.barChart = this.$echarts.init(document.getElementById('bar_chart')) |
| | | const xAisData = this.barChartData.map(item => item.name) |
| | | const option = { |
| | | height: 260, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: 'ä¸ä¸ªæOEE', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC', |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | |
| | | }, |
| | | grid: { |
| | | top: '15%', |
| | | left: '10%' |
| | | left: '6%', |
| | | right: '3%' |
| | | }, |
| | | xAxis: [{ |
| | | name: 'OEE车é´', |
| | | nameLocation: 'middle', |
| | | nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | xAxis: [ |
| | | { |
| | | // name: 'ä¸ä¸ªæOEE', |
| | | // nameLocation: 'middle', |
| | | // nameGap: 40, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | type: 'category', |
| | | data: this.barChartData.map(item => item.name), |
| | | data: xAisData, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#FFFFFF' |
| | | color: '#50729A' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | margin: 10, |
| | | color: '#e2e9ff', |
| | | textStyle: { |
| | | fontSize: 12 |
| | | } |
| | | show: true, // æ¯å¦æ¾ç¤ºå»åº¦æ ç¾ï¼é»è®¤æ¾ç¤º |
| | | interval: 0, // åæ è½´å»åº¦æ ç¾çæ¾ç¤ºé´éï¼å¨ç±»ç®è½´ä¸ææï¼é»è®¤ä¼éç¨æ ç¾ä¸éå ççç¥é´éæ¾ç¤ºæ ç¾ï¼å¯ä»¥è®¾ç½®æ0å¼ºå¶æ¾ç¤ºæææ ç¾ï¼å¦æè®¾ç½®ä¸º1ï¼è¡¨ç¤ºãéä¸ä¸ªæ ç¾æ¾ç¤ºä¸ä¸ªæ ç¾ãï¼å¦æå¼ä¸º2ï¼è¡¨ç¤ºé两个æ ç¾æ¾ç¤ºä¸ä¸ªæ ç¾ï¼ä»¥æ¤ç±»æ¨ã |
| | | // rotate: this.barChartData.length >= 5 ? -30 : 0, // å»åº¦æ ç¾æè½¬çè§åº¦ï¼å¨ç±»ç®è½´çç±»ç®æ ç¾æ¾ç¤ºä¸ä¸çæ¶åå¯ä»¥éè¿æè½¬é²æ¢æ ç¾ä¹é´éå ï¼æè½¬çè§åº¦ä»-90度å°90度 |
| | | inside: false, // å»åº¦æ ç¾æ¯å¦æå
ï¼é»è®¤æå¤ |
| | | margin: 6 // å»åº¦æ ç¾ä¸è½´çº¿ä¹é´çè·ç¦» |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | show: true, |
| | | alignWithLabel: true |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | name: 'æ°é', |
| | | nameLocation: 'middle', |
| | | nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | yAxis: [ |
| | | { |
| | | // name: 'æ°é', |
| | | // nameLocation: 'middle', |
| | | // nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | position: 'left', |
| | | axisLabel: { |
| | | formatter: '{value}', |
| | | color: '#e2e9ff' |
| | | color: '#50729A' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false, |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#FFFFFF' |
| | | color: '#50729A' |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: 'rgba(255,255,255,0.12)' |
| | | } |
| | | } |
| | | }], |
| | | }, |
| | | { |
| | | position: 'right', |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#50729A' |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | series: [{ |
| | | type: 'bar', |
| | | data: this.barChartData, |
| | | barWidth: '15%', |
| | | barWidth: '25%', |
| | | itemStyle: { |
| | | color: '#7DB17F' |
| | | color: '#129FC6', |
| | | barBorderRadius: [10, 10, 10, 10] |
| | | }, |
| | | label: { |
| | | show: true, |
| | | show: false, |
| | | lineHeight: 10, |
| | | formatter: params => { |
| | | if (+params.value === 0) return '' |
| | |
| | | }, |
| | | position: 'inside', |
| | | textStyle: { |
| | | color: '#fff', |
| | | color: '#50729A', |
| | | fontSize: 18 |
| | | } |
| | | } |
| | | }] |
| | | } |
| | | this.barChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶åæ±å¾ */ |
| | | drawDoubleBarChart() { |
| | | this.doubleBarChart = this.$echarts.init(document.getElementById('double_bar_chart')) |
| | | const option = { |
| | | color: ['#4992FF', '#4DC0B1'], |
| | | tooltip: { |
| | | confine: true, |
| | | formatter: function(params) { |
| | | return '<span style="font-weight:bolder;">' + params.name + '</span><br/>' + |
| | | '<span style="display:inline-block; width:10px; height:10px; border-radius:100px; margin-right:5px; background:' + params.color + '"></span>' + params.seriesName + ' : ' + params.value + '%' |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '5%', |
| | | right: '4%', |
| | | bottom: '10%', |
| | | top: '20%', |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | icon: 'roundRect', |
| | | orient: 'horizontal', |
| | | left: 'center', |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | formatter: ['{a|{name}}'].join('\n'), |
| | | textStyle: { |
| | | fontSize: 14, |
| | | color: '#6A93B9', |
| | | height: 8, |
| | | rich: { |
| | | a: { |
| | | verticalAlign: 'bottom' |
| | | } |
| | | } |
| | | }, |
| | | data: ['OEE', 'å©ç¨ç'] |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: this.doubleBarChartData.dateList, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'rgba(255,255,255,0.45)' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | fontSize: 12, |
| | | color: '#6A93B9' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }, |
| | | yAxis: [{ |
| | | name: '%', |
| | | type: 'value', |
| | | min: 0, |
| | | minInterval: 1, |
| | | splitArea: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'rgba(255, 255, 255, 0.15)' |
| | | // type: 'dashed', // dotted è线 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | fontSize: 12, |
| | | color: '#6A93B9', |
| | | fontFamily: 'Bebas' |
| | | } |
| | | }, { |
| | | type: 'value', |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | fontSize: 12, |
| | | formatter: '{value}%', // å³ä¾§Yè½´æåæ¾ç¤º |
| | | fontFamily: 'Bebas', |
| | | color: '#6A93B9' |
| | | }, |
| | | splitArea: { |
| | | show: false |
| | | } |
| | | }], |
| | | series: [{ |
| | | type: 'bar', |
| | | barWidth: 15, |
| | | itemStyle: { barBorderRadius: [3, 3, 0, 0] }, |
| | | name: 'OEE', |
| | | data: this.doubleBarChartData.oeeList, |
| | | label: { |
| | | show: true, |
| | | lineHeight: 10, |
| | | formatter: params => { |
| | | if (+params.value === 0) return '' |
| | | else return params.value |
| | | }, |
| | | position: 'inside', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 12 |
| | | dataZoom: { |
| | | show: false, |
| | | startValue: 0, // ä»å¤´å¼å§ã |
| | | endValue: 5 // 䏿¬¡æ§å±ç¤ºå 个 |
| | | } |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | barWidth: 15, |
| | | itemStyle: { barBorderRadius: [3, 3, 0, 0] }, |
| | | name: 'å©ç¨ç', |
| | | data: this.doubleBarChartData.utilizationList, |
| | | label: { |
| | | show: true, |
| | | lineHeight: 10, |
| | | formatter: params => { |
| | | if (+params.value === 0) return '' |
| | | else return params.value |
| | | }, |
| | | position: 'inside', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 12 |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | this.doubleBarChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶é®é¢æ»å¨è¡¨ */ |
| | | drawProblemChart() { |
| | | this.problemConfig = { |
| | | indexHeader: 'åºå·', |
| | | header: ['æ¶é´', 'é®é¢å
容'], |
| | | headerBGC: '#83B883', |
| | | oddRowBGC: '#556955', |
| | | evenRowBGC: '#556955', |
| | | data: [], |
| | | index: true, |
| | | columnWidth: [100, 300, 300], |
| | | align: ['center'] |
| | | } |
| | | option.title.text = `${moment().subtract(1, 'months').format('M')}æOEE` |
| | | this.barChart.setOption(option, true) |
| | | if (this.barChartData.length <= 6) return |
| | | this.barChartCarouselTime = setInterval(() => { |
| | | this.barChartData.push(this.barChartData.shift()) |
| | | xAisData.push(xAisData.shift()) |
| | | this.$nextTick(() => { |
| | | this.barChart.setOption(option, true) |
| | | }) |
| | | }, 3000) |
| | | }, |
| | | |
| | | /** |
| | |
| | | * è°æ´å¾è¡¨å°ºå¯¸ä»¥éåºå辨ç |
| | | */ |
| | | handleWindowResize() { |
| | | if (this.runningStateChart) this.runningStateChart.resize() |
| | | if (this.efficiencyChart) this.efficiencyChart.resize() |
| | | if (this.techConditionChart) this.techConditionChart.resize() |
| | | if (this.warrantyMalfunctionChart) this.warrantyMalfunctionChart.resize() |
| | | if (this.runningStateChart) this.runningStateChart.resize() |
| | | if (this.lineChart) this.lineChart.resize() |
| | | if (this.gaugeChart1) this.gaugeChart1.resize() |
| | | if (this.gaugeChart2) this.gaugeChart2.resize() |
| | | if (this.gaugeChart3) this.gaugeChart3.resize() |
| | | if (this.gaugeChart4) this.gaugeChart4.resize() |
| | | if (this.barChart) this.barChart.resize() |
| | | if (this.doubleBarChart) this.doubleBarChart.resize() |
| | | } |
| | | } |
| | | } |
| | |
| | | justify-content: space-between; |
| | | |
| | | .left-col { |
| | | .back-nav { |
| | | width: 100px; |
| | | height: 30px; |
| | | color: #eee; |
| | | position: absolute; |
| | | top: 50px; |
| | | left: 10px; |
| | | cursor: pointer; |
| | | z-index: 9999 |
| | | } |
| | | |
| | | .support-plan-container { |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | } |
| | | } |
| | | |
| | | /deep/ .dv-scroll-board .header { |
| | | height: 35px; |
| | | /deep/ .ant-form.ant-form-inline { |
| | | text-align: center; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | /deep/ .ant-form .ant-form-item-label label { |
| | | color: #fff; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | /deep/ .ant-select-selection { |
| | | background: transparent !important; |
| | | } |
| | | |
| | | /deep/ .ant-select-selection__clear { |
| | | background: transparent !important; |
| | | color: #fff; |
| | | } |
| | | |
| | | /deep/ .ant-input { |
| | | border: 1px solid #689ACA; |
| | | color: #fff; |
| | | background: transparent !important; |
| | | } |
| | | </style> |
| | |
| | | placeholder="è¯·éæ©è®¾å¤" :disabled="!model.selectedProduction"/> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="é¦é¡µæé" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-radio-group v-model="model.userType" :defaultValue="1"> |
| | | <a-radio :value="4">å
¬å¸çº§</a-radio> |
| | | <a-radio :value="3">车é´çº§</a-radio> |
| | | <a-radio :value="2">工段级</a-radio> |
| | | <a-radio :value="1">æä½å·¥</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item |
| | | label="çç»åé
" |
| | | :labelCol="labelCol" |
| | |
| | | </j-multi-select-tag> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item |
| | | label="头å" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-image-upload |
| | | class="avatar-uploader" |
| | | text="ä¸ä¼ " |
| | | v-model="model.avatar" |
| | | ></j-image-upload> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--label="头å"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!-->--> |
| | | <!--<j-image-upload--> |
| | | <!--class="avatar-uploader"--> |
| | | <!--text="ä¸ä¼ "--> |
| | | <!--v-model="model.avatar"--> |
| | | <!--></j-image-upload>--> |
| | | <!--</a-form-model-item>--> |
| | | |
| | | <a-form-model-item |
| | | label="çæ¥" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-date-picker |
| | | style="width: 100%" |
| | | placeholder="è¯·éæ©çæ¥" |
| | | v-model="model.birthday" |
| | | :format="dateFormat" |
| | | :getCalendarContainer="node => node.parentNode" |
| | | /> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--label="çæ¥"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!-->--> |
| | | <!--<a-date-picker--> |
| | | <!--style="width: 100%"--> |
| | | <!--placeholder="è¯·éæ©çæ¥"--> |
| | | <!--v-model="model.birthday"--> |
| | | <!--:format="dateFormat"--> |
| | | <!--:getCalendarContainer="node => node.parentNode"--> |
| | | <!--/>--> |
| | | <!--</a-form-model-item>--> |
| | | |
| | | <a-form-model-item |
| | | label="æ§å«" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-select |
| | | v-model="model.sex" |
| | | placeholder="è¯·éæ©æ§å«" |
| | | :getPopupContainer="(target) => target.parentNode" |
| | | > |
| | | <a-select-option :value="1">ç·</a-select-option> |
| | | <a-select-option :value="2">女</a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--label="æ§å«"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!-->--> |
| | | <!--<a-select--> |
| | | <!--v-model="model.sex"--> |
| | | <!--placeholder="è¯·éæ©æ§å«"--> |
| | | <!--:getPopupContainer="(target) => target.parentNode"--> |
| | | <!-->--> |
| | | <!--<a-select-option :value="1">ç·</a-select-option>--> |
| | | <!--<a-select-option :value="2">女</a-select-option>--> |
| | | <!--</a-select>--> |
| | | <!--</a-form-model-item>--> |
| | | |
| | | <a-form-model-item |
| | | label="é®ç®±" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="email" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥é®ç®±" |
| | | v-model="model.email" |
| | | /> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--label="é®ç®±"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--prop="email"--> |
| | | <!-->--> |
| | | <!--<a-input--> |
| | | <!--placeholder="请è¾å
¥é®ç®±"--> |
| | | <!--v-model="model.email"--> |
| | | <!--/>--> |
| | | <!--</a-form-model-item>--> |
| | | |
| | | <a-form-model-item |
| | | label="ææºå·ç " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="phone" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥ææºå·ç " |
| | | v-model="model.phone" |
| | | /> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--label="ææºå·ç "--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--prop="phone"--> |
| | | <!-->--> |
| | | <!--<a-input--> |
| | | <!--placeholder="请è¾å
¥ææºå·ç "--> |
| | | <!--v-model="model.phone"--> |
| | | <!--/>--> |
| | | <!--</a-form-model-item>--> |
| | | |
| | | <a-form-model-item |
| | | label="座æº" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="telephone" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥åº§æº" |
| | | v-model="model.telephone" |
| | | /> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-radio-group v-model="model.userType"> |
| | | <a-radio :value="1">æ®éç¨æ·</a-radio> |
| | | <a-radio :value="2">工段主管</a-radio> |
| | | <a-radio :value="3">车é´ä¸»ç®¡</a-radio> |
| | | <a-radio :value="4">å
¬å¸ä¸»ç®¡</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--label="座æº"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--prop="telephone"--> |
| | | <!-->--> |
| | | <!--<a-input--> |
| | | <!--placeholder="请è¾å
¥åº§æº"--> |
| | | <!--v-model="model.telephone"--> |
| | | <!--/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item label="工使µå¼æ" :labelCol="labelCol" :wrapperCol="wrapperCol">--> |
| | | <!--<j-dict-select-tag v-model="model.activitiSync" placeholder="è¯·éæ©æ¯å¦åæ¥å·¥ä½æµå¼æ" :type="'radio'" dictCode="activiti_sync"/>--> |
| | | <!--</a-form-model-item>--> |
| | |
| | | this.refresh() |
| | | this.edit({ |
| | | activitiSync: '1', |
| | | userType: 1, |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |