5 changed files with 253 additions and 4 deletions
-
BINsrc/assets/img/factory.jpg
-
2src/router/index.js
-
141src/views/modules/board/sopBoard.vue
-
86src/views/modules/pad/padPartAttribute.vue
-
28src/views/modules/production/soscheduleRouting.vue
|
After Width: 3000 | Height: 1500 | Size: 377 KiB |
@ -0,0 +1,141 @@ |
|||
<template> |
|||
<div class="mod-config container"> |
|||
<div style="text-align: center"> |
|||
<h1 style="color: white">SOP查看</h1> |
|||
</div> |
|||
<div class="board2" style="height: 90%;width: 50%;float: left;background: #00a0e9;margin-top: 1%"> |
|||
|
|||
|
|||
</div> |
|||
<div class="board2" style="height: 90%;width: 50%;float: left;background: #2D64B3;margin-top: 1%"> |
|||
|
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
let rollstop = '' |
|||
let rolltimer = ''// 自动滚动的定时任务 |
|||
let refresher = '' //数据刷新定时器 |
|||
import { |
|||
transFerBoard, |
|||
} from '@/api/board.js' |
|||
export default { |
|||
name: 'transFerBoard', |
|||
data () { |
|||
return { |
|||
pageIndex: 1, |
|||
totalPage: 1, |
|||
height: 200, |
|||
tableData: [], |
|||
// 默认的刷新,滚动时间,滚动间距 |
|||
// refreshTime: 5, |
|||
// rollTime: 5, |
|||
// rollPx: 1, |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 80 |
|||
}) |
|||
// this.autoRoll() |
|||
}, |
|||
methods: { |
|||
tableRowClassName ({row, rowIndex}) { |
|||
if (row.type == '产成品') { |
|||
return 'green' |
|||
} |
|||
}, |
|||
search () { |
|||
let inData= {number:this.pageIndex}; |
|||
transFerBoard(inData).then(({data}) => { |
|||
this.tableData = data.rows; |
|||
this.totalPage= data.maxPage; |
|||
if(this.pageIndex+1>data.maxPage){ |
|||
this.pageIndex=1 |
|||
}else { |
|||
this.pageIndex=this.pageIndex+1 |
|||
} |
|||
}) |
|||
}, |
|||
// 鼠标进入 |
|||
// mouseEnter (time) { |
|||
// // 鼠标进入停止滚动和切换的定时任务 |
|||
// this.autoRoll(true) |
|||
// }, |
|||
// 鼠标离开 |
|||
// mouseLeave () { |
|||
// // 开启 |
|||
// this.autoRoll() |
|||
// }, |
|||
// 设置自动滚动 |
|||
// autoRoll (stop) { |
|||
// if (stop) { |
|||
// clearInterval(rolltimer) |
|||
// return |
|||
// } |
|||
// // 拿到表格挂载后的真实DOM |
|||
// const table = this.$refs.wt_table |
|||
// // 拿到表格中承载数据的div元素 |
|||
// const divData = table.bodyWrapper |
|||
// // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果 |
|||
// rolltimer = setInterval(() => { |
|||
// // 元素自增距离顶部像素 |
|||
// divData.scrollTop = this.decimalUtil.add(Number(divData.scrollTop), Number(this.rollPx)) |
|||
// // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
|||
// if (divData.clientHeight + divData.scrollTop +1>= divData.scrollHeight) { |
|||
// // 重置table距离顶部距离 |
|||
// divData.scrollTop = 0 |
|||
// } |
|||
// }, this.rollTime * 10) |
|||
// }, |
|||
refreshTable () { |
|||
refresher = setInterval(() => { |
|||
this.search() |
|||
}, 30000) |
|||
} |
|||
}, |
|||
created () { |
|||
// this.search() |
|||
// this.refreshTable() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style > |
|||
|
|||
|
|||
.board2 .el-table .cell { |
|||
line-height: 13px; |
|||
font-size: 12px; |
|||
height: 13px; |
|||
padding: 0px; |
|||
} |
|||
.board2 .el-table .green { |
|||
background: #8cee8c; |
|||
} |
|||
.board2 .el-table .success-row { |
|||
background: #1bb61b; |
|||
} |
|||
.board2 .el-table .false-row { |
|||
/*background: #cbcb14;*/ |
|||
background: #db1212; |
|||
} |
|||
.board2 .el-table .yellow-row{ |
|||
background: #ffff00; |
|||
} |
|||
.container { |
|||
height: 109%; |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
z-index: -1; |
|||
width: 100%; |
|||
height: 100%; |
|||
content: ""; |
|||
background-image: url(~@/assets/img/factory.jpg); |
|||
background-size: cover; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue