huangli865118801 3 years ago
parent
commit
e279a35541
  1. 27
      api/user.js
  2. 27
      pages.json
  3. 64
      pages/deviceList/deviceList.vue
  4. 55
      pages/deviceList/index.scss
  5. 7
      pages/index/index.vue
  6. 76
      pages/lineList/index.scss
  7. 63
      pages/lineList/lineList.vue
  8. 0
      pages/modeMaintainAdd/index.scss
  9. 19
      pages/modeMaintainAdd/modeMaintainAdd.vue
  10. BIN
      static/bnj.png
  11. BIN
      static/byj.png
  12. BIN
      static/yj.png

27
api/user.js

@ -593,4 +593,29 @@ export function modeList(data) {
method: "get",
data
});
}
}
/**
* 线路列表
* @param {Object} data
*/
export function lineList(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/line-lists`,
method: "get",
data
});
}
/**
* 设备列表
* @param {Object} data
*/
export function lineCheckDevice(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/line-check-device`,
method: "get",
data
});
}

27
pages.json

@ -247,6 +247,33 @@
}
}
,{
"path" : "pages/modeMaintainAdd/modeMaintainAdd",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/lineList/lineList",
"style" :
{
"navigationBarTitleText": "线路列表",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/deviceList/deviceList",
"style" :
{
"navigationBarTitleText": "设备列表",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

64
pages/deviceList/deviceList.vue

@ -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>

55
pages/deviceList/index.scss

@ -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);
}
}
}
}
}

7
pages/index/index.vue

@ -162,7 +162,7 @@
模具保养
</view>
</view>
<view class="card-list" @tap="kfz()">
<view class="card-list" @tap="LineList()">
<view class="card-list-img">
<image class="icon-yclj" src="../../static/cyzb.png"></image>
</view>
@ -245,6 +245,11 @@
url: '../modeMaintainList/modeMaintainList'
});
},
LineList(){
uni.navigateTo({
url: '../lineList/lineList'
});
},
kfz(){
this.$functions.error("功能开发中");
}

76
pages/lineList/index.scss

@ -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)
}
}
}
}

63
pages/lineList/lineList.vue

@ -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
pages/modeMaintainAdd/index.scss

19
pages/modeMaintainAdd/modeMaintainAdd.vue

@ -0,0 +1,19 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

BIN
static/bnj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
static/byj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
static/yj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Loading…
Cancel
Save