694 lines
27 KiB
JavaScript
694 lines
27 KiB
JavaScript
"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");
|
||
require("../../request/request.js");
|
||
const utils_upload = require("../../utils/upload.js");
|
||
if (!Array) {
|
||
const _easycom_up_choose2 = common_vendor.resolveComponent("up-choose");
|
||
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_choose2 + _easycom_up_upload2 + _easycom_up_input2 + _easycom_up_textarea2 + _easycom_u_popup2)();
|
||
}
|
||
const _easycom_up_choose = () => "../../uni_modules/uview-plus/components/u-choose/u-choose.js";
|
||
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_choose + _easycom_up_upload + _easycom_up_input + _easycom_up_textarea + _easycom_u_popup)();
|
||
}
|
||
const _sfc_main = {
|
||
__name: "Inspection",
|
||
setup(__props) {
|
||
const showAddPopup = common_vendor.ref(false);
|
||
const canvasWidth = common_vendor.ref(300);
|
||
const canvasHeight = common_vendor.ref(300);
|
||
const levelChooseRef = common_vendor.ref(null);
|
||
const userRole = common_vendor.ref("");
|
||
const canAcceptance = common_vendor.computed(() => {
|
||
return userRole.value === "admin" || userRole.value === "manage";
|
||
});
|
||
const getUserRole = () => {
|
||
try {
|
||
const userInfoStr = common_vendor.index.getStorageSync("userInfo");
|
||
if (userInfoStr) {
|
||
const userInfo = JSON.parse(userInfoStr);
|
||
userRole.value = userInfo.role || "";
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:286", "当前用户角色:", userRole.value);
|
||
}
|
||
} catch (error) {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:289", "获取用户信息失败:", error);
|
||
}
|
||
};
|
||
getUserRole();
|
||
const taskId = common_vendor.ref("");
|
||
const checkPointId = common_vendor.ref("");
|
||
const fetchTaskInfo = async (oneTableId) => {
|
||
try {
|
||
const startRes = await request_api.enterCheckPlan(oneTableId);
|
||
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/Inspection.vue:314", "获取任务信息失败:", error);
|
||
}
|
||
};
|
||
common_vendor.onLoad((options) => {
|
||
if (options.id) {
|
||
fetchTaskInfo(options.id);
|
||
}
|
||
});
|
||
const formData = common_vendor.reactive({
|
||
title: "",
|
||
// 隐患标题
|
||
level: 0,
|
||
// 隐患等级索引
|
||
description: "",
|
||
// 隐患描述
|
||
tagIndex: 0,
|
||
// 隐患标签索引
|
||
source: 0,
|
||
// 隐患来源
|
||
regulationId: null,
|
||
// 法律依据ID
|
||
regulationName: ""
|
||
// 法律依据名称(显示用)
|
||
});
|
||
common_vendor.ref(0);
|
||
const lng = common_vendor.ref(0);
|
||
const lat = common_vendor.ref(0);
|
||
const selectedAddress = common_vendor.ref("");
|
||
const showAreaPicker = common_vendor.ref(false);
|
||
const areaList = common_vendor.ref([]);
|
||
const selectedAreaId = common_vendor.ref("");
|
||
const selectedAreaName = common_vendor.ref("");
|
||
const tempAreaId = 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 openLawPopup = () => {
|
||
showLawPopup.value = true;
|
||
if (lawList.value.length === 0) {
|
||
fetchRegulationList();
|
||
}
|
||
};
|
||
const fetchRegulationList = async (isLoadMore = false) => {
|
||
if (lawLoading.value)
|
||
return;
|
||
lawLoading.value = true;
|
||
try {
|
||
const params = {
|
||
pageNum: lawPageNum.value,
|
||
pageSize: lawPageSize.value,
|
||
status: 1
|
||
// 启用状态
|
||
};
|
||
if (lawKeyword.value && lawKeyword.value.trim()) {
|
||
params.keyword = lawKeyword.value.trim();
|
||
}
|
||
const res = await request_api.getRegulationList(params);
|
||
if (res.code === 0) {
|
||
const records = res.data.records || res.data || [];
|
||
if (isLoadMore) {
|
||
lawList.value = [...lawList.value, ...records];
|
||
} else {
|
||
lawList.value = records;
|
||
}
|
||
const total = res.data.total || 0;
|
||
hasMoreLaw.value = lawList.value.length < total;
|
||
}
|
||
} catch (error) {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:397", "获取法规列表失败:", error);
|
||
} finally {
|
||
lawLoading.value = false;
|
||
}
|
||
};
|
||
const searchRegulation = () => {
|
||
lawPageNum.value = 1;
|
||
lawList.value = [];
|
||
hasMoreLaw.value = true;
|
||
fetchRegulationList();
|
||
};
|
||
const loadMoreLaw = () => {
|
||
if (!hasMoreLaw.value || lawLoading.value)
|
||
return;
|
||
lawPageNum.value++;
|
||
fetchRegulationList(true);
|
||
};
|
||
const selectLaw = (item) => {
|
||
selectedLawId.value = item.id;
|
||
selectedLawName.value = item.depict || item.keyword || "";
|
||
};
|
||
const confirmLaw = () => {
|
||
if (selectedLawId.value) {
|
||
formData.regulationId = selectedLawId.value;
|
||
formData.regulationName = selectedLawName.value;
|
||
}
|
||
showLawPopup.value = false;
|
||
};
|
||
const fetchAreaList = async () => {
|
||
try {
|
||
const res = await request_three_one_api_area.getAreaList();
|
||
if (res.code === 0 && res.data && res.data.records) {
|
||
areaList.value = res.data.records;
|
||
}
|
||
} catch (error) {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:441", "获取区域列表失败:", error);
|
||
}
|
||
};
|
||
fetchAreaList();
|
||
const confirmAreaSelect = () => {
|
||
if (tempAreaId.value) {
|
||
selectedAreaId.value = tempAreaId.value;
|
||
const selected = areaList.value.find((item) => item.id === tempAreaId.value);
|
||
selectedAreaName.value = selected ? selected.name : "";
|
||
}
|
||
showAreaPicker.value = false;
|
||
};
|
||
const chooseLocation = () => {
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:457", "chooseLocation called");
|
||
showAddPopup.value = false;
|
||
setTimeout(() => {
|
||
common_vendor.index.getLocation({
|
||
type: "gcj02",
|
||
// 使用国测局坐标系(腾讯地图使用)
|
||
success: (locationRes) => {
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:466", "获取当前位置成功:", locationRes);
|
||
common_vendor.index.chooseLocation({
|
||
latitude: locationRes.latitude,
|
||
longitude: locationRes.longitude,
|
||
success: (res) => {
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:472", "选择位置成功:", res);
|
||
selectedAddress.value = res.address + (res.name ? `(${res.name})` : "");
|
||
lng.value = res.longitude;
|
||
lat.value = res.latitude;
|
||
showAddPopup.value = true;
|
||
},
|
||
fail: (err) => {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:481", "选择位置失败:", err);
|
||
showAddPopup.value = true;
|
||
if (err.errMsg && err.errMsg.indexOf("cancel") === -1) {
|
||
common_vendor.index.showToast({
|
||
title: "选择位置失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: (err) => {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:495", "获取当前位置失败:", err);
|
||
common_vendor.index.chooseLocation({
|
||
success: (res) => {
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:499", "选择位置成功:", res);
|
||
selectedAddress.value = res.address + (res.name ? `(${res.name})` : "");
|
||
lng.value = res.longitude;
|
||
lat.value = res.latitude;
|
||
showAddPopup.value = true;
|
||
},
|
||
fail: (chooseErr) => {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:506", "选择位置失败:", chooseErr);
|
||
showAddPopup.value = true;
|
||
if (chooseErr.errMsg && chooseErr.errMsg.indexOf("cancel") === -1) {
|
||
common_vendor.index.showToast({
|
||
title: "选择位置失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}, 300);
|
||
};
|
||
const handleAdd = async () => {
|
||
var _a, _b;
|
||
if (!formData.title) {
|
||
common_vendor.index.showToast({
|
||
title: "请输入隐患标题",
|
||
icon: "none"
|
||
});
|
||
return;
|
||
}
|
||
if (fileList1.value.length === 0) {
|
||
common_vendor.index.showToast({
|
||
title: "请上传隐患图片/视频",
|
||
icon: "none"
|
||
});
|
||
return;
|
||
}
|
||
const attachments = fileList1.value.filter((f) => f.status === "success").map((file) => utils_upload.buildAttachmentItem(file));
|
||
const selectedTag = tagOptions.value[formData.tagIndex];
|
||
const tagId = selectedTag ? selectedTag.id : null;
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:546", "innnn", sourceOptions);
|
||
const params = {
|
||
title: formData.title,
|
||
//标题
|
||
level: ((_a = levelOptions.value[formData.level]) == null ? void 0 : _a.id) || 2,
|
||
// 2.一般隐患 3.重大隐患
|
||
lng: lng.value || 0,
|
||
//经度
|
||
lat: lat.value || 0,
|
||
//纬度
|
||
address: selectedAddress.value || "",
|
||
//详细地址
|
||
areaId: selectedAreaId.value || null,
|
||
//隐患区域ID
|
||
description: formData.description || "",
|
||
//隐患描述
|
||
tagId,
|
||
//隐患标签ID
|
||
taskId: taskId.value,
|
||
//关联任务ID
|
||
checkPointId: checkPointId.value,
|
||
//关联检查点ID
|
||
source: ((_b = sourceOptions.value[formData.source]) == null ? void 0 : _b.title) || "",
|
||
//隐患来源(随手拍、企业自查、行业互查、专家诊查)
|
||
attachments,
|
||
//附件列表(图片/视频)
|
||
regulationId: formData.regulationId || null
|
||
// 法律依据ID
|
||
};
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:565", "提交的参数:", params);
|
||
try {
|
||
const res = await request_api.addHiddenDanger(params);
|
||
if (res.code === 0) {
|
||
common_vendor.index.showToast({
|
||
title: "新增成功",
|
||
icon: "success"
|
||
});
|
||
showAddPopup.value = false;
|
||
formData.title = "";
|
||
formData.level = 0;
|
||
formData.description = "";
|
||
formData.tagIndex = 0;
|
||
selectedAddress.value = "";
|
||
selectedAreaId.value = "";
|
||
selectedAreaName.value = "";
|
||
fileList1.value = [];
|
||
formData.regulationId = null;
|
||
formData.regulationName = "";
|
||
selectedLawId.value = null;
|
||
selectedLawName.value = "";
|
||
fetchHiddenDangerList();
|
||
} else {
|
||
common_vendor.index.showToast({
|
||
title: res.msg || "新增失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
} catch (error) {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:598", error);
|
||
common_vendor.index.showToast({
|
||
title: "请求失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
};
|
||
const hiddenDangerList = common_vendor.ref([]);
|
||
const fetchHiddenDangerList = async () => {
|
||
try {
|
||
const res = await request_api.getMyHiddenDangerList();
|
||
if (res.code === 0) {
|
||
hiddenDangerList.value = res.data.records;
|
||
} else {
|
||
common_vendor.index.showToast({
|
||
title: res.msg || "获取隐患列表失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
} catch (error) {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:619", error);
|
||
common_vendor.index.showToast({
|
||
title: "请求失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
};
|
||
common_vendor.onShow(() => {
|
||
fetchHiddenDangerList();
|
||
});
|
||
const details = (item) => {
|
||
common_vendor.index.navigateTo({
|
||
url: `/pages/hiddendanger/view?hazardId=${item.hazardId}&assignId=${item.assignId}`
|
||
});
|
||
};
|
||
const Rectification = (item) => {
|
||
let url = `/pages/hiddendanger/rectification?hazardId=${item.hazardId}&assignId=${item.assignId}`;
|
||
if (item.deadline) {
|
||
url += `&deadline=${encodeURIComponent(item.deadline)}`;
|
||
}
|
||
common_vendor.index.navigateTo({ url });
|
||
};
|
||
const editRectification = (item) => {
|
||
common_vendor.index.navigateTo({
|
||
url: `/pages/hiddendanger/rectification?rectifyId=${item.rectifyId}&isEdit=1`
|
||
});
|
||
};
|
||
const acceptance = (item) => {
|
||
common_vendor.index.navigateTo({
|
||
url: `/pages/hiddendanger/acceptance?hazardId=${item.hazardId}&assignId=${item.assignId}&rectifyId=${item.rectifyId}`
|
||
});
|
||
};
|
||
const assignHazard = (item) => {
|
||
common_vendor.index.navigateTo({
|
||
url: `/pages/hiddendanger/assignment?hazardId=${item.hazardId}&assignId=${item.assignId}`
|
||
});
|
||
};
|
||
const fileList1 = common_vendor.ref([]);
|
||
const uploadInstance = common_vendor.getCurrentInstance();
|
||
const { afterRead, deletePic } = utils_upload.createUploadListHandlers(fileList1, {
|
||
watermark: {
|
||
canvasId: "watermarkCanvas",
|
||
canvasWidthRef: canvasWidth,
|
||
canvasHeightRef: canvasHeight,
|
||
instance: uploadInstance
|
||
}
|
||
});
|
||
const aiAnalyzing = common_vendor.ref(false);
|
||
const handleAiAnalyze = async () => {
|
||
const imageFiles = fileList1.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;
|
||
}
|
||
const fullImageUrl = imageFiles[0].url;
|
||
aiAnalyzing.value = true;
|
||
try {
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:690", "开始调用AI分析接口,图片地址:", fullImageUrl);
|
||
const analyzeRes = await request_api.analyzeHazardImage({
|
||
// imageUrl: 'https://yx.zhihuixiangxi.com:58880/1.png' ,
|
||
imageUrl: fullImageUrl
|
||
});
|
||
if (analyzeRes.code === 0 && analyzeRes.data) {
|
||
const aiData = analyzeRes.data;
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:698", "AI分析结果:", aiData);
|
||
if (aiData.title)
|
||
formData.title = aiData.title;
|
||
if (aiData.description)
|
||
formData.description = aiData.description;
|
||
if (aiData.level) {
|
||
const levelMap = { "轻微": 0, "轻微隐患": 0, "一般": 0, "一般隐患": 0, "重大": 1, "重大隐患": 1 };
|
||
const levelIndex = levelMap[aiData.level];
|
||
if (levelIndex !== void 0) {
|
||
formData.level = levelIndex;
|
||
common_vendor.nextTick$1(() => {
|
||
if (levelChooseRef.value && levelChooseRef.value.$data) {
|
||
levelChooseRef.value.$data.currentIndex = levelIndex;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
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 pages/hiddendanger/Inspection.vue:721", "AI分析接口调用失败:", error);
|
||
common_vendor.index.showToast({ title: "AI分析失败,请重试", icon: "none" });
|
||
} finally {
|
||
aiAnalyzing.value = false;
|
||
}
|
||
};
|
||
const tagOptions = common_vendor.ref([]);
|
||
const fetchTagOptions = async () => {
|
||
try {
|
||
const res = await request_api.getHiddenDangerLabelList();
|
||
if (res.code === 0) {
|
||
tagOptions.value = res.data.map((item) => ({
|
||
id: item.id,
|
||
title: item.name
|
||
}));
|
||
} else {
|
||
common_vendor.index.showToast({
|
||
title: res.msg || "获取标签列表失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
} catch (error) {
|
||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:744", error);
|
||
common_vendor.index.showToast({
|
||
title: "请求失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
};
|
||
fetchTagOptions();
|
||
const levelOptions = common_vendor.ref([
|
||
// {
|
||
// id: 1,
|
||
// title: '轻微隐患'
|
||
// },
|
||
{
|
||
id: 2,
|
||
title: "一般隐患"
|
||
},
|
||
{
|
||
id: 3,
|
||
title: "重大隐患"
|
||
}
|
||
]);
|
||
const sourceOptions = common_vendor.ref([
|
||
{
|
||
id: 1,
|
||
title: "部门检查"
|
||
},
|
||
{
|
||
id: 2,
|
||
title: "都导检查"
|
||
},
|
||
{
|
||
id: 3,
|
||
title: "企业自查"
|
||
},
|
||
{
|
||
id: 4,
|
||
title: "行业互查"
|
||
}
|
||
]);
|
||
common_vendor.watch(() => formData.source, (newVal) => {
|
||
const selected = sourceOptions.value[newVal];
|
||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:791", "隐患来源选择结果:", {
|
||
索引: newVal,
|
||
选中项: selected,
|
||
id: selected == null ? void 0 : selected.id,
|
||
title: selected == null ? void 0 : selected.title
|
||
});
|
||
});
|
||
const statusTabs = common_vendor.ref([
|
||
{ label: "全部", value: null },
|
||
{ label: "待交办", value: 1 },
|
||
{ label: "待整改", value: 2 },
|
||
{ label: "待验收", value: 3 },
|
||
{ label: "待销号", value: 4 },
|
||
{ label: "已完成", value: 5 }
|
||
]);
|
||
const activeTab = common_vendor.ref(0);
|
||
const filteredList = common_vendor.computed(() => {
|
||
const currentTab = statusTabs.value[activeTab.value];
|
||
if (!currentTab || currentTab.value === null) {
|
||
return hiddenDangerList.value;
|
||
}
|
||
return hiddenDangerList.value.filter((item) => item.status === currentTab.value);
|
||
});
|
||
return (_ctx, _cache) => {
|
||
return common_vendor.e({
|
||
a: common_vendor.f(statusTabs.value, (tab, index, i0) => {
|
||
return common_vendor.e({
|
||
a: common_vendor.t(tab.label),
|
||
b: activeTab.value === index
|
||
}, activeTab.value === index ? {} : {}, {
|
||
c: index,
|
||
d: activeTab.value === index ? 1 : "",
|
||
e: common_vendor.o(($event) => activeTab.value = index, index)
|
||
});
|
||
}),
|
||
b: filteredList.value.length === 0
|
||
}, filteredList.value.length === 0 ? {} : {}, {
|
||
c: common_vendor.f(filteredList.value, (item, k0, i0) => {
|
||
return common_vendor.e({
|
||
a: common_vendor.t(item.title),
|
||
b: common_vendor.t(item.statusName),
|
||
c: common_vendor.t(item.levelName),
|
||
d: item.levelName === "轻微隐患" ? 1 : "",
|
||
e: item.levelName === "一般隐患" ? 1 : "",
|
||
f: item.levelName === "重大隐患" ? 1 : "",
|
||
g: common_vendor.t(item.address),
|
||
h: common_vendor.t(item.createdAt),
|
||
i: common_vendor.o(($event) => details(item), item.hazardId),
|
||
j: item.statusName === "待整改" && item.canEdit
|
||
}, item.statusName === "待整改" && item.canEdit ? {
|
||
k: common_vendor.o(($event) => assignHazard(item), item.hazardId)
|
||
} : {}, {
|
||
l: item.statusName === "待整改" && item.canEdit
|
||
}, item.statusName === "待整改" && item.canEdit ? {
|
||
m: common_vendor.o(($event) => Rectification(item), item.hazardId)
|
||
} : {}, {
|
||
n: item.statusName === "待验收" && item.canEdit
|
||
}, item.statusName === "待验收" && item.canEdit ? {
|
||
o: common_vendor.o(($event) => editRectification(item), item.hazardId)
|
||
} : {}, {
|
||
p: item.statusName === "待验收" && canAcceptance.value
|
||
}, item.statusName === "待验收" && canAcceptance.value ? {
|
||
q: common_vendor.o(($event) => acceptance(item), item.hazardId)
|
||
} : {}, {
|
||
r: item.statusName === "待交办"
|
||
}, item.statusName === "待交办" ? {
|
||
s: common_vendor.o(($event) => assignHazard(item), item.hazardId)
|
||
} : {}, {
|
||
t: item.hazardId
|
||
});
|
||
}),
|
||
d: common_vendor.o(($event) => showAddPopup.value = true),
|
||
e: common_vendor.o(($event) => showAddPopup.value = false),
|
||
f: common_vendor.o(($event) => formData.source = $event),
|
||
g: common_vendor.p({
|
||
options: sourceOptions.value,
|
||
wrap: false,
|
||
["item-width"]: "152rpx",
|
||
["item-height"]: "64rpx",
|
||
modelValue: formData.source
|
||
}),
|
||
h: common_vendor.o(common_vendor.unref(afterRead)),
|
||
i: common_vendor.o(common_vendor.unref(deletePic)),
|
||
j: common_vendor.p({
|
||
fileList: fileList1.value,
|
||
name: "1",
|
||
multiple: true,
|
||
imageMode: "aspectFill",
|
||
maxCount: 10
|
||
}),
|
||
k: canvasWidth.value,
|
||
l: canvasHeight.value,
|
||
m: canvasWidth.value + "px",
|
||
n: canvasHeight.value + "px",
|
||
o: !aiAnalyzing.value
|
||
}, !aiAnalyzing.value ? {} : {}, {
|
||
p: common_vendor.t(aiAnalyzing.value ? "AI识别中..." : "AI 识别隐患"),
|
||
q: aiAnalyzing.value,
|
||
r: aiAnalyzing.value,
|
||
s: common_vendor.o(handleAiAnalyze),
|
||
t: common_vendor.o(($event) => formData.title = $event),
|
||
v: common_vendor.p({
|
||
placeholder: "请输入内容",
|
||
border: "surround",
|
||
modelValue: formData.title
|
||
}),
|
||
w: common_vendor.sr(levelChooseRef, "b44c631d-4,b44c631d-0", {
|
||
"k": "levelChooseRef"
|
||
}),
|
||
x: common_vendor.o(($event) => formData.level = $event),
|
||
y: common_vendor.p({
|
||
options: levelOptions.value,
|
||
wrap: false,
|
||
["item-width"]: "183rpx",
|
||
["item-height"]: "72rpx",
|
||
modelValue: formData.level
|
||
}),
|
||
z: common_vendor.o(($event) => selectedAddress.value = $event),
|
||
A: common_vendor.p({
|
||
placeholder: "请输入地址",
|
||
border: "surround",
|
||
modelValue: selectedAddress.value
|
||
}),
|
||
B: common_vendor.o(chooseLocation),
|
||
C: common_vendor.t(formData.regulationName || "请选择法律依据"),
|
||
D: !formData.regulationName ? 1 : "",
|
||
E: common_vendor.o(openLawPopup),
|
||
F: common_vendor.t(selectedAreaName.value || "请选择隐患区域"),
|
||
G: !selectedAreaName.value ? 1 : "",
|
||
H: common_vendor.o(($event) => showAreaPicker.value = true),
|
||
I: common_vendor.o(($event) => formData.description = $event),
|
||
J: common_vendor.p({
|
||
placeholder: "请输入内容",
|
||
modelValue: formData.description
|
||
}),
|
||
K: common_vendor.o(($event) => formData.tagIndex = $event),
|
||
L: common_vendor.p({
|
||
options: tagOptions.value,
|
||
modelValue: formData.tagIndex
|
||
}),
|
||
M: common_vendor.o(($event) => showAddPopup.value = false),
|
||
N: common_vendor.o(handleAdd),
|
||
O: common_vendor.o(($event) => showAddPopup.value = false),
|
||
P: common_vendor.p({
|
||
show: showAddPopup.value,
|
||
mode: "center",
|
||
round: "20",
|
||
["safe-area-inset-bottom"]: false
|
||
}),
|
||
Q: common_vendor.o(($event) => showLawPopup.value = false),
|
||
R: common_vendor.o(searchRegulation),
|
||
S: lawKeyword.value,
|
||
T: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
|
||
U: common_vendor.o(searchRegulation),
|
||
V: lawLoading.value && lawList.value.length === 0
|
||
}, lawLoading.value && lawList.value.length === 0 ? {} : !lawLoading.value && lawList.value.length === 0 ? {} : common_vendor.e({
|
||
X: 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)
|
||
};
|
||
}),
|
||
Y: lawLoading.value
|
||
}, lawLoading.value ? {} : {}), {
|
||
W: !lawLoading.value && lawList.value.length === 0,
|
||
Z: common_vendor.o(loadMoreLaw),
|
||
aa: common_vendor.o(($event) => showLawPopup.value = false),
|
||
ab: common_vendor.o(confirmLaw),
|
||
ac: common_vendor.o(($event) => showLawPopup.value = false),
|
||
ad: common_vendor.p({
|
||
show: showLawPopup.value,
|
||
mode: "center",
|
||
round: "20",
|
||
["safe-area-inset-bottom"]: false
|
||
}),
|
||
ae: common_vendor.o(($event) => showAreaPicker.value = false),
|
||
af: common_vendor.o(confirmAreaSelect),
|
||
ag: 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)
|
||
});
|
||
}),
|
||
ah: areaList.value.length === 0
|
||
}, areaList.value.length === 0 ? {} : {}, {
|
||
ai: common_vendor.o(($event) => showAreaPicker.value = false),
|
||
aj: common_vendor.p({
|
||
show: showAreaPicker.value,
|
||
mode: "bottom",
|
||
round: "20"
|
||
}),
|
||
ak: common_vendor.gei(_ctx, "")
|
||
});
|
||
};
|
||
}
|
||
};
|
||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b44c631d"]]);
|
||
wx.createPage(MiniProgramPage);
|
||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/hiddendanger/Inspection.js.map
|