| | |
| | | <template> |
| | | <div> |
| | | <div class="kb_dashboard" style="display:flex;flex-direction: column;justify-content: space-between"> |
| | | <div |
| | | class="kb_dashboard" |
| | | :style="{transform:'scale('+zoomX+','+zoomY+')',top:topDistance+'px',left:leftDistance+'px'}" |
| | | style="display:flex;flex-direction: column;justify-content: space-between" |
| | | > |
| | | |
| | | <div class="kb_backgroundCustom" /> |
| | | |
| | |
| | | </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="all01" class="flex_c_c" style="width: 100%;height:100%;" />--> |
| | | <!-- <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: 220px;"> |
| | | <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" /> |
| | | </div> |
| | | </dv-border-box-12> |
| | | |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import './kbCommon.css' |
| | | import { loadEcharts, all02 } from '@/utils/myEcharts' |
| | | import { loadEcharts, all02, all01 } from '@/utils/myEcharts' |
| | | import { |
| | | WorkShopCompreLeftTop, |
| | | WorkShopCompreRightBottom, |
| | |
| | | name: 'Cjsc', |
| | | data() { |
| | | return { |
| | | zoomX: 1, |
| | | zoomY: 1, |
| | | topDistance: 0, |
| | | leftDistance: 0, |
| | | headTime: '', |
| | | |
| | | LeftTopData01: [], |
| | |
| | | setInterval(() => { |
| | | this.getWorkShopCompreRightBottom() |
| | | }, 25 * 1000) |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.zoomX = window.innerWidth / 1920 |
| | | this.zoomY = window.innerHeight / 1080 |
| | | this.topDistance = (window.innerHeight - 1080) / 2 |
| | | this.leftDistance = (window.innerWidth - 1920) / 2 |
| | | }, |
| | | getWorkShopCompreLeftTop() { |
| | | const res = [ |
| | | { org_code: 'CJ001', org_name: '装配车间' }, |
| | | { org_code: 'CJ002', org_name: '电池车间' }, |
| | | { org_code: 'CJ003', org_name: '包装车间' } |
| | | { org_code: '0501', org_name: '装配车间' }, |
| | | { org_code: '0502', org_name: '电池车间' }, |
| | | { org_code: '0503', org_name: '包装车间' } |
| | | ] |
| | | |
| | | const temp = ['CJ001', 'CJ002', 'CJ003'] |
| | | const temp = ['0501', '0502', '0503'] |
| | | |
| | | WorkShopCompreLeftTop({ wkshopcode: temp.join(',') }).then(res2 => { |
| | | this.LeftTopData01 = [] |
| | |
| | | this.LeftTopData02.push(data) |
| | | } |
| | | } |
| | | loadEcharts('all01', all01(res.map(i => i.org_name), this.LeftTopData02)) |
| | | }) |
| | | |
| | | setInterval(() => { |
| | |
| | | } |
| | | } |
| | | }) |
| | | loadEcharts('all01', all01(res.map(i => i.org_name), this.LeftTopData02)) |
| | | }, 1000 * 30) |
| | | }, |
| | | |