维修员、材料员、库管员强制维护签名
This commit is contained in:
parent
78bd4f2941
commit
5900668fd9
|
|
@ -95,12 +95,54 @@
|
|||
<script setup>
|
||||
import { ref,computed } from 'vue'
|
||||
import { onShow,onLoad } from '@dcloudio/uni-app'
|
||||
import {getSignatureByUser} from "../../services";
|
||||
|
||||
const urlPermissions = ref([])
|
||||
const userNeedsSignature = ref(false); // 是否需要电子签名
|
||||
|
||||
onShow((options) => {
|
||||
urlPermissions.value = uni.getStorageSync('urlPermissions')
|
||||
})
|
||||
|
||||
onShow(async () => {
|
||||
urlPermissions.value = uni.getStorageSync('urlPermissions');
|
||||
// 查询该人员是否强制维护电子签名
|
||||
const res = await checkElectronicSignature(); // 调用接口
|
||||
if (res === false) {
|
||||
userNeedsSignature.value = true;
|
||||
// 弹框提示
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您需要维护电子签名才能操作系统,是否立即维护',
|
||||
showCancel: false,
|
||||
success: (result) => {
|
||||
if (result.confirm) {
|
||||
// 用户点击确定,跳转到维护签名页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/signature' // 维护签名页面路径
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
userNeedsSignature.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const checkElectronicSignature = async () => {
|
||||
try {
|
||||
const res = await getSignatureByUser()
|
||||
if (res.msg==="1"){
|
||||
return true
|
||||
} else if (res.msg==="0"){
|
||||
return false
|
||||
} else {
|
||||
await uni.showToast({title: '签名获取失败', icon: 'none'})
|
||||
return true; // 如果请求失败默认返回true
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('请求失败', error);
|
||||
await uni.showToast({title: '签名获取失败', icon: 'none'})
|
||||
return true; // 如果请求失败默认返回true
|
||||
}
|
||||
}
|
||||
|
||||
// 业务办理
|
||||
const newInfoList = ref([
|
||||
|
|
|
|||
Loading…
Reference in New Issue