From bebc6b4464c4a3be2f5f51484260d5fcc67306ce Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 03 二月 2026 14:05:58 +0800
Subject: [PATCH] 隐患排查附件功能开发
---
src/pages/index.vue | 171 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 91 insertions(+), 80 deletions(-)
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 8e220a5..10d6a58 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -1,24 +1,24 @@
<template>
<view class="content">
- <view class="header-section">
- <view class="currentFactory">
- <up-text type="primary"
- :text="userStore.currentFactoryName"
- @click="show = true"
- size="18"
- class="factoryName"
- suffixIcon="arrow-right"
- :iconStyle="iconStyle"></up-text>
- </view>
- <up-picker :show="show"
- :columns="factoryList"
- @confirm="changeFactory"
- @cancel="show = false"></up-picker>
- </view>
+ <!-- <view class="header-section">-->
+ <!-- <view class="currentFactory">-->
+ <!-- <up-text type="primary"-->
+ <!-- :text="userStore.currentFactoryName"-->
+ <!-- @click="show = true"-->
+ <!-- size="18"-->
+ <!-- class="factoryName"-->
+ <!-- suffixIcon="arrow-right"-->
+ <!-- :iconStyle="iconStyle"></up-text>-->
+ <!-- </view>-->
+ <!-- <up-picker :show="show"-->
+ <!-- :columns="factoryList"-->
+ <!-- @confirm="changeFactory"-->
+ <!-- @cancel="show = false"></up-picker>-->
+ <!-- </view>-->
<view class="hero-section">
<view class="bg-img">
<view class="hero-content">
- <text class="hero-title">鍐涙嘲浼熶笟</text>
+ <!-- <text class="hero-title">鍐涙嘲浼熶笟</text>-->
</view>
<view class="hero-wave"></view>
</view>
@@ -96,6 +96,30 @@
<up-grid :border="false"
col="4">
<up-grid-item v-for="(item, index) in collaborationItems"
+ :key="index"
+ @click="handleCommonItemClick(item)">
+ <view class="icon-container"
+ :style="{ background: item.bgColor }">
+ <up-icon :name="item.icon"
+ :size="58"
+ color="#ffffff"></up-icon>
+ </view>
+ <text class="item-label">{{item.label}}</text>
+ </up-grid-item>
+ </up-grid>
+ </view>
+ </view>
+ <!-- 瀹夊叏鐢熶骇妯″潡 -->
+ <view class="common-module collaboration-module">
+ <view class="module-header">
+ <view class="module-title-container">
+ <text class="module-title">瀹夊叏鐢熶骇</text>
+ </view>
+ </view>
+ <view class="module-content">
+ <up-grid :border="false"
+ col="4">
+ <up-grid-item v-for="(item, index) in safetyItems"
:key="index"
@click="handleCommonItemClick(item)">
<view class="icon-container"
@@ -197,7 +221,6 @@
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
- const factoryId = ref("");
const show = ref(false);
const factoryList = ref([]);
const factoryListTem = ref([]);
@@ -275,21 +298,30 @@
label: "渚涘簲鍟嗗線鏉�",
},
]);
-
+ const safetyItems = reactive([
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ label: "瑙勭▼璧勮川",
+ },
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ label: "鍗遍櫓婧愮鐞�",
+ },
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ label: "鍗遍櫓浣滀笟",
+ },
+ {
+ icon: "/static/images/icon/xunjianshangchuan@2x.png",
+ label: "宸℃涓婁紶",
+ },
+ {
+ icon: "/static/images/icon/guzhangfenxi@2x.png",
+ label: "闅愭偅鎺掓煡",
+ },
+ ]);
// 鍗忓悓鍔炲叕鍔熻兘鏁版嵁
const collaborationItems = reactive([
- // {
- // icon: "/static/images/icon/gongchuguanli@2x.png",
- // label: "鍏嚭绠$悊",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "璇峰亣绠$悊",
- // },
- // {
- // icon: "/static/images/icon/chuchaiguanli@2x.png",
- // label: "鍑哄樊绠$悊",
- // },
{
icon: "/static/images/icon/gongchuguanli@2x.png",
label: "鑰冨嫟绠$悊",
@@ -298,54 +330,10 @@
icon: "/static/images/icon/baoxiaoguanli.png",
label: "璐㈠姟绠$悊",
},
- // {
- // icon: "/static/images/icon/chuchaiguanli@2x.png",
- // label: "鎶ラ攢绠$悊",
- // },
- // {
- // icon: "/static/images/icon/chuchaiguanli@2x.png",
- // label: "閲囪喘绠$悊",
- // },
- // {
- // icon: "/static/images/icon/chuchaiguanli@2x.png",
- // label: "鎶ヤ环绠$悊",
- // },
- // {
- // icon: "/static/images/icon/chuchaiguanli@2x.png",
- // label: "鍑哄簱绠$悊",
- // },
{
icon: "/static/images/icon/huiyiliebiao@2x.png",
label: "浼氳绠$悊",
},
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳璁剧疆",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳鍒楄〃",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳鐢宠",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳瀹℃壒",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳鍙戝竷",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳鎬荤粨",
- // },
- // {
- // icon: "/static/images/icon/qingjiaguanli@2x.png",
- // label: "浼氳鐪嬫澘",
- // },
{
icon: "/static/images/icon/tongzhigonggao@2x.png",
label: "閫氱煡鍏憡",
@@ -409,15 +397,15 @@
// },
{
icon: "/static/images/icon/shbeibaoxiu@2x.png",
+ label: "杩愯绠$悊",
+ },
+ {
+ icon: "/static/images/icon/shbeibaoxiu@2x.png",
label: "璁惧鎶ヤ慨",
},
{
icon: "/static/images/icon/shbeibaoyang@2x.png",
label: "璁惧淇濆吇",
- },
- {
- icon: "/static/images/icon/xunjianshangchuan@2x.png",
- label: "宸℃涓婁紶",
},
{
icon: "/static/images/icon/guzhangfenxi@2x.png",
@@ -649,6 +637,11 @@
url: "/pages/equipmentManagement/ledger/index",
});
break;
+ case "杩愯绠$悊":
+ uni.navigateTo({
+ url: "/pages/equipmentManagement/runManagement/index",
+ });
+ break;
case "璁惧鎶ヤ慨":
uni.navigateTo({
url: "/pages/equipmentManagement/repair/index",
@@ -684,6 +677,26 @@
url: "/pages/equipmentManagement/verification/index",
});
break;
+ case "瑙勭▼璧勮川":
+ uni.navigateTo({
+ url: "/pages/safeProduction/safeQualifications/index",
+ });
+ break;
+ case "鍗遍櫓婧愮鐞�":
+ uni.navigateTo({
+ url: "/pages/safeProduction/hazardSourceLedger/index",
+ });
+ break;
+ case "鍗遍櫓浣滀笟":
+ uni.navigateTo({
+ url: "/pages/cooperativeOffice/collaborativeApproval/index8",
+ });
+ break;
+ case "闅愭偅鎺掓煡":
+ uni.navigateTo({
+ url: "/pages/safeProduction/dangerInvestigation/index",
+ });
+ break;
default:
uni.showToast({
title: `鐐瑰嚮浜�${item.label}`,
@@ -705,7 +718,6 @@
res.data.forEach(item => {
factoryList.value[0].push(item.deptName);
});
- factoryId.value = userStore.currentDeptId;
} else {
// 濡傛灉res.data涓嶆槸鏁扮粍锛岃缃负绌烘暟缁�
factoryList.value = [];
@@ -808,7 +820,6 @@
const loginForm = {
username: userStore.name,
password: uni.getStorageSync("remembered_password"),
- factoryId: factoryId,
};
modal.loading("鍒锋柊涓紝璇疯�愬績绛夊緟...");
userStore
--
Gitblit v1.9.3