八项作业流程图
parent
5052eba52a
commit
35bcb78b59
|
@ -87,138 +87,136 @@
|
||||||
//权限检测
|
//权限检测
|
||||||
requestPermissions(permissionID) {
|
requestPermissions(permissionID) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.$emit('changeAuth');
|
// #ifdef APP-PLUS
|
||||||
//
|
//判断安卓与ios设备
|
||||||
// // #ifdef APP-PLUS
|
if (plus.os.name == 'Android') {
|
||||||
// //判断安卓与ios设备
|
let _permissionID = 'android.permission.' + permissionID;
|
||||||
// if (plus.os.name == 'Android') {
|
plus.android.checkPermission(_permissionID,
|
||||||
// let _permissionID = 'android.permission.' + permissionID;
|
granted => {
|
||||||
// plus.android.checkPermission(_permissionID,
|
if (granted.checkResult == -1) {
|
||||||
// granted => {
|
//还未授权当前查询的权限,打开权限申请目的自定义弹框
|
||||||
// if (granted.checkResult == -1) {
|
_this.showPopup = true;
|
||||||
// //还未授权当前查询的权限,打开权限申请目的自定义弹框
|
_this.$nextTick(() => {
|
||||||
// _this.showPopup = true;
|
setTimeout(() => {
|
||||||
// _this.$nextTick(() => {
|
_this.ani = 'uni-' + _this.type
|
||||||
// setTimeout(() => {
|
},30)
|
||||||
// _this.ani = 'uni-' + _this.type
|
})
|
||||||
// },30)
|
}
|
||||||
// })
|
},
|
||||||
// }
|
error => {
|
||||||
// },
|
console.log(error.message);
|
||||||
// error => {
|
}
|
||||||
// console.log(error.message);
|
);
|
||||||
// }
|
plus.android.requestPermissions([_permissionID],
|
||||||
// );
|
(e) => {
|
||||||
// plus.android.requestPermissions([_permissionID],
|
//关闭权限申请目的自定义弹框
|
||||||
// (e) => {
|
_this.ani = '';
|
||||||
// //关闭权限申请目的自定义弹框
|
_this.$nextTick(() => {
|
||||||
// _this.ani = '';
|
setTimeout(() => {
|
||||||
// _this.$nextTick(() => {
|
_this.showPopup = false
|
||||||
// setTimeout(() => {
|
}, 0)
|
||||||
// _this.showPopup = false
|
})
|
||||||
// }, 0)
|
console.log(e,'kkkkk')
|
||||||
// })
|
if (e.granted.length > 0) {
|
||||||
// console.log(e,'kkkkk')
|
//当前查询权限已授权,此时可以通知页面执行接下来的操作
|
||||||
// if (e.granted.length > 0) {
|
_this.$emit('changeAuth');
|
||||||
// //当前查询权限已授权,此时可以通知页面执行接下来的操作
|
}
|
||||||
// _this.$emit('changeAuth');
|
if (e.deniedAlways.length > 0) {
|
||||||
// }
|
//当前查询权限已被永久禁用,此时需要引导用户跳转手机系统设置去开启
|
||||||
// if (e.deniedAlways.length > 0) {
|
uni.showModal({
|
||||||
// //当前查询权限已被永久禁用,此时需要引导用户跳转手机系统设置去开启
|
title: '温馨提示',
|
||||||
// uni.showModal({
|
content: '还没有该权限,立即去设置开启?',
|
||||||
// title: '温馨提示',
|
cancelText: "取消",
|
||||||
// content: '还没有该权限,立即去设置开启?',
|
confirmText: "去设置",
|
||||||
// cancelText: "取消",
|
showCancel: true,
|
||||||
// confirmText: "去设置",
|
confirmColor: '#000',
|
||||||
// showCancel: true,
|
cancelColor: '#666',
|
||||||
// confirmColor: '#000',
|
success: (res) => {
|
||||||
// cancelColor: '#666',
|
if (res.confirm) {
|
||||||
// success: (res) => {
|
_this.goSetting();
|
||||||
// if (res.confirm) {
|
}
|
||||||
// _this.goSetting();
|
}
|
||||||
// }
|
})
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
} else {
|
||||||
// })
|
//IOS不需要添加自定义弹框来描述权限目的,因为在配置文件的隐私信息访问的许可描述里可添加
|
||||||
// } else {
|
//正常可以直接调用uni的API调起权限询问弹框使用各种权限,下面的判断使用场景主要是在IOS禁用某权限后,这个可以判断有无权限,进而引导用户跳转设置开启,仅列出了位置、相册、通讯录、相机、录音等权限,其他IOS权限可具体参考 https://ext.dcloud.net.cn/plugin?id=15787
|
||||||
// //IOS不需要添加自定义弹框来描述权限目的,因为在配置文件的隐私信息访问的许可描述里可添加
|
let result = 0;
|
||||||
// //正常可以直接调用uni的API调起权限询问弹框使用各种权限,下面的判断使用场景主要是在IOS禁用某权限后,这个可以判断有无权限,进而引导用户跳转设置开启,仅列出了位置、相册、通讯录、相机、录音等权限,其他IOS权限可具体参考 https://ext.dcloud.net.cn/plugin?id=15787
|
if (permissionID == 'ACCESS_FINE_LOCATION') {
|
||||||
// let result = 0;
|
//IOS检测位置权限
|
||||||
// if (permissionID == 'ACCESS_FINE_LOCATION') {
|
let cLLocationManager = plus.ios.importClass("CLLocationManager"),
|
||||||
// //IOS检测位置权限
|
authStatus = cLLocationManager.authorizationStatus(),
|
||||||
// let cLLocationManager = plus.ios.importClass("CLLocationManager"),
|
enable = cLLocationManager.locationServicesEnabled();
|
||||||
// authStatus = cLLocationManager.authorizationStatus(),
|
if (enable && authStatus != 2) {
|
||||||
// enable = cLLocationManager.locationServicesEnabled();
|
result = 1;
|
||||||
// if (enable && authStatus != 2) {
|
} else {
|
||||||
// result = 1;
|
result = 0;
|
||||||
// } else {
|
}
|
||||||
// result = 0;
|
plus.ios.deleteObject(cLLocationManager);
|
||||||
// }
|
} else if (permissionID == 'WRITE_EXTERNAL_STORAGE') {
|
||||||
// plus.ios.deleteObject(cLLocationManager);
|
//IOS检测相册权限
|
||||||
// } else if (permissionID == 'WRITE_EXTERNAL_STORAGE') {
|
let PHPhotoLibrary = plus.ios.importClass("PHPhotoLibrary"),
|
||||||
// //IOS检测相册权限
|
authStatus = PHPhotoLibrary.authorizationStatus();
|
||||||
// let PHPhotoLibrary = plus.ios.importClass("PHPhotoLibrary"),
|
if (authStatus === 3) {
|
||||||
// authStatus = PHPhotoLibrary.authorizationStatus();
|
result = 1;
|
||||||
// if (authStatus === 3) {
|
} else {
|
||||||
// result = 1;
|
result = 0;
|
||||||
// } else {
|
}
|
||||||
// result = 0;
|
plus.ios.deleteObject(PHPhotoLibrary);
|
||||||
// }
|
} else if (permissionID == 'CAMERA') {
|
||||||
// plus.ios.deleteObject(PHPhotoLibrary);
|
//IOS检测相机/摄像头权限
|
||||||
// } else if (permissionID == 'CAMERA') {
|
let avCaptureDevice = plus.ios.importClass("AVCaptureDevice"),
|
||||||
// //IOS检测相机/摄像头权限
|
authStatus = avCaptureDevice.authorizationStatusForMediaType("vide");
|
||||||
// let avCaptureDevice = plus.ios.importClass("AVCaptureDevice"),
|
if (authStatus === 3) {
|
||||||
// authStatus = avCaptureDevice.authorizationStatusForMediaType("vide");
|
result = 1;
|
||||||
// if (authStatus === 3) {
|
} else {
|
||||||
// result = 1;
|
result = 0;
|
||||||
// } else {
|
}
|
||||||
// result = 0;
|
plus.ios.deleteObject(avCaptureDevice);
|
||||||
// }
|
} else if (permissionID == 'CALL_PHONE') {
|
||||||
// plus.ios.deleteObject(avCaptureDevice);
|
//IOS检测通讯录权限
|
||||||
// } else if (permissionID == 'CALL_PHONE') {
|
let contactStore = plus.ios.importClass("CNContactStore"),
|
||||||
// //IOS检测通讯录权限
|
authStatus = contactStore.authorizationStatusForEntityType(0);
|
||||||
// let contactStore = plus.ios.importClass("CNContactStore"),
|
if (authStatus === 3) {
|
||||||
// authStatus = contactStore.authorizationStatusForEntityType(0);
|
result = 1;
|
||||||
// if (authStatus === 3) {
|
} else {
|
||||||
// result = 1;
|
result = 0;
|
||||||
// } else {
|
}
|
||||||
// result = 0;
|
plus.ios.deleteObject(contactStore);
|
||||||
// }
|
}else if(permissionID == 'RECORD_AUDIO'){
|
||||||
// plus.ios.deleteObject(contactStore);
|
//IOS检测麦克风权限
|
||||||
// }else if(permissionID == 'RECORD_AUDIO'){
|
let aVAudioSession = plus.ios.importClass("AVAudioSession"),
|
||||||
// //IOS检测麦克风权限
|
aVAudio = aVAudioSession.sharedInstance(),
|
||||||
// let aVAudioSession = plus.ios.importClass("AVAudioSession"),
|
authStatus = aVAudio.recordPermission();
|
||||||
// aVAudio = aVAudioSession.sharedInstance(),
|
if ([1684369017, 1970168948].includes(authStatus)) {
|
||||||
// authStatus = aVAudio.recordPermission();
|
result = 0;
|
||||||
// if ([1684369017, 1970168948].includes(authStatus)) {
|
} else {
|
||||||
// result = 0;
|
result = 1;
|
||||||
// } else {
|
}
|
||||||
// result = 1;
|
plus.ios.deleteObject(aVAudioSession);
|
||||||
// }
|
}
|
||||||
// plus.ios.deleteObject(aVAudioSession);
|
if (result) {
|
||||||
// }
|
//当前查询权限已授权,此时可以通知页面执行接下来的操作
|
||||||
// if (result) {
|
that.$emit('changeAuth')
|
||||||
// //当前查询权限已授权,此时可以通知页面执行接下来的操作
|
} else {
|
||||||
// that.$emit('changeAuth')
|
//当前查询的权限已禁用,引导用户跳转手机系统设置去开启
|
||||||
// } else {
|
uni.showModal({
|
||||||
// //当前查询的权限已禁用,引导用户跳转手机系统设置去开启
|
title: '温馨提示',
|
||||||
// uni.showModal({
|
content: '还没有该权限,立即去设置开启?',
|
||||||
// title: '温馨提示',
|
cancelText: "取消",
|
||||||
// content: '还没有该权限,立即去设置开启?',
|
confirmText: "去设置",
|
||||||
// cancelText: "取消",
|
showCancel: true,
|
||||||
// confirmText: "去设置",
|
confirmColor: '#000',
|
||||||
// showCancel: true,
|
cancelColor: '#666',
|
||||||
// confirmColor: '#000',
|
success: (res) => {
|
||||||
// cancelColor: '#666',
|
if (res.confirm) {
|
||||||
// success: (res) => {
|
_this.goSetting();
|
||||||
// if (res.confirm) {
|
}
|
||||||
// _this.goSetting();
|
}
|
||||||
// }
|
})
|
||||||
// }
|
}
|
||||||
// })
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
//跳转手机系统设置
|
//跳转手机系统设置
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="step-item-wrap-right">
|
<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.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 class="step-item-wrap-right-title">{{item.ACT_TIME}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<text>八项作业</text>
|
<text>八项作业</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="apps-warp">
|
<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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-806.png" mode=""></image>
|
<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>
|
<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>设备检修</view>-->
|
||||||
<!-- </view>-->
|
<!-- </view>-->
|
||||||
<!-- </navigator>-->
|
<!-- </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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-801.png" mode=""></image>
|
<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>
|
<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>盲板抽堵作业</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-802.png" mode=""></image>
|
<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>
|
<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>动土作业</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-803.png" mode=""></image>
|
<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>
|
<view v-if="eight_work_count.HIGHWORK_COUNT" class="cu-tag badge">{{eight_work_count.HIGHWORK_COUNT}}</view>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
</navigator>
|
</navigator>
|
||||||
<!-- </view>-->
|
<!-- </view>-->
|
||||||
<!-- <view class="apps-warp">-->
|
<!-- <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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-804.png" mode=""></image>
|
<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>
|
<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>吊装作业</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<!-- v-show="premission.electricity"-->
|
|
||||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/home">
|
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/home">
|
||||||
<view class="imgs action">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-805.png" mode=""></image>
|
<image src="../../static/icon-apps/icon-805.png" mode=""></image>
|
||||||
|
@ -78,7 +77,7 @@
|
||||||
<view>临时用电作业</view>
|
<view>临时用电作业</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/icon-807.png" mode=""></image>
|
<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>
|
<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>动火作业</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</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">
|
<view class="imgs action">
|
||||||
<image src="../../static/icon-apps/open-circuit.png" mode=""></image>
|
<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 v-if="eight_work_count.OPEN_CIRCUIT_COUNT" class="cu-tag badge">{{eight_work_count.OPEN_CIRCUIT_COUNT}}</view>
|
||||||
|
|
|
@ -624,30 +624,21 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
//图片上传
|
//图片上传
|
||||||
ChooseImage() {
|
ChooseImage() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var ss = 4 - this.hiddenForm.hiddenImgs.length;
|
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: ss, //默认9
|
count: 4, //默认9
|
||||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
sourceType: ['camera', 'album'], //从相册选择
|
sourceType: ['camera', 'album'], //从相册选择
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
if (this.imgList.length != 0) {
|
||||||
if (e == 0) {
|
this.imgList = this.imgList.concat(res.tempFilePaths)
|
||||||
let img = {};
|
} else {
|
||||||
img.IMGFILES_ID = '';
|
this.imgList = res.tempFilePaths
|
||||||
img.FILEPATH = res.tempFilePaths[i];
|
|
||||||
this.hiddenForm.hiddenImgs.push(img)
|
|
||||||
} else {
|
|
||||||
let img = {};
|
|
||||||
img.IMGFILES_ID = '';
|
|
||||||
img.FILEPATH = res.tempFilePaths[i];
|
|
||||||
this.imgList1.push(img)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
ViewImage(e) {
|
ViewImage(e) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: this.imgList,
|
urls: this.imgList,
|
||||||
|
@ -672,13 +663,15 @@
|
||||||
ChooseImage_fa() {
|
ChooseImage_fa() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 4 - _this.imgList.length, // +++ 确保总数不超过4张
|
count: 4, //默认9
|
||||||
sizeType: ['original', 'compressed'],
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
sourceType: ['camera', 'album'],
|
sourceType: ['camera', 'album'], //从相册选择
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 将选择的图片路径添加到 imgList 数组
|
if (this.imgList_fa.length != 0) {
|
||||||
_this.imgList = _this.imgList.concat(res.tempFilePaths);
|
this.imgList_fa = this.imgList_fa.concat(res.tempFilePaths)
|
||||||
_this.$forceUpdate(); // +++ 强制更新视图以显示新图片
|
} else {
|
||||||
|
this.imgList_fa = res.tempFilePaths
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -762,14 +755,14 @@
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (_this.imgList.length <= 0) {
|
if (_this.imgList.length <= 0) {
|
||||||
// uni.showToast({
|
uni.showToast({
|
||||||
// icon: 'none',
|
icon: 'none',
|
||||||
// title: '请上传整改后照片',
|
title: '请上传整改后照片',
|
||||||
// duration: 1500
|
duration: 1500
|
||||||
// });
|
});
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (this.HAVESCHEME == 1) {
|
if (this.HAVESCHEME == 1) {
|
||||||
if (this.pd.GOVERNSTANDARDS == '' || this.pd.GOVERNSTANDARDS == undefined) {
|
if (this.pd.GOVERNSTANDARDS == '' || this.pd.GOVERNSTANDARDS == undefined) {
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="step-item-wrap-right">
|
<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.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 class="step-item-wrap-right-title">{{item.ACT_TIME}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="home-apps-list">
|
<view class="home-apps-list">
|
||||||
<navigator class="home-apps-item" hover-class="none" url="/pages/application/eight-assignments"
|
<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;">
|
<view class="home-apps-item-img" style="position: relative;">
|
||||||
<image src="../../static/icon-apps/home-gw.png" mode=""></image>
|
<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>
|
<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>
|
<view v-if="keyProjectManagement" class="cu-tag badge">{{ keyProjectManagement }}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator class="home-apps-item" hover-class="none" url="/pages/application/commitment"
|
<navigator class="home-apps-item" hover-class="none" url="/pages/application/commitment"
|
||||||
v-show="premission.commitment">
|
>
|
||||||
<view class="home-apps-item-img">
|
<view class="home-apps-item-img">
|
||||||
<image src="../../static/icon-apps/home-cns.png" mode=""></image>
|
<image src="../../static/icon-apps/home-cns.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator class="home-apps-item" hover-class="none" url="/pages/application/onlinexxks/home"
|
<navigator class="home-apps-item" hover-class="none" url="/pages/application/onlinexxks/home"
|
||||||
v-show="premission.education">
|
>
|
||||||
<view class="home-apps-item-img">
|
<view class="home-apps-item-img">
|
||||||
<image src="../../static/icon-apps/home-study.png" mode=""></image>
|
<image src="../../static/icon-apps/home-study.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
<!-- </navigator>-->
|
<!-- </navigator>-->
|
||||||
|
|
||||||
<navigator class="home-apps-item" hover-class="none" url="/pages/application/speEquip/index"
|
<navigator class="home-apps-item" hover-class="none" url="/pages/application/speEquip/index"
|
||||||
v-show="premission.speEquip">
|
>
|
||||||
<view class="home-apps-item-img">
|
<view class="home-apps-item-img">
|
||||||
<image src="../../static/icon-apps/home-speEquip.jpg" mode=""></image>
|
<image src="../../static/icon-apps/home-speEquip.jpg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -657,12 +657,8 @@
|
||||||
loginSession()
|
loginSession()
|
||||||
this.getSafetyEnvironmentalInspectionCount();
|
this.getSafetyEnvironmentalInspectionCount();
|
||||||
this.getUpdateInfo()
|
this.getUpdateInfo()
|
||||||
this.premission = Object.assign({}, premission)
|
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
var today = formatDate(now, 'yyyy-MM-dd');
|
var today = formatDate(now, 'yyyy-MM-dd');
|
||||||
if (!this.premission || JSON.stringify(this.premission) === '{}') {
|
|
||||||
this.getMenu();
|
|
||||||
}
|
|
||||||
this.getIsRest();
|
this.getIsRest();
|
||||||
this.getData();
|
this.getData();
|
||||||
this.getSurveyData();
|
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) {
|
async downCallback(page) {
|
||||||
await this.getWork();
|
await this.getWork();
|
||||||
await this.getUserData();
|
await this.getUserData();
|
||||||
|
|
|
@ -89,26 +89,12 @@
|
||||||
noClick: true,
|
noClick: true,
|
||||||
userName: '',
|
userName: '',
|
||||||
userPwd: '',
|
userPwd: '',
|
||||||
push_clientid: '',
|
|
||||||
radio: ''
|
radio: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad() {
|
async onLoad() {
|
||||||
this.getRemember()
|
this.getRemember()
|
||||||
uni.getPushClientId({
|
this.getLoginUser()
|
||||||
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.getLoginUser()
|
||||||
//this.getUrlVersion();
|
//this.getUrlVersion();
|
||||||
},
|
},
|
||||||
|
@ -160,7 +146,6 @@
|
||||||
USER_ID: loginUser.USER_ID,
|
USER_ID: loginUser.USER_ID,
|
||||||
},
|
},
|
||||||
success: (res1) => {
|
success: (res1) => {
|
||||||
this.updatePushCid(USER_ID, this.push_clientid)
|
|
||||||
if ("success" == res1.data.result) {
|
if ("success" == res1.data.result) {
|
||||||
if (res1.data.ISREST != null) {
|
if (res1.data.ISREST != null) {
|
||||||
setIsRest(res1.data.ISREST);
|
setIsRest(res1.data.ISREST);
|
||||||
|
@ -292,8 +277,14 @@
|
||||||
key: 'remember',
|
key: 'remember',
|
||||||
data: remember
|
data: remember
|
||||||
});
|
});
|
||||||
this.getMenu()
|
uni.hideLoading();
|
||||||
this.updatePushCid(res.data.USER_ID, this.push_clientid)
|
uni.showToast({
|
||||||
|
title: "登录成功",
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
});
|
||||||
} else if ("usererror" == result) {
|
} else if ("usererror" == result) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
@ -346,114 +337,6 @@
|
||||||
duration: 2000
|
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() {
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue