八项作业流程图

pull/5/head
fangjiakai 2024-02-21 10:49:36 +08:00
parent 5052eba52a
commit 35bcb78b59
7 changed files with 175 additions and 432 deletions

View File

@ -87,138 +87,136 @@
//
requestPermissions(permissionID) {
let _this = this;
// #ifdef APP-PLUS
//ios
if (plus.os.name == 'Android') {
let _permissionID = 'android.permission.' + permissionID;
plus.android.checkPermission(_permissionID,
granted => {
if (granted.checkResult == -1) {
//
_this.showPopup = true;
_this.$nextTick(() => {
setTimeout(() => {
_this.ani = 'uni-' + _this.type
},30)
})
}
},
error => {
console.log(error.message);
}
);
plus.android.requestPermissions([_permissionID],
(e) => {
//
_this.ani = '';
_this.$nextTick(() => {
setTimeout(() => {
_this.showPopup = false
}, 0)
})
console.log(e,'kkkkk')
if (e.granted.length > 0) {
//
_this.$emit('changeAuth');
//
// // #ifdef APP-PLUS
// //ios
// if (plus.os.name == 'Android') {
// let _permissionID = 'android.permission.' + permissionID;
// plus.android.checkPermission(_permissionID,
// granted => {
// if (granted.checkResult == -1) {
// //
// _this.showPopup = true;
// _this.$nextTick(() => {
// setTimeout(() => {
// _this.ani = 'uni-' + _this.type
// },30)
// })
// }
// },
// error => {
// console.log(error.message);
// }
// );
// plus.android.requestPermissions([_permissionID],
// (e) => {
// //
// _this.ani = '';
// _this.$nextTick(() => {
// setTimeout(() => {
// _this.showPopup = false
// }, 0)
// })
// console.log(e,'kkkkk')
// if (e.granted.length > 0) {
// //
// _this.$emit('changeAuth');
// }
// if (e.deniedAlways.length > 0) {
// //
// uni.showModal({
// title: '',
// content: '',
// cancelText: "",
// confirmText: "",
// showCancel: true,
// confirmColor: '#000',
// cancelColor: '#666',
// success: (res) => {
// if (res.confirm) {
// _this.goSetting();
// }
// }
// })
// }
// })
// } else {
// //IOS访
// //uniAPI使使IOSIOS https://ext.dcloud.net.cn/plugin?id=15787
// let result = 0;
// if (permissionID == 'ACCESS_FINE_LOCATION') {
// //IOS
// let cLLocationManager = plus.ios.importClass("CLLocationManager"),
// authStatus = cLLocationManager.authorizationStatus(),
// enable = cLLocationManager.locationServicesEnabled();
// if (enable && authStatus != 2) {
// result = 1;
// } else {
// result = 0;
// }
// plus.ios.deleteObject(cLLocationManager);
// } else if (permissionID == 'WRITE_EXTERNAL_STORAGE') {
// //IOS
// let PHPhotoLibrary = plus.ios.importClass("PHPhotoLibrary"),
// authStatus = PHPhotoLibrary.authorizationStatus();
// if (authStatus === 3) {
// result = 1;
// } else {
// result = 0;
// }
// plus.ios.deleteObject(PHPhotoLibrary);
// } else if (permissionID == 'CAMERA') {
// //IOS/
// let avCaptureDevice = plus.ios.importClass("AVCaptureDevice"),
// authStatus = avCaptureDevice.authorizationStatusForMediaType("vide");
// if (authStatus === 3) {
// result = 1;
// } else {
// result = 0;
// }
// plus.ios.deleteObject(avCaptureDevice);
// } else if (permissionID == 'CALL_PHONE') {
// //IOS
// let contactStore = plus.ios.importClass("CNContactStore"),
// authStatus = contactStore.authorizationStatusForEntityType(0);
// if (authStatus === 3) {
// result = 1;
// } else {
// result = 0;
// }
// plus.ios.deleteObject(contactStore);
// }else if(permissionID == 'RECORD_AUDIO'){
// //IOS
// let aVAudioSession = plus.ios.importClass("AVAudioSession"),
// aVAudio = aVAudioSession.sharedInstance(),
// authStatus = aVAudio.recordPermission();
// if ([1684369017, 1970168948].includes(authStatus)) {
// result = 0;
// } else {
// result = 1;
// }
// plus.ios.deleteObject(aVAudioSession);
// }
// if (result) {
// //
// that.$emit('changeAuth')
// } else {
// //,
// uni.showModal({
// title: '',
// content: '',
// cancelText: "",
// confirmText: "",
// showCancel: true,
// confirmColor: '#000',
// cancelColor: '#666',
// success: (res) => {
// if (res.confirm) {
// _this.goSetting();
// }
// }
// })
// }
// }
}
if (e.deniedAlways.length > 0) {
//
uni.showModal({
title: '温馨提示',
content: '还没有该权限,立即去设置开启?',
cancelText: "取消",
confirmText: "去设置",
showCancel: true,
confirmColor: '#000',
cancelColor: '#666',
success: (res) => {
if (res.confirm) {
_this.goSetting();
}
}
})
}
})
} else {
//IOS访
//uniAPI使使IOSIOS https://ext.dcloud.net.cn/plugin?id=15787
let result = 0;
if (permissionID == 'ACCESS_FINE_LOCATION') {
//IOS
let cLLocationManager = plus.ios.importClass("CLLocationManager"),
authStatus = cLLocationManager.authorizationStatus(),
enable = cLLocationManager.locationServicesEnabled();
if (enable && authStatus != 2) {
result = 1;
} else {
result = 0;
}
plus.ios.deleteObject(cLLocationManager);
} else if (permissionID == 'WRITE_EXTERNAL_STORAGE') {
//IOS
let PHPhotoLibrary = plus.ios.importClass("PHPhotoLibrary"),
authStatus = PHPhotoLibrary.authorizationStatus();
if (authStatus === 3) {
result = 1;
} else {
result = 0;
}
plus.ios.deleteObject(PHPhotoLibrary);
} else if (permissionID == 'CAMERA') {
//IOS/
let avCaptureDevice = plus.ios.importClass("AVCaptureDevice"),
authStatus = avCaptureDevice.authorizationStatusForMediaType("vide");
if (authStatus === 3) {
result = 1;
} else {
result = 0;
}
plus.ios.deleteObject(avCaptureDevice);
} else if (permissionID == 'CALL_PHONE') {
//IOS
let contactStore = plus.ios.importClass("CNContactStore"),
authStatus = contactStore.authorizationStatusForEntityType(0);
if (authStatus === 3) {
result = 1;
} else {
result = 0;
}
plus.ios.deleteObject(contactStore);
}else if(permissionID == 'RECORD_AUDIO'){
//IOS
let aVAudioSession = plus.ios.importClass("AVAudioSession"),
aVAudio = aVAudioSession.sharedInstance(),
authStatus = aVAudio.recordPermission();
if ([1684369017, 1970168948].includes(authStatus)) {
result = 0;
} else {
result = 1;
}
plus.ios.deleteObject(aVAudioSession);
}
if (result) {
//
that.$emit('changeAuth')
} else {
//,
uni.showModal({
title: '温馨提示',
content: '还没有该权限,立即去设置开启?',
cancelText: "取消",
confirmText: "去设置",
showCancel: true,
confirmColor: '#000',
cancelColor: '#666',
success: (res) => {
if (res.confirm) {
_this.goSetting();
}
}
})
}
}
// #endif
},
//

