安全例会优化

dev
WenShiJun 2024-03-08 18:08:39 +08:00
parent 869c0a6cda
commit 5be53f55b0
4 changed files with 96 additions and 27 deletions

View File

@ -844,7 +844,7 @@
url: basePath+'/app/imgfiles/add',
filePath: tempFilePaths[i].filePath,
name: 'FFILE',
formData: {
formData: {
'TYPE': tempFilePaths[i].type,
'FOREIGN_KEY': _this.pd.HIDDEN_ID,
CORPINFO_ID: loginUser.CORPINFO_ID,

View File

@ -85,12 +85,13 @@
<view class="cu-modal" :class="{'show':modalShow}">
<sign @confirm="subCanvas" @cancel="modalShow = false"></sign>
</view>
<view class="cu-form-group" style="margin-top: 20px;">
<button class="cu-btn block bg-blue margin-tb-sm" @click="submitMeetingAttendance"></button>
<view class="cu-form-group" style="margin-top: 20px; ">
<button class="cu-btn block bg-blue margin-tb-sm" @click="submitMeetingAttendance('ACCESS_FINE_LOCATION')"></button>
</view>
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(editLocation)" :permissionID="permissionID"></yk-authpup>
</scroll-view>
</uni-drawer>
<view class="cu-form-group">
<view class="cu-form-group" v-if="pd.ATTENDANCE_STATUS === '0'">
<view class="title">是否参会</view>
<button class="cu-btn round bg-blue" @click="addMeeting"></button>
</view>
@ -131,6 +132,7 @@
signImgList: [],
LIVEPHOTOS: '',
SIGNATUREPICTURE: '',
ATTENDANCE_STATUS: '',
}
},
onLoad(e){
@ -225,7 +227,8 @@
}
})
},
submitMeetingAttendance() {
submitMeetingAttendance(permissionID) {
var _this = this;
if (this.liveImgs.length === 0 || this.signImgList.length === 0) {
uni.showToast({
title: '请上传实时照片和签字图片',
@ -233,28 +236,91 @@
});
return;
}
this.permissionID = permissionID;
setTimeout(()=>{
this.$refs['authpup'].open();
},200)
const livePhotoPath = this.liveImgs[0].FILEPATH;
const signPhotoPath = this.signImgList[0].filePath;
const params = {
SAFETY_MEETING_ID: this.SAFETY_MEETING_ID,
LIVEPHOTOS: livePhotoPath,
SIGNATUREPICTURE: signPhotoPath,
ATTENDANCE_STATUS: '1'
};
uni.getLocation({
type: 'gcj02',
geocode: true,
success: function (res) {
const locationAddress = `${res.address.province}${res.address.city}${res.address.district}${res.address.street}${res.address.streetNum}${res.address.poiName}`;
_this.longitude = res.longitude;
_this.latitude = res.latitude;
//
uni.showLoading({
title: '提交中...'
});
uni.uploadFile({
url: basePath + '/app/safetymeeting/edit',
filePath:_this.liveImgs[0].FILEPATH,
name: 'livePhoto',
formData: {
SAFETY_MEETING_ID: _this.SAFETY_MEETING_ID,
SIGNATUREPICTURE: _this.SIGNATUREPICTURE,
ATTENDANCE_STATUS: '1',
LATITUDE: _this.longitude, //
LONGITUDE: _this.latitude, //
LOCATIONADDRESS: locationAddress
},
success: uploadRes => {
//
const data = JSON.parse(uploadRes.data);
if (data.result === 'success') {
//
_this.$refs.showHiddenWindow.close();
//
_this.getData();
} else {
uni.showToast({
title: '提交失败: ' + data.message,
icon: 'none'
});
}
},
fail: () => {
uni.showToast({
title: '上传失败',
icon: 'none'
});
},
complete: () => {
uni.hideLoading();
}
});
},
fail: function () {
uni.showToast({
title: '获取位置信息失败',
icon: 'none'
});
}
});
},
//
formData(latitude, longitude) {
uni.showLoading({
title: '提交中...'
});
uni.request({
const livePhotoPath =baseImgPath + this.liveImgs[0].FILEPATH;
const signPhotoPath = this.signImgList[0].filePath;
uni.uploadFile({
url: basePath + '/app/safetymeeting/edit',
method: 'POST',
header: {
'Content-type':'application/x-www-form-urlencoded'
filePath: livePhotoPath,
name: 'livePhoto',
formData: {
SAFETY_MEETING_ID: this.SAFETY_MEETING_ID,
SIGNATUREPICTURE: this.SIGNATUREPICTURE,
ATTENDANCE_STATUS: '1',
},
data: params,
success: (res) => {
success: uploadRes => {
const data = JSON.parse(uploadRes.data);
uni.hideLoading();
if (res.data.result === 'success') {
if (data.result === 'success') {
uni.showToast({
title: '提交成功',
icon: 'success'
@ -262,10 +328,17 @@
this.$refs.showHiddenWindow.close();
} else {
uni.showToast({
title: '提交失败',
title: '提交失败: ' + data.message,
icon: 'none'
});
}
},
fail: () => {
uni.hideLoading();
uni.showToast({
title: '上传失败',
icon: 'none'
});
}
});
},
@ -280,7 +353,6 @@
NAME: loginUser.NAME,
USER_ID: loginUser.USER_ID
}]
// (drawer)
this.$refs['showHiddenWindow'].open()
this.showHiddenWindow = true
this.hiddenIsEdit = true
@ -317,7 +389,7 @@
}
.dy-card-content-item {
margin-top: 20upx;
margin-top: 10upx;
}
.dy-card-content-item .title {

View File

@ -94,7 +94,6 @@
_this.LEVELID=e.LEVELID;
_this.DEPT_NAME=e.DEPT_NAME;
_this.getData();
},
methods: {
//

View File

@ -15,9 +15,7 @@
<view class="title">
通知内容
</view>
<view class="info">
{{pd.NOTIFICATIONCONTENT}}
</view>
<rich-text class="info" :nodes="content"></rich-text>
<view class="info">
<text>{{pd.CREATETIME}}</text>
</view>