From 4071a902f383275b7ed284876bbdf3e19cfa3522 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 09 二月 2026 18:02:15 +0800
Subject: [PATCH] Merge branch 'dev_new' of http://114.132.189.42:9002/r/product-inventory-APP-before into dev_new
---
src/pages/index.vue | 338 ++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 216 insertions(+), 122 deletions(-)
diff --git a/src/pages/index.vue b/src/pages/index.vue
index dcda116..7094cf9 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>-->
+ <!-- 棰勭暀锛氬鍚庣画闇�瑕佸彲鍦ㄦ鏀� logo 鎴栫畝鐭彁绀� -->
</view>
<view class="hero-wave"></view>
</view>
@@ -133,6 +133,30 @@
</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 humanResourcesItems"
+ :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 production-module">-->
<!-- <view class="module-header">-->
@@ -220,7 +244,7 @@
import modal from "@/plugins/modal";
import useUserStore from "@/store/modules/user";
- const userStore = useUserStore();;
+ const userStore = useUserStore();
const show = ref(false);
const factoryList = ref([]);
const factoryListTem = ref([]);
@@ -298,6 +322,16 @@
label: "渚涘簲鍟嗗線鏉�",
},
]);
+ const humanResourcesItems = reactive([
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ label: "鎵撳崱绛惧埌",
+ },
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ label: "浜哄憳钖祫",
+ },
+ ]);
const safetyItems = reactive([
{
icon: "/static/images/icon/caigoutaizhang@2x.png",
@@ -305,7 +339,31 @@
},
{
icon: "/static/images/icon/caigoutaizhang@2x.png",
- label: "鍗遍櫓婧愮鐞�",
+ label: "鍗遍櫓婧愬彴璐�",
+ },
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ label: "鍗遍櫓浣滀笟",
+ },
+ {
+ icon: "/static/images/icon/guzhangfenxi@2x.png",
+ label: "闅愭偅鎺掓煡",
+ },
+ {
+ icon: "/static/images/icon/guzhangfenxi@2x.png",
+ label: "鍗遍櫓鐗╂枡",
+ },
+ {
+ icon: "/static/images/icon/guzhangfenxi@2x.png",
+ label: "搴旀�ラ妗�",
+ },
+ {
+ icon: "/static/images/icon/guzhangfenxi@2x.png",
+ label: "浜嬫晠涓婃姤",
+ },
+ {
+ icon: "/static/images/icon/guzhangfenxi@2x.png",
+ label: "瀹夊叏鍩硅",
},
]);
// 鍗忓悓鍔炲叕鍔熻兘鏁版嵁
@@ -396,10 +454,6 @@
label: "璁惧淇濆吇",
},
{
- icon: "/static/images/icon/xunjianshangchuan@2x.png",
- label: "宸℃涓婁紶",
- },
- {
icon: "/static/images/icon/guzhangfenxi@2x.png",
label: "鍒嗘瀽杩芥函",
bgColor: "#ff9800",
@@ -418,6 +472,10 @@
icon: "/static/images/icon/jieguoyanzheng@2x.png",
label: "缁撴灉楠岃瘉",
bgColor: "#9c27b0",
+ },
+ {
+ icon: "/static/images/icon/xunjianshangchuan@2x.png",
+ label: "宸℃涓婁紶",
},
]);
@@ -674,9 +732,44 @@
url: "/pages/safeProduction/safeQualifications/index",
});
break;
- case "鍗遍櫓婧愮鐞�":
+ 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;
+ case "鍗遍櫓鐗╂枡":
+ uni.navigateTo({
+ url: "/pages/safeProduction/hazardousMaterialsControl/index",
+ });
+ break;
+ case "搴旀�ラ妗�":
+ uni.navigateTo({
+ url: "/pages/safeProduction/emergencyPlanReview/index",
+ });
+ break;
+ case "浜嬫晠涓婃姤":
+ uni.navigateTo({
+ url: "/pages/safeProduction/accidentReportingRecord/index",
+ });
+ break;
+ case "瀹夊叏鍩硅":
+ uni.navigateTo({
+ url: "/pages/safeProduction/safetyTrainingAssessment/index",
+ });
+ break;
+ case "鎵撳崱绛惧埌":
+ uni.navigateTo({
+ url: "/pages/attendance/checkin",
});
break;
default:
@@ -699,7 +792,7 @@
factoryListTem.value = res.data;
res.data.forEach(item => {
factoryList.value[0].push(item.deptName);
- })
+ });
} else {
// 濡傛灉res.data涓嶆槸鏁扮粍锛岃缃负绌烘暟缁�
factoryList.value = [];
@@ -841,24 +934,21 @@
<style scoped lang="scss">
.content {
- background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
+ background: #f6f7fb;
min-height: 100vh;
- padding: 1.25rem;
- /* 涓烘墍鏈夎澶囪缃熀纭�padding-top */
- padding-top: 40px;
+ padding: 12px;
+ /* 涓烘墍鏈夎澶囪缃熀纭�padding-top锛堝寘鍚畨鍏ㄥ尯锛� */
+ padding-top: calc(env(safe-area-inset-top) + 30px);
position: relative;
-
- /* iOS璁惧浣跨敤env()鍑芥暟澶勭悊瀹夊叏鍖哄煙 */
- padding-top: env(safe-area-inset-top);
/* 涓哄畨鍗撹澶囪缃洿澶х殑椤堕儴鍐呰竟璺� */
/* #ifdef APP-PLUS && !MP && !H5 */
- padding-top: 45px;
+ padding-top: calc(env(safe-area-inset-top) + 45px);
/* #endif */
/* H5鍜屽皬绋嬪簭骞冲彴鐨勯�氱敤鏍峰紡 */
/* #ifdef H5 || MP */
- padding-top: 30px;
+ padding-top: calc(env(safe-area-inset-top) + 30px);
/* #endif */
&::before {
@@ -868,7 +958,7 @@
left: 0;
right: 0;
bottom: 0;
- background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(41, 121, 255, 0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
+ background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="24" height="24" patternUnits="userSpaceOnUse"><circle cx="12" cy="12" r="1" fill="rgba(41, 121, 255, 0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
pointer-events: none;
z-index: -1;
}
@@ -883,12 +973,12 @@
background: radial-gradient(
circle at 20% 80%,
rgba(41, 121, 255, 0.02) 0%,
- transparent 50%
+ transparent 55%
),
radial-gradient(
circle at 80% 20%,
- rgba(156, 39, 176, 0.02) 0%,
- transparent 50%
+ rgba(156, 39, 176, 0.015) 0%,
+ transparent 55%
);
pointer-events: none;
z-index: -1;
@@ -920,19 +1010,19 @@
}
.hero-section {
- margin-bottom: 1rem;
+ margin-bottom: 12px;
animation: fadeInUp 0.6s ease-out 0.1s both;
}
.bg-img {
width: 100%;
- height: 8.75rem;
+ height: 9.25rem;
background-image: url("../static/images/banner/backview.png");
background-size: cover;
- border-radius: 0.75rem;
+ border-radius: 14px;
position: relative;
overflow: hidden;
- box-shadow: 0 0.25rem 1.25rem rgba(41, 121, 255, 0.15);
+ box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
&::before {
content: "";
@@ -972,35 +1062,11 @@
.hero-content {
position: relative;
z-index: 1;
- padding: 1.25rem 1.25rem 1.6rem 1.25rem;
+ padding: 14px 14px 18px 14px;
height: 100%;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- }
-
- .hero-title {
- color: #ffffff;
- font-size: 1.625rem;
- font-weight: 700;
- letter-spacing: 0.03125rem;
- text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
- }
- .hero-subtitle {
- font-size: 0.8125rem;
- margin-top: 0.375rem;
}
.hero-wave {
height: 2.75rem;
- }
-
- .hero-subtitle {
- color: rgba(255, 255, 255, 0.9);
- font-size: 0.8125rem;
- margin-top: 0.375rem;
- font-weight: 400;
- text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.5);
}
.hero-wave {
@@ -1170,11 +1236,11 @@
/* 鍔熻兘妯″潡鏍峰紡 */
.common-module {
- margin-bottom: 1.5rem;
- background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
- border-radius: 1rem;
- padding: 1rem;
- box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.06);
+ margin-bottom: 12px;
+ background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
+ border-radius: 14px;
+ padding: 12px;
+ box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
border: none;
position: relative;
overflow: hidden;
@@ -1218,7 +1284,7 @@
}
.module-header {
- margin-bottom: 1.5rem;
+ margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
@@ -1231,7 +1297,7 @@
.module-title {
color: #333333;
- font-size: 1.125rem;
+ font-size: 16px;
font-weight: 600;
position: relative;
}
@@ -1246,18 +1312,18 @@
.module-content {
width: 100%;
display: grid;
- gap: 1rem;
+ gap: 10px;
}
.icon-container {
- width: 3.25rem;
- height: 3.25rem;
- border-radius: 0.75rem;
+ width: 46px;
+ height: 46px;
+ border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.375rem;
- box-shadow: 0 0.1875rem 0.75rem rgba(0, 0, 0, 0.12);
+ box-shadow: 0 10px 20px rgba(17, 24, 39, 0.12);
transition: all 0.2s ease;
position: relative;
overflow: hidden;
@@ -1315,14 +1381,22 @@
}
.item-label {
- font-size: 0.8125rem;
+ font-size: 12px;
color: #555555;
text-align: center;
display: block;
line-height: 1.4;
font-weight: 500;
- margin-top: 0.25rem;
- margin-bottom: 0.625rem;
+ margin-top: 4px;
+ margin-bottom: 6px;
+ }
+
+ /* grid-item 闂磋窛鏇寸揣鍑戜笖瑙嗚鏇村眳涓� */
+ :deep(.up-grid-item) {
+ padding: 6px 0;
+ }
+ :deep(.up-grid-item__content) {
+ padding: 0;
}
.grid-text {
@@ -1440,30 +1514,34 @@
}
.common-module {
- margin-bottom: 1.5rem;
- background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
- border-radius: 1rem;
- padding: 1rem;
- box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.06);
- border: none;
+ margin-bottom: 12px;
+ background: #ffffff;
+ border-radius: 16px;
+ padding: 12px;
+ box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
+ border: 1px solid rgba(148, 163, 184, 0.18);
position: relative;
overflow: hidden;
- transition: all 0.3s ease;
+ transition: all 0.22s ease;
&::after {
content: "";
position: absolute;
- top: 0;
- right: 0;
- width: 3.75rem;
- height: 3.75rem;
+ top: -40px;
+ right: -40px;
+ width: 90px;
+ height: 90px;
background: radial-gradient(
circle,
- rgba(0, 0, 0, 0.02) 0%,
+ rgba(148, 163, 184, 0.08) 0%,
transparent 70%
);
border-radius: 50%;
- transform: translate(1.875rem, -1.875rem);
+ }
+
+ &:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}
}
@@ -1488,7 +1566,7 @@
}
.module-header {
- margin-bottom: 1.5rem;
+ margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
@@ -1500,54 +1578,70 @@
}
.module-title {
- color: #333333;
- font-size: 1.125rem;
+ color: #1f2933;
+ font-size: 16px;
font-weight: 600;
position: relative;
- }
-
- .module-subtitle {
- color: #666666;
- font-size: 0.75rem;
- font-weight: 400;
- margin-left: 0.5rem;
}
.module-content {
width: 100%;
display: grid;
- gap: 1rem;
+ gap: 10px;
}
.icon-container {
- width: 3.25rem;
- height: 3.25rem;
- border-radius: 0.75rem;
+ width: 52px;
+ height: 52px;
+ border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
- margin-bottom: 0.375rem;
- box-shadow: 0 0.1875rem 0.75rem rgba(0, 0, 0, 0.12);
- transition: all 0.2s ease;
+ margin-bottom: 4px;
+ box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
+ transition: all 0.18s ease;
position: relative;
overflow: hidden;
animation: fadeInScale 0.5s ease both;
+ background: linear-gradient(135deg, #3b82f6, #2563eb);
+ }
- &:hover {
- transform: translateY(-0.1875rem) scale(1.02);
- box-shadow: 0 0.5rem 1.5625rem rgba(0, 0, 0, 0.18);
- }
+ .marketing-module .icon-container {
+ background: linear-gradient(135deg, #3b82f6, #2563eb);
+ }
+ .purchase-module .icon-container {
+ background: linear-gradient(135deg, #1d4ed8, #0f766e);
+ }
+ .collaboration-module .icon-container {
+ background: linear-gradient(135deg, #22c55e, #16a34a);
+ }
+ .equipment-module .icon-container {
+ background: linear-gradient(135deg, #a855f7, #7c3aed);
+ }
- &:active {
- transform: scale(0.97);
- box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.18);
- }
+ .icon-container::before {
+ content: "";
+ position: absolute;
+ inset: 0;
+ border-radius: inherit;
+ background: radial-gradient(
+ circle at 20% 20%,
+ rgba(255, 255, 255, 0.26),
+ transparent 55%
+ );
+ opacity: 0.8;
+ pointer-events: none;
+ }
+
+ .icon-container:active {
+ transform: scale(0.94);
+ box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}
.item-label {
- font-size: 0.8125rem;
- margin-top: 0.25rem;
- margin-bottom: 0.625rem;
+ font-size: 12px;
+ margin-top: 4px;
+ margin-bottom: 6px;
}
.grid-text {
font-size: 0.875rem;
--
Gitblit v1.9.3