| | |
| | | </div> |
| | | |
| | | </div> |
| | | <div style="height: 260px;"> |
| | | <div style="height: 280px;"> |
| | | <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" /> |
| | | </div> |
| | | </div> |
| | |
| | | <div style="width: 1000px;"> |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="blcs" class="svg_class" /> |
| | | 质量不良 |
| | | 质量不良(近一周) |
| | | </div> |
| | | <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between"> |
| | | <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" /> |
| | |
| | | <script> |
| | | import './kbCommon.css' |
| | | import { loadEcharts, all01, all02, cjzl03 } from '@/utils/myEcharts' |
| | | import { |
| | | WorkShopCompreLeftTop, |
| | | WorkShopCompreRightBottom, |
| | | WorkShopCompreRightTop, WorkShopProduceBottomLeftData, |
| | | WorkShopProduceBottomRightData |
| | | } from '@/api/kanbanManager' |
| | | import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData' |
| | | // import { |
| | | // QCBadCenterLeftWeek, |
| | | // ShopSearch, WorkShopCompreLeftTop, WorkShopCompreRightBottom, WorkShopCompreRightTop |
| | |
| | | }, 1000 * 60 * 120) |
| | | }, |
| | | mounted() { |
| | | // this.getAllApi() |
| | | this.getAllApi() |
| | | }, |
| | | methods: { |
| | | async getAllApi() { |
| | | const { data: res } = await ShopSearch() |
| | | this.wkshopArr = res |
| | | const temp = this.wkshopArr.map(i => i.org_code) |
| | | // const temp = this.wkshopArr.map(i => i.org_code) |
| | | const res = await PrentOrganizationNoCompany() |
| | | this.wkshopArr = res.data |
| | | |
| | | const temp = ['CJ001', '006', 'LD001', 'ZP001'] |
| | | |
| | | temp.forEach(i => { |
| | | const aa = this.wkshopArr.find(j => j.org_code === i).org_name |
| | | const aa = this.wkshopArr.find(j => j.torg_code === i).torg_name |
| | | this.legendData.push(aa) |
| | | }) |
| | | |
| | | const res2 = await WorkShopCompreLeftTop({ wkshopcode: temp.join(',') }) |
| | | for (const res2Key in res2.data.LeftTop) { |
| | | const data = { |
| | |
| | | data.good_qty = res2.data.LeftTop[res2Key][0].good_qty |
| | | data.plan_qty = res2.data.LeftTop[res2Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftTop[res2Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name |
| | | this.LeftTopData01.push(data) |
| | | } |
| | | } |
| | |
| | | data.quantity = res2.data.LeftBottom[res2Key][0].quantity |
| | | data.plan_qty = res2.data.LeftBottom[res2Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftBottom[res2Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name |
| | | this.LeftTopData02.push(data) |
| | | } |
| | | } |
| | |
| | | data.good_qty = res2.data.LeftTop[res2Key][0].good_qty |
| | | data.plan_qty = res2.data.LeftTop[res2Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftTop[res2Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name |
| | | this.LeftTopData01.push(data) |
| | | } |
| | | } |
| | |
| | | data.quantity = res2.data.LeftBottom[res2Key][0].quantity |
| | | data.plan_qty = res2.data.LeftBottom[res2Key][0].plan_qty |
| | | data.wkshp_code = res2.data.LeftBottom[res2Key][0].wkshp_code |
| | | data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name |
| | | data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name |
| | | this.LeftTopData02.push(data) |
| | | } |
| | | } |
| | |
| | | }) |
| | | }, 1000 * 40) |
| | | |
| | | const res4 = await QCBadCenterLeftWeek({ wkshopcode: temp.join(',') }) |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: temp.join(',') }) |
| | | this.cjzl03_xData = res4.data[temp[0]].map(i => i.click_date) |
| | | for (const res4Key in res4.data) { |
| | | if (temp.includes(res4Key)) { |
| | |
| | | } |
| | | loadEcharts('cjzl03', cjzl03(this.cjzl03_xData, this.legendData, this.cjzl03_yData, true)) |
| | | setInterval(() => { |
| | | QCBadCenterLeftWeek({ wkshopcode: temp.join(',') }).then(res4 => { |
| | | WorkShopProduceBottomLeftData({ wkshopcode: temp.join(',') }).then(res4 => { |
| | | this.cjzl03_yData = [] |
| | | |
| | | this.cjzl03_xData = res4.data[temp[0]].map(i => i.click_date) |
| | |
| | | } |
| | | |
| | | .all_block01{ |
| | | width:187px; |
| | | width:237px; |
| | | height: 180px; |
| | | } |
| | | .all_block02{ |