交办、整改责任人修改

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

@@ -19,6 +19,7 @@ if (!Math) {
"./pages/Inspectionchecklist/Inspectionchecklist.js";
"./pages/Idphotomanagement/Idphotomanagement.js";
"./pages/hiddendanger/Inspection.js";
"./pages/hiddendanger/add.js";
"./pages/hiddendanger/view.js";
"./pages/hiddendanger/detail2.js";
"./pages/hiddendanger/rectification.js";

View File

@@ -16,6 +16,7 @@
"pages/Inspectionchecklist/Inspectionchecklist",
"pages/Idphotomanagement/Idphotomanagement",
"pages/hiddendanger/Inspection",
"pages/hiddendanger/add",
"pages/hiddendanger/view",
"pages/hiddendanger/detail2",
"pages/hiddendanger/rectification",

View File

@@ -7141,7 +7141,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() {
const hosts = "172.22.80.1,192.168.1.144,127.0.0.1";
const port = "8090";
const id = "mp-weixin_VwRpzI";
const id = "mp-weixin_4A0WII";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();

View File

@@ -0,0 +1,815 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
const request_three_one_api_area = require("../../request/three_one_api/area.js");
const utils_upload = require("../../utils/upload.js");
const components_hazard_hazardForm = require("./hazardForm.js");
if (!Array) {
const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload");
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_upload2 + _easycom_up_input2 + _easycom_up_textarea2 + _easycom_u_popup2)();
}
const _easycom_up_upload = () => "../../uni_modules/uview-plus/components/u-upload/u-upload.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_upload + _easycom_up_input + _easycom_up_textarea + _easycom_u_popup)();
}
const LOCATION_PICKER_DRAFT_KEY = "hazard_form_location_picker_draft";
const _sfc_main = {
__name: "HazardFormPanel",
props: {
pageMode: {
type: Boolean,
default: false
},
show: {
type: Boolean,
default: false
},
title: {
type: String,
default: "填写隐患信息"
},
mode: {
type: String,
default: "collect"
},
modelValue: {
type: Object,
default: null
},
extraParams: {
type: Object,
default: () => ({})
},
showDraftBanner: {
type: Boolean,
default: false
},
bodyHeight: {
type: String,
default: ""
},
canvasId: {
type: String,
default: "hazardFormWatermarkCanvas"
}
},
emits: ["update:show", "update:modelValue", "success", "confirm", "clear-draft", "close", "draft-change"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const emit = __emit;
const popupVisible = common_vendor.computed({
get: () => props.pageMode ? true : props.show,
set: (value) => {
if (!props.pageMode) {
emit("update:show", value);
}
}
});
const isApiSuccess = (res) => Number(res == null ? void 0 : res.code) === 0 || Number(res == null ? void 0 : res.code) === 200;
const bodyStyle = common_vendor.computed(() => {
if (props.bodyHeight) {
return { height: props.bodyHeight };
}
if (props.pageMode) {
return { maxHeight: "none" };
}
return {};
});
const canvasWidth = common_vendor.ref(300);
const canvasHeight = common_vendor.ref(300);
const submitting = common_vendor.ref(false);
const aiAnalyzing = common_vendor.ref(false);
const syncingFromParent = common_vendor.ref(false);
const formData = common_vendor.reactive({
title: "",
level: 0,
source: 0,
hazardSourceCode: null,
hazardSourceName: "",
description: "",
tagIndex: 0,
tagId: null,
regulationId: null,
regulationName: ""
});
const address = common_vendor.ref("");
const lng = common_vendor.ref(0);
const lat = common_vendor.ref(0);
const areaId = common_vendor.ref("");
const areaName = common_vendor.ref("");
const fileList = common_vendor.ref([]);
const tagOptions = common_vendor.ref([]);
const showLawPopup = common_vendor.ref(false);
const lawKeyword = common_vendor.ref("");
const selectedLawId = common_vendor.ref(null);
const selectedLawName = common_vendor.ref("");
const lawList = common_vendor.ref([]);
const lawLoading = common_vendor.ref(false);
const lawPageNum = common_vendor.ref(1);
const lawPageSize = common_vendor.ref(10);
const hasMoreLaw = common_vendor.ref(true);
const showHazardSourcePicker = common_vendor.ref(false);
const hazardSourceList = common_vendor.ref([]);
const tempHazardSourceCode = common_vendor.ref(null);
const showAreaPicker = common_vendor.ref(false);
const areaList = common_vendor.ref([]);
const tempAreaId = common_vendor.ref("");
const choosingLocation = common_vendor.ref(false);
const suppressModelEmit = common_vendor.ref(false);
const formRenderKey = common_vendor.ref(0);
const uploadInstance = common_vendor.getCurrentInstance();
const { afterRead, deletePic } = utils_upload.createUploadListHandlers(fileList, {
watermark: {
canvasId: props.canvasId,
canvasWidthRef: canvasWidth,
canvasHeightRef: canvasHeight,
instance: uploadInstance
}
});
function getPayload() {
syncTagIdFromIndex();
return {
formData: {
title: formData.title,
level: formData.level,
source: formData.source,
hazardSourceCode: formData.hazardSourceCode,
hazardSourceName: formData.hazardSourceName,
description: formData.description,
tagIndex: formData.tagIndex,
tagId: formData.tagId,
regulationId: formData.regulationId,
regulationName: formData.regulationName
},
address: address.value,
lng: lng.value,
lat: lat.value,
areaId: areaId.value,
areaName: areaName.value,
fileList: fileList.value,
tagOptions: tagOptions.value
};
}
function applyPayload(payload) {
if (!payload)
return;
syncingFromParent.value = true;
const data = payload.formData || {};
formData.title = data.title || "";
formData.level = data.level ?? 0;
formData.source = data.source ?? 0;
formData.hazardSourceCode = data.hazardSourceCode ?? null;
formData.hazardSourceName = data.hazardSourceName || "";
syncHazardSourceNameFromCode();
formData.description = data.description || "";
formData.tagIndex = data.tagIndex ?? 0;
formData.tagId = data.tagId ?? null;
formData.regulationId = data.regulationId ?? null;
formData.regulationName = data.regulationName || "";
address.value = payload.address || "";
lng.value = payload.lng || 0;
lat.value = payload.lat || 0;
areaId.value = payload.areaId || "";
areaName.value = payload.areaName || "";
fileList.value = payload.fileList ? [...payload.fileList] : [];
selectedLawId.value = data.regulationId ?? null;
selectedLawName.value = data.regulationName || "";
syncingFromParent.value = false;
formRenderKey.value++;
}
function hasPayloadContent(payload) {
if (!payload)
return false;
const data = payload.formData || {};
const files = payload.fileList || [];
return !!(data.title || data.description || data.regulationName || payload.address || files.length > 0);
}
function getLocationPickerDraftKey() {
var _a;
return ((_a = props.extraParams) == null ? void 0 : _a.locationDraftKey) || LOCATION_PICKER_DRAFT_KEY;
}
function saveLocationPickerDraft() {
const snapshot = getPayload();
try {
common_vendor.index.setStorageSync(getLocationPickerDraftKey(), snapshot);
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:483", "保存选点草稿失败:", error);
}
return snapshot;
}
function loadLocationPickerDraft() {
try {
const draft = common_vendor.index.getStorageSync(getLocationPickerDraftKey());
return draft && typeof draft === "object" ? draft : null;
} catch (error) {
return null;
}
}
function clearLocationPickerDraft() {
try {
common_vendor.index.removeStorageSync(getLocationPickerDraftKey());
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:501", "清除选点草稿失败:", error);
}
}
function restoreAfterLocationPicker(patch = {}) {
const draft = loadLocationPickerDraft();
if (!draft)
return false;
applyPayload({
...draft,
...patch,
formData: {
...draft.formData || {},
...patch.formData || {}
},
fileList: patch.fileList ?? draft.fileList ?? []
});
clearLocationPickerDraft();
return true;
}
function reopenPopupAfterLocation() {
common_vendor.nextTick$1(() => {
choosingLocation.value = false;
if (!props.pageMode) {
popupVisible.value = true;
}
emitModelValue();
});
}
function resetForm() {
applyPayload(components_hazard_hazardForm.createEmptyHazardPayload());
selectedLawId.value = null;
selectedLawName.value = "";
tempAreaId.value = "";
clearLocationPickerDraft();
}
function syncTagIdFromIndex() {
const selectedTag = tagOptions.value[formData.tagIndex];
formData.tagId = (selectedTag == null ? void 0 : selectedTag.id) ?? formData.tagId ?? null;
}
function onChooseSelect(field, index) {
formData[field] = Number(index);
if (field === "tagIndex") {
syncTagIdFromIndex();
}
emitModelValue();
}
function emitModelValue() {
if (suppressModelEmit.value || syncingFromParent.value)
return;
if (props.pageMode && props.mode === "direct") {
emit("draft-change", getPayload());
return;
}
if (props.modelValue === null)
return;
if (props.mode === "collect" || props.mode === "direct")
return;
emit("update:modelValue", getPayload());
}
function closePopup() {
if (props.pageMode)
return;
popupVisible.value = false;
}
function handleClose() {
if (props.pageMode) {
common_vendor.index.navigateBack();
return;
}
closePopup();
emit("close");
}
function validateForm() {
if (fileList.value.length === 0) {
common_vendor.index.showToast({ title: "请上传隐患图片", icon: "none" });
return false;
}
if (!formData.title) {
common_vendor.index.showToast({ title: "请输入隐患标题", icon: "none" });
return false;
}
if (formData.hazardSourceCode == null) {
common_vendor.index.showToast({ title: "请选择隐患来源", icon: "none" });
return false;
}
if (!address.value) {
common_vendor.index.showToast({ title: "请输入隐患位置", icon: "none" });
return false;
}
if (!formData.description) {
common_vendor.index.showToast({ title: "请输入隐患描述", icon: "none" });
return false;
}
return true;
}
async function handleConfirm() {
if (!validateForm())
return;
const payload = getPayload();
if (props.mode === "collect") {
if (props.modelValue !== null) {
emit("update:modelValue", payload);
}
emit("confirm", payload);
closePopup();
common_vendor.index.showToast({ title: "隐患信息已暂存", icon: "success" });
return;
}
submitting.value = true;
try {
const params = components_hazard_hazardForm.buildHiddenDangerParams(payload, props.extraParams);
const res = await request_api.addHiddenDanger(params);
if (isApiSuccess(res)) {
suppressModelEmit.value = true;
if (!props.pageMode) {
closePopup();
}
emit("success", { ...payload, hazardId: res.data });
await common_vendor.nextTick$1();
resetForm();
common_vendor.index.showToast({ title: res.msg || "新增成功", icon: "success" });
if (props.pageMode) {
setTimeout(() => {
common_vendor.index.navigateBack();
}, 1500);
}
} else {
common_vendor.index.showToast({ title: res.msg || "新增失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:641", error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
} finally {
suppressModelEmit.value = false;
submitting.value = false;
}
}
function openLawPopup() {
showLawPopup.value = true;
if (lawList.value.length === 0) {
fetchRegulationList();
}
}
async function fetchRegulationList(isLoadMore = false) {
var _a;
if (lawLoading.value)
return;
lawLoading.value = true;
try {
const params = {
pageNum: lawPageNum.value,
pageSize: lawPageSize.value,
status: 1
};
if ((_a = lawKeyword.value) == null ? void 0 : _a.trim()) {
params.keyword = lawKeyword.value.trim();
}
const res = await request_api.getRegulationList(params);
if (res.code === 0) {
const records = res.data.records || res.data || [];
lawList.value = isLoadMore ? [...lawList.value, ...records] : records;
const total = res.data.total || 0;
hasMoreLaw.value = lawList.value.length < total;
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:676", "获取法规列表失败:", error);
} finally {
lawLoading.value = false;
}
}
function searchRegulation() {
lawPageNum.value = 1;
lawList.value = [];
hasMoreLaw.value = true;
fetchRegulationList();
}
function loadMoreLaw() {
if (!hasMoreLaw.value || lawLoading.value)
return;
lawPageNum.value++;
fetchRegulationList(true);
}
function selectLaw(item) {
selectedLawId.value = item.id;
selectedLawName.value = item.depict || item.keyword || "";
}
function confirmLaw() {
if (selectedLawId.value) {
formData.regulationId = selectedLawId.value;
formData.regulationName = selectedLawName.value;
}
showLawPopup.value = false;
emitModelValue();
}
function syncHazardSourceNameFromCode() {
if (formData.hazardSourceCode == null)
return;
const selected = hazardSourceList.value.find((item) => item.code === formData.hazardSourceCode);
if (selected) {
formData.hazardSourceName = selected.name;
}
}
function openHazardSourcePicker() {
tempHazardSourceCode.value = formData.hazardSourceCode;
showHazardSourcePicker.value = true;
}
function confirmHazardSourceSelect() {
if (tempHazardSourceCode.value != null) {
const selected = hazardSourceList.value.find((item) => item.code === tempHazardSourceCode.value);
if (selected) {
formData.hazardSourceCode = selected.code;
formData.hazardSourceName = selected.name;
}
}
showHazardSourcePicker.value = false;
emitModelValue();
}
async function fetchHazardSourceList() {
try {
const res = await request_api.getHazardSourceList();
if (isApiSuccess(res)) {
const list = Array.isArray(res.data) ? res.data : [];
hazardSourceList.value = list.map((item) => ({
code: item.code,
name: item.name || ""
})).filter((item) => item.code != null && item.name);
syncHazardSourceNameFromCode();
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:748", "获取隐患来源列表失败:", error);
}
}
function openAreaPicker() {
tempAreaId.value = areaId.value;
showAreaPicker.value = true;
}
async function fetchAreaList() {
var _a;
try {
const res = await request_three_one_api_area.getAreaList();
if (res.code === 0 && ((_a = res.data) == null ? void 0 : _a.records)) {
areaList.value = res.data.records;
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:764", "获取区域列表失败:", error);
}
}
function confirmAreaSelect() {
if (tempAreaId.value) {
areaId.value = tempAreaId.value;
const selected = areaList.value.find((item) => item.id === tempAreaId.value);
areaName.value = selected ? selected.name : "";
}
showAreaPicker.value = false;
emitModelValue();
}
function chooseLocation() {
choosingLocation.value = true;
saveLocationPickerDraft();
if (!props.pageMode) {
closePopup();
setTimeout(() => {
common_vendor.index.getLocation({
type: "gcj02",
success: (locationRes) => {
openChooseLocation(locationRes.latitude, locationRes.longitude);
},
fail: () => {
openChooseLocation();
}
});
}, 300);
return;
}
common_vendor.index.getLocation({
type: "gcj02",
success: (locationRes) => {
openChooseLocation(locationRes.latitude, locationRes.longitude);
},
fail: () => {
openChooseLocation();
}
});
}
function openChooseLocation(latitude, longitude) {
const options = {};
if (latitude != null && longitude != null) {
options.latitude = latitude;
options.longitude = longitude;
}
common_vendor.index.chooseLocation({
...options,
success: (res) => {
restoreAfterLocationPicker({
address: res.address + (res.name ? `(${res.name})` : ""),
lng: res.longitude,
lat: res.latitude
});
reopenPopupAfterLocation();
},
fail: (err) => {
restoreAfterLocationPicker();
reopenPopupAfterLocation();
if (err.errMsg && err.errMsg.indexOf("cancel") === -1) {
common_vendor.index.showToast({ title: "选择位置失败", icon: "none" });
}
}
});
}
async function handleAiAnalyze() {
const imageFiles = fileList.value.filter((f) => {
return f.status === "success" && f.url.toLowerCase().match(/\.(jpg|jpeg|png|gif|bmp|webp)$/);
});
if (imageFiles.length === 0) {
common_vendor.index.showToast({ title: "请先上传隐患图片", icon: "none" });
return;
}
aiAnalyzing.value = true;
try {
const analyzeRes = await request_api.analyzeHazardImage({ imageUrl: imageFiles[0].url });
if (analyzeRes.code === 0 && analyzeRes.data) {
const aiData = analyzeRes.data;
if (aiData.title)
formData.title = aiData.title;
if (aiData.description)
formData.description = aiData.description;
if (aiData.level) {
const levelIndex = components_hazard_hazardForm.AI_LEVEL_MAP[aiData.level];
if (levelIndex !== void 0) {
formData.level = levelIndex;
}
}
emitModelValue();
common_vendor.index.showToast({ title: "AI分析完成已自动填充", icon: "success", duration: 2e3 });
} else {
common_vendor.index.showToast({ title: analyzeRes.msg || "AI分析失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:861", "AI分析接口调用失败:", error);
common_vendor.index.showToast({ title: "AI分析失败请重试", icon: "none" });
} finally {
aiAnalyzing.value = false;
}
}
async function fetchTagOptions() {
try {
const res = await request_api.getHiddenDangerLabelList();
if (res.code === 0) {
tagOptions.value = res.data.map((item) => ({
id: item.id,
title: item.name
}));
syncTagIdFromIndex();
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPanel.vue:879", "获取标签列表失败:", error);
}
}
common_vendor.watch(
() => props.modelValue,
(val) => {
if (props.mode === "direct" && props.pageMode)
return;
if (props.mode === "direct")
return;
if (hasPayloadContent(val)) {
applyPayload(val);
}
},
{ deep: true, immediate: true }
);
common_vendor.watch(
() => ({
title: formData.title,
level: formData.level,
source: formData.source,
hazardSourceCode: formData.hazardSourceCode,
hazardSourceName: formData.hazardSourceName,
description: formData.description,
tagIndex: formData.tagIndex,
regulationId: formData.regulationId,
regulationName: formData.regulationName,
address: address.value,
areaId: areaId.value,
areaName: areaName.value,
fileListLength: fileList.value.length
}),
() => {
if (!props.pageMode || syncingFromParent.value)
return;
emit("draft-change", getPayload());
},
{ deep: true }
);
common_vendor.watch(
() => props.show,
(val) => {
if (props.pageMode)
return;
if (val && hazardSourceList.value.length === 0) {
fetchHazardSourceList();
}
if (val && areaList.value.length === 0) {
fetchAreaList();
}
if (!val)
return;
if (choosingLocation.value) {
return;
}
const locationDraft = loadLocationPickerDraft();
if (locationDraft) {
applyPayload(locationDraft);
clearLocationPickerDraft();
return;
}
if (hasPayloadContent(props.modelValue)) {
applyPayload(props.modelValue);
}
}
);
fetchTagOptions();
fetchHazardSourceList();
fetchAreaList();
__expose({
getPayload,
applyPayload,
resetForm,
validateForm
});
return (_ctx, _cache) => {
return common_vendor.e({
a: !__props.pageMode
}, !__props.pageMode ? {
b: common_vendor.t(__props.title),
c: common_vendor.o(handleClose)
} : {}, {
d: __props.showDraftBanner
}, __props.showDraftBanner ? {
e: common_vendor.o(($event) => emit("clear-draft"))
} : {}, {
f: common_vendor.f(common_vendor.unref(components_hazard_hazardForm.SOURCE_OPTIONS), (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.id,
c: formData.source === index ? 1 : "",
d: common_vendor.o(($event) => onChooseSelect("source", index), item.id)
};
}),
g: common_vendor.t(formData.hazardSourceName || "请选择隐患来源"),
h: !formData.hazardSourceName ? 1 : "",
i: common_vendor.o(openHazardSourcePicker),
j: common_vendor.o(common_vendor.unref(afterRead)),
k: common_vendor.o(common_vendor.unref(deletePic)),
l: common_vendor.p({
fileList: fileList.value,
name: "1",
multiple: true,
imageMode: "aspectFill",
maxCount: 10
}),
m: __props.canvasId,
n: canvasWidth.value,
o: canvasHeight.value,
p: canvasWidth.value + "px",
q: canvasHeight.value + "px",
r: !aiAnalyzing.value
}, !aiAnalyzing.value ? {} : {}, {
s: common_vendor.t(aiAnalyzing.value ? "AI识别中..." : "AI 识别隐患"),
t: aiAnalyzing.value,
v: aiAnalyzing.value,
w: common_vendor.o(handleAiAnalyze),
x: common_vendor.o(($event) => formData.title = $event),
y: common_vendor.p({
placeholder: "请输入内容",
border: "surround",
modelValue: formData.title
}),
z: common_vendor.f(common_vendor.unref(components_hazard_hazardForm.LEVEL_OPTIONS), (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.id,
c: formData.level === index ? 1 : "",
d: common_vendor.o(($event) => onChooseSelect("level", index), item.id)
};
}),
A: "address-" + formRenderKey.value,
B: common_vendor.o(($event) => address.value = $event),
C: common_vendor.p({
placeholder: "请输入地址",
border: "surround",
modelValue: address.value
}),
D: common_vendor.o(chooseLocation),
E: common_vendor.t(formData.regulationName || "请选择法律依据"),
F: !formData.regulationName ? 1 : "",
G: common_vendor.o(openLawPopup),
H: common_vendor.t(areaName.value || "请选择隐患区域"),
I: !areaName.value ? 1 : "",
J: common_vendor.o(openAreaPicker),
K: "description-" + formRenderKey.value,
L: common_vendor.o(($event) => formData.description = $event),
M: common_vendor.p({
placeholder: "请输入内容",
modelValue: formData.description
}),
N: common_vendor.f(tagOptions.value, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.id,
c: formData.tagIndex === index ? 1 : "",
d: common_vendor.o(($event) => onChooseSelect("tagIndex", index), item.id)
};
}),
O: common_vendor.n(__props.pageMode ? "page-body" : "popup-body"),
P: common_vendor.s(bodyStyle.value),
Q: common_vendor.o(handleClose),
R: submitting.value,
S: common_vendor.o(handleConfirm),
T: common_vendor.n(__props.pageMode ? "page-footer" : "popup-footer"),
U: common_vendor.n(__props.pageMode ? "hazard-form-page" : "popup-content"),
V: common_vendor.o(($event) => showLawPopup.value = false),
W: common_vendor.o(searchRegulation),
X: lawKeyword.value,
Y: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
Z: common_vendor.o(searchRegulation),
aa: lawLoading.value && lawList.value.length === 0
}, lawLoading.value && lawList.value.length === 0 ? {} : !lawLoading.value && lawList.value.length === 0 ? {} : common_vendor.e({
ac: common_vendor.f(lawList.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.depict),
b: common_vendor.t(item.legalBasis),
c: selectedLawId.value === item.id ? 1 : "",
d: item.id,
e: common_vendor.o(($event) => selectLaw(item), item.id)
};
}),
ad: lawLoading.value
}, lawLoading.value ? {} : {}), {
ab: !lawLoading.value && lawList.value.length === 0,
ae: common_vendor.o(loadMoreLaw),
af: common_vendor.o(($event) => showLawPopup.value = false),
ag: common_vendor.o(confirmLaw),
ah: common_vendor.o(($event) => showLawPopup.value = false),
ai: common_vendor.p({
show: showLawPopup.value,
mode: "center",
round: "20",
["safe-area-inset-bottom"]: false
}),
aj: common_vendor.o(($event) => showHazardSourcePicker.value = false),
ak: common_vendor.o(confirmHazardSourceSelect),
al: common_vendor.f(hazardSourceList.value, (item, k0, i0) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: tempHazardSourceCode.value === item.code
}, tempHazardSourceCode.value === item.code ? {} : {}, {
c: item.code,
d: tempHazardSourceCode.value === item.code ? 1 : "",
e: common_vendor.o(($event) => tempHazardSourceCode.value = item.code, item.code)
});
}),
am: hazardSourceList.value.length === 0
}, hazardSourceList.value.length === 0 ? {} : {}, {
an: common_vendor.o(($event) => showHazardSourcePicker.value = false),
ao: common_vendor.p({
show: showHazardSourcePicker.value,
mode: "bottom",
round: "20"
}),
ap: common_vendor.o(($event) => showAreaPicker.value = false),
aq: common_vendor.o(confirmAreaSelect),
ar: common_vendor.f(areaList.value, (item, k0, i0) => {
return common_vendor.e({
a: item.color,
b: common_vendor.t(item.name),
c: tempAreaId.value === item.id
}, tempAreaId.value === item.id ? {} : {}, {
d: item.id,
e: tempAreaId.value === item.id ? 1 : "",
f: common_vendor.o(($event) => tempAreaId.value = item.id, item.id)
});
}),
as: areaList.value.length === 0
}, areaList.value.length === 0 ? {} : {}, {
at: common_vendor.o(($event) => showAreaPicker.value = false),
av: common_vendor.p({
show: showAreaPicker.value,
mode: "bottom",
round: "20"
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2575db11"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/hazard/HazardFormPanel.js.map

View File

@@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
"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

View File

@@ -0,0 +1,423 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* uni.scss */
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.hazard-form-page.data-v-2575db11 {
min-height: 100vh;
background: #ebf2fc;
padding: 24rpx;
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
}
.page-body.data-v-2575db11 {
padding: 30rpx;
max-height: none;
background: #fff;
border-radius: 16rpx;
box-sizing: border-box;
}
.page-footer.data-v-2575db11 {
display: flex;
gap: 24rpx;
margin-top: 32rpx;
padding-bottom: env(safe-area-inset-bottom);
}
.page-footer button.data-v-2575db11 {
flex: 1;
height: 88rpx;
line-height: 88rpx;
border-radius: 44rpx;
font-size: 30rpx;
margin: 0;
padding: 0;
}
.page-footer button.data-v-2575db11::after {
border: none;
}
.page-footer .btn-cancel.data-v-2575db11 {
background: #fff;
color: #2667e9;
border: 2rpx solid #2667e9;
}
.page-footer .btn-confirm.data-v-2575db11 {
color: #fff;
border: none;
}
.popup-content.data-v-2575db11 {
width: 600rpx;
background: #fff;
border-radius: 20rpx;
overflow: hidden;
}
.popup-header.data-v-2575db11 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.popup-header .popup-title.data-v-2575db11 {
font-size: 32rpx;
color: #333;
}
.popup-header .popup-close.data-v-2575db11 {
font-size: 40rpx;
color: #999;
line-height: 1;
}
.popup-body.data-v-2575db11 {
padding: 30rpx;
max-height: 900rpx;
overflow-y: auto;
}
.draft-banner.data-v-2575db11 {
font-size: 24rpx;
background-color: #fff7eb;
border: 1rpx solid #ffe4cc;
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
padding: 16rpx 20rpx;
border-radius: 8rpx;
color: #fa8c16;
}
.draft-banner-left.data-v-2575db11 {
display: flex;
flex-direction: row;
align-items: center;
}
.draft-banner-icon.data-v-2575db11 {
margin-right: 10rpx;
}
.draft-banner-action.data-v-2575db11 {
cursor: pointer;
padding: 0 10rpx;
color: #2667e9;
font-weight: bold;
}
.hazard-choose-scroll.data-v-2575db11 {
width: 100%;
white-space: nowrap;
}
.hazard-choose-row.data-v-2575db11 {
display: inline-flex;
flex-direction: row;
align-items: center;
padding-right: 20rpx;
}
.hazard-choose-wrap.data-v-2575db11 {
display: flex;
flex-wrap: wrap;
}
.hazard-choose-tag.data-v-2575db11 {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
background: #fff;
flex-shrink: 0;
margin-right: 12rpx;
}
.hazard-choose-tag--source.data-v-2575db11 {
width: 152rpx;
height: 64rpx;
}
.hazard-choose-tag--level.data-v-2575db11 {
width: 183rpx;
height: 72rpx;
}
.hazard-choose-tag--tag.data-v-2575db11 {
min-width: 120rpx;
height: 64rpx;
padding: 0 24rpx;
margin-bottom: 12rpx;
}
.hazard-choose-tag--active.data-v-2575db11 {
background: #2667e9;
border-color: #2667e9;
}
.hazard-choose-tag--active .hazard-choose-tag__text.data-v-2575db11 {
color: #fff;
}
.hazard-choose-tag__text.data-v-2575db11 {
font-size: 24rpx;
line-height: 1.2;
color: #606266;
text-align: center;
}
.ai-btn-wrapper.data-v-2575db11 {
display: flex;
justify-content: flex-end;
}
.ai-analyze-btn.data-v-2575db11 {
display: flex;
align-items: center;
justify-content: center;
height: 72rpx;
padding: 0 32rpx;
font-size: 28rpx;
color: #fff;
background: linear-gradient(135deg, #4facfe 0%, #2668ea 100%);
border-radius: 36rpx;
border: none;
}
.ai-analyze-btn.data-v-2575db11::after {
border: none;
}
.ai-analyze-btn .ai-btn-icon.data-v-2575db11 {
margin-right: 8rpx;
font-size: 30rpx;
}
.ai-analyze-btn[disabled].data-v-2575db11 {
opacity: 0.7;
}
.popup-footer.data-v-2575db11 {
display: flex;
border-top: 1rpx solid #eee;
}
.popup-footer button.data-v-2575db11 {
flex: 1;
height: 90rpx;
line-height: 90rpx;
border-radius: 0;
font-size: 30rpx;
}
.popup-footer button.data-v-2575db11::after {
border: none;
}
.popup-footer .btn-cancel.data-v-2575db11 {
background: #fff;
color: #666;
}
.popup-footer .btn-confirm.data-v-2575db11 {
color: #fff;
}
.address-box.data-v-2575db11 {
display: flex;
align-items: center;
gap: 20rpx;
}
.address-box .address-input-wrapper.data-v-2575db11 {
flex: 1;
}
.address-box .btn-address.data-v-2575db11 {
flex-shrink: 0;
height: 70rpx;
line-height: 70rpx;
padding: 0 30rpx;
font-size: 26rpx;
border-radius: 8rpx;
color: #fff;
}
.address-box .btn-address.data-v-2575db11::after {
border: none;
}
.select-trigger.data-v-2575db11 {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
}
.select-trigger .select-value.data-v-2575db11 {
flex: 1;
font-size: 28rpx;
color: #333;
}
.select-trigger .select-value.placeholder.data-v-2575db11 {
color: #c0c4cc;
}
.static-field.data-v-2575db11 {
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.picker-popup.data-v-2575db11 {
background: #fff;
}
.picker-popup .picker-header.data-v-2575db11 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.picker-popup .picker-header .picker-cancel.data-v-2575db11 {
font-size: 28rpx;
color: #999;
}
.picker-popup .picker-header .picker-title.data-v-2575db11 {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.picker-popup .picker-header .picker-confirm.data-v-2575db11 {
font-size: 28rpx;
color: #2667e9;
}
.picker-popup .picker-body.data-v-2575db11 {
max-height: 600rpx;
padding: 0 30rpx;
}
.picker-popup .picker-item.data-v-2575db11 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 30rpx;
color: #333;
}
.picker-popup .picker-item.data-v-2575db11:last-child {
border-bottom: none;
}
.picker-popup .picker-item.picker-item-active.data-v-2575db11 {
color: #2667e9;
}
.area-color-dot.data-v-2575db11 {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
margin-right: 16rpx;
}
.law-popup.data-v-2575db11 {
width: 600rpx;
background: #fff;
border-radius: 20rpx;
overflow: hidden;
max-height: 80vh;
}
.law-popup .popup-header.data-v-2575db11 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.law-popup .popup-header .popup-title.data-v-2575db11 {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.law-popup .popup-header .popup-close.data-v-2575db11 {
font-size: 40rpx;
color: #999;
}
.search-box.data-v-2575db11 {
display: flex;
align-items: center;
background: #f5f5f5;
border-radius: 40rpx;
padding: 16rpx 24rpx;
margin: 20rpx 30rpx;
}
.search-box .search-icon.data-v-2575db11 {
font-size: 28rpx;
color: #999;
margin-right: 12rpx;
}
.search-box .search-input.data-v-2575db11 {
flex: 1;
font-size: 28rpx;
background: transparent;
border: none;
}
.search-box .search-btn.data-v-2575db11 {
color: #2667e9;
font-size: 26rpx;
margin-left: 16rpx;
}
.loading-tip.data-v-2575db11,
.empty-tip.data-v-2575db11 {
text-align: center;
padding: 40rpx;
color: #999;
font-size: 26rpx;
}
.law-list.data-v-2575db11 {
max-height: 400rpx;
padding: 0 30rpx;
}
.law-item.data-v-2575db11 {
padding: 24rpx;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
margin-bottom: 16rpx;
font-size: 28rpx;
color: #333;
}
.law-item .law-title.data-v-2575db11 {
line-height: 1.5;
margin-bottom: 8rpx;
font-weight: bold;
}
.law-item .law-basis.data-v-2575db11 {
font-size: 24rpx;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.law-item-active.data-v-2575db11 {
border-color: #2667e9;
background: #f0f6ff;
}
.law-popup-footer.data-v-2575db11 {
display: flex;
padding: 30rpx;
border-top: 1rpx solid #eee;
gap: 20rpx;
}
.law-popup-footer button.data-v-2575db11 {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
border-radius: 40rpx;
}
.law-popup-footer button.data-v-2575db11::after {
border: none;
}
.law-popup-footer .btn-cancel.data-v-2575db11 {
background: #f5f5f5;
color: #666;
}
.law-popup-footer .btn-confirm.data-v-2575db11 {
background: #2667e9;
color: #fff;
}

View File

@@ -1,24 +1,14 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
const request_three_one_api_area = require("../../request/three_one_api/area.js");
const utils_upload = require("../../utils/upload.js");
const components_hazard_hazardForm = require("./hazardForm.js");
if (!Array) {
const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload");
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_upload2 + _easycom_up_input2 + _easycom_up_textarea2 + _easycom_u_popup2)();
_easycom_u_popup2();
}
const _easycom_up_upload = () => "../../uni_modules/uview-plus/components/u-upload/u-upload.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_upload + _easycom_up_input + _easycom_up_textarea + _easycom_u_popup)();
(HazardFormPanel + _easycom_u_popup)();
}
const LOCATION_PICKER_DRAFT_KEY = "hazard_form_location_picker_draft";
const HazardFormPanel = () => "./HazardFormPanel.js";
const _sfc_main = {
__name: "HazardFormPopup",
props: {
@@ -63,595 +53,63 @@ const _sfc_main = {
get: () => props.show,
set: (value) => emit("update:show", value)
});
const isApiSuccess = (res) => Number(res == null ? void 0 : res.code) === 0 || Number(res == null ? void 0 : res.code) === 200;
const bodyStyle = common_vendor.computed(() => props.bodyHeight ? { height: props.bodyHeight } : {});
const canvasWidth = common_vendor.ref(300);
const canvasHeight = common_vendor.ref(300);
const submitting = common_vendor.ref(false);
const aiAnalyzing = common_vendor.ref(false);
const syncingFromParent = common_vendor.ref(false);
const formData = common_vendor.reactive({
title: "",
level: 0,
source: 0,
description: "",
tagIndex: 0,
tagId: null,
regulationId: null,
regulationName: ""
});
const address = common_vendor.ref("");
const lng = common_vendor.ref(0);
const lat = common_vendor.ref(0);
const areaId = common_vendor.ref("");
const areaName = common_vendor.ref("");
const fileList = common_vendor.ref([]);
const tagOptions = common_vendor.ref([]);
const showLawPopup = common_vendor.ref(false);
const lawKeyword = common_vendor.ref("");
const selectedLawId = common_vendor.ref(null);
const selectedLawName = common_vendor.ref("");
const lawList = common_vendor.ref([]);
const lawLoading = common_vendor.ref(false);
const lawPageNum = common_vendor.ref(1);
const lawPageSize = common_vendor.ref(10);
const hasMoreLaw = common_vendor.ref(true);
const showAreaPicker = common_vendor.ref(false);
const areaList = common_vendor.ref([]);
const tempAreaId = common_vendor.ref("");
const choosingLocation = common_vendor.ref(false);
const suppressModelEmit = common_vendor.ref(false);
const uploadInstance = common_vendor.getCurrentInstance();
const { afterRead, deletePic } = utils_upload.createUploadListHandlers(fileList, {
watermark: {
canvasId: props.canvasId,
canvasWidthRef: canvasWidth,
canvasHeightRef: canvasHeight,
instance: uploadInstance
}
});
function getPayload() {
syncTagIdFromIndex();
return {
formData: {
title: formData.title,
level: formData.level,
source: formData.source,
description: formData.description,
tagIndex: formData.tagIndex,
tagId: formData.tagId,
regulationId: formData.regulationId,
regulationName: formData.regulationName
},
address: address.value,
lng: lng.value,
lat: lat.value,
areaId: areaId.value,
areaName: areaName.value,
fileList: fileList.value,
tagOptions: tagOptions.value
};
}
function applyPayload(payload) {
if (!payload)
return;
syncingFromParent.value = true;
const data = payload.formData || {};
formData.title = data.title || "";
formData.level = data.level ?? 0;
formData.source = data.source ?? 0;
formData.description = data.description || "";
formData.tagIndex = data.tagIndex ?? 0;
formData.tagId = data.tagId ?? null;
formData.regulationId = data.regulationId ?? null;
formData.regulationName = data.regulationName || "";
address.value = payload.address || "";
lng.value = payload.lng || 0;
lat.value = payload.lat || 0;
areaId.value = payload.areaId || "";
areaName.value = payload.areaName || "";
fileList.value = payload.fileList ? [...payload.fileList] : [];
selectedLawId.value = data.regulationId ?? null;
selectedLawName.value = data.regulationName || "";
syncingFromParent.value = false;
}
function hasPayloadContent(payload) {
if (!payload)
return false;
const data = payload.formData || {};
const files = payload.fileList || [];
return !!(data.title || data.description || data.regulationName || payload.address || files.length > 0);
}
function getLocationPickerDraftKey() {
var _a;
return ((_a = props.extraParams) == null ? void 0 : _a.locationDraftKey) || LOCATION_PICKER_DRAFT_KEY;
}
function saveLocationPickerDraft() {
const snapshot = getPayload();
try {
common_vendor.index.setStorageSync(getLocationPickerDraftKey(), snapshot);
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:400", "保存选点草稿失败:", error);
}
return snapshot;
}
function loadLocationPickerDraft() {
try {
const draft = common_vendor.index.getStorageSync(getLocationPickerDraftKey());
return draft && typeof draft === "object" ? draft : null;
} catch (error) {
return null;
}
}
function clearLocationPickerDraft() {
try {
common_vendor.index.removeStorageSync(getLocationPickerDraftKey());
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:418", "清除选点草稿失败:", error);
}
}
function restoreAfterLocationPicker(patch = {}) {
const draft = loadLocationPickerDraft();
if (!draft)
return false;
applyPayload({
...draft,
...patch,
formData: {
...draft.formData || {},
...patch.formData || {}
},
fileList: patch.fileList ?? draft.fileList ?? []
});
clearLocationPickerDraft();
return true;
}
function reopenPopupAfterLocation() {
common_vendor.nextTick$1(() => {
choosingLocation.value = false;
popupVisible.value = true;
emitModelValue();
});
}
function resetForm() {
applyPayload(components_hazard_hazardForm.createEmptyHazardPayload());
selectedLawId.value = null;
selectedLawName.value = "";
tempAreaId.value = "";
clearLocationPickerDraft();
}
function syncTagIdFromIndex() {
const selectedTag = tagOptions.value[formData.tagIndex];
formData.tagId = (selectedTag == null ? void 0 : selectedTag.id) ?? formData.tagId ?? null;
}
function onChooseSelect(field, index) {
formData[field] = Number(index);
if (field === "tagIndex") {
syncTagIdFromIndex();
}
emitModelValue();
}
function emitModelValue() {
if (suppressModelEmit.value || syncingFromParent.value || props.modelValue === null)
return;
if (props.mode === "collect" || props.mode === "direct")
return;
emit("update:modelValue", getPayload());
}
function closePopup() {
const panelProps = common_vendor.computed(() => ({
title: props.title,
mode: props.mode,
modelValue: props.modelValue,
extraParams: props.extraParams,
showDraftBanner: props.showDraftBanner,
bodyHeight: props.bodyHeight,
canvasId: props.canvasId
}));
const handlePopupClose = () => {
popupVisible.value = false;
}
function handleClose() {
closePopup();
}
function validateForm() {
if (fileList.value.length === 0) {
common_vendor.index.showToast({ title: "请上传隐患图片", icon: "none" });
return false;
}
if (!formData.title) {
common_vendor.index.showToast({ title: "请输入隐患标题", icon: "none" });
return false;
}
if (!address.value) {
common_vendor.index.showToast({ title: "请输入隐患位置", icon: "none" });
return false;
}
if (!formData.description) {
common_vendor.index.showToast({ title: "请输入隐患描述", icon: "none" });
return false;
}
return true;
}
async function handleConfirm() {
if (!validateForm())
return;
const payload = getPayload();
if (props.mode === "collect") {
if (props.modelValue !== null) {
emit("update:modelValue", payload);
}
emit("confirm", payload);
closePopup();
common_vendor.index.showToast({ title: "隐患信息已暂存", icon: "success" });
return;
}
submitting.value = true;
try {
const params = components_hazard_hazardForm.buildHiddenDangerParams(payload, props.extraParams);
const res = await request_api.addHiddenDanger(params);
if (isApiSuccess(res)) {
suppressModelEmit.value = true;
closePopup();
emit("success", { ...payload, hazardId: res.data });
await common_vendor.nextTick$1();
resetForm();
common_vendor.index.showToast({ title: res.msg || "新增成功", icon: "success" });
} else {
common_vendor.index.showToast({ title: res.msg || "新增失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:534", error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
} finally {
suppressModelEmit.value = false;
submitting.value = false;
}
}
function openLawPopup() {
showLawPopup.value = true;
if (lawList.value.length === 0) {
fetchRegulationList();
}
}
async function fetchRegulationList(isLoadMore = false) {
var _a;
if (lawLoading.value)
return;
lawLoading.value = true;
try {
const params = {
pageNum: lawPageNum.value,
pageSize: lawPageSize.value,
status: 1
};
if ((_a = lawKeyword.value) == null ? void 0 : _a.trim()) {
params.keyword = lawKeyword.value.trim();
}
const res = await request_api.getRegulationList(params);
if (res.code === 0) {
const records = res.data.records || res.data || [];
lawList.value = isLoadMore ? [...lawList.value, ...records] : records;
const total = res.data.total || 0;
hasMoreLaw.value = lawList.value.length < total;
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:569", "获取法规列表失败:", error);
} finally {
lawLoading.value = false;
}
}
function searchRegulation() {
lawPageNum.value = 1;
lawList.value = [];
hasMoreLaw.value = true;
fetchRegulationList();
}
function loadMoreLaw() {
if (!hasMoreLaw.value || lawLoading.value)
return;
lawPageNum.value++;
fetchRegulationList(true);
}
function selectLaw(item) {
selectedLawId.value = item.id;
selectedLawName.value = item.depict || item.keyword || "";
}
function confirmLaw() {
if (selectedLawId.value) {
formData.regulationId = selectedLawId.value;
formData.regulationName = selectedLawName.value;
}
showLawPopup.value = false;
emitModelValue();
}
function openAreaPicker() {
tempAreaId.value = areaId.value;
showAreaPicker.value = true;
}
async function fetchAreaList() {
var _a;
try {
const res = await request_three_one_api_area.getAreaList();
if (res.code === 0 && ((_a = res.data) == null ? void 0 : _a.records)) {
areaList.value = res.data.records;
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:614", "获取区域列表失败:", error);
}
}
function confirmAreaSelect() {
if (tempAreaId.value) {
areaId.value = tempAreaId.value;
const selected = areaList.value.find((item) => item.id === tempAreaId.value);
areaName.value = selected ? selected.name : "";
}
showAreaPicker.value = false;
emitModelValue();
}
function chooseLocation() {
choosingLocation.value = true;
saveLocationPickerDraft();
closePopup();
setTimeout(() => {
common_vendor.index.getLocation({
type: "gcj02",
success: (locationRes) => {
openChooseLocation(locationRes.latitude, locationRes.longitude);
},
fail: () => {
openChooseLocation();
}
});
}, 300);
}
function openChooseLocation(latitude, longitude) {
const options = {};
if (latitude != null && longitude != null) {
options.latitude = latitude;
options.longitude = longitude;
}
common_vendor.index.chooseLocation({
...options,
success: (res) => {
restoreAfterLocationPicker({
address: res.address + (res.name ? `(${res.name})` : ""),
lng: res.longitude,
lat: res.latitude
});
reopenPopupAfterLocation();
},
fail: (err) => {
restoreAfterLocationPicker();
reopenPopupAfterLocation();
if (err.errMsg && err.errMsg.indexOf("cancel") === -1) {
common_vendor.index.showToast({ title: "选择位置失败", icon: "none" });
}
}
});
}
async function handleAiAnalyze() {
const imageFiles = fileList.value.filter((f) => {
return f.status === "success" && f.url.toLowerCase().match(/\.(jpg|jpeg|png|gif|bmp|webp)$/);
});
if (imageFiles.length === 0) {
common_vendor.index.showToast({ title: "请先上传隐患图片", icon: "none" });
return;
}
aiAnalyzing.value = true;
try {
const analyzeRes = await request_api.analyzeHazardImage({ imageUrl: imageFiles[0].url });
if (analyzeRes.code === 0 && analyzeRes.data) {
const aiData = analyzeRes.data;
if (aiData.title)
formData.title = aiData.title;
if (aiData.description)
formData.description = aiData.description;
if (aiData.level) {
const levelIndex = components_hazard_hazardForm.AI_LEVEL_MAP[aiData.level];
if (levelIndex !== void 0) {
formData.level = levelIndex;
}
}
emitModelValue();
common_vendor.index.showToast({ title: "AI分析完成已自动填充", icon: "success", duration: 2e3 });
} else {
common_vendor.index.showToast({ title: analyzeRes.msg || "AI分析失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:699", "AI分析接口调用失败:", error);
common_vendor.index.showToast({ title: "AI分析失败请重试", icon: "none" });
} finally {
aiAnalyzing.value = false;
}
}
async function fetchTagOptions() {
try {
const res = await request_api.getHiddenDangerLabelList();
if (res.code === 0) {
tagOptions.value = res.data.map((item) => ({
id: item.id,
title: item.name
}));
syncTagIdFromIndex();
}
} catch (error) {
common_vendor.index.__f__("error", "at components/hazard/HazardFormPopup.vue:717", "获取标签列表失败:", error);
}
}
common_vendor.watch(
() => props.modelValue,
(val) => {
if (props.mode === "direct")
return;
if (hasPayloadContent(val)) {
applyPayload(val);
}
},
{ deep: true, immediate: true }
);
common_vendor.watch(
() => props.show,
(val) => {
if (val && areaList.value.length === 0) {
fetchAreaList();
}
if (!val)
return;
if (choosingLocation.value) {
return;
}
const locationDraft = loadLocationPickerDraft();
if (locationDraft) {
applyPayload(locationDraft);
clearLocationPickerDraft();
return;
}
if (hasPayloadContent(props.modelValue)) {
applyPayload(props.modelValue);
}
}
);
fetchTagOptions();
fetchAreaList();
};
const panelRef = common_vendor.ref(null);
__expose({
getPayload,
applyPayload,
resetForm,
validateForm
getPayload: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.getPayload) == null ? void 0 : _b.call(_a, ...args);
},
applyPayload: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.applyPayload) == null ? void 0 : _b.call(_a, ...args);
},
resetForm: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.resetForm) == null ? void 0 : _b.call(_a, ...args);
},
validateForm: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.validateForm) == null ? void 0 : _b.call(_a, ...args);
}
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.t(__props.title),
b: common_vendor.o(handleClose),
c: __props.showDraftBanner
}, __props.showDraftBanner ? {
d: common_vendor.o(($event) => emit("clear-draft"))
} : {}, {
e: common_vendor.f(common_vendor.unref(components_hazard_hazardForm.SOURCE_OPTIONS), (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.id,
c: formData.source === index ? 1 : "",
d: common_vendor.o(($event) => onChooseSelect("source", index), item.id)
};
return {
a: common_vendor.sr(panelRef, "52d033ec-1,52d033ec-0", {
"k": "panelRef"
}),
f: common_vendor.o(common_vendor.unref(afterRead)),
g: common_vendor.o(common_vendor.unref(deletePic)),
h: common_vendor.p({
fileList: fileList.value,
name: "1",
multiple: true,
imageMode: "aspectFill",
maxCount: 10
b: common_vendor.o(($event) => popupVisible.value = $event),
c: common_vendor.o((payload) => emit("success", payload)),
d: common_vendor.o((payload) => emit("confirm", payload)),
e: common_vendor.o(($event) => emit("clear-draft")),
f: common_vendor.o(($event) => popupVisible.value = false),
g: common_vendor.p({
...panelProps.value,
show: popupVisible.value
}),
i: __props.canvasId,
j: canvasWidth.value,
k: canvasHeight.value,
l: canvasWidth.value + "px",
m: canvasHeight.value + "px",
n: !aiAnalyzing.value
}, !aiAnalyzing.value ? {} : {}, {
o: common_vendor.t(aiAnalyzing.value ? "AI识别中..." : "AI 识别隐患"),
p: aiAnalyzing.value,
q: aiAnalyzing.value,
r: common_vendor.o(handleAiAnalyze),
s: common_vendor.o(($event) => formData.title = $event),
t: common_vendor.p({
placeholder: "请输入内容",
border: "surround",
modelValue: formData.title
}),
v: common_vendor.f(common_vendor.unref(components_hazard_hazardForm.LEVEL_OPTIONS), (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.id,
c: formData.level === index ? 1 : "",
d: common_vendor.o(($event) => onChooseSelect("level", index), item.id)
};
}),
w: common_vendor.o(($event) => address.value = $event),
x: common_vendor.p({
placeholder: "请输入地址",
border: "surround",
modelValue: address.value
}),
y: common_vendor.o(chooseLocation),
z: common_vendor.t(formData.regulationName || "请选择法律依据"),
A: !formData.regulationName ? 1 : "",
B: common_vendor.o(openLawPopup),
C: common_vendor.t(areaName.value || "请选择隐患区域"),
D: !areaName.value ? 1 : "",
E: common_vendor.o(openAreaPicker),
F: common_vendor.o(($event) => formData.description = $event),
G: common_vendor.p({
placeholder: "请输入内容",
modelValue: formData.description
}),
H: common_vendor.f(tagOptions.value, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.id,
c: formData.tagIndex === index ? 1 : "",
d: common_vendor.o(($event) => onChooseSelect("tagIndex", index), item.id)
};
}),
I: common_vendor.s(bodyStyle.value),
J: common_vendor.o(handleClose),
K: submitting.value,
L: common_vendor.o(handleConfirm),
M: common_vendor.o(handleClose),
N: common_vendor.o(($event) => popupVisible.value = $event),
O: common_vendor.p({
h: common_vendor.o(handlePopupClose),
i: common_vendor.o(($event) => popupVisible.value = $event),
j: common_vendor.p({
mode: "center",
round: "20",
["safe-area-inset-bottom"]: false,
show: popupVisible.value
}),
P: common_vendor.o(($event) => showLawPopup.value = false),
Q: common_vendor.o(searchRegulation),
R: lawKeyword.value,
S: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
T: common_vendor.o(searchRegulation),
U: lawLoading.value && lawList.value.length === 0
}, lawLoading.value && lawList.value.length === 0 ? {} : !lawLoading.value && lawList.value.length === 0 ? {} : common_vendor.e({
W: common_vendor.f(lawList.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.depict),
b: common_vendor.t(item.legalBasis),
c: selectedLawId.value === item.id ? 1 : "",
d: item.id,
e: common_vendor.o(($event) => selectLaw(item), item.id)
};
}),
X: lawLoading.value
}, lawLoading.value ? {} : {}), {
V: !lawLoading.value && lawList.value.length === 0,
Y: common_vendor.o(loadMoreLaw),
Z: common_vendor.o(($event) => showLawPopup.value = false),
aa: common_vendor.o(confirmLaw),
ab: common_vendor.o(($event) => showLawPopup.value = false),
ac: common_vendor.p({
show: showLawPopup.value,
mode: "center",
round: "20",
["safe-area-inset-bottom"]: false
}),
ad: common_vendor.o(($event) => showAreaPicker.value = false),
ae: common_vendor.o(confirmAreaSelect),
af: common_vendor.f(areaList.value, (item, k0, i0) => {
return common_vendor.e({
a: item.color,
b: common_vendor.t(item.name),
c: tempAreaId.value === item.id
}, tempAreaId.value === item.id ? {} : {}, {
d: item.id,
e: tempAreaId.value === item.id ? 1 : "",
f: common_vendor.o(($event) => tempAreaId.value = item.id, item.id)
});
}),
ag: areaList.value.length === 0
}, areaList.value.length === 0 ? {} : {}, {
ah: common_vendor.o(($event) => showAreaPicker.value = false),
ai: common_vendor.p({
show: showAreaPicker.value,
mode: "bottom",
round: "20"
})
});
k: common_vendor.gei(_ctx, "")
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fd540320"]]);
wx.createComponent(Component);
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/hazard/HazardFormPopup.js.map

View File

@@ -1,9 +1,7 @@
{
"component": true,
"usingComponents": {
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
"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"
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
"hazard-form-panel": "./HazardFormPanel"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,373 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* uni.scss */
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.popup-content.data-v-fd540320 {
width: 600rpx;
background: #fff;
border-radius: 20rpx;
overflow: hidden;
}
.popup-header.data-v-fd540320 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.popup-header .popup-title.data-v-fd540320 {
font-size: 32rpx;
color: #333;
}
.popup-header .popup-close.data-v-fd540320 {
font-size: 40rpx;
color: #999;
line-height: 1;
}
.popup-body.data-v-fd540320 {
padding: 30rpx;
max-height: 900rpx;
overflow-y: auto;
}
.draft-banner.data-v-fd540320 {
font-size: 24rpx;
background-color: #fff7eb;
border: 1rpx solid #ffe4cc;
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
padding: 16rpx 20rpx;
border-radius: 8rpx;
color: #fa8c16;
}
.draft-banner-left.data-v-fd540320 {
display: flex;
flex-direction: row;
align-items: center;
}
.draft-banner-icon.data-v-fd540320 {
margin-right: 10rpx;
}
.draft-banner-action.data-v-fd540320 {
cursor: pointer;
padding: 0 10rpx;
color: #2667e9;
font-weight: bold;
}
.hazard-choose-scroll.data-v-fd540320 {
width: 100%;
white-space: nowrap;
}
.hazard-choose-row.data-v-fd540320 {
display: inline-flex;
flex-direction: row;
align-items: center;
padding-right: 20rpx;
}
.hazard-choose-wrap.data-v-fd540320 {
display: flex;
flex-wrap: wrap;
}
.hazard-choose-tag.data-v-fd540320 {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
background: #fff;
flex-shrink: 0;
margin-right: 12rpx;
}
.hazard-choose-tag--source.data-v-fd540320 {
width: 152rpx;
height: 64rpx;
}
.hazard-choose-tag--level.data-v-fd540320 {
width: 183rpx;
height: 72rpx;
}
.hazard-choose-tag--tag.data-v-fd540320 {
min-width: 120rpx;
height: 64rpx;
padding: 0 24rpx;
margin-bottom: 12rpx;
}
.hazard-choose-tag--active.data-v-fd540320 {
background: #2667e9;
border-color: #2667e9;
}
.hazard-choose-tag--active .hazard-choose-tag__text.data-v-fd540320 {
color: #fff;
}
.hazard-choose-tag__text.data-v-fd540320 {
font-size: 24rpx;
line-height: 1.2;
color: #606266;
text-align: center;
}
.ai-btn-wrapper.data-v-fd540320 {
display: flex;
justify-content: flex-end;
}
.ai-analyze-btn.data-v-fd540320 {
display: flex;
align-items: center;
justify-content: center;
height: 72rpx;
padding: 0 32rpx;
font-size: 28rpx;
color: #fff;
background: linear-gradient(135deg, #4facfe 0%, #2668ea 100%);
border-radius: 36rpx;
border: none;
}
.ai-analyze-btn.data-v-fd540320::after {
border: none;
}
.ai-analyze-btn .ai-btn-icon.data-v-fd540320 {
margin-right: 8rpx;
font-size: 30rpx;
}
.ai-analyze-btn[disabled].data-v-fd540320 {
opacity: 0.7;
}
.popup-footer.data-v-fd540320 {
display: flex;
border-top: 1rpx solid #eee;
}
.popup-footer button.data-v-fd540320 {
flex: 1;
height: 90rpx;
line-height: 90rpx;
border-radius: 0;
font-size: 30rpx;
}
.popup-footer button.data-v-fd540320::after {
border: none;
}
.popup-footer .btn-cancel.data-v-fd540320 {
background: #fff;
color: #666;
}
.popup-footer .btn-confirm.data-v-fd540320 {
color: #fff;
}
.address-box.data-v-fd540320 {
display: flex;
align-items: center;
gap: 20rpx;
}
.address-box .address-input-wrapper.data-v-fd540320 {
flex: 1;
}
.address-box .btn-address.data-v-fd540320 {
flex-shrink: 0;
height: 70rpx;
line-height: 70rpx;
padding: 0 30rpx;
font-size: 26rpx;
border-radius: 8rpx;
color: #fff;
}
.address-box .btn-address.data-v-fd540320::after {
border: none;
}
.select-trigger.data-v-fd540320 {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
}
.select-trigger .select-value.data-v-fd540320 {
flex: 1;
font-size: 28rpx;
color: #333;
}
.select-trigger .select-value.placeholder.data-v-fd540320 {
color: #c0c4cc;
}
.picker-popup.data-v-fd540320 {
background: #fff;
}
.picker-popup .picker-header.data-v-fd540320 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.picker-popup .picker-header .picker-cancel.data-v-fd540320 {
font-size: 28rpx;
color: #999;
}
.picker-popup .picker-header .picker-title.data-v-fd540320 {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.picker-popup .picker-header .picker-confirm.data-v-fd540320 {
font-size: 28rpx;
color: #2667e9;
}
.picker-popup .picker-body.data-v-fd540320 {
max-height: 600rpx;
padding: 0 30rpx;
}
.picker-popup .picker-item.data-v-fd540320 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 30rpx;
color: #333;
}
.picker-popup .picker-item.data-v-fd540320:last-child {
border-bottom: none;
}
.picker-popup .picker-item.picker-item-active.data-v-fd540320 {
color: #2667e9;
}
.area-color-dot.data-v-fd540320 {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
margin-right: 16rpx;
}
.law-popup.data-v-fd540320 {
width: 600rpx;
background: #fff;
border-radius: 20rpx;
overflow: hidden;
max-height: 80vh;
}
.law-popup .popup-header.data-v-fd540320 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.law-popup .popup-header .popup-title.data-v-fd540320 {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.law-popup .popup-header .popup-close.data-v-fd540320 {
font-size: 40rpx;
color: #999;
}
.search-box.data-v-fd540320 {
display: flex;
align-items: center;
background: #f5f5f5;
border-radius: 40rpx;
padding: 16rpx 24rpx;
margin: 20rpx 30rpx;
}
.search-box .search-icon.data-v-fd540320 {
font-size: 28rpx;
color: #999;
margin-right: 12rpx;
}
.search-box .search-input.data-v-fd540320 {
flex: 1;
font-size: 28rpx;
background: transparent;
border: none;
}
.search-box .search-btn.data-v-fd540320 {
color: #2667e9;
font-size: 26rpx;
margin-left: 16rpx;
}
.loading-tip.data-v-fd540320,
.empty-tip.data-v-fd540320 {
text-align: center;
padding: 40rpx;
color: #999;
font-size: 26rpx;
}
.law-list.data-v-fd540320 {
max-height: 400rpx;
padding: 0 30rpx;
}
.law-item.data-v-fd540320 {
padding: 24rpx;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
margin-bottom: 16rpx;
font-size: 28rpx;
color: #333;
}
.law-item .law-title.data-v-fd540320 {
line-height: 1.5;
margin-bottom: 8rpx;
font-weight: bold;
}
.law-item .law-basis.data-v-fd540320 {
font-size: 24rpx;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.law-item-active.data-v-fd540320 {
border-color: #2667e9;
background: #f0f6ff;
}
.law-popup-footer.data-v-fd540320 {
display: flex;
padding: 30rpx;
border-top: 1rpx solid #eee;
gap: 20rpx;
}
.law-popup-footer button.data-v-fd540320 {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
border-radius: 40rpx;
}
.law-popup-footer button.data-v-fd540320::after {
border: none;
}
.law-popup-footer .btn-cancel.data-v-fd540320 {
background: #f5f5f5;
color: #666;
}
.law-popup-footer .btn-confirm.data-v-fd540320 {
background: #2667e9;
color: #fff;
}

View File

@@ -24,6 +24,8 @@ function createEmptyHazardPayload() {
title: "",
level: 0,
source: 0,
hazardSourceCode: null,
hazardSourceName: "",
description: "",
tagIndex: 0,
tagId: null,
@@ -52,6 +54,7 @@ function buildHiddenDangerParams(payload, extra = {}) {
areaId: areaId || null,
description: formData.description || "",
source: ((_c = SOURCE_OPTIONS[formData.source]) == null ? void 0 : _c.title) || "",
hazardSource: formData.hazardSourceCode ?? null,
tagId,
attachments: (fileList || []).filter((f) => f.status === "success").map((file) => utils_upload.buildAttachmentItem(file)),
regulationId: formData.regulationId || null,
@@ -64,10 +67,18 @@ function hasValidHazardPayload(payload) {
const { formData, fileList } = payload;
return !!((formData == null ? void 0 : formData.title) && (fileList == null ? void 0 : fileList.length) > 0);
}
function hasHazardFormContent(payload) {
if (!payload)
return false;
const data = payload.formData || {};
const files = payload.fileList || [];
return !!(data.title || data.description || data.regulationName || data.regulationId || data.hazardSourceCode != null || data.hazardSourceName || payload.address || payload.areaId || payload.areaName || files.length > 0);
}
exports.AI_LEVEL_MAP = AI_LEVEL_MAP;
exports.LEVEL_OPTIONS = LEVEL_OPTIONS;
exports.SOURCE_OPTIONS = SOURCE_OPTIONS;
exports.buildHiddenDangerParams = buildHiddenDangerParams;
exports.createEmptyHazardPayload = createEmptyHazardPayload;
exports.hasHazardFormContent = hasHazardFormContent;
exports.hasValidHazardPayload = hasValidHazardPayload;
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/hazard/hazardForm.js.map

View File

@@ -101,21 +101,23 @@ const _sfc_main = {
c: common_vendor.t(item.time),
d: item.type === "submit"
}, item.type === "submit" ? common_vendor.e({
e: common_vendor.t(item.content.title),
f: common_vendor.t(item.content.source),
g: item.content.areaColor
e: common_vendor.t(item.content.code),
f: common_vendor.t(item.content.title),
g: common_vendor.t(item.content.source),
h: common_vendor.t(item.content.hazardSourceName),
i: item.content.areaColor
}, item.content.areaColor ? {
h: item.content.areaColor
j: item.content.areaColor
} : {}, {
i: common_vendor.t(item.content.areaName),
j: common_vendor.t(item.content.address),
k: common_vendor.t(item.content.levelName || "-"),
l: common_vendor.n(getLevelTagClass(item.content)),
m: common_vendor.t(item.content.tagName),
n: common_vendor.t(item.content.description),
o: item.content.attachments && item.content.attachments.length
k: common_vendor.t(item.content.areaName),
l: common_vendor.t(item.content.address),
m: common_vendor.t(item.content.levelName || "-"),
n: common_vendor.n(getLevelTagClass(item.content)),
o: common_vendor.t(item.content.tagName),
p: common_vendor.t(item.content.description),
q: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
p: common_vendor.f(item.content.attachments, (file, idx, i1) => {
r: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return {
a: idx,
b: resolveFileUrl(file.filePath),
@@ -124,24 +126,24 @@ const _sfc_main = {
};
})
} : {}, {
q: common_vendor.t(item.content.legalBasis)
s: common_vendor.t(item.content.legalBasis)
}) : item.type === "assign" ? {
s: common_vendor.t(item.content.assigneeName),
t: common_vendor.t(item.content.deadline)
v: common_vendor.t(item.content.assigneeName),
w: common_vendor.t(item.content.deadline)
} : item.type === "rectify" ? common_vendor.e({
w: common_vendor.t(item.content.rectifyStatusName),
x: common_vendor.t(item.content.rectifyPlan),
y: common_vendor.t(item.content.rectifyResult),
z: common_vendor.t(item.content.rectificationMeasures),
A: common_vendor.t(item.content.controlMeasures),
B: common_vendor.t(item.content.deadline),
C: common_vendor.t(item.content.rectifierNames),
D: common_vendor.t(item.content.managerNames),
E: common_vendor.t(formatCost(item.content.planCost)),
F: common_vendor.t(formatCost(item.content.actualCost)),
G: item.content.attachments && item.content.attachments.length
y: common_vendor.t(item.content.rectifyStatusName),
z: common_vendor.t(item.content.rectifyPlan),
A: common_vendor.t(item.content.rectifyResult),
B: common_vendor.t(item.content.rectificationMeasures),
C: common_vendor.t(item.content.controlMeasures),
D: common_vendor.t(item.content.deadline),
E: common_vendor.t(item.content.rectifierNames),
F: common_vendor.t(item.content.managerNames),
G: common_vendor.t(formatCost(item.content.planCost)),
H: common_vendor.t(formatCost(item.content.actualCost)),
I: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
H: common_vendor.f(item.content.attachments, (file, idx, i1) => {
J: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return common_vendor.e({
a: file.fileType === "image"
}, file.fileType === "image" ? {
@@ -155,21 +157,21 @@ const _sfc_main = {
});
})
} : {}, {
I: item.content.signPath
K: item.content.signPath
}, item.content.signPath ? {
J: resolveFileUrl(item.content.signPath),
K: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
L: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
L: resolveFileUrl(item.content.signPath),
M: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
N: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
} : {}) : item.type === "verify" ? common_vendor.e({
N: common_vendor.t(item.content.resultName),
O: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
P: item.content.remark
P: common_vendor.t(item.content.resultName),
Q: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
R: item.content.remark
}, item.content.remark ? {
Q: common_vendor.t(item.content.remark)
S: common_vendor.t(item.content.remark)
} : {}, {
R: item.content.attachments && item.content.attachments.length
T: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
S: common_vendor.f(item.content.attachments, (file, idx, i1) => {
U: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return common_vendor.e({
a: file.fileType === "image"
}, file.fileType === "image" ? {
@@ -183,21 +185,21 @@ const _sfc_main = {
});
})
} : {}, {
T: item.content.signPath
V: item.content.signPath
}, item.content.signPath ? {
U: resolveFileUrl(item.content.signPath),
V: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
W: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
W: resolveFileUrl(item.content.signPath),
X: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
Y: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
} : {}) : item.type === "writeoff" ? common_vendor.e({
Y: common_vendor.t(item.content.resultName),
Z: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
aa: item.content.remark
aa: common_vendor.t(item.content.resultName),
ab: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
ac: item.content.remark
}, item.content.remark ? {
ab: common_vendor.t(item.content.remark)
ad: common_vendor.t(item.content.remark)
} : {}, {
ac: item.content.attachments && item.content.attachments.length
ae: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
ad: common_vendor.f(item.content.attachments, (file, idx, i1) => {
af: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return common_vendor.e({
a: file.fileType === "image"
}, file.fileType === "image" ? {
@@ -211,19 +213,19 @@ const _sfc_main = {
});
})
} : {}, {
ae: item.content.signPath
ag: item.content.signPath
}, item.content.signPath ? {
af: resolveFileUrl(item.content.signPath),
ag: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
ah: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
ah: resolveFileUrl(item.content.signPath),
ai: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
aj: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
} : {}) : {}, {
r: item.type === "assign",
v: item.type === "rectify",
M: item.type === "verify",
X: item.type === "writeoff",
ai: "node-" + index,
aj: "hazard-node-" + index,
ak: index === common_vendor.unref(historyList).length - 1 ? 1 : ""
t: item.type === "assign",
x: item.type === "rectify",
O: item.type === "verify",
Z: item.type === "writeoff",
ak: "node-" + index,
al: "hazard-node-" + index,
am: index === common_vendor.unref(historyList).length - 1 ? 1 : ""
});
}),
j: common_vendor.unref(contentScrollIntoView),

File diff suppressed because one or more lines are too long

View File

@@ -122,21 +122,23 @@ const _sfc_main = {
} : {}, {
g: item.type === "submit"
}, item.type === "submit" ? common_vendor.e({
h: common_vendor.t(item.content.title),
i: common_vendor.t(item.content.source),
j: item.content.areaColor
h: common_vendor.t(item.content.code),
i: common_vendor.t(item.content.title),
j: common_vendor.t(item.content.source),
k: common_vendor.t(item.content.hazardSourceName),
l: item.content.areaColor
}, item.content.areaColor ? {
k: item.content.areaColor
m: item.content.areaColor
} : {}, {
l: common_vendor.t(item.content.areaName),
m: common_vendor.t(item.content.address),
n: common_vendor.t(item.content.levelName || "-"),
o: common_vendor.n(getLevelTagClass(item.content)),
p: common_vendor.t(item.content.tagName),
q: common_vendor.t(item.content.description),
r: item.content.attachments && item.content.attachments.length
n: common_vendor.t(item.content.areaName),
o: common_vendor.t(item.content.address),
p: common_vendor.t(item.content.levelName || "-"),
q: common_vendor.n(getLevelTagClass(item.content)),
r: common_vendor.t(item.content.tagName),
s: common_vendor.t(item.content.description),
t: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
s: common_vendor.f(item.content.attachments, (file, idx, i1) => {
v: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return {
a: idx,
b: resolveFileUrl(file.filePath),
@@ -145,24 +147,24 @@ const _sfc_main = {
};
})
} : {}, {
t: common_vendor.t(item.content.legalBasis)
w: common_vendor.t(item.content.legalBasis)
}) : item.type === "assign" ? {
w: common_vendor.t(item.content.assigneeName),
x: common_vendor.t(item.content.deadline)
y: common_vendor.t(item.content.assigneeName),
z: common_vendor.t(item.content.deadline)
} : item.type === "rectify" ? common_vendor.e({
z: common_vendor.t(item.content.rectifyStatusName),
A: common_vendor.t(item.content.rectifyPlan),
B: common_vendor.t(item.content.rectifyResult),
C: common_vendor.t(item.content.rectificationMeasures),
D: common_vendor.t(item.content.controlMeasures),
E: common_vendor.t(item.content.deadline),
F: common_vendor.t(item.content.rectifierNames),
G: common_vendor.t(item.content.managerNames),
H: common_vendor.t(formatCost(item.content.planCost)),
I: common_vendor.t(formatCost(item.content.actualCost)),
J: item.content.attachments && item.content.attachments.length
B: common_vendor.t(item.content.rectifyStatusName),
C: common_vendor.t(item.content.rectifyPlan),
D: common_vendor.t(item.content.rectifyResult),
E: common_vendor.t(item.content.rectificationMeasures),
F: common_vendor.t(item.content.controlMeasures),
G: common_vendor.t(item.content.deadline),
H: common_vendor.t(item.content.rectifierNames),
I: common_vendor.t(item.content.managerNames),
J: common_vendor.t(formatCost(item.content.planCost)),
K: common_vendor.t(formatCost(item.content.actualCost)),
L: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
K: common_vendor.f(item.content.attachments, (file, idx, i1) => {
M: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return common_vendor.e({
a: file.fileType === "image"
}, file.fileType === "image" ? {
@@ -176,21 +178,21 @@ const _sfc_main = {
});
})
} : {}, {
L: item.content.signPath
N: item.content.signPath
}, item.content.signPath ? {
M: resolveFileUrl(item.content.signPath),
N: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
O: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
O: resolveFileUrl(item.content.signPath),
P: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
Q: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
} : {}) : item.type === "verify" ? common_vendor.e({
Q: common_vendor.t(item.content.resultName),
R: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
S: item.content.remark
S: common_vendor.t(item.content.resultName),
T: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
U: item.content.remark
}, item.content.remark ? {
T: common_vendor.t(item.content.remark)
V: common_vendor.t(item.content.remark)
} : {}, {
U: item.content.attachments && item.content.attachments.length
W: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
V: common_vendor.f(item.content.attachments, (file, idx, i1) => {
X: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return common_vendor.e({
a: file.fileType === "image"
}, file.fileType === "image" ? {
@@ -204,21 +206,21 @@ const _sfc_main = {
});
})
} : {}, {
W: item.content.signPath
Y: item.content.signPath
}, item.content.signPath ? {
X: resolveFileUrl(item.content.signPath),
Y: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
Z: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
Z: resolveFileUrl(item.content.signPath),
aa: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
ab: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
} : {}) : item.type === "writeoff" ? common_vendor.e({
ab: common_vendor.t(item.content.resultName),
ac: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
ad: item.content.remark
ad: common_vendor.t(item.content.resultName),
ae: common_vendor.n(item.content.resultName === "通过" ? "result-tag--pass" : "result-tag--fail"),
af: item.content.remark
}, item.content.remark ? {
ae: common_vendor.t(item.content.remark)
ag: common_vendor.t(item.content.remark)
} : {}, {
af: item.content.attachments && item.content.attachments.length
ah: item.content.attachments && item.content.attachments.length
}, item.content.attachments && item.content.attachments.length ? {
ag: common_vendor.f(item.content.attachments, (file, idx, i1) => {
ai: common_vendor.f(item.content.attachments, (file, idx, i1) => {
return common_vendor.e({
a: file.fileType === "image"
}, file.fileType === "image" ? {
@@ -232,19 +234,19 @@ const _sfc_main = {
});
})
} : {}, {
ah: item.content.signPath
aj: item.content.signPath
}, item.content.signPath ? {
ai: resolveFileUrl(item.content.signPath),
aj: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
ak: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
ak: resolveFileUrl(item.content.signPath),
al: common_vendor.o(($event) => previewSingle(item.content.signPath), "node-" + index),
am: common_vendor.o((...args) => common_vendor.unref(scheduleMeasureLayout) && common_vendor.unref(scheduleMeasureLayout)(...args), "node-" + index)
} : {}) : {}, {
v: item.type === "assign",
y: item.type === "rectify",
P: item.type === "verify",
aa: item.type === "writeoff",
al: "node-" + index,
am: "hazard-node-" + index,
an: index === common_vendor.unref(historyList).length - 1 ? 1 : ""
x: item.type === "assign",
A: item.type === "rectify",
R: item.type === "verify",
ac: item.type === "writeoff",
an: "node-" + index,
ao: "hazard-node-" + index,
ap: index === common_vendor.unref(historyList).length - 1 ? 1 : ""
});
}),
g: common_vendor.s(scrollAreaStyle.value),

File diff suppressed because one or more lines are too long

View File

@@ -134,8 +134,10 @@ function generateHazardHistory(data) {
operator: data.reporterName || "-",
time: data.createdAt || "-",
content: {
code: data.code || "-",
title: data.title || "-",
source: data.source || "-",
hazardSourceName: data.hazardSourceName || "-",
areaName: data.areaName || "-",
areaColor: data.areaColor || "",
address: data.address || "-",

View File

@@ -103,7 +103,7 @@ const _sfc_main = {
}
};
const radioChange = (n) => {
common_vendor.index.__f__("log", "at pages/Inspectionresult/Inspectionresult.vue:207", "radioChange", n);
common_vendor.index.__f__("log", "at pages/Inspectionresult/Inspectionresult.vue:211", "radioChange", n);
};
const hasHazardData = common_vendor.computed(() => components_hazard_hazardForm.hasValidHazardPayload(hazardPayload.value));
const progressPercent = common_vendor.computed(() => {
@@ -189,7 +189,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/Inspectionresult/Inspectionresult.vue:306", "提交失败:", error);
common_vendor.index.__f__("error", "at pages/Inspectionresult/Inspectionresult.vue:310", "提交失败:", error);
common_vendor.index.showToast({ title: "提交失败", icon: "none" });
}
};
@@ -206,7 +206,7 @@ const _sfc_main = {
restoreDraft();
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/Inspectionresult/Inspectionresult.vue:325", error);
common_vendor.index.__f__("error", "at pages/Inspectionresult/Inspectionresult.vue:329", error);
}
};
common_vendor.onLoad((options) => {
@@ -258,29 +258,30 @@ const _sfc_main = {
q: hazardPayload.value.formData.level === 1 ? 1 : "",
r: hazardPayload.value.formData.level === 2 ? 1 : "",
s: common_vendor.t(((_d = common_vendor.unref(components_hazard_hazardForm.SOURCE_OPTIONS)[hazardPayload.value.formData.source]) == null ? void 0 : _d.title) || "-"),
t: common_vendor.t(hazardPayload.value.address || "-"),
v: common_vendor.t(hazardPayload.value.formData.description || "-"),
w: hazardPayload.value.fileList.length > 0
t: common_vendor.t(hazardPayload.value.formData.hazardSourceName || "-"),
v: common_vendor.t(hazardPayload.value.address || "-"),
w: common_vendor.t(hazardPayload.value.formData.description || "-"),
x: hazardPayload.value.fileList.length > 0
}, hazardPayload.value.fileList.length > 0 ? {
x: common_vendor.t(hazardPayload.value.fileList.length)
y: common_vendor.t(hazardPayload.value.fileList.length)
} : {}, {
y: common_vendor.o(editHazard),
z: common_vendor.o(clearHazard)
z: common_vendor.o(editHazard),
A: common_vendor.o(clearHazard)
})) : {}, {
A: common_vendor.o(($event) => value1.value = $event),
B: common_vendor.p({
B: common_vendor.o(($event) => value1.value = $event),
C: common_vendor.p({
placeholder: "请输入备注信息",
modelValue: value1.value
}),
C: common_vendor.o(handleSubmit),
D: common_vendor.sr(hazardFormRef, "643afff0-3", {
D: common_vendor.o(handleSubmit),
E: common_vendor.sr(hazardFormRef, "643afff0-3", {
"k": "hazardFormRef"
}),
E: common_vendor.o(onHazardConfirm),
F: common_vendor.o(($event) => common_vendor.unref(clearDraft)(true)),
G: common_vendor.o(($event) => showHazardPopup.value = $event),
H: common_vendor.o(($event) => hazardPayload.value = $event),
I: common_vendor.p({
F: common_vendor.o(onHazardConfirm),
G: common_vendor.o(($event) => common_vendor.unref(clearDraft)(true)),
H: common_vendor.o(($event) => showHazardPopup.value = $event),
I: common_vendor.o(($event) => hazardPayload.value = $event),
J: common_vendor.p({
title: "填写隐患信息",
mode: "collect",
["body-height"]: "60vh",
@@ -288,7 +289,7 @@ const _sfc_main = {
show: showHazardPopup.value,
modelValue: hazardPayload.value
}),
J: common_vendor.gei(_ctx, "")
K: common_vendor.gei(_ctx, "")
});
};
}

View File

@@ -1 +1 @@
<view class="{{['page', 'padding', 'data-v-643afff0', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{J}}"><view wx:if="{{a}}" class="progress-bar data-v-643afff0"><view class="progress-text data-v-643afff0"><text class="current-index data-v-643afff0">第 {{b}} 个问题</text><text class="total-count data-v-643afff0"> / 共 {{c}} 个</text></view><view class="progress-line data-v-643afff0"><view class="progress-inner data-v-643afff0" style="{{'width:' + d}}"></view></view></view><view class="padding bg-white radius data-v-643afff0"><view class="text-bold data-v-643afff0">{{e}}</view><view class="margin-top data-v-643afff0"><rich-text class="data-v-643afff0" nodes="{{f}}"></rich-text></view><view class="margin-top data-v-643afff0"><u-radio-group wx:if="{{j}}" class="data-v-643afff0" virtualHostClass="data-v-643afff0" u-s="{{['d']}}" bindchange="{{h}}" u-i="643afff0-0" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><u-radio wx:for="{{g}}" wx:for-item="item" wx:key="a" class="data-v-643afff0" virtualHostClass="data-v-643afff0" bindchange="{{item.b}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></u-radio></u-radio-group></view><view wx:if="{{k}}" class="hazard-section margin-top data-v-643afff0"><view class="hazard-tip data-v-643afff0"><text class="cuIcon-warn text-yellow margin-right-xs data-v-643afff0"></text><text class="text-orange data-v-643afff0">检查结果为异常,需填写隐患信息</text></view><view wx:if="{{l}}" class="hazard-btn data-v-643afff0" bindtap="{{m}}"><text class="text-blue data-v-643afff0">填写隐患信息</text></view><view wx:else class="hazard-card data-v-643afff0"><view class="card-header data-v-643afff0"><view class="text-bold text-black data-v-643afff0">{{n}}</view><view class="{{['level-tag', 'data-v-643afff0', p && 'level-minor', q && 'level-normal', r && 'level-major']}}">{{o}}</view></view><view class="card-body data-v-643afff0"><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">检查形式:</text><text class="data-v-643afff0">{{s}}</text></view><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">隐患位置:</text><text class="data-v-643afff0">{{t}}</text></view><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">隐患描述:</text><text class="description-text data-v-643afff0">{{v}}</text></view><view wx:if="{{w}}" class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">附件:</text><text class="data-v-643afff0">{{x}}个文件</text></view></view><view class="card-footer data-v-643afff0"><button class="btn-edit data-v-643afff0" bindtap="{{y}}">修改</button><button class="btn-clear data-v-643afff0" bindtap="{{z}}">清除</button></view></view></view><view class="margin-top data-v-643afff0"><up-textarea wx:if="{{B}}" class="data-v-643afff0" virtualHostClass="data-v-643afff0" u-i="643afff0-2" bind:__l="__l" bindupdateModelValue="{{A}}" u-p="{{B}}"></up-textarea></view></view><button class="bg-blue round margin-top-xl data-v-643afff0" bindtap="{{C}}">提交</button><hazard-form-popup wx:if="{{I}}" class="r data-v-643afff0" virtualHostClass="r data-v-643afff0" u-r="hazardFormRef" bindconfirm="{{E}}" bindclearDraft="{{F}}" u-i="643afff0-3" bind:__l="__l" bindupdateShow="{{G}}" bindupdateModelValue="{{H}}" u-p="{{I}}"/></view>
<view class="{{['page', 'padding', 'data-v-643afff0', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{K}}"><view wx:if="{{a}}" class="progress-bar data-v-643afff0"><view class="progress-text data-v-643afff0"><text class="current-index data-v-643afff0">第 {{b}} 个问题</text><text class="total-count data-v-643afff0"> / 共 {{c}} 个</text></view><view class="progress-line data-v-643afff0"><view class="progress-inner data-v-643afff0" style="{{'width:' + d}}"></view></view></view><view class="padding bg-white radius data-v-643afff0"><view class="text-bold data-v-643afff0">{{e}}</view><view class="margin-top data-v-643afff0"><rich-text class="data-v-643afff0" nodes="{{f}}"></rich-text></view><view class="margin-top data-v-643afff0"><u-radio-group wx:if="{{j}}" class="data-v-643afff0" virtualHostClass="data-v-643afff0" u-s="{{['d']}}" bindchange="{{h}}" u-i="643afff0-0" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><u-radio wx:for="{{g}}" wx:for-item="item" wx:key="a" class="data-v-643afff0" virtualHostClass="data-v-643afff0" bindchange="{{item.b}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></u-radio></u-radio-group></view><view wx:if="{{k}}" class="hazard-section margin-top data-v-643afff0"><view class="hazard-tip data-v-643afff0"><text class="cuIcon-warn text-yellow margin-right-xs data-v-643afff0"></text><text class="text-orange data-v-643afff0">检查结果为异常,需填写隐患信息</text></view><view wx:if="{{l}}" class="hazard-btn data-v-643afff0" bindtap="{{m}}"><text class="text-blue data-v-643afff0">填写隐患信息</text></view><view wx:else class="hazard-card data-v-643afff0"><view class="card-header data-v-643afff0"><view class="text-bold text-black data-v-643afff0">{{n}}</view><view class="{{['level-tag', 'data-v-643afff0', p && 'level-minor', q && 'level-normal', r && 'level-major']}}">{{o}}</view></view><view class="card-body data-v-643afff0"><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">检查形式:</text><text class="data-v-643afff0">{{s}}</text></view><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">隐患来源:</text><text class="data-v-643afff0">{{t}}</text></view><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">隐患位置:</text><text class="data-v-643afff0">{{v}}</text></view><view class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">隐患描述:</text><text class="description-text data-v-643afff0">{{w}}</text></view><view wx:if="{{x}}" class="info-row data-v-643afff0"><text class="text-gray data-v-643afff0">附件:</text><text class="data-v-643afff0">{{y}}个文件</text></view></view><view class="card-footer data-v-643afff0"><button class="btn-edit data-v-643afff0" bindtap="{{z}}">修改</button><button class="btn-clear data-v-643afff0" bindtap="{{A}}">清除</button></view></view></view><view class="margin-top data-v-643afff0"><up-textarea wx:if="{{C}}" class="data-v-643afff0" virtualHostClass="data-v-643afff0" u-i="643afff0-2" bind:__l="__l" bindupdateModelValue="{{B}}" u-p="{{C}}"></up-textarea></view></view><button class="bg-blue round margin-top-xl data-v-643afff0" bindtap="{{D}}">提交</button><hazard-form-popup wx:if="{{J}}" class="r data-v-643afff0" virtualHostClass="r data-v-643afff0" u-r="hazardFormRef" bindconfirm="{{F}}" bindclearDraft="{{G}}" u-i="643afff0-3" bind:__l="__l" bindupdateShow="{{H}}" bindupdateModelValue="{{I}}" u-p="{{J}}"/></view>

View File

@@ -80,7 +80,7 @@ const _sfc_main = {
return;
}
common_vendor.index.navigateTo({
url: `/pages/hiddendanger/view?hazardId=${item.hazardId}`
url: `/pages/hiddendanger/detail2?hazardId=${item.hazardId}&assignId=${item.assignId || ""}`
});
};
common_vendor.computed(() => {
@@ -147,13 +147,16 @@ const _sfc_main = {
}
if (item.result === 2 && item.hazardName) {
const sourceIndex = components_hazard_hazardForm.SOURCE_OPTIONS.findIndex((o) => o.title === item.source);
const hazardSourceCode = item.hazardSourceCode ?? (item.hazardSource != null && item.hazardSource !== "" && !Number.isNaN(Number(item.hazardSource)) ? Number(item.hazardSource) : null);
answer.hazardPayload = {
...components_hazard_hazardForm.createEmptyHazardPayload(),
formData: {
...components_hazard_hazardForm.createEmptyHazardPayload().formData,
title: item.hazardName || "",
description: item.hazardDesc || "",
source: sourceIndex >= 0 ? sourceIndex : 0
source: sourceIndex >= 0 ? sourceIndex : 0,
hazardSourceCode,
hazardSourceName: item.hazardSourceName || ""
},
address: item.hazardAddress || ""
};
@@ -430,7 +433,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/Inspectionresult/detail.vue:730", "提交失败:", error);
common_vendor.index.__f__("error", "at pages/Inspectionresult/detail.vue:745", "提交失败:", error);
common_vendor.index.showToast({ title: "提交失败", icon: "none" });
}
};
@@ -454,7 +457,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "获取检查项失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/Inspectionresult/detail.vue:754", "获取检查项失败:", error);
common_vendor.index.__f__("error", "at pages/Inspectionresult/detail.vue:769", "获取检查项失败:", error);
common_vendor.index.showToast({ title: "获取检查项失败", icon: "none" });
} finally {
loading.value = false;
@@ -523,19 +526,23 @@ const _sfc_main = {
}, item.source ? {
o: common_vendor.t(item.source)
} : {}, {
p: item.hazardAddress
}, item.hazardAddress ? {
q: common_vendor.t(item.hazardAddress)
p: item.hazardSource
}, item.hazardSource ? {
q: common_vendor.t(item.hazardSource)
} : {}, {
r: item.hazardDesc
r: item.hazardAddress
}, item.hazardAddress ? {
s: common_vendor.t(item.hazardAddress)
} : {}, {
t: item.hazardDesc
}, item.hazardDesc ? {
s: common_vendor.t(item.hazardDesc)
v: common_vendor.t(item.hazardDesc)
} : {}) : {}, {
t: item.result === 2 && item.hazardId
w: item.result === 2 && item.hazardId
}, item.result === 2 && item.hazardId ? {
v: common_vendor.o(($event) => viewHazardDetail(item), "check-item-" + index)
x: common_vendor.o(($event) => viewHazardDetail(item), "check-item-" + index)
} : {}) : common_vendor.e({
w: common_vendor.f(resultOptions, (opt, optIndex, i1) => {
y: common_vendor.f(resultOptions, (opt, optIndex, i1) => {
return {
a: optIndex,
b: "1b3bf21b-2-" + i0 + "-" + i1 + "," + ("1b3bf21b-1-" + i0),
@@ -549,44 +556,45 @@ const _sfc_main = {
})
};
}),
x: common_vendor.o((label) => onResultChange(index, label), "check-item-" + index),
y: "1b3bf21b-1-" + i0,
z: common_vendor.o(($event) => answerList.value[index].resultLabel = $event, "check-item-" + index),
A: common_vendor.p({
z: common_vendor.o((label) => onResultChange(index, label), "check-item-" + index),
A: "1b3bf21b-1-" + i0,
B: common_vendor.o(($event) => answerList.value[index].resultLabel = $event, "check-item-" + index),
C: common_vendor.p({
placement: "row",
modelValue: answerList.value[index].resultLabel
}),
B: answerList.value[index].resultLabel === "异常"
D: answerList.value[index].resultLabel === "异常"
}, answerList.value[index].resultLabel === "异常" ? common_vendor.e({
C: !hasHazardData(index)
E: !hasHazardData(index)
}, !hasHazardData(index) ? {
D: common_vendor.o(($event) => openHazardPopup(index), "check-item-" + index)
F: common_vendor.o(($event) => openHazardPopup(index), "check-item-" + index)
} : common_vendor.e({
E: common_vendor.t(answerList.value[index].hazardPayload.formData.title),
F: common_vendor.t((_a = common_vendor.unref(components_hazard_hazardForm.LEVEL_OPTIONS)[answerList.value[index].hazardPayload.formData.level]) == null ? void 0 : _a.title),
G: answerList.value[index].hazardPayload.formData.level === 0 ? 1 : "",
H: answerList.value[index].hazardPayload.formData.level === 1 ? 1 : "",
I: answerList.value[index].hazardPayload.formData.level === 2 ? 1 : "",
J: common_vendor.t(((_b = common_vendor.unref(components_hazard_hazardForm.SOURCE_OPTIONS)[answerList.value[index].hazardPayload.formData.source]) == null ? void 0 : _b.title) || "-"),
K: common_vendor.t(answerList.value[index].hazardPayload.address || "-"),
L: common_vendor.t(answerList.value[index].hazardPayload.formData.description || "-"),
M: answerList.value[index].hazardPayload.fileList.length > 0
G: common_vendor.t(answerList.value[index].hazardPayload.formData.title),
H: common_vendor.t((_a = common_vendor.unref(components_hazard_hazardForm.LEVEL_OPTIONS)[answerList.value[index].hazardPayload.formData.level]) == null ? void 0 : _a.title),
I: answerList.value[index].hazardPayload.formData.level === 0 ? 1 : "",
J: answerList.value[index].hazardPayload.formData.level === 1 ? 1 : "",
K: answerList.value[index].hazardPayload.formData.level === 2 ? 1 : "",
L: common_vendor.t(((_b = common_vendor.unref(components_hazard_hazardForm.SOURCE_OPTIONS)[answerList.value[index].hazardPayload.formData.source]) == null ? void 0 : _b.title) || "-"),
M: common_vendor.t(answerList.value[index].hazardPayload.formData.hazardSourceName || "-"),
N: common_vendor.t(answerList.value[index].hazardPayload.address || "-"),
O: common_vendor.t(answerList.value[index].hazardPayload.formData.description || "-"),
P: answerList.value[index].hazardPayload.fileList.length > 0
}, answerList.value[index].hazardPayload.fileList.length > 0 ? {
N: common_vendor.t(answerList.value[index].hazardPayload.fileList.length)
Q: common_vendor.t(answerList.value[index].hazardPayload.fileList.length)
} : {}, {
O: common_vendor.o(($event) => openHazardPopup(index), "check-item-" + index),
P: common_vendor.o(($event) => clearHazard(index), "check-item-" + index)
R: common_vendor.o(($event) => openHazardPopup(index), "check-item-" + index),
S: common_vendor.o(($event) => clearHazard(index), "check-item-" + index)
})) : {}, {
Q: "1b3bf21b-3-" + i0,
R: common_vendor.o(($event) => answerList.value[index].remark = $event, "check-item-" + index),
S: common_vendor.p({
T: "1b3bf21b-3-" + i0,
U: common_vendor.o(($event) => answerList.value[index].remark = $event, "check-item-" + index),
V: common_vendor.p({
placeholder: "请输入备注信息",
modelValue: answerList.value[index].remark
})
}), {
T: "check-item-" + index,
U: "check-item-" + index,
V: isItemSubmitted(item) ? 1 : ""
W: "check-item-" + index,
X: "check-item-" + index,
Y: isItemSubmitted(item) ? 1 : ""
});
}),
m: pendingSubmitCount.value > 0

File diff suppressed because one or more lines are too long

View File

@@ -4,14 +4,18 @@ const request_api = require("../../request/api.js");
if (!Array) {
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
(_easycom_up_picker2 + _easycom_up_textarea2 + _easycom_u_popup2)();
(_easycom_up_picker2 + _easycom_up_textarea2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_u_popup2)();
}
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
const _easycom_up_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_up_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
if (!Math) {
(_easycom_up_picker + _easycom_up_textarea + _easycom_u_popup)();
(_easycom_up_picker + _easycom_up_textarea + _easycom_up_radio + _easycom_up_radio_group + _easycom_u_popup)();
}
const _sfc_main = {
__name: "application",
@@ -25,6 +29,8 @@ const _sfc_main = {
const hazardList = common_vendor.ref([]);
const selectedDeptName = common_vendor.ref("");
const aiGenerating = common_vendor.ref(false);
const sendMsgFlagRadio = common_vendor.ref("yes");
const sendMsgFlag = common_vendor.computed(() => sendMsgFlagRadio.value === "yes");
const formData = common_vendor.reactive({
rectifyDeadline: "",
// 整改时限
@@ -44,10 +50,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:137", "销号申请列表:", res.data);
common_vendor.index.__f__("log", "at pages/closeout/application.vue:166", "销号申请列表:", res.data);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/closeout/application.vue:140", "获取销号申请列表失败:", error);
common_vendor.index.__f__("error", "at pages/closeout/application.vue:169", "获取销号申请列表失败:", error);
}
};
const fetchAcceptanceList = async () => {
@@ -61,10 +67,10 @@ const _sfc_main = {
} else {
hazardColumns.value = [["暂无可申请销号的隐患"]];
}
common_vendor.index.__f__("log", "at pages/closeout/application.vue:157", "可申请销号的隐患列表:", list);
common_vendor.index.__f__("log", "at pages/closeout/application.vue:186", "可申请销号的隐患列表:", list);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/closeout/application.vue:160", "获取可申请销号隐患列表失败:", error);
common_vendor.index.__f__("error", "at pages/closeout/application.vue:189", "获取可申请销号隐患列表失败:", error);
}
};
const openAddPopup = () => {
@@ -79,7 +85,7 @@ const _sfc_main = {
formData.responsibleDeptId = hazard.deptId || "";
};
const onHazardConfirm = (e) => {
common_vendor.index.__f__("log", "at pages/closeout/application.vue:181", "选择的隐患:", e);
common_vendor.index.__f__("log", "at pages/closeout/application.vue:210", "选择的隐患:", e);
if (e.value && e.value.length > 0) {
selectedHazard.value = e.value[0];
const index = e.indexs[0];
@@ -101,6 +107,7 @@ const _sfc_main = {
formData.mainTreatmentContent = "";
formData.treatmentResult = "";
formData.selfVerifyContent = "";
sendMsgFlagRadio.value = "yes";
};
const handleAiGenerate = async () => {
if (!selectedHazardId.value) {
@@ -140,7 +147,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:255", "AI生成销号方案失败:", error);
common_vendor.index.__f__("error", "at pages/closeout/application.vue:285", "AI生成销号方案失败:", error);
common_vendor.index.showToast({ title: "AI生成失败请重试", icon: "none" });
} finally {
aiGenerating.value = false;
@@ -164,10 +171,12 @@ const _sfc_main = {
// 主要治理内容
treatmentResult: formData.treatmentResult || "",
// 隐患治理完成内容
selfVerifyContent: formData.selfVerifyContent || ""
selfVerifyContent: formData.selfVerifyContent || "",
// 责任单位自行验收情况
sendMsgFlag: sendMsgFlag.value
// 是否短信提醒
};
common_vendor.index.__f__("log", "at pages/closeout/application.vue:280", "提交数据:", params);
common_vendor.index.__f__("log", "at pages/closeout/application.vue:311", "提交数据:", params);
try {
const res = await request_api.applyDelete(params);
if (res.code === 0) {
@@ -179,7 +188,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "申请失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/closeout/application.vue:294", "申请失败:", error);
common_vendor.index.__f__("error", "at pages/closeout/application.vue:325", "申请失败:", error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
}
};
@@ -259,23 +268,40 @@ const _sfc_main = {
placeholder: "请输入隐患治理责任单位自行验收的情况",
modelValue: formData.selfVerifyContent
}),
C: common_vendor.o(($event) => showAddPopup.value = false),
D: common_vendor.o(handleAdd),
E: common_vendor.o(($event) => showAddPopup.value = false),
C: common_vendor.p({
label: "是",
name: "yes",
customStyle: {
marginRight: "48rpx"
}
}),
D: common_vendor.p({
label: "否",
name: "no"
}),
E: common_vendor.o(($event) => sendMsgFlagRadio.value = $event),
F: common_vendor.p({
placement: "row",
activeColor: "#2667e9",
modelValue: sendMsgFlagRadio.value
}),
G: common_vendor.o(($event) => showAddPopup.value = false),
H: common_vendor.o(handleAdd),
I: common_vendor.o(($event) => showAddPopup.value = false),
J: common_vendor.p({
show: showAddPopup.value,
mode: "center",
round: "20",
safeAreaInsetBottom: false
}),
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({
K: common_vendor.o(onHazardConfirm),
L: common_vendor.o(($event) => showHazardPicker.value = false),
M: common_vendor.o(($event) => showHazardPicker.value = false),
N: common_vendor.p({
show: showHazardPicker.value,
columns: hazardColumns.value
}),
K: common_vendor.gei(_ctx, "")
O: common_vendor.gei(_ctx, "")
});
};
}

View File

@@ -3,6 +3,8 @@
"usingComponents": {
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
"up-radio": "../../uni_modules/uview-plus/components/u-radio/u-radio",
"up-radio-group": "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group",
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -146,4 +146,14 @@
.picker-input.readonly.data-v-4b6250eb {
background: #f5f5f5;
color: #666;
}
.static-field.data-v-4b6250eb {
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}

View File

@@ -25,6 +25,7 @@ const _sfc_main = {
mainPerson: "",
mainGovernanceContent: "",
governanceCompleteContent: "",
selfAcceptanceStatus: "",
status: "",
rejectReason: ""
});
@@ -50,7 +51,7 @@ const _sfc_main = {
});
};
const onSignatureImageError = () => {
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:94", "签名图片加载失败:", signatureUrl.value);
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:98", "签名图片加载失败:", signatureUrl.value);
};
const fetchDetail = async (id) => {
if (!id) {
@@ -69,6 +70,7 @@ const _sfc_main = {
formData.mainPerson = data.mainPerson || "";
formData.mainGovernanceContent = data.mainGovernanceContent || "";
formData.governanceCompleteContent = data.governanceCompleteContent || "";
formData.selfAcceptanceStatus = data.selfAcceptanceStatus || data.selfVerifyContent || "";
formData.status = data.status ?? "";
formData.rejectReason = data.rejectReason || "";
applySignature(data.signPath);
@@ -76,7 +78,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:121", "获取销号申请详情失败:", error);
common_vendor.index.__f__("error", "at pages/closeout/editor.vue:126", "获取销号申请详情失败:", error);
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
} finally {
common_vendor.index.hideLoading();
@@ -129,29 +131,36 @@ const _sfc_main = {
autoHeight: true,
modelValue: formData.governanceCompleteContent
}),
m: common_vendor.p({
m: common_vendor.o(($event) => formData.selfAcceptanceStatus = $event),
n: common_vendor.p({
placeholder: "暂无",
disabled: true,
autoHeight: true,
modelValue: formData.selfAcceptanceStatus
}),
o: common_vendor.p({
modelValue: statusText.value,
placeholder: "暂无",
disabled: true
}),
n: hasRejectReason.value
p: hasRejectReason.value
}, hasRejectReason.value ? {
o: common_vendor.o(($event) => formData.rejectReason = $event),
p: common_vendor.p({
q: common_vendor.o(($event) => formData.rejectReason = $event),
r: common_vendor.p({
placeholder: "暂无",
disabled: true,
autoHeight: true,
modelValue: formData.rejectReason
})
} : {}, {
q: hasSignature.value
s: hasSignature.value
}, hasSignature.value ? {
r: signatureUrl.value,
s: common_vendor.o(previewSignature),
t: common_vendor.o(onSignatureImageError)
t: signatureUrl.value,
v: common_vendor.o(previewSignature),
w: common_vendor.o(onSignatureImageError)
} : {}, {
v: common_vendor.o(handleCancel),
w: common_vendor.gei(_ctx, "")
x: common_vendor.o(handleCancel),
y: common_vendor.gei(_ctx, "")
});
};
}

View File

@@ -1 +1 @@
<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>
<view class="{{['padding', 'page', 'data-v-bbd4165b', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{y}}"><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-textarea wx:if="{{n}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-6" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"></up-textarea><view class="text-gray margin-bottom margin-top data-v-bbd4165b">状态</view><up-input wx:if="{{o}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-7" bind:__l="__l" u-p="{{o}}"></up-input><block wx:if="{{p}}"><view class="text-gray margin-bottom margin-top data-v-bbd4165b">驳回理由</view><up-textarea wx:if="{{r}}" class="data-v-bbd4165b" virtualHostClass="data-v-bbd4165b" u-i="bbd4165b-8" bind:__l="__l" bindupdateModelValue="{{q}}" u-p="{{r}}"></up-textarea></block><block wx:if="{{s}}"><view class="text-gray margin-bottom margin-top data-v-bbd4165b">电子签名</view><view class="signature-box data-v-bbd4165b"><image src="{{t}}" class="signature-img data-v-bbd4165b" mode="aspectFit" bindtap="{{v}}" binderror="{{w}}"></image></view></block><view class="flex justify-center margin-top-xl data-v-bbd4165b"><button class="round cu-btn lg data-v-bbd4165b" bindtap="{{x}}">返回</button></view></view></view>

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, "")
});
};
}

View File

@@ -1,6 +1,4 @@
{
"navigationBarTitleText": "隐患排查",
"usingComponents": {
"hazard-form-popup": "../../components/hazard/HazardFormPopup"
}
"usingComponents": {}
}

View File

@@ -1 +1 @@
<view class="{{['page', 'padding', 'data-v-b44c631d', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{h}}"><scroll-view class="status-tabs data-v-b44c631d" scroll-x show-scrollbar="{{false}}"><view class="status-tabs-inner data-v-b44c631d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="c" class="{{['status-tab-item', 'data-v-b44c631d', tab.d && 'status-tab-active']}}" bindtap="{{tab.e}}"><text class="status-tab-text data-v-b44c631d">{{tab.a}}</text><view wx:if="{{tab.b}}" class="status-tab-bar data-v-b44c631d"></view></view></view></scroll-view><view wx:if="{{b}}" class="empty-tip text-gray text-center padding data-v-b44c631d">暂无数据</view><view wx:for="{{c}}" wx:for-item="item" wx:key="t" class="padding radius bg-white list-list margin-bottom data-v-b44c631d"><view class="flex justify-between margin-bottom data-v-b44c631d"><view class="text-bold text-black data-v-b44c631d" style="word-break:break-all;flex:1">{{item.a}}</view><view class="text-blue data-v-b44c631d" style="white-space:nowrap;flex-shrink:0;margin-left:16rpx">{{item.b}}</view></view><view class="flex margin-bottom data-v-b44c631d"><view class="text-gray data-v-b44c631d">隐患等级:</view><view class="{{['level-tag', 'data-v-b44c631d', item.d && 'level-minor', item.e && 'level-normal', item.f && 'level-major']}}">{{item.c}}</view></view><view class="flex margin-bottom data-v-b44c631d"><view class="text-gray data-v-b44c631d" style="white-space:nowrap">隐患位置:</view><view class="text-black data-v-b44c631d">{{item.g}}</view></view><view class="flex margin-bottom data-v-b44c631d"><view class="text-gray data-v-b44c631d">创建时间:</view><view class="text-black data-v-b44c631d">{{item.h}}</view></view><view class="flex justify-end card-actions data-v-b44c631d" style="gap:10rpx"><button class="round cu-btn light bg-blue data-v-b44c631d" bindtap="{{item.i}}">查看详情</button><button wx:if="{{item.j}}" class="round cu-btn light bg-blue data-v-b44c631d" bindtap="{{item.k}}">隐患交办</button><button wx:if="{{item.l}}" class="round cu-btn bg-blue data-v-b44c631d" bindtap="{{item.m}}">立即整改</button><button wx:if="{{item.n}}" class="round cu-btn light bg-blue data-v-b44c631d" bindtap="{{item.o}}">编辑整改信息</button><button wx:if="{{item.p}}" class="round cu-btn bg-blue data-v-b44c631d" bindtap="{{item.q}}">立即验收</button><button wx:if="{{item.r}}" class="round cu-btn bg-blue data-v-b44c631d" bindtap="{{item.s}}">隐患交办</button></view></view><view class="fixed-add-btn data-v-b44c631d" bindtap="{{d}}"><text class="cuIcon-add data-v-b44c631d"></text><text class="data-v-b44c631d">新增</text></view><hazard-form-popup wx:if="{{g}}" class="data-v-b44c631d" virtualHostClass="data-v-b44c631d" bindsuccess="{{e}}" u-i="b44c631d-0" bind:__l="__l" bindupdateShow="{{f}}" u-p="{{g}}"/></view>
<view class="{{['page', 'padding', 'data-v-b44c631d', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{e}}"><scroll-view class="status-tabs data-v-b44c631d" scroll-x show-scrollbar="{{false}}"><view class="status-tabs-inner data-v-b44c631d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="c" class="{{['status-tab-item', 'data-v-b44c631d', tab.d && 'status-tab-active']}}" bindtap="{{tab.e}}"><text class="status-tab-text data-v-b44c631d">{{tab.a}}</text><view wx:if="{{tab.b}}" class="status-tab-bar data-v-b44c631d"></view></view></view></scroll-view><view wx:if="{{b}}" class="empty-tip text-gray text-center padding data-v-b44c631d">暂无数据</view><view wx:for="{{c}}" wx:for-item="item" wx:key="t" class="padding radius bg-white list-list margin-bottom data-v-b44c631d"><view class="flex justify-between margin-bottom data-v-b44c631d"><view class="text-bold text-black data-v-b44c631d" style="word-break:break-all;flex:1">{{item.a}}</view><view class="text-blue data-v-b44c631d" style="white-space:nowrap;flex-shrink:0;margin-left:16rpx">{{item.b}}</view></view><view class="flex margin-bottom data-v-b44c631d"><view class="text-gray data-v-b44c631d">隐患等级:</view><view class="{{['level-tag', 'data-v-b44c631d', item.d && 'level-minor', item.e && 'level-normal', item.f && 'level-major']}}">{{item.c}}</view></view><view class="flex margin-bottom data-v-b44c631d"><view class="text-gray data-v-b44c631d" style="white-space:nowrap">隐患位置:</view><view class="text-black data-v-b44c631d">{{item.g}}</view></view><view class="flex margin-bottom data-v-b44c631d"><view class="text-gray data-v-b44c631d">创建时间:</view><view class="text-black data-v-b44c631d">{{item.h}}</view></view><view class="flex justify-end card-actions data-v-b44c631d" style="gap:10rpx"><button class="round cu-btn light bg-blue data-v-b44c631d" bindtap="{{item.i}}">查看详情</button><button wx:if="{{item.j}}" class="round cu-btn light bg-blue data-v-b44c631d" bindtap="{{item.k}}">隐患交办</button><button wx:if="{{item.l}}" class="round cu-btn bg-blue data-v-b44c631d" bindtap="{{item.m}}">立即整改</button><button wx:if="{{item.n}}" class="round cu-btn light bg-blue data-v-b44c631d" bindtap="{{item.o}}">编辑整改信息</button><button wx:if="{{item.p}}" class="round cu-btn bg-blue data-v-b44c631d" bindtap="{{item.q}}">立即验收</button><button wx:if="{{item.r}}" class="round cu-btn bg-blue data-v-b44c631d" bindtap="{{item.s}}">隐患交办</button></view></view><view class="fixed-add-btn data-v-b44c631d" bindtap="{{d}}"><text class="cuIcon-add data-v-b44c631d"></text><text class="data-v-b44c631d">新增</text></view></view>

View File

@@ -30,9 +30,22 @@ const _sfc_main = {
rectifyResult: "",
planCost: null,
actualCost: null,
rectifierName: "",
managerNames: [],
memberNames: [],
rectifyStatusName: ""
});
const formatPersonNames = (names) => {
if (!names)
return "暂无";
if (Array.isArray(names)) {
const text = names.filter(Boolean).join("、");
return text || "暂无";
}
if (typeof names === "string") {
return names.trim() || "暂无";
}
return "暂无";
};
const formatMoney = (value) => {
if (value === null || value === void 0 || value === "") {
return "暂无";
@@ -117,6 +130,7 @@ const _sfc_main = {
signatureLocalPath: signatureLocalPath.value,
showCanvas: showCanvas.value,
signaturePaths: signaturePaths.value
// sendMsgFlagRadio: sendMsgFlagRadio.value
}),
hasContent: acceptDraftHasContent,
applyPayload: (data) => {
@@ -175,6 +189,7 @@ const _sfc_main = {
signatureLocalPath.value,
showCanvas.value,
signaturePaths.value
// sendMsgFlagRadio.value
]);
const getFullPath = (filePath) => {
if (!filePath)
@@ -219,7 +234,8 @@ const _sfc_main = {
rectifyData.rectifyResult = rectify.rectifyResult || "";
rectifyData.planCost = rectify.planCost ?? null;
rectifyData.actualCost = rectify.actualCost ?? null;
rectifyData.rectifierName = rectify.rectifierName || "";
rectifyData.managerNames = rectify.managerNames || [];
rectifyData.memberNames = rectify.memberNames || [];
rectifyData.rectifyStatusName = rectify.rectifyStatusName || "";
rectifyAttachments.value = rectify.attachments || [];
};
@@ -235,14 +251,14 @@ const _sfc_main = {
const assign = resolveAssignWithRectify(res.data.assigns);
if (assign == null ? void 0 : assign.rectify) {
applyRectifyData(assign.rectify);
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:370", "整改记录:", rectifyData);
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:371", "整改附件:", rectifyAttachments.value);
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:423", "整改记录:", rectifyData);
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:424", "整改附件:", rectifyAttachments.value);
}
} else {
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:377", "获取隐患详情失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:430", "获取隐患详情失败:", error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
}
};
@@ -287,7 +303,7 @@ const _sfc_main = {
} catch (err) {
isSubmitting.value = false;
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:431", "签名上传失败:", err);
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:484", "签名上传失败:", err);
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
}
}
@@ -301,8 +317,9 @@ const _sfc_main = {
attachments,
signPath: signatureServerPath.value || ""
// 电子签名路径
// sendMsgFlag: sendMsgFlag.value
};
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:452", "提交验收参数:", params);
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:506", "提交验收参数:", params);
try {
const res = await request_api.acceptanceRectification(params);
common_vendor.index.hideLoading();
@@ -323,7 +340,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:474", "验收失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:528", "验收失败:", error);
common_vendor.index.showToast({
title: "请求失败",
icon: "none"
@@ -403,7 +420,7 @@ const _sfc_main = {
} catch (err) {
isSubmitting.value = false;
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:583", "签名上传失败:", err);
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:637", "签名上传失败:", err);
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
}
};
@@ -419,7 +436,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:602", "获取系统信息失败:", e);
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:656", "获取系统信息失败:", e);
}
if (options.rectifyId) {
rectifyId.value = options.rectifyId;
@@ -430,7 +447,7 @@ const _sfc_main = {
if (options.assignId) {
assignId.value = options.assignId;
}
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:613", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value });
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:667", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value });
fetchDetail();
restoreDraft();
});
@@ -442,11 +459,12 @@ const _sfc_main = {
d: common_vendor.t(rectifyData.rectifyResult || "暂无"),
e: common_vendor.t(formatMoney(rectifyData.planCost)),
f: common_vendor.t(formatMoney(rectifyData.actualCost)),
g: common_vendor.t(rectifyData.rectifierName || "暂无"),
h: common_vendor.t(rectifyData.rectifyStatusName || "暂无"),
i: rectifyAttachments.value.length > 0
g: common_vendor.t(formatPersonNames(rectifyData.managerNames)),
h: common_vendor.t(formatPersonNames(rectifyData.memberNames)),
i: common_vendor.t(rectifyData.rectifyStatusName || "暂无"),
j: rectifyAttachments.value.length > 0
}, rectifyAttachments.value.length > 0 ? {
j: common_vendor.f(rectifyAttachments.value, (img, idx, i0) => {
k: common_vendor.f(rectifyAttachments.value, (img, idx, i0) => {
return {
a: idx,
b: getFullPath(img.filePath),
@@ -454,51 +472,51 @@ const _sfc_main = {
};
})
} : {}, {
k: common_vendor.n(formData.result === 1 ? "active" : ""),
l: common_vendor.o(($event) => formData.result = 1),
m: common_vendor.n(formData.result === 2 ? "active" : ""),
n: common_vendor.o(($event) => formData.result = 2),
o: common_vendor.o(($event) => formData.verifyRemark = $event),
p: common_vendor.p({
l: common_vendor.n(formData.result === 1 ? "active" : ""),
m: common_vendor.o(($event) => formData.result = 1),
n: common_vendor.n(formData.result === 2 ? "active" : ""),
o: common_vendor.o(($event) => formData.result = 2),
p: common_vendor.o(($event) => formData.verifyRemark = $event),
q: common_vendor.p({
placeholder: "请输入验收备注",
modelValue: formData.verifyRemark
}),
q: common_vendor.o(common_vendor.unref(afterRead)),
r: common_vendor.o(common_vendor.unref(deletePic)),
s: common_vendor.p({
r: common_vendor.o(common_vendor.unref(afterRead)),
s: common_vendor.o(common_vendor.unref(deletePic)),
t: common_vendor.p({
fileList: fileList1.value,
name: "1",
multiple: true,
imageMode: "aspectFill",
maxCount: 10
}),
t: canvasWidth.value,
v: canvasHeight.value,
w: canvasWidth.value + "px",
x: canvasHeight.value + "px",
y: showCanvas.value
v: canvasWidth.value,
w: canvasHeight.value,
x: canvasWidth.value + "px",
y: canvasHeight.value + "px",
z: showCanvas.value
}, showCanvas.value ? {
z: common_vendor.o(clearSignature)
A: common_vendor.o(clearSignature)
} : {
A: common_vendor.o(reSign)
B: common_vendor.o(reSign)
}, {
B: !showCanvas.value
C: !showCanvas.value
}, !showCanvas.value ? common_vendor.e({
C: signatureUrl.value
}, signatureUrl.value ? {
D: signatureUrl.value
}, signatureUrl.value ? {
E: signatureUrl.value
} : {}) : {}, {
E: showCanvas.value
F: showCanvas.value
}, showCanvas.value ? {
F: common_vendor.sr(signatureRef, "39f9b795-2", {
G: common_vendor.sr(signatureRef, "39f9b795-2", {
"k": "signatureRef"
}),
G: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
H: common_vendor.o(onSignatureStart),
I: common_vendor.o(onSignatureSigning),
J: common_vendor.o(onSignatureEnd),
K: common_vendor.o(onSignatureClear),
L: common_vendor.p({
H: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
I: common_vendor.o(onSignatureStart),
J: common_vendor.o(onSignatureSigning),
K: common_vendor.o(onSignatureEnd),
L: common_vendor.o(onSignatureClear),
M: common_vendor.p({
width: signatureWidth.value,
height: 160,
backgroundColor: "#f8f8f8",
@@ -507,9 +525,9 @@ const _sfc_main = {
enableHistory: false
})
} : {}, {
M: common_vendor.o(handleCancel),
N: common_vendor.o(handleSubmit),
O: common_vendor.gei(_ctx, "")
N: common_vendor.o(handleCancel),
O: common_vendor.o(handleSubmit),
P: common_vendor.gei(_ctx, "")
});
};
}

File diff suppressed because one or more lines are too long

View File

@@ -44,6 +44,16 @@
background: #2667E9;
color: #fff;
}
.static-field.data-v-39f9b795 {
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.signature-box.data-v-39f9b795 {
width: 100%;
min-height: 240rpx;

View File

@@ -0,0 +1,139 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
const utils_draftCache = require("../../utils/draftCache.js");
const utils_useDraftCache = require("../../utils/useDraftCache.js");
const components_hazard_hazardForm = require("../../components/hazard/hazardForm.js");
if (!Math) {
HazardFormPanel();
}
const HazardFormPanel = () => "../../components/hazard/HazardFormPanel.js";
const _sfc_main = {
__name: "add",
setup(__props) {
const formRef = common_vendor.ref(null);
const taskId = common_vendor.ref("");
const checkPointId = common_vendor.ref("");
const oneTableId = common_vendor.ref("");
const draftSnapshot = common_vendor.ref(null);
const draftInitialized = common_vendor.ref(false);
const hazardExtraParams = common_vendor.computed(() => ({
taskId: taskId.value,
checkPointId: checkPointId.value,
locationDraftKey: utils_draftCache.buildDraftKey(
utils_draftCache.DRAFT_NS.HAZARD_ADD,
"location",
oneTableId.value,
taskId.value,
checkPointId.value
)
}));
const getDraftKey = () => utils_draftCache.buildDraftKey(
utils_draftCache.DRAFT_NS.HAZARD_ADD,
oneTableId.value,
taskId.value,
checkPointId.value
);
const {
showRestoreBanner,
clear: clearDraft,
restore: restoreDraft,
save: saveDraft,
bindAutoSave
} = utils_useDraftCache.useDraftCache({
getKey: getDraftKey,
getPayload: () => {
var _a, _b;
return ((_b = (_a = formRef.value) == null ? void 0 : _a.getPayload) == null ? void 0 : _b.call(_a)) || {};
},
hasContent: components_hazard_hazardForm.hasHazardFormContent,
applyPayload: (data) => {
common_vendor.nextTick$1(() => {
var _a, _b;
(_b = (_a = formRef.value) == null ? void 0 : _a.applyPayload) == null ? void 0 : _b.call(_a, data);
});
},
clearForm: () => {
var _a, _b;
(_b = (_a = formRef.value) == null ? void 0 : _a.resetForm) == null ? void 0 : _b.call(_a);
},
canSave: () => draftInitialized.value,
requireInitialized: true,
showRestoreToast: false,
onAfterRestore: (data) => {
draftSnapshot.value = data;
}
});
const fetchTaskInfo = async (tableId) => {
try {
const startRes = await request_api.enterCheckPlan(tableId);
if (startRes.code === 0 && startRes.data) {
const tid = startRes.data.taskId;
const detailRes = await request_api.getCheckTaskDetail(tid);
if (detailRes.code === 0 && detailRes.data) {
taskId.value = detailRes.data.taskId;
checkPointId.value = detailRes.data.checkPointId;
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/add.vue:91", "获取任务信息失败:", error);
}
};
const clearLocationPickerDraft = () => {
utils_draftCache.removeDraft(hazardExtraParams.value.locationDraftKey);
};
const restoreFormDraft = async () => {
await common_vendor.nextTick$1();
restoreDraft();
};
const onSubmitSuccess = () => {
clearLocationPickerDraft();
clearDraft(false);
};
bindAutoSave(() => draftSnapshot.value);
const initPage = async (options = {}) => {
if (options.taskId) {
taskId.value = options.taskId;
}
if (options.checkPointId) {
checkPointId.value = options.checkPointId;
}
if (options.id) {
oneTableId.value = options.id;
if (!options.taskId || !options.checkPointId) {
await fetchTaskInfo(options.id);
}
}
draftInitialized.value = true;
await restoreFormDraft();
};
common_vendor.onLoad(async (options) => {
await initPage(options);
});
common_vendor.onHide(() => {
saveDraft();
});
return (_ctx, _cache) => {
return {
a: common_vendor.sr(formRef, "44bd6550-0", {
"k": "formRef"
}),
b: common_vendor.o(onSubmitSuccess),
c: common_vendor.o(($event) => common_vendor.unref(clearDraft)(true)),
d: common_vendor.o(($event) => draftSnapshot.value = $event),
e: common_vendor.p({
["page-mode"]: true,
title: "新增隐患排查",
mode: "direct",
["extra-params"]: hazardExtraParams.value,
["show-draft-banner"]: common_vendor.unref(showRestoreBanner),
["canvas-id"]: "hazardAddWatermarkCanvas"
}),
f: common_vendor.gei(_ctx, "")
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-44bd6550"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/hiddendanger/add.js.map

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "新增隐患排查",
"usingComponents": {
"hazard-form-panel": "../../components/hazard/HazardFormPanel"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['page', 'data-v-44bd6550', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{f}}"><hazard-form-panel wx:if="{{e}}" class="r data-v-44bd6550" virtualHostClass="r data-v-44bd6550" u-r="formRef" bindsuccess="{{b}}" bindclearDraft="{{c}}" binddraftChange="{{d}}" u-i="44bd6550-0" bind:__l="__l" u-p="{{e}}"/></view>

View File

@@ -0,0 +1,30 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* uni.scss */
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page.data-v-44bd6550 {
min-height: 100vh;
background: #ebf2fc;
}

View File

@@ -6,12 +6,16 @@ const utils_useDraftCache = require("../../utils/useDraftCache.js");
if (!Array) {
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
const _easycom_up_datetime_picker2 = common_vendor.resolveComponent("up-datetime-picker");
(_easycom_u_popup2 + _easycom_up_datetime_picker2)();
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
(_easycom_u_popup2 + _easycom_up_datetime_picker2 + _easycom_up_radio2 + _easycom_up_radio_group2)();
}
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
const _easycom_up_datetime_picker = () => "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js";
const _easycom_up_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_up_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
if (!Math) {
(_easycom_u_popup + _easycom_up_datetime_picker)();
(_easycom_u_popup + _easycom_up_datetime_picker + _easycom_up_radio + _easycom_up_radio_group)();
}
const _sfc_main = {
__name: "assignment",
@@ -77,6 +81,8 @@ const _sfc_main = {
const showDatePicker = common_vendor.ref(false);
const dateValue = common_vendor.ref(Date.now());
const selectedDate = common_vendor.ref("");
const sendMsgFlagRadio = common_vendor.ref("yes");
const sendMsgFlag = common_vendor.computed(() => sendMsgFlagRadio.value === "yes");
const {
showRestoreBanner,
clear: clearDraft,
@@ -86,29 +92,34 @@ const _sfc_main = {
getKey: () => utils_draftCache.buildDraftKey(utils_draftCache.DRAFT_NS.ASSIGN, hazardId.value),
getPayload: () => ({
selectedDate: selectedDate.value,
dateValue: dateValue.value
dateValue: dateValue.value,
sendMsgFlagRadio: sendMsgFlagRadio.value
}),
hasContent: (payload) => !!payload.selectedDate,
hasContent: (payload) => !!(payload.selectedDate || payload.sendMsgFlagRadio === "no"),
applyPayload: (payload) => {
selectedDate.value = payload.selectedDate || "";
dateValue.value = payload.dateValue || Date.now();
sendMsgFlagRadio.value = payload.sendMsgFlagRadio === "no" ? "no" : "yes";
},
clearForm: () => {
selectedDate.value = "";
dateValue.value = Date.now();
sendMsgFlagRadio.value = "yes";
},
canSave: () => !!hazardId.value
});
bindAutoSave(() => [selectedDate.value]);
bindAutoSave(() => [selectedDate.value, sendMsgFlagRadio.value]);
const fetchDeptUsers = async () => {
try {
const res = await request_api.getDepartmentPersonUsers();
const res = await request_api.getRelatedDeptUsers({
type: 1
});
if (res.code === 0 && res.data) {
deptList.value = res.data;
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:200", "部门人员树:", deptList.value);
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:230", "部门人员树:", deptList.value);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:203", "获取部门人员失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:233", "获取部门人员失败:", error);
}
};
const onDateConfirm = (e) => {
@@ -138,10 +149,12 @@ const _sfc_main = {
// 被指派人ID
deadline: selectedDate.value,
// 处理期限
assignRemark: ""
assignRemark: "",
// 交办备注(可选)
sendMsgFlag: sendMsgFlag.value
// 是否短信提醒
};
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:241", "提交数据:", params);
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:272", "提交数据:", params);
try {
const res = await request_api.assignHiddenDanger(params);
if (res.code === 0) {
@@ -154,7 +167,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "交办失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:255", "交办失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:286", "交办失败:", error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
}
};
@@ -226,9 +239,26 @@ const _sfc_main = {
mode: "date",
modelValue: dateValue.value
}),
z: common_vendor.o(handleCancel),
A: common_vendor.o(handleSubmit),
B: common_vendor.gei(_ctx, "")
z: common_vendor.p({
label: "是",
name: "yes",
customStyle: {
marginRight: "48rpx"
}
}),
A: common_vendor.p({
label: "否",
name: "no"
}),
B: common_vendor.o(($event) => sendMsgFlagRadio.value = $event),
C: common_vendor.p({
placement: "row",
activeColor: "#2667e9",
modelValue: sendMsgFlagRadio.value
}),
D: common_vendor.o(handleCancel),
E: common_vendor.o(handleSubmit),
F: common_vendor.gei(_ctx, "")
});
};
}

View File

@@ -2,6 +2,8 @@
"navigationBarTitleText": "隐患交办",
"usingComponents": {
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker"
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
"up-radio": "../../uni_modules/uview-plus/components/u-radio/u-radio",
"up-radio-group": "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group"
}
}

View File

@@ -1 +1 @@
<view class="{{['padding', 'page', 'data-v-6209e844', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{B}}"><view class="padding radius bg-white data-v-6209e844"><view wx:if="{{a}}" class="bg-orange-light text-orange padding-sm radius margin-bottom flex justify-between align-center data-v-6209e844" style="font-size:24rpx;background-color:#FFF7EB;border:1rpx solid #FFE4CC;width:100%;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:20rpx"><view class="flex align-center data-v-6209e844" style="display:flex;flex-direction:row;align-items:center"><text class="cuIcon-info margin-right-xs data-v-6209e844" style="margin-right:10rpx"></text><text class="data-v-6209e844">已自动恢复您上次未提交的内容</text></view><text class="text-blue text-bold data-v-6209e844" style="cursor:pointer;padding:0 10rpx;color:#2667E9;font-weight:bold" bindtap="{{b}}">清空草稿</text></view><view class="flex margin-bottom data-v-6209e844"><view class="text-gray data-v-6209e844">整改责任人</view><view class="text-red data-v-6209e844">*</view></view><view class="select-trigger data-v-6209e844" bindtap="{{e}}"><view class="{{['select-content', 'data-v-6209e844', d && 'text-gray']}}">{{c}}</view><text class="cuIcon-unfold data-v-6209e844"></text></view><u-popup wx:if="{{p}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" u-s="{{['d']}}" bindclose="{{o}}" u-i="6209e844-0" bind:__l="__l" u-p="{{p}}"><view class="user-popup cascader-user-popup data-v-6209e844"><view class="popup-header data-v-6209e844"><view class="popup-title text-bold data-v-6209e844">选择整改责任人</view><view class="popup-close data-v-6209e844" bindtap="{{f}}">×</view></view><view wx:if="{{g}}" class="selected-summary data-v-6209e844"><text class="summary-label data-v-6209e844">已选:</text><text class="summary-text data-v-6209e844">{{h}}</text></view><view class="cascader-body data-v-6209e844"><scroll-view class="cascader-col dept-col data-v-6209e844" scroll-y><view wx:for="{{i}}" wx:for-item="dept" wx:key="c" class="{{['data-v-6209e844', 'cascader-item', dept.d]}}" bindtap="{{dept.e}}"><text class="cascader-item-text data-v-6209e844">{{dept.a}}</text><text wx:if="{{dept.b}}" class="dept-dot data-v-6209e844"></text></view></scroll-view><scroll-view class="cascader-col user-col data-v-6209e844" scroll-y key="{{l}}"><view wx:if="{{j}}" class="empty-tip data-v-6209e844">该部门暂无人员</view><view wx:else class="data-v-6209e844"><view wx:for="{{k}}" wx:for-item="user" wx:key="c" class="{{['user-item', 'data-v-6209e844', user.d && 'active']}}" bindtap="{{user.e}}"><text class="user-item-text data-v-6209e844">{{user.a}}</text><text wx:if="{{user.b}}" class="cuIcon-check text-blue data-v-6209e844"></text></view></view></scroll-view></view><view class="popup-footer data-v-6209e844"><button class="btn-cancel data-v-6209e844" bindtap="{{m}}">取消</button><button class="btn-confirm bg-blue data-v-6209e844" bindtap="{{n}}">确定</button></view></view></u-popup><view class="flex margin-bottom margin-top data-v-6209e844"><view class="text-gray data-v-6209e844">整改期限</view><view class="text-red data-v-6209e844">*</view></view><view class="picker-input data-v-6209e844" bindtap="{{s}}"><text class="{{['data-v-6209e844', r]}}">{{q}}</text></view><up-datetime-picker wx:if="{{y}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" bindconfirm="{{t}}" bindcancel="{{v}}" bindclose="{{w}}" u-i="6209e844-1" bind:__l="__l" bindupdateModelValue="{{x}}" u-p="{{y}}"></up-datetime-picker><view class="btn-group margin-top-xl data-v-6209e844"><button class="btn-cancel data-v-6209e844" bindtap="{{z}}">取消</button><button class="btn-confirm bg-blue data-v-6209e844" bindtap="{{A}}">确认</button></view></view></view>
<view class="{{['padding', 'page', 'data-v-6209e844', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{F}}"><view class="padding radius bg-white data-v-6209e844"><view wx:if="{{a}}" class="bg-orange-light text-orange padding-sm radius margin-bottom flex justify-between align-center data-v-6209e844" style="font-size:24rpx;background-color:#FFF7EB;border:1rpx solid #FFE4CC;width:100%;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:20rpx"><view class="flex align-center data-v-6209e844" style="display:flex;flex-direction:row;align-items:center"><text class="cuIcon-info margin-right-xs data-v-6209e844" style="margin-right:10rpx"></text><text class="data-v-6209e844">已自动恢复您上次未提交的内容</text></view><text class="text-blue text-bold data-v-6209e844" style="cursor:pointer;padding:0 10rpx;color:#2667E9;font-weight:bold" bindtap="{{b}}">清空草稿</text></view><view class="flex margin-bottom data-v-6209e844"><view class="text-gray data-v-6209e844">下一步流程</view><view class="text-red data-v-6209e844">*</view></view><view class="static-field data-v-6209e844">隐患整改</view><view class="flex margin-bottom margin-top data-v-6209e844"><view class="text-gray data-v-6209e844">整改责任人</view><view class="text-red data-v-6209e844">*</view></view><view class="select-trigger data-v-6209e844" bindtap="{{e}}"><view class="{{['select-content', 'data-v-6209e844', d && 'text-gray']}}">{{c}}</view><text class="cuIcon-unfold data-v-6209e844"></text></view><u-popup wx:if="{{p}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" u-s="{{['d']}}" bindclose="{{o}}" u-i="6209e844-0" bind:__l="__l" u-p="{{p}}"><view class="user-popup cascader-user-popup data-v-6209e844"><view class="popup-header data-v-6209e844"><view class="popup-title text-bold data-v-6209e844">选择整改责任人</view><view class="popup-close data-v-6209e844" bindtap="{{f}}">×</view></view><view wx:if="{{g}}" class="selected-summary data-v-6209e844"><text class="summary-label data-v-6209e844">已选:</text><text class="summary-text data-v-6209e844">{{h}}</text></view><view class="cascader-body data-v-6209e844"><scroll-view class="cascader-col dept-col data-v-6209e844" scroll-y><view wx:for="{{i}}" wx:for-item="dept" wx:key="c" class="{{['data-v-6209e844', 'cascader-item', dept.d]}}" bindtap="{{dept.e}}"><text class="cascader-item-text data-v-6209e844">{{dept.a}}</text><text wx:if="{{dept.b}}" class="dept-dot data-v-6209e844"></text></view></scroll-view><scroll-view class="cascader-col user-col data-v-6209e844" scroll-y key="{{l}}"><view wx:if="{{j}}" class="empty-tip data-v-6209e844">该部门暂无人员</view><view wx:else class="data-v-6209e844"><view wx:for="{{k}}" wx:for-item="user" wx:key="c" class="{{['user-item', 'data-v-6209e844', user.d && 'active']}}" bindtap="{{user.e}}"><text class="user-item-text data-v-6209e844">{{user.a}}</text><text wx:if="{{user.b}}" class="cuIcon-check text-blue data-v-6209e844"></text></view></view></scroll-view></view><view class="popup-footer data-v-6209e844"><button class="btn-cancel data-v-6209e844" bindtap="{{m}}">取消</button><button class="btn-confirm bg-blue data-v-6209e844" bindtap="{{n}}">确定</button></view></view></u-popup><view class="flex margin-bottom margin-top data-v-6209e844"><view class="text-gray data-v-6209e844">整改期限</view><view class="text-red data-v-6209e844">*</view></view><view class="picker-input data-v-6209e844" bindtap="{{s}}"><text class="{{['data-v-6209e844', r]}}">{{q}}</text></view><up-datetime-picker wx:if="{{y}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" bindconfirm="{{t}}" bindcancel="{{v}}" bindclose="{{w}}" u-i="6209e844-1" bind:__l="__l" bindupdateModelValue="{{x}}" u-p="{{y}}"></up-datetime-picker><view class="flex margin-bottom margin-top data-v-6209e844"><view class="text-gray data-v-6209e844">短信提醒</view><view class="text-red data-v-6209e844">*</view></view><up-radio-group wx:if="{{C}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" u-s="{{['d']}}" u-i="6209e844-2" bind:__l="__l" bindupdateModelValue="{{B}}" u-p="{{C}}"><up-radio wx:if="{{z}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" u-i="6209e844-3,6209e844-2" bind:__l="__l" u-p="{{z}}"></up-radio><up-radio wx:if="{{A}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" u-i="6209e844-4,6209e844-2" bind:__l="__l" u-p="{{A}}"></up-radio></up-radio-group><view class="btn-group margin-top-xl data-v-6209e844"><button class="btn-cancel data-v-6209e844" bindtap="{{D}}">取消</button><button class="btn-confirm bg-blue data-v-6209e844" bindtap="{{E}}">确认</button></view></view></view>

View File

@@ -54,6 +54,16 @@
font-size: 28rpx;
color: #333;
}
.static-field.data-v-6209e844 {
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.user-popup.data-v-6209e844 {
background: #fff;
}

View File

@@ -11,8 +11,10 @@ if (!Array) {
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload");
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
const _easycom_wd_signature2 = common_vendor.resolveComponent("wd-signature");
(_easycom_up_textarea2 + _easycom_up_input2 + _easycom_up_datetime_picker2 + _easycom_up_checkbox2 + _easycom_u_popup2 + _easycom_up_upload2 + _easycom_wd_signature2)();
(_easycom_up_textarea2 + _easycom_up_input2 + _easycom_up_datetime_picker2 + _easycom_up_checkbox2 + _easycom_u_popup2 + _easycom_up_upload2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_wd_signature2)();
}
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
@@ -20,9 +22,11 @@ const _easycom_up_datetime_picker = () => "../../uni_modules/uview-plus/componen
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
const _easycom_up_upload = () => "../../uni_modules/uview-plus/components/u-upload/u-upload.js";
const _easycom_up_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_up_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
const _easycom_wd_signature = () => "../../node-modules/wot-design-uni/components/wd-signature/wd-signature.js";
if (!Math) {
(_easycom_up_textarea + _easycom_up_input + _easycom_up_datetime_picker + _easycom_up_checkbox + _easycom_u_popup + _easycom_up_upload + _easycom_wd_signature)();
(_easycom_up_textarea + _easycom_up_input + _easycom_up_datetime_picker + _easycom_up_checkbox + _easycom_u_popup + _easycom_up_upload + _easycom_up_radio + _easycom_up_radio_group + _easycom_wd_signature)();
}
const _sfc_main = {
__name: "rectification",
@@ -106,7 +110,7 @@ const _sfc_main = {
scheduleSignatureDraftExport();
};
const onSignatureImageError = () => {
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:376", "签名图片加载失败:", signatureUrl.value);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:418", "签名图片加载失败:", signatureUrl.value);
common_vendor.index.showToast({ title: "签名图片加载失败", icon: "none" });
};
const reSign = () => {
@@ -140,6 +144,8 @@ const _sfc_main = {
const showRectifyTimePicker = common_vendor.ref(false);
const rectifyTimeValue = common_vendor.ref(Date.now());
const selectedRectifyTime = common_vendor.ref("");
const sendMsgFlagRadio = common_vendor.ref("yes");
const sendMsgFlag = common_vendor.computed(() => sendMsgFlagRadio.value === "yes");
const formatDateValue = (timestamp) => {
if (!timestamp)
return "";
@@ -183,7 +189,18 @@ const _sfc_main = {
deptName: ""
});
}
selectedUserIds.value = [id];
if (!lockedUserIds.value.includes(id)) {
lockedUserIds.value = [...lockedUserIds.value, id];
}
selectedUserIds.value = mergeLockedUserIds([id]);
syncSelectedUsersFromIds(selectedUserIds.value);
};
const setLockedDefaultUsers = (ids) => {
const normalized = parseIdList(ids);
if (!normalized.length)
return;
lockedUserIds.value = normalized;
selectedUserIds.value = mergeLockedUserIds(selectedUserIds.value);
syncSelectedUsersFromIds(selectedUserIds.value);
};
const parseIdList = (raw) => {
@@ -259,8 +276,21 @@ const _sfc_main = {
const showUserPopup = common_vendor.ref(false);
const selectedUserIds = common_vendor.ref([]);
const selectedUsers = common_vendor.ref([]);
const lockedUserIds = common_vendor.ref([]);
const activeDeptIndex = common_vendor.ref(0);
const userPickerSelectedIds = common_vendor.ref([]);
const isLockedUser = (userId) => lockedUserIds.value.includes(String(userId));
const mergeLockedUserIds = (ids) => {
const merged = /* @__PURE__ */ new Set([
...(ids || []).map((id) => String(id)),
...lockedUserIds.value.map((id) => String(id))
]);
return [...merged];
};
const formatUserPickerLabel = (user) => {
const name = formatUserDisplayName(user);
return isLockedUser(user.userId) ? `${name}(默认)` : name;
};
const formatUserDisplayName = (user) => {
if (user.postName) {
return `${user.nickName}_${user.postName}`;
@@ -353,6 +383,10 @@ const _sfc_main = {
}
function onUserCheckChange(userId, checked) {
const id = String(userId);
if (!checked && isLockedUser(id)) {
common_vendor.index.showToast({ title: "默认整改责任人不可取消", icon: "none" });
return;
}
if (checked) {
if (!userPickerSelectedSet.value.has(id)) {
userPickerSelectedIds.value = [...userPickerSelectedIds.value, id];
@@ -374,7 +408,7 @@ const _sfc_main = {
showManagerPopup.value = false;
};
const openUserPopup = () => {
userPickerSelectedIds.value = [...selectedUserIds.value];
userPickerSelectedIds.value = mergeLockedUserIds(selectedUserIds.value);
const firstDeptWithUsers = deptList.value.findIndex((dept) => {
var _a;
return ((_a = dept.users) == null ? void 0 : _a.length) > 0;
@@ -391,40 +425,30 @@ const _sfc_main = {
showManagerPopup.value = false;
};
const confirmUserSelect = () => {
userPickerSelectedIds.value = mergeLockedUserIds(userPickerSelectedIds.value);
selectedUserIds.value = userPickerSelectedIds.value.map((id) => String(id));
syncSelectedUsersFromIds(selectedUserIds.value);
showUserPopup.value = false;
};
const fetchManagerDeptUsers = async () => {
const fetchRelatedDeptUsers = async () => {
try {
const res = await request_api.getDepartmentPersonUsers();
const res = await request_api.getRelatedDeptUsers({ type: 2 });
if (res.code === 0 && res.data) {
managerDeptList.value = res.data;
deptList.value = res.data;
if (selectedManagerIds.value.length > 0) {
syncSelectedManagersFromIds(selectedManagerIds.value);
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:706", "获取安全管理人员列表失败:", error);
}
};
const fetchRectifyDeptUsers = async () => {
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:712", "当前hazardId:", hazardId.value);
try {
const res = await request_api.getDeptUsersWithSubordinates({ hazardId: hazardId.value });
if (res.code === 0 && res.data) {
deptList.value = res.data;
if (selectedUserIds.value.length > 0) {
syncSelectedUsersFromIds(selectedUserIds.value);
}
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:720", "整改责任人部门树:", deptList.value);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:723", "获取整改责任人列表失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:788", "获取关联部门人员列表失败:", error);
}
};
const fetchPersonnelLists = async () => {
await Promise.all([fetchManagerDeptUsers(), fetchRectifyDeptUsers()]);
await fetchRelatedDeptUsers();
if (selectedManagerIds.value.length > 0) {
syncSelectedManagersFromIds(selectedManagerIds.value);
}
@@ -454,7 +478,8 @@ const _sfc_main = {
manageIds: selectedManagerIds.value.map((id) => Number(id)),
memberIds: selectedUserIds.value.map((id) => Number(id)),
rectifyTime: selectedRectifyTime.value || formatDateValue(rectifyTimeValue.value),
signPath: signatureServerPath.value || ""
signPath: signatureServerPath.value || "",
sendMsgFlag: sendMsgFlag.value
};
if (rectifyId.value) {
params.rectifyId = rectifyId.value;
@@ -479,7 +504,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:794", "提交整改失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:892", "提交整改失败:", error);
common_vendor.index.showToast({
title: "操作失败",
icon: "none"
@@ -505,7 +530,7 @@ const _sfc_main = {
} catch (err) {
isSubmitting.value = false;
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:824", "签名上传失败:", err);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:922", "签名上传失败:", err);
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
}
};
@@ -589,7 +614,7 @@ const _sfc_main = {
} catch (err) {
isSubmitting.value = false;
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:915", "签名上传失败:", err);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1013", "签名上传失败:", err);
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
}
}
@@ -614,7 +639,7 @@ const _sfc_main = {
applyRectifyTimeValue(data.rectifyTime);
}
const signPath = resolveSignPathFromData(data);
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:1018", "整改详情签名路径:", signPath);
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:1116", "整改详情签名路径:", signPath);
applySignatureFromServer(signPath);
hazardId.value = data.hazardId || "";
assignId.value = data.assignId || "";
@@ -632,6 +657,11 @@ const _sfc_main = {
} else if (data.rectifierId) {
selectedUserIds.value = [String(data.rectifierId)];
}
if (data.assigneeId) {
setLockedDefaultUsers(data.assigneeId);
} else if (data.rectifierId) {
setLockedDefaultUsers(data.rectifierId);
}
await fetchPersonnelLists();
if (data.attachments && data.attachments.length > 0) {
fileList1.value = data.attachments.map((att) => utils_upload.mapServerFileToUploadItem(att));
@@ -640,7 +670,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1052", "获取整改详情失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1155", "获取整改详情失败:", error);
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
}
};
@@ -671,7 +701,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: aiRes.msg || "AI生成失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1089", "AI生成整改方案失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1192", "AI生成整改方案失败:", error);
common_vendor.index.showToast({ title: "AI生成失败请重试", icon: "none" });
} finally {
aiGenerating.value = false;
@@ -709,7 +739,8 @@ const _sfc_main = {
signatureUrl: signatureUrl.value,
signatureLocalPath: signatureLocalPath.value,
showCanvas: showCanvas.value,
signaturePaths: signaturePaths.value
signaturePaths: signaturePaths.value,
sendMsgFlagRadio: sendMsgFlagRadio.value
}),
hasContent: rectifyDraftHasContent,
applyPayload: (data) => {
@@ -729,6 +760,7 @@ const _sfc_main = {
} else if (data.showCanvas === false) {
showCanvas.value = false;
}
sendMsgFlagRadio.value = data.sendMsgFlagRadio === "no" ? "no" : "yes";
},
clearForm: () => {
formData.rectifyPlan = "";
@@ -746,6 +778,7 @@ const _sfc_main = {
if (signatureRef.value) {
signatureRef.value.clear();
}
sendMsgFlagRadio.value = "yes";
},
canSave: () => !!(hazardId.value || rectifyId.value),
onAfterRestore: (data) => {
@@ -774,7 +807,8 @@ const _sfc_main = {
signatureUrl.value,
signatureLocalPath.value,
showCanvas.value,
signaturePaths.value
signaturePaths.value,
sendMsgFlagRadio.value
]);
common_vendor.onHide(() => {
if (showCanvas.value && !isSignatureEmpty.value && signatureRef.value && !isDraftExporting.value) {
@@ -788,7 +822,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/rectification.vue:1223", "获取系统信息失败:", e);
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1330", "获取系统信息失败:", e);
}
if (options.hazardId) {
hazardId.value = options.hazardId;
@@ -954,11 +988,13 @@ const _sfc_main = {
c: common_vendor.p({
usedAlone: true,
checked: userPickerSelectedSet.value.has(String(user.userId)),
label: formatUserDisplayName(user),
label: formatUserPickerLabel(user),
disabled: isLockedUser(user.userId),
activeColor: "#2667E9",
shape: "square"
}),
d: "user-" + user.userId
d: "user-" + user.userId,
e: isLockedUser(user.userId) ? 1 : ""
};
})
}, {
@@ -987,30 +1023,54 @@ const _sfc_main = {
ao: canvasWidth.value + "px",
ap: canvasHeight.value + "px"
} : {}, {
aq: showCanvas.value
aq: !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value
}, !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value ? {
ar: canvasWidth.value,
as: canvasHeight.value,
at: canvasWidth.value + "px",
av: canvasHeight.value + "px"
} : {}, {
aw: common_vendor.p({
label: "是",
name: "yes",
customStyle: {
marginRight: "48rpx"
}
}),
ax: common_vendor.p({
label: "否",
name: "no"
}),
ay: common_vendor.o(($event) => sendMsgFlagRadio.value = $event),
az: common_vendor.p({
placement: "row",
activeColor: "#2667e9",
modelValue: sendMsgFlagRadio.value
}),
aA: showCanvas.value
}, showCanvas.value ? {
ar: common_vendor.o(clearSignature)
aB: common_vendor.o(clearSignature)
} : {
as: common_vendor.o(reSign)
aC: common_vendor.o(reSign)
}, {
at: !showCanvas.value
aD: !showCanvas.value
}, !showCanvas.value ? common_vendor.e({
av: signatureUrl.value
aE: signatureUrl.value
}, signatureUrl.value ? {
aw: signatureUrl.value,
ax: common_vendor.o(onSignatureImageError)
aF: signatureUrl.value,
aG: common_vendor.o(onSignatureImageError)
} : {}) : {}, {
ay: showCanvas.value && !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value
aH: showCanvas.value && !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value
}, showCanvas.value && !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value ? {
az: common_vendor.sr(signatureRef, "f18ba0ce-12", {
aI: common_vendor.sr(signatureRef, "f18ba0ce-15", {
"k": "signatureRef"
}),
aA: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
aB: common_vendor.o(onSignatureStart),
aC: common_vendor.o(onSignatureSigning),
aD: common_vendor.o(onSignatureEnd),
aE: common_vendor.o(onSignatureClear),
aF: common_vendor.p({
aJ: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
aK: common_vendor.o(onSignatureStart),
aL: common_vendor.o(onSignatureSigning),
aM: common_vendor.o(onSignatureEnd),
aN: common_vendor.o(onSignatureClear),
aO: common_vendor.p({
width: signatureWidth.value,
height: 160,
backgroundColor: "#f8f8f8",
@@ -1019,9 +1079,9 @@ const _sfc_main = {
enableHistory: false
})
} : {}, {
aG: common_vendor.t(isEdit.value ? "保存修改" : "提交整改"),
aH: common_vendor.o(handleSubmit),
aI: common_vendor.gei(_ctx, "")
aP: common_vendor.t(isEdit.value ? "保存修改" : "提交整改"),
aQ: common_vendor.o(handleSubmit),
aR: common_vendor.gei(_ctx, "")
});
};
}

View File

@@ -7,6 +7,8 @@
"up-checkbox": "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox",
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
"up-radio": "../../uni_modules/uview-plus/components/u-radio/u-radio",
"up-radio-group": "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group",
"wd-signature": "../../node-modules/wot-design-uni/components/wd-signature/wd-signature"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -87,6 +87,16 @@
font-size: 28rpx;
color: #333;
}
.static-field.data-v-f18ba0ce {
background: #fff;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
padding: 20rpx 24rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.select-trigger.data-v-f18ba0ce {
display: flex;
align-items: center;
@@ -213,6 +223,9 @@
.user-popup .user-item.data-v-f18ba0ce:last-child {
border-bottom: none;
}
.user-popup .user-item-locked.data-v-f18ba0ce {
opacity: 0.85;
}
.user-popup .popup-footer.data-v-f18ba0ce {
display: flex;
border-top: 1rpx solid #eee;

View File

@@ -54,7 +54,7 @@ const _sfc_main = {
}
}
} catch (e) {
common_vendor.index.__f__("error", "at pages/index/index.vue:245", "获取用户信息失败:", e);
common_vendor.index.__f__("error", "at pages/index/index.vue:249", "获取用户信息失败:", e);
try {
const storedUserInfo = common_vendor.index.getStorageSync("userInfo");
if (storedUserInfo) {
@@ -69,7 +69,7 @@ const _sfc_main = {
userInfo.phone = info.phone || "";
}
} catch (storageError) {
common_vendor.index.__f__("error", "at pages/index/index.vue:261", "从本地存储获取用户信息失败:", storageError);
common_vendor.index.__f__("error", "at pages/index/index.vue:265", "从本地存储获取用户信息失败:", storageError);
}
}
};
@@ -216,7 +216,7 @@ const _sfc_main = {
initPlanExpandedState(records, { reset: true, expandFirst: true });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:431", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:435", error);
} finally {
loading.value = false;
}
@@ -240,7 +240,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "加载失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:454", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:458", error);
common_vendor.index.showToast({ title: "加载失败", icon: "none" });
}
};
@@ -282,13 +282,13 @@ const _sfc_main = {
const getHiddenDangerLists = async () => {
try {
const res = await request_api.getHiddenDangerList(hiddenDangerParams.value);
common_vendor.index.__f__("log", "at pages/index/index.vue:512", res);
common_vendor.index.__f__("log", "at pages/index/index.vue:516", res);
if (res.code === 0) {
hiddenDangerData.value = res.data.records;
common_vendor.index.__f__("log", "at pages/index/index.vue:515", hiddenDangerData.value, 1111);
common_vendor.index.__f__("log", "at pages/index/index.vue:519", hiddenDangerData.value, 1111);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:518", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:522", error);
} finally {
loading.value = false;
}
@@ -314,6 +314,11 @@ const _sfc_main = {
}
common_vendor.index.navigateTo({ url });
};
const editRectification = (item) => {
common_vendor.index.navigateTo({
url: `/pages/hiddendanger/rectification?rectifyId=${item.rectifyId}&isEdit=1`
});
};
const goAcceptance = (item) => {
common_vendor.index.navigateTo({
url: `/pages/hiddendanger/acceptance?hazardId=${item.hazardId}&assignId=${item.assignId}&rectifyId=${item.rectifyId}`
@@ -406,17 +411,25 @@ const _sfc_main = {
j: common_vendor.o(($event) => viewHazardDetail(item), item.hazardId),
k: item.statusName === "待整改" && item.canEdit
}, item.statusName === "待整改" && item.canEdit ? {
l: common_vendor.o(($event) => goRectification(item), item.hazardId)
l: common_vendor.o(($event) => assignHazard(item), item.hazardId)
} : {}, {
m: item.statusName === "待验收" && canAcceptance.value
m: item.statusName === "待整改" && item.canEdit
}, item.statusName === "待整改" && item.canEdit ? {
n: common_vendor.o(($event) => goRectification(item), item.hazardId)
} : {}, {
o: item.statusName === "待验收" && item.canEdit
}, item.statusName === "待验收" && item.canEdit ? {
p: common_vendor.o(($event) => editRectification(item), item.hazardId)
} : {}, {
q: item.statusName === "待验收" && canAcceptance.value
}, item.statusName === "待验收" && canAcceptance.value ? {
n: common_vendor.o(($event) => goAcceptance(item), item.hazardId)
r: common_vendor.o(($event) => goAcceptance(item), item.hazardId)
} : {}, {
o: item.statusName === "待交办"
s: item.statusName === "待交办"
}, item.statusName === "待交办" ? {
p: common_vendor.o(($event) => assignHazard(item), item.hazardId)
t: common_vendor.o(($event) => assignHazard(item), item.hazardId)
} : {}, {
q: item.hazardId
v: item.hazardId
});
}),
n: common_vendor.gei(_ctx, "")

File diff suppressed because one or more lines are too long

View File

@@ -319,4 +319,19 @@
.danger-info-row .text-gray.data-v-1cf27b2a {
white-space: nowrap;
flex-shrink: 0;
}
.danger-card-actions.data-v-1cf27b2a {
margin-top: 20rpx;
gap: 10rpx;
flex-wrap: wrap;
}
.danger-card-actions .cu-btn.data-v-1cf27b2a {
padding: 0 24rpx !important;
font-size: 26rpx !important;
height: 60rpx !important;
line-height: 60rpx !important;
white-space: nowrap !important;
flex-shrink: 0 !important;
width: auto !important;
margin: 0 !important;
}

View File

@@ -120,16 +120,15 @@ function getHiddenDangerLabelList() {
method: "GET"
});
}
function getDepartmentPersonUsers(params) {
function getHazardSourceList() {
return request_request.requestAPI({
url: "/frontend/hazard/dept/users",
method: "GET",
data: params
url: "/frontend/hazard/source/list",
method: "GET"
});
}
function getDeptUsersWithSubordinates(params) {
function getRelatedDeptUsers(params) {
return request_request.requestAPI({
url: "/frontend/hazard/dept/users/with-subordinates",
url: "/frontend/hazard/dept/users/related",
method: "GET",
data: params
});
@@ -369,13 +368,12 @@ exports.getCheckItemListDetail = getCheckItemListDetail;
exports.getCheckPlanList = getCheckPlanList;
exports.getCheckTableList = getCheckTableList;
exports.getCheckTaskDetail = getCheckTaskDetail;
exports.getDepartmentPersonUsers = getDepartmentPersonUsers;
exports.getDeptChildren = getDeptChildren;
exports.getDeptUsers = getDeptUsers;
exports.getDeptUsersWithSubordinates = getDeptUsersWithSubordinates;
exports.getEnterpriseinfo = getEnterpriseinfo;
exports.getEnterprisetype = getEnterprisetype;
exports.getHazardDetail = getHazardDetail;
exports.getHazardSourceList = getHazardSourceList;
exports.getHiddenDangerDetail = getHiddenDangerDetail;
exports.getHiddenDangerLabelList = getHiddenDangerLabelList;
exports.getHiddenDangerList = getHiddenDangerList;
@@ -388,6 +386,7 @@ exports.getPlanTableDetail = getPlanTableDetail;
exports.getQiniuUploadToken = getQiniuUploadToken;
exports.getRectifyDetail = getRectifyDetail;
exports.getRegulationList = getRegulationList;
exports.getRelatedDeptUsers = getRelatedDeptUsers;
exports.getSystemUserFormOptions = getSystemUserFormOptions;
exports.getWriteOffApplyDetail = getWriteOffApplyDetail;
exports.getindustry = getindustry;

View File

@@ -5,7 +5,8 @@ const DRAFT_NS = {
ACCEPT: "draft_accept",
RECTIFY: "draft_rectify",
INSPECTION_RESULT: "draft_inspection_result",
INSPECTION_SHEET: "draft_inspection_sheet"
INSPECTION_SHEET: "draft_inspection_sheet",
HAZARD_ADD: "draft_hazard_add"
};
function buildDraftKey(namespace, ...parts) {
return [namespace, ...parts.map((p) => String(p ?? ""))].join("_");
@@ -37,7 +38,7 @@ function loadDraft(key) {
try {
return typeof raw === "string" ? JSON.parse(raw) : raw;
} catch (error) {
common_vendor.index.__f__("error", "at utils/draftCache.js:61", "[draftCache] 解析草稿失败:", key, error);
common_vendor.index.__f__("error", "at utils/draftCache.js:62", "[draftCache] 解析草稿失败:", key, error);
return null;
}
}