| | |
| | | |
| | | NProgress.configure({ showSpinner: false }) // NProgress Configuration |
| | | |
| | | const whiteList = ['/login', '/zhkb', '/cj'] // no redirect whitelist |
| | | const whiteList = ['/login', '/zhkb', '/cj', '/cj2', '/ckgl'] // no redirect whitelist |
| | | |
| | | router.beforeEach(async(to, from, next) => { |
| | | // start progress bar |
| | |
| | | component: () => import('@/views/kanbanManager/cj'), |
| | | hidden: true |
| | | }, { |
| | | path: '/cj2', |
| | | component: () => import('@/views/kanbanManager/cj2'), |
| | | hidden: true |
| | | }, { |
| | | path: '/ckgl', |
| | | component: () => import('@/views/kanbanManager/ckgl'), |
| | | hidden: true |
| | |
| | | </div> |
| | | |
| | | <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px"> |
| | | <span>è£
é
è½¦é´æ°ååçæ¿</span> |
| | | <span>注å¡è½¦é´æ°ååçæ¿</span> |
| | | </div> |
| | | |
| | | <div class="kb_headTime" style="top: 35px;right: 25px"> |
| | |
| | | }, |
| | | methods: { |
| | | getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData().then(res => { |
| | | WorkShopProduceTopData({ wkshopcode: '1501' }).then(res => { |
| | | const flag = this.compareArrays(this.configTableTop.data, res.data) |
| | | if (!flag) { |
| | | this.configTableTop.data = res.data.map(i => |
| | |
| | | }) |
| | | }, |
| | | async getWorkShopProduceBottomLeftData() { |
| | | const res4 = await WorkShopProduceBottomLeftData() |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: '1501' }) |
| | | this.cjzl03_xData = res4.data.map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data.map(i => i.count) |
| | | |
| | |
| | | }, |
| | | |
| | | async getWorkShopProduceBottomRightData() { |
| | | const res5 = await WorkShopProduceBottomRightData() |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: '1501' }) |
| | | this.RightBottom = res5.data |
| | | if (this.RightBottom.length > 0) { |
| | | loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont))) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="kb_dashboard" style="display:flex;flex-direction: column;justify-content: space-between"> |
| | | |
| | | <div class="kb_backgroundCustom" /> |
| | | |
| | | <div class="kb_header"> |
| | | <div class="kb_headTime" style="top: 35px;left: 20px"> |
| | | <span>永康å¸å£æ²£å¡ä»¶å å·¥å</span> |
| | | </div> |
| | | |
| | | <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px"> |
| | | <span>è£
é
è½¦é´æ°ååçæ¿</span> |
| | | </div> |
| | | |
| | | <div class="kb_headTime" style="top: 35px;right: 25px"> |
| | | <span>{{ headTime }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | style=" padding:5px 20px 20px 20px;z-index:2;height: 940px;flex-direction: column;justify-content: space-between;" |
| | | > |
| | | <!-- ä¸è¾¹--> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <div style="width:100%"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cxjg" class="svg_class" /> |
| | | çäº§ä¿¡æ¯ |
| | | </div> |
| | | |
| | | <div style="height: 450px"> |
| | | <dv-border-box-12> |
| | | <dv-scroll-board |
| | | ref="scrollBoardTop" |
| | | :config="configTableTop" |
| | | style="width: 99%;height: 430px;margin:0 auto;padding-top: 13px;" |
| | | /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ä¸è¾¹--> |
| | | <div style="display: flex;justify-content: space-between;margin-top: 15px;"> |
| | | <div style="width: 1000px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="blcs" class="svg_class" /> |
| | | è´¨éä¸è¯(è¿ä¸å¨) |
| | | </div> |
| | | |
| | | <div style="height: 380px;"> |
| | | <dv-border-box-12> |
| | | <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | |
| | | </div> |
| | | <div style="width: 850px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="ckkc" class="svg_class" /> |
| | | ä¸è¯ç»è®¡(è¿ä¸æ) |
| | | </div> |
| | | <div style="height: 380px;"> |
| | | <dv-border-box-12> |
| | | <div id="cjzl04" class="flex_c_c" style="width: 100%;height:100%" /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import './kbCommon.css' |
| | | import { loadEcharts, cjzl04, cjzl03_2 } from '@/utils/myEcharts' |
| | | import { |
| | | WorkShopProduceBottomLeftData, |
| | | WorkShopProduceBottomRightData, |
| | | WorkShopProduceTopData |
| | | } from '@/api/kanbanManager' |
| | | |
| | | export default { |
| | | name: 'Cjsc', |
| | | data() { |
| | | return { |
| | | headTime: '', |
| | | |
| | | cjzl03_xData: [], |
| | | cjzl03_yData: [], |
| | | RightBottom: [], |
| | | |
| | | configTableTop: { |
| | | headerBGC: 'rgba(38, 68 ,139, 0.2)', // è¡¨å¤´èæ¯è² |
| | | oddRowBGC: 'transparent', // 奿°è¡èæ¯è² |
| | | evenRowBGC: 'transparent', // å¶æ°è¡èæ¯è² |
| | | headerHeight: 45, |
| | | waitTime: 3000, |
| | | rowNum: 8, |
| | | |
| | | header: [ |
| | | '<span style="color:#09d8f2;">å·¥åå·</span>', |
| | | '<span style="color:#09d8f2;">产åç¼ç </span>', |
| | | '<span style="color:#09d8f2;">产ååç§°</span>', |
| | | '<span style="color:#09d8f2;">产åè§æ ¼</span>', |
| | | '<span style="color:#09d8f2;">任塿°é</span>', |
| | | '<span style="color:#09d8f2;">åæ ¼æ°é</span>', |
| | | '<span style="color:#09d8f2;">ä¸è¯æ°é</span>', |
| | | '<span style="color:#09d8f2;">å·¥åºæ°é</span>', |
| | | '<span style="color:#09d8f2;">æåºæ°é</span>', |
| | | '<span style="color:#09d8f2;">å·¥åºé¡ºåº</span>', |
| | | '<span style="color:#09d8f2;">å·¥åºç¼ç </span>', |
| | | '<span style="color:#09d8f2;">å·¥åºåç§°</span>', |
| | | '<span style="color:#09d8f2;">宿è¿åº¦(%)</span>' |
| | | ], |
| | | data: [ |
| | | // ['<span style="color:#37a2da;">è¡1å1</span>', 'è¡1å2', 'è¡1å3'], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] |
| | | |
| | | ], |
| | | // index: true, |
| | | columnWidth: [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150], |
| | | align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'] |
| | | // carousel: 'page' |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | setInterval(this.getNowTime, 1000) |
| | | |
| | | // 䏤尿¶çæ¿å·æ°ä¸æ¬¡ |
| | | setInterval(() => { |
| | | window.location.reload() |
| | | }, 1000 * 60 * 120) |
| | | }, |
| | | mounted() { |
| | | this.getWorkShopProduceTopData() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceTopData() |
| | | }, 10 * 1000) |
| | | |
| | | this.getWorkShopProduceBottomLeftData() |
| | | this.getWorkShopProduceBottomRightData() |
| | | }, |
| | | methods: { |
| | | getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData({ wkshopcode: '1502' }).then(res => { |
| | | const flag = this.compareArrays(this.configTableTop.data, res.data) |
| | | if (!flag) { |
| | | this.configTableTop.data = res.data.map(i => |
| | | [ |
| | | i.wo_code, |
| | | i.partcode, |
| | | i.partname, |
| | | i.partspec ? i.partspec : '/', |
| | | i.plan_qty, |
| | | i.good_qty, |
| | | `<span style="color: red;">${i.ng_qty}</span>`, |
| | | `<span style="color: red;">${i.laborbad_qty}</span>`, |
| | | `<span style="color: red;">${i.materielbad_qty}</span>`, |
| | | i.seq, |
| | | i.step_code, |
| | | i.step_name, |
| | | parseFloat(i.schedule.toFixed(2)) |
| | | ] |
| | | ) |
| | | this.$refs['scrollBoardTop'].updateRows(this.configTableTop.data) |
| | | } |
| | | }) |
| | | }, |
| | | async getWorkShopProduceBottomLeftData() { |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: '1502' }) |
| | | this.cjzl03_xData = res4.data.map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data.map(i => i.count) |
| | | |
| | | loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.cjzl03_yData)) |
| | | }, |
| | | |
| | | async getWorkShopProduceBottomRightData() { |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: '1502' }) |
| | | this.RightBottom = res5.data |
| | | if (this.RightBottom.length > 0) { |
| | | loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont))) |
| | | } |
| | | }, |
| | | |
| | | // è·åå½åæ¶é´ |
| | | getNowTime() { |
| | | const dt = new Date() |
| | | const wk = dt.getDay() |
| | | const y = dt.getFullYear() |
| | | const m = (dt.getMonth() + 1 + '').padStart(2, '0') |
| | | const d = (dt.getDate() + '').padStart(2, '0') |
| | | |
| | | const hh = (dt.getHours() + '').padStart(2, '0') |
| | | const mm = (dt.getMinutes() + '').padStart(2, '0') |
| | | const ss = (dt.getSeconds() + '').padStart(2, '0') |
| | | const weeks = ['æææ¥', 'ææä¸', 'ææäº', 'ææä¸', 'ææå', 'ææäº', 'ææå
'] |
| | | const week = weeks[wk] |
| | | |
| | | this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}` |
| | | }, |
| | | |
| | | // 两个æ°ç»åå¯¹æ¯ |
| | | compareArrays(arr1, arr2) { |
| | | const set1 = new Set(arr1) |
| | | const set2 = new Set(arr2) |
| | | |
| | | if (set1.size !== set2.size) { |
| | | return false |
| | | } |
| | | |
| | | for (const value of set1) { |
| | | if (!set2.has(value)) { |
| | | return false |
| | | } |
| | | } |
| | | |
| | | return true |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | ::v-deep .header-item { |
| | | font-size: 16px !important; |
| | | } |
| | | |
| | | ::v-deep .row-item { |
| | | font-size: 16px !important; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <dv-border-box-12 style="height: 415px;"> |
| | | <div style="display: flex;justify-content: center;position: relative"> |
| | | <div class="kb_center_block_children all_block05"> |
| | | <div style="font-size: 24px;">{{ parseFloat(RightBottom.Y) }}</div> |
| | | <div style="font-size: 24px;">{{ RightBottom? parseFloat(RightBottom.Y):'NaN' }}</div> |
| | | <div class="box02" /> |
| | | <div>åææ</div> |
| | | </div> |
| | | <div class="kb_center_block_children all_block06"> |
| | | <div style="font-size: 24px;">{{ parseFloat(RightBottom.B) }}</div> |
| | | <div style="font-size: 24px;">{{ RightBottom? parseFloat(RightBottom.B):'NaN' }}</div> |
| | | <div class="box02" /> |
| | | <div>åæå</div> |
| | | </div> |
| | | <div class="kb_center_block_children all_block07"> |
| | | <div style="font-size: 24px;">{{ parseFloat(RightBottom.C) }}</div> |
| | | <div style="font-size: 24px;">{{ RightBottom? parseFloat(RightBottom.C):'NaN' }}</div> |
| | | <div class="box02" /> |
| | | <div>产æå</div> |
| | | </div> |
| | |
| | | }, |
| | | methods: { |
| | | getWorkShopCompreLeftTop() { |
| | | WorkShopCompreLeftTop().then(res2 => { |
| | | WorkShopCompreLeftTop({ wkshopcode: '1501,1502' }).then(res2 => { |
| | | this.LeftTopData01 = [] |
| | | this.LeftTopData02 = [] |
| | | res2.data.LeftTop.forEach(i => { |
| | |
| | | }, |
| | | proxy: { |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: 'http://192.168.1.237:8000', // 请æ±ç第ä¸â½
æ¥â¼å°å å®¢æ· |
| | | // target: 'http://121.196.36.24:8032', // 请æ±ç第ä¸â½
æ¥â¼å°å æ¬å°å¼åæå¡å¨ |
| | | // target: 'http://192.168.1.237:8000', // 请æ±ç第ä¸â½
æ¥â¼å°å å®¢æ· |
| | | target: 'http://192.168.2.254:8000', // 请æ±ç第ä¸â½
æ¥â¼å°å æ¬å°å¼åæå¡å¨ 沣沣 |
| | | changeOrigin: true, // 请æ±è·¨åæ¶ï¼é é
ç½®æ¤é¡¹ |
| | | pathRewrite: { // è·¯å¾éå,æ¿æ¢targetä¸ç请æ±å°å |
| | | ['^' + process.env.VUE_APP_BASE_API]: '/api/' |