验收页面优化(通过且快速审批时无需选择处理人)
This commit is contained in:
@@ -126,6 +126,13 @@ const _sfc_main = {
|
||||
var _a;
|
||||
return ((_a = rectifyData.rectifierName) == null ? void 0 : _a.trim()) || "暂无";
|
||||
});
|
||||
const showAssigneeSection = common_vendor.computed(() => {
|
||||
if (formData.result === 2)
|
||||
return true;
|
||||
if (formData.result === 1 && formData.quickApproveRadio === "no")
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
const selectedAssigneeIdentityId = common_vendor.ref("");
|
||||
const selectedAssigneeName = common_vendor.ref("");
|
||||
const pickerAssigneeIdentityId = common_vendor.ref("");
|
||||
@@ -170,7 +177,7 @@ const _sfc_main = {
|
||||
assigneeList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:352", "获取部门人员失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:361", "获取部门人员失败:", error);
|
||||
assigneeList.value = [];
|
||||
} finally {
|
||||
assigneeLoading.value = false;
|
||||
@@ -237,7 +244,7 @@ const _sfc_main = {
|
||||
nextStepName.value = "";
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:425", "获取下一步流程失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:434", "获取下一步流程失败:", error);
|
||||
nextStepName.value = "";
|
||||
} finally {
|
||||
nextStepLoading.value = false;
|
||||
@@ -496,7 +503,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: res.msg || "获取整改详情失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:719", "获取整改详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:728", "获取整改详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "获取整改详情失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -526,7 +533,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:751", "获取隐患详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:760", "获取隐患详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -593,7 +600,7 @@ const _sfc_main = {
|
||||
} catch (err) {
|
||||
isSubmitting.value = false;
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:830", "签名上传失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:839", "签名上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
|
||||
}
|
||||
}
|
||||
@@ -615,7 +622,7 @@ const _sfc_main = {
|
||||
params.assigneeIdentityId = selectedAssigneeIdentityId.value;
|
||||
}
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:859", "提交验收参数:", params);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:868", "提交验收参数:", params);
|
||||
try {
|
||||
const res = await request_api.acceptanceRectification(params);
|
||||
common_vendor.index.hideLoading();
|
||||
@@ -636,7 +643,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:881", "验收失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:890", "验收失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "请求失败",
|
||||
icon: "none"
|
||||
@@ -716,7 +723,7 @@ const _sfc_main = {
|
||||
} catch (err) {
|
||||
isSubmitting.value = false;
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:990", "签名上传失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:999", "签名上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -732,7 +739,7 @@ const _sfc_main = {
|
||||
const sysInfo = common_vendor.index.getSystemInfoSync();
|
||||
signatureWidth.value = sysInfo.windowWidth - 40;
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:1009", "获取系统信息失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:1018", "获取系统信息失败:", e);
|
||||
}
|
||||
if (options.rectifyId) {
|
||||
rectifyId.value = options.rectifyId;
|
||||
@@ -746,7 +753,7 @@ const _sfc_main = {
|
||||
if (options.taskId) {
|
||||
taskId.value = options.taskId;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:1023", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value, taskId: taskId.value });
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:1032", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value, taskId: taskId.value });
|
||||
loadPageData();
|
||||
restoreDraft();
|
||||
});
|
||||
@@ -803,18 +810,20 @@ const _sfc_main = {
|
||||
D: canvasWidth.value + "px",
|
||||
E: canvasHeight.value + "px",
|
||||
F: common_vendor.t(nextStepDisplay.value),
|
||||
G: formData.result === 2
|
||||
G: showAssigneeSection.value
|
||||
}, showAssigneeSection.value ? common_vendor.e({
|
||||
H: formData.result === 2
|
||||
}, formData.result === 2 ? {
|
||||
H: common_vendor.t(rectifierDisplayName.value)
|
||||
I: common_vendor.t(rectifierDisplayName.value)
|
||||
} : {
|
||||
I: common_vendor.t(selectedAssigneeName.value || "请选择下一步处理人"),
|
||||
J: !selectedAssigneeName.value ? 1 : "",
|
||||
K: common_vendor.o(openAssigneePopup)
|
||||
}, {
|
||||
L: common_vendor.o(cancelAssigneeSelect),
|
||||
M: assigneeLoading.value
|
||||
J: common_vendor.t(selectedAssigneeName.value || "请选择下一步处理人"),
|
||||
K: !selectedAssigneeName.value ? 1 : "",
|
||||
L: common_vendor.o(openAssigneePopup)
|
||||
}) : {}, {
|
||||
M: common_vendor.o(cancelAssigneeSelect),
|
||||
N: assigneeLoading.value
|
||||
}, assigneeLoading.value ? {} : assigneeList.value.length === 0 ? {} : {
|
||||
O: common_vendor.f(assigneeList.value, (user, k0, i0) => {
|
||||
P: common_vendor.f(assigneeList.value, (user, k0, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(formatAssigneeDisplayName(user)),
|
||||
b: String(pickerAssigneeIdentityId.value) === String(resolveAssigneeIdentityId(user))
|
||||
@@ -825,38 +834,38 @@ const _sfc_main = {
|
||||
});
|
||||
})
|
||||
}, {
|
||||
N: assigneeList.value.length === 0,
|
||||
P: common_vendor.o(cancelAssigneeSelect),
|
||||
Q: common_vendor.o(confirmAssigneeSelect),
|
||||
R: common_vendor.o(cancelAssigneeSelect),
|
||||
S: common_vendor.p({
|
||||
O: assigneeList.value.length === 0,
|
||||
Q: common_vendor.o(cancelAssigneeSelect),
|
||||
R: common_vendor.o(confirmAssigneeSelect),
|
||||
S: common_vendor.o(cancelAssigneeSelect),
|
||||
T: common_vendor.p({
|
||||
show: showAssigneePopup.value,
|
||||
mode: "bottom",
|
||||
round: "20"
|
||||
}),
|
||||
T: showCanvas.value
|
||||
U: showCanvas.value
|
||||
}, showCanvas.value ? {
|
||||
U: common_vendor.o(clearSignature)
|
||||
V: common_vendor.o(clearSignature)
|
||||
} : {
|
||||
V: common_vendor.o(reSign)
|
||||
W: common_vendor.o(reSign)
|
||||
}, {
|
||||
W: !showCanvas.value
|
||||
X: !showCanvas.value
|
||||
}, !showCanvas.value ? common_vendor.e({
|
||||
X: signatureUrl.value
|
||||
}, signatureUrl.value ? {
|
||||
Y: signatureUrl.value
|
||||
}, signatureUrl.value ? {
|
||||
Z: signatureUrl.value
|
||||
} : {}) : {}, {
|
||||
Z: showCanvas.value && !showAssigneePopup.value
|
||||
aa: showCanvas.value && !showAssigneePopup.value
|
||||
}, showCanvas.value && !showAssigneePopup.value ? {
|
||||
aa: common_vendor.sr(signatureRef, "39f9b795-3", {
|
||||
ab: common_vendor.sr(signatureRef, "39f9b795-3", {
|
||||
"k": "signatureRef"
|
||||
}),
|
||||
ab: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
|
||||
ac: common_vendor.o(onSignatureStart),
|
||||
ad: common_vendor.o(onSignatureSigning),
|
||||
ae: common_vendor.o(onSignatureEnd),
|
||||
af: common_vendor.o(onSignatureClear),
|
||||
ag: common_vendor.p({
|
||||
ac: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
|
||||
ad: common_vendor.o(onSignatureStart),
|
||||
ae: common_vendor.o(onSignatureSigning),
|
||||
af: common_vendor.o(onSignatureEnd),
|
||||
ag: common_vendor.o(onSignatureClear),
|
||||
ah: common_vendor.p({
|
||||
width: signatureWidth.value,
|
||||
height: 160,
|
||||
backgroundColor: "#f8f8f8",
|
||||
@@ -865,9 +874,9 @@ const _sfc_main = {
|
||||
enableHistory: false
|
||||
})
|
||||
} : {}, {
|
||||
ah: common_vendor.o(handleCancel),
|
||||
ai: common_vendor.o(handleSubmit),
|
||||
aj: common_vendor.gei(_ctx, "")
|
||||
ai: common_vendor.o(handleCancel),
|
||||
aj: common_vendor.o(handleSubmit),
|
||||
ak: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user