交办、整改责任人修改

This commit is contained in:
王利强
2026-06-30 09:47:10 +08:00
parent d4897284e8
commit 455fd4fc07
638 changed files with 5153 additions and 2572 deletions

View File

@@ -1,20 +1,12 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
if (!Math) {
HazardFormPopup();
}
const HazardFormPopup = () => "../../components/hazard/HazardFormPopup.js";
const _sfc_main = {
__name: "Inspection",
setup(__props) {
const showAddPopup = common_vendor.ref(false);
const taskId = common_vendor.ref("");
const checkPointId = common_vendor.ref("");
const hazardExtraParams = common_vendor.computed(() => ({
taskId: taskId.value,
checkPointId: checkPointId.value
}));
const oneTableId = common_vendor.ref("");
const userRole = common_vendor.ref("");
const canAcceptance = common_vendor.computed(() => {
return userRole.value === "admin" || userRole.value === "manage";
@@ -27,13 +19,13 @@ const _sfc_main = {
userRole.value = userInfo.role || "";
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:100", "获取用户信息失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:86", "获取用户信息失败:", error);
}
};
getUserRole();
const fetchTaskInfo = async (oneTableId) => {
const fetchTaskInfo = async (oneTableId2) => {
try {
const startRes = await request_api.enterCheckPlan(oneTableId);
const startRes = await request_api.enterCheckPlan(oneTableId2);
if (startRes.code === 0 && startRes.data) {
const tid = startRes.data.taskId;
const detailRes = await request_api.getCheckTaskDetail(tid);
@@ -43,11 +35,12 @@ const _sfc_main = {
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:117", "获取任务信息失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:103", "获取任务信息失败:", error);
}
};
common_vendor.onLoad((options) => {
if (options.id) {
oneTableId.value = options.id;
fetchTaskInfo(options.id);
}
});
@@ -64,7 +57,7 @@ const _sfc_main = {
});
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:140", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:127", error);
common_vendor.index.showToast({
title: "请求失败",
icon: "none"
@@ -74,12 +67,22 @@ const _sfc_main = {
common_vendor.onShow(() => {
fetchHiddenDangerList();
});
const openAddPopup = () => {
showAddPopup.value = true;
};
const onHazardAddSuccess = () => {
showAddPopup.value = false;
fetchHiddenDangerList();
const goToAdd = () => {
let url = "/pages/hiddendanger/add";
const params = [];
if (oneTableId.value) {
params.push(`id=${oneTableId.value}`);
}
if (taskId.value) {
params.push(`taskId=${taskId.value}`);
}
if (checkPointId.value) {
params.push(`checkPointId=${checkPointId.value}`);
}
if (params.length) {
url += `?${params.join("&")}`;
}
common_vendor.index.navigateTo({ url });
};
const details = (item) => {
common_vendor.index.navigateTo({
@@ -178,16 +181,8 @@ const _sfc_main = {
t: item.hazardId
});
}),
d: common_vendor.o(openAddPopup),
e: common_vendor.o(onHazardAddSuccess),
f: common_vendor.o(($event) => showAddPopup.value = $event),
g: common_vendor.p({
title: "新增隐患排查",
mode: "direct",
["extra-params"]: hazardExtraParams.value,
show: showAddPopup.value
}),
h: common_vendor.gei(_ctx, "")
d: common_vendor.o(goToAdd),
e: common_vendor.gei(_ctx, "")
});
};
}