| | |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | }, |
| | | "@soda/friendly-errors-webpack-plugin": { |
| | | "version": "1.8.0", |
| | | "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz?cache=0&sync_timestamp=1607927406873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40soda%2Ffriendly-errors-webpack-plugin%2Fdownload%2F%40soda%2Ffriendly-errors-webpack-plugin-1.8.0.tgz", |
| | |
| | | "webpack-chain": "^6.4.0", |
| | | "webpack-dev-server": "^3.11.0", |
| | | "webpack-merge": "^4.2.2" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "@vue/cli-shared-utils": { |
| | |
| | | "lodash-unified": "^1.0.2", |
| | | "memoize-one": "^6.0.0", |
| | | "normalize-wheel-es": "^1.2.0" |
| | | }, |
| | | "dependencies": { |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://mirrors.huaweicloud.com/repository/npm/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | } |
| | | } |
| | | }, |
| | | "element-ui": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "vue-qrcode": { |
| | | "version": "2.2.2", |
| | | "resolved": "https://registry.npmmirror.com/vue-qrcode/-/vue-qrcode-2.2.2.tgz", |
| | |
| | | path: '/takeStockOrderDetail', |
| | | name: 'takeStockOrderDetail', |
| | | component: () => import('@/views/inbound/takeStockOrderDetail.vue') |
| | | }, { |
| | | path: '/dashboard', |
| | | name: 'dashboard', |
| | | component: () => import('@/views/charts/wms-dashboard.vue') |
| | | } |
| | | ] |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="wms-dashboard"> |
| | | <!-- 顶鍿 颿 --> |
| | | <div class="header"> |
| | | <h1>WMSä»å¨å¯è§åå¾è¡¨çæ¿</h1> |
| | | <div class="header-right"> |
| | | <span>2025-12-24 16:11:44</span> |
| | | <el-select v-model="month" placeholder="æ¬æ" style="margin-left: 10px; width: 80px;"> |
| | | <el-option label="æ¬æ" value="month"></el-option> |
| | | <el-option label="䏿" value="lastMonth"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px;" @click="refreshCharts">å·æ°</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ç»è®¡å¡çåºå --> |
| | | <el-row :gutter="20" class="stats-card-row"> |
| | | <el-col :span="6"> |
| | | <el-card class="stats-card"> |
| | | <div class="card-title">æ»åºåï¼ä»¶ï¼</div> |
| | | <div class="card-value">269,225</div> |
| | | <div class="card-change"><el-tag type="success">â 2.1% è¾æ¨æ¥</el-tag></div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-card class="stats-card"> |
| | | <div class="card-title">å¾
åºåºè®¢å</div> |
| | | <div class="card-value">425</div> |
| | | <div class="card-change"><el-tag type="warning">â 5.3% è¾1å°æ¶å</el-tag></div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-card class="stats-card"> |
| | | <div class="card-title">仿¥ä½ä¸å®æç</div> |
| | | <div class="card-value">93.9%</div> |
| | | <div class="card-change"><el-tag type="success">â 1.8% è¾æ¨æ¥</el-tag></div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-card class="stats-card"> |
| | | <div class="card-title">æªå¤çå¼å¸¸</div> |
| | | <div class="card-value">7</div> |
| | | <div class="card-change"><el-tag type="danger">â 1 è¾30åéå</el-tag></div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- å¾è¡¨åºåï¼ç¬¬ä¸è¡ï¼ --> |
| | | <el-row :gutter="20" class="chart-row"> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card"> |
| | | <div class="chart-title">åºååºä½åå¸ï¼å¾ååå æ¯ï¼<el-button type="text" class="view-btn">忢è§å¾</el-button></div> |
| | | <div ref="inventoryPieRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card"> |
| | | <div class="chart-title">è¿7æ¥åºå
¥åºè¶å¿ï¼å¾ååèµ°å¿ï¼ |
| | | <el-button-group class="btn-group"> |
| | | <el-button type="primary" size="small">å
¨é¨</el-button> |
| | | <el-button type="default" size="small">å
¥åº</el-button> |
| | | <el-button type="default" size="small">åºåº</el-button> |
| | | </el-button-group> |
| | | </div> |
| | | <div ref="stockTrendRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- å¾è¡¨åºåï¼ç¬¬äºè¡ï¼ --> |
| | | <el-row :gutter="20" class="chart-row"> |
| | | <el-col :span="8"> |
| | | <el-card class="chart-card"> |
| | | <div class="chart-title">åºä½å©ç¨ç</div> |
| | | <div ref="locationRateRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-card class="chart-card"> |
| | | <div class="chart-title">ä½ä¸ç±»ååå¸<el-button type="text" class="view-btn">æ¥ç详æ
</el-button></div> |
| | | <div ref="operationRadarRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-card class="chart-card"> |
| | | <div class="chart-title">å¼å¸¸ç±»åç»è®¡è¶å¿<el-button type="text" class="view-btn">çé</el-button></div> |
| | | <div ref="exceptionTrendRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- è¡¨æ ¼åºå --> |
| | | <el-row :gutter="20" class="table-row"> |
| | | <el-col :span="12"> |
| | | <el-card class="table-card"> |
| | | <div class="table-title">订åå¤çè¿åº¦<el-select v-model="orderType" placeholder="éè´§å
¥åº" |
| | | style="width: 100px; margin-left: 10px;"> |
| | | <el-option label="éè´§å
¥åº" value="return"></el-option> |
| | | <el-option label="æ®éåºåº" value="normal"></el-option> |
| | | </el-select></div> |
| | | <el-table :data="orderList" border style="width: 100%;"> |
| | | <el-table-column prop="orderNo" label="订åå·" /> |
| | | <el-table-column prop="type" label="ç±»å" /> |
| | | <el-table-column prop="priority" label="ä¼å
级"> |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.priority === 'ç´§æ¥' ? 'danger' : scope.row.priority === 'å æ¥' ? 'warning' : 'success'"> |
| | | {{ scope.row.priority }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="progress" label="è¿åº¦"> |
| | | <template #default="scope"> |
| | | <el-progress :percentage="scope.row.progress" :color="scope.row.progressColor" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table-pagination"> |
| | | <el-button type="text">å è½½æ´å¤è®¢å</el-button> |
| | | <el-pagination layout="prev, pager, next, jumper" :current-page="1" :total="50" /> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-card class="table-card"> |
| | | <div class="table-title">宿¶ä½ä¸çæ§ |
| | | <el-button-group class="btn-group"> |
| | | <el-button type="primary" size="small">å
¨é¨ä½ä¸</el-button> |
| | | <el-button type="default" size="small">å
¥åº</el-button> |
| | | <el-button type="default" size="small">åºåº</el-button> |
| | | <el-button type="default" size="small">çç¹</el-button> |
| | | </el-button-group> |
| | | </div> |
| | | <el-table :data="operationList" border style="width: 100%;"> |
| | | <el-table-column prop="opNo" label="ä½ä¸åå·" /> |
| | | <el-table-column prop="opType" label="ä½ä¸ç±»å" /> |
| | | <el-table-column prop="operator" label="æä½äººå" /> |
| | | <el-table-column prop="startTime" label="å¼å§æ¶é´" /> |
| | | <el-table-column prop="status" label="å½åç¶æ"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.status === 'å¤çä¸' ? 'info' : scope.row.status === '已宿' ? 'success' : 'danger'"> |
| | | {{ scope.row.status }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½"><el-button type="text">详æ
</el-button></el-table-column> |
| | | </el-table> |
| | | <div class="table-pagination"> |
| | | <el-pagination layout="prev, pager, next, jumper" :current-page="1" :total="50" /> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, onUnmounted, nextTick } from 'vue'; |
| | | import * as echarts from 'echarts'; |
| | | |
| | | // ååºå¼æ°æ® |
| | | const month = ref('month'); |
| | | const orderType = ref('return'); |
| | | |
| | | // æ¨¡ææ°æ® |
| | | const orderList = ref([ |
| | | { orderNo: 'OD20251224001', type: 'æ®éåºåº', priority: 'ç´§æ¥', progress: 60, progressColor: '#ff4d4f' }, |
| | | { orderNo: 'OD20251224002', type: 'éè´§å
¥åº', priority: 'æ®é', progress: 80, progressColor: '#1890ff' }, |
| | | { orderNo: 'OD20251224003', type: 'è°æ¨è®¢å', priority: 'å æ¥', progress: 40, progressColor: '#faad14' }, |
| | | { orderNo: 'OD20251224004', type: 'æ®éåºåº', priority: '常è§', progress: 100, progressColor: '#52c41a' } |
| | | ]); |
| | | const operationList = ref([ |
| | | { opNo: 'JW251224001', opType: 'å
¥åº', operator: 'å¼ ä¸', startTime: '15:30:22', status: 'å¤çä¸' }, |
| | | { opNo: 'CK251224002', opType: 'åºåº', operator: 'æå', startTime: '15:25:10', status: '已宿' }, |
| | | { opNo: 'PD251224003', opType: 'çç¹', operator: 'çäº', startTime: '15:20:05', status: 'å¾
确认' }, |
| | | { opNo: 'SC251224005', opType: '䏿¶', operator: 'åä¸', startTime: '15:10:18', status: 'å¼å¸¸' } |
| | | ]); |
| | | |
| | | // å¾è¡¨å®¹å¨ |
| | | const inventoryPieRef = ref(null); |
| | | const stockTrendRef = ref(null); |
| | | const locationRateRef = ref(null); |
| | | const operationRadarRef = ref(null); |
| | | const exceptionTrendRef = ref(null); |
| | | |
| | | // å¾è¡¨å®ä¾ |
| | | let inventoryPieChart = null; |
| | | let stockTrendChart = null; |
| | | let locationRateChart = null; |
| | | let operationRadarChart = null; |
| | | let exceptionTrendChart = null; |
| | | |
| | | // åå§ååºååºä½åå¸é¥¼å¾ |
| | | const initInventoryPie = () => { |
| | | if (!inventoryPieRef.value) return; |
| | | |
| | | if (inventoryPieChart) { |
| | | inventoryPieChart.dispose(); |
| | | } |
| | | |
| | | inventoryPieChart = echarts.init(inventoryPieRef.value); |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '{a} <br/>{b}: {c}%' |
| | | }, |
| | | legend: { |
| | | bottom: 0, |
| | | left: 'center', |
| | | data: ['常温åºAåº', 'å·èåºBåº', 'ä¿ç¨åºCåº', 'æ®æ¬¡ååºDåº'] |
| | | }, |
| | | series: [{ |
| | | name: 'åºååºä½åå¸', |
| | | type: 'pie', |
| | | radius: ['40%', '70%'], |
| | | center: ['50%', '40%'], |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 10, |
| | | borderColor: '#fff', |
| | | borderWidth: 2 |
| | | }, |
| | | label: { |
| | | show: false, |
| | | position: 'center' |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: 20, |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | data: [ |
| | | { value: 48.7, name: '常温åºAåº', itemStyle: { color: '#5470c6' } }, |
| | | { value: 29.2, name: 'å·èåºBåº', itemStyle: { color: '#91cc75' } }, |
| | | { value: 21.9, name: 'ä¿ç¨åºCåº', itemStyle: { color: '#fac858' } }, |
| | | { value: 2.2, name: 'æ®æ¬¡ååºDåº', itemStyle: { color: '#ee6666' } } |
| | | ] |
| | | }] |
| | | }; |
| | | |
| | | inventoryPieChart.setOption(option); |
| | | return inventoryPieChart; |
| | | }; |
| | | |
| | | // åå§åè¿7æ¥åºå
¥åºè¶å¿å¾ |
| | | const initStockTrend = () => { |
| | | if (!stockTrendRef.value) return; |
| | | |
| | | if (stockTrendChart) { |
| | | stockTrendChart.dispose(); |
| | | } |
| | | |
| | | stockTrendChart = echarts.init(stockTrendRef.value); |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'cross' |
| | | } |
| | | }, |
| | | legend: { |
| | | data: ['å
¥åºé', 'åºåºé'], |
| | | top: 10 |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | top: '15%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: true, |
| | | data: ['12-18', '12-19', '12-20', '12-21', '12-22', '12-23', '12-24'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | name: 'æ°éï¼åä»¶ï¼', |
| | | max: 25 |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'å
¥åºé', |
| | | type: 'bar', |
| | | barWidth: '30%', |
| | | data: [10, 12, 10, 12, 10, 12, 12], |
| | | itemStyle: { color: '#52c41a' } |
| | | }, |
| | | { |
| | | name: 'åºåºé', |
| | | type: 'bar', |
| | | barWidth: '30%', |
| | | data: [16, 18, 14, 18, 16, 18, 20], |
| | | itemStyle: { color: '#1890ff' } |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | stockTrendChart.setOption(option); |
| | | return stockTrendChart; |
| | | }; |
| | | |
| | | // åå§ååºä½å©ç¨çç¯å½¢å¾ |
| | | const initLocationRate = () => { |
| | | if (!locationRateRef.value) return; |
| | | |
| | | if (locationRateChart) { |
| | | locationRateChart.dispose(); |
| | | } |
| | | |
| | | locationRateChart = echarts.init(locationRateRef.value); |
| | | const option = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | series: [{ |
| | | name: 'åºä½å©ç¨ç', |
| | | type: 'gauge', |
| | | min: 0, |
| | | max: 100, |
| | | splitNumber: 10, |
| | | radius: '90%', |
| | | center: ['50%', '55%'], |
| | | startAngle: 180, |
| | | endAngle: 0, |
| | | progress: { |
| | | show: true, |
| | | width: 20, |
| | | itemStyle: { |
| | | color: '#1890ff' |
| | | } |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | width: 20, |
| | | color: [[1, 'rgba(200,200,200,0.3)']] |
| | | } |
| | | }, |
| | | axisTick: { |
| | | distance: -30, |
| | | splitNumber: 5, |
| | | lineStyle: { |
| | | width: 2, |
| | | color: '#999' |
| | | } |
| | | }, |
| | | splitLine: { |
| | | distance: -30, |
| | | length: 14, |
| | | lineStyle: { |
| | | width: 3, |
| | | color: '#999' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | distance: -20, |
| | | color: '#999', |
| | | fontSize: 12 |
| | | }, |
| | | anchor: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: true, |
| | | offsetCenter: [0, '30%'], |
| | | fontSize: 16, |
| | | fontWeight: 'bold' |
| | | }, |
| | | detail: { |
| | | valueAnimation: true, |
| | | formatter: '{value}%', |
| | | fontSize: 20, |
| | | fontWeight: 'bold', |
| | | offsetCenter: [0, '70%'] |
| | | }, |
| | | data: [{ |
| | | value: 86.2, |
| | | name: 'åºä½å©ç¨ç' |
| | | }] |
| | | }] |
| | | }; |
| | | |
| | | locationRateChart.setOption(option); |
| | | return locationRateChart; |
| | | }; |
| | | |
| | | // åå§åä½ä¸ç±»åé·è¾¾å¾ |
| | | const initOperationRadar = () => { |
| | | if (!operationRadarRef.value) return; |
| | | |
| | | if (operationRadarChart) { |
| | | operationRadarChart.dispose(); |
| | | } |
| | | |
| | | operationRadarChart = echarts.init(operationRadarRef.value); |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | show: false |
| | | }, |
| | | radar: { |
| | | indicator: [ |
| | | { name: 'åºåºä½ä¸', max: 100 }, |
| | | { name: 'å
¥åºä½ä¸', max: 100 }, |
| | | { name: 'è°æ¨ä½ä¸', max: 100 }, |
| | | { name: 'çç¹ä½ä¸', max: 100 } |
| | | ], |
| | | shape: 'circle', |
| | | splitNumber: 5, |
| | | axisName: { |
| | | color: '#666' |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'rgba(0,0,0,0.1)' |
| | | } |
| | | }, |
| | | splitArea: { |
| | | show: true, |
| | | areaStyle: { |
| | | color: ['rgba(255,255,255,0.8)', 'rgba(200,200,200,0.2)'] |
| | | } |
| | | } |
| | | }, |
| | | series: [{ |
| | | name: 'ä½ä¸ç±»ååå¸', |
| | | type: 'radar', |
| | | symbolSize: 8, |
| | | areaStyle: { |
| | | color: 'rgba(24,144,255,0.3)' |
| | | }, |
| | | lineStyle: { |
| | | width: 2 |
| | | }, |
| | | itemStyle: { |
| | | color: '#1890ff' |
| | | }, |
| | | data: [{ |
| | | value: [45, 30, 15, 10], |
| | | name: 'ä½ä¸å æ¯', |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | return params.value + '%'; |
| | | } |
| | | } |
| | | }] |
| | | }] |
| | | }; |
| | | |
| | | operationRadarChart.setOption(option); |
| | | return operationRadarChart; |
| | | }; |
| | | |
| | | // åå§åå¼å¸¸è¶å¿æçº¿å¾ |
| | | const initExceptionTrend = () => { |
| | | if (!exceptionTrendRef.value) return; |
| | | |
| | | if (exceptionTrendChart) { |
| | | exceptionTrendChart.dispose(); |
| | | } |
| | | |
| | | exceptionTrendChart = echarts.init(exceptionTrendRef.value); |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'cross' |
| | | } |
| | | }, |
| | | legend: { |
| | | data: ['åºåä¸è¶³', '订åè¶
æ¶', 'åºä½å¼å¸¸', 'çç¹å·®å¼'], |
| | | top: 10 |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | top: '15%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['12-18', '12-19', '12-20', '12-21', '12-22', '12-23', '12-24'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | name: 'å¼å¸¸æ°é' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'åºåä¸è¶³', |
| | | type: 'line', |
| | | smooth: true, |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | data: [10, 11, 9, 12, 10, 13, 12], |
| | | itemStyle: { color: '#ff4d4f' }, |
| | | lineStyle: { |
| | | width: 3 |
| | | } |
| | | }, |
| | | { |
| | | name: '订åè¶
æ¶', |
| | | type: 'line', |
| | | smooth: true, |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | data: [8, 9, 7, 8, 7, 9, 8], |
| | | itemStyle: { color: '#faad14' }, |
| | | lineStyle: { |
| | | width: 3 |
| | | } |
| | | }, |
| | | { |
| | | name: 'åºä½å¼å¸¸', |
| | | type: 'line', |
| | | smooth: true, |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | data: [4, 5, 2, 4, 3, 5, 4], |
| | | itemStyle: { color: '#722ed1' }, |
| | | lineStyle: { |
| | | width: 3 |
| | | } |
| | | }, |
| | | { |
| | | name: 'çç¹å·®å¼', |
| | | type: 'line', |
| | | smooth: true, |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | data: [2, 3, 1, 2, 1, 3, 2], |
| | | itemStyle: { color: '#13c2c2' }, |
| | | lineStyle: { |
| | | width: 3 |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | exceptionTrendChart.setOption(option); |
| | | return exceptionTrendChart; |
| | | }; |
| | | |
| | | // å·æ°ææå¾è¡¨ |
| | | const refreshCharts = () => { |
| | | const charts = [ |
| | | initInventoryPie, |
| | | initStockTrend, |
| | | initLocationRate, |
| | | initOperationRadar, |
| | | initExceptionTrend |
| | | ]; |
| | | |
| | | charts.forEach(initFunc => { |
| | | const chart = initFunc(); |
| | | if (chart) { |
| | | chart.resize(); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // çå¬çªå£å¤§å°åå |
| | | const handleResize = () => { |
| | | const charts = [ |
| | | inventoryPieChart, |
| | | stockTrendChart, |
| | | locationRateChart, |
| | | operationRadarChart, |
| | | exceptionTrendChart |
| | | ]; |
| | | |
| | | charts.forEach(chart => { |
| | | if (chart) { |
| | | chart.resize(); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // æè½½ååå§åå¾è¡¨ |
| | | onMounted(() => { |
| | | nextTick(() => { |
| | | initInventoryPie(); |
| | | initStockTrend(); |
| | | initLocationRate(); |
| | | initOperationRadar(); |
| | | initExceptionTrend(); |
| | | |
| | | window.addEventListener('resize', handleResize); |
| | | }); |
| | | }); |
| | | |
| | | // ç»ä»¶å¸è½½æ¶æ¸
ç |
| | | onUnmounted(() => { |
| | | const charts = [ |
| | | inventoryPieChart, |
| | | stockTrendChart, |
| | | locationRateChart, |
| | | operationRadarChart, |
| | | exceptionTrendChart |
| | | ]; |
| | | |
| | | charts.forEach(chart => { |
| | | if (chart) { |
| | | chart.dispose(); |
| | | } |
| | | }); |
| | | |
| | | window.removeEventListener('resize', handleResize); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .wms-dashboard { |
| | | padding: 20px; |
| | | background: #f5f7fa; |
| | | min-height: 100vh; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | background: white; |
| | | padding: 15px 20px; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .stats-card-row, |
| | | .chart-row, |
| | | .table-row { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .stats-card { |
| | | height: 120px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | padding: 0 20px; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .stats-card:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .card-title { |
| | | font-size: 14px; |
| | | color: #666; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .card-value { |
| | | font-size: 28px; |
| | | font-weight: bold; |
| | | margin: 8px 0 4px; |
| | | color: #333; |
| | | } |
| | | |
| | | .card-change { |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .chart-card { |
| | | height: 320px; |
| | | padding: 15px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .chart-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | min-height: 250px; |
| | | flex: 1; |
| | | } |
| | | |
| | | .chart-title, |
| | | .table-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 15px; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | color: #333; |
| | | } |
| | | |
| | | .view-btn { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .table-pagination { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-top: 15px; |
| | | } |
| | | |
| | | .btn-group { |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | /* ç¡®ä¿å¾è¡¨å®¹å¨ææç¡®å°ºå¯¸ */ |
| | | :deep(.el-card__body) { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | </style> |