From 087c18f328014ba60833938d2ebc25e55f6aa118 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 10 二月 2026 11:01:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_new' into dev_new
---
src/pages/index.vue | 971 ++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 612 insertions(+), 359 deletions(-)
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 5f0b494..4d2391d 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>
@@ -38,7 +38,7 @@
<!-- </view>-->
<!-- </view>-->
<!-- 钀ラ攢绠$悊妯″潡 -->
- <view class="common-module marketing-module">
+ <view class="common-module marketing-module" v-if="hasMarketingItems">
<view class="module-header">
<view class="module-title-container">
<text class="module-title">钀ラ攢绠$悊</text>
@@ -61,8 +61,8 @@
</up-grid>
</view>
</view>
- <!-- 閲囪喘绠$悊妯″潡 -->
- <view class="common-module purchase-module">
+ <!-- <!– 閲囪喘绠$悊妯″潡 –>-->
+ <view class="common-module purchase-module" v-if="hasPurchaseItems">
<view class="module-header">
<view class="module-title-container">
<text class="module-title">閲囪喘绠$悊</text>
@@ -85,8 +85,8 @@
</up-grid>
</view>
</view>
- <!-- 鍗忓悓鍔炲叕妯″潡 -->
- <view class="common-module collaboration-module">
+ <!-- <!– 鍗忓悓鍔炲叕妯″潡 –> -->
+ <view class="common-module collaboration-module" v-if="hasCollaborationItems">
<view class="module-header">
<view class="module-title-container">
<text class="module-title">鍗忓悓鍔炲叕</text>
@@ -109,17 +109,41 @@
</up-grid>
</view>
</view>
- <!-- 鍏ュ簱绠$悊 -->
- <view class="common-module collaboration-module">
+ <!-- 瀹夊叏鐢熶骇妯″潡 -->
+ <view class="common-module collaboration-module" v-if="hasSafetyItems">
<view class="module-header">
<view class="module-title-container">
- <text class="module-title">浠撳偍鐗╂祦</text>
+ <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 inventoryManagement"
+ <up-grid-item v-for="(item, index) in safetyItems"
+ :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" v-if="hasHumanResourcesItems">
+ <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"
@@ -134,7 +158,7 @@
</view>
</view>
<!-- 鐢熶骇绠℃帶妯″潡 -->
- <view class="common-module production-module">
+ <view class="common-module equipment-module" v-if="hasProductionItems">
<view class="module-header">
<view class="module-title-container">
<text class="module-title">鐢熶骇绠℃帶</text>
@@ -158,7 +182,7 @@
</view>
</view>
<!-- 璁惧绠$悊妯″潡 -->
- <view class="common-module equipment-module">
+ <view class="common-module equipment-module" v-if="hasEquipmentItems">
<view class="module-header">
<view class="module-title-container">
<text class="module-title">璁惧绠$悊</text>
@@ -185,15 +209,13 @@
</template>
<script setup>
- import { ref, onMounted, nextTick, reactive } from "vue";
- import dayjs from "dayjs";
- import { userLoginFacotryList, noticesList } from "@/api/login";
+ import { ref, onMounted, nextTick, reactive, computed } from "vue";
+ import { userLoginFacotryList } from "@/api/login";
+ import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting";
import modal from "@/plugins/modal";
import useUserStore from "@/store/modules/user";
- import { onShow } from "@dcloudio/uni-app";
const userStore = useUserStore();
- const factoryId = ref("");
const show = ref(false);
const factoryList = ref([]);
const factoryListTem = ref([]);
@@ -271,96 +293,120 @@
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",
+ label: "瑙勭▼璧勮川",
+ },
+ {
+ icon: "/static/images/icon/caigoutaizhang@2x.png",
+ 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: "瀹夊叏鍩硅",
+ },
+ ]);
// 鍗忓悓鍔炲叕鍔熻兘鏁版嵁
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/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/xietongshenpi@2x.png",
+ icon: "/static/images/icon/baoxiaoguanli.png",
label: "鍗忓悓瀹℃壒",
+ },
+ {
+ icon: "/static/images/icon/huiyiliebiao@2x.png",
+ label: "浼氳绠$悊",
+ },
+ {
+ icon: "/static/images/icon/tongzhigonggao@2x.png",
+ label: "閫氱煡鍏憡",
+ },
+ {
+ icon: "/static/images/icon/zhishiku@2x.png",
+ label: "鐭ヨ瘑搴�",
+ },
+ {
+ icon: "/static/images/icon/yongyinguanli@2x.png",
+ label: "鐢ㄥ嵃绠$悊",
+ },
+ {
+ icon: "/static/images/icon/guizhangzhidu@2x.png",
+ label: "瑙勭珷鍒跺害",
},
{
icon: "/static/images/icon/kehubaifang@2x.png",
label: "瀹㈡埛鎷滆",
},
- {
- icon: "/static/images/icon/qingjiaguanli@2x.png",
- label: "閫氱煡鍏憡",
- },
- ]);
- // 鍗忓悓鍔炲叕鍔熻兘鏁版嵁inventoryManagement/receiptManagement
- const inventoryManagement = reactive([
- {
- icon: "/static/images/icon/rukuguanli@2x.png",
- label: "鑷畾涔夊叆搴�",
- },
- {
- icon: "/static/images/icon/zidingyichuku.png",
- label: "鑷畾涔夊嚭搴�",
- },
]);
// 鐢熶骇绠℃帶鍔熻兘鏁版嵁
const productionItems = reactive([
- {
- icon: "/static/images/icon/shengchandingdan@2x.png",
- label: "鐢熶骇璁㈠崟",
- bgColor: "#FF9800",
- },
- {
- icon: "/static/images/icon/shengchanpaigong@2x.png",
- label: "鐢熶骇娲惧伐",
- bgColor: "#FF6B35",
- },
- {
- icon: "/static/images/icon/shengchanpaichan@2x.png",
- label: "宸ュ簭鎺掍骇",
- bgColor: "#E91E63",
- },
+ // {
+ // icon: "/static/images/icon/shengchandingdan@2x.png",
+ // label: "鐢熶骇璁㈠崟",
+ // bgColor: "#FF9800",
+ // },
+ // {
+ // icon: "/static/images/icon/shengchanpaigong@2x.png",
+ // label: "鐢熶骇娲惧伐",
+ // bgColor: "#FF6B35",
+ // },
+ // {
+ // icon: "/static/images/icon/shengchanpaichan@2x.png",
+ // label: "宸ュ簭鎺掍骇",
+ // bgColor: "#E91E63",
+ // },
{
icon: "/static/images/icon/shengchanbaogong@2x.png",
label: "鐢熶骇鎶ュ伐",
bgColor: "#673AB7",
},
- {
- icon: "/static/images/icon/shengchanhesuan@2x.png",
- label: "鐢熶骇鏍哥畻",
- bgColor: "#3F51B5",
- },
+ // {
+ // icon: "/static/images/icon/shengchanhesuan@2x.png",
+ // label: "鐢熶骇鏍哥畻",
+ // bgColor: "#3F51B5",
+ // },
]);
// 璁惧绠$悊鍔熻兘鏁版嵁
const equipmentItems = reactive([
+ // {
+ // icon: '/static/images/icon/shebeitaizhang@2x.png',
+ // label: '璁惧鍙拌处',
+ // },
{
- icon: "/static/images/icon/shebeitaizhang@2x.png",
- label: "璁惧鍙拌处",
+ icon: "/static/images/icon/shbeibaoxiu@2x.png",
+ label: "杩愯绠$悊",
},
{
icon: "/static/images/icon/shbeibaoxiu@2x.png",
@@ -375,25 +421,25 @@
label: "宸℃涓婁紶",
},
// {
- // icon: '/static/images/icon/guzhangfenxi@2x.png',
- // label: '鍒嗘瀽杩芥函',
- // bgColor: '#ff9800'
+ // icon: "/static/images/icon/guzhangfenxi@2x.png",
+ // label: "鍒嗘瀽杩芥函",
+ // bgColor: "#ff9800",
// },
// {
- // icon: '/static/images/icon/zhinengpaidan@2x.png',
- // label: '鏅鸿兘娲惧崟',
- // bgColor: '#ff6b35'
+ // icon: "/static/images/icon/zhinengpaidan@2x.png",
+ // label: "鏅鸿兘娲惧崟",
+ // bgColor: "#ff6b35",
// },
// {
- // icon: '/static/images/icon/zuoyezhidao@2x.png',
- // label: '浣滀笟鎸囧',
- // bgColor: '#4caf50'
+ // icon: "/static/images/icon/zuoyezhidao@2x.png",
+ // label: "浣滀笟鎸囧",
+ // bgColor: "#4caf50",
// },
// {
- // icon: '/static/images/icon/jieguoyanzheng@2x.png',
- // label: '缁撴灉楠岃瘉',
- // bgColor: '#9c27b0'
- // }
+ // icon: "/static/images/icon/jieguoyanzheng@2x.png",
+ // label: "缁撴灉楠岃瘉",
+ // bgColor: "#9c27b0",
+ // },
]);
// 澶勭悊甯哥敤鍔熻兘鐐瑰嚮
@@ -480,6 +526,41 @@
url: "/pages/cooperativeOffice/collaborativeApproval/index4",
});
break;
+ case "鍗忓悓瀹℃壒":
+ uni.navigateTo({
+ url: "/pages/indexItem?label=鍗忓悓瀹℃壒",
+ });
+ break;
+ case "浼氳绠$悊":
+ uni.navigateTo({
+ url: "/pages/indexItem?label=浼氳绠$悊",
+ });
+ break;
+ case "閫氱煡鍏憡":
+ uni.navigateTo({
+ url: "/pages/cooperativeOffice/noticeManagement/index",
+ });
+ break;
+ case "鐭ヨ瘑搴�":
+ uni.navigateTo({
+ url: "/pages/managementMeetings/knowledgeBase/index",
+ });
+ break;
+ case "鐢ㄥ嵃绠$悊":
+ uni.navigateTo({
+ url: "/pages/managementMeetings/sealManagement/index",
+ });
+ break;
+ case "瑙勭珷鍒跺害":
+ uni.navigateTo({
+ url: "/pages/managementMeetings/rulesRegulationsManagement/index",
+ });
+ break;
+ case "瀹㈡埛鎷滆":
+ uni.navigateTo({
+ url: "/pages/cooperativeOffice/clientVisit/index",
+ });
+ break;
case "閲囪喘绠$悊":
uni.navigateTo({
url: "/pages/cooperativeOffice/collaborativeApproval/index5",
@@ -490,34 +571,44 @@
url: "/pages/cooperativeOffice/collaborativeApproval/index6",
});
break;
- case "鍑哄簱绠$悊":
+ case "鍙戣揣瀹℃壒":
uni.navigateTo({
url: "/pages/cooperativeOffice/collaborativeApproval/index7",
});
break;
- case "鍗忓悓瀹℃壒":
+ case "浼氳璁剧疆":
uni.navigateTo({
- url: "/pages/cooperativeOffice/collaborativeApproval/index",
+ url: "/pages/managementMeetings/meetingSettings/index",
});
break;
- case "瀹㈡埛鎷滆":
+ case "浼氳鍒楄〃":
uni.navigateTo({
- url: "/pages/cooperativeOffice/clientVisit/index",
+ url: "/pages/managementMeetings/meetingList/index",
});
break;
- case "閫氱煡鍏憡":
+ case "浼氳鐢宠":
uni.navigateTo({
- url: "/pages/cooperativeOffice/noticeManagement/index",
+ url: "/pages/managementMeetings/meetApplication/index",
});
break;
- case "鑷畾涔夊叆搴�":
+ case "浼氳瀹℃壒":
uni.navigateTo({
- url: "/pages/inventoryManagement/receiptManagement/index",
+ url: "/pages/managementMeetings/meetExamine/index",
});
break;
- case "鑷畾涔夊嚭搴�":
+ case "浼氳鍙戝竷":
uni.navigateTo({
- url: "/pages/inventoryManagement/issueManagement/index",
+ url: "/pages/managementMeetings/meetPublish/index",
+ });
+ break;
+ case "浼氳鎬荤粨":
+ uni.navigateTo({
+ url: "/pages/managementMeetings/meetSummary/index",
+ });
+ break;
+ case "浼氳鐪嬫澘":
+ uni.navigateTo({
+ url: "/pages/managementMeetings/meetingBoard/index",
});
break;
case "鐢熶骇璁㈠崟":
@@ -532,23 +623,25 @@
break;
case "宸ュ簭鎺掍骇":
uni.navigateTo({
- url: "/pages/productionManagement/operationScheduling/index",
+ url: "/pages/productionManagement/processScheduling/index",
});
break;
case "鐢熶骇鎶ュ伐":
getcode();
- // uni.navigateTo({
- // url: '/pages/productionManagement/productionReporting/index'
- // });
break;
case "鐢熶骇鏍哥畻":
uni.navigateTo({
- url: "/pages/productionManagement/productionCosting/index",
+ url: "/pages/productionManagement/productionAccounting/index",
});
break;
case "璁惧鍙拌处":
uni.navigateTo({
url: "/pages/equipmentManagement/ledger/index",
+ });
+ break;
+ case "杩愯绠$悊":
+ uni.navigateTo({
+ url: "/pages/equipmentManagement/runManagement/index",
});
break;
case "璁惧鎶ヤ慨":
@@ -586,6 +679,56 @@
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;
+ 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/humanResources/attendance/checkin",
+ });
+ break;
+ case "浜哄憳钖祫":
+ uni.navigateTo({
+ url: "/pages/humanResources/monthlyStatistics/index",
+ });
+ break;
default:
uni.showToast({
title: `鐐瑰嚮浜�${item.label}`,
@@ -593,53 +736,12 @@
});
}
};
- const getcode = () => {
- uni.scanCode({
- success: res => {
- // 瑙f瀽浜岀淮鐮佸唴瀹�
- const scanResult = res.result;
- let orderRow = "";
- // 灏濊瘯浠庢壂鐮佺粨鏋滀腑鎻愬彇orderRow鍙傛暟
- try {
- // 澶勭悊娣峰悎鏍煎紡: http://...?orderRow={...}
- const orderRowStart = scanResult.indexOf("orderRow={");
- // 鎻愬彇浠巓rderRow={寮�濮嬬殑JSON鍐呭
- const jsonPart = scanResult.substring(orderRowStart + 9); // 9鏄�"orderRow=".length
- // 灏濊瘯鐩存帴浣跨敤杩欎釜JSON閮ㄥ垎
- orderRow = jsonPart;
- } catch (e) {
- orderRow = "";
- }
- try {
- JSON.parse(orderRow);
- } catch (error) {
- modal.msgError("璁㈠崟瑙f瀽澶辫触");
- return;
- }
- // 鎵爜鎴愬姛鍚庤烦杞埌鐢熶骇鎶ュ伐椤甸潰锛屽苟浼犻�抩rderRow鍙傛暟
- uni.navigateTo({
- url: `/pages/productionManagement/productionReporting/index?orderRow=${orderRow}`,
- });
- },
- fail: err => {
- uni.showToast({
- title: "鎵爜澶辫触",
- icon: "none",
- });
- // uni.navigateTo({
- // url: `/pages/productionManagement/productionReporting/index`,
- // });
- },
- });
- };
// 鍒涘缓瀵瑰瓙缁勪欢鐨勫紩鐢�
const uToastRef = ref(null);
function getUserLoginFacotryList() {
- userLoginFacotryList({
- userName: userStore.nickName,
- })
+ userLoginFacotryList({ userName: userStore.nickName })
.then(res => {
// 妫�鏌es.data鏄惁涓烘暟缁�
factoryList.value[0] = [];
@@ -648,7 +750,6 @@
res.data.forEach(item => {
factoryList.value[0].push(item.deptName);
});
- factoryId.value = userStore.currentDeptId;
} else {
// 濡傛灉res.data涓嶆槸鏁扮粍锛岃缃负绌烘暟缁�
factoryList.value = [];
@@ -659,13 +760,98 @@
factoryList.value = [];
});
}
+ const getcode = () => {
+ uni.scanCode({
+ success: async res => {
+ // 瑙f瀽浜岀淮鐮佸唴瀹�
+ const scanResult = res.result;
+ let orderRow = "";
+
+ // 鍒ゆ柇鎵弿缁撴灉鏄惁涓虹函鏁板瓧锛坕d锛�
+ const isNumericId = /^\d+$/.test(scanResult.trim());
+
+ if (isNumericId) {
+ // 濡傛灉鏄函鏁板瓧锛屾牴鎹� id 鑾峰彇宸ュ崟鏁版嵁
+ const workOrderId = scanResult.trim();
+ modal.loading("姝e湪鑾峰彇宸ュ崟淇℃伅...");
+ try {
+ const workRes = await getProductWorkOrderById({ id: workOrderId });
+ modal.closeLoading();
+
+ console.log("宸ュ崟鏌ヨ缁撴灉:", workRes);
+
+ if (workRes.code === 200 && workRes.data) {
+ // 鏂版帴鍙h繑鍥炵殑鏄崟涓璞★紝涓嶆槸鏁扮粍
+ const workData = workRes.data;
+ console.log("宸ュ崟鏁版嵁:", workData);
+
+ orderRow = JSON.stringify({
+ id: workData.id || workOrderId,
+ planQuantity: workData.planQuantity - workData.completeQuantity,
+ productProcessRouteItemId:
+ workData.productProcessRouteItemId ||
+ workData.浜у搧宸ヨ壓璺嚎椤笽D ||
+ "",
+ });
+
+ console.log("鏋勯�犵殑orderRow:", orderRow);
+ } else {
+ modal.msgError("鏈壘鍒板搴旂殑宸ュ崟淇℃伅");
+ return;
+ }
+ } catch (error) {
+ modal.closeLoading();
+ console.error("鑾峰彇宸ュ崟淇℃伅澶辫触:", error);
+ modal.msgError("鑾峰彇宸ュ崟淇℃伅澶辫触: " + (error.message || "鏈煡閿欒"));
+ return;
+ }
+ } else {
+ // 濡傛灉涓嶆槸绾暟瀛楋紝灏濊瘯浠庢壂鐮佺粨鏋滀腑鎻愬彇orderRow鍙傛暟
+ try {
+ // 澶勭悊娣峰悎鏍煎紡: http://...?orderRow={...}
+ const orderRowStart = scanResult.indexOf("orderRow={");
+ if (orderRowStart !== -1) {
+ // 鎻愬彇浠巓rderRow={寮�濮嬬殑JSON鍐呭
+ const jsonPart = scanResult.substring(orderRowStart + 9); // 9鏄�"orderRow=".length
+ orderRow = jsonPart;
+ } else {
+ // 濡傛灉鐩存帴鏄疛SON瀛楃涓诧紝灏濊瘯瑙f瀽
+ orderRow = scanResult;
+ }
+ } catch (e) {
+ console.error(e, "瑙f瀽澶辫触====????=====");
+ orderRow = "";
+ }
+
+ // 楠岃瘉鏄惁涓烘湁鏁堢殑JSON
+ try {
+ JSON.parse(orderRow);
+ } catch (error) {
+ modal.msgError("璁㈠崟瑙f瀽澶辫触锛岃妫�鏌ヤ簩缁寸爜鏍煎紡");
+ return;
+ }
+ }
+
+ console.log(orderRow, "orderRow======@@@@@@@@");
+ // 鎵爜鎴愬姛鍚庤烦杞埌鐢熶骇鎶ュ伐椤甸潰锛屽苟浼犻�抩rderRow鍙傛暟
+ uni.navigateTo({
+ url: `/pages/productionManagement/productionReport/index?orderRow=${orderRow}`,
+ });
+ },
+ fail: err => {
+ uni.showToast({
+ title: "鎵爜澶辫触",
+ icon: "none",
+ });
+ },
+ });
+ };
const changeFactory = async arr => {
show.value = false;
const factoryId = factoryListTem.value[arr.indexs[0]].deptId;
const loginForm = {
username: userStore.name,
password: uni.getStorageSync("remembered_password"),
- factoryId: factoryId,
};
modal.loading("鍒锋柊涓紝璇疯�愬績绛夊緟...");
userStore
@@ -680,8 +866,15 @@
modal.closeLoading();
});
};
-
function loginSuccess(result) {
+ // 鑾峰彇璺敱鏉冮檺
+ userStore.getRouters().then(() => {
+ console.log("璺敱鏉冮檺鑾峰彇鎴愬姛");
+ // 杩囨护鑿滃崟椤�
+ filterMenuItemsByRoutes();
+ }).catch(error => {
+ console.error("鑾峰彇璺敱鏉冮檺澶辫触:", error);
+ });
uni.reLaunch({
url: "/pages/index",
});
@@ -693,101 +886,181 @@
uToastRef.value.success(`鐐瑰嚮浜嗙${name + 1}涓猔); // 娉ㄦ剰锛氳繖閲屽姞1鏄洜涓洪�氬父鎴戜滑鏄粠绗�1涓紑濮嬭鏁扮殑
}
};
- const isShowNoticesList = ref(true);
- // 鑾峰彇鍏憡鏁伴噺
- const getNoticesList = () => {
- if (!isShowNoticesList.value) {
+
+ // 鏍规嵁璺敱鏉冮檺杩囨护鑿滃崟椤�
+ const filterMenuItemsByRoutes = () => {
+ const routers = userStore.routers || [];
+
+ // 濡傛灉娌℃湁璺敱鏉冮檺鏁版嵁锛屼笉杩涜杩囨护锛堟樉绀烘墍鏈夎彍鍗曪級
+ if (!routers || routers.length === 0) {
+ console.log("鏆傛棤璺敱鏉冮檺鏁版嵁锛屾樉绀烘墍鏈夎彍鍗�");
return;
}
- const current_date = dayjs().format("YYYY-MM-DD");
- noticesList({
- current: -1,
- size: -1,
- status: 1,
- current_date,
- })
- .then(resp => {
- console.log("noticesList", resp);
- if (
- resp.code != 200 ||
- !resp.data ||
- !resp.data.records ||
- !resp.data.records.length
- ) {
- return;
+
+ // 鏀堕泦鎵�鏈夋湁鏉冮檺鐨勮彍鍗曟爣棰橈紙鏍规嵁 meta.title锛�
+ const allowedMenuTitles = new Set();
+ const collectMenuTitles = (routes) => {
+ if (!Array.isArray(routes)) return;
+ routes.forEach(route => {
+ // 鏀堕泦褰撳墠璺敱鐨勬爣棰�
+ if (route.meta && route.meta.title) {
+ allowedMenuTitles.add(route.meta.title);
}
- const res = uni.getAppAuthorizeSetting();
- if (res.notificationAuthorized == "denied") {
- uni.showModal({
- title: "鎻愮ず",
- content: "璇峰湪璁剧疆涓紑鍚�氱煡鏉冮檺",
- success: res => {
- if (res.confirm) {
- uni.openAppAuthorizeSetting({
- success: res => {},
- });
- } else {
- isShowNoticesList.value = false;
- }
- },
- });
- return;
+ // 閫掑綊澶勭悊瀛愯矾鐢�
+ if (route.children && route.children.length > 0) {
+ collectMenuTitles(route.children);
}
- resp.data.records.map(item => {
- createPushMessage(item.title);
- });
- })
- .catch(error => {
- // modal.msgError("鑾峰彇鍏憡鏁伴噺:", error);
});
+ };
+ collectMenuTitles(routers);
+
+ console.log("鍏佽鐨勮彍鍗曟爣棰�:", Array.from(allowedMenuTitles));
+ console.log("杩囨护鍓� - 钀ラ攢绠$悊:", marketingItems.length, "閲囪喘绠$悊:", purchaseItems.length, "鍗忓悓鍔炲叕:", collaborationItems.length);
+ console.log("杩囨护鍓� - 瀹夊叏鐢熶骇:", safetyItems.length, "浜哄姏璧勬簮:", humanResourcesItems.length, "鐢熶骇绠℃帶:", productionItems.length, "璁惧绠$悊:", equipmentItems.length);
+
+ // 杩囨护钀ラ攢绠$悊鑿滃崟
+ const originalMarketing = [
+ { icon: "/static/images/icon/xiaoshoutaizhang@2x.png", label: "閿�鍞彴璐�" },
+ { icon: "/static/images/icon/kaipiaodengji@2x.png", label: "寮�绁ㄧ櫥璁�" },
+ { icon: "/static/images/icon/kaipiaotaizhang@2x.png", label: "寮�绁ㄥ彴璐�" },
+ { icon: "/static/images/icon/huikuandengji@2x.png", label: "鍥炴鐧昏" },
+ { icon: "/static/images/icon/huikuanliushui@2x.png", label: "鍥炴娴佹按" },
+ { icon: "/static/images/icon/kehuwanglai@2x.png", label: "瀹㈡埛寰�鏉�" },
+ ];
+ const filteredMarketing = originalMarketing.filter(item => {
+ return allowedMenuTitles.has(item.label);
+ });
+ marketingItems.splice(0, marketingItems.length, ...filteredMarketing);
+
+ // 杩囨护鍗忓悓鍔炲叕鑿滃崟
+ const originalCollaboration = [
+ { icon: "/static/images/icon/baoxiaoguanli.png", label: "鍗忓悓瀹℃壒" },
+ { icon: "/static/images/icon/huiyiliebiao@2x.png", label: "浼氳绠$悊" },
+ { icon: "/static/images/icon/tongzhigonggao@2x.png", label: "閫氱煡鍏憡" },
+ { icon: "/static/images/icon/zhishiku@2x.png", label: "鐭ヨ瘑搴�" },
+ { icon: "/static/images/icon/yongyinguanli@2x.png", label: "鐢ㄥ嵃绠$悊" },
+ { icon: "/static/images/icon/guizhangzhidu@2x.png", label: "瑙勭珷鍒跺害" },
+ { icon: "/static/images/icon/kehubaifang@2x.png", label: "瀹㈡埛鎷滆" },
+ ];
+ const filteredCollaboration = originalCollaboration.filter(item => {
+ // 澶勭悊鏍囬涓嶅畬鍏ㄥ尮閰嶇殑鎯呭喌
+ let matched = allowedMenuTitles.has(item.label);
+ // 鐗规畩澶勭悊锛氳绔犲埗搴� -> 瑙勭珷鍒跺害绠$悊
+ if (!matched && item.label === "瑙勭珷鍒跺害") {
+ matched = allowedMenuTitles.has("瑙勭珷鍒跺害绠$悊");
+ }
+ return matched;
+ });
+ collaborationItems.splice(0, collaborationItems.length, ...filteredCollaboration);
+
+ // 杩囨护閲囪喘绠$悊鑿滃崟
+ const originalPurchase = [
+ { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "閲囪喘鍙拌处" },
+ { icon: "/static/images/icon/laipiaodengji@2x.png", label: "鏉ョエ鐧昏" },
+ { icon: "/static/images/icon/laipiaotaizhang@2x.png", label: "鏉ョエ鍙拌处" },
+ { icon: "/static/images/icon/fukuanjingji@2x.png", label: "浠樻鐧昏" },
+ { icon: "/static/images/icon/fukuanliushui@2x.png", label: "浠樻娴佹按" },
+ { icon: "/static/images/icon/gongyingshangwanglai@2x.png", label: "渚涘簲鍟嗗線鏉�" },
+ ];
+ const filteredPurchase = originalPurchase.filter(item => {
+ return allowedMenuTitles.has(item.label);
+ });
+ purchaseItems.splice(0, purchaseItems.length, ...filteredPurchase);
+
+ // 杩囨护瀹夊叏鐢熶骇鑿滃崟
+ const originalSafety = [
+ { 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/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: "瀹夊叏鍩硅" },
+ ];
+ const filteredSafety = originalSafety.filter(item => {
+ return allowedMenuTitles.has(item.label);
+ });
+ safetyItems.splice(0, safetyItems.length, ...filteredSafety);
+
+ // 杩囨护浜哄姏璧勬簮鑿滃崟
+ const originalHumanResources = [
+ { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "鎵撳崱绛惧埌" },
+ { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "浜哄憳钖祫" },
+ ];
+ const filteredHumanResources = originalHumanResources.filter(item => {
+ return allowedMenuTitles.has(item.label);
+ });
+ humanResourcesItems.splice(0, humanResourcesItems.length, ...filteredHumanResources);
+
+ // 杩囨护鐢熶骇绠℃帶鑿滃崟
+ const originalProduction = [
+ { icon: "/static/images/icon/shengchanbaogong@2x.png", label: "鐢熶骇鎶ュ伐", bgColor: "#673AB7" },
+ ];
+ const filteredProduction = originalProduction.filter(item => {
+ return allowedMenuTitles.has(item.label);
+ });
+ productionItems.splice(0, productionItems.length, ...filteredProduction);
+
+ // 杩囨护璁惧绠$悊鑿滃崟
+ const originalEquipment = [
+ { 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: "宸℃涓婁紶" },
+ ];
+ const filteredEquipment = originalEquipment.filter(item => {
+ return allowedMenuTitles.has(item.label);
+ });
+ equipmentItems.splice(0, equipmentItems.length, ...filteredEquipment);
+
+ console.log("杩囨护鍚� - 钀ラ攢绠$悊:", marketingItems.length, "閲囪喘绠$悊:", purchaseItems.length, "鍗忓悓鍔炲叕:", collaborationItems.length);
+ console.log("杩囨护鍚� - 瀹夊叏鐢熶骇:", safetyItems.length, "浜哄姏璧勬簮:", humanResourcesItems.length, "鐢熶骇绠℃帶:", productionItems.length, "璁惧绠$悊:", equipmentItems.length);
+ console.log("鐢熶骇绠℃帶鑿滃崟椤�:", productionItems.map(item => item.label));
};
- const createPushMessage = text => {
- uni.createPushMessage({
- title: "鍏憡閫氱煡",
- content: text || "",
- success: resp => {
- console.log("success", resp);
- isShowNoticesList.value = false;
- },
- fail: resp => {
- console.log("fail", resp);
- },
- });
- };
+ // 妫�鏌ユā鍧楁槸鍚︽湁鑿滃崟椤归渶瑕佹樉绀�
+ const hasMarketingItems = computed(() => marketingItems.length > 0);
+ const hasPurchaseItems = computed(() => purchaseItems.length > 0);
+ const hasCollaborationItems = computed(() => collaborationItems.length > 0);
+ const hasSafetyItems = computed(() => safetyItems.length > 0);
+ const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0);
+ const hasProductionItems = computed(() => productionItems.length > 0);
+ const hasEquipmentItems = computed(() => equipmentItems.length > 0);
onMounted(() => {
- // 璁剧疆鐢ㄦ埛淇℃伅
- userStore.getInfo();
+ // 姣忔杩涘叆棣栭〉閮藉己鍒跺埛鏂扮敤鎴蜂俊鎭拰璺敱鏉冮檺锛屼笉鍋氭湰鍦扮紦瀛樺垽鏂�
+ userStore.getInfo().then(() => {
+ userStore.getRouters().then(() => {
+ filterMenuItemsByRoutes();
+ }).catch(error => {
+ console.error("鑾峰彇璺敱鏉冮檺澶辫触:", error);
+ });
+ });
getUserLoginFacotryList();
// 鍚姩閫氱煡鐘舵�佸畾鏃跺櫒
startStatusTimer();
});
- onShow(() => {
- getNoticesList();
- });
</script>
+
<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 {
@@ -797,7 +1070,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;
}
@@ -812,12 +1085,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;
@@ -849,19 +1122,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: "";
@@ -901,37 +1174,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 {
@@ -1002,7 +1249,6 @@
0% {
transform: translateX(-100%) translateY(-100%) rotate(45deg);
}
-
100% {
transform: translateX(100%) translateY(100%) rotate(45deg);
}
@@ -1013,7 +1259,6 @@
opacity: 0;
transform: translateY(-1.25rem);
}
-
to {
opacity: 1;
transform: translateY(0);
@@ -1025,7 +1270,6 @@
opacity: 0;
transform: translateY(1.25rem);
}
-
to {
opacity: 1;
transform: translateY(0);
@@ -1037,7 +1281,6 @@
opacity: 0;
transform: translateY(0.5rem) scale(0.96);
}
-
100% {
opacity: 1;
transform: translateY(0) scale(1);
@@ -1097,18 +1340,19 @@
}
.notice-unit {
- color: #666666;
- font-size: 0.875rem;
- margin-left: 0.125rem;
+ font-weight: 600;
+ font-size: 1rem;
+ color: #1976d2;
+ margin-left: 0.25rem;
}
/* 鍔熻兘妯″潡鏍峰紡 */
.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;
@@ -1152,7 +1396,7 @@
}
.module-header {
- margin-bottom: 1.5rem;
+ margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
@@ -1165,7 +1409,7 @@
.module-title {
color: #333333;
- font-size: 1.125rem;
+ font-size: 16px;
font-weight: 600;
position: relative;
}
@@ -1180,18 +1424,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;
@@ -1249,14 +1493,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 {
@@ -1273,20 +1525,16 @@
.content {
background: linear-gradient(135deg, #121317 0%, #161a20 100%);
}
-
.content::before {
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(255, 255, 255, 0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}
-
.common-module {
background: linear-gradient(135deg, #1e1f24 0%, #23252b 100%);
box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35);
}
-
.module-title {
color: #e9edf3;
}
-
.module-subtitle,
.item-label,
.notice-text,
@@ -1294,18 +1542,15 @@
.notice-label {
color: #c7cbd3;
}
-
.notice {
background: linear-gradient(135deg, #1b2330 0%, #1a2432 100%);
border-color: rgba(255, 255, 255, 0.06);
box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4);
}
-
.notice-status,
.notice-number {
color: #8ab4ff;
}
-
.bg-img {
background: linear-gradient(135deg, #1f4fb9 0%, #0e3a8a 100%);
}
@@ -1315,7 +1560,6 @@
from {
transform: rotate(0deg);
}
-
to {
transform: rotate(360deg);
}
@@ -1326,7 +1570,6 @@
opacity: 0;
transform: translateY(-1.25rem);
}
-
to {
opacity: 1;
transform: translateY(0);
@@ -1338,7 +1581,6 @@
opacity: 0;
transform: translateY(1.25rem);
}
-
to {
opacity: 1;
transform: translateY(0);
@@ -1350,7 +1592,6 @@
opacity: 0;
transform: translateY(0.5rem) scale(0.96);
}
-
100% {
opacity: 1;
transform: translateY(0) scale(1);
@@ -1360,61 +1601,59 @@
.notice-left {
margin-right: 1rem;
}
-
.notice-status {
font-size: 1rem;
}
-
.notice-separator {
width: 0.0625rem;
height: 1.5rem;
margin-right: 1rem;
}
-
.notice-label {
font-size: 0.875rem;
margin-right: 0.75rem;
}
-
.notice-text {
font-size: 0.875rem;
}
-
.notice-number {
font-size: 1rem;
margin-left: 0.25rem;
}
-
.notice-unit {
font-size: 0.875rem;
margin-left: 0.125rem;
}
.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);
}
}
@@ -1439,7 +1678,7 @@
}
.module-header {
- margin-bottom: 1.5rem;
+ margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
@@ -1451,56 +1690,71 @@
}
.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;
}
@@ -1509,7 +1763,6 @@
.common-module {
box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35);
}
-
.notice {
box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4);
}
--
Gitblit v1.9.3