今日作业概况

This commit is contained in:
ff 2024-06-12 14:16:29 +08:00
parent 80975dbb88
commit 7524da6c3a
9 changed files with 123 additions and 16 deletions

View File

@ -1,8 +1,8 @@
// 请求地址
// export const URL_BASE = 'http://192.168.3.106:9090/server'
//export const URL_BASE = 'http://192.168.3.131:9090/server'
// export const URL_BASE = 'http://192.168.3.196:9090/server'
// export const URL_KAOSHI = 'http://192.168.3.196:8090/practice_api'
// export const URL_BASE = 'http://192.168.3.210:9090/server'
// export const URL_KAOSHI = 'http://192.168.3.210:8090/practice_api'
// 生产
export const URL_BASE = 'http://1.30.216.250:19090/server'
export const URL_KAOSHI = 'http://1.30.216.250:19094/practice_api'

View File

@ -2,8 +2,8 @@
"name" : "安全管理平台",
"appid" : "__UNI__DBED56F",
"description" : "安全管理平台",
"versionName" : "2.0.0",
"versionCode" : 110,
"versionName" : "2.1.0",
"versionCode" : 111,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -298,6 +298,17 @@
"animationDuration": 300
}
}
},{
"path": "pages/map/map",
"style": {
"navigationBarTitleText": "作业位置",
"navigationBarBackgroundColor": "#20B2AA",
"navigationBarTextStyle": "white",
"app-plus": {
"animationType": "fade-in",
"animationDuration": 300
}
}
},{
"path": "pages/jinrigongcheng/jinrigongcheng",
"style": {

View File

@ -23,10 +23,18 @@
<view class="label">作业部位</view>
<view class="value">{{item.location}}</view>
</view>
<view class="row flex-par">
<view class="label" style="width: 500rpx;"><span>经度{{item.lng}}</span><span>纬度{{item.lat}}</span></view>
<view class="value color1" @click="toMap(item)">查看地图</view>
</view>
<view class="row flex-par">
<view class="label">开工状态</view>
<view class="value">{{item.status}}</view>
</view>
<view class="row flex-par">
<view class="label" style="width: 300rpx;">工作日期{{item.workDate}}</view>
<view class="value color1" @click="toZhanBanHui(item)">站班会详情</view>
</view>
<view class="row flex-par">
<view class="label">作业票</view>
<view class="value color1" @click="getTicket(item)">查看详情</view>
@ -39,6 +47,7 @@
<view class="label">负责人电话</view>
<view class="value">{{item.phone}}</view>
</view>
</view>
</scroll-view>
<view class="nodata text-c" v-else>暂无数据</view>
@ -56,7 +65,7 @@
let prjStatusChecked = ref([])
let prjTypeChecked = ref([])
let departmentChecked = ref([])
let projects = null;
onLoad((options)=>{
//
riskLevelChecked.value = reset(JSON.parse(options.riskLevelChecked))
@ -88,7 +97,8 @@
prjStatusList: prjStatusChecked.value,
prjTypeList: prjTypeChecked.value,
departmentList: departmentChecked.value,
})
});
dataList.value = res
}
@ -111,6 +121,40 @@
ticketFun(item)
}
const toMap = (item) => {
if(item.lat && item.lng){
//
uni.navigateTo({
url:("/pages/map/map?lat="+item.lat+"&lng="+item.lng)
});
}else{
uni.showToast({
icon: 'none',
mask: true,
title: "该作业计划未完成开工打卡",
duration: 1000
});
return;
}
}
const toZhanBanHui = (item)=>{
if(item.workDate){
uni.navigateTo({
url:("/pages/zhanbanhui/jinrizhanbanhuixiangqing?type=jinrizuoye&item="+JSON.stringify(item))
})
}else{
uni.showToast({
icon: 'none',
mask: true,
title: "该作业计划未开工",
duration: 1000
});
return;
}
}
//
const ticketFun = (item) => {
let downloadPath = baseUrl+`/jobTicket/exportJob?id=${item.ticketId}`;

31
pages/map/map.vue Normal file
View File

@ -0,0 +1,31 @@
<template>
<view style="height:calc(100% - 190rpx); width:100%;">
<map id="myMap" style="width:100%;height: 100%;" :longitude="map.lng" :latitude="map.lat" :scale="12"
:markers="map.markers"></map>
</view>
</template>
<script setup>
import { onShow, onHide,onLoad,onBackPress } from '@dcloudio/uni-app'
import { reactive } from 'vue'
const map = reactive({ lat: 0.0, lng: 0.0, district: '', markers: [], markerDb: [] ,showType:false});
onLoad((options)=>{
map.lat = options.lat;
map.lng = options.lng;
map.markers.push({
latitude: Number(options.lat),
longitude: Number(options.lng),
iconPath: '/static/daKa/shi_gong_marker.png'
})
});
onBackPress(()=>{
// console.log("");
uni.redirectTo({
url:"/pages/jrzygk/index"
});
return true;
});
</script>
<style>
</style>

View File

@ -82,7 +82,9 @@
onlyFromCamera: true,
scanType: ['qrCode'],
success: function(res) {
sheBeiNum.value = res.result
// console.log(res);
sheBeiNum.value = res.result.replace("http://scan.bhnewechat.com:19091/scan/#/info/","");
// console.log(sheBeiNum.value);
bangDing()
}
})
@ -125,6 +127,7 @@
await HTTP.get('/jobPlan/addCameras', { id: zypId.value, num: sheBeiNum.value })
uni.showToast({ title: '设备绑定成功', duration: 2000 })
sheBeiS.value = await HTTP.get('/jobPlan/getCameras', { id: zypId.value })
// console.log(sheBeiS.value);
}
//

