first commit
This commit is contained in:
155
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
155
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const loading = common_vendor.ref(true);
|
||||
const infoList = common_vendor.ref([
|
||||
{
|
||||
name: "成员管理",
|
||||
src: "../../static/组 19378.png"
|
||||
},
|
||||
{
|
||||
name: "企业信息填报",
|
||||
src: "../../static/组 19387.png"
|
||||
},
|
||||
{
|
||||
name: "区域设置",
|
||||
src: "../../static/组 20253.png"
|
||||
},
|
||||
{
|
||||
name: "检查表",
|
||||
src: "../../static/组 20254.png"
|
||||
},
|
||||
{
|
||||
name: "检查记录",
|
||||
src: "../../static/组 20255.png"
|
||||
},
|
||||
{
|
||||
name: "证照管理",
|
||||
src: "../../static/组 20256.png"
|
||||
},
|
||||
{
|
||||
name: "隐患排查",
|
||||
src: "../../static/组 20257.png"
|
||||
},
|
||||
{
|
||||
name: "隐患销号申请",
|
||||
src: "../../static/组 20258.png"
|
||||
},
|
||||
{
|
||||
name: "设备登记",
|
||||
src: "../../static/组 20259.png"
|
||||
}
|
||||
]);
|
||||
const ViewDetails = (item) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/plandetail/plandetail?id=${item.id}`
|
||||
});
|
||||
};
|
||||
const goDetails = (item) => {
|
||||
common_vendor.index.navigateTo({
|
||||
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",
|
||||
"企业信息填报": "/pages/corporateInformation/corporateInformation",
|
||||
"区域设置": "/pages/area/management",
|
||||
"检查表": "/pages/checklist/checklist",
|
||||
"检查记录": "/pages/Inspectionlog/Inspectionlog",
|
||||
"证照管理": "/pages/Idphotomanagement/Idphotomanagement",
|
||||
"隐患排查": "/pages/hiddendanger/Inspection",
|
||||
"隐患销号申请": "/pages/closeout/application",
|
||||
"设备登记": "/pages/equipmentregistration/equipmentregistration"
|
||||
// 可以在这里添加其他菜单的跳转路径
|
||||
};
|
||||
const url = menuRoutes[item.name];
|
||||
if (url) {
|
||||
common_vendor.index.navigateTo({ url });
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: "功能开发中", icon: "none" });
|
||||
}
|
||||
};
|
||||
const checkPlanParams = common_vendor.ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: ""
|
||||
});
|
||||
const checkPlanData = common_vendor.ref([]);
|
||||
const getCheckPlanLists = async () => {
|
||||
try {
|
||||
const res = await request_api.getCheckPlanList(checkPlanParams.value);
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
checkPlanData.value = res.data.records;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
const formatDate = (dateStr) => {
|
||||
if (!dateStr)
|
||||
return "";
|
||||
return dateStr.split(" ")[0];
|
||||
};
|
||||
common_vendor.onLoad(() => {
|
||||
getCheckPlanLists();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(infoList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: item.src,
|
||||
b: common_vendor.t(item.name),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => handleMenuClick(item), index)
|
||||
};
|
||||
}),
|
||||
b: checkPlanData.value.length === 0
|
||||
}, checkPlanData.value.length === 0 ? {} : {}, {
|
||||
c: common_vendor.f(checkPlanData.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.t(item.runModeName),
|
||||
c: common_vendor.t(item.cycle),
|
||||
d: common_vendor.t(formatDate(item.planStartTime)),
|
||||
e: common_vendor.t(formatDate(item.planEndTime)),
|
||||
f: item.progress + "%",
|
||||
g: common_vendor.t(item.progress),
|
||||
h: common_vendor.t(item.totalCount),
|
||||
i: common_vendor.t(item.totalCount - item.finishedCount),
|
||||
j: common_vendor.t(item.finishedCount),
|
||||
k: common_vendor.o(($event) => ViewDetails(item), item.id),
|
||||
l: common_vendor.o(($event) => goDetails(item), item.id),
|
||||
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())
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
4
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "三查一曝光",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
73
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
73
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* uni.scss */
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.list.data-v-1cf27b2a {
|
||||
background: #F2F6FF;
|
||||
box-shadow: 0rpx 4rpx 8rpx 2rpx #CADDFC;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.list-list.data-v-1cf27b2a {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 2rpx 6rpx 2rpx rgba(0, 0, 0, 0.08);
|
||||
border-left: 5px solid #2667E9;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.border-tite.data-v-1cf27b2a {
|
||||
width: 10rpx;
|
||||
height: 32rpx;
|
||||
background: #2667E9;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
}
|
||||
.cu-progress.data-v-1cf27b2a {
|
||||
width: 300rpx;
|
||||
height: 20rpx;
|
||||
background: #ebeef5;
|
||||
border-radius: 100rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cu-progress view.data-v-1cf27b2a {
|
||||
height: 100%;
|
||||
border-radius: 100rpx;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
.bg-green.data-v-1cf27b2a {
|
||||
background: #2667E9;
|
||||
}
|
||||
.border-border.data-v-1cf27b2a {
|
||||
padding: 10rpx;
|
||||
background: #EEF3FF;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
border: 2rpx solid #AAC5FC;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
color: #2667E9;
|
||||
}
|
||||
Reference in New Issue
Block a user