v1.2.1版本,优化调整了很多,整改验收阶段新加字段
This commit is contained in:
@@ -3,37 +3,27 @@ const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
|
||||
const _easycom_up_datetime_picker2 = common_vendor.resolveComponent("up-datetime-picker");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
(_easycom_up_picker2 + _easycom_up_datetime_picker2 + _easycom_up_input2 + _easycom_up_textarea2 + _easycom_u_popup2)();
|
||||
(_easycom_up_picker2 + _easycom_up_textarea2 + _easycom_u_popup2)();
|
||||
}
|
||||
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
|
||||
const _easycom_up_datetime_picker = () => "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
|
||||
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_picker + _easycom_up_datetime_picker + _easycom_up_input + _easycom_up_textarea + _easycom_u_popup)();
|
||||
(_easycom_up_picker + _easycom_up_textarea + _easycom_u_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "application",
|
||||
setup(__props) {
|
||||
const showAddPopup = common_vendor.ref(false);
|
||||
const showHazardPicker = common_vendor.ref(false);
|
||||
const showDatePicker = common_vendor.ref(false);
|
||||
const showDeptPicker = common_vendor.ref(false);
|
||||
const selectedHazard = common_vendor.ref("");
|
||||
const selectedHazardId = common_vendor.ref("");
|
||||
const hazardColumns = common_vendor.ref([["暂无数据"]]);
|
||||
const acceptanceHazardList = common_vendor.ref([]);
|
||||
const hazardList = common_vendor.ref([]);
|
||||
const selectedDeptName = common_vendor.ref("");
|
||||
const selectedDeptId = common_vendor.ref("");
|
||||
const deptColumns = common_vendor.ref([["暂无数据"]]);
|
||||
const deptList = common_vendor.ref([]);
|
||||
const dateValue = common_vendor.ref(Date.now());
|
||||
const aiGenerating = common_vendor.ref(false);
|
||||
const formData = common_vendor.reactive({
|
||||
rectifyDeadline: "",
|
||||
@@ -54,10 +44,10 @@ const _sfc_main = {
|
||||
const res = await request_api.getMyWriteOffList();
|
||||
if (res.code === 0 && res.data) {
|
||||
hazardList.value = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:174", "销号申请列表:", res.data);
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:137", "销号申请列表:", res.data);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:177", "获取销号申请列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:140", "获取销号申请列表失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchAcceptanceList = async () => {
|
||||
@@ -71,86 +61,40 @@ const _sfc_main = {
|
||||
} else {
|
||||
hazardColumns.value = [["暂无可申请销号的隐患"]];
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:194", "可申请销号的隐患列表:", list);
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:157", "可申请销号的隐患列表:", list);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:197", "获取可申请销号隐患列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:160", "获取可申请销号隐患列表失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchDeptList = async () => {
|
||||
try {
|
||||
const res = await request_api.getDepartmentPersonUsers();
|
||||
if (res.code === 0 && res.data) {
|
||||
const users = [];
|
||||
res.data.forEach((dept) => {
|
||||
if (dept.users && dept.users.length > 0) {
|
||||
dept.users.forEach((user) => {
|
||||
users.push({
|
||||
userId: user.userId,
|
||||
deptId: dept.deptId,
|
||||
name: `${user.nickName}(${dept.deptName})`
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
deptList.value = users;
|
||||
if (users.length > 0) {
|
||||
deptColumns.value = [users.map((item) => item.name)];
|
||||
} else {
|
||||
deptColumns.value = [["暂无人员数据"]];
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:225", "部门人员列表:", users);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:228", "获取部门人员列表失败:", error);
|
||||
}
|
||||
};
|
||||
const onDeptConfirm = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:234", "选择的人员:", e);
|
||||
if (e.value && e.value.length > 0) {
|
||||
selectedDeptName.value = e.value[0];
|
||||
const index = e.indexs[0];
|
||||
if (deptList.value[index]) {
|
||||
selectedDeptId.value = deptList.value[index].deptId;
|
||||
formData.responsibleDeptId = deptList.value[index].deptId;
|
||||
}
|
||||
}
|
||||
showDeptPicker.value = false;
|
||||
};
|
||||
const openAddPopup = () => {
|
||||
resetForm();
|
||||
fetchAcceptanceList();
|
||||
fetchDeptList();
|
||||
showAddPopup.value = true;
|
||||
};
|
||||
const fillHazardRelatedFields = (hazard) => {
|
||||
formData.rectifyDeadline = hazard.deadline || "";
|
||||
selectedDeptName.value = hazard.deptName || "";
|
||||
formData.responsiblePerson = hazard.rectifierName || "";
|
||||
formData.responsibleDeptId = hazard.deptId || "";
|
||||
};
|
||||
const onHazardConfirm = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:257", "选择的隐患:", e);
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:181", "选择的隐患:", e);
|
||||
if (e.value && e.value.length > 0) {
|
||||
selectedHazard.value = e.value[0];
|
||||
const index = e.indexs[0];
|
||||
if (acceptanceHazardList.value[index]) {
|
||||
selectedHazardId.value = acceptanceHazardList.value[index].hazardId;
|
||||
const hazard = acceptanceHazardList.value[index];
|
||||
if (hazard) {
|
||||
selectedHazardId.value = hazard.hazardId;
|
||||
fillHazardRelatedFields(hazard);
|
||||
}
|
||||
}
|
||||
showHazardPicker.value = false;
|
||||
};
|
||||
const onDateConfirm = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:271", "选择的日期时间:", e);
|
||||
const date = new Date(e.value);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
const hours = String(date.getHours()).padStart(2, "0");
|
||||
const minutes = String(date.getMinutes()).padStart(2, "0");
|
||||
const seconds = String(date.getSeconds()).padStart(2, "0");
|
||||
formData.rectifyDeadline = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
showDatePicker.value = false;
|
||||
};
|
||||
const resetForm = () => {
|
||||
selectedHazard.value = "";
|
||||
selectedHazardId.value = "";
|
||||
selectedDeptName.value = "";
|
||||
selectedDeptId.value = "";
|
||||
formData.rectifyDeadline = "";
|
||||
formData.responsibleDeptId = "";
|
||||
formData.responsiblePerson = "";
|
||||
@@ -196,7 +140,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: aiRes.msg || "AI生成失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:345", "AI生成销号方案失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:255", "AI生成销号方案失败:", error);
|
||||
common_vendor.index.showToast({ title: "AI生成失败,请重试", icon: "none" });
|
||||
} finally {
|
||||
aiGenerating.value = false;
|
||||
@@ -223,7 +167,7 @@ const _sfc_main = {
|
||||
selfVerifyContent: formData.selfVerifyContent || ""
|
||||
// 责任单位自行验收情况
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:370", "提交数据:", params);
|
||||
common_vendor.index.__f__("log", "at pages/closeout/application.vue:280", "提交数据:", params);
|
||||
try {
|
||||
const res = await request_api.applyDelete(params);
|
||||
if (res.code === 0) {
|
||||
@@ -235,43 +179,51 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: res.msg || "申请失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:384", "申请失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/closeout/application.vue:294", "申请失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
const editor = () => {
|
||||
const editor = (item) => {
|
||||
if (!(item == null ? void 0 : item.id)) {
|
||||
common_vendor.index.showToast({ title: "缺少申请ID", icon: "none" });
|
||||
return;
|
||||
}
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/closeout/editor"
|
||||
url: `/pages/closeout/editor?applyId=${item.id}`
|
||||
});
|
||||
};
|
||||
const getStatusClass = (status) => {
|
||||
switch (status) {
|
||||
case "待审核":
|
||||
return "status-pending";
|
||||
case "已通过":
|
||||
return "status-passed";
|
||||
case "已驳回":
|
||||
return "status-rejected";
|
||||
default:
|
||||
return "status-pending";
|
||||
}
|
||||
const getStatusClass = (item) => {
|
||||
const statusName = (item == null ? void 0 : item.verifyResultName) || "";
|
||||
if (statusName === "待审核")
|
||||
return "status-pending";
|
||||
if (statusName === "审核通过" || statusName === "已通过")
|
||||
return "status-passed";
|
||||
if (statusName === "审核驳回" || statusName === "已驳回")
|
||||
return "status-rejected";
|
||||
if (statusName === "已重新申请")
|
||||
return "status-reapply";
|
||||
if ((item == null ? void 0 : item.verifyResult) === 1)
|
||||
return "status-passed";
|
||||
if ((item == null ? void 0 : item.verifyResult) === 2)
|
||||
return "status-rejected";
|
||||
return "status-default";
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
fetchWriteOffList();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(hazardList.value, (item, index, i0) => {
|
||||
a: common_vendor.f(hazardList.value, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.hazardTitle),
|
||||
b: common_vendor.t(item.verifyResultName || "未知"),
|
||||
c: common_vendor.n(getStatusClass(item.verifyResultName)),
|
||||
c: common_vendor.n(getStatusClass(item)),
|
||||
d: common_vendor.t(item.hazardCreatedAt),
|
||||
e: common_vendor.t(item.responsibleDeptName),
|
||||
f: common_vendor.t(item.responsiblePerson),
|
||||
g: common_vendor.t(item.createdAt),
|
||||
h: common_vendor.o(($event) => editor(), index),
|
||||
i: index
|
||||
h: common_vendor.o(($event) => editor(item), item.hazardId || item.id),
|
||||
i: item.hazardId || item.id
|
||||
};
|
||||
}),
|
||||
b: common_vendor.o(openAddPopup),
|
||||
@@ -280,73 +232,50 @@ const _sfc_main = {
|
||||
e: common_vendor.n(selectedHazard.value ? "" : "text-gray"),
|
||||
f: common_vendor.o(($event) => showHazardPicker.value = true)
|
||||
}, {}, {
|
||||
k: common_vendor.t(formData.rectifyDeadline || "请选择整改时限"),
|
||||
k: common_vendor.t(formData.rectifyDeadline || "请先选择隐患"),
|
||||
l: common_vendor.n(formData.rectifyDeadline ? "" : "text-gray"),
|
||||
m: common_vendor.o(($event) => showDatePicker.value = true)
|
||||
}, {}, {
|
||||
s: common_vendor.t(selectedDeptName.value || "请选择隐患治理责任单位"),
|
||||
t: common_vendor.n(selectedDeptName.value ? "" : "text-gray"),
|
||||
v: common_vendor.o(($event) => showDeptPicker.value = true)
|
||||
}, {}, {
|
||||
A: common_vendor.o(($event) => formData.responsiblePerson = $event),
|
||||
B: common_vendor.p({
|
||||
placeholder: "请输入主要负责人",
|
||||
modelValue: formData.responsiblePerson
|
||||
}),
|
||||
C: !aiGenerating.value
|
||||
m: common_vendor.t(selectedDeptName.value || "请先选择隐患"),
|
||||
n: common_vendor.n(selectedDeptName.value ? "" : "text-gray"),
|
||||
o: common_vendor.t(formData.responsiblePerson || "请先选择隐患"),
|
||||
p: common_vendor.n(formData.responsiblePerson ? "" : "text-gray"),
|
||||
q: !aiGenerating.value
|
||||
}, !aiGenerating.value ? {} : {}, {
|
||||
D: common_vendor.t(aiGenerating.value ? "AI生成中..." : "AI 生成销号方案"),
|
||||
E: aiGenerating.value,
|
||||
F: aiGenerating.value,
|
||||
G: common_vendor.o(handleAiGenerate),
|
||||
H: common_vendor.o(($event) => formData.mainTreatmentContent = $event),
|
||||
I: common_vendor.p({
|
||||
r: common_vendor.t(aiGenerating.value ? "AI生成中..." : "AI 生成销号方案"),
|
||||
s: aiGenerating.value,
|
||||
t: aiGenerating.value,
|
||||
v: common_vendor.o(handleAiGenerate),
|
||||
w: common_vendor.o(($event) => formData.mainTreatmentContent = $event),
|
||||
x: common_vendor.p({
|
||||
placeholder: "请输入主要治理内容",
|
||||
modelValue: formData.mainTreatmentContent
|
||||
}),
|
||||
J: common_vendor.o(($event) => formData.treatmentResult = $event),
|
||||
K: common_vendor.p({
|
||||
y: common_vendor.o(($event) => formData.treatmentResult = $event),
|
||||
z: common_vendor.p({
|
||||
placeholder: "请输入隐患治理完成情况",
|
||||
modelValue: formData.treatmentResult
|
||||
}),
|
||||
L: common_vendor.o(($event) => formData.selfVerifyContent = $event),
|
||||
M: common_vendor.p({
|
||||
A: common_vendor.o(($event) => formData.selfVerifyContent = $event),
|
||||
B: common_vendor.p({
|
||||
placeholder: "请输入隐患治理责任单位自行验收的情况",
|
||||
modelValue: formData.selfVerifyContent
|
||||
}),
|
||||
N: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
O: common_vendor.o(handleAdd),
|
||||
P: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
Q: common_vendor.p({
|
||||
C: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
D: common_vendor.o(handleAdd),
|
||||
E: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
F: common_vendor.p({
|
||||
show: showAddPopup.value,
|
||||
mode: "center",
|
||||
round: "20",
|
||||
safeAreaInsetBottom: false
|
||||
}),
|
||||
R: common_vendor.o(onHazardConfirm),
|
||||
S: common_vendor.o(($event) => showHazardPicker.value = false),
|
||||
T: common_vendor.o(($event) => showHazardPicker.value = false),
|
||||
U: common_vendor.p({
|
||||
G: common_vendor.o(onHazardConfirm),
|
||||
H: common_vendor.o(($event) => showHazardPicker.value = false),
|
||||
I: common_vendor.o(($event) => showHazardPicker.value = false),
|
||||
J: common_vendor.p({
|
||||
show: showHazardPicker.value,
|
||||
columns: hazardColumns.value
|
||||
}),
|
||||
V: common_vendor.o(onDateConfirm),
|
||||
W: common_vendor.o(($event) => showDatePicker.value = false),
|
||||
X: common_vendor.o(($event) => showDatePicker.value = false),
|
||||
Y: common_vendor.o(($event) => dateValue.value = $event),
|
||||
Z: common_vendor.p({
|
||||
show: showDatePicker.value,
|
||||
mode: "datetime",
|
||||
modelValue: dateValue.value
|
||||
}),
|
||||
aa: common_vendor.o(onDeptConfirm),
|
||||
ab: common_vendor.o(($event) => showDeptPicker.value = false),
|
||||
ac: common_vendor.o(($event) => showDeptPicker.value = false),
|
||||
ad: common_vendor.p({
|
||||
show: showDeptPicker.value,
|
||||
columns: deptColumns.value
|
||||
}),
|
||||
ae: common_vendor.gei(_ctx, "")
|
||||
K: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
"navigationBarTitleText": "销号申请",
|
||||
"usingComponents": {
|
||||
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
|
||||
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -51,6 +51,14 @@
|
||||
background: #FFF1F0;
|
||||
color: #F5222D;
|
||||
}
|
||||
.status-reapply.data-v-4b6250eb {
|
||||
background: #E6F7FF;
|
||||
color: #1890FF;
|
||||
}
|
||||
.status-default.data-v-4b6250eb {
|
||||
background: #F5F5F5;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
.popup-content.data-v-4b6250eb {
|
||||
width: 600rpx;
|
||||
background: #fff;
|
||||
@@ -134,4 +142,8 @@
|
||||
}
|
||||
.picker-input text.data-v-4b6250eb {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.picker-input.readonly.data-v-4b6250eb {
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
}
|
||||
@@ -1,134 +1,158 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const utils_upload = require("../../utils/upload.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
_easycom_up_input2();
|
||||
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
|
||||
(_easycom_up_input2 + _easycom_up_textarea2)();
|
||||
}
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
|
||||
if (!Math) {
|
||||
_easycom_up_input();
|
||||
(_easycom_up_input + _easycom_up_textarea)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "editor",
|
||||
setup(__props) {
|
||||
const getPageOptions = () => {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
return (currentPage == null ? void 0 : currentPage.options) || {};
|
||||
};
|
||||
const pageId = common_vendor.ref("");
|
||||
const canEdit = common_vendor.ref(false);
|
||||
const applyId = common_vendor.ref("");
|
||||
const signatureUrl = common_vendor.ref("");
|
||||
const formData = common_vendor.reactive({
|
||||
id: "",
|
||||
hazardId: "",
|
||||
hazardTitle: "",
|
||||
// 隐患标题
|
||||
hazardCreatedAt: "",
|
||||
// 隐患日期
|
||||
responsibleDeptName: "",
|
||||
// 隐患治理责任单位
|
||||
responsiblePerson: "",
|
||||
// 主要负责人
|
||||
createdAt: "",
|
||||
// 创建时间
|
||||
statusName: ""
|
||||
// 状态
|
||||
hazardName: "",
|
||||
deadline: "",
|
||||
responsibilityUnit: "",
|
||||
mainPerson: "",
|
||||
mainGovernanceContent: "",
|
||||
governanceCompleteContent: "",
|
||||
status: "",
|
||||
rejectReason: ""
|
||||
});
|
||||
const statusText = common_vendor.computed(() => {
|
||||
const val = Number(formData.status);
|
||||
if (val === 1)
|
||||
return "通过";
|
||||
if (val === 2)
|
||||
return "不通过";
|
||||
return "";
|
||||
});
|
||||
const hasRejectReason = common_vendor.computed(() => Boolean(String(formData.rejectReason || "").trim()));
|
||||
const hasSignature = common_vendor.computed(() => Boolean(signatureUrl.value));
|
||||
const applySignature = (signPath) => {
|
||||
signatureUrl.value = signPath ? utils_upload.toSubmitFileUrl(signPath) : "";
|
||||
};
|
||||
const previewSignature = () => {
|
||||
if (!signatureUrl.value)
|
||||
return;
|
||||
common_vendor.index.previewImage({
|
||||
urls: [signatureUrl.value],
|
||||
current: signatureUrl.value
|
||||
});
|
||||
};
|
||||
const onSignatureImageError = () => {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:94", "签名图片加载失败:", signatureUrl.value);
|
||||
};
|
||||
const fetchDetail = async (id) => {
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:56", "=== fetchDetail 被调用 ===, id:", id);
|
||||
if (!id) {
|
||||
common_vendor.index.showToast({ title: "缺少申请ID", icon: "none" });
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await request_api.getMyWriteOffList();
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:59", "接口返回:", res);
|
||||
if (res.code === 0 && res.data && res.data.length > 0) {
|
||||
const list = res.data;
|
||||
let data = null;
|
||||
if (id) {
|
||||
data = list.find((item) => item.id == id);
|
||||
}
|
||||
if (!data) {
|
||||
data = list[0];
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:72", "绑定数据:", data);
|
||||
formData.id = data.id;
|
||||
formData.hazardId = data.hazardId;
|
||||
formData.hazardTitle = data.hazardTitle || "";
|
||||
formData.hazardCreatedAt = data.hazardCreatedAt || "";
|
||||
formData.responsibleDeptName = data.responsibleDeptName || "";
|
||||
formData.responsiblePerson = data.responsiblePerson || "";
|
||||
formData.createdAt = data.createdAt || "";
|
||||
formData.statusName = data.statusName || "";
|
||||
if (data.status == 1 || data.statusName === "待审核") {
|
||||
canEdit.value = true;
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:86", "状态为待审核,可以编辑");
|
||||
} else {
|
||||
canEdit.value = false;
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:89", "状态为已审核,不可编辑");
|
||||
}
|
||||
common_vendor.index.showLoading({ title: "加载中..." });
|
||||
const res = await request_api.getWriteOffApplyDetail(id);
|
||||
if (res.code === 0 && res.data) {
|
||||
const data = res.data;
|
||||
formData.hazardId = data.hazardId || "";
|
||||
formData.hazardName = data.hazardName || "";
|
||||
formData.deadline = data.deadline || "";
|
||||
formData.responsibilityUnit = data.responsibilityUnit || "";
|
||||
formData.mainPerson = data.mainPerson || "";
|
||||
formData.mainGovernanceContent = data.mainGovernanceContent || "";
|
||||
formData.governanceCompleteContent = data.governanceCompleteContent || "";
|
||||
formData.status = data.status ?? "";
|
||||
formData.rejectReason = data.rejectReason || "";
|
||||
applySignature(data.signPath);
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:93", "获取详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:121", "获取销号申请详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
|
||||
} finally {
|
||||
common_vendor.index.hideLoading();
|
||||
}
|
||||
};
|
||||
const handleCancel = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:114", "=== onLoad 触发 ===");
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:115", "options:", options);
|
||||
pageId.value = (options == null ? void 0 : options.id) || "";
|
||||
fetchDetail(pageId.value);
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:122", "=== onMounted 触发 ===");
|
||||
if (!pageId.value) {
|
||||
const options = getPageOptions();
|
||||
common_vendor.index.__f__("log", "at pages/closeout/editor.vue:125", "备用获取参数:", options);
|
||||
pageId.value = (options == null ? void 0 : options.id) || "";
|
||||
fetchDetail(pageId.value);
|
||||
}
|
||||
applyId.value = (options == null ? void 0 : options.applyId) || "";
|
||||
fetchDetail(applyId.value);
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => formData.hazardTitle = $event),
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(($event) => formData.hazardName = $event),
|
||||
b: common_vendor.p({
|
||||
placeholder: "",
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
modelValue: formData.hazardTitle
|
||||
modelValue: formData.hazardName
|
||||
}),
|
||||
c: common_vendor.o(($event) => formData.hazardCreatedAt = $event),
|
||||
c: common_vendor.o(($event) => formData.deadline = $event),
|
||||
d: common_vendor.p({
|
||||
placeholder: "",
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
modelValue: formData.hazardCreatedAt
|
||||
modelValue: formData.deadline
|
||||
}),
|
||||
e: common_vendor.o(($event) => formData.responsibleDeptName = $event),
|
||||
e: common_vendor.o(($event) => formData.responsibilityUnit = $event),
|
||||
f: common_vendor.p({
|
||||
placeholder: "请输入",
|
||||
disabled: !canEdit.value,
|
||||
modelValue: formData.responsibleDeptName
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
modelValue: formData.responsibilityUnit
|
||||
}),
|
||||
g: common_vendor.o(($event) => formData.responsiblePerson = $event),
|
||||
g: common_vendor.o(($event) => formData.mainPerson = $event),
|
||||
h: common_vendor.p({
|
||||
placeholder: "请输入",
|
||||
disabled: !canEdit.value,
|
||||
modelValue: formData.responsiblePerson
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
modelValue: formData.mainPerson
|
||||
}),
|
||||
i: common_vendor.o(($event) => formData.createdAt = $event),
|
||||
i: common_vendor.o(($event) => formData.mainGovernanceContent = $event),
|
||||
j: common_vendor.p({
|
||||
placeholder: "",
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
modelValue: formData.createdAt
|
||||
autoHeight: true,
|
||||
modelValue: formData.mainGovernanceContent
|
||||
}),
|
||||
k: common_vendor.o(($event) => formData.statusName = $event),
|
||||
k: common_vendor.o(($event) => formData.governanceCompleteContent = $event),
|
||||
l: common_vendor.p({
|
||||
placeholder: "",
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
modelValue: formData.statusName
|
||||
autoHeight: true,
|
||||
modelValue: formData.governanceCompleteContent
|
||||
}),
|
||||
m: common_vendor.o(handleCancel),
|
||||
n: common_vendor.gei(_ctx, "")
|
||||
};
|
||||
m: common_vendor.p({
|
||||
modelValue: statusText.value,
|
||||
placeholder: "暂无",
|
||||
disabled: true
|
||||
}),
|
||||
n: hasRejectReason.value
|
||||
}, hasRejectReason.value ? {
|
||||
o: common_vendor.o(($event) => formData.rejectReason = $event),
|
||||
p: common_vendor.p({
|
||||
placeholder: "暂无",
|
||||
disabled: true,
|
||||
autoHeight: true,
|
||||
modelValue: formData.rejectReason
|
||||
})
|
||||
} : {}, {
|
||||
q: hasSignature.value
|
||||
}, hasSignature.value ? {
|
||||
r: signatureUrl.value,
|
||||
s: common_vendor.o(previewSignature),
|
||||
t: common_vendor.o(onSignatureImageError)
|
||||
} : {}, {
|
||||
v: common_vendor.o(handleCancel),
|
||||
w: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "销号详情",
|
||||
"usingComponents": {
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input"
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="{{['padding', 'page', 'data-v-bbd4165b', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{n}}"><view class="padding bg-white radius data-v-bbd4165b"><view class="flex margin-bottom data-v-bbd4165b"><view class="text-gray data-v-bbd4165b">隐患</view></view><up-input wx:if="{{b}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">隐患日期</view><up-input wx:if="{{d}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">隐患治理责任单位</view><up-input wx:if="{{f}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">主要负责人</view><up-input wx:if="{{h}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">创建时间</view><up-input wx:if="{{j}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-4" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">状态</view><up-input wx:if="{{l}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-5" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></up-input><view class="flex justify-center margin-top-xl data-v-bbd4165b" style="gap:30rpx"><button class="round cu-btn lg data-v-bbd4165b" bindtap="{{m}}">返回</button></view></view></view>
|
||||
<view class="{{['padding', 'page', 'data-v-bbd4165b', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{w}}"><view class="padding bg-white radius data-v-bbd4165b"><view class="text-gray margin-bottom data-v-bbd4165b">隐患名称</view><up-input wx:if="{{b}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">整改时限</view><up-input wx:if="{{d}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">隐患治理责任单位</view><up-input wx:if="{{f}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">主要负责人</view><up-input wx:if="{{h}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-input><view class="text-gray margin-bottom margin-top data-v-bbd4165b">主要治理内容</view><up-textarea wx:if="{{j}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-4" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></up-textarea><view class="text-gray margin-bottom margin-top data-v-bbd4165b">隐患治理完成内容</view><up-textarea wx:if="{{l}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-5" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></up-textarea><view class="text-gray margin-bottom margin-top data-v-bbd4165b">状态</view><up-input wx:if="{{m}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-6" bind:__l="__l" u-p="{{m}}"></up-input><block wx:if="{{n}}"><view class="text-gray margin-bottom margin-top data-v-bbd4165b">驳回理由</view><up-textarea wx:if="{{p}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-7" bind:__l="__l" bindupdateModelValue="{{o}}" u-p="{{p}}"></up-textarea></block><block wx:if="{{q}}"><view class="text-gray margin-bottom margin-top data-v-bbd4165b">电子签名</view><view class="signature-box data-v-bbd4165b"><image src="{{r}}" class="signature-img data-v-bbd4165b" mode="aspectFit" bindtap="{{s}}" binderror="{{t}}"></image></view></block><view class="flex justify-center margin-top-xl data-v-bbd4165b"><button class="round cu-btn lg data-v-bbd4165b" bindtap="{{v}}">返回</button></view></view></view>
|
||||
@@ -27,4 +27,16 @@
|
||||
.page.data-v-bbd4165b {
|
||||
min-height: 100vh;
|
||||
background: #EBF2FC;
|
||||
}
|
||||
.signature-box.data-v-bbd4165b {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
background: #f8f8f8;
|
||||
border: 1rpx dashed #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.signature-img.data-v-bbd4165b {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user