View File

@ -187,7 +187,7 @@
getApp().globalData.setBadgeNumberFun();
let selectType = uni.getStorageSync('select_type');
console.log("gongzuotai中selectType的值"+selectType);
// console.log("gongzuotaiselectType"+selectType);
if(selectType===2){
uni.switchTab({
url: '/pages/examTraining/tabBar/home'
@ -200,7 +200,7 @@
position.value = res.data;
}
});
// checkVersion();
checkVersion();
zypList.value = await HTTP.get('/dailyRisk/getDailyRisk');
getApp().globalData.reviseTabbarBySelect();
//

View File

@ -142,7 +142,7 @@
const toDetail = (item)=>{
uni.navigateTo({
url:("/pages/zhanbanhui/jinrizhanbanhuixiangqing?item="+JSON.stringify(item))
url:("/pages/zhanbanhui/jinrizhanbanhuixiangqing?type=jinrizhanbanhui&item="+JSON.stringify(item))
})
}
onBackPress(()=>{

View File

@ -197,15 +197,27 @@
planId:null,
id:null,
workDate:null
})
});
let type = null;
onLoad((options)=>{
// console.log(options.item);
// zhanbanhui.value = options.item;
type = options.type;
let item = JSON.parse(options.item);
zhanbanhui.id = item.id;
if(type==="jinrizhanbanhui"){
zhanbanhui.id = item.id;
}else if(type==="jinrizuoye"){
zhanbanhui.id = item.stationId;
}
zhanbanhui.equipmentNum = item.equipmentNum;
zhanbanhui.jobPlanNum = item.jobPlanNum;
zhanbanhui.pName = item.pName;
if(type==="jinrizhanbanhui"){
zhanbanhui.pName = item.pName;
}else if(type==="jinrizuoye"){
zhanbanhui.pName = item.prjName;
}
zhanbanhui.riskLevel = item.riskLevel;
zhanbanhui.workContent = item.workContent;
zhanbanhui.workDate = item.workDate;
@ -238,9 +250,15 @@
console.log(e,'----err')
}
onBackPress(()=>{
uni.redirectTo({
url:"/pages/zhanbanhui/jinrizhanbanhui"
});
if(type==="jinrizhanbanhui"){
uni.redirectTo({
url:"/pages/zhanbanhui/jinrizhanbanhui"
});
}else if(type==="jinrizuoye"){
uni.redirectTo({
url:"/pages/jrzygk/index"
});
}
return true;
});
</script>