View File

@ -93,7 +93,7 @@
</view>
<view class="step-item-wrap-right">
<view class="step-item-wrap-right-title">{{item.STEP_NAME}}</view>
<view class="step-item-wrap-right-title">{{item.ACT_USER_NAME || item.SIGN_USER}}</view>
<view class="step-item-wrap-right-title">{{item.SIGN_USER || item.FINISHED_SIGN_USER || item.ACT_USER_NAME }}</view>
<view class="step-item-wrap-right-title">{{item.ACT_TIME}}</view>
</view>
</view>

View File

@ -12,7 +12,7 @@
<text>八项作业</text>
</view> -->
<view class="apps-warp">
<navigator v-show="premission.confinedspace" class="apps-item" hover-class="none" url="/pages/application/confinedspace/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/confinedspace/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-806.png" mode=""></image>
<view v-if="eight_work_count.CONFINEDSPACE_COUNT" class="cu-tag badge">{{eight_work_count.CONFINEDSPACE_COUNT}}</view>
@ -30,7 +30,7 @@
<!-- <view>设备检修</view>-->
<!-- </view>-->
<!-- </navigator>-->
<navigator v-show="premission['blind-board']" class="apps-item" hover-class="none" url="/pages/application/blind-board/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/blind-board/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-801.png" mode=""></image>
<view v-if="eight_work_count.BLIND_BOARD_COUNT" class="cu-tag badge">{{eight_work_count.BLIND_BOARD_COUNT}}</view>
@ -39,7 +39,7 @@
<view>盲板抽堵作业</view>
</view>
</navigator>
<navigator v-show="premission['break-ground']" class="apps-item" hover-class="none" url="/pages/application/break-ground/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/break-ground/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-802.png" mode=""></image>
<view v-if="eight_work_count.BREAK_GROUND_COUNT" class="cu-tag badge">{{eight_work_count.BREAK_GROUND_COUNT}}</view>
@ -48,7 +48,7 @@
<view>动土作业</view>
</view>
</navigator>
<navigator v-show="premission['high-work']" class="apps-item" hover-class="none" url="/pages/application/highwork/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/highwork/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-803.png" mode=""></image>
<view v-if="eight_work_count.HIGHWORK_COUNT" class="cu-tag badge">{{eight_work_count.HIGHWORK_COUNT}}</view>
@ -59,7 +59,7 @@
</navigator>
<!-- </view>-->
<!-- <view class="apps-warp">-->
<navigator v-show="premission.hoisting" class="apps-item" hover-class="none" url="/pages/application/hoisting/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/hoisting/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-804.png" mode=""></image>
<view v-if="eight_work_count.HOISTING_COUNT" class="cu-tag badge">{{eight_work_count.HOISTING_COUNT}}</view>
@ -68,7 +68,6 @@
<view>吊装作业</view>
</view>
</navigator>
<!-- v-show="premission.electricity"-->
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-805.png" mode=""></image>
@ -78,7 +77,7 @@
<view>临时用电作业</view>
</view>
</navigator>
<navigator v-show="premission.hotwork" class="apps-item" hover-class="none" url="/pages/application/hotwork/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-807.png" mode=""></image>
<view v-if="eight_work_count.HOTWORK_COUNT" class="cu-tag badge">{{eight_work_count.HOTWORK_COUNT}}</view>
@ -87,7 +86,7 @@
<view>动火作业</view>
</view>
</navigator>
<navigator v-show="premission['open-circuit']" class="apps-item" hover-class="none" url="/pages/application/open-circuit/home">
<navigator class="apps-item" hover-class="none" url="/pages/application/open-circuit/home">
<view class="imgs action">
<image src="../../static/icon-apps/open-circuit.png" mode=""></image>
<view v-if="eight_work_count.OPEN_CIRCUIT_COUNT" class="cu-tag badge">{{eight_work_count.OPEN_CIRCUIT_COUNT}}</view>

