检查表手动添加检查项时根据部门类型展示不一样

This commit is contained in:
王利强
2026-08-03 11:51:07 +08:00
parent 088ff356f2
commit ec76d588e2
50 changed files with 826 additions and 428 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -11,16 +11,24 @@ const _sfc_main = {
const checkItems = common_vendor.ref([]);
const typeMap = { 1: "日常检查", 2: "专项检查", 3: "设备检查" };
const cycleMap = { 1: "每天一次", 2: "每周", 3: "每月", 4: "每季度" };
const runModeMap = { 1: "单人完成", 2: "全员", 3: "指定分组" };
const runModeMap = { 1: "单人完成", 2: "全员", 3: "指定分组", 4: "排班模式" };
const weekendMap = { 1: "包含周末", 2: "不包含周末" };
const typeLabel = common_vendor.computed(() => detail.value.typeName || typeMap[detail.value.type] || "-");
const cycleLabel = common_vendor.computed(() => detail.value.cycleName || cycleMap[detail.value.cycle] || "-");
const runModeLabel = common_vendor.computed(() => detail.value.runModeName || runModeMap[detail.value.runMode] || "-");
const weekendLabel = common_vendor.computed(() => detail.value.isWeekendName || weekendMap[detail.value.isWeekend] || "-");
const executorLabel = common_vendor.computed(() => {
if (Number(detail.value.runMode) === 2)
const runMode = Number(detail.value.runMode);
if (runMode === 2)
return "全员";
return detail.value.executorName || "-";
if (runMode === 4) {
const rosterItems = detail.value.rosterItems || [];
if (rosterItems.length > 0) {
return rosterItems.map((item) => item.identityName).filter(Boolean).join("、") || "-";
}
return "-";
}
return detail.value.executorIdentityName || detail.value.executorName || "-";
});
const formatDate = (value) => {
if (!value)
@@ -41,7 +49,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/checklist/detail.vue:137", "获取检查计划详情失败:", error);
common_vendor.index.__f__("error", "at pages/checklist/detail.vue:145", "获取检查计划详情失败:", error);
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
} finally {
loading.value = false;

View File

@@ -1,6 +1,7 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
const utils_userInfo = require("../../utils/userInfo.js");
if (!Array) {
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
@@ -22,6 +23,16 @@ if (!Math) {
const _sfc_main = {
__name: "editchecklist",
setup(__props) {
const showFullForm = common_vendor.computed(() => {
const identity = utils_userInfo.getCurrentIdentityFromStorage();
const type = Number(identity == null ? void 0 : identity.organizationEntityType);
return type === 0 || type === 1;
});
const MODE_OPTIONS = [
{ label: "单人完成", value: 1 },
{ label: "全员", value: 2 },
{ label: "排班模式", value: 4 }
];
const formData = common_vendor.reactive({
name: "",
deptId: "",
@@ -30,12 +41,13 @@ const _sfc_main = {
type: "",
// 检查表类型1-日常检查2-专项检查3-设备检查
typeName: "",
modeId: "",
runMode: void 0,
modeName: "",
selectDeptId: "",
selectDeptName: "",
executorId: "",
executorNames: "",
rosterIdentityIds: [],
cycleId: "",
cycleName: "",
isWeekend: 1,
@@ -153,11 +165,18 @@ const _sfc_main = {
const showStartDatePicker = common_vendor.ref(false);
const showEndDatePicker = common_vendor.ref(false);
const typeColumns = common_vendor.ref([["日常检查", "专项检查", "设备检查"]]);
const modeColumns = common_vendor.ref([["单人完成", "全员"]]);
const modeColumns = common_vendor.ref([MODE_OPTIONS.map((item) => item.label)]);
const cycleColumns = common_vendor.ref([["每天一次", "每周一次", "每月一次", "每季度一次"]]);
const showExecutorPopup = common_vendor.ref(false);
const executorList = common_vendor.ref([]);
const selectedExecutorId = common_vendor.ref(null);
const selectedRosterIdentityIds = common_vendor.ref([]);
const pageScrollLockStyle = common_vendor.computed(() => {
if (showDeptPicker.value || showExecutorPopup.value) {
return "overflow: hidden; height: 100%;";
}
return "";
});
const deptTree = common_vendor.ref([]);
const deptTreeRef = common_vendor.ref(null);
const selectedDeptId = common_vendor.ref(null);
@@ -246,18 +265,27 @@ const _sfc_main = {
showTypePicker.value = false;
};
const onModeConfirm = (e) => {
if (e.value && e.value.length > 0) {
formData.modeName = e.value[0];
if (e.value[0] === "全员") {
clearExecutorSelection();
}
var _a;
const index = Number(((_a = e.indexs) == null ? void 0 : _a[0]) ?? 0);
const option = MODE_OPTIONS[index];
if (!option) {
showModePicker.value = false;
return;
}
formData.modeName = option.label;
formData.runMode = option.value;
clearExecutorSelection();
if (formData.deptId && option.value !== 2) {
fetchDeptUsers(formData.deptId);
}
showModePicker.value = false;
};
const clearExecutorSelection = () => {
formData.executorId = "";
formData.executorNames = "";
formData.rosterIdentityIds = [];
selectedExecutorId.value = null;
selectedRosterIdentityIds.value = [];
};
const fetchDeptUsers = async (deptId) => {
if (!deptId) {
@@ -265,21 +293,44 @@ const _sfc_main = {
return;
}
try {
const res = await request_api.getDeptUsers(deptId);
const params = formData.runMode === 4 ? { type: 4 } : {};
const res = await request_api.getDeptUsers(deptId, params);
if (res.code === 0 && res.data) {
executorList.value = res.data || [];
} else {
executorList.value = [];
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:726", "获取部门用户失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:810", "获取部门用户失败:", error);
executorList.value = [];
}
};
const selectExecutor = (item) => {
selectedExecutorId.value = item.userId;
};
const toggleRosterExecutor = (item) => {
const identityId = item.identityId;
if (identityId == null)
return;
const index = selectedRosterIdentityIds.value.indexOf(identityId);
if (index > -1) {
selectedRosterIdentityIds.value.splice(index, 1);
} else {
selectedRosterIdentityIds.value.push(identityId);
}
};
const confirmExecutorSelect = () => {
if (formData.runMode === 4) {
if (selectedRosterIdentityIds.value.length === 0) {
common_vendor.index.showToast({ title: "请选择执行人员", icon: "none" });
return;
}
formData.rosterIdentityIds = [...selectedRosterIdentityIds.value];
const names = executorList.value.filter((user) => selectedRosterIdentityIds.value.includes(user.identityId)).map((user) => user.nickName || user.nickname);
formData.executorNames = names.join("、");
showExecutorPopup.value = false;
return;
}
if (!selectedExecutorId.value) {
common_vendor.index.showToast({ title: "请选择执行人员", icon: "none" });
return;
@@ -294,7 +345,11 @@ const _sfc_main = {
common_vendor.index.showToast({ title: "请先选择分派单位", icon: "none" });
return;
}
selectedExecutorId.value = formData.executorId || null;
if (formData.runMode === 4) {
selectedRosterIdentityIds.value = [...formData.rosterIdentityIds || []];
} else {
selectedExecutorId.value = formData.executorId || null;
}
fetchDeptUsers(formData.deptId);
showExecutorPopup.value = true;
};
@@ -306,7 +361,7 @@ const _sfc_main = {
deptTree.value = handleTree(list, "deptId");
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:764", "获取部门树失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:876", "获取部门树失败:", error);
}
};
const onCycleConfirm = (e) => {
@@ -415,7 +470,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:892", "删除检查项失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1004", "删除检查项失败:", error);
common_vendor.index.showToast({ title: "删除失败", icon: "none" });
}
} else {
@@ -442,14 +497,63 @@ const _sfc_main = {
const showAddPopup = common_vendor.ref(false);
const checkForm = common_vendor.reactive({
name: "",
// 检查名称
point: "",
// 检查内容
industryId: null,
industryName: "",
leadDept: "",
commonProblem: "",
isSerious: 2,
regulationId: null,
// 参考法规ID
regulationName: ""
// 参考法规名称(显示用)
});
const industryOptions = common_vendor.ref([]);
const showIndustryPicker = common_vendor.ref(false);
const industryColumns = common_vendor.computed(() => [industryOptions.value.map((item) => item.name || item.industryName || "")]);
const showSeriousPicker = common_vendor.ref(false);
const seriousColumns = common_vendor.ref([["是", "否"]]);
const seriousName = common_vendor.computed(() => checkForm.isSerious === 1 ? "是" : "否");
const resetCheckForm = () => {
checkForm.name = "";
checkForm.point = "";
checkForm.industryId = null;
checkForm.industryName = "";
checkForm.leadDept = "";
checkForm.commonProblem = "";
checkForm.isSerious = 2;
checkForm.regulationId = null;
checkForm.regulationName = "";
};
const fetchIndustryOptions = async () => {
try {
const res = await request_api.getindustry();
if (res.code === 0) {
industryOptions.value = res.data || [];
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1073", "获取行业类型失败:", error);
}
};
common_vendor.watch(showAddPopup, (val) => {
if (val && showFullForm.value) {
fetchIndustryOptions();
}
});
const onIndustryConfirm = (e) => {
var _a;
const selectedName = (_a = e.value) == null ? void 0 : _a[0];
const selected = industryOptions.value.find((item) => (item.name || item.industryName) === selectedName);
if (selected) {
checkForm.industryId = selected.id;
checkForm.industryName = selected.name || selected.industryName || "";
}
showIndustryPicker.value = false;
};
const onSeriousConfirm = (e) => {
var _a;
const selectedName = (_a = e.value) == null ? void 0 : _a[0];
checkForm.isSerious = selectedName === "是" ? 1 : 2;
showSeriousPicker.value = false;
};
const showLawPopup = common_vendor.ref(false);
const lawKeyword = common_vendor.ref("");
const selectedLawId = common_vendor.ref(null);
@@ -460,6 +564,9 @@ const _sfc_main = {
const lawPageSize = common_vendor.ref(10);
const hasMoreLaw = common_vendor.ref(true);
const openLawPopup = () => {
if (!showFullForm.value) {
return;
}
showLawPopup.value = true;
if (lawList.value.length === 0) {
fetchRegulationList();
@@ -491,7 +598,7 @@ const _sfc_main = {
hasMoreLaw.value = lawList.value.length < total;
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:979", "获取法规列表失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1152", "获取法规列表失败:", error);
} finally {
lawLoading.value = false;
}
@@ -529,12 +636,29 @@ const _sfc_main = {
common_vendor.index.showToast({ title: "请输入检查内容", icon: "none" });
return;
}
if (showFullForm.value) {
if (!checkForm.industryId) {
common_vendor.index.showToast({ title: "请选择行业类型", icon: "none" });
return;
}
if (!checkForm.leadDept) {
common_vendor.index.showToast({ title: "请输入牵头部门", icon: "none" });
return;
}
}
try {
common_vendor.index.showLoading({ title: "添加中..." });
const params = {
const params = showFullForm.value ? {
name: checkForm.name,
point: checkForm.point,
regulationId: checkForm.regulationId || void 0
industryId: checkForm.industryId,
leadDept: checkForm.leadDept,
regulationId: checkForm.regulationId || void 0,
commonProblem: checkForm.commonProblem || void 0,
isSerious: checkForm.isSerious
} : {
name: checkForm.name,
point: checkForm.point
};
const res = await request_api.addCheckPoint(params);
if (res.code === 0) {
@@ -561,17 +685,14 @@ const _sfc_main = {
common_vendor.index.hideLoading();
common_vendor.index.showToast({ title: "添加成功", icon: "success" });
showAddPopup.value = false;
checkForm.name = "";
checkForm.point = "";
checkForm.regulationId = null;
checkForm.regulationName = "";
resetCheckForm();
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({ title: res.msg || "添加失败", icon: "none" });
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1079", "添加检查项失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1265", "添加检查项失败:", error);
common_vendor.index.showToast({ title: "添加失败", icon: "none" });
}
};
@@ -620,7 +741,7 @@ const _sfc_main = {
hasMoreLibrary.value = libraryList.value.length < total;
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1139", "获取检查库列表失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1325", "获取检查库列表失败:", error);
} finally {
libraryLoading.value = false;
}
@@ -723,11 +844,12 @@ const _sfc_main = {
selectedLibraries.value = [];
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1259", "获取检查库详情失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1445", "获取检查库详情失败:", error);
common_vendor.index.showToast({ title: "添加失败", icon: "none" });
}
};
const handleSave = async () => {
var _a;
if (!formData.name) {
common_vendor.index.showToast({ title: "请输入检查表名称", icon: "none" });
return;
@@ -740,11 +862,15 @@ const _sfc_main = {
common_vendor.index.showToast({ title: "请选择检查表类型", icon: "none" });
return;
}
if (!formData.modeName) {
if (!formData.runMode) {
common_vendor.index.showToast({ title: "请选择模式", icon: "none" });
return;
}
if (formData.modeName === "单人完成" && !formData.executorId) {
if (formData.runMode === 1 && !formData.executorId) {
common_vendor.index.showToast({ title: "请选择执行人员", icon: "none" });
return;
}
if (formData.runMode === 4 && (!formData.rosterIdentityIds || formData.rosterIdentityIds.length === 0)) {
common_vendor.index.showToast({ title: "请选择执行人员", icon: "none" });
return;
}
@@ -775,10 +901,6 @@ const _sfc_main = {
common_vendor.index.showToast({ title: "请添加检查项", icon: "none" });
return;
}
const runModeMap = {
"单人完成": 1,
"全员": 2
};
const cycleMap = {
"每天一次": 1,
"每周一次": 2,
@@ -794,7 +916,7 @@ const _sfc_main = {
description: formData.remark || "",
type: formData.type,
// 检查表类型1-日常检查2-专项检查3-设备检查
runMode: runModeMap[formData.modeName] || 2,
runMode: formData.runMode,
checkPointIds: items,
itemIds,
// 从检查库选择的库id数组
@@ -803,9 +925,12 @@ const _sfc_main = {
planStartTime: `${formData.startDate} 00:00:00`,
planEndTime: `${formData.endDate} 00:00:00`
};
if (formData.modeName === "单人完成" && formData.executorId) {
if (formData.runMode === 1 && formData.executorId) {
params.executorId = formData.executorId;
}
if (formData.runMode === 4 && ((_a = formData.rosterIdentityIds) == null ? void 0 : _a.length)) {
params.rosterIdentityIds = formData.rosterIdentityIds;
}
try {
common_vendor.index.showLoading({ title: "保存中..." });
const res = await request_api.addCheckTable(params);
@@ -820,7 +945,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1374", "保存失败:", error);
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1562", "保存失败:", error);
common_vendor.index.showToast({ title: "保存失败", icon: "none" });
}
};
@@ -829,94 +954,95 @@ const _sfc_main = {
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(($event) => formData.name = $event),
b: common_vendor.p({
a: pageScrollLockStyle.value,
b: common_vendor.o(($event) => formData.name = $event),
c: common_vendor.p({
placeholder: "请输入检查表名称",
border: "surround",
modelValue: formData.name
}),
c: common_vendor.t(formData.deptName || "请选择分派单位"),
d: common_vendor.n(formData.deptName ? "picker-value" : "picker-placeholder"),
e: common_vendor.o(openDeptPopup),
f: common_vendor.o(($event) => formData.remark = $event),
g: common_vendor.p({
d: common_vendor.t(formData.deptName || "请选择分派单位"),
e: common_vendor.n(formData.deptName ? "picker-value" : "picker-placeholder"),
f: common_vendor.o(openDeptPopup),
g: common_vendor.o(($event) => formData.remark = $event),
h: common_vendor.p({
placeholder: "请输入补充说明",
modelValue: formData.remark
}),
h: common_vendor.t(formData.typeName || "请选择检查表类型"),
i: common_vendor.n(formData.typeName ? "picker-value" : "picker-placeholder"),
j: common_vendor.o(($event) => showTypePicker.value = true),
k: common_vendor.o(onTypeConfirm),
l: common_vendor.o(($event) => showTypePicker.value = false),
i: common_vendor.t(formData.typeName || "请选择检查表类型"),
j: common_vendor.n(formData.typeName ? "picker-value" : "picker-placeholder"),
k: common_vendor.o(($event) => showTypePicker.value = true),
l: common_vendor.o(onTypeConfirm),
m: common_vendor.o(($event) => showTypePicker.value = false),
n: common_vendor.p({
n: common_vendor.o(($event) => showTypePicker.value = false),
o: common_vendor.p({
show: showTypePicker.value,
columns: typeColumns.value
}),
o: common_vendor.t(formData.modeName || "请选择模式"),
p: common_vendor.n(formData.modeName ? "picker-value" : "picker-placeholder"),
q: common_vendor.o(($event) => showModePicker.value = true),
r: common_vendor.o(onModeConfirm),
s: common_vendor.o(($event) => showModePicker.value = false),
p: common_vendor.t(formData.modeName || "请选择模式"),
q: common_vendor.n(formData.modeName ? "picker-value" : "picker-placeholder"),
r: common_vendor.o(($event) => showModePicker.value = true),
s: common_vendor.o(onModeConfirm),
t: common_vendor.o(($event) => showModePicker.value = false),
v: common_vendor.p({
v: common_vendor.o(($event) => showModePicker.value = false),
w: common_vendor.p({
show: showModePicker.value,
columns: modeColumns.value
}),
w: formData.modeName === "单人完成"
}, formData.modeName === "单人完成" ? {
x: common_vendor.t(formData.executorNames || (formData.deptId ? "请选择执行人员" : "请先选择分派单位")),
y: common_vendor.n(formData.executorNames ? "picker-value" : "picker-placeholder"),
z: common_vendor.o(openExecutorPopup)
x: formData.runMode === 1 || formData.runMode === 4
}, formData.runMode === 1 || formData.runMode === 4 ? {
y: common_vendor.t(formData.executorNames || (formData.deptId ? "请选择执行人员" : "请先选择分派单位")),
z: common_vendor.n(formData.executorNames ? "picker-value" : "picker-placeholder"),
A: common_vendor.o(openExecutorPopup)
} : {}, {
A: common_vendor.t(formData.cycleName || "请选择周期"),
B: common_vendor.n(formData.cycleName ? "picker-value" : "picker-placeholder"),
C: common_vendor.o(($event) => showCyclePicker.value = true),
D: common_vendor.o(onCycleConfirm),
E: common_vendor.o(($event) => showCyclePicker.value = false),
B: common_vendor.t(formData.cycleName || "请选择周期"),
C: common_vendor.n(formData.cycleName ? "picker-value" : "picker-placeholder"),
D: common_vendor.o(($event) => showCyclePicker.value = true),
E: common_vendor.o(onCycleConfirm),
F: common_vendor.o(($event) => showCyclePicker.value = false),
G: common_vendor.p({
G: common_vendor.o(($event) => showCyclePicker.value = false),
H: common_vendor.p({
show: showCyclePicker.value,
columns: cycleColumns.value
}),
H: formData.isWeekend === 1 ? 1 : "",
I: common_vendor.o(($event) => setIsWeekend(1)),
J: formData.isWeekend === 2 ? 1 : "",
K: common_vendor.o(($event) => setIsWeekend(2)),
L: common_vendor.t(formData.startDate || "请选择计划开始日期"),
M: common_vendor.n(formData.startDate ? "picker-value" : "picker-placeholder"),
N: common_vendor.o(openStartDatePicker),
O: common_vendor.o(onStartDatePickerChange),
P: common_vendor.o(onStartDateConfirm),
Q: common_vendor.o(($event) => showStartDatePicker.value = false),
I: formData.isWeekend === 1 ? 1 : "",
J: common_vendor.o(($event) => setIsWeekend(1)),
K: formData.isWeekend === 2 ? 1 : "",
L: common_vendor.o(($event) => setIsWeekend(2)),
M: common_vendor.t(formData.startDate || "请选择计划开始日期"),
N: common_vendor.n(formData.startDate ? "picker-value" : "picker-placeholder"),
O: common_vendor.o(openStartDatePicker),
P: common_vendor.o(onStartDatePickerChange),
Q: common_vendor.o(onStartDateConfirm),
R: common_vendor.o(($event) => showStartDatePicker.value = false),
S: common_vendor.o(($event) => startDateValue.value = $event),
T: common_vendor.p({
S: common_vendor.o(($event) => showStartDatePicker.value = false),
T: common_vendor.o(($event) => startDateValue.value = $event),
U: common_vendor.p({
show: showStartDatePicker.value,
mode: "date",
minDate: todayMinDate.value,
filter: startDateFilter.value,
modelValue: startDateValue.value
}),
U: common_vendor.t(formData.endDate || "请选择计划结束日期"),
V: common_vendor.n(formData.endDate ? "picker-value" : "picker-placeholder"),
W: common_vendor.o(openEndDatePicker),
X: common_vendor.o(onEndDatePickerChange),
Y: common_vendor.o(onEndDateConfirm),
Z: common_vendor.o(($event) => showEndDatePicker.value = false),
V: common_vendor.t(formData.endDate || "请选择计划结束日期"),
W: common_vendor.n(formData.endDate ? "picker-value" : "picker-placeholder"),
X: common_vendor.o(openEndDatePicker),
Y: common_vendor.o(onEndDatePickerChange),
Z: common_vendor.o(onEndDateConfirm),
aa: common_vendor.o(($event) => showEndDatePicker.value = false),
ab: common_vendor.o(($event) => endDateValue.value = $event),
ac: common_vendor.p({
ab: common_vendor.o(($event) => showEndDatePicker.value = false),
ac: common_vendor.o(($event) => endDateValue.value = $event),
ad: common_vendor.p({
show: showEndDatePicker.value,
mode: "date",
minDate: endDateMinDate.value,
filter: endDateFilter.value,
modelValue: endDateValue.value
}),
ad: common_vendor.t(checkItemCount.value),
ae: checkItemCount.value === 0
ae: common_vendor.t(checkItemCount.value),
af: checkItemCount.value === 0
}, checkItemCount.value === 0 ? {} : {}, {
af: common_vendor.f(manualCheckItems.value, (item, index, i0) => {
ag: common_vendor.f(manualCheckItems.value, (item, index, i0) => {
return {
a: common_vendor.t(index + 1),
b: common_vendor.t(item.name),
@@ -926,7 +1052,7 @@ const _sfc_main = {
f: "manual-" + index
};
}),
ag: common_vendor.f(libraryCheckItems.value, (item, index, i0) => {
ah: common_vendor.f(libraryCheckItems.value, (item, index, i0) => {
return {
a: common_vendor.t(item.sourceLibraryName || "-"),
b: common_vendor.t(item.name),
@@ -936,41 +1062,87 @@ const _sfc_main = {
f: "lib-" + item.pointId
};
}),
ah: common_vendor.o(($event) => showAddPopup.value = true),
ai: common_vendor.o(openLibraryPopup),
aj: common_vendor.o(handleSave),
ak: common_vendor.o(($event) => showAddPopup.value = false),
al: common_vendor.o(($event) => checkForm.name = $event),
am: common_vendor.p({
ai: common_vendor.o(($event) => showAddPopup.value = true),
aj: common_vendor.o(openLibraryPopup),
ak: common_vendor.o(handleSave),
al: common_vendor.o(($event) => showAddPopup.value = false),
am: showFullForm.value
}, showFullForm.value ? {
an: common_vendor.t(checkForm.industryName || "请选择行业类型"),
ao: common_vendor.n(checkForm.industryName ? "" : "text-gray"),
ap: common_vendor.o(($event) => showIndustryPicker.value = true),
aq: common_vendor.o(onIndustryConfirm),
ar: common_vendor.o(($event) => showIndustryPicker.value = false),
as: common_vendor.o(($event) => showIndustryPicker.value = false),
at: common_vendor.p({
show: showIndustryPicker.value,
columns: industryColumns.value
})
} : {}, {
av: common_vendor.o(($event) => checkForm.name = $event),
aw: common_vendor.p({
placeholder: "请输入检查名称",
border: "surround",
modelValue: checkForm.name
}),
an: common_vendor.o(($event) => checkForm.point = $event),
ao: common_vendor.p({
ax: showFullForm.value
}, showFullForm.value ? {
ay: common_vendor.o(($event) => checkForm.leadDept = $event),
az: common_vendor.p({
placeholder: "请输入牵头部门名称",
border: "surround",
modelValue: checkForm.leadDept
})
} : {}, {
aA: common_vendor.o(($event) => checkForm.point = $event),
aB: common_vendor.p({
placeholder: "请输入检查内容",
height: 150,
modelValue: checkForm.point
}),
ap: common_vendor.t(checkForm.regulationName || "选择法规"),
aq: common_vendor.n(checkForm.regulationName ? "" : "text-gray"),
ar: common_vendor.o(openLawPopup),
as: common_vendor.o(($event) => showAddPopup.value = false),
at: common_vendor.o(handleAddCheck),
av: common_vendor.o(($event) => showAddPopup.value = false),
aw: common_vendor.p({
aC: showFullForm.value
}, showFullForm.value ? {
aD: common_vendor.t(checkForm.regulationName || "选择法规"),
aE: common_vendor.n(checkForm.regulationName ? "" : "text-gray"),
aF: common_vendor.o(openLawPopup)
} : {}, {
aG: showFullForm.value
}, showFullForm.value ? {
aH: common_vendor.o(($event) => checkForm.commonProblem = $event),
aI: common_vendor.p({
placeholder: "请输入常见隐患",
height: 120,
modelValue: checkForm.commonProblem
})
} : {}, {
aJ: showFullForm.value
}, showFullForm.value ? {
aK: common_vendor.t(seriousName.value),
aL: common_vendor.o(($event) => showSeriousPicker.value = true),
aM: common_vendor.o(onSeriousConfirm),
aN: common_vendor.o(($event) => showSeriousPicker.value = false),
aO: common_vendor.o(($event) => showSeriousPicker.value = false),
aP: common_vendor.p({
show: showSeriousPicker.value,
columns: seriousColumns.value
})
} : {}, {
aQ: common_vendor.o(($event) => showAddPopup.value = false),
aR: common_vendor.o(handleAddCheck),
aS: common_vendor.o(($event) => showAddPopup.value = false),
aT: common_vendor.p({
show: showAddPopup.value,
mode: "center",
round: "20"
}),
ax: common_vendor.o(($event) => showLawPopup.value = false),
ay: common_vendor.o(searchRegulation),
az: lawKeyword.value,
aA: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
aB: common_vendor.o(searchRegulation),
aC: lawLoading.value && lawList.value.length === 0
aU: common_vendor.o(($event) => showLawPopup.value = false),
aV: common_vendor.o(searchRegulation),
aW: lawKeyword.value,
aX: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
aY: common_vendor.o(searchRegulation),
aZ: lawLoading.value && lawList.value.length === 0
}, lawLoading.value && lawList.value.length === 0 ? {} : !lawLoading.value && lawList.value.length === 0 ? {} : common_vendor.e({
aE: common_vendor.f(lawList.value, (item, k0, i0) => {
bb: common_vendor.f(lawList.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.depict),
b: common_vendor.t(item.legalBasis),
@@ -979,26 +1151,26 @@ const _sfc_main = {
e: common_vendor.o(($event) => selectLaw(item), item.id)
};
}),
aF: lawLoading.value
bc: lawLoading.value
}, lawLoading.value ? {} : {}), {
aD: !lawLoading.value && lawList.value.length === 0,
aG: common_vendor.o(loadMoreLaw),
aH: common_vendor.o(($event) => showLawPopup.value = false),
aI: common_vendor.o(confirmLaw),
aJ: common_vendor.o(($event) => showLawPopup.value = false),
aK: common_vendor.p({
ba: !lawLoading.value && lawList.value.length === 0,
bd: common_vendor.o(loadMoreLaw),
be: common_vendor.o(($event) => showLawPopup.value = false),
bf: common_vendor.o(confirmLaw),
bg: common_vendor.o(($event) => showLawPopup.value = false),
bh: common_vendor.p({
show: showLawPopup.value,
mode: "center",
round: "20"
}),
aL: common_vendor.o(closeLibraryPopup),
aM: common_vendor.o(searchLibrary),
aN: libraryKeyword.value,
aO: common_vendor.o(($event) => libraryKeyword.value = $event.detail.value),
aP: common_vendor.o(searchLibrary),
aQ: libraryLoading.value && libraryList.value.length === 0
bi: common_vendor.o(closeLibraryPopup),
bj: common_vendor.o(searchLibrary),
bk: libraryKeyword.value,
bl: common_vendor.o(($event) => libraryKeyword.value = $event.detail.value),
bm: common_vendor.o(searchLibrary),
bn: libraryLoading.value && libraryList.value.length === 0
}, libraryLoading.value && libraryList.value.length === 0 ? {} : !libraryLoading.value && libraryList.value.length === 0 ? {} : common_vendor.e({
aS: common_vendor.f(libraryList.value, (item, k0, i0) => {
bp: common_vendor.f(libraryList.value, (item, k0, i0) => {
return common_vendor.e({
a: selectedLibraries.value.includes(item.id)
}, selectedLibraries.value.includes(item.id) ? {} : {}, {
@@ -1009,28 +1181,28 @@ const _sfc_main = {
f: common_vendor.o(($event) => toggleLibrarySelect(item), item.id)
});
}),
aT: libraryLoading.value
bq: libraryLoading.value
}, libraryLoading.value ? {} : {}), {
aR: !libraryLoading.value && libraryList.value.length === 0,
aU: common_vendor.o(loadMoreLibrary),
aV: common_vendor.o(addSelectedLibrary),
aW: common_vendor.o(closeLibraryPopup),
aX: common_vendor.p({
bo: !libraryLoading.value && libraryList.value.length === 0,
br: common_vendor.o(loadMoreLibrary),
bs: common_vendor.o(addSelectedLibrary),
bt: common_vendor.o(closeLibraryPopup),
bv: common_vendor.p({
show: showLibraryPopup.value,
mode: "center",
round: "20"
}),
aY: common_vendor.o(cancelDeptSelect),
aZ: showDeptPicker.value
bw: common_vendor.o(cancelDeptSelect),
bx: showDeptPicker.value
}, showDeptPicker.value ? common_vendor.e({
ba: deptTree.value.length
by: deptTree.value.length
}, deptTree.value.length ? {
bb: common_vendor.sr(deptTreeRef, "98282eb3-13,98282eb3-12", {
bz: common_vendor.sr(deptTreeRef, "98282eb3-17,98282eb3-16", {
"k": "deptTreeRef"
}),
bc: common_vendor.o(onDeptCheck),
bd: common_vendor.o(onDeptNodeClick),
be: common_vendor.p({
bA: common_vendor.o(onDeptCheck),
bB: common_vendor.o(onDeptNodeClick),
bC: common_vendor.p({
data: deptTree.value,
["node-key"]: "deptId",
["label-key"]: "deptName",
@@ -1044,38 +1216,43 @@ const _sfc_main = {
["empty-text"]: "暂无部门数据"
})
} : {}) : {}, {
bf: common_vendor.o(cancelDeptSelect),
bg: common_vendor.o(confirmDeptSelect),
bh: common_vendor.o(cancelDeptSelect),
bi: common_vendor.p({
bD: common_vendor.o(cancelDeptSelect),
bE: common_vendor.o(confirmDeptSelect),
bF: common_vendor.o(cancelDeptSelect),
bG: common_vendor.p({
show: showDeptPicker.value,
mode: "center",
round: "20",
safeAreaInsetBottom: false
}),
bj: common_vendor.o(($event) => showExecutorPopup.value = false),
bk: executorList.value.length === 0
bH: common_vendor.o(($event) => showExecutorPopup.value = false),
bI: executorList.value.length === 0
}, executorList.value.length === 0 ? {} : {
bl: common_vendor.f(executorList.value, (item, k0, i0) => {
return common_vendor.e({
a: selectedExecutorId.value === item.userId
bJ: common_vendor.f(executorList.value, (item, k0, i0) => {
return common_vendor.e(formData.runMode === 4 ? common_vendor.e({
a: selectedRosterIdentityIds.value.includes(item.identityId)
}, selectedRosterIdentityIds.value.includes(item.identityId) ? {} : {}, {
b: selectedRosterIdentityIds.value.includes(item.identityId) ? 1 : ""
}) : common_vendor.e({
c: selectedExecutorId.value === item.userId
}, selectedExecutorId.value === item.userId ? {} : {}, {
b: selectedExecutorId.value === item.userId ? 1 : "",
c: common_vendor.t(item.nickName),
d: item.userId,
e: common_vendor.o(($event) => selectExecutor(item), item.userId)
d: selectedExecutorId.value === item.userId ? 1 : ""
}), {
e: common_vendor.t(item.nickName),
f: item.identityId || item.userId,
g: common_vendor.o(($event) => formData.runMode === 4 ? toggleRosterExecutor(item) : selectExecutor(item), item.identityId || item.userId)
});
})
}),
bK: formData.runMode === 4
}, {
bm: common_vendor.o(($event) => showExecutorPopup.value = false),
bn: common_vendor.o(confirmExecutorSelect),
bo: common_vendor.o(($event) => showExecutorPopup.value = false),
bp: common_vendor.p({
bL: common_vendor.o(($event) => showExecutorPopup.value = false),
bM: common_vendor.o(confirmExecutorSelect),
bN: common_vendor.o(($event) => showExecutorPopup.value = false),
bO: common_vendor.p({
show: showExecutorPopup.value,
mode: "center",
round: "20"
}),
bq: common_vendor.gei(_ctx, "")
})
});
};
}

File diff suppressed because one or more lines are too long

View File

@@ -490,6 +490,23 @@
border-radius: 50%;
background: #2667E9;
}
.executor-checkbox.data-v-98282eb3 {
width: 40rpx;
height: 40rpx;
border: 2rpx solid #ccc;
border-radius: 8rpx;
margin-right: 20rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
font-size: 24rpx;
}
.executor-checkbox-active.data-v-98282eb3 {
background: #2667E9;
border-color: #2667E9;
color: #fff;
}
.executor-info.data-v-98282eb3 {
flex: 1;
}

View File

@@ -19,14 +19,15 @@ const _sfc_main = {
const checkPointId = common_vendor.ref("");
const oneTableId = common_vendor.ref("");
const userRole = common_vendor.ref("");
const isApprovalRole = common_vendor.computed(() => userRole.value === "approval");
const getUserRole = () => {
try {
const userInfoStr = common_vendor.index.getStorageSync("userInfo");
if (userInfoStr) {
userRole.value = utils_userInfo.resolveUserRoleKey(JSON.parse(userInfoStr));
userRole.value = utils_userInfo.resolveUserIdentityRoleKey(JSON.parse(userInfoStr));
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:104", "获取用户信息失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:107", "获取用户信息失败:", error);
}
};
const fetchTaskInfo = async (oneTableId2) => {
@@ -41,7 +42,7 @@ const _sfc_main = {
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:120", "获取任务信息失败:", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:123", "获取任务信息失败:", error);
}
};
common_vendor.onLoad((options) => {
@@ -123,7 +124,7 @@ const _sfc_main = {
});
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:207", error);
common_vendor.index.__f__("error", "at pages/hiddendanger/Inspection.vue:210", error);
if (pageNum.value > 1) {
pageNum.value--;
}
@@ -214,7 +215,8 @@ const _sfc_main = {
f: item.levelName === "重大隐患" ? 1 : "",
g: common_vendor.t(item.address),
h: common_vendor.t(item.createdAt),
i: common_vendor.o(($event) => details(item), item.hazardId),
i: common_vendor.o(($event) => details(item), item.hazardId)
}, !isApprovalRole.value ? common_vendor.e({
j: item.statusName === "待整改" && item.canEdit
}, item.statusName === "待整改" && item.canEdit ? {
k: common_vendor.o(($event) => assignHazard(item), item.hazardId)
@@ -242,18 +244,22 @@ const _sfc_main = {
w: common_vendor.unref(utils_hazardNav.canShowWriteoffApprovalButton)(item, userRole.value)
}, common_vendor.unref(utils_hazardNav.canShowWriteoffApprovalButton)(item, userRole.value) ? {
x: common_vendor.o(($event) => goWriteoffApproval(item), item.hazardId)
} : {}, {
} : {}) : {}, {
y: item.hazardId
});
}),
d: hiddenDangerList.value.length > 0
d: !isApprovalRole.value,
e: hiddenDangerList.value.length > 0
}, hiddenDangerList.value.length > 0 ? {
e: common_vendor.p({
f: common_vendor.p({
status: loadStatus.value
})
} : {}, {
f: common_vendor.o(goToAdd),
g: common_vendor.gei(_ctx, "")
g: !isApprovalRole.value
}, !isApprovalRole.value ? {
h: common_vendor.o(goToAdd)
} : {}, {
i: common_vendor.gei(_ctx, "")
});
};
}

View File

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

View File

@@ -37,7 +37,7 @@ const _sfc_main = {
identityName: "",
userIdentity: null
});
const currentRoleKey = common_vendor.computed(() => utils_userInfo.resolveUserRoleKey(userInfo));
const currentRoleKey = common_vendor.computed(() => utils_userInfo.resolveUserIdentityRoleKey(userInfo));
const isApprovalRole = common_vendor.computed(() => currentRoleKey.value === "approval");
const displayIdentityName = common_vendor.computed(() => {
return utils_userInfo.resolveIdentityName(userInfo, userInfo.userIdentity);
@@ -105,7 +105,7 @@ const _sfc_main = {
const commonMenuNames = ["隐患排查", "隐患销号"];
const infoList = common_vendor.computed(() => {
if (currentRoleKey.value === "approval") {
return [];
return allMenuList.filter((item) => item.name === "隐患排查");
}
if (currentRoleKey.value === "common") {
return allMenuList.filter((item) => commonMenuNames.includes(item.name));
@@ -492,8 +492,8 @@ const _sfc_main = {
size: "14"
}),
i: common_vendor.o(goSwitchIdentity),
j: !isApprovalRole.value
}, !isApprovalRole.value ? {
j: infoList.value.length > 0
}, infoList.value.length > 0 ? {
k: common_vendor.f(infoList.value, (item, index, i0) => {
return {
a: item.src,

View File

@@ -1,7 +1,7 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const request_luchRequest_core_Request = require("./luch-request/core/Request.js");
const baseUrl = "https://yingji.hexieapi.com/prod-api";
const baseUrl = "http://192.168.1.140:5004";
const imageBaseUrl = baseUrl.replace(/\/prod-api\/?$/, "");
new request_luchRequest_core_Request.Request({
baseURL: baseUrl,

View File

@@ -278,20 +278,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}, _ctx.safeAreaInsetBottom ? {} : {}, {
p: common_vendor.s($options.contentStyle),
q: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)),
r: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)),
s: common_vendor.s($options.contentStyleWrap),
t: common_vendor.o($options.afterEnter),
v: common_vendor.o($options.clickHandler),
w: common_vendor.p({
r: common_vendor.s($options.contentStyleWrap),
s: common_vendor.o($options.afterEnter),
t: common_vendor.o($options.clickHandler),
v: common_vendor.p({
show: _ctx.pageInline ? true : _ctx.show,
customStyle: $options.transitionStyle,
mode: _ctx.pageInline ? "none" : $options.position,
duration: _ctx.duration
}),
x: common_vendor.n(_ctx.customClass),
w: common_vendor.n(_ctx.customClass),
x: _ctx.show == false ? "0px" : "",
y: _ctx.show == false ? "0px" : "",
z: _ctx.show == false ? "0px" : "",
A: common_vendor.gei(_ctx, "")
z: common_vendor.gei(_ctx, "")
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-05c24e9b"]]);

View File

@@ -1 +1 @@
<view class="{{['u-popup', 'data-v-05c24e9b', x, virtualHostClass]}}" style="{{'width:' + y + ';' + ('height:' + z) + ';' + virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{A}}"><view class="u-popup__trigger data-v-05c24e9b"><slot name="trigger"></slot><view bindtap="{{a}}" class="u-popup__trigger__cover data-v-05c24e9b"></view></view><u-overlay wx:if="{{b}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" bindclick="{{c}}" u-i="05c24e9b-0" bind:__l="__l" u-p="{{d}}"></u-overlay><u-transition wx:if="{{w}}" u-s="{{['d']}}" class="u-popup__content—transition data-v-05c24e9b" virtualHostClass="u-popup__content—transition data-v-05c24e9b" style="{{s}}" virtualHostStyle="{{s}}" bindafterEnter="{{t}}" bindclick="{{v}}" u-i="05c24e9b-1" bind:__l="__l" u-p="{{w}}"><view class="u-popup__content data-v-05c24e9b" style="{{p}}" catchtap="{{q}}" catchtouchmove="{{r}}"><u-status-bar wx:if="{{e}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" u-i="05c24e9b-2,05c24e9b-1" bind:__l="__l"></u-status-bar><view wx:if="{{f}}" class="u-popup__content__touch-area data-v-05c24e9b" bindtouchstart="{{g}}" bindtouchmove="{{h}}" bindtouchend="{{i}}" bindtouchcancel="{{j}}"><view class="u-popup__content__indicator data-v-05c24e9b"></view></view><slot></slot><view wx:if="{{k}}" catchtap="{{m}}" class="{{['u-popup__content__close', 'data-v-05c24e9b', n]}}" hover-class="u-popup__content__close--hover" hover-stay-time="150"><up-icon wx:if="{{l}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" u-i="05c24e9b-3,05c24e9b-1" bind:__l="__l" u-p="{{l}}"></up-icon></view><u-safe-bottom wx:if="{{o}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" u-i="05c24e9b-4,05c24e9b-1" bind:__l="__l"></u-safe-bottom></view><slot name="bottom"></slot></u-transition></view>
<view class="{{['u-popup', 'data-v-05c24e9b', w, virtualHostClass]}}" style="{{'width:' + x + ';' + ('height:' + y) + ';' + virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{z}}"><view class="u-popup__trigger data-v-05c24e9b"><slot name="trigger"></slot><view bindtap="{{a}}" class="u-popup__trigger__cover data-v-05c24e9b"></view></view><u-overlay wx:if="{{b}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" bindclick="{{c}}" u-i="05c24e9b-0" bind:__l="__l" u-p="{{d}}"></u-overlay><u-transition wx:if="{{v}}" u-s="{{['d']}}" class="u-popup__content—transition data-v-05c24e9b" virtualHostClass="u-popup__content—transition data-v-05c24e9b" style="{{r}}" virtualHostStyle="{{r}}" bindafterEnter="{{s}}" bindclick="{{t}}" u-i="05c24e9b-1" bind:__l="__l" u-p="{{v}}"><view class="u-popup__content data-v-05c24e9b" style="{{p}}" catchtap="{{q}}"><u-status-bar wx:if="{{e}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" u-i="05c24e9b-2,05c24e9b-1" bind:__l="__l"></u-status-bar><view wx:if="{{f}}" class="u-popup__content__touch-area data-v-05c24e9b" bindtouchstart="{{g}}" bindtouchmove="{{h}}" bindtouchend="{{i}}" bindtouchcancel="{{j}}"><view class="u-popup__content__indicator data-v-05c24e9b"></view></view><slot></slot><view wx:if="{{k}}" catchtap="{{m}}" class="{{['u-popup__content__close', 'data-v-05c24e9b', n]}}" hover-class="u-popup__content__close--hover" hover-stay-time="150"><up-icon wx:if="{{l}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" u-i="05c24e9b-3,05c24e9b-1" bind:__l="__l" u-p="{{l}}"></up-icon></view><u-safe-bottom wx:if="{{o}}" class="data-v-05c24e9b" virtualHostClass="data-v-05c24e9b" u-i="05c24e9b-4,05c24e9b-1" bind:__l="__l"></u-safe-bottom></view><slot name="bottom"></slot></u-transition></view>

View File

@@ -334,6 +334,18 @@ const _sfc_main = {
}
__expose({ getCheckedKeys, getCheckedNodes, setCheckedKeys, expandAll, collapseAll, clearChecked, setNodeChecked, checkAll });
updateCheckedState();
const scrollStyle = common_vendor.computed(() => {
const style = {
width: "100%",
boxSizing: "border-box"
};
if (props.height) {
style.height = `${props.height}rpx`;
} else {
style.height = "100%";
}
return style;
});
return (_ctx, _cache) => {
return common_vendor.e({
a: flatData.value.length === 0
@@ -386,9 +398,10 @@ const _sfc_main = {
tag: "view"
})
}, {
g: `${__props.width}rpx`,
h: `${__props.height}rpx`,
i: common_vendor.gei(_ctx, "")
g: __props.width ? `${__props.width}rpx` : void 0,
h: __props.height ? `${__props.height}rpx` : void 0,
i: common_vendor.s(scrollStyle.value),
j: common_vendor.gei(_ctx, "")
});
};
}

View File

@@ -1 +1 @@
<scroll-view scroll-x scroll-y enable-flex class="{{['tree-wrapper', 'data-v-e21fa87f', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{i}}"><view class="xq-tree-scroll data-v-e21fa87f"><view class="xq-tree data-v-e21fa87f" style="{{'min-width:' + g + ';' + ('min-height:' + h)}}"><view wx:if="{{a}}" class="xq-tree-empty data-v-e21fa87f">{{b}}</view><transition-group wx:else u-s="{{['d']}}" class="xq-tree-list data-v-e21fa87f" virtualHostClass="xq-tree-list data-v-e21fa87f" u-i="e21fa87f-0" bind:__l="__l" u-p="{{f||''}}"><view wx:for="{{c}}" wx:for-item="node" wx:key="l" class="{{['xq-tree-node', 'data-v-e21fa87f', node.m]}}" style="{{'padding-left:' + node.n + ';' + ('animation-delay:' + node.o)}}"><view class="xq-tree-node-content data-v-e21fa87f" bindtap="{{node.k}}"><view class="xq-tree-node-icon data-v-e21fa87f" catchtap="{{node.c}}"><text wx:if="{{node.a}}" class="{{['icon-arrow', 'data-v-e21fa87f', node.b && 'is-expanded']}}"> ▶ </text><view wx:else class="leaf-icon-placeholder data-v-e21fa87f"></view></view><view wx:if="{{d}}" class="xq-tree-node-checkbox data-v-e21fa87f" catchtap="{{node.g}}"><view class="{{['checkbox-custom', 'data-v-e21fa87f', node.f]}}"><text wx:if="{{node.d}}" class="data-v-e21fa87f"> ✓ </text><text wx:elif="{{node.e}}" class="data-v-e21fa87f"> — </text></view></view><slot wx:if="{{e}}" name="{{node.h}}"/><text wx:else class="xq-tree-node-label data-v-e21fa87f">{{node.j}}</text></view></view></transition-group></view></view></scroll-view>
<scroll-view scroll-x scroll-y enable-flex style="{{i + ';' + virtualHostStyle}}" class="{{['tree-wrapper', 'data-v-e21fa87f', virtualHostClass]}}" hidden="{{virtualHostHidden || false}}" id="{{j}}"><view class="xq-tree-scroll data-v-e21fa87f"><view class="xq-tree data-v-e21fa87f" style="{{'min-width:' + g + ';' + ('min-height:' + h)}}"><view wx:if="{{a}}" class="xq-tree-empty data-v-e21fa87f">{{b}}</view><transition-group wx:else u-s="{{['d']}}" class="xq-tree-list data-v-e21fa87f" virtualHostClass="xq-tree-list data-v-e21fa87f" u-i="e21fa87f-0" bind:__l="__l" u-p="{{f||''}}"><view wx:for="{{c}}" wx:for-item="node" wx:key="l" class="{{['xq-tree-node', 'data-v-e21fa87f', node.m]}}" style="{{'padding-left:' + node.n + ';' + ('animation-delay:' + node.o)}}"><view class="xq-tree-node-content data-v-e21fa87f" bindtap="{{node.k}}"><view class="xq-tree-node-icon data-v-e21fa87f" catchtap="{{node.c}}"><view wx:if="{{node.a}}" class="{{['icon-arrow', 'data-v-e21fa87f', node.b && 'is-expanded']}}"/><view wx:else class="leaf-icon-placeholder data-v-e21fa87f"></view></view><view wx:if="{{d}}" class="xq-tree-node-checkbox data-v-e21fa87f" catchtap="{{node.g}}"><view class="{{['checkbox-custom', 'data-v-e21fa87f', node.f]}}"><text wx:if="{{node.d}}" class="data-v-e21fa87f"> ✓ </text><text wx:elif="{{node.e}}" class="data-v-e21fa87f"> — </text></view></view><slot wx:if="{{e}}" name="{{node.h}}"/><text wx:else class="xq-tree-node-label data-v-e21fa87f">{{node.j}}</text></view></view></transition-group></view></view></scroll-view>

View File

@@ -26,45 +26,23 @@
/* 文章场景相关 */
.xq-tree.data-v-e21fa87f {
display: inline-block;
/* ⚠️ 关键:宽度由内容撑开,不继承父容器宽度 */
/* 内容不换行 */
/* 至少撑满容器 */
box-sizing: border-box;
width: -webkit-max-content;
width: max-content;
/* 宽度由内容决定,不换行 */
white-space: nowrap;
}
.tree-wrapper.data-v-e21fa87f {
width: 100%;
height: 100%;
/* 确保节点不换行 */
box-sizing: border-box;
}
.xq-tree-scroll.data-v-e21fa87f {
display: inline-block;
/* ⚠️ 关键:宽度由内容撑开,不继承父容器宽度 */
white-space: nowrap;
/* 内容不换行 */
min-width: 100%;
/* 至少撑满容器 */
box-sizing: border-box;
background-color: #fff;
padding: 16rpx;
}
/* 小程序下 scroll-view 的滚动条样式由原生控制通常无法自定义H5 端同样可用 ::-webkit-scrollbar */
/* 下面的样式仅对 H5 端生效 */
.tree-wrapper.data-v-e21fa87f::-webkit-scrollbar {
height: 8rpx;
width: 8rpx;
}
.tree-wrapper.data-v-e21fa87f::-webkit-scrollbar-track {
background: #f1f1f1;
}
.tree-wrapper.data-v-e21fa87f::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4rpx;
}
.tree-node-enter-active.data-v-e21fa87f {
animation: treeExpandIn-e21fa87f 0.3s ease-out both;
}
@@ -108,36 +86,47 @@
}
.xq-tree-node.data-v-e21fa87f {
padding: 8rpx 0;
overflow: hidden;
transform-origin: top;
}
.xq-tree.data-v-e21fa87f {
width: 100%;
}
.xq-tree-empty.data-v-e21fa87f {
padding: 40rpx;
text-align: center;
color: #999;
}
.xq-tree-node.data-v-e21fa87f {
padding: 8rpx 0;
}
.xq-tree-node-content.data-v-e21fa87f {
display: flex;
align-items: center;
}
.xq-tree-node-icon.data-v-e21fa87f {
width: 40rpx;
text-align: center;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.icon-arrow.data-v-e21fa87f {
width: 0;
height: 0;
border-top: 8rpx solid transparent;
border-bottom: 8rpx solid transparent;
border-left: 10rpx solid #666;
transition: transform 0.2s ease;
transform-origin: 30% 50%;
}
.icon-arrow.is-expanded.data-v-e21fa87f {
transform: rotate(90deg);
}
.xq-tree-node-checkbox.data-v-e21fa87f {
margin-right: 12rpx;
flex-shrink: 0;
}
.xq-tree-node-label.data-v-e21fa87f {
flex: 1;
flex-shrink: 0;
white-space: nowrap;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.checkbox-custom.data-v-e21fa87f {
width: 32rpx;
@@ -159,22 +148,8 @@
color: #fff;
}
.leaf-icon-placeholder.data-v-e21fa87f {
width: 100%;
height: 100%;
}
.uni-icon-warp.data-v-e21fa87f {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40rpx;
height: 40rpx;
}
.icon-arrow.is-expanded.data-v-e21fa87f {
transform: rotate(90deg);
}
.icon-arrow.data-v-e21fa87f {
display: inline-block;
transition: transform 0.3s ease;
width: 16rpx;
height: 16rpx;
}
page.data-v-e21fa87f {
box-sizing: border-box;

View File

@@ -35,6 +35,12 @@ function resolveRoleKey(roles, fallback = "") {
return normalizeRoleKey(first);
return normalizeRoleKey(first.roleKey || first.role || fallback);
}
function resolveUserIdentityRoleKey(userInfo) {
if (!userInfo)
return "";
const identity = normalizeUserIdentity(userInfo.userIdentity);
return normalizeRoleKey(identity == null ? void 0 : identity.roleKey);
}
function resolveUserRoleKey(userInfo) {
if (!userInfo)
return "";
@@ -134,7 +140,8 @@ function applyStoredUserInfo(target, stored) {
}
exports.applyProfileToUserInfo = applyProfileToUserInfo;
exports.applyStoredUserInfo = applyStoredUserInfo;
exports.getCurrentIdentityFromStorage = getCurrentIdentityFromStorage;
exports.resolveIdentityName = resolveIdentityName;
exports.resolveUserRoleKey = resolveUserRoleKey;
exports.resolveUserIdentityRoleKey = resolveUserIdentityRoleKey;
exports.saveUserInfoToStorage = saveUserInfoToStorage;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/userInfo.js.map