安全例会优化
parent
869c0a6cda
commit
5be53f55b0
|
@ -844,7 +844,7 @@
|
||||||
url: basePath+'/app/imgfiles/add',
|
url: basePath+'/app/imgfiles/add',
|
||||||
filePath: tempFilePaths[i].filePath,
|
filePath: tempFilePaths[i].filePath,
|
||||||
name: 'FFILE',
|
name: 'FFILE',
|
||||||
formData: {
|
formData: {
|
||||||
'TYPE': tempFilePaths[i].type,
|
'TYPE': tempFilePaths[i].type,
|
||||||
'FOREIGN_KEY': _this.pd.HIDDEN_ID,
|
'FOREIGN_KEY': _this.pd.HIDDEN_ID,
|
||||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||||
|
|
|
@ -85,12 +85,13 @@
|
||||||
<view class="cu-modal" :class="{'show':modalShow}">
|
<view class="cu-modal" :class="{'show':modalShow}">
|
||||||
<sign @confirm="subCanvas" @cancel="modalShow = false"></sign>
|
<sign @confirm="subCanvas" @cancel="modalShow = false"></sign>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-form-group" style="margin-top: 20px;">
|
<view class="cu-form-group" style="margin-top: 20px; ">
|
||||||
<button class="cu-btn block bg-blue margin-tb-sm" @click="submitMeetingAttendance">确定</button>
|
<button class="cu-btn block bg-blue margin-tb-sm" @click="submitMeetingAttendance('ACCESS_FINE_LOCATION')">提交当前位置</button>
|
||||||
</view>
|
</view>
|
||||||
|
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(editLocation)" :permissionID="permissionID"></yk-authpup>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</uni-drawer>
|
</uni-drawer>
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group" v-if="pd.ATTENDANCE_STATUS === '0'">
|
||||||
<view class="title">是否参会:</view>
|
<view class="title">是否参会:</view>
|
||||||
<button class="cu-btn round bg-blue" @click="addMeeting">参会</button>
|
<button class="cu-btn round bg-blue" @click="addMeeting">参会</button>
|
||||||
</view>
|
</view>
|
||||||
|
@ -131,6 +132,7 @@
|
||||||
signImgList: [],
|
signImgList: [],
|
||||||
LIVEPHOTOS: '',
|
LIVEPHOTOS: '',
|
||||||
SIGNATUREPICTURE: '',
|
SIGNATUREPICTURE: '',
|
||||||
|
ATTENDANCE_STATUS: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e){
|
onLoad(e){
|
||||||
|
@ -225,7 +227,8 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitMeetingAttendance() {
|
submitMeetingAttendance(permissionID) {
|
||||||
|
var _this = this;
|
||||||
if (this.liveImgs.length === 0 || this.signImgList.length === 0) {
|
if (this.liveImgs.length === 0 || this.signImgList.length === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传实时照片和签字图片',
|
title: '请上传实时照片和签字图片',
|
||||||
|
@ -233,28 +236,91 @@
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.permissionID = permissionID;
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.$refs['authpup'].open();
|
||||||
|
},200)
|
||||||
|
|
||||||
const livePhotoPath = this.liveImgs[0].FILEPATH;
|
uni.getLocation({
|
||||||
const signPhotoPath = this.signImgList[0].filePath;
|
type: 'gcj02',
|
||||||
const params = {
|
geocode: true,
|
||||||
SAFETY_MEETING_ID: this.SAFETY_MEETING_ID,
|
success: function (res) {
|
||||||
LIVEPHOTOS: livePhotoPath,
|
const locationAddress = `${res.address.province}${res.address.city}${res.address.district}${res.address.street}${res.address.streetNum}${res.address.poiName}`;
|
||||||
SIGNATUREPICTURE: signPhotoPath,
|
_this.longitude = res.longitude;
|
||||||
ATTENDANCE_STATUS: '1'
|
_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({
|
uni.showLoading({
|
||||||
title: '提交中...'
|
title: '提交中...'
|
||||||
});
|
});
|
||||||
uni.request({
|
const livePhotoPath =baseImgPath + this.liveImgs[0].FILEPATH;
|
||||||
|
const signPhotoPath = this.signImgList[0].filePath;
|
||||||
|
|
||||||
|
uni.uploadFile({
|
||||||
url: basePath + '/app/safetymeeting/edit',
|
url: basePath + '/app/safetymeeting/edit',
|
||||||
method: 'POST',
|
filePath: livePhotoPath,
|
||||||
header: {
|
name: 'livePhoto',
|
||||||
'Content-type':'application/x-www-form-urlencoded'
|
formData: {
|
||||||
|
SAFETY_MEETING_ID: this.SAFETY_MEETING_ID,
|
||||||
|
SIGNATUREPICTURE: this.SIGNATUREPICTURE,
|
||||||
|
ATTENDANCE_STATUS: '1',
|
||||||
},
|
},
|
||||||
data: params,
|
success: uploadRes => {
|
||||||
success: (res) => {
|
const data = JSON.parse(uploadRes.data);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (res.data.result === 'success') {
|
if (data.result === 'success') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
|
@ -262,10 +328,17 @@
|
||||||
this.$refs.showHiddenWindow.close();
|
this.$refs.showHiddenWindow.close();
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提交失败',
|
title: '提交失败: ' + data.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -280,7 +353,6 @@
|
||||||
NAME: loginUser.NAME,
|
NAME: loginUser.NAME,
|
||||||
USER_ID: loginUser.USER_ID
|
USER_ID: loginUser.USER_ID
|
||||||
}]
|
}]
|
||||||
// 重新打开抽屉(drawer)时,上面的代码会重置照片和签字
|
|
||||||
this.$refs['showHiddenWindow'].open()
|
this.$refs['showHiddenWindow'].open()
|
||||||
this.showHiddenWindow = true
|
this.showHiddenWindow = true
|
||||||
this.hiddenIsEdit = true
|
this.hiddenIsEdit = true
|
||||||
|
@ -317,7 +389,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.dy-card-content-item {
|
.dy-card-content-item {
|
||||||
margin-top: 20upx;
|
margin-top: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dy-card-content-item .title {
|
.dy-card-content-item .title {
|
||||||
|
|
|
@ -94,7 +94,6 @@
|
||||||
_this.LEVELID=e.LEVELID;
|
_this.LEVELID=e.LEVELID;
|
||||||
_this.DEPT_NAME=e.DEPT_NAME;
|
_this.DEPT_NAME=e.DEPT_NAME;
|
||||||
_this.getData();
|
_this.getData();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//跳转事件
|
//跳转事件
|
||||||
|
|
|
@ -15,9 +15,7 @@
|
||||||
<view class="title">
|
<view class="title">
|
||||||
通知内容:
|
通知内容:
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<rich-text class="info" :nodes="content"></rich-text>
|
||||||
{{pd.NOTIFICATIONCONTENT}}
|
|
||||||
</view>
|
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text>{{pd.CREATETIME}}</text>
|
<text>{{pd.CREATETIME}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
Loading…
Reference in New Issue