This commit is contained in:
2023-04-10 17:00:48 +08:00
parent ec86fa38ab
commit 1ecc2088e3
3 changed files with 23 additions and 16 deletions

BIN
src/images/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

View File

@@ -43,7 +43,7 @@
<button class="iconfont select_icon" :class="pkId === e.workorder_id ? 'selected_icon' : 'unselect_icon'"></button>
</td>
<td>{{e.workorder_code}}</td>
<td>{{e.shift_type_scode}}</td>
<td>{{e.shift_type_scode_name}}</td>
<td>{{e.material_name}}</td>
<td>{{e.workprocedure_name}}</td>
<td>{{['创建','下发','生产中','暂停', '完成'][Number(e.order_status) - 1]}}</td>

View File

@@ -2,22 +2,28 @@
<div>
<section class="content">
<div class="device-status">
<p><span class="icon red"></span><span class="txt">有任务</span></p>
<p><span class="icon white"></span><span class="txt">关机</span></p>
<p><span class="icon blue"></span><span class="txt">开机</span></p>
<p><span class="icon green"></span><span class="txt">生产中</span></p>
<p><span class="icon blue"></span><span class="txt"></span></p>
<p><span class="icon white"></span><span class="txt">待机</span></p>
<p><span class="icon yellow"></span><span class="txt"></span></p>
<p><span class="icon red"></span><span class="txt">故障</span></p>
</div>
<div class="list-box">
<div class="device" v-for="e in dataList" :key="e.device_code" :class="{bg1:e.is_run=='1',bg2:e.is_run=='0'}" @click="toOperation(e)"
>
<div class="device-top">
<div class="img"><img v-show="e.device_icon" :src="e.imgurl" alt=""></div></div>
<div class="fl icon" :class="['white', 'green', 'red', 'blue'][Number(e.device_status)]"></div>
<div class="fl desc">
<p class="device_name">{{e.deviceName}}</p>
<p class="ellipsis">任务数: {{e.job_count}}</p>
<p class="ellipsis">工单: {{e.workorderCode}}</p>
<div class="img">
<img v-if="e.device_icon !== ''" :src="e.device_icon" alt="">
<img v-else src="../../images/1.png" alt="">
</div>
</div>
<div class="fl icon" :class="['white', 'blue', 'green', 'yellow', 'red'][Number(e.device_status)]">
</div>
<div class="fl desc">
<p class="device_name">{{e.deviceName}}</p>
<p class="ellipsis">任务数: {{e.job_count}}</p>
<p class="ellipsis">工单: {{e.workorderCode}}</p>
</div>
</div>
</div>
<Back></Back>
@@ -52,11 +58,11 @@ export default {
},
async getList () {
let res = await getDevice()
let newArr = []
res.map(el => {
newArr.push(Object.assign({}, el, {imgurl: this.$store.getters.imgBaseUrl + '/' + el.device_icon}))
})
this.dataList = [...newArr]
// let newArr = []
// res.map(el => {
// newArr.push(Object.assign({}, el, {imgurl: this.$store.getters.imgBaseUrl + '/' + el.device_icon}))
// })
this.dataList = [...res]
},
toOperation (e) {
if (e.is_run === '1') {
@@ -74,6 +80,8 @@ export default {
</script>
<style lang="stylus" scoped>
.yellow
background #E9B451
.red
background red
.green
@@ -120,7 +128,6 @@ export default {
.device
display inline-block
width 1.75rem
height 2.1rem
margin .18rem 0rem 0 .19rem
overflow hidden
.device-top