|
|
|
@ -44,7 +44,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-col section_9"> |
|
|
|
<view class="justify-between"> |
|
|
|
<view class="justify-between sticky"> |
|
|
|
<text class="text_19">设备列表</text> |
|
|
|
<view class="flex-row group_14" v-if="!isExample" @click="addDevice"> |
|
|
|
<text>新增</text> |
|
|
|
@ -117,7 +117,8 @@ export default { |
|
|
|
{ id: 3, name: '覆膜机', working: 1, free: 1 } |
|
|
|
], |
|
|
|
cameraList: [], |
|
|
|
refresh: this.$store.state.userInfo.userId |
|
|
|
refresh: this.$store.state.userInfo.userId, |
|
|
|
hasCompany: this.$store.state.companyInfo.id |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
@ -131,6 +132,9 @@ export default { |
|
|
|
watch: { |
|
|
|
factoryId(val) { |
|
|
|
if (val === -1) { |
|
|
|
if (this.companyTip()) { |
|
|
|
return |
|
|
|
} |
|
|
|
go2('factory-manage') |
|
|
|
} else { |
|
|
|
this.getCameraList() |
|
|
|
@ -187,7 +191,25 @@ export default { |
|
|
|
this.listObj = data |
|
|
|
}) |
|
|
|
}, |
|
|
|
companyTip() { |
|
|
|
if (!this.hasCompany) { |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '您还没有企业,请前往完善企业信息', |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
go2('enterprise-info') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
return true |
|
|
|
} |
|
|
|
return false |
|
|
|
}, |
|
|
|
addDevice() { |
|
|
|
if (this.companyTip()) { |
|
|
|
return |
|
|
|
} |
|
|
|
// 先判断是否时演示工厂 |
|
|
|
go2('add-device', { id: this.factoryId, operation: 'edit' }) |
|
|
|
}, |
|
|
|
@ -229,7 +251,6 @@ export default { |
|
|
|
} |
|
|
|
.group { |
|
|
|
flex: 1 1 auto; |
|
|
|
overflow-y: auto; |
|
|
|
.section_1 { |
|
|
|
padding-top: 82rpx; |
|
|
|
background-image: url('/static/imgs/digital-workshops/top-bg.png'); |
|
|
|
@ -391,8 +412,15 @@ export default { |
|
|
|
} |
|
|
|
.section_9 { |
|
|
|
margin-top: 20rpx; |
|
|
|
padding: 19rpx 32rpx 20rpx; |
|
|
|
padding: 0 32rpx; |
|
|
|
background-color: rgb(255, 255, 255); |
|
|
|
.sticky { |
|
|
|
position: sticky; |
|
|
|
top: 0; |
|
|
|
z-index: 10; |
|
|
|
background: white; |
|
|
|
padding: 30rpx 0 20rpx; |
|
|
|
} |
|
|
|
.text_19 { |
|
|
|
color: rgb(51, 51, 51); |
|
|
|
font-size: 36rpx; |
|
|
|
@ -415,7 +443,6 @@ export default { |
|
|
|
} |
|
|
|
.list-area { |
|
|
|
padding-bottom: 40rpx; |
|
|
|
margin-top: 20rpx; |
|
|
|
} |
|
|
|
.group_9 { |
|
|
|
margin-top: 39rpx; |
|
|
|
|