View File

@ -626,24 +626,15 @@
//
ChooseImage() {
var _this = this;
var ss = 4 - this.hiddenForm.hiddenImgs.length;
uni.chooseImage({
count: ss, //9
count: 4, //9
sizeType: ['original', 'compressed'], //
sourceType: ['camera', 'album'], //
success: (res) => {
for (let i = 0; i < res.tempFilePaths.length; i++) {
if (e == 0) {
let img = {};
img.IMGFILES_ID = '';
img.FILEPATH = res.tempFilePaths[i];
this.hiddenForm.hiddenImgs.push(img)
if (this.imgList.length != 0) {
this.imgList = this.imgList.concat(res.tempFilePaths)
} else {
let img = {};
img.IMGFILES_ID = '';
img.FILEPATH = res.tempFilePaths[i];
this.imgList1.push(img)
}
this.imgList = res.tempFilePaths
}
}
});
@ -672,13 +663,15 @@
ChooseImage_fa() {
var _this = this;
uni.chooseImage({
count: 4 - _this.imgList.length, // +++ 4
sizeType: ['original', 'compressed'],
sourceType: ['camera', 'album'],
count: 4, //9
sizeType: ['original', 'compressed'], //
sourceType: ['camera', 'album'], //
success: (res) => {
// imgList
_this.imgList = _this.imgList.concat(res.tempFilePaths);
_this.$forceUpdate(); // +++
if (this.imgList_fa.length != 0) {
this.imgList_fa = this.imgList_fa.concat(res.tempFilePaths)
} else {
this.imgList_fa = res.tempFilePaths
}
}
});
},
@ -762,14 +755,14 @@
});
return;
}
// if (_this.imgList.length <= 0) {
// uni.showToast({
// icon: 'none',
// title: '',
// duration: 1500
// });
// return;
// }
if (_this.imgList.length <= 0) {
uni.showToast({
icon: 'none',
title: '请上传整改后照片',
duration: 1500
});
return;
}
if (this.HAVESCHEME == 1) {
if (this.pd.GOVERNSTANDARDS == '' || this.pd.GOVERNSTANDARDS == undefined) {

View File

@ -100,7 +100,7 @@
</view>
<view class="step-item-wrap-right">
<view class="step-item-wrap-right-title">{{item.STEP_NAME}}</view>
<view class="step-item-wrap-right-title">{{item.ACT_USER_NAME || item.SIGN_USER}}</view>
<view class="step-item-wrap-right-title">{{item.SIGN_USER || item.FINISHED_SIGN_USER || item.ACT_USER_NAME }}</view>
<view class="step-item-wrap-right-title">{{item.ACT_TIME}}</view>
</view>
</view>

View File

@ -104,7 +104,7 @@
</view>
<view class="home-apps-list">
<navigator class="home-apps-item" hover-class="none" url="/pages/application/eight-assignments"
v-show="premission.eightWork">
>
<view class="home-apps-item-img" style="position: relative;">
<image src="../../static/icon-apps/home-gw.png" mode=""></image>
<view v-if="eight_work_count>0" class="cu-tag badge">{{ eight_work_count }}</view>
@ -125,7 +125,7 @@
<view v-if="keyProjectManagement" class="cu-tag badge">{{ keyProjectManagement }}</view>
</navigator>
<navigator class="home-apps-item" hover-class="none" url="/pages/application/commitment"
v-show="premission.commitment">
>
<view class="home-apps-item-img">
<image src="../../static/icon-apps/home-cns.png" mode=""></image>
</view>
@ -134,7 +134,7 @@
</view>
</navigator>
<navigator class="home-apps-item" hover-class="none" url="/pages/application/onlinexxks/home"
v-show="premission.education">
>
<view class="home-apps-item-img">
<image src="../../static/icon-apps/home-study.png" mode=""></image>
</view>
@ -180,7 +180,7 @@
<!-- </navigator>-->
<navigator class="home-apps-item" hover-class="none" url="/pages/application/speEquip/index"
v-show="premission.speEquip">
>
<view class="home-apps-item-img">
<image src="../../static/icon-apps/home-speEquip.jpg" mode=""></image>
</view>
@ -657,12 +657,8 @@
loginSession()
this.getSafetyEnvironmentalInspectionCount();
this.getUpdateInfo()
this.premission = Object.assign({}, premission)
let now = new Date();
var today = formatDate(now, 'yyyy-MM-dd');
if (!this.premission || JSON.stringify(this.premission) === '{}') {
this.getMenu();
}
this.getIsRest();
this.getData();
this.getSurveyData();
@ -765,118 +761,6 @@
})
},
getMenu() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/main/index',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
USER_ID: loginUser.USER_ID,
},
success: (res) => {
console.log(res.data.result)
if ("success" == res.data.result) {
var menuList = res.data.menuList
var premissionList = new Map()
menuList.map(item => {
if (item.menu_NAME == '安全承诺' && item.hasMenu) {
premissionList.set('commitment', true)
if (item.subMenu && item.subMenu.length > 0) {
item.subMenu.map(child => {
if (child.menu_NAME == '公司级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-company', true)
}
if (child.menu_NAME == '车间级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-workshop', true)
}
if (child.menu_NAME == '班组级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-team', true)
}
})
}
}
if (item.menu_NAME == '受限空间作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('confinedspace', true)
}
if (item.menu_NAME == '动火作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('hotwork', true)
}
if (item.menu_NAME == '高处作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('high-work', true)
}
if (item.menu_NAME == '吊装作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('hoisting', true)
}
if (item.menu_NAME == '盲板抽堵作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('blind-board', true)
}
if (item.menu_NAME == '动土作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('break-ground', true)
}
if (item.menu_NAME == '临时用电作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('electricity', true)
}
if (item.menu_NAME == '断路作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('open-circuit', true)
}
if (item.menu_NAME == '在线学习与考试' && item.hasMenu) {
premissionList.set('education', true)
}
// console.info(premissionList)
if (item.menu_NAME == '设备设施管理' && item.hasMenu) {
premissionList.set('speEquip', true)
}
})
this.premission = (Object.fromEntries(premissionList));
setPremission(Object.fromEntries(premissionList));
uni.hideLoading();
} else {
setloginUserId(null);
setCorpinfoId(null);
setDeptId(null);
setloginUser(null);
uni.removeStorage({
key: 'USER'
});
uni.reLaunch({
url: '/pages/login/home'
});
// uni.showToast({
// title: res.data.message,
// duration: 2000
// });
}
},
fail: (res) => {
uni.showToast({
icon: 'none',
title: "服务器正在升级,请稍后再试。",
duration: 2000
});
}
});
},
async downCallback(page) {
await this.getWork();
await this.getUserData();

View File

@ -89,26 +89,12 @@
noClick: true,
userName: '',
userPwd: '',
push_clientid: '',
radio: ''
}
},
async onLoad() {
this.getRemember()
uni.getPushClientId({
success: (res) => {
this.push_clientid = res.cid
this.getLoginUser()
console.log('客户端推送标识:', res.cid)
},
fail(err) {
uni.showToast({
icon: 'none',
title: "获取用户标识失败,请重新登录",
duration: 2000
});
}
});
// this.getLoginUser()
//this.getUrlVersion();
},
@ -160,7 +146,6 @@
USER_ID: loginUser.USER_ID,
},
success: (res1) => {
this.updatePushCid(USER_ID, this.push_clientid)
if ("success" == res1.data.result) {
if (res1.data.ISREST != null) {
setIsRest(res1.data.ISREST);
@ -292,8 +277,14 @@
key: 'remember',
data: remember
});
this.getMenu()
this.updatePushCid(res.data.USER_ID, this.push_clientid)
uni.hideLoading();
uni.showToast({
title: "登录成功",
duration: 1000
});
uni.redirectTo({
url: '/pages/index/index'
});
} else if ("usererror" == result) {
uni.showToast({
icon: 'none',
@ -346,114 +337,6 @@
duration: 2000
});
}
})
},
getMenu() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/main/index',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
var menuList = res.data.menuList
var premissionList = new Map()
menuList.map(item => {
if (item.menu_NAME == '安全承诺' && item.hasMenu) {
premissionList.set('commitment', true)
if (item.subMenu && item.subMenu.length > 0) {
item.subMenu.map(child => {
if (child.menu_NAME == '公司级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-company', true)
}
if (child.menu_NAME == '车间级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-workshop', true)
}
if (child.menu_NAME == '班组级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-team', true)
}
})
}
}
if (item.menu_NAME == '受限空间作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('confinedspace', true)
}
if (item.menu_NAME == '动火作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('hotwork', true)
}
if (item.menu_NAME == '高处作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('high-work', true)
}
if (item.menu_NAME == '吊装作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('hoisting', true)
}
if (item.menu_NAME == '盲板抽堵作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('blind-board', true)
}
if (item.menu_NAME == '动土作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('break-ground', true)
}
if (item.menu_NAME == '临时用电作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('electricity', true)
}
if (item.menu_NAME == '断路作业管理' && item.hasMenu) {
premissionList.set('eightWork', true)
premissionList.set('open-circuit', true)
}
if (item.menu_NAME == '在线学习与考试' && item.hasMenu) {
premissionList.set('education', true)
}
if (item.menu_NAME == '设备设施管理' && item.hasMenu) {
premissionList.set('speEquip', true)
}
})
setPremission(Object.fromEntries(premissionList));
uni.hideLoading();
uni.showToast({
title: "登录成功",
duration: 1000
});
uni.redirectTo({
url: '/pages/index/index'
});
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
},
fail: (res) => {
uni.showToast({
icon: 'none',
title: "服务器正在升级,请稍后再试。",
duration: 2000
});
}
});
},
getUrlVersion() {
@ -486,20 +369,6 @@
});
});
},
updatePushCid(userId, pushCid) {
uni.request({
url: basePath + '/app/user/updatePushCid',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
USER_ID: userId,
PUSH_CID: pushCid
},
});
}
}
}
</script>