12 changed files with 336 additions and 2 deletions
@ -0,0 +1,64 @@
|
||||
<template> |
||||
<view> |
||||
<view class="card" v-for="(item,index) in list" :key="index" @tap="firstInspectionInfo(item.plan_id,item)"> |
||||
<view class="card-left"> |
||||
<view class="card-up-list"> |
||||
<view class="card-up-list-list"> |
||||
<view>设备名:</view><text>{{item.name}}</text> |
||||
</view> |
||||
<view class="card-right"> |
||||
<text style="font-size: 26upx;color: #4CD964;" v-if="item.status==1">正常</text> |
||||
</view> |
||||
</view> |
||||
<view class="card-up-list"> |
||||
<view class="card-up-list-list"> |
||||
<view>设备型号:</view><text>{{item.model}}</text> |
||||
</view> |
||||
</view> |
||||
<view class="card-up-list"> |
||||
<view class="card-up-list-list"> |
||||
<view>设备编号:</view><text>{{item.in_number}}</text> |
||||
</view> |
||||
</view> |
||||
<view class="card-up-list"> |
||||
<view class="card-up-list-list"> |
||||
<view>检测项目:</view><text>{{item.check_item}}</text> |
||||
</view> |
||||
</view> |
||||
<view class="card-up-list"> |
||||
<view class="card-up-list-list"> |
||||
<view>检测目的:</view><text>{{item.check_aim}}</text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import {lineCheckDevice} from"../../api/user.js" |
||||
export default { |
||||
data() { |
||||
return { |
||||
list:[], |
||||
type:'', |
||||
id:'' |
||||
}; |
||||
}, |
||||
onLoad(e) { |
||||
this.type=e.type; |
||||
this.id=e.id |
||||
this.getData() |
||||
},methods:{ |
||||
getData(){ |
||||
lineCheckDevice({line_id:this.id,type:this.type}).then(res=>{ |
||||
this.list=res |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
@import "./index.scss" |
||||
</style> |
@ -0,0 +1,55 @@
|
||||
.card{ |
||||
@include wh(710upx,auto); |
||||
margin: auto; |
||||
margin-top: 24upx; |
||||
background: white; |
||||
border-radius: 10upx; |
||||
padding-top: 20upx; |
||||
padding-bottom: 30upx; |
||||
@include flex(center,space-around); |
||||
.card-left{ |
||||
@include wh(660upx,auto); |
||||
.card-up-list{ |
||||
@include wh(660upx,auto); |
||||
margin-top: 24upx; |
||||
@include flex(center,space-between); |
||||
.card-right{ |
||||
image{ |
||||
@include wh(34upx,34upx) |
||||
} |
||||
} |
||||
.card-up-list-list{ |
||||
@include flex(center,flex-start); |
||||
view{ |
||||
@include fonts(26upx,#333,500); |
||||
} |
||||
text{ |
||||
@include fonts(24upx,#666,500); |
||||
} |
||||
} |
||||
|
||||
} |
||||
.card-dow-list{ |
||||
@include wh(660upx,auto); |
||||
margin-top: 24upx; |
||||
@include flex(center,space-between); |
||||
.card-right{ |
||||
image{ |
||||
@include wh(34upx,34upx) |
||||
} |
||||
} |
||||
.card-up-list-list{ |
||||
width: 330upx; |
||||
@include flex(center,flex-start); |
||||
view{ |
||||
@include fonts(26upx,#333,500); |
||||
} |
||||
text{ |
||||
@include fonts(24upx,#666,500); |
||||
} |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,76 @@
|
||||
.card{ |
||||
@include wh(710upx,auto); |
||||
margin: auto; |
||||
margin-top: 24upx; |
||||
background: white; |
||||
border-radius: 10upx; |
||||
padding-top: 20upx; |
||||
padding-bottom: 30upx; |
||||
// @include flex(center,space-around); |
||||
.card-left{ |
||||
@include wh(660upx,auto); |
||||
margin: auto; |
||||
.card-up-list{ |
||||
@include wh(660upx,auto); |
||||
margin-top: 24upx; |
||||
@include flex(center,space-between); |
||||
.card-up-list-list{ |
||||
@include flex(center,flex-start); |
||||
view{ |
||||
@include fonts(26upx,#333,500); |
||||
} |
||||
text{ |
||||
@include fonts(24upx,#666,500); |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
} |
||||
.card-opreation{ |
||||
@include wh(660upx,auto); |
||||
margin: auto; |
||||
@include flex(center,space-between); |
||||
margin-top: 20upx; |
||||
.byj-btn{ |
||||
@include wh(140upx,60upx); |
||||
background: #007AFF; |
||||
line-height: 120upx; |
||||
@include flex(center,center); |
||||
border-radius: 10upx; |
||||
image{ |
||||
@include wh(40upx,40upx); |
||||
} |
||||
text{ |
||||
@include fonts(24upx,#ffffff) |
||||
} |
||||
} |
||||
.yj-btn{ |
||||
@include wh(120upx,60upx); |
||||
background: #F0AD4E; |
||||
line-height: 120upx; |
||||
@include flex(center,center); |
||||
border-radius: 10upx; |
||||
image{ |
||||
@include wh(40upx,40upx); |
||||
} |
||||
text{ |
||||
@include fonts(24upx,#ffffff) |
||||
} |
||||
} |
||||
.bnj-btn{ |
||||
@include wh(120upx,60upx); |
||||
background: #4CD964; |
||||
line-height: 120upx; |
||||
@include flex(center,center); |
||||
border-radius: 10upx; |
||||
image{ |
||||
@include wh(40upx,40upx); |
||||
} |
||||
text{ |
||||
@include fonts(24upx,#ffffff) |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,63 @@
|
||||
<template> |
||||
<view> |
||||
<view class="card" v-for="(item,index) in list" :key="index"> |
||||
<view class="card-left"> |
||||
<view class="card-up-list"> |
||||
<view class="card-up-list-list"> |
||||
<view>线路名称:</view><text>{{item.title}}</text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="card-opreation"> |
||||
<view>操作:</view> |
||||
<view class="byj-btn" @tap="deciceList(item.id,1)"> |
||||
<image src="../../static/byj.png"></image> |
||||
<text>半月检</text> |
||||
</view> |
||||
<view class="yj-btn" @tap="deciceList(item.id,2)"> |
||||
<image src="../../static/yj.png"></image> |
||||
<text>月检</text> |
||||
</view> |
||||
<view class="bnj-btn" @tap="deciceList(item.id,3)"> |
||||
<image src="../../static/bnj.png"></image> |
||||
<text>半年检</text> |
||||
</view> |
||||
|
||||
|
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import {lineList} from"../../api/user.js" |
||||
export default { |
||||
data() { |
||||
return { |
||||
list:[] |
||||
}; |
||||
},onLoad() { |
||||
this.getData() |
||||
}, |
||||
methods:{ |
||||
getData(){ |
||||
lineList().then(res=>{ |
||||
this.list=res |
||||
console.log("设备",this.list) |
||||
}) |
||||
}, |
||||
deciceList(id,type){ |
||||
uni.navigateTo({ |
||||
url: `../deviceList/deviceList?id=${id}&type=${type}`, |
||||
success: res => {}, |
||||
fail: () => {}, |
||||
complete: () => {} |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
@import "./index.scss" |
||||
</style> |
@ -0,0 +1,19 @@
|
||||
<template> |
||||
<view> |
||||
|
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
|
||||
}; |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
|
||||
</style> |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in new issue