diff --git a/pages/application/hidden-danger-management/hidden-danger-add/hidden-danger-add.vue b/pages/application/hidden-danger-management/hidden-danger-add/hidden-danger-add.vue
index 08ad361..ef19eea 100644
--- a/pages/application/hidden-danger-management/hidden-danger-add/hidden-danger-add.vue
+++ b/pages/application/hidden-danger-management/hidden-danger-add/hidden-danger-add.vue
@@ -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,
diff --git a/pages/application/safetymeeting/safetymeeting-detail.vue b/pages/application/safetymeeting/safetymeeting-detail.vue
index 885d83f..1562b58 100644
--- a/pages/application/safetymeeting/safetymeeting-detail.vue
+++ b/pages/application/safetymeeting/safetymeeting-detail.vue
@@ -85,12 +85,13 @@
-
-
+
+
+
-
+
是否参会:
@@ -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 {
diff --git a/pages/basics/risk-distribution/risk-distribution-detail.vue b/pages/basics/risk-distribution/risk-distribution-detail.vue
index d3cdef4..16b0e55 100644
--- a/pages/basics/risk-distribution/risk-distribution-detail.vue
+++ b/pages/basics/risk-distribution/risk-distribution-detail.vue
@@ -94,7 +94,6 @@
_this.LEVELID=e.LEVELID;
_this.DEPT_NAME=e.DEPT_NAME;
_this.getData();
-
},
methods: {
//跳转事件
diff --git a/pages/news/news-list-detail.vue b/pages/news/news-list-detail.vue
index 2788a5f..220a29f 100644
--- a/pages/news/news-list-detail.vue
+++ b/pages/news/news-list-detail.vue
@@ -15,9 +15,7 @@
通知内容:
-
- {{pd.NOTIFICATIONCONTENT}}
-
+
{{pd.CREATETIME}}