| | |
| | | "test:ci": "npm run lint && npm run test:unit" |
| | | }, |
| | | "dependencies": { |
| | | "@jiaminghi/data-view": "^2.10.0", |
| | | "@microsoft/signalr": "^7.0.9", |
| | | "array-to-tree": "^3.3.2", |
| | | "axios": "0.18.1", |
| | |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // éè´è®¢åè·è¸ªç®¡ççæ¿,左䏿¬æéè´è®¢åæ°ãæ¬æéè´è¿è´§åæ°ãæ¬æéè´å
¥åºåæ° |
| | | export function PurchaseLeftTop() { |
| | | return request({ |
| | | url: 'KanBanManagerent/PurchaseLeftTop', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // éè´è®¢åè·è¸ªç®¡ççæ¿,å·¦ä¸éè´è®¢åè·è¸ªå表 |
| | | export function PurchaseLeftBottom() { |
| | | return request({ |
| | | url: 'KanBanManagerent/PurchaseLeftBottom', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // éè´è®¢åè·è¸ªç®¡ççæ¿,å³ä¾§Top |
| | | export function PurchaseRight() { |
| | | return request({ |
| | | url: 'KanBanManagerent/PurchaseRight', |
| | | method: 'get' |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1715311316427" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4301" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M808.71424 194.21184c-18.5344 48.41472-33.87392 81.87904-45.99808 100.41344 7.29088 0 21.79072-0.77824 43.56096-2.37568 6.4512 0 11.30496-0.4096 14.49984-1.24928a2503.2704 2503.2704 0 0 0-14.49984-37.4784c-3.19488-7.2704-1.18784-12.53376 6.0416-15.74912 7.2704-2.41664 12.4928-0.4096 15.74912 6.0416 1.59744 4.85376 3.19488 10.05568 4.85376 15.74912 8.88832 23.38816 15.33952 42.33216 19.3536 56.832 1.59744 8.88832-0.83968 14.56128-7.2704 16.93696-7.29088 0.8192-12.0832-2.78528-14.49984-10.83392-0.8192 0-2.00704-3.25632-3.66592-9.70752-12.9024 0.8192-28.59008 2.02752-47.18592 3.60448h-30.24896c-9.64608 0-15.68768-2.00704-18.1248-6.0416-1.59744-4.85376 0-11.30496 4.85376-19.3536 16.11776-24.9856 32.62464-60.49792 49.62304-106.45504 3.19488-8.11008 8.45824-10.89536 15.68768-8.45824 7.2704 4.03456 9.68704 10.07616 7.2704 18.1248zM341.27872 81.01888h24.59648a111.7184 111.7184 0 0 1 31.82592-51.63008 110.61248 110.61248 0 0 1 150.13888 0.02048 112.31232 112.31232 0 0 1 28.03712 40.50944 255.03744 255.03744 0 0 1 352.58368 8.47872 255.03744 255.03744 0 0 1-3.35872 364.70784v468.50048C925.0816 973.39392 874.496 1024 812.66688 1024H132.9152a112.06656 112.06656 0 0 1-79.42144-33.01376A112.10752 112.10752 0 0 1 20.48 911.5648V249.63072C20.50048 187.8016 71.08608 137.216 132.9152 137.216h132.56704c3.85024-12.51328 10.73152-23.7568 19.80416-32.82944l0.08192-0.08192-0.08192 0.08192 0.08192-0.08192a78.99136 78.99136 0 0 1 55.9104-23.28576z m197.24288 31.232l-0.55296-6.69696a65.26976 65.26976 0 0 0-20.86912-42.74176 65.18784 65.18784 0 0 0-44.31872-17.32608 65.37216 65.37216 0 0 0-65.20832 60.06784l-1.72032 20.97152h-64.59392c-9.3184 0-17.75616 3.76832-23.83872 9.85088l-0.08192 0.08192a33.60768 33.60768 0 0 0-9.85088 23.83872v72.31488c0 9.25696 3.80928 17.7152 9.9328 23.83872h-0.08192a33.792 33.792 0 0 0 23.92064 9.9328h150.77376a254.3616 254.3616 0 0 1 46.4896-154.13248z m-41.08288 199.59808h-156.16a79.0528 79.0528 0 0 1-55.9104-23.26528h-0.08192a79.03232 79.03232 0 0 1-23.26528-55.99232V182.70208H132.9152a67.11296 67.11296 0 0 0-66.92864 66.92864V911.5648c0 18.39104 7.53664 35.1232 19.68128 47.26784 12.14464 12.14464 28.8768 19.68128 47.26784 19.68128h679.75168a67.11296 67.11296 0 0 0 66.92864-66.92864V478.08512a253.99296 253.99296 0 0 1-131.87072 36.80256c-36.1472 0-70.57408-7.5776-101.7856-21.1968H225.44384c-32.39936 0-32.48128-45.48608 0-45.48608h350.33088a255.8976 255.8976 0 0 1-78.336-136.35584zM225.44384 775.2704h494.67392c32.41984 0 32.48128 45.48608 0 45.48608H225.44384c-32.39936 0-32.48128-45.48608 0-45.48608z m0-163.5328h494.67392c32.41984 0 32.48128 45.48608 0 45.48608H225.44384c-32.39936 0-32.48128-45.48608 0-45.48608zM747.7248 48.80384a209.63328 209.63328 0 0 0-148.56192 61.72672 209.63328 209.63328 0 0 0 0 297.14432 209.63328 209.63328 0 0 0 148.56192 61.72672c115.8144 0 210.28864-94.47424 210.28864-210.28864 0-57.89696-23.63392-110.46912-61.72672-148.56192a209.57184 209.57184 0 0 0-148.56192-61.7472z m38.01088 71.5776c-1.65888 7.2704-2.84672 12.53376-3.66592 15.74912h82.28864c14.49984 0 22.20032 7.2704 22.97856 21.79072v90.74688c0 17.75616-0.77824 33.44384-2.43712 47.18592a506.88 506.88 0 0 1-3.62496 39.91552c-4.03456 44.40064-30.24896 62.50496-78.62272 54.45632-8.11008-1.59744-12.12416-6.8608-12.12416-15.74912 1.65888-8.04864 6.4512-11.6736 14.56128-10.89536 32.27648 6.4512 49.60256-3.19488 51.97824-29.02016 4.07552-15.33952 6.4512-43.56096 7.2704-84.72576V169.984c0-7.22944-3.60448-10.89536-10.89536-10.89536h-78.62272a628.8384 628.8384 0 0 1-25.43616 52.03968c-6.4512 8.86784-13.27104 12.12416-20.54144 9.70752-6.4512-4.85376-6.8608-11.71456-1.18784-20.60288 12.0832-17.7152 24.1664-46.36672 36.29056-85.9136 2.43712-8.04864 7.22944-11.24352 14.49984-9.64608 6.47168 2.43712 8.88832 7.65952 7.29088 15.70816z m-107.68384 56.89344c0.77824 12.0832 1.18784 31.8464 1.18784 59.24864-0.8192 41.984-4.44416 72.64256-10.89536 91.99616-7.22944 22.54848-20.13184 42.33216-38.7072 59.26912-7.22944 5.67296-13.68064 5.67296-19.3536 0-4.03456-5.632-2.43712-11.6736 4.85376-18.1248 30.65856-29.06112 44.7488-73.80992 42.33216-134.32832v-13.312-43.56096c-0.77824-8.04864 2.00704-12.4928 8.47872-13.27104 7.24992 0.77824 11.28448 4.79232 12.10368 12.0832z m19.37408 147.59936c8.04864 7.2704 16.91648 17.34656 26.58304 30.24896l7.2704 7.2704c4.03456 6.4512 3.62496 12.0832-1.2288 16.93696-5.632 4.85376-10.83392 4.44416-15.68768-1.18784a264.704 264.704 0 0 0-25.3952-26.64448c-3.25632-3.19488-5.26336-6.0416-6.10304-8.45824-5.632-5.632-6.4512-11.30496-2.37568-16.93696 4.79232-4.85376 10.46528-5.26336 16.93696-1.2288z m6.02112-205.68064c11.30496-0.8192 16.93696 7.63904 16.93696 25.3952v152.43264c-0.83968 8.86784-4.85376 14.15168-12.0832 15.74912-7.2704-0.8192-10.87488-5.632-10.87488-14.49984v-145.2032c0-7.22944-3.25632-10.89536-9.70752-10.89536h-35.10272c-9.64608 0.83968-14.49984 4.85376-14.49984 12.14464v139.12064c-0.77824 8.88832-4.85376 14.09024-12.0832 15.74912-7.2704-0.83968-10.89536-5.67296-10.89536-14.56128V143.40096c-1.59744-16.91648 7.63904-25.02656 27.81184-24.20736h60.49792z" fill="#00ffff" p-id="4302"></path></svg> |
| | |
| | | // å¼ç¨ä¿®æ¹è¿çgantt |
| | | Vue.use(vGanttChart) |
| | | |
| | | import dataV from '@jiaminghi/data-view' |
| | | Vue.use(dataV) |
| | | |
| | | new Vue({ |
| | | el: '#app', |
| | | router, |
| | |
| | | |
| | | NProgress.configure({ showSpinner: false }) // NProgress Configuration |
| | | |
| | | const whiteList = ['/login', '/zhkb', '/cj', '/ckgl'] // no redirect whitelist |
| | | const whiteList = ['/login', '/zhkb', '/zpcj', '/dccj', '/bzcj', '/ckgl', '/cgdd'] // no redirect whitelist |
| | | |
| | | router.beforeEach(async(to, from, next) => { |
| | | // start progress bar |
| | |
| | | component: () => import('@/views/kanbanManager/zhkb'), |
| | | hidden: true |
| | | }, { |
| | | path: '/cj', |
| | | component: () => import('@/views/kanbanManager/cj'), |
| | | path: '/cgdd', |
| | | component: () => import('@/views/kanbanManager/cgdd'), |
| | | hidden: true |
| | | }, { |
| | | path: '/zpcj', |
| | | component: () => import('@/views/kanbanManager/zpcj'), |
| | | hidden: true |
| | | }, { |
| | | path: '/dccj', |
| | | component: () => import('@/views/kanbanManager/dccj'), |
| | | hidden: true |
| | | }, { |
| | | path: '/bzcj', |
| | | component: () => import('@/views/kanbanManager/bzcj'), |
| | | hidden: true |
| | | }, { |
| | | path: '/ckgl', |
| | |
| | | |
| | | const titlename = titlenameArr.filter((item, index) => index < 5) |
| | | |
| | | const length = titlename.length |
| | | if (titlename.length < 5) { |
| | | for (let i = 0; i < 5 - length; i++) { |
| | | titlename.push('0') |
| | | } |
| | | } |
| | | // const length = titlename.length |
| | | // if (titlename.length < 5) { |
| | | // for (let i = 0; i < 5 - length; i++) { |
| | | // titlename.push('0') |
| | | // } |
| | | // } |
| | | |
| | | console.log(titlename, 123) |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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, , 130, 130 |
| | | columnWidth: [200, 140, 350, 350, 130, 130, 130, 130, 130, 130, 130], |
| | | align: ['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() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomLeftData() |
| | | }, 20 * 1000) |
| | | this.getWorkShopProduceBottomRightData() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomRightData() |
| | | }, 30 * 1000) |
| | | }, |
| | | methods: { |
| | | getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData({ wkshopcode: 'CJ003' }).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>`, |
| | | i.seq, |
| | | i.step_code, |
| | | i.step_name, |
| | | parseFloat(i.schedule.toFixed(2)) |
| | | ] |
| | | ) |
| | | // `<span style="color: red;">${i.laborbad_qty}</span>`, |
| | | // `<span style="color: red;">${i.materielbad_qty}</span>`, |
| | | this.$refs['scrollBoardTop'].updateRows(this.configTableTop.data) |
| | | } |
| | | }) |
| | | }, |
| | | async getWorkShopProduceBottomLeftData() { |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: 'CJ003' }) |
| | | this.cjzl03_xData = res4.data['CJ003'].map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data['CJ003'].map(i => i.count) |
| | | |
| | | loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.cjzl03_yData)) |
| | | }, |
| | | |
| | | async getWorkShopProduceBottomRightData() { |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: 'CJ003' }) |
| | | 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> |
| | |
| | | <!--<template>-->
|
| | | <!-- <div>-->
|
| | | <!-- <div class="kb_dashboard">-->
|
| | |
|
| | | <!-- <!– æç©ºè毖>-->
|
| | | <!-- <div ref="starsRef" class="stars">-->
|
| | | <!-- <div v-for="(item, index) in starsCount" :key="index" class="star" />-->
|
| | | <!-- </div>-->
|
| | |
|
| | | <!-- <div class="kb_header">-->
|
| | | <!-- <div class="flex_c_c kb_header_text">-->
|
| | | <!-- <div id="topBarLeft" style="width:600px;height:100%" />-->
|
| | | <!-- éè´è·è¸ªæ°ååçæ¿-->
|
| | | <!-- <div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />-->
|
| | | <!-- </div>-->
|
| | |
|
| | | <!-- <div class="kb_headTime" style="left: 85px">-->
|
| | | <!-- <span>æµæ±æ°å¯è¿ªæ°åç§æè¡ä»½æéå
¬å¸</span>-->
|
| | | <!-- </div>-->
|
| | |
|
| | | <!-- <div class="kb_headTime">-->
|
| | | <!-- <span>{{ headTime }}</span>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 980px">-->
|
| | | <!-- <div style="width: 1250px;" class="flex_c_b">-->
|
| | | <!-- <div style="height: 380px;">-->
|
| | | <!-- <div>-->
|
| | | <!-- <div class="smallTitle">-->
|
| | | <!-- <svg-icon icon-class="cggz" class="svg_class" />-->
|
| | | <!-- éè´è·è¸ª-->
|
| | | <!-- </div>-->
|
| | | <!-- <div class="lineContent horn" style="height: 345px">-->
|
| | | <!-- <div id="cgddchart" class="flex_c_c" style="width: 100%;height:100%" />-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- <div style="height: 560px; ">-->
|
| | | <!-- <div>-->
|
| | | <!-- <div class="smallTitle">-->
|
| | | <!-- <svg-icon icon-class="cggz" class="svg_class" />-->
|
| | | <!-- éè´å°è´§è·è¸ª-->
|
| | | <!-- </div>-->
|
| | | <!-- <div class="lineContent horn" style="height: 525px">-->
|
| | | <!-- <el-table-->
|
| | | <!-- ref="tableData"-->
|
| | | <!-- :data="tableData"-->
|
| | | <!-- class="tableData"-->
|
| | | <!-- style="width: 100%;"-->
|
| | | <!-- :header-cell-style="headerCellStyleCenter"-->
|
| | | <!-- :cell-style="cellStyleCenter"-->
|
| | | <!-- height="515"-->
|
| | | <!-- >-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="PurchaseOrder"-->
|
| | | <!-- label="éè´è®¢å"-->
|
| | | <!-- width="225"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div class="ellipsis">{{ row.PurchaseOrder }}</div>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="suppername"-->
|
| | | <!-- label="ä¾åºå"-->
|
| | | <!-- width="183"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.suppername" class="ellipsis">{{ row.suppername }}</div>-->
|
| | | <!-- <div v-else />-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <!– <el-table-column–>-->
|
| | | <!-- <!– prop="username"–>-->
|
| | | <!-- <!– label="éè´å"–>-->
|
| | | <!-- <!– width="78"–>-->
|
| | | <!-- <!– >–>-->
|
| | | <!-- <!– <template slot-scope="{row}">–>-->
|
| | | <!-- <!– <div v-if="row.username">{{ row.username }}</div>–>-->
|
| | | <!-- <!– <div v-else>/</div>–>-->
|
| | | <!-- <!– </template>–>-->
|
| | | <!-- <!– </el-table-column>–>-->
|
| | |
|
| | | <!-- <!– <el-table-column–>-->
|
| | | <!-- <!– prop="partcode"–>-->
|
| | | <!-- <!– label="产åç¼ç "–>-->
|
| | | <!-- <!– width="108"–>-->
|
| | | <!-- <!– />–>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="partname"-->
|
| | | <!-- label="产ååç§°"-->
|
| | | <!-- width="215"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>-->
|
| | | <!-- <div v-else />-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <!– <el-table-column–>-->
|
| | | <!-- <!– prop="partspec"–>-->
|
| | | <!-- <!– label="è§æ ¼åå·"–>-->
|
| | | <!-- <!– width="130"–>-->
|
| | | <!-- <!– >–>-->
|
| | | <!-- <!– <template slot-scope="{row}">–>-->
|
| | | <!-- <!– <div v-if="row.partspec" class="ellipsis">{{ row.partspec }}</div>–>-->
|
| | | <!-- <!– <div v-else>/</div>–>-->
|
| | | <!-- <!– </template>–>-->
|
| | | <!-- <!– </el-table-column>–>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="quantity"-->
|
| | | <!-- label="è®¢åæ°é"-->
|
| | | <!-- width="114"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.quantity">{{ parseFloat(row.quantity) }}</div>-->
|
| | | <!-- <div v-else>0</div>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <!– <el-table-column–>-->
|
| | | <!-- <!– prop="checktype"–>-->
|
| | | <!-- <!– label="æ£éªç¶æ"–>-->
|
| | | <!-- <!– width="104"–>-->
|
| | | <!-- <!– >–>-->
|
| | | <!-- <!– <template slot-scope="{row}">–>-->
|
| | | <!-- <!– <div v-if="row.checktype===null">æªæ£éª</div>–>-->
|
| | | <!-- <!– <div v-else>å·²æ£éª</div>–>-->
|
| | | <!-- <!– </template>–>-->
|
| | | <!-- <!– </el-table-column>–>-->
|
| | | <!-- <!– <el-table-column–>-->
|
| | | <!-- <!– prop="checkuser"–>-->
|
| | | <!-- <!– label="æ£éªäººå"–>-->
|
| | | <!-- <!– width="94"–>-->
|
| | | <!-- <!– >–>-->
|
| | | <!-- <!– <template slot-scope="{row}">–>-->
|
| | | <!-- <!– <div v-if="row.checkuser===null">/</div>–>-->
|
| | | <!-- <!– <div v-else>{{ row.checkuser }}</div>–>-->
|
| | | <!-- <!– </template>–>-->
|
| | | <!-- <!– </el-table-column>–>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="quantity1"-->
|
| | | <!-- label="å·²æ¶æ°é"-->
|
| | | <!-- width="114"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.quantity1">{{ parseFloat(row.quantity1) }}</div>-->
|
| | | <!-- <div v-else>0</div>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- label="æªæ¶æ°é"-->
|
| | | <!-- width="114"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div>-->
|
| | | <!-- <div v-else>0</div>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="acceptDate"-->
|
| | | <!-- label="é¢è®¡äº¤æ"-->
|
| | | <!-- width="135"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.acceptDate">{{ row.acceptDate.substring(0, 10) }}</div>-->
|
| | | <!-- <div v-else>/</div>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="warning"-->
|
| | | <!-- label="å»¶æå¤©æ°"-->
|
| | | <!-- width="144"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="parseFloat(row.warning)<0" style="color: red">{{-->
|
| | | <!-- Math.abs(parseFloat(row.warning))-->
|
| | | <!-- }}-->
|
| | | <!-- </div>-->
|
| | | <!-- <div v-else-if="row.warning===null||row.warning===''||row.warning>=0">0</div>-->
|
| | | <!-- <!– <div v-else-if="parseFloat(row.warning)>3">{{ row.warning }}</div>–>-->
|
| | | <!-- <!– <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;">–>-->
|
| | | <!-- <!– {{ row.warning }}–>-->
|
| | | <!-- <!– </div>–>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- </el-table>-->
|
| | | <!-- <!– <div id="cgddchart" class="flex_c_c" style="width: 100%;height:100%" />–>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- <div style="width: 600px;">-->
|
| | | <!-- <div>-->
|
| | | <!-- <div class="smallTitle">-->
|
| | | <!-- <svg-icon icon-class="yqjh" class="svg_class" />-->
|
| | | <!-- ä¾åºåå»¶æäº¤è´§æè¡-->
|
| | | <!-- </div>-->
|
| | | <!-- <div class="lineContent horn" style="height: 925px">-->
|
| | | <!-- <el-table-->
|
| | | <!-- ref="tableDataRank"-->
|
| | | <!-- :data="tableDataRank"-->
|
| | | <!-- class="tableData"-->
|
| | | <!-- style="width: 100%;"-->
|
| | | <!-- :header-cell-style="headerCellStyleCenter"-->
|
| | | <!-- :cell-style="cellStyleCenter"-->
|
| | | <!-- :row-class-name="tableRowClassName"-->
|
| | | <!-- height="920"-->
|
| | | <!-- >-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- type="index"-->
|
| | | <!-- label="åºå·"-->
|
| | | <!-- width="80"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div>NO.{{ row.index }}</div>-->
|
| | | <!-- <!– <div>NO.100</div>–>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <!– <el-table-column–>-->
|
| | | <!-- <!– prop="cj"–>-->
|
| | | <!-- <!– label="车é´"–>-->
|
| | | <!-- <!– width="100"–>-->
|
| | | <!-- <!– />–>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="suppercode"-->
|
| | | <!-- label="ä¾åºåç¼ç "-->
|
| | | <!-- width="140"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div v-if="row.suppercode" class="ellipsis">{{ row.suppercode }}</div>-->
|
| | | <!-- <div v-else />-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="suppername"-->
|
| | | <!-- width="293"-->
|
| | | <!-- label="ä¾åºååç§°"-->
|
| | | <!-- >-->
|
| | | <!-- <template slot-scope="{row}">-->
|
| | | <!-- <div class="ellipsis">{{ row.suppername }}</div>-->
|
| | | <!-- </template>-->
|
| | | <!-- </el-table-column>-->
|
| | | <!-- <el-table-column-->
|
| | | <!-- prop="cont"-->
|
| | | <!-- label="次æ°"-->
|
| | | <!-- width="81"-->
|
| | | <!-- />-->
|
| | | <!-- </el-table>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | |
|
| | | <!-- </div>-->
|
| | | <!-- </div>-->
|
| | | <!--</template>-->
|
| | |
|
| | | <!--<script>-->
|
| | | <!--import './kbCommon.css'-->
|
| | | <!--import { cgddchart, kbTop, loadEcharts } from '@/utils/myEcharts'-->
|
| | | <!--import { PurchaseLeftBottom, PurchaseLeftTop, PurchaseRight } from '@/api/kanbanManager'-->
|
| | |
|
| | | <!--export default {-->
|
| | | <!-- name: 'Index2',-->
|
| | | <!-- data() {-->
|
| | | <!-- return {-->
|
| | | <!-- onLine: navigator.onLine, // çå¬ç½ç»æ¯å¦å¨çº¿-->
|
| | |
|
| | | <!-- headTime: '',-->
|
| | | <!-- purchaseLeftTopData: {},-->
|
| | |
|
| | | <!-- tableData: [],-->
|
| | | <!-- tableDataRank: [],-->
|
| | |
|
| | | <!-- PurchaseRight: null,-->
|
| | | <!-- PurchaseLeftBottom: null,-->
|
| | |
|
| | | <!-- starsCount: 800, // æææ°é-->
|
| | | <!-- distance: 900 // é´è·-->
|
| | |
|
| | | <!-- }-->
|
| | | <!-- },-->
|
| | |
|
| | | <!-- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {-->
|
| | | <!-- setInterval(this.getNowTime, 1000)-->
|
| | |
|
| | | <!-- // 䏤尿¶çæ¿å·æ°ä¸æ¬¡-->
|
| | | <!-- setInterval(() => {-->
|
| | | <!-- window.location.reload()-->
|
| | | <!-- }, 1000 * 60 * 60 * 10)-->
|
| | | <!-- },-->
|
| | | <!-- mounted() {-->
|
| | | <!-- // çå¬ç½ç»æ¯å¦å¨çº¿-->
|
| | | <!-- window.addEventListener('online', this.updateOnlineStatus)-->
|
| | | <!-- window.addEventListener('offline', this.updateOnlineStatus)-->
|
| | | <!-- this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })-->
|
| | |
|
| | | <!-- this.getTopBar()-->
|
| | | <!-- this.getEcharts()-->
|
| | | <!-- this.getPurchaseLeftBottom()-->
|
| | | <!-- this.getPurchaseRight()-->
|
| | |
|
| | | <!-- this.setStarsRef()-->
|
| | | <!-- },-->
|
| | | <!-- beforeDestroy() {-->
|
| | | <!-- window.removeEventListener('online', this.updateOnlineStatus)-->
|
| | | <!-- window.removeEventListener('offline', this.updateOnlineStatus)-->
|
| | | <!-- },-->
|
| | | <!-- methods: {-->
|
| | | <!-- // æ´æ°ç½ç»ç¶æ-->
|
| | | <!-- updateOnlineStatus(e) {-->
|
| | | <!-- if (e.isFirst) {-->
|
| | | <!-- // console.log('x')-->
|
| | | <!-- } else {-->
|
| | | <!-- const loading = this.$loading({-->
|
| | | <!-- lock: true,-->
|
| | | <!-- text: 'æç½äºï¼æ£å¨æ¼å½èç½ä¸ï¼è¯·æ£æ¥ç½ç»æ¯å¦æ£å¸¸...',-->
|
| | | <!-- spinner: 'el-icon-loading',-->
|
| | | <!-- customClass: 'osloading',-->
|
| | | <!-- background: 'rgba(0, 0, 0, 0.7)'-->
|
| | | <!-- })-->
|
| | | <!-- const { type } = e-->
|
| | | <!-- this.onLine = type === 'online'-->
|
| | | <!-- if (this.onLine) {-->
|
| | | <!-- loading.close()-->
|
| | | <!-- this.$message.success('ç½ç»è¿æ¥æåï¼')-->
|
| | | <!-- } else {-->
|
| | | <!-- this.$message.error('ç½ç»æçº¿ï¼è¯·å
³æ³¨ç½ç»ç¶æï¼')-->
|
| | | <!-- }-->
|
| | | <!-- }-->
|
| | | <!-- },-->
|
| | | <!-- setStarsRef() {-->
|
| | | <!-- const starNodes = Array.from(this.$refs.starsRef.children)-->
|
| | | <!-- starNodes.forEach(item => {-->
|
| | | <!-- const speed = 0.2 + Math.random() * 1-->
|
| | | <!-- const thisDistance = this.distance + Math.random() * 300-->
|
| | | <!-- item.style.transformOrigin = `0 0 ${thisDistance}px`-->
|
| | | <!-- item.style.transform = `-->
|
| | | <!-- translate3d(0,0,-${thisDistance}px)-->
|
| | | <!-- rotateY(${Math.random() * 360}deg)-->
|
| | | <!-- rotateX(${Math.random() * -50}deg)-->
|
| | | <!-- scale(${speed},${speed})`-->
|
| | | <!-- })-->
|
| | | <!-- },-->
|
| | | <!-- // è·åtopEcharts-->
|
| | | <!-- getTopBar() {-->
|
| | | <!-- loadEcharts('topBarLeft', kbTop())-->
|
| | | <!-- loadEcharts('topBarRight', kbTop())-->
|
| | | <!-- },-->
|
| | | <!-- // è·åecharts-->
|
| | | <!-- async getEcharts() {-->
|
| | | <!-- PurchaseLeftTop().then(res => {-->
|
| | | <!-- this.purchaseLeftTopData = res.data[0]-->
|
| | | <!-- loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))-->
|
| | | <!-- // loadEcharts('cgddchart', cgddchart(30, 5, 10))-->
|
| | | <!-- })-->
|
| | | <!-- setInterval(() => {-->
|
| | | <!-- PurchaseLeftTop().then(res => {-->
|
| | | <!-- this.purchaseLeftTopData = res.data[0]-->
|
| | | <!-- loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))-->
|
| | | <!-- })-->
|
| | | <!-- }, 1000 * 6)-->
|
| | | <!-- },-->
|
| | | <!-- getPurchaseLeftBottom() {-->
|
| | | <!-- PurchaseLeftBottom().then(res => {-->
|
| | | <!-- this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// è¿æ»¤æå·²æ¶æ°é大äºé¶çå¼-->
|
| | |
|
| | | <!-- // this.number1 = this.tableData.length-->
|
| | |
|
| | | <!-- const divData = this.$refs.tableData.bodyWrapper-->
|
| | | <!-- // æ¿å°å
ç´ åï¼å¯¹å
ç´ è¿è¡å®æ¶å¢å è·ç¦»é¡¶é¨è·ç¦»ï¼å®ç°æ»å¨ææ(æ¤é
置为æ¯100毫ç§ç§»å¨1åç´ )-->
|
| | | <!-- this.PurchaseLeftBottom = setInterval(() => {-->
|
| | | <!-- // å
ç´ èªå¢è·ç¦»é¡¶é¨1åç´ -->
|
| | | <!-- divData.scrollTop += 1-->
|
| | | <!-- // 夿å
ç´ æ¯å¦æ»å¨å°åºé¨(å¯è§é«åº¦+è·ç¦»é¡¶é¨=æ´ä¸ªé«åº¦)-->
|
| | | <!-- if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {-->
|
| | | <!-- // éç½®tableè·ç¦»é¡¶é¨è·ç¦»-->
|
| | | <!-- divData.scrollTop = 0-->
|
| | | <!-- PurchaseLeftBottom().then(res => {-->
|
| | | <!-- this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// è¿æ»¤æå·²æ¶æ°é大äºé¶çå¼-->
|
| | | <!-- // this.number1 = this.tableData.length-->
|
| | | <!-- if (this.tableData.length > 13) {-->
|
| | | <!-- clearInterval(this.PurchaseLeftBottom)-->
|
| | | <!-- this.getPurchaseLeftBottom()-->
|
| | | <!-- }-->
|
| | | <!-- })-->
|
| | | <!-- }-->
|
| | | <!-- }, this.tableData.length <= 13 ? 1000 * 3 : 100)-->
|
| | | <!-- })-->
|
| | | <!-- },-->
|
| | | <!-- getPurchaseRight() {-->
|
| | | <!-- PurchaseRight().then(res => {-->
|
| | | <!-- this.tableDataRank = res.data-->
|
| | | <!-- const divData = this.$refs.tableDataRank.bodyWrapper-->
|
| | | <!-- // æ¿å°å
ç´ åï¼å¯¹å
ç´ è¿è¡å®æ¶å¢å è·ç¦»é¡¶é¨è·ç¦»ï¼å®ç°æ»å¨ææ(æ¤é
置为æ¯100毫ç§ç§»å¨1åç´ )-->
|
| | | <!-- this.PurchaseRight = setInterval(() => {-->
|
| | | <!-- // å
ç´ èªå¢è·ç¦»é¡¶é¨1åç´ -->
|
| | | <!-- divData.scrollTop += 1-->
|
| | | <!-- // 夿å
ç´ æ¯å¦æ»å¨å°åºé¨(å¯è§é«åº¦+è·ç¦»é¡¶é¨=æ´ä¸ªé«åº¦)-->
|
| | | <!-- if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {-->
|
| | | <!-- // éç½®tableè·ç¦»é¡¶é¨è·ç¦»-->
|
| | | <!-- divData.scrollTop = 0-->
|
| | | <!-- PurchaseRight().then(res => {-->
|
| | | <!-- this.tableDataRank = res.data-->
|
| | | <!-- if (this.tableDataRank.length > 23) {-->
|
| | | <!-- clearInterval(this.PurchaseRight)-->
|
| | | <!-- this.getPurchaseRight()-->
|
| | | <!-- }-->
|
| | | <!-- })-->
|
| | | <!-- }-->
|
| | | <!-- }, this.tableDataRank.length <= 23 ? 1000 * 3 : 100)-->
|
| | | <!-- })-->
|
| | | <!-- },-->
|
| | | <!-- tableRowClassName({ row, rowIndex }) {-->
|
| | | <!-- // ææ¯ä¸è¡çç´¢å¼æ¾è¿row-->
|
| | | <!-- row.index = rowIndex + 1-->
|
| | | <!-- },-->
|
| | |
|
| | | <!-- // è·åå½åæ¶é´-->
|
| | | <!-- 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}`-->
|
| | | <!-- },-->
|
| | | <!-- headerCellStyleCenter() {-->
|
| | | <!-- return {-->
|
| | | <!-- // backgroundColor: 'rgb(30 ,33, 46)',-->
|
| | | <!-- backgroundColor: '#000',-->
|
| | | <!-- padding: '10px 0',-->
|
| | | <!-- textAlign: 'center',-->
|
| | | <!-- color: '#07acc2',-->
|
| | | <!-- border: 'none',-->
|
| | | <!-- fontSize: '18px'-->
|
| | | <!-- }-->
|
| | | <!-- },-->
|
| | | <!-- cellStyleCenter() {-->
|
| | | <!-- return {-->
|
| | | <!-- padding: '7.5px 0',-->
|
| | | <!-- textAlign: 'center',-->
|
| | | <!-- backgroundColor: '#000',-->
|
| | | <!-- color: '#fff',-->
|
| | | <!-- border: 'none',-->
|
| | | <!-- fontSize: '18px'-->
|
| | | <!-- }-->
|
| | | <!-- }-->
|
| | | <!-- }-->
|
| | | <!--}-->
|
| | | <!--</script>-->
|
| | |
|
| | | <!--<style scoped lang="scss">-->
|
| | | <!--$main_color: #09d8f2;-->
|
| | | <!--$color01: #00FFFF;-->
|
| | | <!--.tableData {-->
|
| | | <!-- background: #000;-->
|
| | | <!--}-->
|
| | |
|
| | | <!--.el-table__empty-text {-->
|
| | | <!-- color: $main_color;-->
|
| | | <!--}-->
|
| | |
|
| | | <!--::v-deep .el-table::before {-->
|
| | | <!-- height: 0;-->
|
| | | <!--}-->
|
| | |
|
| | | <!--::v-deep .el-table__body-wrapper::-webkit-scrollbar {-->
|
| | | <!-- /* width: 0;宽度为0æè */-->
|
| | | <!-- width: 0;-->
|
| | | <!--}-->
|
| | |
|
| | | <!--::v-deep .cell {-->
|
| | | <!-- padding: 0 !important;-->
|
| | | <!-- font-size: 18px;-->
|
| | | <!--}-->
|
| | | <!--</style>-->
|
| | | <!--<!–æç©º–>-->
|
| | | <!--<style lang="css" scoped>-->
|
| | | <!--@keyframes rotate {-->
|
| | | <!-- 0% {-->
|
| | | <!-- transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(0);-->
|
| | | <!-- }-->
|
| | | <!-- 100% {-->
|
| | | <!-- transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(-360deg);-->
|
| | | <!-- }-->
|
| | | <!--}-->
|
| | |
|
| | | <!--.stars {-->
|
| | | <!-- transform: perspective(500px);-->
|
| | | <!-- transform-style: preserve-3d;-->
|
| | | <!-- position: absolute;-->
|
| | | <!-- perspective-origin: 50% 100%;-->
|
| | | <!-- left: 45%;-->
|
| | | <!-- animation: rotate 90s infinite linear;-->
|
| | | <!-- bottom: 0;-->
|
| | | <!-- z-index: 102;-->
|
| | | <!--}-->
|
| | |
|
| | | <!--.star {-->
|
| | | <!-- width: 2px;-->
|
| | | <!-- height: 2px;-->
|
| | | <!-- /*background: #f7f7b6;*/-->
|
| | | <!-- background: #8edffc;-->
|
| | | <!-- position: absolute;-->
|
| | | <!-- left: 0;-->
|
| | | <!-- top: 0;-->
|
| | | <!-- backface-visibility: hidden;-->
|
| | | <!-- z-index: 102;-->
|
| | | <!--}-->
|
| | | <!--</style>-->
|
| | | <template> |
| | | <div> |
| | | <div class="kb_dashboard"> |
| | | |
| | | <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="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 950px"> |
| | | |
| | | <div style="width: 1250px;z-index: 2;margin-top: 50px;" class="flex_c_b"> |
| | | <div style="height: 380px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cggz" class="svg_class" /> |
| | | éè´è·è¸ª |
| | | </div> |
| | | <div style="height: 345px"> |
| | | <dv-border-box-12> |
| | | <div id="cgddchart" class="flex_c_c" style="width: 100%;height:100%" /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | <div style="height: 535px;margin-top:10px"> |
| | | <div> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cggz" class="svg_class" /> |
| | | éè´å°è´§è·è¸ª |
| | | </div> |
| | | <div style="height: 500px"> |
| | | <dv-border-box-12> |
| | | <dv-scroll-board |
| | | ref="scrollBoard" |
| | | :config="configTable" |
| | | style="width: 1226px;height: 96%;margin:0 auto;padding-top: 13px;" |
| | | /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="width: 600px;z-index: 2;margin-top: 50px;"> |
| | | <div> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="yqjh" class="svg_class" /> |
| | | ä¾åºåå»¶æäº¤è´§æè¡ |
| | | </div> |
| | | <div style="height: 890px"> |
| | | <dv-border-box-12> |
| | | <dv-scroll-board |
| | | ref="scrollBoardRight" |
| | | :config="configTableRight" |
| | | style="width: 580px;height: 96%;margin:0 auto;padding-top: 13px;" |
| | | /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import './kbCommon.css' |
| | | import { cgddchart, loadEcharts } from '@/utils/myEcharts' |
| | | import { |
| | | PurchaseLeftTop, PurchaseLeftBottom, PurchaseRight |
| | | } from '@/api/kanbanManager' |
| | | |
| | | export default { |
| | | name: 'Index2', |
| | | |
| | | data() { |
| | | return { |
| | | onLine: navigator.onLine, // çå¬ç½ç»æ¯å¦å¨çº¿ |
| | | |
| | | headTime: '', |
| | | purchaseLeftTopData: {}, |
| | | |
| | | configTable: { |
| | | 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>' |
| | | ], |
| | | data: [ |
| | | // ['<span style="color:#37a2da;">è¡1å1</span>', 'è¡1å2', 'è¡1å3'], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9] |
| | | |
| | | ], |
| | | index: true, |
| | | columnWidth: [50, 180, 300, 150, 150, 120, 120, 120, 120], |
| | | align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'] |
| | | // carousel: 'page' |
| | | }, |
| | | |
| | | configTableRight: { |
| | | headerBGC: 'rgba(38, 68 ,139, 0.2)', // è¡¨å¤´èæ¯è² |
| | | oddRowBGC: 'transparent', // 奿°è¡èæ¯è² |
| | | evenRowBGC: 'transparent', // å¶æ°è¡èæ¯è² |
| | | headerHeight: 45, |
| | | waitTime: 3000, |
| | | rowNum: 16, |
| | | |
| | | header: [ |
| | | '<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, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9] |
| | | |
| | | ], |
| | | index: true, |
| | | columnWidth: [50, 200, 200, 150], |
| | | align: ['center', 'center', 'center', 'center'] |
| | | // carousel: 'page' |
| | | } |
| | | |
| | | } |
| | | }, |
| | | |
| | | activated() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | created() { |
| | | setInterval(this.getNowTime, 1000) |
| | | |
| | | // 䏤尿¶çæ¿å·æ°ä¸æ¬¡ |
| | | setInterval(() => { |
| | | window.location.reload() |
| | | }, 1000 * 60 * 120) |
| | | }, |
| | | mounted() { |
| | | // çå¬ç½ç»æ¯å¦å¨çº¿ |
| | | window.addEventListener('online', this.updateOnlineStatus) |
| | | window.addEventListener('offline', this.updateOnlineStatus) |
| | | this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true }) |
| | | |
| | | this.getEcharts() |
| | | |
| | | this.getPurchaseLeftBottom() |
| | | setInterval(() => { |
| | | this.getPurchaseLeftBottom() |
| | | }, 15 * 1000) |
| | | |
| | | this.getPurchaseRight() |
| | | setInterval(() => { |
| | | this.getPurchaseRight() |
| | | }, 20 * 1000) |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('online', this.updateOnlineStatus) |
| | | window.removeEventListener('offline', this.updateOnlineStatus) |
| | | }, |
| | | methods: { |
| | | // æ´æ°ç½ç»ç¶æ |
| | | updateOnlineStatus(e) { |
| | | if (e.isFirst) { |
| | | // console.log('x') |
| | | } else { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: 'æç½äºï¼æ£å¨æ¼å½èç½ä¸ï¼è¯·æ£æ¥ç½ç»æ¯å¦æ£å¸¸...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | const { type } = e |
| | | this.onLine = type === 'online' |
| | | if (this.onLine) { |
| | | loading.close() |
| | | this.$message.success('ç½ç»è¿æ¥æåï¼') |
| | | } else { |
| | | this.$message.error('ç½ç»æçº¿ï¼è¯·å
³æ³¨ç½ç»ç¶æï¼') |
| | | } |
| | | } |
| | | }, |
| | | |
| | | getPurchaseLeftBottom() { |
| | | PurchaseLeftBottom().then(res => { |
| | | const flag = this.compareArrays(this.configTable.data, res.data) |
| | | if (!flag) { |
| | | this.configTable.data = res.data.map(i => |
| | | [ |
| | | i.PurchaseOrder, |
| | | i.suppername, |
| | | i.partname, |
| | | i.quantity, |
| | | i.quantity1, |
| | | `<span> ${parseFloat(i.quantity - i.quantity1)}</span>`, |
| | | i.acceptDate ? i.acceptDate.substring(0, 11) : i.acceptDate, |
| | | parseFloat(i.warning) < 0 ? `<span style="color: red;">${Math.abs(parseFloat(i.warning))}</span>` : `0` |
| | | ] |
| | | ) |
| | | this.$refs['scrollBoard'].updateRows(this.configTable.data) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getPurchaseRight() { |
| | | PurchaseRight().then(res => { |
| | | const flag = this.compareArrays(this.configTableRight.data, res.data) |
| | | if (!flag) { |
| | | this.configTableRight.data = res.data.map(i => |
| | | [ |
| | | i.suppercode, |
| | | i.suppername, |
| | | i.cont |
| | | ] |
| | | ) |
| | | this.$refs['scrollBoardRight'].updateRows(this.configTableRight.data) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 两个æ°ç»åå¯¹æ¯ |
| | | 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 |
| | | }, |
| | | |
| | | // è·åecharts |
| | | getEcharts() { |
| | | PurchaseLeftTop().then(res => { |
| | | this.purchaseLeftTopData = res.data[0] |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | // loadEcharts('cgddchart', cgddchart(30, 5, 10)) |
| | | }) |
| | | setInterval(() => { |
| | | PurchaseLeftTop().then(res => { |
| | | this.purchaseLeftTopData = res.data[0] |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | }) |
| | | }, 1000 * 6) |
| | | }, |
| | | // è·åå½åæ¶é´ |
| | | 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}` |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #09d8f2; |
| | | $color01: #00FFFF; |
| | | .tableData { |
| | | background: transparent; |
| | | } |
| | | |
| | | .el-table::before { |
| | | height: 0; |
| | | } |
| | | |
| | | .el-table__empty-text { |
| | | color: $main_color; |
| | | } |
| | | |
| | | .tableDataCell { |
| | | ::v-deep .cell { |
| | | padding: 0 2px; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper::-webkit-scrollbar { |
| | | /* width: 0;宽度为0æè */ |
| | | width: 0; |
| | | background: transparent; |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper { |
| | | background: transparent; |
| | | } |
| | | |
| | | ::v-deep .el-table th, |
| | | ::v-deep .el-table tr, |
| | | ::v-deep .el-table td { |
| | | background-color: transparent; |
| | | } |
| | | |
| | | ::v-deep .gutter { |
| | | display: none; |
| | | } |
| | | |
| | | .all_block01 { |
| | | width: 237px; |
| | | height: 180px; |
| | | } |
| | | |
| | | .all_block02 { |
| | | width: 100%; |
| | | height: 49px; |
| | | background: rgba(9, 216, 242, 0.1); |
| | | } |
| | | |
| | | .all_block03 { |
| | | width: 199px; |
| | | height: 180px; |
| | | } |
| | | |
| | | .all_block04 { |
| | | width: 100%; |
| | | height: 49px; |
| | | background: rgba(9, 216, 242, 0.1); |
| | | } |
| | | |
| | | .kb_center_block_children { |
| | | height: 180px; |
| | | //border: 1px solid $kbBorderColor; |
| | | width: 240px; |
| | | display: flex; |
| | | z-index: 2; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | margin: 10px; |
| | | font-size: 22px; |
| | | |
| | | .box02 { |
| | | background: url("../../assets/images/box02.png") no-repeat; |
| | | transform: scale(1.5); |
| | | width: 145px; |
| | | height: 84px; |
| | | |
| | | } |
| | | } |
| | | |
| | | .all_block05 { |
| | | position: absolute; |
| | | animation: upDown 3s ease-in-out infinite; |
| | | left: 60px; |
| | | } |
| | | |
| | | .all_block06 { |
| | | position: absolute; |
| | | animation: upDown2 3s ease-in-out infinite; |
| | | left: 290px; |
| | | } |
| | | |
| | | .all_block07 { |
| | | position: absolute; |
| | | animation: upDown 3s ease-in-out infinite; |
| | | left: 520px; |
| | | } |
| | | |
| | | @keyframes upDown { |
| | | 0% { |
| | | top: 50px; |
| | | } |
| | | 50% { |
| | | top: 100px; |
| | | } |
| | | 100% { |
| | | top: 50px; |
| | | } |
| | | } |
| | | |
| | | @keyframes upDown2 { |
| | | 0% { |
| | | top: 100px; |
| | | } |
| | | 50% { |
| | | top: 50px; |
| | | } |
| | | 100% { |
| | | top: 100px; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <svg-icon icon-class="cpdrk" class="svg_class" /> |
| | | ç产å¾
å
¥åº |
| | | </div> |
| | | <div class="lineContent horn" style="height: 410px"> |
| | | <el-table |
| | | ref="tableDataTopRef" |
| | | :data="tableDataTop" |
| | | style="width: 100%;" |
| | | class="tableData" |
| | | :header-cell-style="headerCellStyleCenter" |
| | | :cell-style="cellStyleCenter" |
| | | height="405" |
| | | > |
| | | <el-table-column |
| | | prop="voucherdate" |
| | | label="åæ®æ¥æ" |
| | | width="131" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div> |
| | | <div v-else /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wo" |
| | | label="åæ®ç¼å·" |
| | | width="189" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="ellipsis">{{ row.wo }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="ç产车é´" |
| | | width="105" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="ellipsis">{{ row.wkshp_name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="éå®è®¢åå·" |
| | | width="200" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="materiel_code"--> |
| | | <!-- label="产åç¼å·"--> |
| | | <!-- width="136"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div class="ellipsis">{{ row.materiel_code }}</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="materiel_name" |
| | | label="产ååç§°" |
| | | width="170" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="ellipsis">{{ row.materiel_name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="specification" |
| | | label="è§æ ¼åå·" |
| | | width="136" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="stck_name" |
| | | label="é¢å
¥ä»åº" |
| | | width="100" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="quantity" |
| | | label="æ°é" |
| | | width="63" |
| | | <div style="height: 410px"> |
| | | <dv-border-box-12> |
| | | <dv-scroll-board |
| | | ref="scrollBoardTop" |
| | | :config="configTableTop" |
| | | style="width: 1326px;height: 390px;margin:0 auto;padding-top: 13px;" |
| | | /> |
| | | <el-table-column |
| | | prop="totalStockInQuantity" |
| | | label="å·²å
¥åºæ°é" |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</div> |
| | | <div v-else>0</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="uomname"--> |
| | | <!-- label="åä½"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="preStartDate"--> |
| | | <!-- label="é¢è®¡å¼å·¥"--> |
| | | <!-- width="100"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.preStartDate">{{ row.preStartDate.substring(0, 10) }}</div>--> |
| | | <!-- <div v-else />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="preFinishDate" |
| | | label="é¢è®¡å
¥åº" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.preFinishDate">{{ row.preFinishDate.substring(0, 10) }}</div> |
| | | <div v-else /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | <div style="height: 470px;margin-top: 30px;"> |
| | |
| | | <svg-icon icon-class="drk" class="svg_class" /> |
| | | å§å¤å¾
å
¥åº |
| | | </div> |
| | | <div class="lineContent horn" style="height: 410px"> |
| | | <el-table |
| | | ref="tableDataBottomRef" |
| | | :data="tableDataBottom" |
| | | style="width: 100%;" |
| | | class="tableData" |
| | | :header-cell-style="headerCellStyleCenter" |
| | | :cell-style="cellStyleCenter" |
| | | height="405" |
| | | > |
| | | <el-table-column |
| | | prop="voucherdate" |
| | | label="åæ®æ¥æ" |
| | | width="151" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wo" |
| | | label="åæ®ç¼å·" |
| | | width="225" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="ellipsis">{{ row.wo }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="materiel_name" |
| | | label="产ååç§°" |
| | | width="278" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.materiel_name" class="ellipsis">{{ row.materiel_name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="specification" |
| | | label="è§æ ¼åå·" |
| | | width="220" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="quantity" |
| | | label="æ°é" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="ellipsis">{{ row.quantity }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="saleOutQuantity" |
| | | label="å·²åè´§æ°é" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.saleOutQuantity" class="ellipsis">{{ row.saleOutQuantity }}</div> |
| | | <div v-else>0</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="deliveryDate" |
| | | label="é¢è®¡äº¤ä»æ¥æ" |
| | | width="200" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.deliveryDate">{{ row.deliveryDate.substring(0, 10) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- prop="warning"--> |
| | | <!-- label="å»¶æå¤©æ°"--> |
| | | <!-- width="130"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.warning">{{ row.warning }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | <div style="height: 410px"> |
| | | <dv-border-box-12> |
| | | <dv-scroll-board |
| | | ref="scrollBoardBottom" |
| | | :config="configTableBottom" |
| | | style="width: 1326px;height: 390px;margin:0 auto;padding-top: 13px;" |
| | | /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <svg-icon icon-class="ph" class="svg_class" /> |
| | | åæåã产ååºåéæè¡Top5 |
| | | </div> |
| | | <div class="lineContent horn" style="height: 410px"> |
| | | <div id="bar03" style="width: 100%;height:100%; " /> |
| | | <!--/* <div id="bar03" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />*/--> |
| | | <div style="height: 410px"> |
| | | <dv-border-box-12> |
| | | <div id="bar03" key="bar03" style="width: 100%;height:100%; " /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | <div style="height: 470px;margin-top: 30px;"> |
| | |
| | | <svg-icon icon-class="ph" class="svg_class" /> |
| | | åææåºåéæè¡Top5 |
| | | </div> |
| | | <div class="lineContent horn" style="height: 410px"> |
| | | <div id="bar04" style="width: 100%;height:100%;" /> |
| | | <!-- <div id="bar04" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />--> |
| | | <div style="height: 410px"> |
| | | <dv-border-box-12> |
| | | <div id="bar04" key="bar04" style="width: 100%;height:100%;" /> |
| | | </dv-border-box-12> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | onLine: navigator.onLine, // çå¬ç½ç»æ¯å¦å¨çº¿ |
| | | |
| | | headTime: '', |
| | | tableDataTop: [], |
| | | tableDataBottom: [], |
| | | 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>' |
| | | ], |
| | | data: [ |
| | | // ['<span style="color:#37a2da;">è¡1å1</span>', 'è¡1å2', 'è¡1å3'], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9] |
| | | |
| | | ], |
| | | index: true, |
| | | columnWidth: [50, 130, 150, 300, 200, 120, 120, 120, 120], |
| | | align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'] |
| | | // carousel: 'page' |
| | | }, |
| | | configTableBottom: { |
| | | 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>' |
| | | ], |
| | | data: [ |
| | | // ['<span style="color:#37a2da;">è¡1å1</span>', 'è¡1å2', 'è¡1å3'], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9], |
| | | // [1, 2, 3, 4, 5, 6, 8, 9] |
| | | |
| | | ], |
| | | index: true, |
| | | columnWidth: [50, 130, 150, 300, 200, 120, 120, 120, 120], |
| | | align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'] |
| | | // carousel: 'page' |
| | | }, |
| | | |
| | | MarqueeTipsContent: '', // å
Œ |
| | | speed: 100, // å
¬åææ¾çé度 |
| | |
| | | this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true }) |
| | | |
| | | this.getWareHouseTopLeftData() |
| | | setInterval(() => { |
| | | this.getWareHouseTopLeftData() |
| | | }, 15 * 1000) |
| | | |
| | | this.getWareHouseTopBottomData() |
| | | setInterval(() => { |
| | | this.getWareHouseTopBottomData() |
| | | }, 20 * 1000) |
| | | |
| | | this.getEcharts() |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | // è·åå·¦ä¸tableæ°æ® |
| | | getWareHouseTopLeftData() { |
| | | WareHouseTopLeftData().then(res => { |
| | | this.tableDataTop = res.data |
| | | // this.number1 = this.tableDataTop.length |
| | | const divData = this.$refs.tableDataTopRef.bodyWrapper |
| | | // æ¿å°å
ç´ åï¼å¯¹å
ç´ è¿è¡å®æ¶å¢å è·ç¦»é¡¶é¨è·ç¦»ï¼å®ç°æ»å¨ææ(æ¤é
置为æ¯100毫ç§ç§»å¨1åç´ ) |
| | | this.tableTopTask = setInterval(() => { |
| | | // å
ç´ èªå¢è·ç¦»é¡¶é¨1åç´ |
| | | divData.scrollTop += 1 |
| | | // divData.scrollTop += divData.scrollHeight / this.tableData.length |
| | | // 夿å
ç´ æ¯å¦æ»å¨å°åºé¨(å¯è§é«åº¦+è·ç¦»é¡¶é¨=æ´ä¸ªé«åº¦) |
| | | if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // éç½®tableè·ç¦»é¡¶é¨è·ç¦» |
| | | divData.scrollTop = 0 |
| | | WareHouseTopLeftData().then(res => { |
| | | this.tableDataTop = res.data |
| | | // this.number1 = this.tableDataTop.length |
| | | if (this.tableDataTop.length > 10) { |
| | | clearInterval(this.tableTopTask) |
| | | this.getWareHouseTopLeftData() |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableDataTop.length <= 10 ? 1000 * 30 : 200) |
| | | const flag = this.compareArrays(this.configTableTop.data, res.data) |
| | | if (!flag) { |
| | | this.configTableTop.data = res.data.map(i => |
| | | [ |
| | | i.voucherdate.substring(0, 10), |
| | | i.wo, |
| | | i.saleOrderCode ? i.saleOrderCode : '/', |
| | | i.materiel_name, |
| | | i.specification ? i.specification : '/', |
| | | i.quantity, |
| | | i.totalStockInQuantity ? i.totalStockInQuantity : 0, |
| | | `<span style="color: red;">${i.quantity - i.totalStockInQuantity}</span>` |
| | | ] |
| | | ) |
| | | this.$refs['scrollBoardTop'].updateRows(this.configTableTop.data) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åå·¦ä¸tableæ°æ® |
| | | getWareHouseTopBottomData() { |
| | | WareHouseTopBottomData().then(res => { |
| | | this.tableDataBottom = res.data |
| | | this.number2 = this.tableDataBottom.length |
| | | const divData = this.$refs.tableDataBottomRef.bodyWrapper |
| | | // æ¿å°å
ç´ åï¼å¯¹å
ç´ è¿è¡å®æ¶å¢å è·ç¦»é¡¶é¨è·ç¦»ï¼å®ç°æ»å¨ææ(æ¤é
置为æ¯100毫ç§ç§»å¨1åç´ ) |
| | | // const task = setInterval(() => { |
| | | this.tableBottomTask = setInterval(() => { |
| | | // å
ç´ èªå¢è·ç¦»é¡¶é¨1åç´ |
| | | divData.scrollTop += 1 |
| | | // divData.scrollTop += divData.scrollHeight / this.tableData.length |
| | | // 夿å
ç´ æ¯å¦æ»å¨å°åºé¨(å¯è§é«åº¦+è·ç¦»é¡¶é¨=æ´ä¸ªé«åº¦) |
| | | if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // éç½®tableè·ç¦»é¡¶é¨è·ç¦» |
| | | divData.scrollTop = 0 |
| | | WareHouseTopBottomData().then(res => { |
| | | this.tableDataBottom = res.data |
| | | this.number2 = this.tableDataBottom.length |
| | | if (this.tableDataBottom.length > 10) { |
| | | clearInterval(this.tableBottomTask) |
| | | this.getWareHouseTopBottomData() |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableDataBottom.length <= 10 ? 1000 * 20 : 100) |
| | | const flag = this.compareArrays(this.configTableBottom.data, res.data) |
| | | if (!flag) { |
| | | this.configTableBottom.data = res.data.map(i => |
| | | [ |
| | | i.voucherdate.substring(0, 10), |
| | | i.wo, |
| | | i.saleOrderCode ? i.saleOrderCode : '/', |
| | | i.materiel_name, |
| | | i.specification ? i.specification : '/', |
| | | i.quantity, |
| | | i.totalStockInQuantity ? i.totalStockInQuantity : 0, |
| | | `<span style="color: red;">${i.quantity - i.totalStockInQuantity}</span>` |
| | | ] |
| | | ) |
| | | this.$refs['scrollBoardBottom'].updateRows(this.configTableBottom.data) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 两个æ°ç»åå¯¹æ¯ |
| | | 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 |
| | | }, |
| | | |
| | | // è·åecharts |
| | | getEcharts() { |
| | | WareHouseRightTopData().then(res => { |
| | | loadEcharts('bar03', bar02(res.data.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name))) |
| | | loadEcharts('bar03', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name))) |
| | | }) |
| | | |
| | | WareHouseRightBottomData().then(res => { |
| | | loadEcharts('bar04', bar02(res.dat.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name))) |
| | | loadEcharts('bar04', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name))) |
| | | }) |
| | | |
| | | this.echartsRightTop = setInterval(() => { |
| | | WareHouseRightTopData().then(res => { |
| | | loadEcharts('bar03', bar02(res.data.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name))) |
| | | loadEcharts('bar03', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name))) |
| | | }) |
| | | }, 1000 * 15) |
| | | }, 1000 * 20) |
| | | |
| | | this.echartsRightBottom = setInterval(() => { |
| | | WareHouseRightBottomData().then(res => { |
| | | loadEcharts('bar04', bar02(res.data.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name))) |
| | | loadEcharts('bar04', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name))) |
| | | }) |
| | | }, 1000 * 15) |
| | | }, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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, , 130, 130 |
| | | columnWidth: [200, 140, 350, 350, 130, 130, 130, 130, 130, 130, 130], |
| | | align: ['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() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomLeftData() |
| | | }, 20 * 1000) |
| | | this.getWorkShopProduceBottomRightData() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomRightData() |
| | | }, 30 * 1000) |
| | | }, |
| | | methods: { |
| | | getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData({ wkshopcode: 'CJ002' }).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>`, |
| | | i.seq, |
| | | i.step_code, |
| | | i.step_name, |
| | | parseFloat(i.schedule.toFixed(2)) |
| | | ] |
| | | ) |
| | | // `<span style="color: red;">${i.laborbad_qty}</span>`, |
| | | // `<span style="color: red;">${i.materielbad_qty}</span>`, |
| | | this.$refs['scrollBoardTop'].updateRows(this.configTableTop.data) |
| | | } |
| | | }) |
| | | }, |
| | | async getWorkShopProduceBottomLeftData() { |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: 'CJ002' }) |
| | | this.cjzl03_xData = res4.data['CJ002'].map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data['CJ002'].map(i => i.count) |
| | | |
| | | loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.cjzl03_yData)) |
| | | }, |
| | | |
| | | async getWorkShopProduceBottomRightData() { |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: 'CJ002' }) |
| | | 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> |
| | |
| | | </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"> |
| | | <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: 925px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="blcs" class="svg_class" /> |
| | | éè´è®¢å(æ/å£) |
| | | <svg-icon icon-class="cxjg" class="svg_class" /> |
| | | ç产订å(æ/å£) |
| | | </div> |
| | | <div |
| | | class="lineContent horn" |
| | | style="height: 450px;display: flex;flex-direction: column;justify-content: space-between" |
| | | > |
| | | <div style="height: 180px;padding: 10px;display: flex;justify-content: space-between"> |
| | | |
| | | <div v-for="i in LeftTopData01" :key="i.Quarter" class="flex_c_s"> |
| | | <dv-border-box-12 style="height: 415px;"> |
| | | <div style="height: 180px;padding: 10px;display: flex; justify-content: space-around;"> |
| | | <div v-for="i in LeftTopData01" :key="i.wkshp_code" class="flex_c_s"> |
| | | <div class="all_block03 flex_c_s"> |
| | | <div class="flex_c_c all_block04">{{ i.Quarter }}</div> |
| | | <div class="flex_c_c all_block04">{{ i.wkshp_name }}</div> |
| | | <div class="" style="display: flex;justify-content:space-between"> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">任塿°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.quantity }}</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.plan_qty }}</div> |
| | | </div> |
| | | <div class="" style="display: flex;justify-content:space-between"> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">å
¥åºæ°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.ouquantity }}</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">å®å·¥æ°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.good_qty }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="height: 180px;padding: 10px;display: flex; justify-content: space-around;margin-top: 20px;"> |
| | | <div v-for="i in LeftTopData02" :key="i.wkshp_code" class="flex_c_s"> |
| | | <div class="all_block03 flex_c_s"> |
| | | <div class="flex_c_c all_block04">{{ i.wkshp_name }}</div> |
| | | <div class="" style="display: flex;justify-content:space-between"> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">任塿°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.plan_qty }}</div> |
| | | </div> |
| | | <div class="" style="display: flex;justify-content:space-between"> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">å®å·¥æ°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.quantity }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="height: 260px;"> |
| | | <div id="all02_1" class="flex_c_c" style="width: 100%;height:100%;" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <div style="height: 260px;">--> |
| | | <!-- <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" />--> |
| | | <!-- </div>--> |
| | | </dv-border-box-12> |
| | | |
| | | </div> |
| | | <div style="width: 925px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cggz" class="svg_class" /> |
| | | éå®è®¢å(æ/å£) |
| | | </div> |
| | | <div |
| | | class="lineContent horn" |
| | | style="height: 450px;display: flex;flex-direction: column;justify-content: space-between" |
| | | > |
| | | <div style="height: 180px;padding: 10px;display: flex;justify-content: space-between"> |
| | | |
| | | <dv-border-box-12 style="height: 415px;"> |
| | | <div style="height: 180px;padding: 10px;display: flex; justify-content: space-around;"> |
| | | <div v-for="i in RightTopData01" :key="i.Quarter" class="flex_c_s"> |
| | | <div class="all_block03 flex_c_s"> |
| | | <div class="flex_c_c all_block04">{{ i.Quarter }}</div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div style="height: 260px;"> |
| | | <div style="height: 220px;"> |
| | | <div id="all02" class="flex_c_c" style="width: 100%;height:100%;" /> |
| | | </div> |
| | | </div> |
| | | </dv-border-box-12> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- ä¸è¾¹--> |
| | | <div style="display: flex;justify-content: space-between;margin-top: 15px;"> |
| | | <div style="width: 925px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cxjg" class="svg_class" /> |
| | | ç产订å(彿) |
| | | <svg-icon icon-class="cgdd" class="svg_class" /> |
| | | éè´è®¢å(æ/å£) |
| | | </div> |
| | | <div |
| | | class="lineContent horn" |
| | | style="height: 380px;display: flex;flex-direction: column;justify-content: space-between" |
| | | > |
| | | <div style="height: 180px;padding: 10px;display: flex;justify-content: space-evenly"> |
| | | <div v-for="i in LeftBottomData01" :key="i.wkshp_code" class="flex_c_s"> |
| | | <div class="all_block01 flex_c_s" style="width: 275px;"> |
| | | <div class="flex_c_c all_block02" style="">{{ i.wkshp_name }}</div> |
| | | |
| | | <dv-border-box-12 style="height: 415px;display:flex;"> |
| | | |
| | | <div style="height: 180px;padding: 10px;display: flex; justify-content: space-around;"> |
| | | <div v-for="i in LeftBottomData01" :key="i.Quarter" class="flex_c_s"> |
| | | <div class="all_block03 flex_c_s"> |
| | | <div class="flex_c_c all_block04">{{ i.Quarter }}</div> |
| | | <div class="" style="display: flex;justify-content:space-between"> |
| | | <div class="all_block02 flex_c_c" style="width: 49% ">任塿°</div> |
| | | <div class="all_block02 flex_c_c" style="width: 49% ">{{ i.plan_qty }}</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">任塿°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.quantity }}</div> |
| | | </div> |
| | | <div class="" style="display: flex;justify-content:space-between"> |
| | | <div class="all_block02 flex_c_c" style="width: 49% ">å®å·¥æ°</div> |
| | | <div class="all_block02 flex_c_c" style="width: 49% ">{{ i.good_qty }}</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">åºåºæ°</div> |
| | | <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.ouquantity }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="height: 220px;"> |
| | | <div id="all03" class="flex_c_c" style="width: 100%;height:100%;" /> |
| | | </div> |
| | | |
| | | </div> |
| | | <div style="height: 260px;"> |
| | | <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" /> |
| | | </div> |
| | | </div> |
| | | </dv-border-box-12> |
| | | |
| | | </div> |
| | | <div style="width: 925px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="ckkc" class="svg_class" /> |
| | | ä»åºåºå |
| | | </div> |
| | | <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between"> |
| | | |
| | | <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> |
| | | |
| | | </div> |
| | | </div> |
| | | </dv-border-box-12> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import './kbCommon.css' |
| | | import { loadEcharts, all02, all03 } from '@/utils/myEcharts' |
| | | import { loadEcharts, all02 } from '@/utils/myEcharts' |
| | | import { |
| | | WorkShopCompreLeftBottom, WorkShopCompreLeftTop, WorkShopCompreRightBottom, WorkShopCompreRightTop |
| | | WorkShopCompreLeftTop, |
| | | WorkShopCompreRightBottom, |
| | | WorkShopCompreRightTop, |
| | | WorkShopCompreLeftBottom |
| | | } from '@/api/kanbanManager' |
| | | |
| | | export default { |
| | |
| | | data() { |
| | | return { |
| | | headTime: '', |
| | | tableDataRightTop: [], |
| | | wkshopArr: [], |
| | | legendData: [], |
| | | |
| | | LeftTopData01: [], |
| | | LeftTopData02: [], |
| | |
| | | }, 1000 * 60 * 120) |
| | | }, |
| | | mounted() { |
| | | this.getAllApi() |
| | | this.getWorkShopCompreLeftTop() |
| | | setInterval(() => { |
| | | this.getWorkShopCompreLeftTop() |
| | | }, 10 * 1000) |
| | | |
| | | this.getWorkShopCompreRightTop() |
| | | setInterval(() => { |
| | | this.getWorkShopCompreRightTop() |
| | | }, 15 * 1000) |
| | | |
| | | this.getWorkShopCompreLeftBottom() |
| | | setInterval(() => { |
| | | this.getWorkShopCompreLeftBottom() |
| | | }, 20 * 1000) |
| | | |
| | | this.getWorkShopCompreRightBottom() |
| | | setInterval(() => { |
| | | this.getWorkShopCompreRightBottom() |
| | | }, 25 * 1000) |
| | | }, |
| | | methods: { |
| | | async getAllApi() { |
| | | // const { data: res } = await ShopSearch() |
| | | getWorkShopCompreLeftTop() { |
| | | const res = [ |
| | | { org_code: '101', org_name: 'åæ³¡è½¦é´' }, |
| | | { org_code: '102', org_name: 'æ¤åºè½¦é´' } |
| | | |
| | | { org_code: 'CJ001', org_name: 'è£
é
车é´' }, |
| | | { org_code: 'CJ002', org_name: 'çµæ± 车é´' }, |
| | | { org_code: 'CJ003', org_name: 'å
è£
车é´' } |
| | | ] |
| | | this.wkshopArr = res |
| | | const temp = this.wkshopArr.map(i => i.org_code) |
| | | // const temp = this.wkshopArr.map(i => i.org_code) |
| | | |
| | | temp.forEach(i => { |
| | | const aa = this.wkshopArr.find(j => j.org_code === i).org_name |
| | | this.legendData.push(aa) |
| | | }) |
| | | const temp = ['CJ001', 'CJ002', 'CJ003'] |
| | | |
| | | // å·¦ä¸ éè´è®¢å |
| | | const res2 = await WorkShopCompreLeftBottom() |
| | | res2.data.BottomLeftTop.forEach(i => { |
| | | this.LeftTopData01.push({ |
| | | Quarter: i.Quarter, |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | res2.data.BottomLeftBottom.forEach(i => { |
| | | this.LeftTopData02.push({ |
| | | Month: i.Month + 'æ', |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | loadEcharts('all02_1', all02(this.LeftTopData02, 'æ¯æéè´æ°é/å
¥åºæ°é')) |
| | | setInterval(() => { |
| | | WorkShopCompreLeftTop({ wkshopcode: temp.join(',') }).then(res2 => { |
| | | this.LeftTopData01 = [] |
| | | this.LeftTopData02 = [] |
| | | WorkShopCompreLeftBottom().then(res2 => { |
| | | res2.data.BottomLeftTop.forEach(i => { |
| | | this.LeftTopData01.push({ |
| | | Quarter: i.Quarter, |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | res2.data.BottomLeftBottom.forEach(i => { |
| | | this.LeftTopData02.push({ |
| | | Month: i.Month + 'æ', |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | loadEcharts('all02_1', all02(this.LeftTopData02, 'æ¯æéè´æ°é/å
¥åºæ°é')) |
| | | }) |
| | | }, 1000 * 35) |
| | | |
| | | // å³ä¸ éå®è®¢å |
| | | const res3 = await WorkShopCompreRightTop() |
| | | res3.data.RightTop.forEach(i => { |
| | | this.RightTopData01.push({ |
| | | Quarter: i.Quarter, |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | for (const res4Key in res2.data.LeftTop) { |
| | | const data = { |
| | | good_qty: 0, |
| | | plan_qty: 0, |
| | | wkshp_code: '', |
| | | wkshp_name: '' |
| | | } |
| | | if (temp.includes(res4Key)) { |
| | | data.good_qty = res2.data.LeftTop[res4Key][0].good_qty |
| | | data.plan_qty = res2.data.LeftTop[res4Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftTop[res4Key][0].wkshp_code |
| | | data.wkshp_name = res.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftTopData01.push(data) |
| | | } |
| | | } |
| | | for (const res4Key in res2.data.LeftBottom) { |
| | | const data = { |
| | | quantity: 0, |
| | | wkshp_code: '', |
| | | wkshp_name: '' |
| | | } |
| | | if (temp.includes(res4Key)) { |
| | | data.quantity = res2.data.LeftBottom[res4Key][0].quantity |
| | | data.plan_qty = res2.data.LeftBottom[res4Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftBottom[res4Key][0].wkshp_code |
| | | data.wkshp_name = res.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftTopData02.push(data) |
| | | } |
| | | } |
| | | }) |
| | | res3.data.RightBottom.forEach(i => { |
| | | this.RightTopData02.push({ |
| | | Month: i.Month + 'æ', |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | loadEcharts('all02', all02(this.RightTopData02, 'æ¯æè®¢åæ°é/åºåºæ°é')) |
| | | setInterval(() => { |
| | | WorkShopCompreRightTop().then(res3 => { |
| | | this.RightTopData01 = [] |
| | | this.RightTopData02 = [] |
| | | res3.data.RightTop.forEach(i => { |
| | | this.RightTopData01.push({ |
| | | Quarter: i.Quarter, |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | res3.data.RightBottom.forEach(i => { |
| | | this.RightTopData02.push({ |
| | | Month: i.Month + 'æ', |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | loadEcharts('all02', all02(this.RightTopData02, 'æ¯æè®¢åæ°é/åºåºæ°é')) |
| | | }) |
| | | }, 1000 * 40) |
| | | |
| | | // å·¦ä¸ ç产订å |
| | | const res4 = await WorkShopCompreLeftTop({ wkshopcode: temp.join(',') }) |
| | | for (const res4Key in res4.data.LeftTop) { |
| | | const data = { |
| | | good_qty: 0, |
| | | plan_qty: 0, |
| | | wkshp_code: '', |
| | | wkshp_name: '' |
| | | } |
| | | if (temp.includes(res4Key)) { |
| | | data.good_qty = res4.data.LeftTop[res4Key][0].good_qty |
| | | data.plan_qty = res4.data.LeftTop[res4Key][0].plan_qty |
| | | data.wkshp_code = res4.data.LeftTop[res4Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftBottomData01.push(data) |
| | | } |
| | | } |
| | | for (const res4Key in res4.data.LeftBottom) { |
| | | const data = { |
| | | quantity: 0, |
| | | wkshp_code: '', |
| | | wkshp_name: '' |
| | | } |
| | | if (temp.includes(res4Key)) { |
| | | data.quantity = res4.data.LeftBottom[res4Key][0].quantity |
| | | data.plan_qty = res4.data.LeftBottom[res4Key][0].plan_qty |
| | | data.wkshp_code = res4.data.LeftBottom[res4Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftBottomData02.push(data) |
| | | } |
| | | } |
| | | loadEcharts('all01', all03(this.legendData, this.LeftBottomData02)) |
| | | |
| | | setInterval(() => { |
| | | WorkShopCompreLeftTop({ wkshopcode: temp.join(',') }).then(res2 => { |
| | | this.LeftBottomData01 = [] |
| | | this.LeftBottomData02 = [] |
| | | for (const res4Key in res4.data.LeftTop) { |
| | | this.LeftTopData01 = [] |
| | | this.LeftTopData02 = [] |
| | | for (const res4Key in res2.data.LeftTop) { |
| | | const data = { |
| | | good_qty: 0, |
| | | plan_qty: 0, |
| | |
| | | data.good_qty = res2.data.LeftTop[res4Key][0].good_qty |
| | | data.plan_qty = res2.data.LeftTop[res4Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftTop[res4Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftBottomData01.push(data) |
| | | data.wkshp_name = res.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftTopData01.push(data) |
| | | } |
| | | } |
| | | for (const res4Key in res2.data.LeftBottom) { |
| | |
| | | data.quantity = res2.data.LeftBottom[res4Key][0].quantity |
| | | data.plan_qty = res2.data.LeftBottom[res4Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftBottom[res4Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftBottomData02.push(data) |
| | | data.wkshp_name = res.find(i => i.org_code === data.wkshp_code).org_name |
| | | this.LeftTopData02.push(data) |
| | | } |
| | | } |
| | | loadEcharts('all01', all03(this.legendData, this.LeftBottomData02)) |
| | | }) |
| | | }, 1000 * 30) |
| | | |
| | | // å³ä¸ ä»åºåºå |
| | | const res5 = await WorkShopCompreRightBottom() |
| | | this.RightBottom = res5.data |
| | | |
| | | setInterval(() => { |
| | | WorkShopCompreRightBottom().then(res5 => { |
| | | this.RightBottom = res5.data |
| | | }) |
| | | }, 1000 * 60) |
| | | }, |
| | | |
| | | // è·åEcharts |
| | | getEcharts() { |
| | | // loadEcharts('cjzl01', cjzl01(this.cjzl01Data)) |
| | | getWorkShopCompreRightTop() { |
| | | WorkShopCompreRightTop().then(res3 => { |
| | | this.RightTopData01 = [] |
| | | this.RightTopData02 = [] |
| | | res3.data.RightTop.forEach(i => { |
| | | this.RightTopData01.push({ |
| | | Quarter: i.Quarter, |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | res3.data.RightBottom.forEach(i => { |
| | | this.RightTopData02.push({ |
| | | Month: i.Month + 'æ', |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | loadEcharts('all02', all02(this.RightTopData02)) |
| | | }) |
| | | }, |
| | | |
| | | // loadEcharts('cjzl02_1', cjzl02(this.cjzl02_1Title, this.cjzl02_1Data)) |
| | | // loadEcharts('cjzl02_2', cjzl02(this.cjzl02_2Title, this.cjzl02_2Data)) |
| | | // loadEcharts('cjzl02_3', cjzl02(this.cjzl02_3Title, this.cjzl02_3Data)) |
| | | // loadEcharts('cjzl02_4', cjzl02(this.cjzl02_4Title, this.cjzl02_4Data)) |
| | | // loadEcharts('cjzl02_5', cjzl02(this.cjzl02_5Title, this.cjzl02_5Data)) |
| | | getWorkShopCompreLeftBottom() { |
| | | WorkShopCompreLeftBottom().then(res3 => { |
| | | this.LeftBottomData01 = [] |
| | | this.LeftBottomData02 = [] |
| | | res3.data.BottomLeftTop.forEach(i => { |
| | | this.LeftBottomData01.push({ |
| | | Quarter: i.Quarter, |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | res3.data.BottomLeftBottom.forEach(i => { |
| | | this.LeftBottomData02.push({ |
| | | Month: i.Month + 'æ', |
| | | quantity: i.quantity, |
| | | ouquantity: i.ouquantity |
| | | }) |
| | | }) |
| | | loadEcharts('all03', all02(this.LeftBottomData02)) |
| | | }) |
| | | }, |
| | | |
| | | // loadEcharts('cjzl04', cjzl04(this.legendData, this.cjzl04Data[0], this.cjzl04Data[1], this.cjzl04Data[2]))// å³ä¾§ |
| | | // loadEcharts('cjzl03', cjzl03(this.cjzl03_xData, this.legendData, this.cjzl03_yData))// 左侧 |
| | | getWorkShopCompreRightBottom() { |
| | | WorkShopCompreRightBottom().then(res5 => { |
| | | this.RightBottom = res5.data |
| | | }) |
| | | }, |
| | | |
| | | // è·åå½åæ¶é´ |
| | |
| | | const week = weeks[wk] |
| | | |
| | | this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}` |
| | | }, |
| | | headerCellStyle() { |
| | | return { |
| | | backgroundColor: 'transparent ', |
| | | padding: '10px 0', |
| | | textAlign: 'center', |
| | | color: '#07acc2', |
| | | border: 'none', |
| | | fontSize: '20px' |
| | | } |
| | | }, |
| | | cellStyle() { |
| | | return { |
| | | padding: '7px 0', |
| | | textAlign: 'center', |
| | | backgroundColor: 'transparent ', |
| | | color: '#c7e7ff', |
| | | border: 'none', |
| | | fontSize: '20px' |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | .all_block01 { |
| | | width: 187px; |
| | | width: 237px; |
| | | height: 180px; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .all_block03 { |
| | | width: 199px; |
| | | width: 220px; |
| | | height: 180px; |
| | | } |
| | | |
| | |
| | | |
| | | .all_block05 { |
| | | position: absolute; |
| | | animation: upDown 3s ease-in-out infinite; |
| | | left: 70px; |
| | | animation: upDown 5s ease-in-out infinite; |
| | | left: 80px; |
| | | } |
| | | |
| | | .all_block06 { |
| | | position: absolute; |
| | | animation: upDown2 3s ease-in-out infinite; |
| | | left: 320px; |
| | | animation: upDown2 5s ease-in-out infinite; |
| | | left: 330px; |
| | | } |
| | | |
| | | .all_block07 { |
| | | position: absolute; |
| | | animation: upDown 3s ease-in-out infinite; |
| | | left: 570px; |
| | | animation: upDown 5s ease-in-out infinite; |
| | | left: 580px; |
| | | } |
| | | |
| | | @keyframes upDown { |
| | | 0% { |
| | | top: 50px; |
| | | top: 75px; |
| | | } |
| | | 50% { |
| | | top: 100px; |
| | | top: 150px; |
| | | } |
| | | 100% { |
| | | top: 50px; |
| | | top: 75px; |
| | | } |
| | | } |
| | | |
| | | @keyframes upDown2 { |
| | | 0% { |
| | | top: 100px; |
| | | top: 150px; |
| | | } |
| | | 50% { |
| | | top: 50px; |
| | | top: 75px; |
| | | } |
| | | 100% { |
| | | top: 100px; |
| | | top: 150px; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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, , 130, 130 |
| | | columnWidth: [200, 140, 350, 350, 130, 130, 130, 130, 130, 130, 130], |
| | | align: ['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() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomLeftData() |
| | | }, 20 * 1000) |
| | | this.getWorkShopProduceBottomRightData() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomRightData() |
| | | }, 30 * 1000) |
| | | }, |
| | | methods: { |
| | | getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData({ wkshopcode: 'CJ001' }).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>`, |
| | | i.seq, |
| | | i.step_code, |
| | | i.step_name, |
| | | parseFloat(i.schedule.toFixed(2)) |
| | | ] |
| | | ) |
| | | // `<span style="color: red;">${i.laborbad_qty}</span>`, |
| | | // `<span style="color: red;">${i.materielbad_qty}</span>`, |
| | | this.$refs['scrollBoardTop'].updateRows(this.configTableTop.data) |
| | | } |
| | | }) |
| | | }, |
| | | async getWorkShopProduceBottomLeftData() { |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: 'CJ001' }) |
| | | this.cjzl03_xData = res4.data['CJ001'].map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data['CJ001'].map(i => i.count) |
| | | |
| | | loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.cjzl03_yData)) |
| | | }, |
| | | |
| | | async getWorkShopProduceBottomRightData() { |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: 'CJ001' }) |
| | | 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> |
| | |
| | | proxy: { |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: 'http://121.196.36.24:8039', // æ¬å° |
| | | // target: 'http://192.168.0.99:8000', // 大å²2.0 |
| | | // target: 'http://192.168.2.138:8080', // 大å²2.0 |
| | | changeOrigin: true, // 请æ±è·¨åæ¶ï¼é é
ç½®æ¤é¡¹ |
| | | pathRewrite: { // è·¯å¾éå,æ¿æ¢targetä¸ç请æ±å°å |
| | | ['^' + process.env.VUE_APP_BASE_API]: '/api/' |