¶Ô±ÈÐÂÎļþ |
| | |
| | | import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | // æ ¹æ®ç¨æ·IDè·åç¨æ·ä¿¡æ¯ |
| | | getUserByIdApi: id => getAction('sys/api/getUserById', { id }), |
| | | // 设å¤è¿è¡ç¶æ |
| | | getEquipmentStatusStatisticsApi: productionCode => getAction('/mdc/home/equipmentStatusStatistics', { productionCode }), |
| | | // 设å¤å©ç¨ç |
| | | getEquipmentUtilizationStatisticsApi: productionCode => getAction('/mdc/home/equipmentUtilizationStatistics', { productionCode }), |
| | | // ææ¯ç¶æ |
| | | getEquipmentTechnologyStatusListApi: productionCode => getAction('/eam/calibrationOrder/getEquipmentTechnologyStatusList', { productionCode }), |
| | | // è®¾å¤æ¥ä¿®æ
é |
| | | getReportRepairEquipmentListApi: productionCode => getAction('/eam/calibrationOrder/getReportRepairEquipmentList', { productionCode }), |
| | | // æ¬æä¸ä¿è®¡å |
| | | getThisMonthMaintenanceListApi: productionCode => getAction('/eam/calibrationOrder/getThisMonthMaintenanceList', { productionCode }), |
| | | // æ¬æå®æä¸ä¿è®¡å |
| | | getThisMonthMaintenanceFinishListApi: productionCode => getAction('/eam/calibrationOrder/getThisMonthMaintenanceFinishList', { productionCode }), |
| | | // 䏿ä¸ä¿è®¡å |
| | | getNextMonthMaintenanceList: productionCode => getAction('/eam/calibrationOrder/getNextMonthMaintenanceList', { productionCode }), |
| | | // ä¸ä¸æä¸ä¿è®¡å |
| | | getNextNextMonthMaintenanceListApi: productionCode => getAction('/eam/calibrationOrder/getNextNextMonthMaintenanceList', { productionCode }), |
| | | // äºä¿è®¡å |
| | | getTwoMaintenancePlanListApi: productionCode => getAction('/eam/calibrationOrder/getTwoMaintenancePlanList', { productionCode }), |
| | | // 设å¤OEEç»è®¡ |
| | | getEquipmentOEEStatistics: productionCode => getAction('/mdc/home/equipmentOEEStatistics', { productionCode }), |
| | | // 设å¤OEEåå©ç¨çå¯¹æ¯ |
| | | getEquipmentMonthStatisticsApi: productionCode => getAction('/mdc/home/equipmentMonthStatistics', { productionCode }) |
| | | } |
| | |
| | | <contextmenu :itemList="menuItemList" :visible.sync="menuVisible" style="z-index: 9999;" @select="onMenuSelect"/> |
| | | <!-- update-end- author:sunjianlei --- date:20191009 --- for: æåå³é®èåçå±çº§ --> |
| | | <a-tabs |
| | | v-if="$route.meta.title!=='é¦é¡µ'&&multipage" |
| | | @contextmenu.native="e => onContextmenu(e)" |
| | | v-if="multipage" |
| | | :active-key="activePage" |
| | | class="tab-layout-tabs" |
| | | style="height:52px" |
| | |
| | | @change="changePage" |
| | | @tabClick="tabCallBack" |
| | | @edit="editPage"> |
| | | <a-tab-pane :id="page.fullPath" :key="page.fullPath" v-for="page in pageList" :closable="!(page.meta.title=='é¦é¡µ')"> |
| | | <a-tab-pane :id="page.fullPath" :key="page.fullPath" v-for="page in pageList" |
| | | :closable="!(page.meta.title=='é¦é¡µ')"> |
| | | <span slot="tab" :pagekey="page.fullPath">{{ page.meta.title }}</span> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <div style="margin: 12px 12px 0;"> |
| | | <div> |
| | | <!-- update-begin-author:taoyan date:20201221 for:æ¤å¤å ætransitionæ ç¾ ä¸ç¥é为ä»ä¹å ä¸å 页é¢è·¯ç±åæ¢çæ¶åå³1åèååå°2åèåçæ¶å 两个èå页é¢ä¼åæ¶åºç°300-500ç§å·¦å³ --> |
| | | <keep-alive v-if="multipage"> |
| | | <router-view v-if="reloadFlag"/> |
| | |
| | | { key: '2', icon: 'arrow-right', text: 'å
³éå³ä¾§' }, |
| | | { key: '3', icon: 'close', text: 'å
³éå
¶å®' } |
| | | ], |
| | | reloadFlag:true |
| | | reloadFlag: true |
| | | } |
| | | }, |
| | | /* update_begin author:wuxianquan date:20190828 for: å
³éå½åtab页ï¼ä¾å页é¢è°ç¨ ->æèåè½é
ç½®å¤é¾ï¼ç´æ¥å¼¹åºæ°é¡µé¢è䏿¯åµå
¥iframe #428 */ |
| | | provide(){ |
| | | return{ |
| | | closeCurrent:this.closeCurrent |
| | | provide() { |
| | | return { |
| | | closeCurrent: this.closeCurrent |
| | | } |
| | | }, |
| | | /* update_end author:wuxianquan date:20190828 for: å
³éå½åtab页ï¼ä¾å页é¢è°ç¨->æèåè½é
ç½®å¤é¾ï¼ç´æ¥å¼¹åºæ°é¡µé¢è䏿¯åµå
¥iframe #428 */ |
| | |
| | | this.activePage = newRoute.fullPath |
| | | if (!this.multipage) { |
| | | this.linkList = [newRoute.fullPath] |
| | | this.pageList = [Object.assign({},newRoute)] |
| | | // update-begin-author:taoyan date:20200211 for: TASK #3368 ãè·¯ç±ç¼åãé¦é¡µçç¼å设置æé®é¢ï¼éè¦æ ¹æ®åå°çè·¯ç±é
ç½®æ¥å®ç°æ¯å¦ç¼å |
| | | } else if(indexKey==newRoute.fullPath) { |
| | | this.pageList = [Object.assign({}, newRoute)] |
| | | // update-begin-author:taoyan date:20200211 for: TASK #3368 ãè·¯ç±ç¼åãé¦é¡µçç¼å设置æé®é¢ï¼éè¦æ ¹æ®åå°çè·¯ç±é
ç½®æ¥å®ç°æ¯å¦ç¼å |
| | | } else if (indexKey == newRoute.fullPath) { |
| | | //é¦é¡µæ¶ 夿æ¯å¦ç¼å 没æç¼å å·æ°ä¹ |
| | | if (newRoute.meta.keepAlive === false) { |
| | | this.routeReload() |
| | | } |
| | | // update-end-author:taoyan date:20200211 for: TASK #3368 ãè·¯ç±ç¼åãé¦é¡µçç¼å设置æé®é¢ï¼éè¦æ ¹æ®åå°çè·¯ç±é
ç½®æ¥å®ç°æ¯å¦ç¼å |
| | | }else if (this.linkList.indexOf(newRoute.fullPath) < 0) { |
| | | // update-end-author:taoyan date:20200211 for: TASK #3368 ãè·¯ç±ç¼åãé¦é¡µçç¼å设置æé®é¢ï¼éè¦æ ¹æ®åå°çè·¯ç±é
ç½®æ¥å®ç°æ¯å¦ç¼å |
| | | } else if (this.linkList.indexOf(newRoute.fullPath) < 0) { |
| | | this.linkList.push(newRoute.fullPath) |
| | | this.pageList.push(Object.assign({},newRoute)) |
| | | this.pageList.push(Object.assign({}, newRoute)) |
| | | //// update-begin-author:sunjianlei date:20200103 for: 妿æ°å¢ç页é¢é
ç½®äºç¼åè·¯ç±ï¼é£ä¹å°±å¼ºå¶å·æ°ä¸é #842 |
| | | // if (newRoute.meta.keepAlive) { |
| | | // this.routeReload() |
| | |
| | | } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) { |
| | | let oldIndex = this.linkList.indexOf(newRoute.fullPath) |
| | | let oldPositionRoute = this.pageList[oldIndex] |
| | | this.pageList.splice(oldIndex, 1, Object.assign({},newRoute,{meta:oldPositionRoute.meta})) |
| | | this.pageList.splice(oldIndex, 1, Object.assign({}, newRoute, { meta: oldPositionRoute.meta })) |
| | | } |
| | | }, |
| | | 'activePage': function(key) { |
| | |
| | | this.changeTitle(waitRouter.meta.title) |
| | | }, |
| | | 'multipage': function(newVal) { |
| | | if(this.reloadFlag){ |
| | | if (this.reloadFlag) { |
| | | if (!newVal) { |
| | | this.linkList = [this.$route.fullPath] |
| | | this.pageList = [this.$route] |
| | |
| | | if (this.multipage && this.linkList.indexOf(indexKey) === -1) { |
| | | this.addIndexToFirst() |
| | | } |
| | | }, |
| | | } |
| | | // update-end-author:sunjianlei date:20191223 for: ä¿®å¤ä»å页模å¼åæ¢åå¤é¡µæ¨¡å¼åé¦é¡µä¸å±
第ä¸ä½ç BUG |
| | | }, |
| | | methods: { |
| | |
| | | |
| | | // update-begin-author:sunjianlei date:20200120 for: å¨ææ´æ¹é¡µé¢æ é¢ |
| | | changeTitle(title) { |
| | | let projectTitle = "MDCæºæ
§è½¦é´" |
| | | let projectTitle = 'MDCæºæ
§è½¦é´' |
| | | // é¦é¡µç¹æ®å¤ç |
| | | if (this.$route.path === indexKey) { |
| | | document.title = projectTitle |
| | |
| | | tabCallBack() { |
| | | this.$nextTick(() => { |
| | | //update-begin-author:taoyan date: 20201211 for:ãæ°çãonlineæ¥é JT-100 |
| | | setTimeout(()=>{ |
| | | //çå¸åºç»ä»¶éé¢ç»windowç»å®äºä¸ªresizeäºä»¶ 导è´åæ¢é¡µé¢çæ¶å触åäºä»çresizeï¼ä½æ¯åæ¢é¡µé¢ï¼çå¸åºç»ä»¶è¿æ²¡è¢«éæ¯å就触åäºè¯¥äºä»¶ï¼å¯¼è´æ§å¶å°æ¥éï¼å ä¸ªå»¶è¿ |
| | | triggerWindowResizeEvent() |
| | | },20) |
| | | setTimeout(() => { |
| | | //çå¸åºç»ä»¶éé¢ç»windowç»å®äºä¸ªresizeäºä»¶ 导è´åæ¢é¡µé¢çæ¶å触åäºä»çresizeï¼ä½æ¯åæ¢é¡µé¢ï¼çå¸åºç»ä»¶è¿æ²¡è¢«éæ¯å就触åäºè¯¥äºä»¶ï¼å¯¼è´æ§å¶å°æ¥éï¼å ä¸ªå»¶è¿ |
| | | triggerWindowResizeEvent() |
| | | }, 20) |
| | | //update-end-author:taoyan date: 20201211 for:ãæ°çãonlineæ¥é JT-100 |
| | | }) |
| | | }, |
| | |
| | | this.$message.warning('è¿æ¯æåä¸é¡µï¼ä¸è½åå
³éäºå¦') |
| | | return |
| | | } |
| | | console.log("this.pageList ",this.pageList ); |
| | | console.log('this.pageList ', this.pageList) |
| | | let removeRoute = this.pageList.filter(item => item.fullPath == key) |
| | | this.pageList = this.pageList.filter(item => item.fullPath !== key) |
| | | let index = this.linkList.indexOf(key) |
| | |
| | | let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || [] |
| | | if (removeRoute && removeRoute[0]) { |
| | | let componentName = removeRoute[0].meta.componentName |
| | | console.log("key: ", key); |
| | | console.log("componentName: ", componentName); |
| | | if(cacheRouterArray.includes(componentName)){ |
| | | console.log('key: ', key) |
| | | console.log('componentName: ', componentName) |
| | | if (cacheRouterArray.includes(componentName)) { |
| | | cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1) |
| | | Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray) |
| | | } |
| | |
| | | } |
| | | }, |
| | | /* update_begin author:wuxianquan date:20190828 for: å
³éå½åtab页ï¼ä¾å页é¢è°ç¨->æèåè½é
ç½®å¤é¾ï¼ç´æ¥å¼¹åºæ°é¡µé¢è䏿¯åµå
¥iframe #428 */ |
| | | closeCurrent(){ |
| | | this.remove(this.activePage); |
| | | closeCurrent() { |
| | | this.remove(this.activePage) |
| | | }, |
| | | /* update_end author:wuxianquan date:20190828 for: å
³éå½åtab页ï¼ä¾å页é¢è°ç¨->æèåè½é
ç½®å¤é¾ï¼ç´æ¥å¼¹åºæ°é¡µé¢è䏿¯åµå
¥iframe #428 */ |
| | | closeOthers(pageKey) { |
| | | let index = this.linkList.indexOf(pageKey) |
| | | if (pageKey == indexKey || pageKey.indexOf('?ticke=')>=0) { |
| | | if (pageKey == indexKey || pageKey.indexOf('?ticke=') >= 0) { |
| | | this.linkList = this.linkList.slice(index, index + 1) |
| | | this.pageList = this.pageList.slice(index, index + 1) |
| | | this.activePage = this.linkList[0] |
| | |
| | | } |
| | | }, |
| | | //update-begin-author:taoyan date:20190430 for:å¨æè·¯ç±titleæ¾ç¤ºé
ç½®çèåtitleè䏿¯å
¶å¯¹åºè·¯ç±çtitle |
| | | dynamicRouterShow(key,title){ |
| | | dynamicRouterShow(key, title) { |
| | | let keyIndex = this.linkList.indexOf(key) |
| | | if(keyIndex>=0){ |
| | | if (keyIndex >= 0) { |
| | | let currRouter = this.pageList[keyIndex] |
| | | let meta = Object.assign({},currRouter.meta,{title:title}) |
| | | this.pageList.splice(keyIndex, 1, Object.assign({},currRouter,{meta:meta})) |
| | | let meta = Object.assign({}, currRouter.meta, { title: title }) |
| | | this.pageList.splice(keyIndex, 1, Object.assign({}, currRouter, { meta: meta })) |
| | | if (key === this.activePage) { |
| | | this.changeTitle(title) |
| | | } |
| | |
| | | //update-end-author:taoyan date:20190430 for:å¨æè·¯ç±titleæ¾ç¤ºé
ç½®çèåtitleè䏿¯å
¶å¯¹åºè·¯ç±çtitle |
| | | |
| | | //update-begin-author:taoyan date:20191008 for:è·¯ç±å·æ° |
| | | routeReload(){ |
| | | routeReload() { |
| | | this.reloadFlag = false |
| | | let ToggleMultipage = "ToggleMultipage" |
| | | this.$store.dispatch(ToggleMultipage,false) |
| | | this.$nextTick(()=>{ |
| | | this.$store.dispatch(ToggleMultipage,true) |
| | | let ToggleMultipage = 'ToggleMultipage' |
| | | this.$store.dispatch(ToggleMultipage, false) |
| | | this.$nextTick(() => { |
| | | this.$store.dispatch(ToggleMultipage, true) |
| | | this.reloadFlag = true |
| | | }) |
| | | }, |
| | | //update-end-author:taoyan date:20191008 for:è·¯ç±å·æ° |
| | | //æ°å¢ä¸ä¸ªè¿åæ¹æ³ |
| | | excuteCallback(callback){ |
| | | excuteCallback(callback) { |
| | | callback() |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | border-bottom: 1px solid transparent !important; |
| | | } |
| | | .ant-tabs-tab-active { |
| | | border-color: @primary-color!important; |
| | | border-color: @primary-color !important; |
| | | } |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div class="footer"> |
| | | <!--<div class="links">--> |
| | | <!--<a href="http://www.jeecg.com" target="_blank">JEECG é¦é¡µ</a>--> |
| | | <!--<a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">--> |
| | | <!--<a-icon type="github"/>--> |
| | | <!--</a>--> |
| | | <!--<a href="https://ant.design/">Ant Design</a>--> |
| | | <!--<a href="https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/">Vue Antd</a>--> |
| | | <!--<a href="http://www.jeecg.com" target="_blank">JEECG é¦é¡µ</a>--> |
| | | <!--<a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">--> |
| | | <!--<a-icon type="github"/>--> |
| | | <!--</a>--> |
| | | <!--<a href="https://ant.design/">Ant Design</a>--> |
| | | <!--<a href="https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/">Vue Antd</a>--> |
| | | <!--</div>--> |
| | | <div class="copyright"> |
| | | <div class="copyright" |
| | | :style="{background:$route.meta.title==='é¦é¡µ'?'#0F103A':'',color:$route.meta.title==='é¦é¡µ'?'#fff':''}"> |
| | | Copyright |
| | | <a-icon type="copyright"/> |
| | | 2019 <span>2015-2020 çµç§æºè½</span> |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | name: "LayoutFooter" |
| | | name: 'LayoutFooter' |
| | | } |
| | | </script> |
| | | |
| | |
| | | /> |
| | | |
| | | <!-- layout content --> |
| | | <a-layout-content :style="{ height: '100%', paddingTop: fixedHeader ? '59px' : '0' }"> |
| | | <a-layout-content |
| | | :style="{ height: '100%', paddingTop: fixedHeader ? '59px' : '0' ,background: $route.meta.title=='é¦é¡µ'?'#0F103A':''}"> |
| | | <slot></slot> |
| | | </a-layout-content> |
| | | |
| | |
| | | components: { |
| | | SideMenu, |
| | | GlobalHeader, |
| | | GlobalFooter, |
| | | GlobalFooter |
| | | // update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -ç¼è¯ä¸»é¢é¢è²å·²çæï¼ä½è¿ä¸ç´è½¬åï¼æ¾ç¤ºä¸»é¢ æ£å¨ç¼è¯ ------ |
| | | // // SettingDrawer |
| | | // 注éè¿ä¸ªå 为å¨ä¸ªäººè®¾ç½®æ¨¡åå·²ç»å è½½äºSettingDraweré¡µé¢ |
| | |
| | | data() { |
| | | return { |
| | | collapsed: false, |
| | | activeMenu:{}, |
| | | activeMenu: {}, |
| | | menus: [] |
| | | } |
| | | }, |
| | |
| | | this.menus = this.permissionMenuList |
| | | |
| | | //--update-begin----author:liusq---date:20210223------for:å
³äºæµè¾¹èå鮿¡å
容é®é¢è¯¦ç»è¯´æ #2255 |
| | | this.collapsed=!this.sidebarOpened; |
| | | this.collapsed = !this.sidebarOpened |
| | | //--update-begin----author:liusq---date:20210223------for:å
³äºæµè¾¹èå鮿¡å
容é®é¢è¯¦ç»è¯´æ #2255 |
| | | |
| | | // æ ¹æ®åå°é
ç½®èåï¼éæ°æåºå 载路ç±ä¿¡æ¯ |
| | |
| | | } |
| | | }, |
| | | //update-begin-author:taoyan date:20190430 for:å¨æè·¯ç±titleæ¾ç¤ºé
ç½®çèåtitleè䏿¯å
¶å¯¹åºè·¯ç±çtitle |
| | | myMenuSelect(value){ |
| | | myMenuSelect(value) { |
| | | //æ¤å¤è§¦åå¨æè·¯ç±è¢«ç¹å»äºä»¶ |
| | | this.findMenuBykey(this.menus,value.key) |
| | | this.$emit("dynamicRouterShow",value.key,this.activeMenu.meta.title) |
| | | this.findMenuBykey(this.menus, value.key) |
| | | this.$emit('dynamicRouterShow', value.key, this.activeMenu.meta.title) |
| | | }, |
| | | findMenuBykey(menus,key){ |
| | | for(let i of menus){ |
| | | if(i.path==key){ |
| | | this.activeMenu = {...i} |
| | | }else if(i.children && i.children.length>0){ |
| | | this.findMenuBykey(i.children,key) |
| | | findMenuBykey(menus, key) { |
| | | for (let i of menus) { |
| | | if (i.path == key) { |
| | | this.activeMenu = { ...i } |
| | | } else if (i.children && i.children.length > 0) { |
| | | this.findMenuBykey(i.children, key) |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.findMenuBykey(this.menus, value.path) |
| | | this.activeMenu.meta.title = value.meta.title |
| | | this.$emit('dynamicRouterShow', value.path, this.activeMenu.meta.title) |
| | | }, |
| | | } |
| | | // update-end-author:sunjianlei date:20210409 for: ä¿®å¤å¨æåè½æµè¯èåã另忰èåæ é¢é误ãå±å¼é误çé®é¢ |
| | | |
| | | } |
| | |
| | | <template> |
| | | <div class="page-container"> |
| | | <!--<index-chart v-if="indexStyle==1"></index-chart>--> |
| | | <!--<index-bdc v-if="indexStyle==2"></index-bdc>--> |
| | | <!--<index-task v-if="indexStyle==3"></index-task>--> |
| | | <!--<div style="width: 100%;text-align: right;margin-top: 20px">--> |
| | | <!--è¯·éæ©é¦é¡µæ ·å¼ï¼--> |
| | | <!--<!–<a-radio-group v-model="indexStyle">–>--> |
| | | <!--<!–<a-radio :value="1">ç»è®¡å¾è¡¨</a-radio>–>--> |
| | | <!--<!–<a-radio :value="2">ç»è®¡å¾è¡¨2</a-radio>–>--> |
| | | <!--<!–<a-radio :value="3">ä»»å¡è¡¨æ ¼</a-radio>–>--> |
| | | <!--<!–</a-radio-group>–>--> |
| | | <!--</div>--> |
| | | |
| | | <a-list |
| | | :grid="{ gutter: [{xs: 0, sm: 24, md: 24, lg: 56, xl: 64, xxl: 80},20], xs: 1, sm: 2, md: 2, lg: 3, xl: 4, xxl: 4 }" |
| | | :data-source="workshopList"> |
| | | <a-list-item slot="renderItem" slot-scope="item, index"> |
| | | <div class="workshop-name" @click="navigateToWorkshopSignage(item.id)">{{item.workshopName}}</div> |
| | | </a-list-item> |
| | | </a-list> |
| | | |
| | | </div> |
| | | <Component :is="currentSignage" :productionCode="productionCode" @switchToBranchFactory="switchToBranchFactory"> |
| | | <template #back_nav> |
| | | <dv-decoration-11 class="back-nav" v-if="userType===4"> |
| | | <div @click="backToLastSignage">è¿åä¸ä¸çº§</div> |
| | | </dv-decoration-11> |
| | | </template> |
| | | </Component> |
| | | </template> |
| | | |
| | | <script> |
| | | import IndexChart from './IndexChart' |
| | | import IndexTask from './IndexTask' |
| | | import IndexBdc from './IndexBdc' |
| | | import api from '@/api/mdc' |
| | | import signageApi from '@/api/signage' |
| | | import IndexSignage from './IndexSignage.vue' |
| | | import BranchFactorySignage from './BranchFactorySignage.vue' |
| | | |
| | | export default { |
| | | name: 'Analysis', |
| | | components: { |
| | | IndexChart, |
| | | IndexTask, |
| | | IndexBdc |
| | | IndexSignage, |
| | | BranchFactorySignage |
| | | }, |
| | | data() { |
| | | return { |
| | | indexStyle: 1, |
| | | workshopList: [] |
| | | currentSignage: '', |
| | | productionCode: '', |
| | | userType: '' |
| | | } |
| | | }, |
| | | created() { |
| | | this.getWorkshopListByApi() |
| | | this.showModuleByUserInfo() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | /** |
| | | * éè¿è½¦é´Id跳转è³ç¸åºè½¦é´å¤§å±çæ¿ |
| | | * @param id 车é´Id |
| | | */ |
| | | navigateToWorkshopSignage(id) { |
| | | const url = this.$router.resolve(`/workshopSignage/${id}`).href |
| | | window.open(url, '_blank') |
| | | showModuleByUserInfo() { |
| | | const id = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id |
| | | signageApi.getUserByIdApi(id) |
| | | .then(res => { |
| | | this.userType = res.userType |
| | | console.log('触å夿', this.userType) |
| | | switch (this.userType) { |
| | | case 1: |
| | | this.currentSignage = '' |
| | | break |
| | | case 2: |
| | | this.currentSignage = 'BranchFactorySignage' |
| | | break |
| | | case 3: |
| | | this.currentSignage = 'BranchFactorySignage' |
| | | break |
| | | case 4: |
| | | this.currentSignage = 'IndexSignage' |
| | | break |
| | | default: |
| | | this.currentSignage = '' |
| | | break |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | /** |
| | | * è·å车é´å表 |
| | | */ |
| | | getWorkshopListByApi() { |
| | | api.getWorkshopListInHomePageApi().then(res => { |
| | | console.log('res', res) |
| | | if (res.result && res.result.length > 0) { |
| | | this.workshopList = res.result |
| | | } |
| | | }) |
| | | |
| | | backToLastSignage() { |
| | | this.currentSignage = 'IndexSignage' |
| | | }, |
| | | |
| | | switchToBranchFactory(value) { |
| | | console.log('åç»ä»¶value', value) |
| | | this.currentSignage = 'BranchFactorySignage' |
| | | this.productionCode = value |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .page-container { |
| | | padding: 30px 30px 0; |
| | | |
| | | .workshop-name { |
| | | width: 100%; |
| | | background: #fff; |
| | | padding: 55px 0; |
| | | border-radius: 20px; |
| | | text-align: center; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | font-size: 30px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="page-container"> |
| | | <!--<div class="page-title">--> |
| | | <!--<slot name="index_signage_nav"></slot>--> |
| | | <!--<!–<dv-decoration-11 class="workshop-nav" v-for="item in workshopList">–>--> |
| | | <!--<!–{{item.workshopName}}–>--> |
| | | <!--<!–</dv-decoration-11>–>--> |
| | | <!--</div>--> |
| | | <div class="content-container"> |
| | | <div style="width: 25%" class="left-col"> |
| | | <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> |
| | | <div id="efficiency_chart" style="width: 100%;height: 350px"></div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | <div style="width: 42%" class="middle-col"> |
| | | <dv-border-box-9 style="padding: 40px 20px 0"> |
| | | <!--<div class="first-title">设 å¤ å° è´¦ æ» æ° : 1 0 2 2 å°</div>--> |
| | | <div style="display: flex"> |
| | | <div id="tech_condition_chart" style="width:50%;height: 420px;"></div> |
| | | <div id="warranty_malfunction_chart" style="width:50%;height: 420px;"></div> |
| | | </div> |
| | | <div class="support-plan-container"> |
| | | <div class="support-plan-item" style="background:#719D8E"> |
| | | <div>æ¬æä¸ä¿è®¡å</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{thisMonthMaintenancePlanNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#409EFF"> |
| | | <div>æ¬æå®æ</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{thisMonthMaintenanceRealNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#A8985D"> |
| | | <div>䏿ä¸ä¿è®¡å</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{nextMonthMaintenancePlanNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#58D9F9"> |
| | | <div>ä¸ä¸æä¸ä¿è®¡å</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{nextNextMonthMaintenancePlanNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="padding: 0 55px;margin-top: 50px"> |
| | | <dv-scroll-board :config="maintenanceConfig" style="width:100%;height:80px"/> |
| | | </div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | <div style="width: 32%"> |
| | | <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"/> |
| | | </div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import signageApi from '@/api/signage' |
| | | |
| | | export default { |
| | | name: 'BranchFactorySignage', |
| | | props: { |
| | | productionCode: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | runningStateChart: '', |
| | | runningStateData: [ |
| | | { value: '0', name: 'å
³æº' }, |
| | | { value: '0', name: 'æ¥è¦' }, |
| | | { value: '0', name: 'å¾
æº' }, |
| | | { value: '0', name: 'è¿è¡' } |
| | | ], |
| | | efficiencyChart: '', |
| | | efficiencyData: [], |
| | | techConditionChart: '', |
| | | techConditionData: [ |
| | | { value: '0', name: 'åæ ¼' }, |
| | | { value: '0', name: 'ç¦ç¨' }, |
| | | { value: '0', name: 'éç¨' } |
| | | ], |
| | | warrantyMalfunctionChart: '', |
| | | warrantyMalfunctionData: [ |
| | | { value: '0', name: 'æ¥ä¿®' }, |
| | | { value: '0', name: 'åæº' }, |
| | | { value: '0', name: 'è¿è¡' } |
| | | ], |
| | | thisMonthMaintenancePlanNum: 0, |
| | | thisMonthMaintenanceRealNum: 0, |
| | | nextMonthMaintenancePlanNum: 0, |
| | | nextNextMonthMaintenancePlanNum: 0, |
| | | twoMaintenanceChartData: [['-', '-', '-']], |
| | | barChart: '', |
| | | barChartData: [], |
| | | doubleBarChart: '', |
| | | doubleBarChartData: {}, |
| | | supportPlanList: [ |
| | | { |
| | | label: 'æ¬æä¸ä¿è®¡å', |
| | | value: 299, |
| | | background: '#719D8E' |
| | | }, |
| | | { |
| | | label: 'æ¬æå®æ', |
| | | value: 229, |
| | | background: '#409EFF' |
| | | }, |
| | | { |
| | | label: '䏿ä¸ä¿è®¡å', |
| | | value: 319, |
| | | background: '#A8985D' |
| | | }, |
| | | { |
| | | label: 'ä¸ä¸æä¸ä¿è®¡å', |
| | | value: 329, |
| | | background: '#58D9F9' |
| | | } |
| | | ], |
| | | maintenanceConfig: {}, |
| | | problemConfig: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | this.drawCharts() |
| | | this.getChartDataByApi() |
| | | }, |
| | | activated() { |
| | | console.log('触åactivated') |
| | | this.handleWindowResize() |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | methods: { |
| | | getChartDataByApi() { |
| | | this.getRunningStateDataByApi() |
| | | this.getEfficiencyDataByApi() |
| | | this.getTechConditionDataByApi() |
| | | this.getWarrantyMalfunctionDataByApi() |
| | | this.getMonthMaintenanceNumByApi() |
| | | this.getTwoMaintenanceChartDataByApi() |
| | | this.getBarChartDataByApi() |
| | | this.getDoubleBarChartDataByApi() |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤è¿è¡ç¶æ */ |
| | | getRunningStateDataByApi() { |
| | | signageApi.getEquipmentStatusStatisticsApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success) this.runningStateData = res.result |
| | | this.drawRunningStateChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤å©ç¨ç */ |
| | | getEfficiencyDataByApi() { |
| | | signageApi.getEquipmentUtilizationStatisticsApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success) this.efficiencyData = res.result |
| | | this.drawEfficiencyChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åææ¯ç¶æ */ |
| | | getTechConditionDataByApi() { |
| | | signageApi.getEquipmentTechnologyStatusListApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.techConditionData = [ |
| | | { value: res.result[0].qualifiedCount, name: 'åæ ¼' }, |
| | | { value: res.result[0].disabledCount, name: 'ç¦ç¨' }, |
| | | { value: res.result[0].limitedUseCount, name: 'éç¨' } |
| | | ] |
| | | } |
| | | this.drawTechConditionChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åè®¾å¤æ¥ä¿®æ
é */ |
| | | getWarrantyMalfunctionDataByApi() { |
| | | signageApi.getReportRepairEquipmentListApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.warrantyMalfunctionData = [ |
| | | { value: res.result[0].failurTotalCount, name: 'æ¥ä¿®' }, |
| | | { value: res.result[0].stopCount, name: 'åæº' }, |
| | | { value: res.result[0].noStopCount, name: 'è¿è¡' } |
| | | ] |
| | | } |
| | | this.drawWarrantyMalfunctionChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åä¸ä¿è®¡å */ |
| | | getMonthMaintenanceNumByApi() { |
| | | signageApi.getThisMonthMaintenanceListApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success && res.result) this.thisMonthMaintenancePlanNum = res.result[0].totalCount |
| | | }) |
| | | signageApi.getThisMonthMaintenanceFinishListApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success && res.result) this.thisMonthMaintenanceRealNum = res.result[0].totalCount |
| | | }) |
| | | signageApi.getNextMonthMaintenanceList(this.productionCode) |
| | | .then(res => { |
| | | if (res.success && res.result) this.nextMonthMaintenancePlanNum = res.result[0].totalCount |
| | | }) |
| | | signageApi.getNextNextMonthMaintenanceListApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success && res.result) this.nextNextMonthMaintenancePlanNum = res.result[0].totalCount |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åäºä¿è®¡å */ |
| | | getTwoMaintenanceChartDataByApi() { |
| | | signageApi.getTwoMaintenancePlanListApi(this.productionCode) |
| | | .then(res => { |
| | | if (res.success && res.result) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content]) |
| | | this.drawMaintenanceChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤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.drawEfficiencyChart() |
| | | this.drawTechConditionChart() |
| | | this.drawWarrantyMalfunctionChart() |
| | | this.drawMaintenanceChart() |
| | | this.drawBarChart() |
| | | this.drawDoubleBarChart() |
| | | this.drawProblemChart() |
| | | }, |
| | | |
| | | /* ç»å¶è®¾å¤è¿è¡ç¶æç«ç°é¥¼å¾ */ |
| | | drawRunningStateChart() { |
| | | this.runningStateChart = this.$echarts.init(document.getElementById('running_state_chart')) |
| | | const option = { |
| | | height: 300, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: '设å¤è¿è¡ç¶æç»è®¡', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}(${params.percent}%)` |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 25, |
| | | left: 0, |
| | | orient: 'vertical', |
| | | right: '10%', |
| | | // bottom: "0", |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | icon: 'roundRect', |
| | | itemGap: 15, |
| | | textStyle: { |
| | | color: 'inherit', |
| | | fontSize: 14, |
| | | padding: [0, 0, 0, 0] |
| | | }, |
| | | data: ['å
³æº', 'æ¥è¦', 'å¾
æº', 'è¿è¡'] |
| | | }, |
| | | grid: { |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | roseType: 'area', // ç«ç°å¾ |
| | | // selectedMode: "single", |
| | | radius: ['60%', '80%'], |
| | | center: ['55%', '60%'], |
| | | color: [ |
| | | '#686869', |
| | | '#AA6349', |
| | | '#968A5E', |
| | | '#5D975D' |
| | | ], |
| | | label: { |
| | | position: 'outside', |
| | | show: true, |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 10, |
| | | length: 10 |
| | | }, |
| | | data: this.runningStateData |
| | | } |
| | | ] |
| | | } |
| | | this.runningStateChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶è®¾å¤å©ç¨çè¶åå¾ */ |
| | | drawEfficiencyChart() { |
| | | this.efficiencyChart = this.$echarts.init(document.getElementById('efficiency_chart')) |
| | | const data = this.efficiencyData |
| | | const colorArray = [ |
| | | { |
| | | top: '#61927F', |
| | | bottom: '#61927F' |
| | | }, { |
| | | top: '#629480', |
| | | bottom: '#629480' |
| | | }, |
| | | { |
| | | top: '#66DFE2', |
| | | bottom: '#66DFE2' |
| | | }, { |
| | | top: '#9FE6B8', |
| | | bottom: '#9FE6B8' |
| | | }, |
| | | { |
| | | top: '#FEDA5B', |
| | | bottom: '#FEDA5B' |
| | | }, |
| | | { |
| | | top: '#FF9F7F', |
| | | bottom: '#FF9F7F' |
| | | }, |
| | | { |
| | | top: '#F87091', |
| | | bottom: '#F87091' |
| | | } |
| | | ] |
| | | const defaultData = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100] |
| | | const option = { |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: '设å¤å©ç¨ç', // 主æ é¢ææ¬ |
| | | x: 'left', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '5%', |
| | | bottom: '0%', |
| | | top: '6%', |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'none' |
| | | }, |
| | | formatter: function(params) { |
| | | return '<span style="font-weight:bolder;">' + params[0].name + '</span><br/>' + |
| | | '<span style="display:inline-block; width:10px; height:10px; border-radius:100px; margin-right:5px; background:' + params[0].color.colorStops[params[0].dataIndex].color + '"></span>' + params[0].seriesName + ' : ' + params[0].value + '%' |
| | | } |
| | | }, |
| | | xAxis: { |
| | | name: 'åä½', |
| | | nameTextStyle: { |
| | | color: '#fff' |
| | | }, |
| | | axisLabel: { |
| | | margin: 20, |
| | | textStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | show: true, |
| | | type: 'value', |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | yAxis: [{ |
| | | type: 'category', |
| | | inverse: true, |
| | | triggerEvent: true, |
| | | axisLabel: { |
| | | show: true, |
| | | textStyle: { |
| | | color: '#d9e7fa', |
| | | fontSize: '14', |
| | | fontWeight: 'bolder' |
| | | }, |
| | | formatter: function(value) { |
| | | return `${data.find(item => item.productionCode === value).name}` |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | data: data.map(item => item.productionCode) |
| | | }, { |
| | | type: 'category', |
| | | inverse: true, |
| | | axisTick: 'none', |
| | | axisLine: 'none', |
| | | show: true, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: '#ffffff', |
| | | fontSize: '14' |
| | | }, |
| | | formatter: function(value) { |
| | | return `${value}%` |
| | | } |
| | | }, |
| | | data: data |
| | | }], |
| | | series: [{ |
| | | name: 'å©ç¨ç', |
| | | type: 'bar', |
| | | zlevel: 1, |
| | | itemStyle: { |
| | | barBorderRadius: 100, |
| | | color: function(params) { |
| | | let num = colorArray.length |
| | | return { |
| | | type: 'linear', |
| | | colorStops: [{ |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | barWidth: 12, |
| | | data: data |
| | | }, |
| | | { |
| | | name: 'èæ¯', |
| | | type: 'bar', |
| | | barWidth: 12, |
| | | barGap: '-100%', |
| | | data: defaultData, |
| | | itemStyle: { |
| | | color: '#11294d', |
| | | barBorderRadius: 100 |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | this.efficiencyChart.setOption(option, true) |
| | | |
| | | this.efficiencyChart.on('click', params => { |
| | | |
| | | // ç¹å»è§¦åç为æ±ç¶ä½ï¼é¤æ¤é¤å¤æ¯æ é¢ |
| | | if (params.componentType === 'series') { |
| | | console.log('seriesParams===========', params) |
| | | |
| | | } else { |
| | | console.log('yAxisParams===========', params) |
| | | this.$emit('switchToBranchFactory', params.value) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /* ç»å¶ææ¯ç¶æé¥¼å¾ */ |
| | | drawTechConditionChart() { |
| | | this.techConditionChart = this.$echarts.init(document.getElementById('tech_condition_chart')) |
| | | const option = { |
| | | height: 300, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: 'ææ¯ç¶æ', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}(${params.percent}%)` |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 25, |
| | | orient: 'vertical', |
| | | right: 0, |
| | | // bottom: "0", |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | icon: 'roundRect', |
| | | itemGap: 15, |
| | | textStyle: { |
| | | color: 'inherit', |
| | | fontSize: 14, |
| | | padding: [0, 0, 0, 0] |
| | | }, |
| | | data: ['åæ ¼', 'ç¦ç¨', 'éç¨'] |
| | | }, |
| | | grid: { |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | // selectedMode: "single", |
| | | radius: ['40%', '60%'], |
| | | center: ['50%', '60%'], |
| | | color: [ |
| | | '#0AA012', |
| | | '#237E48', |
| | | '#757160' |
| | | ], |
| | | label: { |
| | | position: 'outside', |
| | | show: true, |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 15, |
| | | length: 15 |
| | | }, |
| | | data: this.techConditionData |
| | | } |
| | | ] |
| | | } |
| | | this.techConditionChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶è®¾å¤æ¥ä¿®æ
éé¥¼å¾ */ |
| | | drawWarrantyMalfunctionChart() { |
| | | this.warrantyMalfunctionChart = this.$echarts.init(document.getElementById('warranty_malfunction_chart')) |
| | | const option = { |
| | | height: 300, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: 'è®¾å¤æ¥ä¿®æ
é', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}(${params.percent}%)` |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 25, |
| | | orient: 'vertical', |
| | | right: 0, |
| | | // bottom: "0", |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | icon: 'roundRect', |
| | | itemGap: 15, |
| | | textStyle: { |
| | | color: 'inherit', |
| | | fontSize: 14, |
| | | padding: [0, 0, 0, 0] |
| | | }, |
| | | data: ['æ¥ä¿®', 'åæº', 'è¿è¡'] |
| | | }, |
| | | grid: { |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | // selectedMode: "single", |
| | | radius: ['40%', '60%'], |
| | | center: ['50%', '60%'], |
| | | color: [ |
| | | '#00CED1', |
| | | '#B85B38', |
| | | '#A8985D' |
| | | ], |
| | | label: { |
| | | position: 'outside', |
| | | show: true, |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 15, |
| | | length: 15 |
| | | }, |
| | | data: this.warrantyMalfunctionData |
| | | } |
| | | ] |
| | | } |
| | | this.warrantyMalfunctionChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶è½¦é´ä¿å
»æ»å¨è¡¨ */ |
| | | drawMaintenanceChart() { |
| | | this.maintenanceConfig = { |
| | | indexHeader: 'åºå·', |
| | | header: ['车é´', 'æ¥æ', 'å
容'], |
| | | headerBGC: '#266C86', |
| | | rowNum: 1, |
| | | data: this.twoMaintenanceChartData, |
| | | index: true, |
| | | columnWidth: [100], |
| | | align: ['center', 'center', 'center', 'center'] |
| | | } |
| | | }, |
| | | |
| | | /* ç»å¶åæ±å¾ */ |
| | | drawBarChart() { |
| | | this.barChart = this.$echarts.init(document.getElementById('bar_chart')) |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | }, |
| | | // backgroundColor: 'rgba(9, 24, 48, 0.5)', |
| | | borderColor: 'rgba(75, 253, 238, 0.4)', |
| | | textStyle: { |
| | | // color: '#CFE3FC' |
| | | }, |
| | | borderWidth: 1 |
| | | }, |
| | | grid: { |
| | | top: '15%', |
| | | left: '10%' |
| | | }, |
| | | xAxis: [{ |
| | | name: 'OEE车é´', |
| | | nameLocation: 'middle', |
| | | nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | type: 'category', |
| | | data: this.barChartData.map(item => item.name), |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#FFFFFF' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | margin: 10, |
| | | color: '#e2e9ff', |
| | | textStyle: { |
| | | fontSize: 12 |
| | | } |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | name: 'æ°é', |
| | | nameLocation: 'middle', |
| | | nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | axisLabel: { |
| | | formatter: '{value}', |
| | | color: '#e2e9ff' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: '#FFFFFF' |
| | | } |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'rgba(255,255,255,0.12)' |
| | | } |
| | | } |
| | | }], |
| | | series: [{ |
| | | type: 'bar', |
| | | data: this.barChartData, |
| | | barWidth: '15%', |
| | | itemStyle: { |
| | | color: '#7DB17F' |
| | | }, |
| | | label: { |
| | | show: true, |
| | | lineHeight: 10, |
| | | formatter: params => { |
| | | if (+params.value === 0) return '' |
| | | else return params.value |
| | | }, |
| | | position: 'inside', |
| | | textStyle: { |
| | | color: '#fff', |
| | | 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 |
| | | } |
| | | } |
| | | }, { |
| | | 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: [ |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'] |
| | | ], |
| | | index: true, |
| | | columnWidth: [100], |
| | | align: ['center'] |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * çªå£å°ºå¯¸ååæ¶è§¦å |
| | | * è°æ´å¾è¡¨å°ºå¯¸ä»¥éåºå辨ç |
| | | */ |
| | | 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.barChart) this.barChart.resize() |
| | | if (this.doubleBarChart) this.doubleBarChart.resize() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .page-container { |
| | | .page-title { |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | flex-wrap: wrap; |
| | | color: #fff; |
| | | margin-bottom: 10px; |
| | | |
| | | .workshop-nav { |
| | | width: 120px; |
| | | height: 40px; |
| | | font-size: 12px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .content-container { |
| | | padding-top: 5px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .left-col { |
| | | .first-title { |
| | | color: #00A8AC; |
| | | font-size: 20px; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .middle-col { |
| | | .first-title { |
| | | color: #00A8AC; |
| | | font-size: 20px; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .support-plan-container { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | flex-wrap: wrap; |
| | | color: #fff; |
| | | padding: 0 40px; |
| | | |
| | | .support-plan-item { |
| | | border-radius: 3px; |
| | | width: 45%; |
| | | padding: 5px 20px; |
| | | font-size: 20px; |
| | | margin-bottom: 10px; |
| | | |
| | | .plan-value-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .plan-value { |
| | | font-size: 35px; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /deep/ .dv-scroll-board .header { |
| | | height: 35px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="page-container"> |
| | | <!--<div class="page-title">--> |
| | | <!--<slot name="index_signage_nav"></slot>--> |
| | | <!--<!–<dv-decoration-11 class="workshop-nav" v-for="item in workshopList">–>--> |
| | | <!--<!–{{item.workshopName}}–>--> |
| | | <!--<!–</dv-decoration-11>–>--> |
| | | <!--</div>--> |
| | | <div class="content-container"> |
| | | <div style="width: 25%" class="left-col"> |
| | | <dv-border-box-9 style="padding: 30px 20px"> |
| | | <!--<div class="first-title">M D C å
¥ ç½ æ» æ° : 6 0 3 å°</div>--> |
| | | <div id="running_state_chart" style="width:100%;height: 300px;margin-top: 10px"></div> |
| | | <!--<div class="second-title">设å¤å©ç¨ç</div>--> |
| | | <!--<dv-capsule-chart :config="efficiencyChartConfig" style="width:100%;height:460px"/>--> |
| | | <div id="efficiency_chart" style="width: 100%;height: 465px"></div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | <div style="width: 42%" class="middle-col"> |
| | | <dv-border-box-9 style="padding: 30px 20px"> |
| | | <!--<div class="first-title">设 å¤ å° è´¦ æ» æ° : 1 0 2 2 å°</div>--> |
| | | <div style="display: flex"> |
| | | <div id="tech_condition_chart" style="width:50%;height: 330px;margin-top: 10px"></div> |
| | | <div id="warranty_malfunction_chart" style="width:50%;height: 330px;margin-top: 10px"></div> |
| | | </div> |
| | | <div class="support-plan-container"> |
| | | <!--<div v-for="item in supportPlanList" class="support-plan-item"--> |
| | | <!--:style="{background:item.background}">--> |
| | | <!--<div>{{item.label}}</div>--> |
| | | <!--<div class="plan-value-container">--> |
| | | <!--<div class="plan-value">{{item.value}}</div>--> |
| | | <!--<div>å°</div>--> |
| | | <!--</div>--> |
| | | <!--</div>--> |
| | | <div class="support-plan-item" style="background:#719D8E"> |
| | | <div>æ¬æä¸ä¿è®¡å</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{thisMonthMaintenancePlanNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#409EFF"> |
| | | <div>æ¬æå®æ</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{thisMonthMaintenanceRealNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#A8985D"> |
| | | <div>䏿ä¸ä¿è®¡å</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{nextMonthMaintenancePlanNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#58D9F9"> |
| | | <div>ä¸ä¸æä¸ä¿è®¡å</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{nextNextMonthMaintenancePlanNum}}</div> |
| | | <div>å°</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="padding: 0 55px;margin-top: 10px"> |
| | | <dv-scroll-board :config="maintenanceConfig" style="width:100%;height:220px"/> |
| | | </div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | <div style="width: 32%"> |
| | | <dv-border-box-9> |
| | | <div id="bar_chart" style="width:100%;height: 290px;"></div> |
| | | <div id="double_bar_chart" style="width:100%;height: 285px;"></div> |
| | | <div style="padding: 0 20px;margin-top: 10px"> |
| | | <dv-scroll-board :config="problemConfig" style="width:100%;height:220px"/> |
| | | </div> |
| | | </dv-border-box-9> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import signageApi from '@/api/signage' |
| | | |
| | | export default { |
| | | name: 'IndexSignage', |
| | | data() { |
| | | return { |
| | | runningStateChart: '', |
| | | runningStateData: [ |
| | | { value: '0', name: 'å
³æº' }, |
| | | { value: '0', name: 'æ¥è¦' }, |
| | | { value: '0', name: 'å¾
æº' }, |
| | | { value: '0', name: 'è¿è¡' } |
| | | ], |
| | | efficiencyChart: '', |
| | | efficiencyData: [], |
| | | techConditionChart: '', |
| | | techConditionData: [ |
| | | { value: '0', name: 'åæ ¼' }, |
| | | { value: '0', name: 'ç¦ç¨' }, |
| | | { value: '0', name: 'éç¨' } |
| | | ], |
| | | warrantyMalfunctionChart: '', |
| | | warrantyMalfunctionData: [ |
| | | { value: '12', name: 'æ¥ä¿®' }, |
| | | { value: '10', name: 'åæº' }, |
| | | { value: '8', name: 'è¿è¡' } |
| | | ], |
| | | thisMonthMaintenancePlanNum: 0, |
| | | thisMonthMaintenanceRealNum: 0, |
| | | nextMonthMaintenancePlanNum: 0, |
| | | nextNextMonthMaintenancePlanNum: 0, |
| | | twoMaintenanceChartData: [['-', '-', '-']], |
| | | barChart: '', |
| | | barChartData: [], |
| | | doubleBarChart: '', |
| | | doubleBarChartData: {}, |
| | | efficiencyChartConfig: {}, |
| | | maintenanceConfig: {}, |
| | | problemConfig: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | this.drawCharts() |
| | | this.getChartDataByApi() |
| | | }, |
| | | activated() { |
| | | console.log('触åactivated') |
| | | this.handleWindowResize() |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | methods: { |
| | | getChartDataByApi() { |
| | | this.getRunningStateDataByApi() |
| | | this.getEfficiencyDataByApi() |
| | | this.getTechConditionDataByApi() |
| | | this.getWarrantyMalfunctionDataByApi() |
| | | this.getMonthMaintenanceNumByApi() |
| | | this.getTwoMaintenanceChartDataByApi() |
| | | this.getBarChartDataByApi() |
| | | this.getDoubleBarChartDataByApi() |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤è¿è¡ç¶æ */ |
| | | getRunningStateDataByApi() { |
| | | signageApi.getEquipmentStatusStatisticsApi() |
| | | .then(res => { |
| | | if (res.success) this.runningStateData = res.result |
| | | this.drawRunningStateChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤å©ç¨ç */ |
| | | getEfficiencyDataByApi() { |
| | | signageApi.getEquipmentUtilizationStatisticsApi() |
| | | .then(res => { |
| | | if (res.success) this.efficiencyData = res.result |
| | | this.drawEfficiencyChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åææ¯ç¶æ */ |
| | | getTechConditionDataByApi() { |
| | | signageApi.getEquipmentTechnologyStatusListApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.techConditionData = [ |
| | | { value: res.result[0].qualifiedCount, name: 'åæ ¼' }, |
| | | { value: res.result[0].disabledCount, name: 'ç¦ç¨' }, |
| | | { value: res.result[0].limitedUseCount, name: 'éç¨' } |
| | | ] |
| | | } |
| | | this.drawTechConditionChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åè®¾å¤æ¥ä¿®æ
é */ |
| | | getWarrantyMalfunctionDataByApi() { |
| | | signageApi.getReportRepairEquipmentListApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.warrantyMalfunctionData = [ |
| | | { value: res.result[0].failurTotalCount, name: 'æ¥ä¿®' }, |
| | | { value: res.result[0].stopCount, name: 'åæº' }, |
| | | { value: res.result[0].noStopCount, name: 'è¿è¡' } |
| | | ] |
| | | } |
| | | this.drawWarrantyMalfunctionChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åä¸ä¿è®¡å */ |
| | | getMonthMaintenanceNumByApi() { |
| | | signageApi.getThisMonthMaintenanceListApi() |
| | | .then(res => { |
| | | if (res.success && res.result) this.thisMonthMaintenancePlanNum = res.result[0].totalCount |
| | | }) |
| | | signageApi.getThisMonthMaintenanceFinishListApi() |
| | | .then(res => { |
| | | if (res.success && res.result) this.thisMonthMaintenanceRealNum = res.result[0].totalCount |
| | | }) |
| | | signageApi.getNextMonthMaintenanceList() |
| | | .then(res => { |
| | | if (res.success && res.result) this.nextMonthMaintenancePlanNum = res.result[0].totalCount |
| | | }) |
| | | signageApi.getNextNextMonthMaintenanceListApi() |
| | | .then(res => { |
| | | if (res.success && res.result) this.nextNextMonthMaintenancePlanNum = res.result[0].totalCount |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·åäºä¿è®¡å */ |
| | | getTwoMaintenanceChartDataByApi() { |
| | | signageApi.getTwoMaintenancePlanListApi() |
| | | .then(res => { |
| | | if (res.success && res.result) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content]) |
| | | this.drawMaintenanceChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤OEEç»è®¡ */ |
| | | getBarChartDataByApi() { |
| | | signageApi.getEquipmentOEEStatistics() |
| | | .then(res => { |
| | | if (res.success) this.barChartData = res.result |
| | | this.drawBarChart() |
| | | }) |
| | | }, |
| | | |
| | | /* è°ç¨æ¥å£è·å设å¤OEEåå©ç¨çå¯¹æ¯ */ |
| | | getDoubleBarChartDataByApi() { |
| | | signageApi.getEquipmentMonthStatisticsApi() |
| | | .then(res => { |
| | | if (res.success) this.doubleBarChartData = res.result |
| | | this.drawDoubleBarChart() |
| | | }) |
| | | }, |
| | | |
| | | /* ç»å¶å¾è¡¨æ±æ»æ¹æ³ */ |
| | | drawCharts() { |
| | | this.drawRunningStateChart() |
| | | this.drawEfficiencyChart() |
| | | this.drawTechConditionChart() |
| | | this.drawWarrantyMalfunctionChart() |
| | | this.drawMaintenanceChart() |
| | | this.drawBarChart() |
| | | this.drawDoubleBarChart() |
| | | this.drawProblemChart() |
| | | }, |
| | | |
| | | /* ç»å¶è®¾å¤è¿è¡ç¶æç«ç°é¥¼å¾ */ |
| | | drawRunningStateChart() { |
| | | this.runningStateChart = this.$echarts.init(document.getElementById('running_state_chart')) |
| | | const option = { |
| | | height: 300, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: '设å¤è¿è¡ç¶æç»è®¡', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}(${params.percent}%)` |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 25, |
| | | left: 0, |
| | | orient: 'vertical', |
| | | right: '10%', |
| | | // bottom: "0", |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | icon: 'roundRect', |
| | | itemGap: 15, |
| | | textStyle: { |
| | | color: 'inherit', |
| | | fontSize: 14, |
| | | padding: [0, 0, 0, 0] |
| | | }, |
| | | data: ['å
³æº', 'æ¥è¦', 'å¾
æº', 'è¿è¡'] |
| | | }, |
| | | grid: { |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | roseType: 'area', // ç«ç°å¾ |
| | | // selectedMode: "single", |
| | | radius: ['40%', '55%'], |
| | | center: ['60%', '60%'], |
| | | color: [ |
| | | '#686869', |
| | | '#AA6349', |
| | | '#968A5E', |
| | | '#5D975D' |
| | | ], |
| | | label: { |
| | | position: 'outside', |
| | | show: true, |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 10, |
| | | length: 10 |
| | | }, |
| | | data: this.runningStateData |
| | | } |
| | | ] |
| | | } |
| | | this.runningStateChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶è®¾å¤å©ç¨çè¶åå¾ */ |
| | | drawEfficiencyChart() { |
| | | this.efficiencyChart = this.$echarts.init(document.getElementById('efficiency_chart')) |
| | | const data = this.efficiencyData |
| | | const colorArray = [ |
| | | { |
| | | top: '#61927F', |
| | | bottom: '#61927F' |
| | | }, { |
| | | top: '#629480', |
| | | bottom: '#629480' |
| | | }, |
| | | { |
| | | top: '#66DFE2', |
| | | bottom: '#66DFE2' |
| | | }, { |
| | | top: '#9FE6B8', |
| | | bottom: '#9FE6B8' |
| | | }, |
| | | { |
| | | top: '#FEDA5B', |
| | | bottom: '#FEDA5B' |
| | | }, |
| | | { |
| | | top: '#FF9F7F', |
| | | bottom: '#FF9F7F' |
| | | }, |
| | | { |
| | | top: '#F87091', |
| | | bottom: '#F87091' |
| | | } |
| | | ] |
| | | const defaultData = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100] |
| | | const option = { |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: '设å¤å©ç¨ç', // 主æ é¢ææ¬ |
| | | x: 'left', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '5%', |
| | | bottom: '0%', |
| | | top: '6%', |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'none' |
| | | }, |
| | | formatter: function(params) { |
| | | return '<span style="font-weight:bolder;">' + params[0].name + '</span><br/>' + |
| | | '<span style="display:inline-block; width:10px; height:10px; border-radius:100px; margin-right:5px; background:' + params[0].color.colorStops[params[0].dataIndex].color + '"></span>' + params[0].seriesName + ' : ' + params[0].value + '%' |
| | | } |
| | | }, |
| | | xAxis: { |
| | | name: 'åä½', |
| | | nameTextStyle: { |
| | | color: '#fff' |
| | | }, |
| | | axisLabel: { |
| | | margin: 20, |
| | | textStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | show: true, |
| | | type: 'value', |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | yAxis: [{ |
| | | type: 'category', |
| | | inverse: true, |
| | | triggerEvent: true, |
| | | axisLabel: { |
| | | show: true, |
| | | textStyle: { |
| | | color: '#d9e7fa', |
| | | fontSize: '14', |
| | | fontWeight: 'bolder' |
| | | }, |
| | | formatter: function(value) { |
| | | return `${data.find(item => item.productionCode === value).name}` |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | data: data.map(item => item.productionCode) |
| | | }, { |
| | | type: 'category', |
| | | inverse: true, |
| | | axisTick: 'none', |
| | | axisLine: 'none', |
| | | show: true, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: '#ffffff', |
| | | fontSize: '14' |
| | | }, |
| | | formatter: function(value) { |
| | | return `${value}%` |
| | | } |
| | | }, |
| | | data: data |
| | | }], |
| | | series: [{ |
| | | name: 'å©ç¨ç', |
| | | type: 'bar', |
| | | zlevel: 1, |
| | | itemStyle: { |
| | | barBorderRadius: 100, |
| | | color: function(params) { |
| | | let num = colorArray.length |
| | | return { |
| | | type: 'linear', |
| | | colorStops: [{ |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }, { |
| | | offset: 1, |
| | | color: colorArray[params.dataIndex % num].top |
| | | }, { |
| | | offset: 0, |
| | | color: colorArray[params.dataIndex % num].bottom |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | barWidth: 12, |
| | | data: data |
| | | }, |
| | | { |
| | | name: 'èæ¯', |
| | | type: 'bar', |
| | | barWidth: 12, |
| | | barGap: '-100%', |
| | | data: defaultData, |
| | | itemStyle: { |
| | | color: '#11294d', |
| | | barBorderRadius: 100 |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | this.efficiencyChart.setOption(option, true) |
| | | |
| | | this.efficiencyChart.on('click', params => { |
| | | |
| | | // ç¹å»è§¦åç为æ±ç¶ä½ï¼é¤æ¤é¤å¤æ¯æ é¢ |
| | | if (params.componentType === 'series') { |
| | | console.log('seriesParams===========', params) |
| | | } else { |
| | | console.log('yAxisParams===========', params) |
| | | this.$emit('switchToBranchFactory', params.value) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /* ç»å¶ææ¯ç¶æé¥¼å¾ */ |
| | | drawTechConditionChart() { |
| | | this.techConditionChart = this.$echarts.init(document.getElementById('tech_condition_chart')) |
| | | const option = { |
| | | height: 300, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: 'ææ¯ç¶æ', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}(${params.percent}%)` |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 25, |
| | | orient: 'vertical', |
| | | right: 0, |
| | | // bottom: "0", |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | icon: 'roundRect', |
| | | itemGap: 15, |
| | | textStyle: { |
| | | color: 'inherit', |
| | | fontSize: 14, |
| | | padding: [0, 0, 0, 0] |
| | | }, |
| | | data: ['åæ ¼', 'ç¦ç¨', 'éç¨'] |
| | | }, |
| | | grid: { |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | // selectedMode: "single", |
| | | radius: ['33%', '45%'], |
| | | center: ['45%', '60%'], |
| | | color: [ |
| | | '#0AA012', |
| | | '#237E48', |
| | | '#757160' |
| | | ], |
| | | label: { |
| | | position: 'outside', |
| | | show: true, |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 10, |
| | | length: 10 |
| | | }, |
| | | data: this.techConditionData |
| | | } |
| | | ] |
| | | } |
| | | this.techConditionChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶è®¾å¤æ¥ä¿®æ
éé¥¼å¾ */ |
| | | drawWarrantyMalfunctionChart() { |
| | | this.warrantyMalfunctionChart = this.$echarts.init(document.getElementById('warranty_malfunction_chart')) |
| | | const option = { |
| | | height: 300, |
| | | title: { |
| | | show: true, // æ¯å¦æ¾ç¤ºæ é¢ï¼é»è®¤ä¸ºtrue |
| | | text: 'è®¾å¤æ¥ä¿®æ
é', // 主æ é¢ææ¬ |
| | | x: 'center', // æ 颿°´å¹³å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'left'ã'center'ã'right'æå
·ä½çæ°´å¹³åæ å¼ |
| | | y: 'top', // æ é¢åç´å®æ¾ä½ç½®ï¼å¯éå¼ä¸º'top'ã'bottom'ã'center'æå
·ä½çåç´åæ å¼ |
| | | textStyle: { |
| | | // 主æ é¢ææ¬æ ·å¼ |
| | | fontSize: 18, |
| | | fontWeight: 'normal', |
| | | color: '#00A8AC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}(${params.percent}%)` |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | top: 25, |
| | | orient: 'vertical', |
| | | right: 0, |
| | | // bottom: "0", |
| | | itemWidth: 14, |
| | | itemHeight: 14, |
| | | icon: 'roundRect', |
| | | itemGap: 15, |
| | | textStyle: { |
| | | color: 'inherit', |
| | | fontSize: 14, |
| | | padding: [0, 0, 0, 0] |
| | | }, |
| | | data: ['æ¥ä¿®', 'åæº', 'è¿è¡'] |
| | | }, |
| | | grid: { |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | // selectedMode: "single", |
| | | radius: ['33%', '45%'], |
| | | center: ['45%', '60%'], |
| | | color: [ |
| | | '#00CED1', |
| | | '#B85B38', |
| | | '#A8985D' |
| | | ], |
| | | label: { |
| | | position: 'outside', |
| | | show: true, |
| | | color: 'inherit', |
| | | // textBorderColor: 'inherit', |
| | | // textBorderWidth: 1, |
| | | fontSize: 16, |
| | | formatter: function(params) { |
| | | if (params.name !== '') { |
| | | return `${params.name}:${params.value}` |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length2: 10, |
| | | length: 10 |
| | | }, |
| | | data: this.warrantyMalfunctionData |
| | | } |
| | | ] |
| | | } |
| | | this.warrantyMalfunctionChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶è½¦é´ä¿å
»æ»å¨è¡¨ */ |
| | | drawMaintenanceChart() { |
| | | this.maintenanceConfig = { |
| | | indexHeader: 'åºå·', |
| | | header: ['车é´', 'æ¥æ', 'å
容'], |
| | | headerBGC: '#266C86', |
| | | data: this.twoMaintenanceChartData, |
| | | index: true, |
| | | columnWidth: [100], |
| | | align: ['center', 'center', 'center', 'center'] |
| | | } |
| | | }, |
| | | |
| | | /* ç»å¶åæ±å¾ */ |
| | | drawBarChart() { |
| | | this.barChart = this.$echarts.init(document.getElementById('bar_chart')) |
| | | const option = { |
| | | height: 190, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | }, |
| | | // backgroundColor: 'rgba(9, 24, 48, 0.5)', |
| | | borderColor: 'rgba(75, 253, 238, 0.4)', |
| | | textStyle: { |
| | | // color: '#CFE3FC' |
| | | }, |
| | | borderWidth: 1 |
| | | }, |
| | | grid: { |
| | | top: '15%', |
| | | left: '10%' |
| | | }, |
| | | xAxis: [{ |
| | | name: 'OEE车é´', |
| | | nameLocation: 'middle', |
| | | nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | type: 'category', |
| | | data: this.barChartData.map(item => item.name), |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#FFFFFF' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | margin: 10, |
| | | color: '#e2e9ff', |
| | | textStyle: { |
| | | fontSize: 12 |
| | | } |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | name: 'æ°é', |
| | | nameLocation: 'middle', |
| | | nameGap: 30, // xè½´name䏿¨ªåæ 轴线çé´è· |
| | | axisLabel: { |
| | | formatter: '{value}', |
| | | color: '#e2e9ff' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: '#FFFFFF' |
| | | } |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'rgba(255,255,255,0.12)' |
| | | } |
| | | } |
| | | }], |
| | | series: [{ |
| | | type: 'bar', |
| | | data: this.barChartData, |
| | | barWidth: '50%', |
| | | itemStyle: { |
| | | color: '#7DB17F' |
| | | }, |
| | | label: { |
| | | show: true, |
| | | lineHeight: 10, |
| | | formatter: params => { |
| | | if (+params.value === 0) return '' |
| | | else return params.value |
| | | }, |
| | | position: 'inside', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 18 |
| | | } |
| | | } |
| | | }] |
| | | } |
| | | this.barChart.setOption(option, true) |
| | | }, |
| | | |
| | | /* ç»å¶åæ±å¾ */ |
| | | drawDoubleBarChart() { |
| | | this.doubleBarChart = this.$echarts.init(document.getElementById('double_bar_chart')) |
| | | const option = { |
| | | height: 220, |
| | | 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 |
| | | } |
| | | } |
| | | }, { |
| | | 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: [ |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'], |
| | | ['2024å¹´3æ23å·', '大家注æå®å
¨é®é¢'] |
| | | ], |
| | | index: true, |
| | | columnWidth: [100], |
| | | align: ['center'] |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * çªå£å°ºå¯¸ååæ¶è§¦å |
| | | * è°æ´å¾è¡¨å°ºå¯¸ä»¥éåºå辨ç |
| | | */ |
| | | 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.barChart) this.barChart.resize() |
| | | if (this.doubleBarChart) this.doubleBarChart.resize() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .page-container { |
| | | .page-title { |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | flex-wrap: wrap; |
| | | color: #fff; |
| | | margin-bottom: 10px; |
| | | |
| | | .workshop-nav { |
| | | width: 120px; |
| | | height: 40px; |
| | | font-size: 12px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .content-container { |
| | | padding-top: 5px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .left-col { |
| | | .first-title { |
| | | color: #00A8AC; |
| | | font-size: 20px; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .middle-col { |
| | | .first-title { |
| | | color: #00A8AC; |
| | | font-size: 20px; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .support-plan-container { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | flex-wrap: wrap; |
| | | color: #fff; |
| | | padding: 0 40px; |
| | | |
| | | .support-plan-item { |
| | | border-radius: 3px; |
| | | width: 45%; |
| | | padding: 5px 20px; |
| | | font-size: 20px; |
| | | margin-bottom: 10px; |
| | | |
| | | .plan-value-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .plan-value { |
| | | font-size: 35px; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /deep/ .dv-scroll-board .header { |
| | | height: 35px; |
| | | } |
| | | </style> |