| | |
| | | <!-- 1--> |
| | | <div class="kb_left_top_title01">生产产线:</div> |
| | | <div class="kb_left_top kb_pd10"> |
| | | <!-- <div v-for="(item,index) in lineContent" :key="item[index].linecode" class="kb_left_top_block">--> |
| | | <div class="kb_left_top_block"> |
| | | <div class="kb_block01 kb_pd10"> |
| | | <div> |
| | |
| | | <div class="kb_mt10">产线总量:</div> |
| | | </div> |
| | | <div> |
| | | <div>锂电产线</div> |
| | | <div>锂电一线</div> |
| | | <div class="kb_mt10">300</div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | | <div class="flex_c_c content01"> |
| | | <div class="circle" style="background-color: rgb(255 255 0)" /> |
| | | <!-- <div class="circle" style="background-color: rgb(255 255 0)" />--> |
| | | <div class="circleYellow" style="background-color: rgb(255 255 0)" /> |
| | | </div> |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | |
| | | </div> |
| | | <div class="kb_block03 kb_pd10 "> |
| | | <div class="flex_e_c"> |
| | | |
| | | <div class="kb_block03_content flex_c_c"> |
| | | <div class="content01">领料</div> |
| | | <div class="content02"> |
| | |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | | <div class="flex_c_c content01"> |
| | | <div class="circle" style="background-color: rgb(255 255 0)" /> |
| | | <div class="circle" style="background-color: rgb(255 255 255)" /> |
| | | </div> |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | |
| | | <div class="content02_2 borderTop ">1</div> |
| | | </div> |
| | | </div> |
| | | <div class="kb_block03_content flex_c_c"> |
| | | <div v-if="false" class="kb_block03_content flex_c_c"> |
| | | <div class="content01">领料</div> |
| | | <div class="content02"> |
| | | <div class="content02_1 ">任务</div> |
| | |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | | <div class="flex_c_c content01"> |
| | | <div class="circle" style="background-color: rgb(255 255 0)" /> |
| | | <!-- <div class="circle" style="background-color: rgb(255 255 0)" />--> |
| | | <div class="circle" /> |
| | | </div> |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | | <div v-if="false" class="kb_block03_02_content flex_c_c"> |
| | | <div class="flex_c_c content01"> |
| | | <div class="circle" style="background-color: rgb(255 255 255)" /> |
| | | </div> |
| | |
| | | <div class="content02_2 borderTop ">1</div> |
| | | </div> |
| | | </div> |
| | | <div class="kb_block03_content flex_c_c"> |
| | | <div v-if="false" class="kb_block03_content flex_c_c"> |
| | | <div class="content01">领料</div> |
| | | <div class="content02"> |
| | | <div class="content02_1 ">任务</div> |
| | |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | | <div class="flex_c_c content01"> |
| | | <div class="circle" style="background-color: rgb(255 255 0)" /> |
| | | <!-- <div class="circle" style="background-color: rgb(255 255 0)" />--> |
| | | <div class="circleYellow" style="background-color: rgb(255 255 0)" /> |
| | | </div> |
| | | </div> |
| | | <div class="kb_block03_02_content flex_c_c"> |
| | | <div v-if="false" class="kb_block03_02_content flex_c_c"> |
| | | <div class="flex_c_c content01"> |
| | | <div class="circle" style="background-color: rgb(255 255 255)" /> |
| | | </div> |
| | |
| | | <div class="kb_left_bottom_content"> |
| | | <div class="content_head">在制订单</div> |
| | | <el-table |
| | | ref="tableData" |
| | | :data="tableData" |
| | | style="width: 100%;" |
| | | :header-cell-style="headerCellStyle" |
| | |
| | | height="310" |
| | | > |
| | | <el-table-column |
| | | prop="xh" |
| | | prop="RowNum" |
| | | label="序号" |
| | | width="53" |
| | | /> |
| | | <el-table-column |
| | | prop="jgzt" |
| | | prop="status" |
| | | label="加工状态" |
| | | width="85" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.status==='ALLO'">ALLO</div> |
| | | <div v-if="row.status==='START'">开始</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="pfsj" |
| | | prop="lm_date" |
| | | label="派发时间" |
| | | width="86" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.lm_date.substring(5,10) }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="xsddh" |
| | | prop="saleOrderCode" |
| | | label="销售订单号" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="jgdh" |
| | | prop="wo_code" |
| | | label="加工单号" |
| | | width="207" |
| | | /> |
| | | <el-table-column |
| | | prop="cpmc" |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="105" |
| | | /> |
| | | <el-table-column |
| | | prop="gg" |
| | | prop="partspec" |
| | | label="规格" |
| | | width="60" |
| | | /> |
| | | <el-table-column |
| | | prop="dw" |
| | | prop="name" |
| | | label="单位" |
| | | width="60" |
| | | /> |
| | | <el-table-column |
| | | prop="rwsl" |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="90" |
| | | /> |
| | | <el-table-column |
| | | prop="wgsl" |
| | | prop="good_qty" |
| | | label="完工数量" |
| | | width="90" |
| | | /> |
| | | <el-table-column |
| | | prop="blsl" |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="90" |
| | | /> |
| | |
| | | width="70" |
| | | /> |
| | | <el-table-column |
| | | prop="yjks" |
| | | prop="planenddate" |
| | | label="预计开始" |
| | | width="86" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.planenddate.substring(5,10) }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="yjjs" |
| | | prop="planstartdate" |
| | | label="预计结束" |
| | | width="86" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.planstartdate.substring(5,10) }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | |
| | | <el-table |
| | | ref="tableDataRank" |
| | | :data="tableDataRank" |
| | | class="tableDataRank" |
| | | style="width: 100%;" |
| | | :header-cell-style="headerCellStyle" |
| | | :cell-style="cellStyle" |
| | | :header-cell-style="headerCellStyleRank" |
| | | :cell-style="cellStyleRank" |
| | | height="400" |
| | | > |
| | | <el-table-column |
| | |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="cp" |
| | | prop="partname" |
| | | width="138" |
| | | label="产品" |
| | | /> |
| | | <el-table-column |
| | | prop="sl" |
| | | prop="good_qty" |
| | | label="数量" |
| | | width="100" |
| | | /> |
| | |
| | | <script> |
| | | import './kbCommon.css' |
| | | import { bar02, loadEcharts } from '@/utils/myEcharts' |
| | | import { |
| | | LineSearchBottomLeftData, |
| | | LineSearchBottomRightData, |
| | | LineSearchTopLeftData, |
| | | LineSearchTopRightData, |
| | | ShopSearchLine |
| | | } from '@/api/dzkb' |
| | | |
| | | export default { |
| | | name: 'Index2', |
| | | data() { |
| | | return { |
| | | headTime: '', |
| | | |
| | | leftTopDataAll: [ |
| | | // { id: 1, name: '锂电产线', value: 1000, children: [] }, |
| | | { id: 2, name: '包装产线1', value: 1200, children: [] }, |
| | |
| | | ], |
| | | leftTopDataAllLength: 0, |
| | | leftTopDataCurrentNumber: 0, |
| | | |
| | | lineArr: [], |
| | | lineContent: [], |
| | | |
| | | leftTopData: [], |
| | | tableData: [ |
| | | { |
| | | xh: 1, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 2, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 3, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 4, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 5, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 6, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 7, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 8, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 9, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | }, |
| | | { |
| | | xh: 10, |
| | | jgzt: '开始', |
| | | pfsj: '07/29', |
| | | xsddh: '202207290001', |
| | | jgdh: 'MO-2022-07-29-0001', |
| | | cpmc: '产品名测试', |
| | | gg: '@20', |
| | | dw: 'PCS', |
| | | rwsl: 2000, |
| | | wgsl: 1900, |
| | | blsl: 100, |
| | | wcl: '99%', |
| | | yjks: '07/21', |
| | | yjjs: '07/29' |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableDataRank: [// 排行 |
| | | { xh: 'NO.1', cj: '锂电车间', cx: '锂电1线', cp: 'F09锂电', sl: 1000 }, |
| | | { xh: 'NO.2', cj: '锂电车间', cx: '锂电1线', cp: 'F09锂电', sl: 1000 }, |
| | |
| | | this.leftTopData = this.leftTopDataAll.slice(this.leftTopDataCurrentNumber, this.leftTopDataCurrentNumber + 2) |
| | | this.leftTopDataAllLength = this.leftTopDataAll.length |
| | | |
| | | // this.handleData() |
| | | // setInterval(this.handleData, 2000) |
| | | |
| | | this.getEcharts() |
| | | this.gettableDataRankRoll() |
| | | this.getValue() |
| | | }, |
| | | methods: { |
| | | async getValue() { |
| | | await this.getShopSearchLine() |
| | | await this.getLineSearchTopLeftData() |
| | | |
| | | // 处理数据 |
| | | await this.getEcharts() |
| | | await this.getTableDataRoll() |
| | | await this.getTableDataRankRoll() |
| | | }, |
| | | // 生产产线 |
| | | async getShopSearchLine() { |
| | | const { data: res } = await ShopSearchLine({ shopcode: '0101' }) |
| | | this.lineArr = res |
| | | }, |
| | | async getLineSearchTopLeftData() { |
| | | const data = this.lineArr |
| | | const { data: res } = await LineSearchTopLeftData(data) |
| | | // this.lineContent = res |
| | | |
| | | // let count = 0 |
| | | // setInterval(() => { |
| | | // this.lineContent = { |
| | | // linename: res[0].linename, |
| | | // lineworkcont: res[0].lineworkcont, |
| | | // children: res[0].children[count] |
| | | // } |
| | | // count++ |
| | | // if (res[0].children.length === count) { |
| | | // this.getLineSearchTopLeftData() |
| | | // } |
| | | // }, 1000) |
| | | }, |
| | | |
| | | handleData() { |
| | | console.log(this.leftTopDataCurrentNumber) |
| | | this.leftTopData = this.leftTopDataAll.slice(this.leftTopDataCurrentNumber, this.leftTopDataCurrentNumber + 2) |
| | | |
| | | if (this.leftTopDataCurrentNumber === this.leftTopDataAllLength - 2 || this.leftTopDataCurrentNumber === this.leftTopDataAllLength - 1) { |
| | |
| | | } |
| | | }, |
| | | |
| | | // 在制订单table |
| | | getTableDataRoll() { |
| | | LineSearchBottomLeftData().then(res => { |
| | | this.tableData = res.data |
| | | }) |
| | | // const divData = this.$refs.tableData.bodyWrapper |
| | | // // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | // setInterval(() => { |
| | | // // 元素自增距离顶部1像素 |
| | | // divData.scrollTop += 40 |
| | | // // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | // if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // // 重置table距离顶部距离 |
| | | // divData.scrollTop = 0 |
| | | // LineSearchBottomLeftData().then(res => { |
| | | // this.tableData = res.data |
| | | // }) |
| | | // } |
| | | // }, 1000) |
| | | }, |
| | | // 产线产品数量排行滚动效果 |
| | | gettableDataRankRoll() { |
| | | const divData = this.$refs.tableDataRank.bodyWrapper |
| | | // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | setInterval(() => { |
| | | // 元素自增距离顶部1像素 |
| | | divData.scrollTop += 40 |
| | | // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // 重置table距离顶部距离 |
| | | divData.scrollTop = 0 |
| | | console.log('该请求接口了!') |
| | | } |
| | | }, 2000) |
| | | getTableDataRankRoll() { |
| | | LineSearchTopRightData().then(res => { |
| | | this.tableDataRank = res.data |
| | | }) |
| | | |
| | | // const divData = this.$refs.tableDataRank.bodyWrapper |
| | | // // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | // setInterval(() => { |
| | | // // 元素自增距离顶部1像素 |
| | | // divData.scrollTop += 40 |
| | | // // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | // if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // // 重置table距离顶部距离 |
| | | // divData.scrollTop = 0 |
| | | // LineSearchTopRightData().then(res => { |
| | | // console.log('了!') |
| | | // this.tableDataRank = res.data |
| | | // }) |
| | | // } |
| | | // }, 2000) |
| | | }, |
| | | // 获取echarts |
| | | getEcharts() { |
| | | loadEcharts('bar02', bar02()) |
| | | LineSearchBottomRightData().then(res => { |
| | | loadEcharts('bar02', bar02(res.data)) |
| | | }) |
| | | |
| | | // setInterval(() => { |
| | | // LineSearchBottomRightData().then(res => { |
| | | // loadEcharts('bar02', bar02(res.data)) |
| | | // }) |
| | | // }, 1000 * 5) |
| | | }, |
| | | // 获取当前时间 |
| | | getNowTime() { |
| | |
| | | }, |
| | | headerCellStyle() { |
| | | return { |
| | | // backgroundColor: '#044563', |
| | | backgroundColor: '#000', |
| | | padding: '10px 0', |
| | | textAlign: 'center', |
| | |
| | | } |
| | | }, |
| | | cellStyle() { |
| | | return { |
| | | padding: '8px 0', |
| | | textAlign: 'center', |
| | | backgroundColor: '#000', |
| | | // backgroundColor: 'transparent', |
| | | color: '#fff', |
| | | borderRight: '1px solid rgba(255,255,255,0.6)' |
| | | } |
| | | }, |
| | | headerCellStyleRank() { |
| | | return { |
| | | // backgroundColor: '#00121c', |
| | | backgroundColor: '#000', |
| | | padding: '10px 0', |
| | | textAlign: 'center', |
| | | color: '#fff', |
| | | borderRight: '1px solid rgba(255,255,255,0.6)' |
| | | } |
| | | }, |
| | | cellStyleRank() { |
| | | return { |
| | | padding: '8px 0', |
| | | textAlign: 'center', |
| | |
| | | position: relative; |
| | | height: 990px; |
| | | width: 100%; |
| | | background-color: #000; |
| | | //background-color: #000; |
| | | letter-spacing: 2px; |
| | | |
| | | .kb_left { |
| | |
| | | } |
| | | } |
| | | |
| | | .kb_block03_03 { |
| | | //position: absolute; |
| | | |
| | | .kb_block03_03_content { |
| | | width: 200px; |
| | | |
| | | .line { |
| | | width: 50px; |
| | | height: 2px; |
| | | margin-top: 12px; |
| | | background-color: #42b983; |
| | | position: absolute; |
| | | //top: 55px; |
| | | //margin-left: 300px; |
| | | //right: 0; |
| | | //left: 200px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper { |
| | | //background-color: #044563; |
| | | background-color: #000; |
| | | } |
| | | |
| | | ::v-deep .tableDataRank .el-table__body-wrapper { |
| | | //background-color: #00121c; |
| | | background-color: #000; |
| | | } |
| | | |
| | |
| | | /* width: 0;宽度为0暗藏 */ |
| | | width: 0; |
| | | } |
| | | |
| | | /* 定义keyframes动画,命名为blink*/ |
| | | @keyframes blink { |
| | | 0% { |
| | | opacity: 1 |
| | | } |
| | | 100% { |
| | | opacity: 0 |
| | | } |
| | | } |
| | | |
| | | /*添加兼容性前缀*/ |
| | | @-webkit-keyframes blink { |
| | | 0% { |
| | | opacity: 1 |
| | | } |
| | | 100% { |
| | | opacity: 0 |
| | | } |
| | | } |
| | | |
| | | @-o-keyframes blink { |
| | | 0% { |
| | | opacity: 1 |
| | | } |
| | | 100% { |
| | | opacity: 0 |
| | | } |
| | | } |
| | | |
| | | @-moz-keyframes blink { |
| | | 0% { |
| | | opacity: 1 |
| | | } |
| | | 100% { |
| | | opacity: 0 |
| | | } |
| | | } |
| | | |
| | | @-ms-keyframes blink { |
| | | 0% { |
| | | opacity: 1 |
| | | } |
| | | 100% { |
| | | opacity: 0 |
| | | } |
| | | } |
| | | |
| | | .circleYellow { |
| | | width: 26px; |
| | | height: 26px; |
| | | background-color: rgb(255 255 0); |
| | | border-radius: 50%; |
| | | |
| | | animation: blink 2s linear infinite; |
| | | -webkit-animation: blink 2s linear infinite; |
| | | -moz-animation: blink 2s linear infinite; |
| | | -ms-animation: blink 2s linear infinite; |
| | | -o-animation: blink 2s linear infinite; |
| | | } |
| | | </style> |