v1.2.1版本,优化调整了很多,整改验收阶段新加字段
This commit is contained in:
@@ -2,23 +2,23 @@
|
||||
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_watermark = require("../../utils/watermark.js");
|
||||
const request_request = require("../../request/request.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_choose2 = common_vendor.resolveComponent("up-choose");
|
||||
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_choose2 + _easycom_up_textarea2 + _easycom_u_popup2)();
|
||||
(_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_choose = () => "../../uni_modules/uview-plus/components/u-choose/u-choose.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_choose + _easycom_up_textarea + _easycom_u_popup)();
|
||||
(_easycom_up_choose + _easycom_up_upload + _easycom_up_input + _easycom_up_textarea + _easycom_u_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "Inspection",
|
||||
@@ -37,10 +37,10 @@ const _sfc_main = {
|
||||
if (userInfoStr) {
|
||||
const userInfo = JSON.parse(userInfoStr);
|
||||
userRole.value = userInfo.role || "";
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:283", "当前用户角色:", userRole.value);
|
||||
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:286", "获取用户信息失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:289", "获取用户信息失败:", error);
|
||||
}
|
||||
};
|
||||
getUserRole();
|
||||
@@ -58,7 +58,7 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:311", "获取任务信息失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:314", "获取任务信息失败:", error);
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
@@ -132,7 +132,7 @@ const _sfc_main = {
|
||||
hasMoreLaw.value = lawList.value.length < total;
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:394", "获取法规列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:397", "获取法规列表失败:", error);
|
||||
} finally {
|
||||
lawLoading.value = false;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ const _sfc_main = {
|
||||
areaList.value = res.data.records;
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:438", "获取区域列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:441", "获取区域列表失败:", error);
|
||||
}
|
||||
};
|
||||
fetchAreaList();
|
||||
@@ -180,26 +180,26 @@ const _sfc_main = {
|
||||
showAreaPicker.value = false;
|
||||
};
|
||||
const chooseLocation = () => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:454", "chooseLocation called");
|
||||
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:463", "获取当前位置成功:", 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:469", "选择位置成功:", 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:478", "选择位置失败:", 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({
|
||||
@@ -211,17 +211,17 @@ const _sfc_main = {
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:492", "获取当前位置失败:", 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:496", "选择位置成功:", 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:503", "选择位置失败:", 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({
|
||||
@@ -251,19 +251,10 @@ const _sfc_main = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const attachments = fileList1.value.map((file) => {
|
||||
const path = file.serverPath || "";
|
||||
const fileName = path ? path.split("/").pop() : file.name || "";
|
||||
return {
|
||||
fileName: fileName || "",
|
||||
filePath: path,
|
||||
fileType: file.type || "image/png",
|
||||
fileSize: file.size || 0
|
||||
};
|
||||
});
|
||||
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:550", "innnn", sourceOptions);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:546", "innnn", sourceOptions);
|
||||
const params = {
|
||||
title: formData.title,
|
||||
//标题
|
||||
@@ -292,7 +283,7 @@ const _sfc_main = {
|
||||
regulationId: formData.regulationId || null
|
||||
// 法律依据ID
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:569", "提交的参数:", params);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:565", "提交的参数:", params);
|
||||
try {
|
||||
const res = await request_api.addHiddenDanger(params);
|
||||
if (res.code === 0) {
|
||||
@@ -321,7 +312,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:602", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:598", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "请求失败",
|
||||
icon: "none"
|
||||
@@ -341,7 +332,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:623", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:619", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "请求失败",
|
||||
icon: "none"
|
||||
@@ -357,9 +348,11 @@ const _sfc_main = {
|
||||
});
|
||||
};
|
||||
const Rectification = (item) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/hiddendanger/rectification?hazardId=${item.hazardId}&assignId=${item.assignId}`
|
||||
});
|
||||
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({
|
||||
@@ -377,71 +370,15 @@ const _sfc_main = {
|
||||
});
|
||||
};
|
||||
const fileList1 = common_vendor.ref([]);
|
||||
const deletePic = (event) => {
|
||||
fileList1.value.splice(event.index, 1);
|
||||
};
|
||||
const afterRead = async (event) => {
|
||||
let lists = [].concat(event.file);
|
||||
let fileListLen = fileList1.value.length;
|
||||
lists.map((item) => {
|
||||
fileList1.value.push({
|
||||
...item,
|
||||
status: "uploading",
|
||||
message: "上传中"
|
||||
});
|
||||
});
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
let watermarkedUrl = lists[i].url;
|
||||
try {
|
||||
const instance = common_vendor.getCurrentInstance();
|
||||
watermarkedUrl = await utils_watermark.addTimestampWatermark({
|
||||
tempFilePath: lists[i].url,
|
||||
canvasId: "watermarkCanvas",
|
||||
canvasWidthRef: canvasWidth,
|
||||
canvasHeightRef: canvasHeight,
|
||||
instance
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:697", "加水印失败,将使用原图上传:", e);
|
||||
}
|
||||
const result = await uploadFilePromise(watermarkedUrl);
|
||||
let item = fileList1.value[fileListLen];
|
||||
const serverPath = typeof result === "string" ? result : (result == null ? void 0 : result.url) || (result == null ? void 0 : result.path) || "";
|
||||
fileList1.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: "success",
|
||||
message: "",
|
||||
// url: baseUrl + serverPath,
|
||||
url: request_request.toImageUrl(serverPath),
|
||||
serverPath
|
||||
});
|
||||
fileListLen++;
|
||||
const uploadInstance = common_vendor.getCurrentInstance();
|
||||
const { afterRead, deletePic } = utils_upload.createUploadListHandlers(fileList1, {
|
||||
watermark: {
|
||||
canvasId: "watermarkCanvas",
|
||||
canvasWidthRef: canvasWidth,
|
||||
canvasHeightRef: canvasHeight,
|
||||
instance: uploadInstance
|
||||
}
|
||||
};
|
||||
const uploadFilePromise = (filePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: request_request.baseUrl + "/frontend/attachment/upload",
|
||||
filePath,
|
||||
name: "file",
|
||||
header: {
|
||||
"Authorization": request_request.getToken()
|
||||
},
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.data);
|
||||
if (data.code === 0) {
|
||||
resolve(data.data);
|
||||
} else {
|
||||
reject(data.msg || "上传失败");
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:732", "上传失败:", err);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
const aiAnalyzing = common_vendor.ref(false);
|
||||
const handleAiAnalyze = async () => {
|
||||
const imageFiles = fileList1.value.filter((f) => {
|
||||
@@ -454,14 +391,14 @@ const _sfc_main = {
|
||||
const fullImageUrl = imageFiles[0].url;
|
||||
aiAnalyzing.value = true;
|
||||
try {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:754", "开始调用AI分析接口,图片地址:", fullImageUrl);
|
||||
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:762", "AI分析结果:", aiData);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:698", "AI分析结果:", aiData);
|
||||
if (aiData.title)
|
||||
formData.title = aiData.title;
|
||||
if (aiData.description)
|
||||
@@ -483,7 +420,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: analyzeRes.msg || "AI分析失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:785", "AI分析接口调用失败:", 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;
|
||||
@@ -505,7 +442,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:808", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:744", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "请求失败",
|
||||
icon: "none"
|
||||
@@ -530,24 +467,24 @@ const _sfc_main = {
|
||||
const sourceOptions = common_vendor.ref([
|
||||
{
|
||||
id: 1,
|
||||
title: "随手拍"
|
||||
title: "部门检查"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "企业自查"
|
||||
title: "都导检查"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "行业互查"
|
||||
title: "企业自查"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: "专家诊查"
|
||||
title: "行业互查"
|
||||
}
|
||||
]);
|
||||
common_vendor.watch(() => formData.source, (newVal) => {
|
||||
const selected = sourceOptions.value[newVal];
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:855", "隐患来源选择结果:", {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/Inspection.vue:791", "隐患来源选择结果:", {
|
||||
索引: newVal,
|
||||
选中项: selected,
|
||||
id: selected == null ? void 0 : selected.id,
|
||||
@@ -620,50 +557,50 @@ const _sfc_main = {
|
||||
}),
|
||||
d: common_vendor.o(($event) => showAddPopup.value = true),
|
||||
e: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
f: common_vendor.o(afterRead),
|
||||
g: common_vendor.o(deletePic),
|
||||
h: common_vendor.p({
|
||||
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
|
||||
}),
|
||||
i: canvasWidth.value,
|
||||
j: canvasHeight.value,
|
||||
k: canvasWidth.value + "px",
|
||||
l: canvasHeight.value + "px",
|
||||
m: !aiAnalyzing.value
|
||||
k: canvasWidth.value,
|
||||
l: canvasHeight.value,
|
||||
m: canvasWidth.value + "px",
|
||||
n: canvasHeight.value + "px",
|
||||
o: !aiAnalyzing.value
|
||||
}, !aiAnalyzing.value ? {} : {}, {
|
||||
n: common_vendor.t(aiAnalyzing.value ? "AI识别中..." : "AI 识别隐患"),
|
||||
o: aiAnalyzing.value,
|
||||
p: aiAnalyzing.value,
|
||||
q: common_vendor.o(handleAiAnalyze),
|
||||
r: common_vendor.o(($event) => formData.title = $event),
|
||||
s: common_vendor.p({
|
||||
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
|
||||
}),
|
||||
t: common_vendor.sr(levelChooseRef, "b44c631d-3,b44c631d-0", {
|
||||
w: common_vendor.sr(levelChooseRef, "b44c631d-4,b44c631d-0", {
|
||||
"k": "levelChooseRef"
|
||||
}),
|
||||
v: common_vendor.o(($event) => formData.level = $event),
|
||||
w: common_vendor.p({
|
||||
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
|
||||
}),
|
||||
x: common_vendor.o(($event) => formData.source = $event),
|
||||
y: common_vendor.p({
|
||||
options: sourceOptions.value,
|
||||
wrap: false,
|
||||
["item-width"]: "183rpx",
|
||||
["item-height"]: "72rpx",
|
||||
modelValue: formData.source
|
||||
}),
|
||||
z: common_vendor.o(($event) => selectedAddress.value = $event),
|
||||
A: common_vendor.p({
|
||||
placeholder: "请输入地址",
|
||||
@@ -693,7 +630,8 @@ const _sfc_main = {
|
||||
P: common_vendor.p({
|
||||
show: showAddPopup.value,
|
||||
mode: "center",
|
||||
round: "20"
|
||||
round: "20",
|
||||
["safe-area-inset-bottom"]: false
|
||||
}),
|
||||
Q: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
R: common_vendor.o(searchRegulation),
|
||||
@@ -721,7 +659,8 @@ const _sfc_main = {
|
||||
ad: common_vendor.p({
|
||||
show: showLawPopup.value,
|
||||
mode: "center",
|
||||
round: "20"
|
||||
round: "20",
|
||||
["safe-area-inset-bottom"]: false
|
||||
}),
|
||||
ae: common_vendor.o(($event) => showAreaPicker.value = false),
|
||||
af: common_vendor.o(confirmAreaSelect),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "隐患排查",
|
||||
"usingComponents": {
|
||||
"up-choose": "../../uni_modules/uview-plus/components/u-choose/u-choose",
|
||||
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-choose": "../../uni_modules/uview-plus/components/u-choose/u-choose",
|
||||
"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
@@ -132,6 +132,36 @@
|
||||
max-height: 900rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.source-choose-scroll.data-v-b44c631d {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.source-choose-scroll.data-v-b44c631d .up-choose {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.source-choose-scroll.data-v-b44c631d .u-tag-wrapper {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.source-choose-scroll.data-v-b44c631d .u-tag {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
box-sizing: border-box;
|
||||
padding: 0 8rpx !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
.source-choose-scroll.data-v-b44c631d .u-tag__content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
.source-choose-scroll.data-v-b44c631d .u-tag__text {
|
||||
font-size: 24rpx !important;
|
||||
line-height: 1.3 !important;
|
||||
text-align: center;
|
||||
}
|
||||
.popup-footer.data-v-b44c631d {
|
||||
display: flex;
|
||||
border-top: 1rpx solid #eee;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const request_request = require("../../request/request.js");
|
||||
const utils_watermark = require("../../utils/watermark.js");
|
||||
const utils_upload = require("../../utils/upload.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
|
||||
const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload");
|
||||
@@ -23,8 +23,24 @@ const _sfc_main = {
|
||||
const assignId = common_vendor.ref("");
|
||||
const rectifyData = common_vendor.reactive({
|
||||
rectifyPlan: "",
|
||||
rectifyResult: ""
|
||||
rectificationMeasures: "",
|
||||
controlMeasures: "",
|
||||
rectifyResult: "",
|
||||
planCost: null,
|
||||
actualCost: null,
|
||||
rectifierName: "",
|
||||
rectifyStatusName: ""
|
||||
});
|
||||
const formatMoney = (value) => {
|
||||
if (value === null || value === void 0 || value === "") {
|
||||
return "暂无";
|
||||
}
|
||||
const num = Number(value);
|
||||
if (Number.isNaN(num)) {
|
||||
return "暂无";
|
||||
}
|
||||
return `${num.toFixed(2)} 元`;
|
||||
};
|
||||
const rectifyAttachments = common_vendor.ref([]);
|
||||
const formData = common_vendor.reactive({
|
||||
result: 1,
|
||||
@@ -63,45 +79,61 @@ const _sfc_main = {
|
||||
urls
|
||||
});
|
||||
};
|
||||
const resolveAssignWithRectify = (assigns) => {
|
||||
if (!(assigns == null ? void 0 : assigns.length))
|
||||
return null;
|
||||
if (rectifyId.value) {
|
||||
const byRectifyId = assigns.find(
|
||||
(item) => item.rectify && String(item.rectify.rectifyId) === String(rectifyId.value)
|
||||
);
|
||||
if (byRectifyId)
|
||||
return byRectifyId;
|
||||
}
|
||||
if (assignId.value) {
|
||||
const byAssignId = assigns.find(
|
||||
(item) => String(item.assignId) === String(assignId.value) && item.rectify
|
||||
);
|
||||
if (byAssignId)
|
||||
return byAssignId;
|
||||
}
|
||||
return assigns.find((item) => item.rectify) || null;
|
||||
};
|
||||
const applyRectifyData = (rectify) => {
|
||||
if (!rectify)
|
||||
return;
|
||||
rectifyData.rectifyPlan = rectify.rectifyPlan || "";
|
||||
rectifyData.rectificationMeasures = rectify.rectificationMeasures || "";
|
||||
rectifyData.controlMeasures = rectify.controlMeasures || "";
|
||||
rectifyData.rectifyResult = rectify.rectifyResult || "";
|
||||
rectifyData.planCost = rectify.planCost ?? null;
|
||||
rectifyData.actualCost = rectify.actualCost ?? null;
|
||||
rectifyData.rectifierName = rectify.rectifierName || "";
|
||||
rectifyData.rectifyStatusName = rectify.rectifyStatusName || "";
|
||||
rectifyAttachments.value = rectify.attachments || [];
|
||||
};
|
||||
const fetchDetail = async () => {
|
||||
if (!hazardId.value || !assignId.value)
|
||||
if (!hazardId.value)
|
||||
return;
|
||||
try {
|
||||
const res = await request_api.getHiddenDangerDetail({ hazardId: hazardId.value, assignId: assignId.value });
|
||||
const res = await request_api.getHiddenDangerDetail({
|
||||
hazardId: hazardId.value,
|
||||
assignId: assignId.value
|
||||
});
|
||||
if (res.code === 0 && res.data) {
|
||||
if (res.data.assigns && res.data.assigns.length > 0) {
|
||||
const assign = res.data.assigns[0];
|
||||
if (assign.rectify) {
|
||||
rectifyData.rectifyPlan = assign.rectify.rectifyPlan || "";
|
||||
rectifyData.rectifyResult = assign.rectify.rectifyResult || "";
|
||||
if (assign.rectify.attachments) {
|
||||
rectifyAttachments.value = assign.rectify.attachments;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:167", "整改记录:", rectifyData);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:168", "整改附件:", rectifyAttachments.value);
|
||||
}
|
||||
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:240", "整改记录:", rectifyData);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:241", "整改附件:", rectifyAttachments.value);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:175", "获取隐患详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:247", "获取隐患详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
if (options.rectifyId) {
|
||||
rectifyId.value = options.rectifyId;
|
||||
}
|
||||
if (options.hazardId) {
|
||||
hazardId.value = options.hazardId;
|
||||
}
|
||||
if (options.assignId) {
|
||||
assignId.value = options.assignId;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:190", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value });
|
||||
fetchDetail();
|
||||
});
|
||||
const handleCancel = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
@@ -138,24 +170,7 @@ const _sfc_main = {
|
||||
}
|
||||
};
|
||||
const executeSubmit = async () => {
|
||||
const attachments = fileList1.value.map((file) => {
|
||||
let url = "";
|
||||
if (typeof file.url === "string") {
|
||||
url = file.url;
|
||||
} else if (file.url && typeof file.url === "object") {
|
||||
url = file.url.url || file.url.path || "";
|
||||
}
|
||||
if (typeof url === "string" && url.startsWith("http")) {
|
||||
url = url.replace(request_request.imageBaseUrl, "");
|
||||
}
|
||||
const fileName = typeof url === "string" && url ? url.split("/").pop() : file.name || "";
|
||||
return {
|
||||
fileName: fileName || "",
|
||||
filePath: url || "",
|
||||
fileType: file.type || "image/png",
|
||||
fileSize: file.size || 0
|
||||
};
|
||||
});
|
||||
const attachments = fileList1.value.filter((f) => f.status === "success").map((file) => utils_upload.buildAttachmentItem(file));
|
||||
const params = {
|
||||
rectifyId: Number(rectifyId.value),
|
||||
result: formData.result,
|
||||
@@ -164,7 +179,7 @@ const _sfc_main = {
|
||||
signPath: signatureServerPath.value || ""
|
||||
// 电子签名路径
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:271", "提交验收参数:", params);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:311", "提交验收参数:", params);
|
||||
try {
|
||||
const res = await request_api.acceptanceRectification(params);
|
||||
common_vendor.index.hideLoading();
|
||||
@@ -185,7 +200,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:293", "验收失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:333", "验收失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "请求失败",
|
||||
icon: "none"
|
||||
@@ -194,76 +209,15 @@ const _sfc_main = {
|
||||
isSubmitting.value = false;
|
||||
}
|
||||
};
|
||||
const deletePic = (event) => {
|
||||
fileList1.value.splice(event.index, 1);
|
||||
};
|
||||
const addWatermark = (tempFilePath) => {
|
||||
const instance = common_vendor.getCurrentInstance();
|
||||
return utils_watermark.addTimestampWatermark({
|
||||
tempFilePath,
|
||||
const acceptUploadInstance = common_vendor.getCurrentInstance();
|
||||
const { afterRead, deletePic } = utils_upload.createUploadListHandlers(fileList1, {
|
||||
watermark: {
|
||||
canvasId: "watermarkCanvas",
|
||||
canvasWidthRef: canvasWidth,
|
||||
canvasHeightRef: canvasHeight,
|
||||
instance
|
||||
});
|
||||
};
|
||||
const afterRead = async (event) => {
|
||||
let lists = [].concat(event.file);
|
||||
let fileListLen = fileList1.value.length;
|
||||
lists.map((item) => {
|
||||
fileList1.value.push({
|
||||
...item,
|
||||
status: "uploading",
|
||||
message: "处理中..."
|
||||
});
|
||||
});
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
try {
|
||||
const watermarkedUrl = await addWatermark(lists[i].url);
|
||||
const result = await uploadFilePromise(watermarkedUrl);
|
||||
let item = fileList1.value[fileListLen];
|
||||
fileList1.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: "success",
|
||||
message: "",
|
||||
url: request_request.toImageUrl(result.url || result.filePath || result)
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:352", "加水印或上传失败:", e);
|
||||
let item = fileList1.value[fileListLen];
|
||||
fileList1.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: "failed",
|
||||
message: "处理失败"
|
||||
});
|
||||
}
|
||||
fileListLen++;
|
||||
instance: acceptUploadInstance
|
||||
}
|
||||
};
|
||||
const uploadFilePromise = (filePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: request_request.baseUrl + "/frontend/attachment/upload",
|
||||
filePath,
|
||||
name: "file",
|
||||
header: {
|
||||
"Authorization": request_request.getToken()
|
||||
},
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.data);
|
||||
if (data.code === 0) {
|
||||
resolve(data.data);
|
||||
} else {
|
||||
reject(data.msg || "上传失败");
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:382", "上传失败:", err);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
const saveDraft = () => {
|
||||
if (isRestoring.value || !isInitialized.value)
|
||||
return;
|
||||
@@ -349,7 +303,7 @@ const _sfc_main = {
|
||||
duration: 2500
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:502", "解析草稿失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:466", "解析草稿失败:", e);
|
||||
isRestoring.value = false;
|
||||
isInitialized.value = true;
|
||||
}
|
||||
@@ -391,17 +345,18 @@ const _sfc_main = {
|
||||
};
|
||||
const onSignatureConfirm = async (tempFilePath) => {
|
||||
try {
|
||||
const res = await uploadFilePromise(tempFilePath);
|
||||
const path = res && typeof res === "object" ? res.url || res.filePath || "" : res || "";
|
||||
signatureServerPath.value = path;
|
||||
signatureUrl.value = path.startsWith("http") ? path : request_request.baseUrl.replace("/api", "") + path;
|
||||
const { url } = await utils_upload.uploadToCloud(tempFilePath);
|
||||
signatureServerPath.value = url;
|
||||
signatureUrl.value = url;
|
||||
showCanvas.value = false;
|
||||
isSignatureEmpty.value = false;
|
||||
if (isSubmitting.value) {
|
||||
await executeSubmit();
|
||||
}
|
||||
} catch (err) {
|
||||
isSubmitting.value = false;
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:573", "签名上传失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:536", "签名上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -410,7 +365,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:584", "获取系统信息失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/acceptance.vue:547", "获取系统信息失败:", e);
|
||||
}
|
||||
if (options.rectifyId) {
|
||||
rectifyId.value = options.rectifyId;
|
||||
@@ -421,17 +376,23 @@ const _sfc_main = {
|
||||
if (options.assignId) {
|
||||
assignId.value = options.assignId;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:595", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value });
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/acceptance.vue:558", "验收页面参数:", { rectifyId: rectifyId.value, hazardId: hazardId.value, assignId: assignId.value });
|
||||
fetchDetail();
|
||||
restoreDraft();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(rectifyData.rectifyPlan || "暂无"),
|
||||
b: common_vendor.t(rectifyData.rectifyResult || "暂无"),
|
||||
c: rectifyAttachments.value.length > 0
|
||||
b: common_vendor.t(rectifyData.rectificationMeasures || "暂无"),
|
||||
c: common_vendor.t(rectifyData.controlMeasures || "暂无"),
|
||||
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
|
||||
}, rectifyAttachments.value.length > 0 ? {
|
||||
d: common_vendor.f(rectifyAttachments.value, (img, idx, i0) => {
|
||||
j: common_vendor.f(rectifyAttachments.value, (img, idx, i0) => {
|
||||
return {
|
||||
a: idx,
|
||||
b: getFullPath(img.filePath),
|
||||
@@ -439,48 +400,48 @@ const _sfc_main = {
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
e: common_vendor.n(formData.result === 1 ? "active" : ""),
|
||||
f: common_vendor.o(($event) => formData.result = 1),
|
||||
g: common_vendor.n(formData.result === 2 ? "active" : ""),
|
||||
h: common_vendor.o(($event) => formData.result = 2),
|
||||
i: common_vendor.o(($event) => formData.verifyRemark = $event),
|
||||
j: common_vendor.p({
|
||||
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({
|
||||
placeholder: "请输入验收备注",
|
||||
modelValue: formData.verifyRemark
|
||||
}),
|
||||
k: common_vendor.o(afterRead),
|
||||
l: common_vendor.o(deletePic),
|
||||
m: common_vendor.p({
|
||||
q: common_vendor.o(common_vendor.unref(afterRead)),
|
||||
r: common_vendor.o(common_vendor.unref(deletePic)),
|
||||
s: common_vendor.p({
|
||||
fileList: fileList1.value,
|
||||
name: "1",
|
||||
multiple: true,
|
||||
imageMode: "aspectFill",
|
||||
maxCount: 10
|
||||
}),
|
||||
n: canvasWidth.value,
|
||||
o: canvasHeight.value,
|
||||
p: canvasWidth.value + "px",
|
||||
q: canvasHeight.value + "px",
|
||||
r: showCanvas.value
|
||||
t: canvasWidth.value,
|
||||
v: canvasHeight.value,
|
||||
w: canvasWidth.value + "px",
|
||||
x: canvasHeight.value + "px",
|
||||
y: showCanvas.value
|
||||
}, showCanvas.value ? {
|
||||
s: common_vendor.o(clearSignature)
|
||||
z: common_vendor.o(clearSignature)
|
||||
} : {
|
||||
t: common_vendor.o(reSign)
|
||||
A: common_vendor.o(reSign)
|
||||
}, {
|
||||
v: !showCanvas.value
|
||||
B: !showCanvas.value
|
||||
}, !showCanvas.value ? {
|
||||
w: signatureUrl.value
|
||||
C: signatureUrl.value
|
||||
} : {}, {
|
||||
x: showCanvas.value
|
||||
D: showCanvas.value
|
||||
}, showCanvas.value ? {
|
||||
y: common_vendor.sr(signatureRef, "39f9b795-2", {
|
||||
E: common_vendor.sr(signatureRef, "39f9b795-2", {
|
||||
"k": "signatureRef"
|
||||
}),
|
||||
z: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
|
||||
A: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
B: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
C: common_vendor.o(($event) => isSignatureEmpty.value = true),
|
||||
D: common_vendor.p({
|
||||
F: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
|
||||
G: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
H: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
I: common_vendor.o(($event) => isSignatureEmpty.value = true),
|
||||
J: common_vendor.p({
|
||||
width: signatureWidth.value,
|
||||
height: 160,
|
||||
backgroundColor: "#f8f8f8",
|
||||
@@ -489,9 +450,9 @@ const _sfc_main = {
|
||||
enableHistory: false
|
||||
})
|
||||
} : {}, {
|
||||
E: common_vendor.o(handleCancel),
|
||||
F: common_vendor.o(handleSubmit),
|
||||
G: common_vendor.gei(_ctx, "")
|
||||
K: common_vendor.o(handleCancel),
|
||||
L: common_vendor.o(handleSubmit),
|
||||
M: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,25 +2,76 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
const _easycom_up_datetime_picker2 = common_vendor.resolveComponent("up-datetime-picker");
|
||||
(_easycom_up_picker2 + _easycom_up_datetime_picker2)();
|
||||
(_easycom_u_popup2 + _easycom_up_datetime_picker2)();
|
||||
}
|
||||
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
|
||||
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";
|
||||
if (!Math) {
|
||||
(_easycom_up_picker + _easycom_up_datetime_picker)();
|
||||
(_easycom_u_popup + _easycom_up_datetime_picker)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "assignment",
|
||||
setup(__props) {
|
||||
const hazardId = common_vendor.ref("");
|
||||
const assignId = common_vendor.ref("");
|
||||
const showUserPicker = common_vendor.ref(false);
|
||||
const showUserPopup = common_vendor.ref(false);
|
||||
const selectedUser = common_vendor.ref("");
|
||||
const selectedUserId = common_vendor.ref("");
|
||||
const userColumns = common_vendor.ref([["暂无数据"]]);
|
||||
const userList = common_vendor.ref([]);
|
||||
const deptList = common_vendor.ref([]);
|
||||
const activeDeptIndex = common_vendor.ref(0);
|
||||
const userPickerSelectedId = common_vendor.ref("");
|
||||
const formatUserDisplayName = (user) => {
|
||||
if (user.postName) {
|
||||
return `${user.nickName}_${user.postName}`;
|
||||
}
|
||||
return user.nickName || "";
|
||||
};
|
||||
const currentDeptUsers = common_vendor.computed(() => {
|
||||
const dept = deptList.value[activeDeptIndex.value];
|
||||
return (dept == null ? void 0 : dept.users) || [];
|
||||
});
|
||||
const userPickerSelectedText = common_vendor.computed(() => {
|
||||
if (!userPickerSelectedId.value)
|
||||
return "";
|
||||
for (const dept of deptList.value) {
|
||||
const user = (dept.users || []).find((u) => String(u.userId) === String(userPickerSelectedId.value));
|
||||
if (user)
|
||||
return formatUserDisplayName(user);
|
||||
}
|
||||
return "";
|
||||
});
|
||||
const deptHasSelectedUser = (dept) => {
|
||||
var _a;
|
||||
if (!userPickerSelectedId.value || !((_a = dept.users) == null ? void 0 : _a.length))
|
||||
return false;
|
||||
return dept.users.some((user) => String(user.userId) === String(userPickerSelectedId.value));
|
||||
};
|
||||
const onUserItemClick = (userId) => {
|
||||
userPickerSelectedId.value = String(userId);
|
||||
};
|
||||
const openUserPopup = () => {
|
||||
userPickerSelectedId.value = selectedUserId.value;
|
||||
const firstDeptWithUsers = deptList.value.findIndex((dept) => {
|
||||
var _a;
|
||||
return ((_a = dept.users) == null ? void 0 : _a.length) > 0;
|
||||
});
|
||||
activeDeptIndex.value = firstDeptWithUsers >= 0 ? firstDeptWithUsers : 0;
|
||||
showUserPopup.value = true;
|
||||
};
|
||||
const cancelUserSelect = () => {
|
||||
showUserPopup.value = false;
|
||||
};
|
||||
const confirmUserSelect = () => {
|
||||
if (!userPickerSelectedId.value) {
|
||||
common_vendor.index.showToast({ title: "请选择整改责任人", icon: "none" });
|
||||
return;
|
||||
}
|
||||
selectedUserId.value = String(userPickerSelectedId.value);
|
||||
selectedUser.value = userPickerSelectedText.value;
|
||||
showUserPopup.value = false;
|
||||
};
|
||||
const showDatePicker = common_vendor.ref(false);
|
||||
const dateValue = common_vendor.ref(Date.now());
|
||||
const selectedDate = common_vendor.ref("");
|
||||
@@ -28,38 +79,15 @@ const _sfc_main = {
|
||||
try {
|
||||
const res = await request_api.getDepartmentPersonUsers();
|
||||
if (res.code === 0 && res.data) {
|
||||
const users = [];
|
||||
res.data.forEach((dept) => {
|
||||
if (dept.users && dept.users.length > 0) {
|
||||
dept.users.forEach((user) => {
|
||||
users.push({
|
||||
id: String(user.userId),
|
||||
name: `${user.nickName}(${dept.deptName})`
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
userList.value = users;
|
||||
userColumns.value = [users.map((u) => u.name)];
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:91", "整改人员列表:", users);
|
||||
deptList.value = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:172", "部门人员树:", deptList.value);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:94", "获取部门人员失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:175", "获取部门人员失败:", error);
|
||||
}
|
||||
};
|
||||
const onUserConfirm = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:100", "选择的人员:", e);
|
||||
if (e.value && e.value.length > 0) {
|
||||
selectedUser.value = e.value[0];
|
||||
const user = userList.value.find((u) => u.name === e.value[0]);
|
||||
if (user) {
|
||||
selectedUserId.value = user.id;
|
||||
}
|
||||
}
|
||||
showUserPicker.value = false;
|
||||
};
|
||||
const onDateConfirm = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:114", "选择的日期时间:", e);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:181", "选择的日期时间:", e);
|
||||
const date = new Date(e.value);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
@@ -92,7 +120,7 @@ const _sfc_main = {
|
||||
assignRemark: ""
|
||||
// 交办备注(可选)
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:150", "提交数据:", params);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:217", "提交数据:", params);
|
||||
try {
|
||||
const res = await request_api.assignHiddenDanger(params);
|
||||
if (res.code === 0) {
|
||||
@@ -105,7 +133,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:164", "交办失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:231", "交办失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -168,7 +196,7 @@ const _sfc_main = {
|
||||
duration: 2500
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:239", "解析草稿失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:306", "解析草稿失败:", e);
|
||||
isRestoring.value = false;
|
||||
}
|
||||
}
|
||||
@@ -195,31 +223,63 @@ const _sfc_main = {
|
||||
}, showRestoreBanner.value ? {
|
||||
b: common_vendor.o(($event) => clearDraft(true))
|
||||
} : {}, {
|
||||
c: common_vendor.t(selectedUser.value || "请选择整改人员"),
|
||||
d: common_vendor.n(selectedUser.value ? "" : "text-gray"),
|
||||
e: common_vendor.o(($event) => showUserPicker.value = true),
|
||||
f: common_vendor.o(onUserConfirm),
|
||||
g: common_vendor.o(($event) => showUserPicker.value = false),
|
||||
h: common_vendor.o(($event) => showUserPicker.value = false),
|
||||
i: common_vendor.p({
|
||||
show: showUserPicker.value,
|
||||
columns: userColumns.value
|
||||
c: common_vendor.t(selectedUser.value || "请选择整改责任人"),
|
||||
d: !selectedUser.value ? 1 : "",
|
||||
e: common_vendor.o(openUserPopup),
|
||||
f: common_vendor.o(cancelUserSelect),
|
||||
g: userPickerSelectedId.value
|
||||
}, userPickerSelectedId.value ? {
|
||||
h: common_vendor.t(userPickerSelectedText.value)
|
||||
} : {}, {
|
||||
i: common_vendor.f(deptList.value, (dept, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(dept.deptName),
|
||||
b: deptHasSelectedUser(dept)
|
||||
}, deptHasSelectedUser(dept) ? {} : {}, {
|
||||
c: dept.deptId,
|
||||
d: common_vendor.n({
|
||||
active: activeDeptIndex.value === index
|
||||
}),
|
||||
e: common_vendor.o(($event) => activeDeptIndex.value = index, dept.deptId)
|
||||
});
|
||||
}),
|
||||
j: common_vendor.t(selectedDate.value || "请选择整改期限"),
|
||||
k: common_vendor.n(selectedDate.value ? "" : "text-gray"),
|
||||
l: common_vendor.o(($event) => showDatePicker.value = true),
|
||||
m: common_vendor.o(onDateConfirm),
|
||||
n: common_vendor.o(($event) => showDatePicker.value = false),
|
||||
o: common_vendor.o(($event) => showDatePicker.value = false),
|
||||
p: common_vendor.o(($event) => dateValue.value = $event),
|
||||
q: common_vendor.p({
|
||||
j: currentDeptUsers.value.length === 0
|
||||
}, currentDeptUsers.value.length === 0 ? {} : {
|
||||
k: common_vendor.f(currentDeptUsers.value, (user, k0, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(formatUserDisplayName(user)),
|
||||
b: String(userPickerSelectedId.value) === String(user.userId)
|
||||
}, String(userPickerSelectedId.value) === String(user.userId) ? {} : {}, {
|
||||
c: "user-" + user.userId,
|
||||
d: String(userPickerSelectedId.value) === String(user.userId) ? 1 : "",
|
||||
e: common_vendor.o(($event) => onUserItemClick(user.userId), "user-" + user.userId)
|
||||
});
|
||||
})
|
||||
}, {
|
||||
l: "dept-users-" + activeDeptIndex.value,
|
||||
m: common_vendor.o(cancelUserSelect),
|
||||
n: common_vendor.o(confirmUserSelect),
|
||||
o: common_vendor.o(cancelUserSelect),
|
||||
p: common_vendor.p({
|
||||
show: showUserPopup.value,
|
||||
mode: "bottom",
|
||||
round: "20"
|
||||
}),
|
||||
q: common_vendor.t(selectedDate.value || "请选择整改期限"),
|
||||
r: common_vendor.n(selectedDate.value ? "" : "text-gray"),
|
||||
s: common_vendor.o(($event) => showDatePicker.value = true),
|
||||
t: common_vendor.o(onDateConfirm),
|
||||
v: common_vendor.o(($event) => showDatePicker.value = false),
|
||||
w: common_vendor.o(($event) => showDatePicker.value = false),
|
||||
x: common_vendor.o(($event) => dateValue.value = $event),
|
||||
y: common_vendor.p({
|
||||
show: showDatePicker.value,
|
||||
mode: "datetime",
|
||||
modelValue: dateValue.value
|
||||
}),
|
||||
r: common_vendor.o(handleCancel),
|
||||
s: common_vendor.o(handleSubmit),
|
||||
t: common_vendor.gei(_ctx, "")
|
||||
z: common_vendor.o(handleCancel),
|
||||
A: common_vendor.o(handleSubmit),
|
||||
B: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "隐患交办",
|
||||
"usingComponents": {
|
||||
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="{{['padding', 'page', 'data-v-6209e844', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{t}}"><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="picker-input data-v-6209e844" bindtap="{{e}}"><text class="{{['data-v-6209e844', d]}}">{{c}}</text></view><up-picker wx:if="{{i}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" bindconfirm="{{f}}" bindcancel="{{g}}" bindclose="{{h}}" u-i="6209e844-0" bind:__l="__l" u-p="{{i}}"></up-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><view class="picker-input data-v-6209e844" bindtap="{{l}}"><text class="{{['data-v-6209e844', k]}}">{{j}}</text></view><up-datetime-picker wx:if="{{q}}" class="data-v-6209e844" virtualHostClass="data-v-6209e844" bindconfirm="{{m}}" bindcancel="{{n}}" bindclose="{{o}}" u-i="6209e844-1" bind:__l="__l" bindupdateModelValue="{{p}}" u-p="{{q}}"></up-datetime-picker><view class="btn-group margin-top-xl data-v-6209e844"><button class="btn-cancel data-v-6209e844" bindtap="{{r}}">取消</button><button class="btn-confirm bg-blue data-v-6209e844" bindtap="{{s}}">确认</button></view></view></view>
|
||||
<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>
|
||||
@@ -39,6 +39,162 @@
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.select-trigger.data-v-6209e844 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.select-trigger .select-content.data-v-6209e844 {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.user-popup.data-v-6209e844 {
|
||||
background: #fff;
|
||||
}
|
||||
.user-popup .popup-header.data-v-6209e844 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
.user-popup .popup-header .popup-title.data-v-6209e844 {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
.user-popup .popup-header .popup-close.data-v-6209e844 {
|
||||
font-size: 40rpx;
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
}
|
||||
.user-popup.cascader-user-popup .selected-summary.data-v-6209e844 {
|
||||
padding: 16rpx 30rpx;
|
||||
background: #f5f7fa;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.user-popup.cascader-user-popup .selected-summary .summary-label.data-v-6209e844 {
|
||||
color: #909399;
|
||||
}
|
||||
.user-popup.cascader-user-popup .selected-summary .summary-text.data-v-6209e844 {
|
||||
color: #333;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-body.data-v-6209e844 {
|
||||
display: flex;
|
||||
height: 600rpx;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-col.data-v-6209e844 {
|
||||
height: 600rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.user-popup.cascader-user-popup .dept-col.data-v-6209e844 {
|
||||
width: 38%;
|
||||
background: #f7f8fa;
|
||||
border-right: 1rpx solid #eee;
|
||||
}
|
||||
.user-popup.cascader-user-popup .user-col.data-v-6209e844 {
|
||||
width: 62%;
|
||||
padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item.data-v-6209e844 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 28rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-bottom: 1rpx solid #eef0f3;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item.active.data-v-6209e844 {
|
||||
background: #fff;
|
||||
color: #2667E9;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item.active.data-v-6209e844::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 6rpx;
|
||||
background: #2667E9;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item-text.data-v-6209e844 {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.user-popup.cascader-user-popup .dept-dot.data-v-6209e844 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: #2667E9;
|
||||
margin-left: 8rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.user-popup.cascader-user-popup .empty-tip.data-v-6209e844 {
|
||||
padding: 80rpx 20rpx;
|
||||
text-align: center;
|
||||
color: #909399;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.user-popup .user-item.data-v-6209e844 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
.user-popup .user-item.data-v-6209e844:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.user-popup .user-item.active .user-item-text.data-v-6209e844 {
|
||||
color: #2667E9;
|
||||
font-weight: 600;
|
||||
}
|
||||
.user-popup .user-item .user-item-text.data-v-6209e844 {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.user-popup .popup-footer.data-v-6209e844 {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
padding: 24rpx 30rpx;
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||||
background: #fff;
|
||||
}
|
||||
.user-popup .popup-footer button.data-v-6209e844 {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.user-popup .popup-footer button.data-v-6209e844::after {
|
||||
border: none;
|
||||
}
|
||||
.user-popup .popup-footer .btn-cancel.data-v-6209e844 {
|
||||
background: #fff;
|
||||
color: #2667E9;
|
||||
border: 2rpx solid #2667E9;
|
||||
}
|
||||
.user-popup .popup-footer .btn-confirm.data-v-6209e844 {
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
.btn-group.data-v-6209e844 {
|
||||
display: flex;
|
||||
gap: 30rpx;
|
||||
|
||||
@@ -1,29 +1,26 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const request_request = require("../../request/request.js");
|
||||
const utils_watermark = require("../../utils/watermark.js");
|
||||
const utils_upload = require("../../utils/upload.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_datetime_picker2 = common_vendor.resolveComponent("up-datetime-picker");
|
||||
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
|
||||
const _easycom_up_checkbox_group2 = common_vendor.resolveComponent("up-checkbox-group");
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload");
|
||||
const _easycom_wd_signature2 = common_vendor.resolveComponent("wd-signature");
|
||||
(_easycom_up_textarea2 + _easycom_up_input2 + _easycom_up_datetime_picker2 + _easycom_up_checkbox2 + _easycom_up_checkbox_group2 + _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_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";
|
||||
const _easycom_up_datetime_picker = () => "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js";
|
||||
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
|
||||
const _easycom_up_checkbox_group = () => "../../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.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_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_up_checkbox_group + _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_wd_signature)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "rectification",
|
||||
@@ -47,6 +44,29 @@ const _sfc_main = {
|
||||
signatureRef.value.clear();
|
||||
}
|
||||
};
|
||||
const resolveSignPathFromData = (data) => {
|
||||
if (!data)
|
||||
return "";
|
||||
return data.signPath || data.signUrl || data.signature || data.signatureUrl || data.signaturePath || "";
|
||||
};
|
||||
const applySignatureFromServer = (signPath) => {
|
||||
const url = signPath ? utils_upload.toSubmitFileUrl(signPath) : "";
|
||||
if (!url) {
|
||||
showCanvas.value = true;
|
||||
signatureServerPath.value = "";
|
||||
signatureUrl.value = "";
|
||||
isSignatureEmpty.value = true;
|
||||
return;
|
||||
}
|
||||
signatureServerPath.value = url;
|
||||
signatureUrl.value = url;
|
||||
showCanvas.value = false;
|
||||
isSignatureEmpty.value = false;
|
||||
};
|
||||
const onSignatureImageError = () => {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:321", "签名图片加载失败:", signatureUrl.value);
|
||||
common_vendor.index.showToast({ title: "签名图片加载失败", icon: "none" });
|
||||
};
|
||||
const reSign = () => {
|
||||
isSignatureEmpty.value = true;
|
||||
showCanvas.value = true;
|
||||
@@ -61,6 +81,10 @@ const _sfc_main = {
|
||||
const formData = common_vendor.reactive({
|
||||
rectifyPlan: "",
|
||||
// 整改方案
|
||||
rectificationMeasures: "",
|
||||
// 整改措施
|
||||
controlMeasures: "",
|
||||
// 管控措施
|
||||
rectifyResult: "",
|
||||
// 整改完成情况
|
||||
planCost: "",
|
||||
@@ -68,140 +92,309 @@ const _sfc_main = {
|
||||
actualCost: ""
|
||||
// 投资资金(实际)
|
||||
});
|
||||
const show = common_vendor.ref(false);
|
||||
const value1 = common_vendor.ref(Date.now());
|
||||
common_vendor.ref("");
|
||||
const cateList = common_vendor.ref([]);
|
||||
const selectedDeadlineDate = common_vendor.ref("");
|
||||
const showRectifyTimePicker = common_vendor.ref(false);
|
||||
const rectifyTimeValue = common_vendor.ref(Date.now());
|
||||
const selectedRectifyTime = common_vendor.ref("");
|
||||
const formatDateValue = (timestamp) => {
|
||||
if (!timestamp)
|
||||
return "";
|
||||
const date = new Date(timestamp);
|
||||
if (Number.isNaN(date.getTime()))
|
||||
return "";
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
const hours = String(date.getHours()).padStart(2, "0");
|
||||
const minutes = String(date.getMinutes()).padStart(2, "0");
|
||||
const seconds = String(date.getSeconds()).padStart(2, "0");
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
};
|
||||
const parseDeadlineToTimestamp = (deadline) => {
|
||||
if (!deadline)
|
||||
return null;
|
||||
const decoded = decodeURIComponent(String(deadline)).trim();
|
||||
const normalized = decoded.replace("T", " ").replace(/-/g, "/");
|
||||
const ts = new Date(normalized).getTime();
|
||||
return Number.isNaN(ts) ? null : ts;
|
||||
};
|
||||
const applyDeadlineFromOptions = (deadline) => {
|
||||
const ts = parseDeadlineToTimestamp(deadline);
|
||||
if (ts) {
|
||||
selectedDeadlineDate.value = formatDateValue(ts);
|
||||
} else if (deadline) {
|
||||
selectedDeadlineDate.value = String(deadline).trim().replace("T", " ");
|
||||
}
|
||||
};
|
||||
const parseIdList = (raw) => {
|
||||
if (raw === null || raw === void 0 || raw === "")
|
||||
return [];
|
||||
if (Array.isArray(raw)) {
|
||||
return raw.map((id) => String(id)).filter(Boolean);
|
||||
}
|
||||
return String(raw).split(",").map((id) => String(id).trim()).filter(Boolean);
|
||||
};
|
||||
const resolveManagerIdsFromDetail = (data) => {
|
||||
const ids = parseIdList(data.manageIds ?? data.managerIds);
|
||||
if (ids.length > 0)
|
||||
return ids;
|
||||
if (Array.isArray(data.managers) && data.managers.length > 0) {
|
||||
return data.managers.map((item) => String(item.userId)).filter(Boolean);
|
||||
}
|
||||
return [];
|
||||
};
|
||||
const buildUserItemFromDetail = (user) => ({
|
||||
id: String(user.userId),
|
||||
name: formatUserDisplayName(user),
|
||||
deptName: user.deptName || ""
|
||||
});
|
||||
const getUsersByIdsFromTree = (ids, tree) => {
|
||||
const userMap = /* @__PURE__ */ new Map();
|
||||
(tree || []).forEach((dept) => {
|
||||
(dept.users || []).forEach((user) => {
|
||||
userMap.set(String(user.userId), buildUserItem(user, dept));
|
||||
});
|
||||
});
|
||||
return ids.map((id) => userMap.get(String(id))).filter(Boolean);
|
||||
};
|
||||
const mergeUsersFromDetailPool = (ids, resolvedUsers) => {
|
||||
const userMap = new Map(resolvedUsers.map((user) => [user.id, user]));
|
||||
ids.forEach((id) => {
|
||||
const key = String(id);
|
||||
if (userMap.has(key))
|
||||
return;
|
||||
const found = detailPersonPool.value.find((user) => String(user.userId) === key);
|
||||
if (found) {
|
||||
userMap.set(key, buildUserItemFromDetail(found));
|
||||
}
|
||||
});
|
||||
return ids.map((id) => userMap.get(String(id))).filter(Boolean);
|
||||
};
|
||||
const applyRectifyTimeValue = (timeStr) => {
|
||||
const ts = parseDeadlineToTimestamp(timeStr);
|
||||
if (ts) {
|
||||
rectifyTimeValue.value = ts;
|
||||
selectedRectifyTime.value = formatDateValue(ts);
|
||||
} else if (timeStr) {
|
||||
selectedRectifyTime.value = String(timeStr).trim().replace("T", " ");
|
||||
}
|
||||
};
|
||||
const initRectifyTimeDefault = () => {
|
||||
rectifyTimeValue.value = Date.now();
|
||||
selectedRectifyTime.value = formatDateValue(rectifyTimeValue.value);
|
||||
};
|
||||
const onRectifyTimeConfirm = (e) => {
|
||||
rectifyTimeValue.value = e.value;
|
||||
selectedRectifyTime.value = formatDateValue(e.value);
|
||||
showRectifyTimePicker.value = false;
|
||||
};
|
||||
const managerDeptList = common_vendor.ref([]);
|
||||
const deptList = common_vendor.ref([]);
|
||||
const detailPersonPool = common_vendor.ref([]);
|
||||
const showManagerPopup = common_vendor.ref(false);
|
||||
const selectedManagerIds = common_vendor.ref([]);
|
||||
const selectedManagers = common_vendor.ref([]);
|
||||
const activeManagerDeptIndex = common_vendor.ref(0);
|
||||
const managerPickerSelectedIds = common_vendor.ref([]);
|
||||
const showUserPopup = common_vendor.ref(false);
|
||||
const selectedUserIds = common_vendor.ref([]);
|
||||
const selectedUsers = common_vendor.ref([]);
|
||||
const selectedUsersText = common_vendor.computed(() => {
|
||||
if (selectedUsers.value.length === 0)
|
||||
return "";
|
||||
if (selectedUsers.value.length <= 2) {
|
||||
return selectedUsers.value.map((u) => u.name).join("、");
|
||||
const activeDeptIndex = common_vendor.ref(0);
|
||||
const userPickerSelectedIds = common_vendor.ref([]);
|
||||
const formatUserDisplayName = (user) => {
|
||||
if (user.postName) {
|
||||
return `${user.nickName}_${user.postName}`;
|
||||
}
|
||||
return `${selectedUsers.value[0].name}等${selectedUsers.value.length}人`;
|
||||
return user.nickName || "";
|
||||
};
|
||||
const buildUserItem = (user, dept) => ({
|
||||
id: String(user.userId),
|
||||
name: formatUserDisplayName(user),
|
||||
deptName: dept.deptName
|
||||
});
|
||||
const onUserChange = (ids) => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:211", "选中的ID:", ids);
|
||||
const buildSelectedPersonText = (users) => {
|
||||
if (users.length === 0)
|
||||
return "";
|
||||
if (users.length <= 2) {
|
||||
return users.map((u) => u.name).join("、");
|
||||
}
|
||||
return `${users[0].name}等${users.length}人`;
|
||||
};
|
||||
const selectedManagersText = common_vendor.computed(() => buildSelectedPersonText(selectedManagers.value));
|
||||
const selectedUsersText = common_vendor.computed(() => buildSelectedPersonText(selectedUsers.value));
|
||||
const currentManagerDeptUsers = common_vendor.computed(() => {
|
||||
const dept = managerDeptList.value[activeManagerDeptIndex.value];
|
||||
return (dept == null ? void 0 : dept.users) || [];
|
||||
});
|
||||
const managerPickerSelectedText = common_vendor.computed(() => {
|
||||
const users = getManagerUsersByIds(managerPickerSelectedIds.value);
|
||||
return buildSelectedPersonText(users);
|
||||
});
|
||||
const managerPickerSelectedSet = common_vendor.computed(() => {
|
||||
return new Set(managerPickerSelectedIds.value.map((id) => String(id)));
|
||||
});
|
||||
const currentDeptUsers = common_vendor.computed(() => {
|
||||
const dept = deptList.value[activeDeptIndex.value];
|
||||
return (dept == null ? void 0 : dept.users) || [];
|
||||
});
|
||||
const userPickerSelectedText = common_vendor.computed(() => {
|
||||
const users = getUsersByIds(userPickerSelectedIds.value);
|
||||
return buildSelectedPersonText(users);
|
||||
});
|
||||
const userPickerSelectedSet = common_vendor.computed(() => {
|
||||
return new Set(userPickerSelectedIds.value.map((id) => String(id)));
|
||||
});
|
||||
const getManagerUsersByIds = (ids) => {
|
||||
let users = getUsersByIdsFromTree(ids, managerDeptList.value);
|
||||
if (users.length < ids.length) {
|
||||
const userDeptUsers = getUsersByIdsFromTree(ids, deptList.value);
|
||||
const userMap = new Map(users.map((user) => [user.id, user]));
|
||||
userDeptUsers.forEach((user) => {
|
||||
if (!userMap.has(user.id))
|
||||
userMap.set(user.id, user);
|
||||
});
|
||||
users = ids.map((id) => userMap.get(String(id))).filter(Boolean);
|
||||
}
|
||||
return mergeUsersFromDetailPool(ids, users);
|
||||
};
|
||||
const getUsersByIds = (ids) => {
|
||||
let users = getUsersByIdsFromTree(ids, deptList.value);
|
||||
return mergeUsersFromDetailPool(ids, users);
|
||||
};
|
||||
const syncSelectedManagersFromIds = (ids) => {
|
||||
selectedManagers.value = getManagerUsersByIds(ids);
|
||||
};
|
||||
const syncSelectedUsersFromIds = (ids) => {
|
||||
selectedUsers.value = getUsersByIds(ids);
|
||||
};
|
||||
const getManagerDeptSelectedCount = (dept) => {
|
||||
var _a;
|
||||
if (!((_a = dept.users) == null ? void 0 : _a.length))
|
||||
return 0;
|
||||
const selectedSet = new Set(managerPickerSelectedIds.value.map(String));
|
||||
return dept.users.filter((user) => selectedSet.has(String(user.userId))).length;
|
||||
};
|
||||
const getDeptSelectedCount = (dept) => {
|
||||
var _a;
|
||||
if (!((_a = dept.users) == null ? void 0 : _a.length))
|
||||
return 0;
|
||||
const selectedSet = new Set(userPickerSelectedIds.value.map(String));
|
||||
return dept.users.filter((user) => selectedSet.has(String(user.userId))).length;
|
||||
};
|
||||
function onManagerCheckChange(userId, checked) {
|
||||
const id = String(userId);
|
||||
if (checked) {
|
||||
if (!managerPickerSelectedSet.value.has(id)) {
|
||||
managerPickerSelectedIds.value = [...managerPickerSelectedIds.value, id];
|
||||
}
|
||||
return;
|
||||
}
|
||||
managerPickerSelectedIds.value = managerPickerSelectedIds.value.filter((item) => String(item) !== id);
|
||||
}
|
||||
function onUserCheckChange(userId, checked) {
|
||||
const id = String(userId);
|
||||
if (checked) {
|
||||
if (!userPickerSelectedSet.value.has(id)) {
|
||||
userPickerSelectedIds.value = [...userPickerSelectedIds.value, id];
|
||||
}
|
||||
return;
|
||||
}
|
||||
userPickerSelectedIds.value = userPickerSelectedIds.value.filter((item) => String(item) !== id);
|
||||
}
|
||||
const openManagerPopup = () => {
|
||||
managerPickerSelectedIds.value = [...selectedManagerIds.value];
|
||||
const firstDeptWithUsers = managerDeptList.value.findIndex((dept) => {
|
||||
var _a;
|
||||
return ((_a = dept.users) == null ? void 0 : _a.length) > 0;
|
||||
});
|
||||
activeManagerDeptIndex.value = firstDeptWithUsers >= 0 ? firstDeptWithUsers : 0;
|
||||
showManagerPopup.value = true;
|
||||
};
|
||||
const cancelManagerSelect = () => {
|
||||
showManagerPopup.value = false;
|
||||
};
|
||||
const openUserPopup = () => {
|
||||
userPickerSelectedIds.value = [...selectedUserIds.value];
|
||||
const firstDeptWithUsers = deptList.value.findIndex((dept) => {
|
||||
var _a;
|
||||
return ((_a = dept.users) == null ? void 0 : _a.length) > 0;
|
||||
});
|
||||
activeDeptIndex.value = firstDeptWithUsers >= 0 ? firstDeptWithUsers : 0;
|
||||
showUserPopup.value = true;
|
||||
};
|
||||
const cancelUserSelect = () => {
|
||||
showUserPopup.value = false;
|
||||
};
|
||||
const confirmManagerSelect = () => {
|
||||
selectedManagerIds.value = managerPickerSelectedIds.value.map((id) => String(id));
|
||||
syncSelectedManagersFromIds(selectedManagerIds.value);
|
||||
showManagerPopup.value = false;
|
||||
};
|
||||
const confirmUserSelect = () => {
|
||||
selectedUsers.value = cateList.value.filter((item) => selectedUserIds.value.includes(item.id));
|
||||
selectedUserIds.value = userPickerSelectedIds.value.map((id) => String(id));
|
||||
syncSelectedUsersFromIds(selectedUserIds.value);
|
||||
showUserPopup.value = false;
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:219", "选中的整改人员:", selectedUsers.value);
|
||||
};
|
||||
const fetchDeptUsers = async () => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:224", "当前hazardId:", hazardId.value);
|
||||
const fetchManagerDeptUsers = async () => {
|
||||
try {
|
||||
const res = await request_api.getDepartmentPersonUsers();
|
||||
if (res.code === 0 && res.data) {
|
||||
managerDeptList.value = res.data;
|
||||
if (selectedManagerIds.value.length > 0) {
|
||||
syncSelectedManagersFromIds(selectedManagerIds.value);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:633", "获取安全管理人员列表失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchRectifyDeptUsers = async () => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:639", "当前hazardId:", hazardId.value);
|
||||
try {
|
||||
const res = await request_api.getDeptUsersWithSubordinates({ hazardId: hazardId.value });
|
||||
if (res.code === 0 && res.data) {
|
||||
const userList = [];
|
||||
res.data.forEach((dept) => {
|
||||
if (dept.users && dept.users.length > 0) {
|
||||
dept.users.forEach((user) => {
|
||||
userList.push({
|
||||
id: String(user.userId),
|
||||
name: `${user.nickName}(${dept.deptName})`
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
cateList.value = userList;
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:242", "整改人员列表:", cateList.value);
|
||||
deptList.value = res.data;
|
||||
if (selectedUserIds.value.length > 0) {
|
||||
syncSelectedUsersFromIds(selectedUserIds.value);
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:647", "整改责任人部门树:", deptList.value);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:245", "获取部门人员失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:650", "获取整改责任人列表失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchPersonnelLists = async () => {
|
||||
await Promise.all([fetchManagerDeptUsers(), fetchRectifyDeptUsers()]);
|
||||
if (selectedManagerIds.value.length > 0) {
|
||||
syncSelectedManagersFromIds(selectedManagerIds.value);
|
||||
}
|
||||
};
|
||||
const fileList1 = common_vendor.ref([]);
|
||||
const deletePic = (event) => {
|
||||
fileList1.value.splice(event.index, 1);
|
||||
};
|
||||
const afterRead = async (event) => {
|
||||
let lists = [].concat(event.file);
|
||||
let fileListLen = fileList1.value.length;
|
||||
lists.map((item) => {
|
||||
fileList1.value.push({
|
||||
...item,
|
||||
status: "uploading",
|
||||
message: "上传中"
|
||||
});
|
||||
});
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
let watermarkedUrl = lists[i].url;
|
||||
try {
|
||||
const instance = common_vendor.getCurrentInstance();
|
||||
watermarkedUrl = await utils_watermark.addTimestampWatermark({
|
||||
tempFilePath: lists[i].url,
|
||||
canvasId: "watermarkCanvas",
|
||||
canvasWidthRef: canvasWidth,
|
||||
canvasHeightRef: canvasHeight,
|
||||
instance
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:281", "加水印失败,将使用原图上传:", e);
|
||||
}
|
||||
const result = await uploadFilePromise(watermarkedUrl);
|
||||
let item = fileList1.value[fileListLen];
|
||||
const serverPath = typeof result === "string" ? result : (result == null ? void 0 : result.url) || (result == null ? void 0 : result.filePath) || (result == null ? void 0 : result.path) || "";
|
||||
fileList1.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: "success",
|
||||
message: "",
|
||||
url: request_request.toImageUrl(serverPath),
|
||||
serverPath
|
||||
});
|
||||
fileListLen++;
|
||||
const rectifyUploadInstance = common_vendor.getCurrentInstance();
|
||||
const { afterRead, deletePic } = utils_upload.createUploadListHandlers(fileList1, {
|
||||
watermark: {
|
||||
canvasId: "watermarkCanvas",
|
||||
canvasWidthRef: canvasWidth,
|
||||
canvasHeightRef: canvasHeight,
|
||||
instance: rectifyUploadInstance
|
||||
}
|
||||
};
|
||||
const uploadFilePromise = (filePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: request_request.baseUrl + "/frontend/attachment/upload",
|
||||
filePath,
|
||||
name: "file",
|
||||
header: {
|
||||
"Authorization": request_request.getToken()
|
||||
},
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.data);
|
||||
if (data.code === 0) {
|
||||
resolve(data.data);
|
||||
} else {
|
||||
reject(data.msg || "上传失败");
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:317", "上传失败:", err);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
const executeSubmit = async () => {
|
||||
const attachments = fileList1.value.map((file) => {
|
||||
const path = request_request.toRelativeFilePath(file.serverPath || file.filePath || file.url || "");
|
||||
const fileName = path ? path.split("/").pop() : file.name || "";
|
||||
return {
|
||||
fileName: fileName || "",
|
||||
filePath: path || "",
|
||||
fileType: file.type || "image/png",
|
||||
fileSize: file.size || 0
|
||||
};
|
||||
});
|
||||
const attachments = fileList1.value.filter((f) => f.status === "success").map((file) => utils_upload.buildAttachmentItem(file));
|
||||
const params = {
|
||||
hazardId: hazardId.value,
|
||||
assignId: assignId.value,
|
||||
rectifyPlan: formData.rectifyPlan,
|
||||
rectificationMeasures: formData.rectificationMeasures,
|
||||
controlMeasures: formData.controlMeasures,
|
||||
rectifyResult: formData.rectifyResult,
|
||||
planCost: Number(formData.planCost) || 0,
|
||||
actualCost: Number(formData.actualCost) || 0,
|
||||
attachments,
|
||||
// 整改人员ID数组
|
||||
rectifyUserIds: selectedUserIds.value.map((id) => Number(id)),
|
||||
manageIds: selectedManagerIds.value.map((id) => Number(id)),
|
||||
memberIds: selectedUserIds.value.map((id) => Number(id)),
|
||||
rectifyTime: selectedRectifyTime.value || formatDateValue(rectifyTimeValue.value),
|
||||
signPath: signatureServerPath.value || ""
|
||||
// 电子签名路径
|
||||
};
|
||||
if (rectifyId.value) {
|
||||
params.rectifyId = rectifyId.value;
|
||||
@@ -226,7 +419,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:377", "提交整改失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:721", "提交整改失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "操作失败",
|
||||
icon: "none"
|
||||
@@ -237,17 +430,15 @@ const _sfc_main = {
|
||||
};
|
||||
const onSignatureConfirm = async (tempFilePath) => {
|
||||
try {
|
||||
const res = await uploadFilePromise(tempFilePath);
|
||||
const path = res && typeof res === "object" ? res.url || res.filePath || "" : res || "";
|
||||
signatureServerPath.value = request_request.toRelativeFilePath(path);
|
||||
signatureUrl.value = request_request.toImageUrl(signatureServerPath.value);
|
||||
const { url } = await utils_upload.uploadToCloud(tempFilePath);
|
||||
applySignatureFromServer(url);
|
||||
if (isSubmitting.value) {
|
||||
await executeSubmit();
|
||||
}
|
||||
} catch (err) {
|
||||
isSubmitting.value = false;
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:402", "签名上传失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:743", "签名上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -259,6 +450,20 @@ const _sfc_main = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!formData.rectificationMeasures) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入整改措施",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!formData.controlMeasures) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入管控措施",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!formData.rectifyResult) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入整改完成情况",
|
||||
@@ -266,9 +471,23 @@ const _sfc_main = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!selectedRectifyTime.value) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择实际整改时间",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (selectedManagers.value.length === 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择安全管理人员",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (selectedUsers.value.length === 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择整改人员",
|
||||
title: "请选择整改责任人",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
@@ -305,47 +524,45 @@ const _sfc_main = {
|
||||
if (res.code === 0 && res.data) {
|
||||
const data = res.data;
|
||||
formData.rectifyPlan = data.rectifyPlan || "";
|
||||
formData.rectificationMeasures = data.rectificationMeasures || "";
|
||||
formData.controlMeasures = data.controlMeasures || "";
|
||||
formData.rectifyResult = data.rectifyResult || "";
|
||||
formData.planCost = data.planCost ? String(data.planCost) : "";
|
||||
formData.actualCost = data.actualCost ? String(data.actualCost) : "";
|
||||
if (data.signPath) {
|
||||
signatureServerPath.value = request_request.toRelativeFilePath(data.signPath);
|
||||
signatureUrl.value = request_request.toImageUrl(signatureServerPath.value);
|
||||
showCanvas.value = false;
|
||||
if (data.deadline) {
|
||||
applyDeadlineFromOptions(data.deadline);
|
||||
}
|
||||
if (data.rectifyTime) {
|
||||
applyRectifyTimeValue(data.rectifyTime);
|
||||
}
|
||||
const signPath = resolveSignPathFromData(data);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:926", "整改详情签名路径:", signPath);
|
||||
applySignatureFromServer(signPath);
|
||||
hazardId.value = data.hazardId || "";
|
||||
assignId.value = data.assignId || "";
|
||||
await fetchDeptUsers();
|
||||
if (data.attachments && data.attachments.length > 0) {
|
||||
fileList1.value = data.attachments.map((att) => {
|
||||
const serverPath = request_request.toRelativeFilePath(att.filePath);
|
||||
return {
|
||||
url: request_request.toImageUrl(serverPath),
|
||||
status: "success",
|
||||
message: "",
|
||||
name: att.fileName,
|
||||
type: att.fileType,
|
||||
serverPath
|
||||
};
|
||||
});
|
||||
detailPersonPool.value = [
|
||||
...Array.isArray(data.managers) ? data.managers : [],
|
||||
...Array.isArray(data.members) ? data.members : []
|
||||
];
|
||||
const managerIdArr = resolveManagerIdsFromDetail(data);
|
||||
const memberIdArr = parseIdList(data.memberIds);
|
||||
if (managerIdArr.length > 0) {
|
||||
selectedManagerIds.value = managerIdArr;
|
||||
}
|
||||
if (data.memberIds) {
|
||||
const memberIdArr = data.memberIds.split(",").map((id) => String(id.trim()));
|
||||
if (memberIdArr.length > 0) {
|
||||
selectedUserIds.value = memberIdArr;
|
||||
setTimeout(() => {
|
||||
selectedUsers.value = cateList.value.filter((item) => memberIdArr.includes(item.id));
|
||||
}, 500);
|
||||
} else if (data.rectifierId) {
|
||||
selectedUserIds.value = [String(data.rectifierId)];
|
||||
setTimeout(() => {
|
||||
selectedUsers.value = cateList.value.filter((item) => item.id === String(data.rectifierId));
|
||||
}, 500);
|
||||
}
|
||||
await fetchPersonnelLists();
|
||||
if (data.attachments && data.attachments.length > 0) {
|
||||
fileList1.value = data.attachments.map((att) => utils_upload.mapServerFileToUploadItem(att));
|
||||
}
|
||||
common_vendor.index.setNavigationBarTitle({ title: "编辑整改信息" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:600", "获取整改详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:960", "获取整改详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -376,7 +593,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:637", "AI生成整改方案失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:997", "AI生成整改方案失败:", error);
|
||||
common_vendor.index.showToast({ title: "AI生成失败,请重试", icon: "none" });
|
||||
} finally {
|
||||
aiGenerating.value = false;
|
||||
@@ -391,7 +608,7 @@ const _sfc_main = {
|
||||
if (isRestoring.value)
|
||||
return;
|
||||
const key = getDraftKey();
|
||||
const hasContent = formData.rectifyPlan || formData.rectifyResult || formData.planCost || formData.actualCost || fileList1.value.length > 0 || signatureServerPath.value || signaturePaths.value.length > 0;
|
||||
const hasContent = formData.rectifyPlan || formData.rectificationMeasures || formData.controlMeasures || formData.rectifyResult || formData.planCost || formData.actualCost || fileList1.value.length > 0 || signatureServerPath.value || signaturePaths.value.length > 0;
|
||||
if (!hasContent) {
|
||||
common_vendor.index.removeStorageSync(key);
|
||||
hasDraft.value = false;
|
||||
@@ -400,6 +617,8 @@ const _sfc_main = {
|
||||
const data = {
|
||||
formData: {
|
||||
rectifyPlan: formData.rectifyPlan,
|
||||
rectificationMeasures: formData.rectificationMeasures,
|
||||
controlMeasures: formData.controlMeasures,
|
||||
rectifyResult: formData.rectifyResult,
|
||||
planCost: formData.planCost,
|
||||
actualCost: formData.actualCost
|
||||
@@ -420,6 +639,8 @@ const _sfc_main = {
|
||||
showRestoreBanner.value = false;
|
||||
isRestoring.value = true;
|
||||
formData.rectifyPlan = "";
|
||||
formData.rectificationMeasures = "";
|
||||
formData.controlMeasures = "";
|
||||
formData.rectifyResult = "";
|
||||
formData.planCost = "";
|
||||
formData.actualCost = "";
|
||||
@@ -444,19 +665,23 @@ const _sfc_main = {
|
||||
if (cached) {
|
||||
try {
|
||||
const data = JSON.parse(cached);
|
||||
const hasContent = data.formData.rectifyPlan || data.formData.rectifyResult || data.formData.planCost || data.formData.actualCost || data.fileList1 && data.fileList1.length > 0 || data.signatureServerPath || data.signaturePaths && data.signaturePaths.length > 0;
|
||||
const hasContent = data.formData.rectifyPlan || data.formData.rectificationMeasures || data.formData.controlMeasures || data.formData.rectifyResult || data.formData.planCost || data.formData.actualCost || data.fileList1 && data.fileList1.length > 0 || data.signatureServerPath || data.signaturePaths && data.signaturePaths.length > 0;
|
||||
if (!hasContent)
|
||||
return;
|
||||
isRestoring.value = true;
|
||||
formData.rectifyPlan = data.formData.rectifyPlan || "";
|
||||
formData.rectificationMeasures = data.formData.rectificationMeasures || "";
|
||||
formData.controlMeasures = data.formData.controlMeasures || "";
|
||||
formData.rectifyResult = data.formData.rectifyResult || "";
|
||||
formData.planCost = data.formData.planCost || "";
|
||||
formData.actualCost = data.formData.actualCost || "";
|
||||
fileList1.value = data.fileList1 || [];
|
||||
signatureServerPath.value = data.signatureServerPath || "";
|
||||
signatureUrl.value = data.signatureUrl || "";
|
||||
showCanvas.value = data.showCanvas !== void 0 ? data.showCanvas : true;
|
||||
signaturePaths.value = data.signaturePaths || [];
|
||||
if (data.signatureServerPath || data.signatureUrl) {
|
||||
applySignatureFromServer(data.signatureServerPath || data.signatureUrl);
|
||||
} else if (data.showCanvas === false) {
|
||||
showCanvas.value = false;
|
||||
}
|
||||
hasDraft.value = true;
|
||||
showRestoreBanner.value = true;
|
||||
if (signaturePaths.value.length > 0) {
|
||||
@@ -475,7 +700,7 @@ const _sfc_main = {
|
||||
duration: 2500
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:772", "解析草稿失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1145", "解析草稿失败:", e);
|
||||
isRestoring.value = false;
|
||||
}
|
||||
}
|
||||
@@ -483,6 +708,8 @@ const _sfc_main = {
|
||||
common_vendor.watch(
|
||||
() => [
|
||||
formData.rectifyPlan,
|
||||
formData.rectificationMeasures,
|
||||
formData.controlMeasures,
|
||||
formData.rectifyResult,
|
||||
formData.planCost,
|
||||
formData.actualCost,
|
||||
@@ -502,7 +729,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:803", "获取系统信息失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1178", "获取系统信息失败:", e);
|
||||
}
|
||||
if (options.hazardId) {
|
||||
hazardId.value = options.hazardId;
|
||||
@@ -511,13 +738,17 @@ const _sfc_main = {
|
||||
assignId.value = options.assignId;
|
||||
}
|
||||
if (!options.rectifyId)
|
||||
fetchDeptUsers();
|
||||
fetchPersonnelLists();
|
||||
if (options.rectifyId) {
|
||||
rectifyId.value = options.rectifyId;
|
||||
isEdit.value = options.isEdit === "1";
|
||||
fetchRectifyDetail();
|
||||
} else {
|
||||
restoreDraft();
|
||||
initRectifyTimeDefault();
|
||||
}
|
||||
if (options.deadline) {
|
||||
applyDeadlineFromOptions(options.deadline);
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
@@ -539,93 +770,184 @@ const _sfc_main = {
|
||||
autoHeight: true,
|
||||
modelValue: formData.rectifyPlan
|
||||
}),
|
||||
j: common_vendor.o(($event) => formData.rectifyResult = $event),
|
||||
j: common_vendor.o(($event) => formData.rectificationMeasures = $event),
|
||||
k: common_vendor.p({
|
||||
placeholder: "请输入整改措施",
|
||||
modelValue: formData.rectificationMeasures
|
||||
}),
|
||||
l: common_vendor.o(($event) => formData.controlMeasures = $event),
|
||||
m: common_vendor.p({
|
||||
placeholder: "请输入管控措施",
|
||||
modelValue: formData.controlMeasures
|
||||
}),
|
||||
n: common_vendor.o(($event) => formData.rectifyResult = $event),
|
||||
o: common_vendor.p({
|
||||
placeholder: "请输入内容",
|
||||
modelValue: formData.rectifyResult
|
||||
}),
|
||||
l: common_vendor.o(($event) => formData.planCost = $event),
|
||||
m: common_vendor.p({
|
||||
p: common_vendor.o(($event) => formData.planCost = $event),
|
||||
q: common_vendor.p({
|
||||
placeholder: "请输入内容",
|
||||
type: "number",
|
||||
modelValue: formData.planCost
|
||||
}),
|
||||
n: common_vendor.o(($event) => formData.actualCost = $event),
|
||||
o: common_vendor.p({
|
||||
r: common_vendor.o(($event) => formData.actualCost = $event),
|
||||
s: common_vendor.p({
|
||||
placeholder: "请输入内容",
|
||||
type: "number",
|
||||
modelValue: formData.actualCost
|
||||
}),
|
||||
p: common_vendor.o(($event) => value1.value = $event),
|
||||
q: common_vendor.p({
|
||||
hasInput: true,
|
||||
show: show.value,
|
||||
mode: "date",
|
||||
modelValue: value1.value
|
||||
t: common_vendor.t(selectedDeadlineDate.value || "暂无"),
|
||||
v: !selectedDeadlineDate.value ? 1 : "",
|
||||
w: common_vendor.t(selectedRectifyTime.value || "请选择实际整改时间"),
|
||||
x: !selectedRectifyTime.value ? 1 : "",
|
||||
y: common_vendor.o(($event) => showRectifyTimePicker.value = true),
|
||||
z: common_vendor.o(onRectifyTimeConfirm),
|
||||
A: common_vendor.o(($event) => showRectifyTimePicker.value = false),
|
||||
B: common_vendor.o(($event) => showRectifyTimePicker.value = false),
|
||||
C: common_vendor.o(($event) => rectifyTimeValue.value = $event),
|
||||
D: common_vendor.p({
|
||||
show: showRectifyTimePicker.value,
|
||||
mode: "datetime",
|
||||
modelValue: rectifyTimeValue.value
|
||||
}),
|
||||
r: common_vendor.t(selectedUsers.value.length > 0 ? selectedUsersText.value : "请选择整改人员(可多选)"),
|
||||
s: selectedUsers.value.length === 0 ? 1 : "",
|
||||
t: common_vendor.o(($event) => showUserPopup.value = true),
|
||||
v: common_vendor.o(($event) => showUserPopup.value = false),
|
||||
w: common_vendor.f(cateList.value, (item, k0, i0) => {
|
||||
E: common_vendor.t(selectedManagers.value.length > 0 ? selectedManagersText.value : "请选择安全管理人员(可多选)"),
|
||||
F: selectedManagers.value.length === 0 ? 1 : "",
|
||||
G: common_vendor.o(openManagerPopup),
|
||||
H: common_vendor.t(selectedUsers.value.length > 0 ? selectedUsersText.value : "请选择整改责任人(可多选)"),
|
||||
I: selectedUsers.value.length === 0 ? 1 : "",
|
||||
J: common_vendor.o(openUserPopup),
|
||||
K: common_vendor.o(cancelManagerSelect),
|
||||
L: managerPickerSelectedIds.value.length > 0
|
||||
}, managerPickerSelectedIds.value.length > 0 ? {
|
||||
M: common_vendor.t(managerPickerSelectedIds.value.length),
|
||||
N: common_vendor.t(managerPickerSelectedText.value)
|
||||
} : {}, {
|
||||
O: common_vendor.f(managerDeptList.value, (dept, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(dept.deptName),
|
||||
b: getManagerDeptSelectedCount(dept) > 0
|
||||
}, getManagerDeptSelectedCount(dept) > 0 ? {
|
||||
c: common_vendor.t(getManagerDeptSelectedCount(dept))
|
||||
} : {}, {
|
||||
d: "manager-dept-" + dept.deptId,
|
||||
e: common_vendor.n({
|
||||
active: activeManagerDeptIndex.value === index
|
||||
}),
|
||||
f: common_vendor.o(($event) => activeManagerDeptIndex.value = index, "manager-dept-" + dept.deptId)
|
||||
});
|
||||
}),
|
||||
P: currentManagerDeptUsers.value.length === 0
|
||||
}, currentManagerDeptUsers.value.length === 0 ? {} : {
|
||||
Q: common_vendor.f(currentManagerDeptUsers.value, (user, k0, i0) => {
|
||||
return {
|
||||
a: "f18ba0ce-7-" + i0 + ",f18ba0ce-6",
|
||||
b: common_vendor.p({
|
||||
label: item.name,
|
||||
name: item.id,
|
||||
a: common_vendor.o((checked) => onManagerCheckChange(user.userId, checked), "manager-user-" + user.userId),
|
||||
b: "f18ba0ce-8-" + i0 + ",f18ba0ce-7",
|
||||
c: common_vendor.p({
|
||||
usedAlone: true,
|
||||
checked: managerPickerSelectedSet.value.has(String(user.userId)),
|
||||
label: formatUserDisplayName(user),
|
||||
activeColor: "#2667E9",
|
||||
shape: "square"
|
||||
}),
|
||||
c: item.id
|
||||
d: "manager-user-" + user.userId
|
||||
};
|
||||
})
|
||||
}, {
|
||||
R: "manager-dept-users-" + activeManagerDeptIndex.value,
|
||||
S: common_vendor.o(cancelManagerSelect),
|
||||
T: common_vendor.o(confirmManagerSelect),
|
||||
U: common_vendor.o(cancelManagerSelect),
|
||||
V: common_vendor.p({
|
||||
show: showManagerPopup.value,
|
||||
mode: "bottom",
|
||||
round: "20"
|
||||
}),
|
||||
x: common_vendor.o(onUserChange),
|
||||
y: common_vendor.o(($event) => selectedUserIds.value = $event),
|
||||
z: common_vendor.p({
|
||||
placement: "column",
|
||||
modelValue: selectedUserIds.value
|
||||
W: common_vendor.o(cancelUserSelect),
|
||||
X: userPickerSelectedIds.value.length > 0
|
||||
}, userPickerSelectedIds.value.length > 0 ? {
|
||||
Y: common_vendor.t(userPickerSelectedIds.value.length),
|
||||
Z: common_vendor.t(userPickerSelectedText.value)
|
||||
} : {}, {
|
||||
aa: common_vendor.f(deptList.value, (dept, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(dept.deptName),
|
||||
b: getDeptSelectedCount(dept) > 0
|
||||
}, getDeptSelectedCount(dept) > 0 ? {
|
||||
c: common_vendor.t(getDeptSelectedCount(dept))
|
||||
} : {}, {
|
||||
d: dept.deptId,
|
||||
e: common_vendor.n({
|
||||
active: activeDeptIndex.value === index
|
||||
}),
|
||||
f: common_vendor.o(($event) => activeDeptIndex.value = index, dept.deptId)
|
||||
});
|
||||
}),
|
||||
A: common_vendor.o(($event) => showUserPopup.value = false),
|
||||
B: common_vendor.o(confirmUserSelect),
|
||||
C: common_vendor.o(($event) => showUserPopup.value = false),
|
||||
D: common_vendor.p({
|
||||
ab: currentDeptUsers.value.length === 0
|
||||
}, currentDeptUsers.value.length === 0 ? {} : {
|
||||
ac: common_vendor.f(currentDeptUsers.value, (user, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.o((checked) => onUserCheckChange(user.userId, checked), "user-" + user.userId),
|
||||
b: "f18ba0ce-10-" + i0 + ",f18ba0ce-9",
|
||||
c: common_vendor.p({
|
||||
usedAlone: true,
|
||||
checked: userPickerSelectedSet.value.has(String(user.userId)),
|
||||
label: formatUserDisplayName(user),
|
||||
activeColor: "#2667E9",
|
||||
shape: "square"
|
||||
}),
|
||||
d: "user-" + user.userId
|
||||
};
|
||||
})
|
||||
}, {
|
||||
ad: "dept-users-" + activeDeptIndex.value,
|
||||
ae: common_vendor.o(cancelUserSelect),
|
||||
af: common_vendor.o(confirmUserSelect),
|
||||
ag: common_vendor.o(cancelUserSelect),
|
||||
ah: common_vendor.p({
|
||||
show: showUserPopup.value,
|
||||
mode: "bottom",
|
||||
round: "20"
|
||||
}),
|
||||
E: common_vendor.o(afterRead),
|
||||
F: common_vendor.o(deletePic),
|
||||
G: common_vendor.p({
|
||||
ai: common_vendor.o(common_vendor.unref(afterRead)),
|
||||
aj: common_vendor.o(common_vendor.unref(deletePic)),
|
||||
ak: common_vendor.p({
|
||||
fileList: fileList1.value,
|
||||
name: "1",
|
||||
multiple: true,
|
||||
imageMode: "aspectFill",
|
||||
maxCount: 10
|
||||
}),
|
||||
H: canvasWidth.value,
|
||||
I: canvasHeight.value,
|
||||
J: canvasWidth.value + "px",
|
||||
K: canvasHeight.value + "px",
|
||||
L: showCanvas.value
|
||||
}, showCanvas.value ? {
|
||||
M: common_vendor.o(clearSignature)
|
||||
} : {
|
||||
N: common_vendor.o(reSign)
|
||||
}, {
|
||||
O: !showCanvas.value
|
||||
}, !showCanvas.value ? {
|
||||
P: signatureUrl.value
|
||||
al: !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value
|
||||
}, !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value ? {
|
||||
am: canvasWidth.value,
|
||||
an: canvasHeight.value,
|
||||
ao: canvasWidth.value + "px",
|
||||
ap: canvasHeight.value + "px"
|
||||
} : {}, {
|
||||
Q: showCanvas.value && !showUserPopup.value
|
||||
}, showCanvas.value && !showUserPopup.value ? {
|
||||
R: common_vendor.sr(signatureRef, "f18ba0ce-9", {
|
||||
aq: showCanvas.value
|
||||
}, showCanvas.value ? {
|
||||
ar: common_vendor.o(clearSignature)
|
||||
} : {
|
||||
as: common_vendor.o(reSign)
|
||||
}, {
|
||||
at: !showCanvas.value
|
||||
}, !showCanvas.value ? common_vendor.e({
|
||||
av: signatureUrl.value
|
||||
}, signatureUrl.value ? {
|
||||
aw: signatureUrl.value,
|
||||
ax: common_vendor.o(onSignatureImageError)
|
||||
} : {}) : {}, {
|
||||
ay: showCanvas.value && !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value
|
||||
}, showCanvas.value && !showUserPopup.value && !showManagerPopup.value && !showRectifyTimePicker.value ? {
|
||||
az: common_vendor.sr(signatureRef, "f18ba0ce-12", {
|
||||
"k": "signatureRef"
|
||||
}),
|
||||
S: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
|
||||
T: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
U: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
V: common_vendor.o(($event) => isSignatureEmpty.value = true),
|
||||
W: common_vendor.p({
|
||||
aA: common_vendor.o((res) => onSignatureConfirm(res.tempFilePath)),
|
||||
aB: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
aC: common_vendor.o(($event) => isSignatureEmpty.value = false),
|
||||
aD: common_vendor.o(($event) => isSignatureEmpty.value = true),
|
||||
aE: common_vendor.p({
|
||||
width: signatureWidth.value,
|
||||
height: 160,
|
||||
backgroundColor: "#f8f8f8",
|
||||
@@ -634,9 +956,9 @@ const _sfc_main = {
|
||||
enableHistory: false
|
||||
})
|
||||
} : {}, {
|
||||
X: common_vendor.t(isEdit.value ? "保存修改" : "提交整改"),
|
||||
Y: common_vendor.o(handleSubmit),
|
||||
Z: common_vendor.gei(_ctx, "")
|
||||
aF: common_vendor.t(isEdit.value ? "保存修改" : "提交整改"),
|
||||
aG: common_vendor.o(handleSubmit),
|
||||
aH: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"up-checkbox": "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox",
|
||||
"up-checkbox-group": "../../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
|
||||
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
|
||||
"wd-signature": "../../node-modules/wot-design-uni/components/wd-signature/wd-signature"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -78,6 +78,15 @@
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.readonly-field.data-v-f18ba0ce {
|
||||
background: #f5f7fa;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.select-trigger.data-v-f18ba0ce {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -117,6 +126,86 @@
|
||||
max-height: 600rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.user-popup.cascader-user-popup .selected-summary.data-v-f18ba0ce {
|
||||
padding: 16rpx 30rpx;
|
||||
background: #f5f7fa;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.user-popup.cascader-user-popup .selected-summary .summary-label.data-v-f18ba0ce {
|
||||
color: #909399;
|
||||
}
|
||||
.user-popup.cascader-user-popup .selected-summary .summary-text.data-v-f18ba0ce {
|
||||
color: #333;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-body.data-v-f18ba0ce {
|
||||
display: flex;
|
||||
height: 600rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-col.data-v-f18ba0ce {
|
||||
height: 600rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.user-popup.cascader-user-popup .dept-col.data-v-f18ba0ce {
|
||||
width: 38%;
|
||||
background: #f7f8fa;
|
||||
border-right: 1rpx solid #eee;
|
||||
}
|
||||
.user-popup.cascader-user-popup .user-col.data-v-f18ba0ce {
|
||||
width: 62%;
|
||||
padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item.data-v-f18ba0ce {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 28rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-bottom: 1rpx solid #eef0f3;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item.active.data-v-f18ba0ce {
|
||||
background: #fff;
|
||||
color: #2667E9;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item.active.data-v-f18ba0ce::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 6rpx;
|
||||
background: #2667E9;
|
||||
}
|
||||
.user-popup.cascader-user-popup .cascader-item-text.data-v-f18ba0ce {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.user-popup.cascader-user-popup .dept-badge.data-v-f18ba0ce {
|
||||
min-width: 32rpx;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 8rpx;
|
||||
margin-left: 8rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #2667E9;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.user-popup.cascader-user-popup .empty-tip.data-v-f18ba0ce {
|
||||
padding: 80rpx 20rpx;
|
||||
text-align: center;
|
||||
color: #909399;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.user-popup .user-item.data-v-f18ba0ce {
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
@@ -25,55 +25,49 @@ const _sfc_main = {
|
||||
description: "",
|
||||
address: "",
|
||||
areaName: "",
|
||||
// 隐患区域名称
|
||||
createdAt: "",
|
||||
areaColor: "",
|
||||
tagName: "",
|
||||
legalBasis: "",
|
||||
regulationName: "",
|
||||
attachments: []
|
||||
});
|
||||
const rectifyAttachments = common_vendor.ref([]);
|
||||
const getFullPath = (filePath) => {
|
||||
return request_request.toImageUrl(filePath);
|
||||
};
|
||||
const legalBasisText = common_vendor.computed(() => detailData.legalBasis || detailData.regulationName || "");
|
||||
const getFullPath = (filePath) => request_request.toImageUrl(filePath);
|
||||
const previewHazardImage = (index) => {
|
||||
if (!detailData.attachments || detailData.attachments.length === 0)
|
||||
return;
|
||||
const urls = detailData.attachments.map((item) => getFullPath(item.filePath));
|
||||
common_vendor.index.previewImage({
|
||||
current: index,
|
||||
urls
|
||||
urls: detailData.attachments.map((item) => getFullPath(item.filePath))
|
||||
});
|
||||
};
|
||||
const fetchDetail = async (hazardId, assignId) => {
|
||||
try {
|
||||
const res = await request_api.getHiddenDangerDetail({ hazardId, assignId });
|
||||
const params = { hazardId };
|
||||
if (assignId)
|
||||
params.assignId = assignId;
|
||||
const res = await request_api.getHiddenDangerDetail(params);
|
||||
if (res.code === 0 && res.data) {
|
||||
Object.assign(detailData, res.data);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/view.vue:120", "隐患详情数据:", res.data);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/view.vue:121", "隐患附件:", res.data.attachments);
|
||||
if (res.data.assigns && res.data.assigns.length > 0) {
|
||||
const assign = res.data.assigns[0];
|
||||
if (assign.rectify && assign.rectify.attachments) {
|
||||
rectifyAttachments.value = assign.rectify.attachments;
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/view.vue:128", "整改附件:", rectifyAttachments.value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/view.vue:135", "获取隐患详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/view.vue:138", "获取隐患详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
if (options.hazardId && options.assignId) {
|
||||
if (options.hazardId) {
|
||||
fetchDetail(options.hazardId, options.assignId);
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: detailData.attachments && detailData.attachments.length > 0
|
||||
a: common_vendor.t(detailData.source || "暂无"),
|
||||
b: detailData.attachments && detailData.attachments.length > 0
|
||||
}, detailData.attachments && detailData.attachments.length > 0 ? {
|
||||
b: common_vendor.f(detailData.attachments, (img, idx, i0) => {
|
||||
c: common_vendor.f(detailData.attachments, (img, idx, i0) => {
|
||||
return {
|
||||
a: idx,
|
||||
b: getFullPath(img.filePath),
|
||||
@@ -81,28 +75,41 @@ const _sfc_main = {
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
c: common_vendor.o(($event) => detailData.title = $event),
|
||||
d: common_vendor.p({
|
||||
disabled: "true",
|
||||
d: common_vendor.o(($event) => detailData.title = $event),
|
||||
e: common_vendor.p({
|
||||
disabled: true,
|
||||
disabledColor: "#F6F6F6",
|
||||
border: "surround",
|
||||
placeholder: "暂无",
|
||||
modelValue: detailData.title
|
||||
}),
|
||||
e: common_vendor.n(detailData.level === 1 ? "bg-blue light" : "bg-gray"),
|
||||
f: common_vendor.n(detailData.level === 2 ? "bg-blue light" : "bg-gray"),
|
||||
g: common_vendor.n(detailData.level === 3 ? "bg-blue light" : "bg-gray"),
|
||||
h: detailData.address,
|
||||
i: common_vendor.o(($event) => detailData.address = $event.detail.value),
|
||||
j: common_vendor.t(detailData.areaName || "暂无"),
|
||||
k: common_vendor.o(($event) => detailData.description = $event),
|
||||
l: common_vendor.p({
|
||||
h: common_vendor.o(($event) => detailData.address = $event),
|
||||
i: common_vendor.p({
|
||||
disabled: true,
|
||||
disabledColor: "#F6F6F6",
|
||||
border: "surround",
|
||||
placeholder: "暂无地址",
|
||||
modelValue: detailData.address
|
||||
}),
|
||||
j: common_vendor.t(legalBasisText.value || "暂无"),
|
||||
k: !legalBasisText.value ? 1 : "",
|
||||
l: detailData.areaColor
|
||||
}, detailData.areaColor ? {
|
||||
m: detailData.areaColor
|
||||
} : {}, {
|
||||
n: common_vendor.t(detailData.areaName || "暂无"),
|
||||
o: !detailData.areaName ? 1 : "",
|
||||
p: common_vendor.o(($event) => detailData.description = $event),
|
||||
q: common_vendor.p({
|
||||
placeholder: "暂无描述",
|
||||
disabled: true,
|
||||
autoHeight: true,
|
||||
modelValue: detailData.description
|
||||
}),
|
||||
m: common_vendor.t(detailData.source || "暂无"),
|
||||
n: common_vendor.t(detailData.createdAt || "暂无"),
|
||||
o: common_vendor.gei(_ctx, "")
|
||||
r: common_vendor.t(detailData.tagName || "暂无"),
|
||||
s: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="{{['padding', 'page', 'data-v-4d631e68', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{o}}"><view class="padding bg-white radius data-v-4d631e68"><view class="flex data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患图片/视频</view><view class="text-red data-v-4d631e68">*</view></view><view class="margin-bottom data-v-4d631e68"><view wx:if="{{a}}" class="margin-top data-v-4d631e68"><view class="flex data-v-4d631e68" style="flex-wrap:wrap;gap:10rpx"><image wx:for="{{b}}" wx:for-item="img" wx:key="a" class="data-v-4d631e68" src="{{img.b}}" style="width:136rpx;height:136rpx;border-radius:16rpx" mode="aspectFill" bindtap="{{img.c}}"></image></view></view><view wx:else class="text-gray text-sm data-v-4d631e68">暂无图片</view><view class="text-gray text-sm margin-top-xs data-v-4d631e68">必填:请上传现场照片或者视频作为隐患证据</view></view><view class="flex margin-bottom data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患标题</view><view class="text-red data-v-4d631e68">*</view></view><up-input wx:if="{{d}}" class="data-v-4d631e68" virtualHostClass="data-v-4d631e68" u-i="4d631e68-0" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"/><view class="margin-bottom text-gray text-sm margin-top-xs data-v-4d631e68">请用简洁的语言概括隐患要点</view><view class="flex margin-bottom data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患等级</view><view class="text-red data-v-4d631e68">*</view></view><view class="flex col-3 data-v-4d631e68" style="gap:10rpx"><view class="{{['data-v-4d631e68', e]}}" style="padding:16rpx 40rpx">轻微隐患</view><view class="{{['data-v-4d631e68', f]}}" style="padding:16rpx 40rpx">一般隐患</view><view class="{{['data-v-4d631e68', g]}}" style="padding:16rpx 40rpx">重大隐患</view></view><view class="text-gray text-sm margin-top-xs margin-bottom data-v-4d631e68">请用隐患可能造成的危害程度选择等级</view><view class="flex data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患位置</view><view class="text-red data-v-4d631e68">*</view></view><view class="address-box margin-top-sm margin-bottom-sm data-v-4d631e68"><input class="address-input data-v-4d631e68" placeholder="暂无地址" disabled value="{{h}}" bindinput="{{i}}"/><button class="address-btn bg-blue data-v-4d631e68">选择地址</button></view><view class="text-gray text-sm data-v-4d631e68">如:办公楼3层东侧消防通道,生产车间A区设备旁等,或点击"选择地址"按钮在地图上选择</view><view class="text-gray margin-top margin-bottom data-v-4d631e68">隐患区域</view><view class="bg-gray padding radius data-v-4d631e68">{{j}}</view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患描述</view><view class="text-red data-v-4d631e68">*</view></view><up-textarea wx:if="{{l}}" class="data-v-4d631e68" virtualHostClass="data-v-4d631e68" u-i="4d631e68-1" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></up-textarea><view class="text-gray text-sm margin-top-xs margin-bottom data-v-4d631e68">请详细说明隐患现状、潜在风险及影响范围</view><view class="text-gray margin-bottom data-v-4d631e68">隐患来源</view><view class="bg-gray padding radius data-v-4d631e68">{{m}}</view><view class="text-gray margin-top margin-bottom data-v-4d631e68">创建时间</view><view class="bg-gray padding radius data-v-4d631e68">{{n}}</view></view></view>
|
||||
<view class="{{['padding', 'page', 'data-v-4d631e68', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{s}}"><view class="padding bg-white radius data-v-4d631e68"><view class="flex margin-bottom data-v-4d631e68"><view class="text-gray data-v-4d631e68">检查形式</view><view class="text-red data-v-4d631e68">*</view></view><view class="read-only-box data-v-4d631e68">{{a}}</view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患图片</view><view class="text-red data-v-4d631e68">*</view></view><view class="margin-bottom data-v-4d631e68"><view wx:if="{{b}}" class="margin-top-xs data-v-4d631e68"><view class="flex data-v-4d631e68" style="flex-wrap:wrap;gap:10rpx"><image wx:for="{{c}}" wx:for-item="img" wx:key="a" class="data-v-4d631e68" src="{{img.b}}" style="width:136rpx;height:136rpx;border-radius:16rpx" mode="aspectFill" bindtap="{{img.c}}"></image></view></view><view wx:else class="text-gray text-sm data-v-4d631e68">暂无图片</view><view class="text-gray text-sm margin-top-xs data-v-4d631e68">必填:请上传现场照片作为隐患证据</view></view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患标题</view><view class="text-red data-v-4d631e68">*</view></view><up-input wx:if="{{e}}" class="data-v-4d631e68" virtualHostClass="data-v-4d631e68" u-i="4d631e68-0" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"/><view class="text-sm text-gray margin-top-xs data-v-4d631e68">请用简洁的语言概括隐患要点</view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患等级</view><view class="text-red data-v-4d631e68">*</view></view><view class="flex col-2 data-v-4d631e68" style="gap:10rpx"><view class="{{[f, 'level-item', 'data-v-4d631e68']}}">一般隐患</view><view class="{{[g, 'level-item', 'data-v-4d631e68']}}">重大隐患</view></view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患位置</view><view class="text-red data-v-4d631e68">*</view></view><up-input wx:if="{{i}}" class="data-v-4d631e68" virtualHostClass="data-v-4d631e68" u-i="4d631e68-1" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"/><view class="text-gray text-sm margin-top-xs data-v-4d631e68">如:办公楼3层东侧消防通道、生产车间A区设备旁等,或点击"选择地址"按钮在地图上选择</view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">法律依据</view></view><view class="read-only-select data-v-4d631e68"><view class="{{['select-value', 'data-v-4d631e68', k && 'placeholder']}}">{{j}}</view></view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患区域</view></view><view class="read-only-select data-v-4d631e68"><view class="flex align-center data-v-4d631e68"><view wx:if="{{l}}" class="area-color-dot data-v-4d631e68" style="{{'background-color:' + m}}"></view><view class="{{['select-value', 'data-v-4d631e68', o && 'placeholder']}}">{{n}}</view></view></view><view class="flex margin-bottom margin-top data-v-4d631e68"><view class="text-gray data-v-4d631e68">隐患描述</view><view class="text-red data-v-4d631e68">*</view></view><up-textarea wx:if="{{q}}" class="data-v-4d631e68" virtualHostClass="data-v-4d631e68" u-i="4d631e68-2" bind:__l="__l" bindupdateModelValue="{{p}}" u-p="{{q}}"></up-textarea><view class="text-gray text-sm margin-top-xs data-v-4d631e68">请详细说明隐患现状、潜在风险及影响范围</view><view class="text-gray margin-bottom margin-top data-v-4d631e68">隐患标签</view><view class="read-only-box data-v-4d631e68">{{r}}</view></view></view>
|
||||
@@ -28,26 +28,38 @@
|
||||
min-height: 100vh;
|
||||
background: #EBF2FC;
|
||||
}
|
||||
.address-box.data-v-4d631e68 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.address-input.data-v-4d631e68 {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 24rpx;
|
||||
.read-only-box.data-v-4d631e68 {
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.address-btn.data-v-4d631e68 {
|
||||
flex-shrink: 0;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 32rpx;
|
||||
border-radius: 12rpx;
|
||||
.read-only-select.data-v-4d631e68 {
|
||||
background: #f5f5f5;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
}
|
||||
.read-only-select .select-value.data-v-4d631e68 {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
.read-only-select .select-value.placeholder.data-v-4d631e68 {
|
||||
color: #999;
|
||||
}
|
||||
.level-item.data-v-4d631e68 {
|
||||
padding: 16rpx 40rpx;
|
||||
border-radius: 8rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.area-color-dot.data-v-4d631e68 {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user