1.18整合
This commit is contained in:
@@ -6,6 +6,28 @@ const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const loading = common_vendor.ref(true);
|
||||
const userInfo = common_vendor.reactive({
|
||||
userId: "",
|
||||
username: "",
|
||||
nickName: "",
|
||||
deptId: "",
|
||||
deptName: ""
|
||||
});
|
||||
const getUserInfo = () => {
|
||||
try {
|
||||
const storedUserInfo = common_vendor.index.getStorageSync("userInfo");
|
||||
if (storedUserInfo) {
|
||||
const info = JSON.parse(storedUserInfo);
|
||||
userInfo.userId = info.userId || "";
|
||||
userInfo.username = info.username || "";
|
||||
userInfo.nickName = info.nickName || "";
|
||||
userInfo.deptId = info.deptId || "";
|
||||
userInfo.deptName = info.deptName || "";
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("获取用户信息失败:", e);
|
||||
}
|
||||
};
|
||||
const infoList = common_vendor.ref([
|
||||
{
|
||||
name: "成员管理",
|
||||
@@ -54,16 +76,6 @@ const _sfc_main = {
|
||||
url: `/pages/Inspectionresult/Inspectionresult?id=${item.id}`
|
||||
});
|
||||
};
|
||||
const Inspectionwarning = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Inspectionwarning/Inspectionwarning"
|
||||
});
|
||||
};
|
||||
const my = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/personalcenter/my"
|
||||
});
|
||||
};
|
||||
const handleMenuClick = (item) => {
|
||||
const menuRoutes = {
|
||||
"成员管理": "/pages/membermanagemen/membermanagemen",
|
||||
@@ -109,11 +121,37 @@ const _sfc_main = {
|
||||
return dateStr.split(" ")[0];
|
||||
};
|
||||
common_vendor.onLoad(() => {
|
||||
getUserInfo();
|
||||
getCheckPlanLists();
|
||||
});
|
||||
const hiddenDangerParams = common_vendor.ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: ""
|
||||
});
|
||||
const hiddenDangerData = common_vendor.ref([]);
|
||||
const getHiddenDangerLists = async () => {
|
||||
try {
|
||||
const res = await request_api.getHiddenDangerList(hiddenDangerParams.value);
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
hiddenDangerData.value = res.data.records;
|
||||
console.log(hiddenDangerData.value, 1111);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad(() => {
|
||||
getHiddenDangerLists();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(infoList.value, (item, index, i0) => {
|
||||
a: common_vendor.t(userInfo.deptName || "未知部门"),
|
||||
b: common_vendor.t(userInfo.nickName || userInfo.username || "未登录"),
|
||||
c: common_vendor.f(infoList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: item.src,
|
||||
b: common_vendor.t(item.name),
|
||||
@@ -121,9 +159,9 @@ const _sfc_main = {
|
||||
d: common_vendor.o(($event) => handleMenuClick(item), index)
|
||||
};
|
||||
}),
|
||||
b: checkPlanData.value.length === 0
|
||||
d: checkPlanData.value.length === 0
|
||||
}, checkPlanData.value.length === 0 ? {} : {}, {
|
||||
c: common_vendor.f(checkPlanData.value, (item, index, i0) => {
|
||||
e: common_vendor.f(checkPlanData.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.t(item.runModeName),
|
||||
@@ -140,13 +178,19 @@ const _sfc_main = {
|
||||
m: item.id
|
||||
};
|
||||
}),
|
||||
d: common_assets._imports_0,
|
||||
e: common_assets._imports_1,
|
||||
f: common_assets._imports_2,
|
||||
g: common_assets._imports_3,
|
||||
h: common_vendor.o(($event) => Inspectionwarning()),
|
||||
i: common_assets._imports_4,
|
||||
j: common_vendor.o(($event) => my())
|
||||
f: common_assets._imports_0,
|
||||
g: common_vendor.f(hiddenDangerData.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.source),
|
||||
c: common_vendor.t(item.address),
|
||||
d: common_vendor.t(item.levelName),
|
||||
e: common_vendor.t(item.statusName),
|
||||
f: common_vendor.t(item.createdAt),
|
||||
g: item.id,
|
||||
h: common_vendor.o(($event) => _ctx.HazardList(), item.id)
|
||||
};
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -24,6 +24,10 @@
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.grid-list.data-v-1cf27b2a {
|
||||
gap: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.list.data-v-1cf27b2a {
|
||||
background: #F2F6FF;
|
||||
box-shadow: 0rpx 4rpx 8rpx 2rpx #CADDFC;
|
||||
|
||||
Reference in New Issue
Block a user