| | |
| | | <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 class="smallTitle"> |
| | | <svg-icon icon-class="cxjg" class="svg_class" /> |
| | | 产线加工中任务 |
| | | <div style="display: flex;margin-left: 85px;"> |
| | | |
| | | <div class="circle" style="background-color: rgb(255 255 255)" /> |
| | | <div style="margin-left: 10px">未开始</div> |
| | | |
| | | <!-- <div class="circle" style="margin-left: 10px;background-color: blue;"></div>--> |
| | | <!-- <div style="margin-left: 10px" >开工</div>--> |
| | | |
| | | <div class="circleYellow" style="margin-left: 10px" /> |
| | | <div style="margin-left: 10px">执行中</div> |
| | | |
| | | <div class="circle" style="margin-left: 10px" /> |
| | | <div style="margin-left: 10px">完工</div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="lineContent horn"> |
| | | <div class="lineContent horn" style="height: 434px;"> |
| | | <div v-for="item in lineContent3" :key="item.workcode" class="kb_left_top_block"> |
| | | <div class="kb_block02 kb_pd10"> |
| | | <div> |
| | |
| | | class="kb_block03_02_content flex_c_c" |
| | | > |
| | | <div class="flex_c_c content01"> |
| | | <!-- <div--> |
| | | <!-- v-if="it.status==='START'&&(parseFloat(it.ngqty)===0||it.ngqty==='')&&(parseFloat(it.goodqty)===0||it.goodqty==='')"--> |
| | | <!-- class="circle"--> |
| | | <!-- style="background-color: blue;"--> |
| | | <!-- />--> |
| | | <div |
| | | v-if="it.status==='START'&&(parseFloat(it.ngqty)===0||it.ngqty==='')&&(parseFloat(it.goodqty)===0||it.goodqty==='')" |
| | | class="circle" |
| | | style="background-color: blue;" |
| | | /> |
| | | <div |
| | | v-else-if="it.status==='ALLO'&&(parseFloat(it.ngqty)===0||it.ngqty==='')&&(parseFloat(it.goodqty)===0||it.goodqty==='')" |
| | | v-if="it.status==='ALLO'&&(parseFloat(it.ngqty)===0||it.ngqty==='')&&(parseFloat(it.goodqty)===0||it.goodqty==='')" |
| | | class="circle" |
| | | style="background-color: rgb(255 255 255)" |
| | | /> |
| | |
| | | |
| | | <el-table-column |
| | | prop="status" |
| | | width="70" |
| | | width="80" |
| | | label="状态" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="派发时间" |
| | | width="120" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.lm_date.substring(0, 10) }}</div> |
| | |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="销售订单号" |
| | | width="170" |
| | | width="190" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div> |
| | |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="加工单号" |
| | | width="190" |
| | | width="194" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="100" |
| | | width="350" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div> |
| | |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="100" |
| | | width="125" |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="完工数量" |
| | | width="100" |
| | | width="125" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="100" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="ng_qty"--> |
| | | <!-- label="不良数量"--> |
| | | <!-- width="105"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | label="完成率" |
| | | width="100" |
| | | width="130" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ parseFloat((row.good_qty * 100 / row.plan_qty).toFixed(2)) }}%</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column--> |
| | | |
| | | label="预计开始" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.planstartdate.substring(0, 10) }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="" |
| | | label="预计结束" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.planenddate.substring(0, 10) }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- label="预计开始"--> |
| | | <!-- width="140"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div>{{ row.planstartdate.substring(0, 10) }}</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop=""--> |
| | | <!-- label="预计结束"--> |
| | | <!-- width="140"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div>{{ row.planenddate.substring(0, 10) }}</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </div> |
| | | |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="linename" |
| | | width="165" |
| | | width="125" |
| | | label="产线" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | width="120" |
| | | width="160" |
| | | label="产品" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="数量" |
| | |
| | | tableDataLeftBottom: [], |
| | | tableDataLeftBottomTemp: [], |
| | | lineContent3: [], |
| | | ShopArr: [] // 车间编码数组 |
| | | ShopArr: [], // 车间编码数组 |
| | | |
| | | starsCount: 800, // 星星数量 |
| | | distance: 900 // 间距 |
| | | |
| | | } |
| | | }, |
| | |
| | | this.getTopBar() |
| | | |
| | | this.getShopSearch() |
| | | // this.setStarsRef() |
| | | }, |
| | | methods: { |
| | | 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})` |
| | | }) |
| | | }, |
| | | // 获取车间编码 |
| | | async getShopSearch() { |
| | | const res1 = await ShopSearch() |
| | |
| | | }, |
| | | // 产线加工任务 左下数据 |
| | | getLeftBottomData() { |
| | | let startValue = 0 // 初始值 |
| | | const scale = 10// 刻度 |
| | | // let startValue = 0 // 初始值 |
| | | // const scale = 10// 刻度 |
| | | // |
| | | // LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | // this.tableDataLeftBottomTemp = res.data |
| | | // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | // |
| | | // const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 需要循环的次数 |
| | | // let nowLoop = 0// 当前循环的次数 |
| | | // |
| | | // const timer = setInterval(() => { |
| | | // startValue = startValue + scale |
| | | // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | // if (nowLoop === loop) { |
| | | // clearInterval(timer) |
| | | // this.getLeftBottomData() |
| | | // } |
| | | // |
| | | // nowLoop++ |
| | | // }, 1000 * 10) |
| | | // }) |
| | | |
| | | LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | this.tableDataLeftBottomTemp = res.data |
| | | this.tableDataLeftBottom = res.data |
| | | |
| | | this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper |
| | | // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | const aaa = setInterval(() => { |
| | | // 元素自增距离顶部1像素 |
| | | divData.scrollTop += 1 |
| | | // divData.scrollTop += divData.scrollHeight / this.tableData.length |
| | | // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // 重置table距离顶部距离 |
| | | divData.scrollTop = 0 |
| | | LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | this.tableDataLeftBottom = res.data |
| | | |
| | | const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 需要循环的次数 |
| | | let nowLoop = 0// 当前循环的次数 |
| | | |
| | | const timer = setInterval(() => { |
| | | startValue = startValue + scale |
| | | this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | if (nowLoop === loop) { |
| | | clearInterval(timer) |
| | | this.getLeftBottomData() |
| | | if (this.tableDataLeftBottom.length > 10) { |
| | | clearInterval(aaa) |
| | | this.getLeftBottomData() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | nowLoop++ |
| | | }, 1000 * 10) |
| | | }, this.tableDataLeftBottom.length <= 10 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | |
| | |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper{ |
| | | overflow: hidden !important; |
| | | } |
| | | .circle { |
| | | width: 26px; |
| | | height: 26px; |
| | | background-color: #00ff8b; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | </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> |