parent
39d12797ca
commit
78dcc7cac9
23 changed files with 1843 additions and 547 deletions
@ -0,0 +1,252 @@ |
|||||||
|
<template> |
||||||
|
<view> |
||||||
|
<u-collapse :accordion="false"> |
||||||
|
<u-collapse-item v-for="(item, index) in itemList" :key="index" > |
||||||
|
<view slot="title"> |
||||||
|
<text class="collapse-title">实验室楼层:{{ item.title }}</text> |
||||||
|
</view> |
||||||
|
<view v-for="(v, vindex) in item.fangjian" :key="vindex" class="collapse-room"> |
||||||
|
<view>房间名称:{{ v.fangjianmingcheng }}</view> |
||||||
|
<view v-for="(s, sindex) in v.neirong" :key="sindex" class="collapse-major"> |
||||||
|
<view>专业分类:{{ s.xitong }}</view> |
||||||
|
<view v-for="(n, nindex) in s.detection" :key="nindex" class="n-box"> |
||||||
|
<u-tag :text="nindex + 1" type="info" class="left-tag" /> |
||||||
|
<u-tag text="已检" type="success" class="right-tag" /> |
||||||
|
<view class="n-box-title"> 各排/出水口通水顺畅</view> |
||||||
|
<view class="n-box-info"> 工艺内容工艺内容工艺内容工艺内容工艺内容工艺内容工艺内容</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">状态:</text> |
||||||
|
<text class="item_right_txt"> |
||||||
|
<u-radio-group v-model="n.radioValue"> |
||||||
|
<u-radio name="1">正常</u-radio> |
||||||
|
<u-radio name="0">异常</u-radio> |
||||||
|
</u-radio-group> |
||||||
|
|
||||||
|
</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">现场照片:</text> |
||||||
|
<text class="item_right_txt"> |
||||||
|
<view class="btn">上传照片</view> |
||||||
|
</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">使用人签字:</text> |
||||||
|
<text class="item_right_txt"> |
||||||
|
<image v-if="n.qianzi" :src="n.qianzi" style="width: 144px;height: 77rpx;" mode="widthFix" @click="toPop1(index,vindex,sindex,nindex)"></image> |
||||||
|
<view v-else class="btn" @click="toPop1(index,vindex,sindex,nindex)">签字</view> |
||||||
|
</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">备注:</text> |
||||||
|
<text class="item_right_txt"> |
||||||
|
<betone-new-input type="textarea" :placeholder="'请输入'"></betone-new-input> |
||||||
|
</text> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</u-collapse-item> |
||||||
|
</u-collapse> |
||||||
|
|
||||||
|
<jp-signature-popup ref="signature1" popup v-model="image2" @change="signChange" /> |
||||||
|
</view> |
||||||
|
|
||||||
|
</template> |
||||||
|
<script> |
||||||
|
export default { |
||||||
|
data() { |
||||||
|
return { |
||||||
|
image2:'',//签字路径 |
||||||
|
signIndex:[], |
||||||
|
satisfactionList: [ |
||||||
|
{ |
||||||
|
text: '正常', |
||||||
|
value: 1 |
||||||
|
}, |
||||||
|
{ |
||||||
|
text: '异常', |
||||||
|
value: 0 |
||||||
|
} |
||||||
|
], |
||||||
|
itemList: [ |
||||||
|
{ |
||||||
|
title: '三层', |
||||||
|
fangjian: [ |
||||||
|
{ |
||||||
|
fangjianmingcheng: '房间一', |
||||||
|
neirong: [{ |
||||||
|
xitong: '水系统', |
||||||
|
detection: [ |
||||||
|
{ |
||||||
|
title1: '水量水压满足用水要求1', |
||||||
|
radioValue: null, |
||||||
|
qianzi:'',//签字图片 |
||||||
|
}, |
||||||
|
{ |
||||||
|
title1: '水量水压满足用水要求2', |
||||||
|
radioValue: null, |
||||||
|
qianzi:'',//签字图片 |
||||||
|
} |
||||||
|
] |
||||||
|
}] |
||||||
|
}, |
||||||
|
{ |
||||||
|
fangjianmingcheng: '房间二', |
||||||
|
neirong: [{ |
||||||
|
xitong: '水系统', |
||||||
|
detection: [ |
||||||
|
{ |
||||||
|
title1: '水量水压满足用水要求1', |
||||||
|
radioValue: 0 |
||||||
|
}, |
||||||
|
{ |
||||||
|
title1: '水量水压满足用水要求2', |
||||||
|
radioValue: 1 |
||||||
|
} |
||||||
|
] |
||||||
|
}, { |
||||||
|
xitong: '水系统2', |
||||||
|
detection: [ |
||||||
|
{ |
||||||
|
title1: '水量水压满足用水要求1', |
||||||
|
radioValue: 0 |
||||||
|
}, |
||||||
|
{ |
||||||
|
title1: '水量水压满足用水要求2', |
||||||
|
radioValue: 1 |
||||||
|
} |
||||||
|
] |
||||||
|
}] |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '四层', |
||||||
|
fangjian: [ |
||||||
|
{ |
||||||
|
fangjianmingcheng: '房间一', |
||||||
|
neirong: [{ |
||||||
|
xitong: '水系统' |
||||||
|
}] |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
], |
||||||
|
|
||||||
|
} |
||||||
|
}, |
||||||
|
methods:{ |
||||||
|
toPop1(index,vindex,sindex,nindex){ |
||||||
|
|
||||||
|
this.signIndex=[index,vindex,sindex,nindex] |
||||||
|
this.$refs.signature1.toPop() |
||||||
|
|
||||||
|
}, |
||||||
|
signChange(e){ |
||||||
|
console.log(11111,e) |
||||||
|
this.itemList[this.signIndex[0]].fangjian[this.signIndex[1]].neirong[this.signIndex[2]].detection[this.signIndex[3]].qianzi = e |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
.collapse-title { |
||||||
|
line-height: 60rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 32rpx; |
||||||
|
text-align: left; |
||||||
|
font-family: SourceHanSansSC-bold; |
||||||
|
margin: 18rpx 0 0rpx 20rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.collapse-room { |
||||||
|
margin: 0 32rpx 20rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
} |
||||||
|
|
||||||
|
.collapse-major { |
||||||
|
margin: 0 32rpx 20rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
margin: 12rpx 24rpx 12rpx; |
||||||
|
|
||||||
|
.n-box { |
||||||
|
border: 1px solid rgba(239, 239, 239, 1); |
||||||
|
padding: 32rpx 54rpx 0; |
||||||
|
margin-top: 24rpx; |
||||||
|
margin-bottom: 24rpx; |
||||||
|
position: relative; |
||||||
|
|
||||||
|
.right-tag { |
||||||
|
position: absolute; |
||||||
|
right: 0; |
||||||
|
top: 0; |
||||||
|
} |
||||||
|
|
||||||
|
.left-tag { |
||||||
|
position: absolute; |
||||||
|
left: 0; |
||||||
|
top: 0; |
||||||
|
padding-left: 10rpx; |
||||||
|
padding-right: 10rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.n-box-title { |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
text-align: left; |
||||||
|
} |
||||||
|
|
||||||
|
.n-box-info { |
||||||
|
line-height: 32rpx; |
||||||
|
color: rgba(154, 154, 154, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
padding-top: 12rpx; |
||||||
|
padding-bottom: 12rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.info_item { |
||||||
|
width: 100%; |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
margin: 24rpx 0 24rpx; |
||||||
|
|
||||||
|
.item_left_txt { |
||||||
|
color: rgba(108, 108, 108, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
text-align: left; |
||||||
|
width: 170rpx; |
||||||
|
margin-right: 20rpx; |
||||||
|
line-height: 60rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.item_right_txt { |
||||||
|
flex: 1; |
||||||
|
max-width: calc(100% - 220rpx); |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
// text-align: left; |
||||||
|
text-align: justify; |
||||||
|
font-family: SourceHanSansSC-regular; |
||||||
|
|
||||||
|
/deep/.u-radio-group { |
||||||
|
flex-wrap: nowrap; |
||||||
|
padding-right: 48rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.btn { |
||||||
|
width: 260rpx; |
||||||
|
height: 60rpx; |
||||||
|
line-height: 60rpx; |
||||||
|
border-radius: 8rpx; |
||||||
|
background-color: rgba(255, 255, 255, 1); |
||||||
|
color: rgba(58, 98, 215, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
text-align: center; |
||||||
|
border: 2rpx dashed rgba(58, 98, 215, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
@ -0,0 +1,372 @@ |
|||||||
|
<template> |
||||||
|
<view class="page-css"> |
||||||
|
<view class="page-search-top"> |
||||||
|
<betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单单号' icon="search" |
||||||
|
style="margin-bottom: 32rpx" @changevalue="searchData()" /> |
||||||
|
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab" |
||||||
|
bg-color="rgba(248, 248, 248, 1)"></u-tabs> |
||||||
|
</view> |
||||||
|
<view class="order-box"> |
||||||
|
<!-- @click="goPage(item, 'details')" --> |
||||||
|
<view class="order-item" v-for="(item, index) in orderData" :key="index"> |
||||||
|
<view class="item-top"> |
||||||
|
|
||||||
|
<view class="item-left"> |
||||||
|
<text class="item-orderNo">{{ item.unitName }}</text> |
||||||
|
<text class="item-time"> 单号:{{ item.inspectionNo }}</text> |
||||||
|
</view> |
||||||
|
<view class="item-right"> |
||||||
|
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" |
||||||
|
:bg-color="tagColor[statusName(item.status)]" /> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="item-con"> |
||||||
|
<view class="con-right"> |
||||||
|
<text class="con-title">提报类型:{{ item.faultType }}</text> |
||||||
|
<text class="con-title">巡检项目名称:{{ item.inspectionName }}</text> |
||||||
|
<text class="con-title">项目地址:{{ item.projectAddr }}</text> |
||||||
|
<text class="con-title">巡检周期:{{ item.cycle }}</text> |
||||||
|
<text class="con-title">巡检时间:{{ item.startTime }}-{{ item.nextDate }} </text> |
||||||
|
|
||||||
|
<!-- <view class="con-btn"> |
||||||
|
|
||||||
|
</view> --> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<betone-loading ref="BetLoading" /> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
export default { |
||||||
|
props: { |
||||||
|
|
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
searchInfo: { |
||||||
|
requirementCode: "", |
||||||
|
type: '',//状态 |
||||||
|
}, |
||||||
|
tabList: [ |
||||||
|
{ |
||||||
|
name: "全部", |
||||||
|
key: "9999", |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: "启用", |
||||||
|
key: "1", |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: "停用", |
||||||
|
key: "0", |
||||||
|
}, |
||||||
|
], |
||||||
|
tagColor: { |
||||||
|
停用: "#909399", |
||||||
|
启用: "#67c23a", |
||||||
|
}, |
||||||
|
|
||||||
|
current: 0, |
||||||
|
|
||||||
|
orderData: [], |
||||||
|
|
||||||
|
|
||||||
|
}; |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
|
||||||
|
dataTypes() { |
||||||
|
return this.$store.state.dataType |
||||||
|
}, |
||||||
|
}, |
||||||
|
|
||||||
|
mounted() { |
||||||
|
this.$nextTick(() => { |
||||||
|
this.getRecordsList() |
||||||
|
|
||||||
|
}); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
// 获取列表 |
||||||
|
getRecordsList() { |
||||||
|
|
||||||
|
// this.$refs.BetLoading.show(); |
||||||
|
|
||||||
|
// this.$u.api.getDictionaryList().then(res => { |
||||||
|
// if (res.code == 200) { |
||||||
|
|
||||||
|
|
||||||
|
// this.orderData = res.data; |
||||||
|
|
||||||
|
// this.$refs.BetLoading.hide(); |
||||||
|
// } |
||||||
|
// }).catch(err => { |
||||||
|
|
||||||
|
// }) |
||||||
|
this.orderData = [ |
||||||
|
{ |
||||||
|
inspectionNo: 'WX-20240820-01', |
||||||
|
unitName: '济南安池实验室', |
||||||
|
inspectionName: '实验室设备巡检', |
||||||
|
projectAddr: '济南市钢城区', |
||||||
|
team: '巡检班组一,巡检班组二', |
||||||
|
startTime: '2024-05-21', |
||||||
|
cycle: '季度', |
||||||
|
nextDate: '2024-07-21', |
||||||
|
status: 0, |
||||||
|
tableData: [ |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' }, |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
||||||
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
||||||
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
inspectionNo: 'WX-20240820-01', |
||||||
|
unitName: '济南安池实验室', |
||||||
|
inspectionName: '实验室设备巡检', |
||||||
|
projectAddr: '济南市钢城区', |
||||||
|
team: '巡检班组一,巡检班组二', |
||||||
|
startTime: '2024-09-21', |
||||||
|
cycle: '季度', |
||||||
|
nextDate: '2024-12-21', |
||||||
|
status: 1, |
||||||
|
tableData: [ |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' }, |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
||||||
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
||||||
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
inspectionNo: 'WX-20240820-01', |
||||||
|
unitName: '济南安池实验室', |
||||||
|
inspectionName: '实验室设备巡检', |
||||||
|
projectAddr: '济南市钢城区', |
||||||
|
team: '巡检班组一,巡检班组二', |
||||||
|
startTime: '2024-09-21', |
||||||
|
cycle: '季度', |
||||||
|
nextDate: '2024-12-21', |
||||||
|
status: 1, |
||||||
|
tableData: [ |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' }, |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
||||||
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
||||||
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
||||||
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
||||||
|
] |
||||||
|
}, |
||||||
|
] |
||||||
|
}, |
||||||
|
// 搜索 单号 |
||||||
|
searchData() { |
||||||
|
if (this.dataTypes != 1) { |
||||||
|
// 非管理员和客户 不传提报单位 |
||||||
|
this.searchInfo.reportUnit = this.searchInfo.requirementCode |
||||||
|
} else { |
||||||
|
this.searchInfo.reportUnit = '' |
||||||
|
} |
||||||
|
this.isNomore = false |
||||||
|
// this.page.currentPage = 1; |
||||||
|
this.getRecordsList() |
||||||
|
}, |
||||||
|
// tab切换 |
||||||
|
changeTab(index) { |
||||||
|
this.current = index; |
||||||
|
this.searchInfo.type = this.tabList[index].key == '9999' ? '' : this.tabList[index].key |
||||||
|
this.isNomore = false |
||||||
|
// this.page.currentPage = 1; |
||||||
|
this.getRecordsList() |
||||||
|
}, |
||||||
|
// 获取状态信息 |
||||||
|
statusName(item) { |
||||||
|
if (item == 0) { |
||||||
|
return '停用' |
||||||
|
} |
||||||
|
if (item == 1) { |
||||||
|
return '启用' |
||||||
|
} |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 跳转详情 |
||||||
|
goPage(item, type) { |
||||||
|
if (type == 'details') { |
||||||
|
uni.navigateTo({ |
||||||
|
url: "/pages/submission/recordsdetails?id=" + item.id, |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
if (type == 'breakdownView') { |
||||||
|
let param = { |
||||||
|
id: item.id, |
||||||
|
type: type |
||||||
|
} |
||||||
|
uni.navigateTo({ |
||||||
|
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, |
||||||
|
}); |
||||||
|
} |
||||||
|
if (type == 'breakdownUpdate') { |
||||||
|
let param = { |
||||||
|
id: item.id, |
||||||
|
type: type |
||||||
|
} |
||||||
|
uni.navigateTo({ |
||||||
|
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, |
||||||
|
}); |
||||||
|
} |
||||||
|
if (type == 'evaluate') { |
||||||
|
let param = { |
||||||
|
id: item.id, |
||||||
|
} |
||||||
|
uni.navigateTo({ |
||||||
|
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`, |
||||||
|
}); |
||||||
|
} |
||||||
|
}, |
||||||
|
|
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped> |
||||||
|
.page-css { |
||||||
|
padding: 0; |
||||||
|
|
||||||
|
.page-search-top { |
||||||
|
height: 210rpx; |
||||||
|
background-color: rgba(248, 248, 248, 1); |
||||||
|
padding: 0 40rpx 0; |
||||||
|
} |
||||||
|
|
||||||
|
.order-box { |
||||||
|
margin-top: 20rpx; |
||||||
|
|
||||||
|
.order-item { |
||||||
|
min-height: 414rpx; |
||||||
|
margin: 0 24rpx 20rpx; |
||||||
|
border-radius: 20rpx; |
||||||
|
background: #fff; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
|
||||||
|
.item-top { |
||||||
|
height: 114rpx; |
||||||
|
border-bottom: 1px solid rgba(239, 239, 239, 1); |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
width: 100%; |
||||||
|
|
||||||
|
.item-left { |
||||||
|
flex: 1; |
||||||
|
|
||||||
|
text { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
|
||||||
|
.item-orderNo { |
||||||
|
color: rgba(51, 51, 51, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
padding: 12rpx 0 0 26rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.item-time { |
||||||
|
color: rgba(190, 190, 190, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
padding: 12rpx 0 0 26rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.item-right { |
||||||
|
width: 132rpx; |
||||||
|
height: 48rpx; |
||||||
|
margin: 36rpx 24rpx 0 0; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.item-con { |
||||||
|
flex: 1; |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
margin-bottom: 32rpx; |
||||||
|
|
||||||
|
.con-left { |
||||||
|
width: 150rpx; |
||||||
|
height: 150rpx; |
||||||
|
margin: 24rpx 28rpx 0 28rpx; |
||||||
|
|
||||||
|
image { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.con-right { |
||||||
|
flex: 1; |
||||||
|
margin-right: 24rpx; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
margin-left: 32rpx; |
||||||
|
|
||||||
|
text { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
|
||||||
|
.con-title { |
||||||
|
margin-top: 12rpx; |
||||||
|
line-height: 60rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.con-content { |
||||||
|
|
||||||
|
color: rgba(108, 108, 108, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
// line-height: 36rpx; |
||||||
|
margin-top: 14rpx; |
||||||
|
flex: 1; |
||||||
|
|
||||||
|
text { |
||||||
|
display: -webkit-box; |
||||||
|
-webkit-box-orient: vertical; |
||||||
|
-webkit-line-clamp: 2; |
||||||
|
overflow: hidden; |
||||||
|
text-overflow: ellipsis; |
||||||
|
line-height: 1.5em; |
||||||
|
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */ |
||||||
|
max-height: 3em; |
||||||
|
/* 3行的高度 */ |
||||||
|
width: 100%; |
||||||
|
/* 根据需要设置宽度 */ |
||||||
|
word-wrap: break-word; |
||||||
|
/* 允许在单词内换行 */ |
||||||
|
word-break: break-all; |
||||||
|
/* 允许在任意字符处换行 */ |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.con-btn { |
||||||
|
margin-top: 56rpx; |
||||||
|
margin-bottom: 32rpx; |
||||||
|
display: inline-block; |
||||||
|
text-align: right; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
@ -0,0 +1,167 @@ |
|||||||
|
<template> |
||||||
|
<view class="page-css"> |
||||||
|
<view class="page-header-txt">科研医疗建筑运维平台</view> |
||||||
|
<planList></planList> |
||||||
|
<betone-tabbar ref="tabbarRef" /> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import planList from './components/plan-list.vue' |
||||||
|
export default { |
||||||
|
components: { |
||||||
|
planList, |
||||||
|
}, |
||||||
|
props: { |
||||||
|
|
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
|
||||||
|
|
||||||
|
}; |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
|
||||||
|
}, |
||||||
|
onShow() { |
||||||
|
this.$nextTick(() => { |
||||||
|
this.$refs.tabbarRef.getPermission(); |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
|
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped> |
||||||
|
.page-css { |
||||||
|
padding: 0; |
||||||
|
|
||||||
|
.page-search-top { |
||||||
|
height: 210rpx; |
||||||
|
background-color: rgba(248, 248, 248, 1); |
||||||
|
padding: 0 40rpx 0; |
||||||
|
} |
||||||
|
|
||||||
|
.order-box { |
||||||
|
margin-top: 20rpx; |
||||||
|
|
||||||
|
.order-item { |
||||||
|
min-height: 414rpx; |
||||||
|
margin: 0 24rpx 20rpx; |
||||||
|
border-radius: 20rpx; |
||||||
|
background: #fff; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
|
||||||
|
.item-top { |
||||||
|
height: 114rpx; |
||||||
|
border-bottom: 1px solid rgba(239, 239, 239, 1); |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
width: 100%; |
||||||
|
|
||||||
|
.item-left { |
||||||
|
flex: 1; |
||||||
|
|
||||||
|
text { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
|
||||||
|
.item-orderNo { |
||||||
|
color: rgba(51, 51, 51, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
padding: 12rpx 0 0 26rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.item-time { |
||||||
|
color: rgba(190, 190, 190, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
padding: 12rpx 0 0 26rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.item-right { |
||||||
|
width: 132rpx; |
||||||
|
height: 48rpx; |
||||||
|
margin: 36rpx 24rpx 0 0; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.item-con { |
||||||
|
flex: 1; |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
margin-bottom: 24rpx; |
||||||
|
|
||||||
|
.con-left { |
||||||
|
width: 150rpx; |
||||||
|
height: 150rpx; |
||||||
|
margin: 24rpx 28rpx 0 28rpx; |
||||||
|
|
||||||
|
image { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.con-right { |
||||||
|
flex: 1; |
||||||
|
margin-right: 24rpx; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
margin-left: 32rpx; |
||||||
|
|
||||||
|
text { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
|
||||||
|
.con-title { |
||||||
|
margin-top: 12rpx; |
||||||
|
line-height: 60rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.con-content { |
||||||
|
|
||||||
|
color: rgba(108, 108, 108, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
// line-height: 36rpx; |
||||||
|
margin-top: 14rpx; |
||||||
|
flex: 1; |
||||||
|
|
||||||
|
text { |
||||||
|
display: -webkit-box; |
||||||
|
-webkit-box-orient: vertical; |
||||||
|
-webkit-line-clamp: 2; |
||||||
|
overflow: hidden; |
||||||
|
text-overflow: ellipsis; |
||||||
|
line-height: 1.5em; |
||||||
|
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */ |
||||||
|
max-height: 3em; |
||||||
|
/* 3行的高度 */ |
||||||
|
width: 100%; |
||||||
|
/* 根据需要设置宽度 */ |
||||||
|
word-wrap: break-word; |
||||||
|
/* 允许在单词内换行 */ |
||||||
|
word-break: break-all; |
||||||
|
/* 允许在任意字符处换行 */ |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.con-btn { |
||||||
|
margin-top: 56rpx; |
||||||
|
margin-bottom: 32rpx; |
||||||
|
display: inline-block; |
||||||
|
text-align: right; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
@ -0,0 +1,349 @@ |
|||||||
|
<template> |
||||||
|
<view class="page-css"> |
||||||
|
<view class="page-header-txt">科研医疗建筑运维平台</view> |
||||||
|
<view class="page-search-top"> |
||||||
|
<betone-new-input v-model="searchInfo.requirementCode" placeholder="搜索巡检单单号" icon="search" |
||||||
|
style="margin-bottom: 32rpx" @changevalue="searchData()" /> |
||||||
|
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab" |
||||||
|
bg-color="rgba(248, 248, 248, 1)"></u-tabs> |
||||||
|
</view> |
||||||
|
<view class="order-box"> |
||||||
|
<view class="order-item" v-for="(item, index) in orderData" :key="index" |
||||||
|
@click="goPage(item, '/pages/inspection/questDetails')"> |
||||||
|
<view class="item-top"> |
||||||
|
<view class="item-left"> |
||||||
|
<text class="item-orderNo">{{ item.reportUnit }}</text> |
||||||
|
<text class="item-time"> 单号:{{ item.requirementCode }} {{ item.fillingTime }}</text> |
||||||
|
</view> |
||||||
|
<view class="item-right"> |
||||||
|
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" |
||||||
|
:bg-color="tagColor[statusName(item.status)]" /> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="item-con"> |
||||||
|
<view class="con-left"> |
||||||
|
<image src="@/static/images/pic-default.png" alt="" /> |
||||||
|
</view> |
||||||
|
<view class="con-right"> |
||||||
|
<text class="con-title">提报类型:{{ item.faultType }}</text> |
||||||
|
<view class="con-content"> |
||||||
|
<text>{{ item.faultDescribe }}</text> |
||||||
|
</view> |
||||||
|
<view class="con-btn"> |
||||||
|
|
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" /> |
||||||
|
|
||||||
|
<betone-loading ref="BetLoading" /> |
||||||
|
<betone-tabbar ref="tabbarRef" /> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
export default { |
||||||
|
props: { |
||||||
|
|
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
searchInfo: { |
||||||
|
requirementCode: "", |
||||||
|
type: '',//状态 |
||||||
|
reportUnit: '',//提报单位 |
||||||
|
}, |
||||||
|
tagColor: { |
||||||
|
维修中: "#3A62D7", |
||||||
|
待确认: "#81B337", |
||||||
|
待维修: "#3A62D7", |
||||||
|
待提报: "#81B337", |
||||||
|
已完成: "#CECECE", |
||||||
|
待维修: '#E99D42' |
||||||
|
}, |
||||||
|
tabList: [ |
||||||
|
{ |
||||||
|
name: "全部", |
||||||
|
key: "9999", |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: "待提报", |
||||||
|
key: "-1", |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: "维修中", |
||||||
|
key: "1,2,3", |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: "已完成", |
||||||
|
key: "4,5,6", |
||||||
|
}, |
||||||
|
|
||||||
|
], |
||||||
|
current: 0, |
||||||
|
loadingState: "loadmore", |
||||||
|
isNomore: false, |
||||||
|
noDataFlag: false, |
||||||
|
|
||||||
|
orderData: [], |
||||||
|
page: { |
||||||
|
currentPage: 1, |
||||||
|
pageSize: 10, |
||||||
|
}, |
||||||
|
|
||||||
|
|
||||||
|
}; |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
noData() { |
||||||
|
return this.orderData && this.orderData.length == 0; |
||||||
|
}, |
||||||
|
dataTypes() { |
||||||
|
return this.$store.state.dataType |
||||||
|
}, |
||||||
|
}, |
||||||
|
onShow() { |
||||||
|
this.$nextTick(() => { |
||||||
|
this.$refs.tabbarRef.getPermission(); |
||||||
|
this.$refs.BetLoading.show(); |
||||||
|
setTimeout(() => { |
||||||
|
this.$refs.BetLoading.hide(); |
||||||
|
}, 1000); |
||||||
|
}); |
||||||
|
}, |
||||||
|
onReachBottom() { |
||||||
|
if (this.isNomore) { |
||||||
|
return; |
||||||
|
} |
||||||
|
this.page.currentPage++; |
||||||
|
this.getRecordsList(); |
||||||
|
}, |
||||||
|
onPullDownRefresh() { |
||||||
|
this.isNomore = false |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.getRecordsList(); |
||||||
|
uni.stopPullDownRefresh(); |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
this.$nextTick(() => { |
||||||
|
this.getRecordsList() |
||||||
|
|
||||||
|
}); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
// 获取列表 |
||||||
|
getRecordsList() { |
||||||
|
this.$refs.BetLoading.show(); |
||||||
|
this.loadingState = "loading"; |
||||||
|
let query = { |
||||||
|
current: this.page.currentPage, //页数 |
||||||
|
size: this.page.pageSize, //条数 |
||||||
|
dataType: this.dataTypes,//数据权限 |
||||||
|
// ...this.searchInfo |
||||||
|
// reportUnit: this.searchInfo.reportUnit |
||||||
|
} |
||||||
|
|
||||||
|
this.$u.api.getWorkOrderRecords(query).then(res => { |
||||||
|
if (res.code == 200) { |
||||||
|
|
||||||
|
var totalPage = res.data.total; |
||||||
|
var newOrders = res.data.records; |
||||||
|
if (this.page.currentPage == 1) { |
||||||
|
this.orderData = []; |
||||||
|
} |
||||||
|
|
||||||
|
this.orderData = [...this.orderData, ...(res.data.records || [])]; |
||||||
|
if (newOrders.length == 0) { |
||||||
|
this.loadingState = "nomore"; |
||||||
|
this.isNomore = true; |
||||||
|
} |
||||||
|
if (totalPage == this.orderData.length) { |
||||||
|
this.loadingState = "nomore"; |
||||||
|
this.isNomore = true; |
||||||
|
} |
||||||
|
this.$refs.BetLoading.hide(); |
||||||
|
} |
||||||
|
}).catch(err => { |
||||||
|
|
||||||
|
}) |
||||||
|
}, |
||||||
|
// 搜索 单号 |
||||||
|
searchData() { |
||||||
|
if (this.dataTypes != 1) { |
||||||
|
// 非管理员和客户 不传提报单位 |
||||||
|
this.searchInfo.reportUnit = this.searchInfo.requirementCode |
||||||
|
} else { |
||||||
|
this.searchInfo.reportUnit = '' |
||||||
|
} |
||||||
|
this.isNomore = false |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.getRecordsList() |
||||||
|
}, |
||||||
|
// tab切换 |
||||||
|
changeTab(index) { |
||||||
|
this.current = index; |
||||||
|
this.searchInfo.type = this.tabList[index].key == '9999' ? '' : this.tabList[index].key |
||||||
|
this.isNomore = false |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.getRecordsList() |
||||||
|
}, |
||||||
|
// 获取状态信息 |
||||||
|
statusName(item) { |
||||||
|
if (item == -1) { |
||||||
|
return '待提报' |
||||||
|
} |
||||||
|
if (item == 0) { |
||||||
|
return '待接单' |
||||||
|
} |
||||||
|
if (item == 1 || item == 2 || item == 3) { |
||||||
|
return '待维修' |
||||||
|
} |
||||||
|
if (item == 4 || item == 5 || item == 6) { |
||||||
|
return '已完成' |
||||||
|
} |
||||||
|
}, |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 跳转详情 |
||||||
|
goPage(item, path) { |
||||||
|
uni.navigateTo({ |
||||||
|
url: path, |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped> |
||||||
|
.page-css { |
||||||
|
padding: 0; |
||||||
|
|
||||||
|
.page-search-top { |
||||||
|
height: 210rpx; |
||||||
|
background-color: rgba(248, 248, 248, 1); |
||||||
|
padding: 0 40rpx 0; |
||||||
|
} |
||||||
|
|
||||||
|
.order-box { |
||||||
|
margin-top: 20rpx; |
||||||
|
|
||||||
|
.order-item { |
||||||
|
height: 414rpx; |
||||||
|
margin: 0 24rpx 20rpx; |
||||||
|
border-radius: 20rpx; |
||||||
|
background: #fff; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
|
||||||
|
.item-top { |
||||||
|
height: 114rpx; |
||||||
|
border-bottom: 1px solid rgba(239, 239, 239, 1); |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
width: 100%; |
||||||
|
|
||||||
|
.item-left { |
||||||
|
flex: 1; |
||||||
|
|
||||||
|
text { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
|
||||||
|
.item-orderNo { |
||||||
|
color: rgba(51, 51, 51, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
padding: 12rpx 0 0 26rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.item-time { |
||||||
|
color: rgba(190, 190, 190, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
padding: 12rpx 0 0 26rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.item-right { |
||||||
|
width: 132rpx; |
||||||
|
height: 48rpx; |
||||||
|
margin: 36rpx 24rpx 0 0; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.item-con { |
||||||
|
flex: 1; |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
|
||||||
|
.con-left { |
||||||
|
width: 150rpx; |
||||||
|
height: 150rpx; |
||||||
|
margin: 24rpx 28rpx 0 28rpx; |
||||||
|
|
||||||
|
image { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.con-right { |
||||||
|
flex: 1; |
||||||
|
margin-right: 24rpx; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
|
||||||
|
text { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
|
||||||
|
.con-title { |
||||||
|
margin-top: 12rpx; |
||||||
|
line-height: 60rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.con-content { |
||||||
|
|
||||||
|
color: rgba(108, 108, 108, 1); |
||||||
|
font-size: 24rpx; |
||||||
|
// line-height: 36rpx; |
||||||
|
margin-top: 14rpx; |
||||||
|
flex: 1; |
||||||
|
|
||||||
|
text { |
||||||
|
display: -webkit-box; |
||||||
|
-webkit-box-orient: vertical; |
||||||
|
-webkit-line-clamp: 2; |
||||||
|
overflow: hidden; |
||||||
|
text-overflow: ellipsis; |
||||||
|
line-height: 1.5em; |
||||||
|
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */ |
||||||
|
max-height: 3em; |
||||||
|
/* 3行的高度 */ |
||||||
|
width: 100%; |
||||||
|
/* 根据需要设置宽度 */ |
||||||
|
word-wrap: break-word; |
||||||
|
/* 允许在单词内换行 */ |
||||||
|
word-break: break-all; |
||||||
|
/* 允许在任意字符处换行 */ |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.con-btn { |
||||||
|
margin-top: 56rpx; |
||||||
|
margin-bottom: 32rpx; |
||||||
|
display: inline-block; |
||||||
|
text-align: right; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
@ -0,0 +1,99 @@ |
|||||||
|
<template> |
||||||
|
<view class="page-css"> |
||||||
|
<view class="info"> |
||||||
|
<view class="info_title">基本信息</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">单位名称:</text> |
||||||
|
<text class="item_right_txt">张三</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">巡检项目名称:</text> |
||||||
|
<text class="item_right_txt">张三</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">项目地址:</text> |
||||||
|
<text class="item_right_txt">张三</text> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="info"> |
||||||
|
<view class="info_title">巡检配置</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">巡检内容:</text> |
||||||
|
<text class="item_right_txt">张三</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">任务开始时间:</text> |
||||||
|
<text class="item_right_txt">张三</text> |
||||||
|
</view> |
||||||
|
<view class="info_item"> |
||||||
|
<text class="item_left_txt">预约上门时间:</text> |
||||||
|
<text class="item_right_txt">张三</text> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="info"> |
||||||
|
<view class="info_title">巡检任务</view> |
||||||
|
<detailsCollapse></detailsCollapse> |
||||||
|
</view> |
||||||
|
|
||||||
|
</view> |
||||||
|
</template> |
||||||
|
<script> |
||||||
|
import detailsCollapse from './components/detailsCollapse.vue' |
||||||
|
export default { |
||||||
|
components: { |
||||||
|
detailsCollapse, |
||||||
|
}, |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
.page-css { |
||||||
|
width: 100%; |
||||||
|
padding: 0; |
||||||
|
padding-top: 26rpx; |
||||||
|
padding-bottom: 180rpx; |
||||||
|
|
||||||
|
.info { |
||||||
|
margin: 0 24rpx 20rpx; |
||||||
|
border-radius: 20rpx; |
||||||
|
background-color: rgba(255, 255, 255, 1); |
||||||
|
padding: 6rpx 0 34rpx; |
||||||
|
|
||||||
|
.info_title { |
||||||
|
line-height: 60rpx; |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 32rpx; |
||||||
|
text-align: left; |
||||||
|
font-family: SourceHanSansSC-bold; |
||||||
|
margin: 18rpx 0 0rpx 20rpx; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
|
||||||
|
.info_item { |
||||||
|
padding: 4rpx 20rpx 0; |
||||||
|
|
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
|
||||||
|
.item_left_txt { |
||||||
|
color: rgba(108, 108, 108, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
text-align: left; |
||||||
|
font-family: SourceHanSansSC-regular; |
||||||
|
width: 210rpx; |
||||||
|
margin-right: 20rpx; |
||||||
|
line-height: 60rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.item_right_txt { |
||||||
|
max-width: calc(100% - 220rpx); |
||||||
|
color: rgba(0, 0, 0, 1); |
||||||
|
font-size: 28rpx; |
||||||
|
// text-align: left; |
||||||
|
text-align: justify; |
||||||
|
font-family: SourceHanSansSC-regular; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
@ -0,0 +1,97 @@ |
|||||||
|
<template> |
||||||
|
<view style="width: 100%;height: 100vh;"> |
||||||
|
<map :scale="scale" style="width: 100%; height: 100%;" :show-compass="true" |
||||||
|
:enable-overlooking="false" :enable-satellite="false" :enable-traffic="true" :show-location="true" |
||||||
|
:latitude="latitude" :longitude="longitude" :markers="markers" > |
||||||
|
</map> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
export default { |
||||||
|
data() { |
||||||
|
return { |
||||||
|
scale: 12,//地图的缩放 5-18取值 |
||||||
|
latitude: 30.64525,//蓝色点的位置---自己当前的位置 纬度 |
||||||
|
longitude: 114.17240, //自己当 前位置的经度 |
||||||
|
markers: [{ |
||||||
|
id: 1, |
||||||
|
latitude: 30.51242,//门店图片点的 纬度 |
||||||
|
longitude: 114.18055,//经度 |
||||||
|
height: 80,//图片的宽高 |
||||||
|
width: 80, |
||||||
|
callout: { |
||||||
|
color: '#007AFF', // 文本颜色 |
||||||
|
bgColor: '#fff', // 背景色 |
||||||
|
display: "ALWAYS", // 'BYCLICK':点击显示; 'ALWAYS':常显 |
||||||
|
fontSize: 15, |
||||||
|
textAlign: 'left', // 文本对齐方式。有效值: left, right, center |
||||||
|
padding: 10, // 文本边缘留白 |
||||||
|
borderRadius: 5, |
||||||
|
content: '距离5km', |
||||||
|
}, |
||||||
|
|
||||||
|
iconPath: 'https://zpkoss.oss-cn-shenzhen.aliyuncs.com/newsys/dms_app/logo/house.jpg'//图 |
||||||
|
}, ] |
||||||
|
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
//计算距离的方法实现 |
||||||
|
rad(d) { |
||||||
|
return d * Math.PI / 180.0; |
||||||
|
}, |
||||||
|
// 根据经纬度计算距离,参数分别为第一点的纬度,经度;第二点的纬度,经度 |
||||||
|
getDistances(lat1, lng1, lat2, lng2) { |
||||||
|
var radLat1 = this.rad(lat1); |
||||||
|
var radLat2 = this.rad(lat2); |
||||||
|
var a = radLat1 - radLat2; |
||||||
|
var b = this.rad(lng1) - this.rad(lng2); |
||||||
|
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + |
||||||
|
Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))); |
||||||
|
s = s * 6378.137; |
||||||
|
s = Math.round(s * 10000) / 10000; |
||||||
|
|
||||||
|
var distance = s; |
||||||
|
var distance_str = ""; |
||||||
|
|
||||||
|
if (parseInt(distance) >= 1) { |
||||||
|
distance_str = distance.toFixed(2) + "km"; |
||||||
|
} else { |
||||||
|
distance_str = (distance * 1000).toFixed(2) + "m"; |
||||||
|
} |
||||||
|
let objData = { |
||||||
|
distance: distance, |
||||||
|
distance_str: distance_str |
||||||
|
} |
||||||
|
this.markers[0].callout.content = '距离您' + objData.distance_str |
||||||
|
} |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
let that = this |
||||||
|
//获取当前位置 |
||||||
|
uni.getLocation({ |
||||||
|
type: 'wgs84', |
||||||
|
geocode: true, //设置该参数为true可直接获取经纬度及城市信息 |
||||||
|
success: function(res) { |
||||||
|
console.log(res) |
||||||
|
that.latitude = res.latitude//当前位置 |
||||||
|
that.longitude = res.longitude |
||||||
|
that.markers[0].latitude = 30.51242//配送员位置 可调接口实时获取并且赋值 |
||||||
|
that.markers[0].longitude = 114.18055 |
||||||
|
}, |
||||||
|
fail: function() { |
||||||
|
uni.showToast({ |
||||||
|
title: '获取地址失败,将导致部分功能不可用', |
||||||
|
icon: 'none' |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
//调用计算距离方法 |
||||||
|
this.getDistances(30.64525, 114.17240, 30.51242, 114.18055) |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style scoped> |
||||||
|
|
||||||
|
</style> |
||||||
@ -1,35 +1,76 @@ |
|||||||
// 工作台
|
// 工作台 客服看到的菜单
|
||||||
const ordinary = [{ |
const ordinary = [{ |
||||||
iconPath: "photo", |
iconPath: "photo", |
||||||
selectedIconPath: "photo-fill", |
selectedIconPath: "photo-fill", |
||||||
text: "接单记录", |
text: "接单记录", |
||||||
pagePath: "pages/order/tasking", |
pagePath: "pages/order/tasking", |
||||||
|
}, { |
||||||
|
iconPath: "photo", |
||||||
|
selectedIconPath: "photo-fill", |
||||||
|
text: "巡检计划", |
||||||
|
pagePath: "pages/inspection/plan", |
||||||
}, { |
}, { |
||||||
iconPath: "account", |
iconPath: "account", |
||||||
selectedIconPath: "account-fill", |
selectedIconPath: "account-fill", |
||||||
text: "我的", |
text: "我的", |
||||||
pagePath: "pages/my/my", |
pagePath: "pages/my/my", |
||||||
}] |
}] |
||||||
|
// 客户看到的页面
|
||||||
const member = [{ |
const member = [{ |
||||||
iconPath: "photo", |
iconPath: "photo", |
||||||
selectedIconPath: "photo-fill", |
selectedIconPath: "photo-fill", |
||||||
text: "工作台", |
text: "工作台", |
||||||
pagePath: "pages/home/index", |
pagePath: "pages/home/index", |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
iconPath: "https://cdn.uviewui.com/uview/common/min_button.png", |
iconPath: "https://cdn.uviewui.com/uview/common/min_button.png", |
||||||
selectedIconPath: "https://cdn.uviewui.com/uview/common/min_button_select.png", |
selectedIconPath: "https://cdn.uviewui.com/uview/common/min_button_select.png", |
||||||
text: "一键报送", |
text: "一键报送", |
||||||
pagePath: "pages/submission/index", |
pagePath: "pages/submission/index", |
||||||
}, { |
}, { |
||||||
iconPath: "account", |
iconPath: "account", |
||||||
selectedIconPath: "account-fill", |
selectedIconPath: "account-fill", |
||||||
text: "我的", |
text: "我的", |
||||||
pagePath: "pages/my/my", |
pagePath: "pages/my/my", |
||||||
}, |
}, |
||||||
] |
] |
||||||
|
// 维修负责人看到的页面
|
||||||
|
const manage = [{ |
||||||
|
iconPath: "photo", |
||||||
|
selectedIconPath: "photo-fill", |
||||||
|
text: "接单记录", |
||||||
|
pagePath: "pages/order/tasking", |
||||||
|
}, { |
||||||
|
iconPath: "photo", |
||||||
|
selectedIconPath: "photo-fill", |
||||||
|
text: "巡检计划", |
||||||
|
pagePath: "pages/inspection/plan", |
||||||
|
}, { |
||||||
|
iconPath: "account", |
||||||
|
selectedIconPath: "account-fill", |
||||||
|
text: "我的", |
||||||
|
pagePath: "pages/my/my", |
||||||
|
}] |
||||||
|
// 维修人员 看到的菜单
|
||||||
|
const repair = [{ |
||||||
|
iconPath: "photo", |
||||||
|
selectedIconPath: "photo-fill", |
||||||
|
text: "接单记录", |
||||||
|
pagePath: "pages/order/tasking", |
||||||
|
}, { |
||||||
|
iconPath: "photo", |
||||||
|
selectedIconPath: "photo-fill", |
||||||
|
text: "维修任务", |
||||||
|
pagePath: "pages/inspection/quest", |
||||||
|
}, { |
||||||
|
iconPath: "account", |
||||||
|
selectedIconPath: "account-fill", |
||||||
|
text: "我的", |
||||||
|
pagePath: "pages/my/my", |
||||||
|
}] |
||||||
export default { |
export default { |
||||||
ordinary, |
ordinary, |
||||||
member |
member, |
||||||
|
manage, |
||||||
|
repair |
||||||
} |
} |
||||||
Loading…
Reference in new issue