检查表手动添加检查项时根据部门类型展示不一样
This commit is contained in:
@@ -19,14 +19,15 @@ const _sfc_main = {
|
||||
const checkPointId = common_vendor.ref("");
|
||||
const oneTableId = common_vendor.ref("");
|
||||
const userRole = common_vendor.ref("");
|
||||
const isApprovalRole = common_vendor.computed(() => userRole.value === "approval");
|
||||
const getUserRole = () => {
|
||||
try {
|
||||
const userInfoStr = common_vendor.index.getStorageSync("userInfo");
|
||||
if (userInfoStr) {
|
||||
userRole.value = utils_userInfo.resolveUserRoleKey(JSON.parse(userInfoStr));
|
||||
userRole.value = utils_userInfo.resolveUserIdentityRoleKey(JSON.parse(userInfoStr));
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:104", "获取用户信息失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:107", "获取用户信息失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchTaskInfo = async (oneTableId2) => {
|
||||
@@ -41,7 +42,7 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:120", "获取任务信息失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:123", "获取任务信息失败:", error);
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
@@ -123,7 +124,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:207", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:210", error);
|
||||
if (pageNum.value > 1) {
|
||||
pageNum.value--;
|
||||
}
|
||||
@@ -214,7 +215,8 @@ const _sfc_main = {
|
||||
f: item.levelName === "重大隐患" ? 1 : "",
|
||||
g: common_vendor.t(item.address),
|
||||
h: common_vendor.t(item.createdAt),
|
||||
i: common_vendor.o(($event) => details(item), item.hazardId),
|
||||
i: common_vendor.o(($event) => details(item), item.hazardId)
|
||||
}, !isApprovalRole.value ? common_vendor.e({
|
||||
j: item.statusName === "待整改" && item.canEdit
|
||||
}, item.statusName === "待整改" && item.canEdit ? {
|
||||
k: common_vendor.o(($event) => assignHazard(item), item.hazardId)
|
||||
@@ -242,18 +244,22 @@ const _sfc_main = {
|
||||
w: common_vendor.unref(utils_hazardNav.canShowWriteoffApprovalButton)(item, userRole.value)
|
||||
}, common_vendor.unref(utils_hazardNav.canShowWriteoffApprovalButton)(item, userRole.value) ? {
|
||||
x: common_vendor.o(($event) => goWriteoffApproval(item), item.hazardId)
|
||||
} : {}, {
|
||||
} : {}) : {}, {
|
||||
y: item.hazardId
|
||||
});
|
||||
}),
|
||||
d: hiddenDangerList.value.length > 0
|
||||
d: !isApprovalRole.value,
|
||||
e: hiddenDangerList.value.length > 0
|
||||
}, hiddenDangerList.value.length > 0 ? {
|
||||
e: common_vendor.p({
|
||||
f: common_vendor.p({
|
||||
status: loadStatus.value
|
||||
})
|
||||
} : {}, {
|
||||
f: common_vendor.o(goToAdd),
|
||||
g: common_vendor.gei(_ctx, "")
|
||||
g: !isApprovalRole.value
|
||||
}, !isApprovalRole.value ? {
|
||||
h: common_vendor.o(goToAdd)
|
||||
} : {}, {
|
||||
i: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user