代码提交

test
zhangdi 1 year ago
parent dd88ee75bf
commit 903b169818
  1. 10
      App.vue
  2. 8
      api/api.js
  3. 8
      config/status.js
  4. 2
      manifest.json
  5. 3
      pages/home/components/alarm.vue
  6. 25
      pages/home/components/swiper.vue
  7. 1
      pages/home/components/swiperRepair.vue
  8. 10
      pages/inspection/plan.vue
  9. 2
      pages/inspection/planDetails.vue
  10. 32
      pages/inspection/quest.vue
  11. 2
      pages/my/my.vue
  12. 19
      pages/my/records.vue
  13. 82
      pages/order/location.vue
  14. 110
      pages/submission/records.vue
  15. 5
      utils/website.js

@ -54,13 +54,13 @@ export default {
success: (res) => {
let query = {
id: userInfo.user_id,
// "addressLon": res.longitude,
// "addressLat": res.latitude
"addressLon": 120.4732160947301,
"addressLat": 36.17767397801995
addressLon: res.longitude,
addressLat: res.latitude
// "addressLon": 120.4732160947301,
// "addressLat": 36.17767397801995
}
this.$u.api.updatePosition(query).then(res => {
console.log(333333,query)
})
},
fail: (err) => {

@ -406,8 +406,14 @@ const install = (Vue, vm) => {
authorizations: true,
isparams: false
})
// 下载文件
let downLoadFile = (url, params) => http.post(url, params, {
authorizations: true,
isparams: false,
responseType: "blob",
})
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit, repairConfirmFinish, repairRefuseFinish, confirmPayment, getPosition, getRepairDetail, updatePosition, resetPwd, getNoticeList, updateSign, getMesseageList, getMesseageAll, updateMesseageStatus, getMesseageTotal, closeService, workOrderLog,urgentRepairConfirm,urgentRepairReject };
vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit, repairConfirmFinish, repairRefuseFinish, confirmPayment, getPosition, getRepairDetail, updatePosition, resetPwd, getNoticeList, updateSign, getMesseageList, getMesseageAll, updateMesseageStatus, getMesseageTotal, closeService, workOrderLog, urgentRepairConfirm, urgentRepairReject, downLoadFile };
}
export default {

@ -8,7 +8,7 @@ export const tabList = {
},
{
name: "待接单",
key: "101",
key: "101,205",
},
{
name: "待确认",
@ -37,7 +37,7 @@ export const tabList = {
},
{
name: "待评价",
key: "403,202,406",
key: "403,406",
},
{
name: "待付款",
@ -60,7 +60,7 @@ export const tabList = {
{
name: "待接单",
key: "101",
key: "101,205",
},
{
name: "待维修",
@ -104,7 +104,7 @@ export const tabList = {
{
name: "维修中",
key: "103,404",
key: "103,404,401",
},
{
name: "已通过",

@ -15,6 +15,8 @@
"distribute" : {
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_MEDIA_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",

@ -73,8 +73,11 @@ export default {
});
this.list = res.data
// list
if(this.list.length>1){
this.init()
}
}
})
},
alarmImg() {

@ -3,19 +3,8 @@
<view class="work-title">实验室巡检</view>
<view class="notice_bg">
<view class="line"></view>
<swiper
autoplay="true"
display-multiple-items="1"
vertical="true"
circular
interval="7000"
class="bar-swiper"
>
<swiper-item
v-for="(item, index) in list"
:key="index"
class="swiper-item"
>
<swiper autoplay="true" display-multiple-items=" 1" vertical="true" circular interval="7000" class="bar-swiper">
<swiper-item v-for="(item, index) in list" :key="index" class="swiper-item">
<view class="title">{{ item.inspectionName }}</view>
<view class="time">巡检计划时间:{{ item.inspectionTime }}</view>
<view class="name">巡检人:{{ item.inspectionPerson }}</view>
@ -62,6 +51,7 @@ export default {
font-size: 32rpx;
padding: 0 0 32rpx 36rpx;
}
.notice_bg {
margin: 0 40rpx 32rpx;
background-color: #ffffff;
@ -70,6 +60,7 @@ export default {
display: flex;
align-items: center;
position: relative;
.icon {
width: 74rpx;
height: 72rpx;
@ -80,12 +71,13 @@ export default {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(34, 34, 34, 0.5);
height: 210rpx;
height: 200rpx;
display: flex;
align-items: center;
flex: 1;
margin-left: 12rpx;
}
.swiper-item {
overflow: hidden;
}
@ -98,25 +90,30 @@ export default {
margin-top: 22rpx;
line-height: 38rpx;
}
.time {
margin-top: 20rpx;
margin-bottom: 28rpx;
}
.time,
.name {
font-size: 26rpx;
color: rgba(108, 108, 108, 1);
line-height: 38rpx;
}
.status {
font-size: 26rpx;
line-height: 38rpx;
margin-top: 20rpx;
.status-name {
color: rgba(58, 98, 215, 1);
padding-right: 10rpx;
}
}
.type {
position: absolute;
top: 20rpx;

@ -88,6 +88,7 @@ export default {
goPage(item){
uni.navigateTo({
url: '/pages/submission/records?type=submission&requirementCode='+item.requirementCode,
});
}

@ -120,8 +120,14 @@ export default {
getRecordsList() {
// this.BetLoading.show();
this.$u.api.getDictionaryList().then(res => {
let query = {
current:this.page.currentPage,
size:this.page.pageSize,
}
if(!!this.searchInfo.requirementCode){
query.deptName = this.searchInfo.requirementCode
}
this.$u.api.getDictionaryList(query).then(res => {
var totalPage = res.data.total;
var newOrders = res.data.records;
if (this.page.currentPage == 1) {

@ -7,7 +7,7 @@
<text class="item_right_txt">{{ detailForm.deptName }}</text>
</view>
<view class="info_item">
<text class="item_left_txt">项目标题</text>
<text class="item_left_txt">项目内容</text>
<text class="item_right_txt">{{ detailForm.planContent }}</text>
</view>
</view>

@ -10,7 +10,7 @@
<view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" placeholder="搜索巡检单单号" icon="search"
style="margin-bottom: 32rpx" @changevalue="searchData()" />
<u-tabs v-if="subsectionCurrent == '0'" :list="tabList" :is-scroll="true" :current="current"
<u-tabs v-if="subsectionCurrent == '0'&&dataTypes!=2" :list="tabList" :is-scroll="true" :current="current"
@change="changeTab"></u-tabs>
<u-tabs v-if="subsectionCurrent == '1'" :list="tasktabList" :is-scroll="true" :current="current"
@change="subsectionChangeTab"></u-tabs>
@ -144,7 +144,7 @@ export default {
tabList: [],
tasktabList: [],
current: 1,
current: 0,
loadingState: "loadmore",
isNomore: false,
noDataFlag: false,
@ -199,20 +199,19 @@ export default {
},
onShow() {
this.$nextTick(() => {
// this.statusList()
this.tabList = tabTaskList[this.$store.state.dataType + '']
// tabTaskRepairList
this.tasktabList = tabTaskRepairList[this.$store.state.dataType + '']
// this.getTasktabList()
this.getRepairPersons()
if (this.dataTypes == 2) {
// this.subsectionCurrent = '1'
// this.subsectionChangeTab('1')
this.tasktabList = tabTaskRepairList[this.dataTypes + '']
this.tabList = tabTaskList[this.dataTypes + '']
if(this.dataTypes != 2){
this.searchInfo.statusSearch = this.tabList[0].key == '9999' ? '' : this.tabList[0].key
}else{
// this.changeTab('1')
this.subsectionCurrent='1'
this.searchInfo.statusSearch = this.tasktabList[0].key == '9999' ? '' : this.tasktabList[0].key
}
this.getRepairPersons()
this.getRecordsList()
//
@ -254,6 +253,7 @@ export default {
res = await this.$u.api.getTaskPage(query)
} else {
query.statusSearch = this.searchInfo.statusSearch
query.taskStatus=4
res = await this.$u.api.getRepairPage(query)
}
if (res.code == 200) {
@ -329,12 +329,8 @@ export default {
},
subsectionChange(e) {
this.subsectionCurrent = e;
if (this.subsectionCurrent == '1') {
this.subsectionChangeTab(1)
} else {
this.changeTab('1')
}
// this.getRecordsList()
this.getRecordsList()
},
//
assign(item) {

@ -16,7 +16,7 @@
<view class="top-item"> {{ userIfo.area?userIfo.area:'' }} </view>
</view>
<!-- -->
<view class="feature-box" v-if="status == 1">
<view class="feature-box" v-if="status == 1&&(dataTypes=='2'||dataTypes=='1')">
<text>客户功能</text>
<view class="feature-list clearfix">
<view v-for="(item, index) in featureData" :key="index" class="list-item" @click="pageTo(item)">

@ -29,6 +29,11 @@
<script>
export default {
computed: {
dataTypes() {
return this.$store.state.dataType
},
},
data() {
return {
type: "", //
@ -39,6 +44,7 @@ export default {
},
recordData: [],
getUserData: [],//
userInfo:{}
};
},
onLoad(option) {
@ -51,7 +57,12 @@ export default {
},
onShow() {
this.$nextTick(() => {
this.userInfo = uni.getStorageSync("userinfo");
console.log('999',this.userInfo.role_id == '1839536982874193922')
if(this.userInfo.role_id == '1839536982874193922'){
this.getUserLists()
}
//
if (this.type == "login") {
this.placeholderTxt = "搜索人员角色信息";
@ -71,7 +82,7 @@ export default {
// this.BetLoading.show()
let query_ = {
current: 1,
size: 10
size: 1000
}
this.$u.api.getUserList(query_).then((res) => {
if (res.code == 200) {
@ -84,7 +95,7 @@ export default {
//
changeSelect(e) {
this.searchInfo.name = this.getUserData[e].name
this.searchInfo.id = this.getUserData[e].id
this.searchInfo.userName = this.getUserData[e].account
if (this.type == "login") {
this.getLoginRcords()
}
@ -98,7 +109,7 @@ export default {
// this.BetLoading.show()
let query_ = {
logType: 1,
userId: this.searchInfo.id
userName: this.searchInfo.userName
}
this.$u.api.getLoginRecords(query_).then((res) => {
if (res.code == 200) {
@ -112,7 +123,7 @@ export default {
// this.BetLoading.show()
let query_ = {
logType: 2, //1 2
userId: this.searchInfo.id
userName: this.searchInfo.userName
}
this.$u.api.getLoginRecords(query_).then((res) => {
if (res.code == 200) {

@ -18,7 +18,7 @@
<cover-view class="controls-title">
<cover-view class="tabs_box">
<cover-view class="flex flex-sub">
<cover-view class="pay_name">维修人员张三</cover-view>
<cover-view class="pay_name">维修人员{{ repairPerName }}</cover-view>
<cover-view class="pay_name" style="margin-top: 16rpx;">电话15089098908</cover-view>
<cover-view class="text-gray margin-top" style="margin-top: 16rpx;">
距离您还有 {{ juli }}
@ -43,14 +43,14 @@ export default {
longitude: 120.486065, //
display: 'always',
markers: [
// {
// id: 1,
// latitude: 36.146504,//
// longitude: 120.486065,//
// iconPath: '/static/images/position/destination.png',//
// label: {
// content: '133',
// },
{
id: 1,
latitude: 36.146504,//
longitude: 120.486065,//
iconPath: '/static/images/position/destination.png',//
label: {
content: '实验室',
},
// callout: {
// content: '20',
// color: '#fff',
@ -61,13 +61,16 @@ export default {
// padding: 3,
// anchorY: 5
// }
// },
// {
// id: 2,
// latitude: 35.146504,//
// longitude: 116.486065,//
// iconPath: '/static/images/position/weixiu.png',//
},
{
id: 2,
latitude: 35.146504,//
longitude: 116.486065,//
iconPath: '/static/images/position/weixiu.png',//
// display: 'ALWAYS',
label: {
content: '维修人员',
},
// callout: {
// content: '25',
// color: '#ffffff',
@ -78,17 +81,29 @@ export default {
// },
// }
}
],
userLat: null,//
userLon: null,//
userId: null,//id
userInfo: {},//
sendOrdersList: [],//
repairPerName:'',
timer:'',//
};
},
onLoad(options) {
console.log(6)
this.userId = options.userid
this.repairPerson = options.repairPerson
// repairPersonName
},
onUnload(){
clearInterval(this.timer)
},
onHide(){
clearInterval(this.timer)
},
methods: {
@ -98,7 +113,7 @@ export default {
},
//
getDistances(lat1, lng1, lat2, lng2) {
console.log('计算距离', lat1, lng1, lat2, lng2)
// console.log('', lat1, lng1, lat2, lng2)
var radLat1 = this.rad(lat1);
var radLat2 = this.rad(lat2);
@ -131,13 +146,13 @@ export default {
}
this.$u.api.getPosition(query).then(res => {
if (res.code == 200) {
if (Object.keys(res.data).length === 0) {
let data_ = res.data
if (Object.keys(data_).length === 0) {
uni.showToast({ title: "正在获取维修人员的位置信息,请稍后再进行查看!", icon: "none" });
} else {
this.markers[1].latitude = data.split(',')[0]
this.markers[1].longitude = data.split(',')[1]
this.markers[1].longitude = Number(data_.split(',')[0])
this.markers[1].latitude = Number(data_.split(',')[1])
// console.log('data', this.markers)
this.getDistances(this.markers[1].latitude, this.markers[1].longitude, this.markers[0].latitude, this.markers[0].longitude)
}
}
@ -149,20 +164,39 @@ export default {
this.userInfo = res.data
this.markers[0].latitude = res.data.addressLat
this.markers[0].longitude = res.data.addressLon
this.timer = setInterval(()=>{
this.getLocation()
},10000)
}
}).catch(err => {
})
},
//
getRepairPersons() {
this.$u.api.getRepairPersons().then(res => {
if (res.code == 200) {
let data_ = res.data
data_.forEach(i => {
if(i.id==this.repairPerson){
this.repairPerName = i.name
}
// this.sendOrdersList.push({ ...i, label: i.name })
})
}
})
},
},
mounted() {
this.getUserInfo()
this.getRepairPersons()
},
};
</script>

@ -44,7 +44,8 @@
<view class="con-btn">
<!-- 客户 -->
<u-button size="mini" plain style="margin-right:16rpx" @click.stop="openWorkOrder(item)">查看</u-button>
<!-- <u-button size="mini" plain style="margin-right:16rpx" @click="openModel(item, 'details')">下载</u-button> -->
<u-button size="mini" plain style="margin-right:16rpx" @click="handleExport(item)"
v-if="item.status == 202 || item.status == 203 || item.status == 204">报告</u-button>
<u-button size="mini" plain style="margin-right:16rpx" @click="openLog(item)">日志</u-button>
<block v-if="dataTypes == 1">
<!-- 工单详情 查看维修详情 -->
@ -58,10 +59,11 @@
<u-button v-if="item.status == 405" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="openModel(item, 'repairConfirm')">确认</u-button>
<u-button v-if="item.status == 103" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="goPageLocation(item)">查看位置</u-button>
<u-button v-if="item.status == 403 || item.status == 202|| item.status == 406" size="mini" :plain="true"
<u-button v-if="item.status == 103 || item.status == 404" size="mini" :plain="true"
style="margin-right:16rpx" :hair-line="true" type="primary"
@click="goPageLocation(item)">查看位置</u-button>
<u-button v-if="item.status == 403 || item.status == 202 || item.status == 406" size="mini"
:plain="true" style="margin-right:16rpx" :hair-line="true" type="primary"
@click="openEvaluate(item)">评价</u-button>
</block>
<!-- 客服 -->
@ -96,7 +98,7 @@
<u-button v-if="item.status == 401 || item.status == 300 || item.status == 105" size="mini"
:plain="true" style="margin-right:16rpx" type="primary" @click="orderConfirm(item)">提交</u-button>
<u-button v-if="item.status == 103 || item.status == 401 || item.status == 404" size="mini"
:plain="true" style="margin-right:16rpx" type="primary"
:plain="true" type="primary"
@click="openModel(item, 'repair')">维修完成</u-button>
</block>
@ -219,6 +221,7 @@ export default {
requirementCode: '',//
repairTypeList: [],//
repairConfirmShow: false,//
userInfo: {},//
};
},
computed: {
@ -227,6 +230,11 @@ export default {
},
dataTypes() {
this.tabList = tabList[this.$store.state.dataType]
if (this.requirementCode != '') {
this.current = this.tabList.length-1
}
return this.$store.state.dataType
},
tagColor() {
@ -249,22 +257,27 @@ export default {
onLoad(options) {
this.type = options.type ? options.type : ''
this.requirementCode = options.requirementCode ? options.requirementCode : ''
this.userInfo = uni.getStorageSync("userinfo");
},
onShow() {
this.$nextTick(() => {
this.getMesseageTotal()
if (this.type == '') {
this.$refs.tabbarRef.getPermission();
}
if (this.requirementCode != '') {
this.current = 0
this.searchInfo.requirementCode = this.requirementCode
} else {
// this.current = 1
// this.changeTab(1)
if(this.searchInfo.statusSearch == ''){
this.searchInfo.statusSearch = this.tabList[0].key == '9999' ? '' : this.tabList[0].key
}else{
this.searchInfo.statusSearch = this.tabList[0].key == '9999' ? '' : this.searchInfo.statusSearch
}
}
this.getType()
this.getRecordsList()
});
@ -277,7 +290,7 @@ export default {
let query = {
current: this.page.currentPage, //
size: this.page.pageSize, //
dataType: this.dataTypes,//
dataType:this.userInfo.role_id=='1123598816738675201'?'': this.dataTypes,//
...this.searchInfo
}
this.$u.api.getWorkOrderRecords(query).then(res => {
@ -405,7 +418,7 @@ export default {
})
},
//
//
openModel(item, type) {
if (type == 'close') {
this.cloneVisible = true
@ -555,6 +568,7 @@ export default {
goPageLocation(item) {
let param = {
userid: item.repairPerson,
repairPerson: item.repairPerson
}
//
uni.navigateTo({
@ -645,6 +659,80 @@ export default {
this.getRecordsList()
}
})
},
//
handleExport(item) {
this.$u.api.downLoadFile('lab-ops/work-order/report-service', item).then(res => {
const blob = new Blob([res]);
// this.downloadXls(blob)
})
},
uploadFile(filePath) {
const token = uni.getStorageSync("token")
uni.uploadFile({
url: website.baseUrl + "/blade-resource/oss/endpoint/put-file", //
filePath: filePath,
name: "file", //
header: {
'Blade-Auth': 'bearer ' + token,
'Authorization': `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
'blade-requested-with': 'BladeHttpRequest' //
},
formData: {},
success: (res) => {
let info = JSON.parse(res.data);
console.log("上传成功", info); //
this.fileList.push({
'link': info.data.link,
'name': info.data.name
});
this.$emit('changeFile', this.fileList, this.formIndex)
this.$refs.BetLoading.hide()
},
error: (uploadFileRes) => {
// console.log("", uploadFileRes.data); //
this.$refs.BetLoading.hide()
},
});
},
downloadXls(data) {
//
const Environment = plus.android.importClass('android.os.Environment')
let filePathTemp = 'file://' + Environment.getExternalStorageDirectory() + '/Download/siyu-logs/'
// http://124.221.142.15:9000/laboratory/upload/20241231/57faa52e4fdf02f94a3b40d0c7089b29.pdf
console.log('filePathTemp', filePathTemp)
//
const fileManager = uni.getFileSystemManager();
console.log('data', data)
//
fileManager.writeFile({
filePath: filePathTemp,
data: data,
encoding: 'binary',
success: (res) => {
console.log('文件写入成功');
//
uni.saveFile({
tempFilePath: filePath,
success: (saveRes) => {
console.log('文件保存成功', saveRes.savedFilePath);
//
const savedFilePath = saveRes.savedFilePath;
//
},
fail: (err) => {
console.error('文件保存失败', err);
}
});
},
fail: (err) => {
console.error('文件写入失败', err);
}
});
}
},
};

@ -2,11 +2,12 @@
* 全局配置文件
*/
export default {
// baseUrl: 'http://124.221.142.15:8088/lab',
// baseUrl: 'http://192.168.1.4:10001',
// baseUrl:'http://192.168.0.118:80', //李庆坤
// baseUrl:'http://192.168.1.103:10001', //李涛
// baseUrl:'http://192.168.1.12:80', //李涛
baseUrl:'http://124.221.142.15:8088/api',//远程测试地址
baseUrl:'http://192.168.0.108:10001', //李庆坤
// baseUrl:'http://124.221.142.15:8088/api',//远程测试地址
indexTitle: "科研医疗建筑运维平台",
clientId: "saber", // 客户端id
clientSecret: "saber_secret", // 客户端密钥

Loading…
Cancel
Save