From da57fbd8e7fa021614fb32502fb1520ea4e34e1e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 18 五月 2026 11:35:16 +0800
Subject: [PATCH] 浪潮 1.样式修改
---
src/views/index.vue | 1090 +++++----------------------------------------------------
1 files changed, 98 insertions(+), 992 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index 5a72ff9..3faec6d 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -2,7 +2,7 @@
<div class="dashboard">
<!-- 椤堕儴妯悜涓ゆ爮 -->
<div class="dashboard-top">
- <!-- 宸︼細浼佷笟淇℃伅+涓夊ぇ鏁版嵁鍗$墖锛堜笂涓嬫帓鍒楋級 -->
+ <!-- 宸︼細浼佷笟淇℃伅+搴撳瓨鏁版嵁鍗$墖锛堜笂涓嬫帓鍒楋級 -->
<div class="top-left">
<div class="company-info">
<!-- 椤堕儴闂�欐潯 -->
@@ -31,35 +31,9 @@
</div>
</div>
</div>
- <!--
- <div class="data-cards">
- <div class="data-card sales">
- <div class="data-title">閿�鍞暟鎹�</div>
- <div class="data-num">
- <div>
- <div class="data-desc">鏈湀閿�鍞/鍏�</div>
- <div class="data-value">{{ businessInfo.monthSaleMoney }}</div>
- </div>
- <div>
- <div class="data-desc">鏈紑绁ㄩ噾棰�/鍏�</div>
- <div class="data-value">{{ businessInfo.monthSaleHaveMoney }}</div>
- </div>
- </div>
- </div>
- <div class="data-card purchase">
- <div class="data-title">閲囪喘鏁版嵁</div>
- <div class="data-num">
- <div>
- <div class="data-desc">鏈湀閲囪喘棰�/鍏�</div>
- <div class="data-value">{{ businessInfo.monthPurchaseMoney }}</div>
- </div>
- <div>
- <div class="data-desc">寰呬粯娆鹃噾棰�/鍏�</div>
- <div class="data-value">{{ businessInfo.monthPurchaseHaveMoney }}</div>
- </div>
- </div>
- </div>
+ <!-- 鍙筹細搴撳瓨鏁版嵁鍗$墖 -->
+ <div class="data-cards">
<div class="data-card inventory">
<div class="data-title">搴撳瓨鏁版嵁</div>
<div class="data-num">
@@ -74,373 +48,20 @@
</div>
</div>
</div>
- -->
- <!-- 鍙筹細寰呭姙浜嬮」 -->
- <!--
- <div class="todo-panel">
- <div class="section-title">寰呭姙浜嬮」</div>
- <ul class="todo-list" v-if="todoList.length > 0">
- <li v-for="item in todoList" :key="item.id">
- <div style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;gap: 20px">
- <div style="display: flex;justify-content: space-between;align-items: center;">
- <div class="todo-title">寰呭姙缂栧彿锛歿{ item.approveId }}</div>
- <div class="todo-division">閮ㄩ棬锛歿{ item.approveDeptName }}</div>
- <div class="todo-time">{{ item.approveTime }}</div>
- </div>
- <div class="todo-division">寰呭姙浜嬬敱锛歿{ item.approveReason }}</div>
- </div>
- </li>
- </ul>
- <div v-else style="text-align: center">
- 鏆傛棤鏁版嵁
- </div>
- </div>
- -->
</div>
- <!--
- <div class="dashboard-row">
- <div class="main-panel process-panel">
- <div class="process-panel__header">
- <div class="section-title">宸ュ簭鏁版嵁鐢熶骇缁熻鏄庣粏</div>
- <div style="display: flex; gap: 10px; align-items: center;">
- <el-button type="primary" size="small" plain icon="Filter" @click="openProcessDialog">閫夋嫨宸ュ簭</el-button>
- <el-button type="info" size="small" plain icon="Refresh" @click="resetProcessFilter">閲嶇疆</el-button>
- <el-radio-group v-model="processRange" size="small" @change="refreshProcessStats">
- <el-radio-button :value="1">鏃�</el-radio-button>
- <el-radio-button :value="2">鍛�</el-radio-button>
- <el-radio-button :value="3">鏈�</el-radio-button>
- </el-radio-group>
- </div>
- </div>
-
- <div class="process-panel__body">
- <div class="process-panel__chart">
- <Echarts :chartStyle="{ width: '100%', height: '100%' }" :grid="processGrid" :series="processSeries"
- :tooltip="processTooltip" :xAxis="processXAxis" :yAxis="processYAxis" style="height: 100%"
- @click="handleChartClick" />
- </div>
-
- <div class="process-panel__aside">
- <div class="process-legend">
- <div class="process-legend__item">
- <span class="dot dot-blue"></span><span>鎶曞叆閲�</span>
- </div>
- <div class="process-legend__item">
- <span class="dot dot-yellow"></span><span>鎶ュ簾閲�</span>
- </div>
- <div class="process-legend__item">
- <span class="dot dot-teal"></span><span>浜у嚭閲�</span>
- </div>
- </div>
-
- <div class="process-card process-card--name">{{ processAside.processName }}</div>
-
- <div class="process-card">
- <div class="process-card__label">绱鎬绘姇鍏�</div>
- <div class="process-card__value">{{ formatAmount(processAside.totalInput) }}
- </div>
- </div>
- <div class="process-card">
- <div class="process-card__label">绱鎬绘姤搴�</div>
- <div class="process-card__value">{{ formatAmount(processAside.totalScrap) }}
- </div>
- </div>
- <div class="process-card">
- <div class="process-card__label">绱鎬讳骇鍑�</div>
- <div class="process-card__value">{{ formatAmount(processAside.totalOutput) }}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <el-dialog v-model="processDialogVisible" title="閫夋嫨宸ュ簭" width="500px" append-to-body>
- <div class="process-selection-wrapper">
- <el-checkbox-group v-model="tempProcessIds">
- <div class="process-grid">
- <el-checkbox v-for="item in processOptions" :key="item.id" :label="item.id" border>
- {{ item.name }}
- </el-checkbox>
- </div>
- </el-checkbox-group>
- </div>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="processDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="handleProcessDialogConfirm">纭</el-button>
- </span>
- </template>
- </el-dialog>
- -->
- <!-- 涓儴锛氬鎴峰悎鍚岄噾棰濆垎鏋� -->
- <div class="dashboard-row">
- <div class="main-panel contract-panel">
- <div class="section-title">瀹㈡埛鍚堝悓閲戦鍒嗘瀽</div>
- <div class="contract-summary">
- <div class="contract-info">
- <img src="../assets/images/khtitle.png" alt="" style="width: 42px" />
- <div class="contract-card">
- <div class="contract-name">鎬诲悎鍚岄噾棰�(鍏�)</div>
- <div class="contract-meta">
- <div class="main-amount">{{ sum }}</div>
- <div>鍛ㄥ悓姣�: <span class="up">{{ yny }}% </span> 鏃ョ幆姣�: <span class="up">{{ chain }}% </span></div>
- </div>
- </div>
- </div>
- </div>
- <div class="contract-chart-wrapper">
- <div class="chart-container">
- <Echarts ref="chart" :legend="pieLegend" :chartStyle="{ width: '100%', height: '280px' }" :series="materialPieSeries"
- :tooltip="pieTooltip"></Echarts>
- </div>
- <ul class="contract-list">
- <li v-for="item in materialPieSeries[0].data" :key="item.name">
- <div class="contract-item">
- <span class="contract-dot" :style="{ background: item.itemStyle?.color || '#999' }"></span>
- <span class="contract-name">{{ item.name }}</span>
- <span class="contract-rate">{{ item.rate }}%</span>
- <span class="contract-value">锟{ item.value }}</span>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
-
- <!-- 搴曢儴妯悜涓ゆ爮 -->
- <!--
- <div class="dashboard-row">
- <div class="main-panel">
- <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
- <div class="section-title" style="margin-bottom: 0;">璐ㄩ噺缁熻</div>
- <el-radio-group v-model="qualityRange" size="small" @change="qualityStatisticsInfo">
- <el-radio-button :value="1">鍛�</el-radio-button>
- <el-radio-button :value="2">鏈�</el-radio-button>
- <el-radio-button :value="3">瀛e害</el-radio-button>
- </el-radio-group>
- </div>
- <div class="quality-cards">
- <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{ qualityStatisticsObject.supplierNum }}浠�</span></div>
- <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{ qualityStatisticsObject.processNum }}浠�</span></div>
- <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{ qualityStatisticsObject.factoryNum }}浠�</span></div>
- </div>
- <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="barSeries1"
- :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1" style="height: 260px"></Echarts>
- </div>
-
- <div class="main-panel">
- <div class="section-title">鍥炴涓庡紑绁ㄥ垎鏋�</div>
- <Echarts ref="invoiceChart" :chartStyle="chartStyle" :grid="grid" :legend="lineLegend" :series="lineSeries"
- :tooltip="tooltipLine" :xAxis="xAxis2" :yAxis="yAxis2" style="height: 270px;" />
- </div>
- </div>
- -->
</div>
</template>
<script setup>
-import { ref, onMounted, computed, reactive } from 'vue'
-import Echarts from "@/components/Echarts/echarts.vue";
-import * as echarts from 'echarts';
+import { ref, onMounted } from 'vue'
import useUserStore from "@/store/modules/user.js";
-import {
- analysisCustomerContractAmounts, getAmountHalfYear,
- getBusiness,
- homeTodos,
- processDataProductionStatistics,
- statisticsReceivablePayable,
- qualityInspectionStatistics
-} from "@/api/viewIndex.js";
-import { list } from '@/api/productionManagement/productionProcess';
-
+import { getBusiness } from "@/api/viewIndex.js";
const userStore = useUserStore()
-const processOptions = ref([])
-const selectedProcessIds = ref([])
-const tempProcessIds = ref([])
-const processDialogVisible = ref(false)
-const activeProcessIndex = ref(0)
-
const businessInfo = ref({
inventoryNum: 0,
- monthPurchaseHaveMoney: 0,
- monthPurchaseMoney: 0,
- monthSaleHaveMoney: 0,
- monthSaleMoney: 0,
todayInventoryNum: 0,
-})
-const qualityStatisticsObject = ref({
- supplierNum: 0,
- processNum: 0,
- factoryNum: 0,
-})
-const sum = ref(0)
-const yny = ref(0)
-const chain = ref(0)
-
-const pieLegend = reactive({
- show: false,
-})
-const barSeries = ref([
- {
- type: 'bar',
- data: [],
- label: {
- show: true,
- }
- },
-])
-
-const barSeries1 = ref([
- {
- name: '鍘熸潗鏂欎笉鍚堟牸鏁�',
- type: 'bar',
- barGap: 0,
- emphasis: {
- focus: 'series'
- },
- data: []
- },
- {
- name: '杩囩▼涓嶅悎鏍兼暟',
- type: 'bar',
- emphasis: {
- focus: 'series'
- },
- data: []
- },
- {
- name: '鍑哄巶涓嶅悎鏍兼暟',
- type: 'bar',
- emphasis: {
- focus: 'series'
- },
- data: []
- },
-])
-const chartStyle = {
- width: '100%',
- height: '100%'
-}
-const chartStylePie = {
- width: '140%',
- height: '140%'
-}
-const grid = {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
-}
-const barLegend = {
- show: true,
- data: ['鍘熸潗鏂欎笉鍚堟牸鏁�', '杩囩▼涓嶅悎鏍兼暟', '鍑哄巶涓嶅悎鏍兼暟']
-}
-const barLegend1 = {
- show: true,
- data: ['棰勪粯璐︽', '搴斾粯璐︽', '棰勬敹璐︽', '搴旀敹璐︽']
-}
-const lineLegend = {
- show: true,
- data: ['寮�绁�', '鍥炴']
-}
-const tooltip = {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
-}
-const xAxis = [{
- type: 'value',
-}]
-const xAxis1 = ref([{
- type: 'category',
- axisTick: { show: false },
- data: []
-}])
-const yAxis = [{
- type: 'category',
- data: ['搴斾粯璐︽', '搴旀敹璐︽',]
-}]
-const yAxis1 = [{
- type: 'value'
-}]
-const pieTooltip = reactive({
- trigger: 'item',
- formatter: function (params) {
- const description = params.name === '鏈湀鍥炴閲戦' ? '鏈湀鍥炴閲戦' : '搴旀敹娆鹃噾棰�';
- return `${description} ${formatNumber(params.value)}鍏� ${params.percent}%`;
- },
- position: 'right'
-})
-const materialPieSeries = ref([
- {
- type: 'pie',
- radius: ['66%', '90%'],
- avoidLabelOverlap: false,
- itemStyle: {
- borderColor: '#fff',
- borderWidth: 2
- },
- label: {
- show: false
- },
- data: []
- }
-])
-const lineSeries = ref([
- {
- type: 'line',
- data: [],
- label: {
- show: true
- },
- showSymbol: true,
- },
-])
-const tooltipLine = {
- trigger: 'axis',
-}
-const yAxis2 = ref([
- {
- type: 'value',
- }
-])
-const xAxis2 = ref([
- {
- type: 'category',
- data: [],
- axisLabel: {
- interval: 0,
- formatter: function (value) {
- return value.replace(/~/g, '\n');
- },
- }
- }
-])
-
-const todoList = ref([])
-const radio1 = ref(1)
-const qualityRange = ref(1)
-
-const barChart = ref(null)
-const lineChart = ref(null)
-const barColors2 = ['#5181DB', '#D369E0', '#F2CA6D', '#60CCA8']
-
-const getRandomColor = () => {
- return '#' + Math.floor(Math.random() * 0xffffff).toString(16).padStart(6, '0');
-}
-
-onMounted(() => {
- getBusinessData()
- analysisCustomer()
- todoInfoS()
- statisticsReceivable()
- qualityStatisticsInfo()
- getAmountHalfYearNum()
- getProcessList()
})
const getBusinessData = () => {
@@ -449,676 +70,161 @@
})
}
-const analysisCustomer = () => {
- analysisCustomerContractAmounts().then((res) => {
- sum.value = res.data.sum
- yny.value = res.data.yny
- chain.value = res.data.chain
- materialPieSeries.value[0].data = res.data.item.map(item => ({
- ...item,
- itemStyle: { color: getRandomColor() }
- }))
- })
-}
-
-const todoInfoS = () => {
- homeTodos().then((res) => {
- todoList.value = res.data
- })
-}
-
-const getProcessList = () => {
- list().then(res => {
- processOptions.value = res.data.records
- })
-}
-
-const openProcessDialog = () => {
- tempProcessIds.value = [...selectedProcessIds.value]
- processDialogVisible.value = true
-}
-
-const handleProcessDialogConfirm = () => {
- selectedProcessIds.value = [...tempProcessIds.value]
- processDialogVisible.value = false
- refreshProcessStats()
-}
-
-const resetProcessFilter = () => {
- selectedProcessIds.value = []
- tempProcessIds.value = []
- refreshProcessStats()
-}
-
-const handleChartClick = (params) => {
- if (params && params.dataIndex !== undefined) {
- activeProcessIndex.value = params.dataIndex
- }
-}
-
-const statisticsReceivable = () => {
- statisticsReceivablePayable({ type: radio1.value }).then((res) => {
- barSeries.value[0].data = [
- { value: res.data.payableMoney, itemStyle: { color: barColors2[0] } },
- { value: res.data.receivableMoney, itemStyle: { color: barColors2[1] } }
- ]
- })
-}
-
-const qualityStatisticsInfo = () => {
- qualityInspectionStatistics({ type: qualityRange.value }).then((res) => {
- xAxis1.value[0].data = []
- barSeries1.value[0].data = []
- barSeries1.value[1].data = []
- barSeries1.value[2].data = []
- res.data.item.forEach(item => {
- xAxis1.value[0].data.push(item.date)
- barSeries1.value[0].data.push(item.supplierNum)
- barSeries1.value[1].data.push(item.processNum)
- barSeries1.value[2].data.push(item.factoryNum)
- })
- qualityStatisticsObject.value.supplierNum = res.data.supplierNum
- qualityStatisticsObject.value.processNum = res.data.processNum
- qualityStatisticsObject.value.factoryNum = res.data.factoryNum
- })
-}
-
-const getAmountHalfYearNum = async () => {
- const res = await getAmountHalfYear()
- const monthName = []
- const receiptAmount = []
- const invoiceAmount = []
- res.data.forEach(item => {
- monthName.push(item.month)
- receiptAmount.push(item.receiptAmount)
- invoiceAmount.push(item.invoiceAmount)
- })
- xAxis2.value[0].data = monthName
- xAxis2.value[0].data = monthName.map(item => item.replace(/~/g, '\n~'));
- lineSeries.value = [
- {
- name: '寮�绁�',
- type: 'line',
- data: invoiceAmount,
- stack: 'Total',
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgba(131, 207, 255, 1)'
- },
- {
- offset: 1,
- color: 'rgba(186, 228, 255, 1)'
- }
- ])
- },
- itemStyle: {
- color: '#2D99FF',
- borderColor: '#2D99FF'
- },
- emphasis: {
- focus: 'series'
- },
- lineStyle: {
- width: 0
- },
- showSymbol: true,
- },
- {
- name: '鍥炴',
- type: 'line',
- data: receiptAmount,
- stack: 'Total',
- lineStyle: {
- width: 0
- },
- itemStyle: {
- color: '#83CFFF',
- borderColor: '#83CFFF'
- },
- showSymbol: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgba(54, 153, 255, 1)'
- },
- {
- offset: 1,
- color: 'rgba(89, 169, 254, 1)'
- }
- ])
- },
- emphasis: {
- focus: 'series'
- },
- }
- ]
-}
-
-const processRange = ref(1)
-const processChartData = ref([])
-
-const processXAxis = ref([
- {
- nameTextStyle: { color: 'rgba(0,0,0,0.35)', fontSize: 12 },
- axisLabel: { color: 'rgba(0,0,0,0.35)' },
- splitLine: { lineStyle: { color: 'rgba(0,0,0,0.06)', type: 'dashed' } },
- },
-])
-
-const processYAxis = ref([
- {
- type: 'category',
- axisLabel: { color: 'rgba(0,0,0,0.35)', fontSize: 12 },
- axisLine: { show: false },
- axisTick: { show: false },
- data: [],
- },
-])
-
-const processTooltip = ref({
- trigger: 'axis',
- axisPointer: { type: 'shadow' },
+onMounted(() => {
+ getBusinessData()
})
-
-const processSeries = ref([
- {
- name: '鎶曞叆閲�',
- type: 'bar',
- stack: 'total',
- barWidth: 16,
- itemStyle: { color: '#2D99FF', borderRadius: [0, 4, 4, 0] },
- data: [],
- },
- {
- name: '鎶ュ簾閲�',
- type: 'bar',
- stack: 'total',
- barWidth: 16,
- itemStyle: { color: '#F2CA6D', borderRadius: [0, 4, 4, 0] },
- data: [],
- },
- {
- name: '浜у嚭閲�',
- type: 'bar',
- stack: 'total',
- barWidth: 16,
- itemStyle: { color: '#5EE9C0', borderRadius: [0, 4, 4, 0] },
- data: [],
- },
-])
-
-const processGrid = ref({
- left: '3%',
- right: '4%',
- bottom: '3%',
- top: '3%',
- containLabel: true,
-})
-
-const processAside = computed(() => {
- const idx = activeProcessIndex.value
- const item = processChartData.value[idx] || {}
- return {
- processName: item.processName || '-',
- totalInput: item.inputNum || 0,
- totalScrap: item.scrapNum || 0,
- totalOutput: item.outputNum || 0,
- }
-})
-
-const refreshProcessStats = async () => {
- const params = { type: processRange.value }
- if (selectedProcessIds.value.length > 0) {
- params.processIds = selectedProcessIds.value.join(',')
- }
- const res = await processDataProductionStatistics(params)
- const list = res.data || []
- processChartData.value = list
- processYAxis.value[0].data = list.map(i => i.processName)
- processSeries.value[0].data = list.map(i => i.inputNum)
- processSeries.value[1].data = list.map(i => i.scrapNum)
- processSeries.value[2].data = list.map(i => i.outputNum)
- activeProcessIndex.value = 0
-}
-
-const formatAmount = (num) => {
- if (!num && num !== 0) return '-'
- return Number(num).toLocaleString()
-}
-
-const formatNumber = (num) => {
- if (!num) return '0'
- return num.toLocaleString()
-}
</script>
<style lang="scss" scoped>
.dashboard {
padding: 20px;
background: #f5f7fa;
+ min-height: calc(100vh - 84px);
}
.dashboard-top {
display: grid;
- grid-template-columns: 2fr 1fr;
+ grid-template-columns: 380px 1fr;
gap: 20px;
margin-bottom: 20px;
}
+// 宸︿晶鐢ㄦ埛淇℃伅
.top-left {
- display: flex;
- flex-direction: column;
- gap: 20px;
-}
-
-.company-info {
- background: #fff;
- border-radius: 12px;
- padding: 20px;
-}
-
-.welcome-banner {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- padding-bottom: 16px;
- border-bottom: 1px solid #ebeef5;
-}
-
-.welcome-title {
- font-size: 18px;
- color: #303133;
-
- .welcome-user {
- font-weight: 600;
- color: var(--el-color-primary);
+ .company-info {
+ background: #fff;
+ border-radius: 12px;
+ overflow: hidden;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
}
-.welcome-time {
- font-size: 13px;
- color: #909399;
+.welcome-banner {
+ background: linear-gradient(135deg, var(--el-color-primary) 0%, var(--el-color-primary-light-3) 100%);
+ padding: 20px;
+ color: #fff;
+
+ .welcome-title {
+ font-size: 16px;
+ margin-bottom: 8px;
+
+ .welcome-user {
+ font-size: 20px;
+ font-weight: 600;
+ }
+ }
+
+ .welcome-time {
+ font-size: 13px;
+ opacity: 0.9;
+ }
}
.user-card {
display: flex;
align-items: center;
gap: 16px;
-}
+ padding: 20px;
-.avatar {
- width: 64px;
- height: 64px;
- border-radius: 50%;
- object-fit: cover;
- border: 3px solid var(--el-color-primary-light-8);
-}
-
-.user-card-main {
- .user-name {
- font-size: 18px;
- font-weight: 600;
- color: #303133;
- margin-bottom: 4px;
+ .avatar {
+ width: 64px;
+ height: 64px;
+ border-radius: 50%;
+ object-fit: cover;
+ border: 3px solid var(--el-color-primary-light-8);
}
- .user-role {
- font-size: 13px;
- color: var(--el-color-primary);
- background: var(--el-color-primary-light-9);
- padding: 2px 10px;
- border-radius: 4px;
- display: inline-block;
- margin-bottom: 8px;
- }
+ .user-card-main {
+ flex: 1;
- .user-meta {
- font-size: 13px;
- color: #606266;
+ .user-name {
+ font-size: 18px;
+ font-weight: 600;
+ color: #303133;
+ margin-bottom: 4px;
+ }
- .sep {
- margin: 0 8px;
- color: #dcdfe6;
+ .user-role {
+ font-size: 13px;
+ color: var(--el-color-primary);
+ background: var(--el-color-primary-light-9);
+ display: inline-block;
+ padding: 2px 10px;
+ border-radius: 12px;
+ margin-bottom: 8px;
+ }
+
+ .user-meta {
+ font-size: 13px;
+ color: #909399;
+
+ .sep {
+ margin: 0 8px;
+ color: #dcdfe6;
+ }
}
}
}
+// 鍙充晶搴撳瓨鏁版嵁鍗$墖
.data-cards {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 16px;
+ display: flex;
+ align-items: stretch;
}
.data-card {
background: #fff;
border-radius: 12px;
- padding: 16px;
+ padding: 24px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
+ flex: 1;
.data-title {
- font-size: 14px;
+ font-size: 16px;
+ font-weight: 600;
color: #606266;
- margin-bottom: 12px;
+ margin-bottom: 20px;
+ padding-bottom: 12px;
+ border-bottom: 1px solid #ebeef5;
}
.data-num {
display: flex;
- flex-direction: column;
- gap: 8px;
- }
+ gap: 40px;
- .data-desc {
- font-size: 12px;
- color: #909399;
- }
-
- .data-value {
- font-size: 20px;
- font-weight: 600;
- color: #303133;
- }
-}
-
-.todo-panel {
- background: #fff;
- border-radius: 12px;
- padding: 20px;
-}
-
-.section-title {
- font-size: 16px;
- font-weight: 600;
- color: #303133;
- margin-bottom: 16px;
- position: relative;
- padding-left: 12px;
-
- &::before {
- content: '';
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 4px;
- height: 16px;
- background: var(--el-color-primary);
- border-radius: 2px;
- }
-}
-
-.todo-list {
- list-style: none;
- padding: 0;
- margin: 0;
-
- li {
- padding: 12px 0;
- border-bottom: 1px solid #ebeef5;
-
- &:last-child {
- border-bottom: none;
+ > div {
+ flex: 1;
}
- }
-}
-.dashboard-row {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 20px;
- margin-bottom: 20px;
-}
-
-.main-panel {
- background: #fff;
- border-radius: 12px;
- padding: 20px;
-}
-
-.contract-panel {
- grid-column: 1 / -1;
-}
-
-.contract-summary {
- margin-bottom: 20px;
-}
-
-.contract-info {
- display: flex;
- align-items: center;
- gap: 16px;
-}
-
-.contract-card {
- .contract-name {
- font-size: 14px;
- color: #909399;
- margin-bottom: 8px;
- }
-
- .contract-meta {
- .main-amount {
- font-size: 28px;
- font-weight: 700;
- color: #303133;
+ .data-desc {
+ font-size: 13px;
+ color: #909399;
margin-bottom: 8px;
}
- .up {
- color: #67c23a;
- }
- }
-}
-
-.contract-chart-wrapper {
- display: flex;
- align-items: center;
- gap: 40px;
- justify-content: center;
- margin-top: 20px;
-}
-
-.chart-container {
- width: 320px;
- height: 280px;
-}
-
-.contract-list {
- list-style: none;
- padding: 0;
- margin: 0;
- min-width: 300px;
-
- li {
- margin-bottom: 12px;
-
- &:last-child {
- margin-bottom: 0;
- }
- }
-
- .contract-item {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 10px 16px;
- background: #f5f7fa;
- border-radius: 8px;
-
- .contract-dot {
- width: 10px;
- height: 10px;
- border-radius: 50%;
- flex-shrink: 0;
- }
-
- .contract-name {
- flex: 1;
- font-size: 14px;
+ .data-value {
+ font-size: 28px;
+ font-weight: 700;
color: #303133;
}
+ }
- .contract-rate {
- font-size: 13px;
- color: #909399;
- min-width: 50px;
- text-align: right;
- }
-
- .contract-value {
- font-size: 14px;
- font-weight: 600;
- color: #303133;
- min-width: 100px;
- text-align: right;
- }
+ &.inventory {
+ border-left: 4px solid var(--el-color-primary);
}
}
-.process-panel {
- grid-column: 1 / -1;
-}
-
-.process-panel__header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
-}
-
-.process-panel__body {
- display: grid;
- grid-template-columns: 1fr 280px;
- gap: 20px;
- height: 300px;
-}
-
-.process-panel__chart {
- height: 100%;
-}
-
-.process-panel__aside {
- display: flex;
- flex-direction: column;
- gap: 12px;
-}
-
-.process-legend {
- display: flex;
- gap: 16px;
- margin-bottom: 8px;
-}
-
-.process-legend__item {
- display: flex;
- align-items: center;
- gap: 6px;
- font-size: 13px;
- color: #606266;
-
- .dot {
- width: 8px;
- height: 8px;
- border-radius: 50%;
-
- &.dot-blue {
- background: #2D99FF;
- }
-
- &.dot-yellow {
- background: #F2CA6D;
- }
-
- &.dot-teal {
- background: #5EE9C0;
- }
+// 鍝嶅簲寮�
+@media (max-width: 1200px) {
+ .dashboard-top {
+ grid-template-columns: 1fr;
}
}
-.process-card {
- background: #f5f7fa;
- border-radius: 8px;
- padding: 12px 16px;
-
- &--name {
- font-weight: 600;
- color: #303133;
- background: var(--el-color-primary-light-9);
+@media (max-width: 768px) {
+ .data-card .data-num {
+ flex-direction: column;
+ gap: 20px;
}
-
- &__label {
- font-size: 12px;
- color: #909399;
- margin-bottom: 4px;
- }
-
- &__value {
- font-size: 18px;
- font-weight: 600;
- color: #303133;
- }
-}
-
-.quality-cards {
- display: flex;
- gap: 12px;
- margin-bottom: 16px;
-}
-
-.quality-card {
- flex: 1;
- background: #f5f7fa;
- border-radius: 8px;
- padding: 12px;
- font-size: 13px;
- color: #606266;
-
- span {
- display: block;
- font-size: 20px;
- font-weight: 600;
- color: #303133;
- margin-top: 4px;
- }
-
- &.one {
- background: #e6f7ff;
- color: #1890ff;
-
- span {
- color: #1890ff;
- }
- }
-
- &.two {
- background: #f6ffed;
- color: #52c41a;
-
- span {
- color: #52c41a;
- }
- }
-
- &.three {
- background: #fff7e6;
- color: #fa8c16;
-
- span {
- color: #fa8c16;
- }
- }
-}
-
-.process-selection-wrapper {
- max-height: 400px;
- overflow-y: auto;
-}
-
-.process-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 12px;
}
</style>
--
Gitblit v1.9.3