Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request.js"; |
| | | |
| | | // 离èåå åæ |
| | | export function findStaffLeaveReasonAnalysis() { |
| | | return request({ |
| | | url: "/staff/analytics/reason", |
| | | method: "get" |
| | | }); |
| | | } |
| | | |
| | | // 12个æåå·¥æµå¨æµå¤±çåæ |
| | | export function findStaffAnalysisMonthlyTurnoverRateFor12Months() { |
| | | return request({ |
| | | url: "/staff/analytics/monthly_turnover_rate", |
| | | method: "get" |
| | | }); |
| | | } |
| | | |
| | | export function findStaffAnalysisTotalStatistic() { |
| | | return request({ |
| | | url: "/staff/analytics/total_statistic", |
| | | method: "get" |
| | | }); |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="40" height="40" viewBox="0 0 40 40"><defs><mask id="master_svg0_88_35670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="40" height="40"><ellipse cx="20" cy="20" rx="20" ry="20" fill="#FFFFFF" fill-opacity="1"/></mask><clipPath id="master_svg1_88_35666"><rect x="7" y="7" width="27" height="27" rx="0"/></clipPath><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_88_26531"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="98.57142567634583%" stop-color="#F0FBFF" stop-opacity="1"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg3_88_26531"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="98.57142567634583%" stop-color="#F0FBFF" stop-opacity="1"/></linearGradient></defs><g mask="url(#master_svg0_88_35670)"><ellipse cx="20" cy="20" rx="20" ry="20" fill="#0092FF" fill-opacity="1"/><g clip-path="url(#master_svg1_88_35666)"><path d="M21.175671875,27.58515925L14.263672875000001,27.58515925C13.750673275,27.58515925,13.426672974999999,27.24765625,13.426672974999999,26.74815725C13.426672974999999,26.23515525,13.764173075,25.911160250000002,14.263672875000001,25.911160250000002L21.351173875,25.911160250000002C21.688676875,24.89865825,22.188173875,23.88615425,22.863174875,23.211156250000002L14.263672875000001,23.211156250000002C13.750673275,23.211156250000002,13.426672974999999,22.87365525,13.426672974999999,22.37415225C13.426672974999999,21.87465325,13.764173075,21.537155249999998,14.263672875000001,21.537155249999998L25.738675875,21.537155249999998C26.251674875,21.37515325,26.751174875,21.37515325,27.088676875,21.37515325C28.438678875,21.37515325,29.626676875,21.88815525,30.625678875,22.549656249999998L30.625678875,13.072656349999999C30.625678875,11.38515625,29.275674875,10.03515625,27.588174875,10.03515625L27.075177875,10.03515625L27.075177875,13.24815675C27.075177875,14.935656550000001,25.725173875,16.285657450000002,24.037676875000002,16.285657450000002L16.113174475,16.285657450000002C14.425674475000001,16.272157149999998,13.075673375000001,14.922158249999999,13.075673375000001,13.23465635L13.075673375000001,10.03515625L12.238672475,10.03515625C10.551171974999999,10.03515625,9.201171875,11.38515625,9.201171875,13.072656349999999L9.201171875,29.94765825C9.201171875,31.63515625,10.551171974999999,32.985161250000004,12.238672475,32.985161250000004L25.576673875,32.985161250000004C23.200674875,32.485662250000004,21.337675875000002,30.28515825,21.175671875,27.58515925Z" fill="url(#master_svg2_88_26531)" fill-opacity="1" style="mix-blend-mode:passthrough"/><path d="M16.1124145625,14.764538762499999L24.0504169625,14.764538762499999C24.8874170625,14.764538762499999,25.5624140625,14.0895385625,25.5624140625,13.252537762500001L25.5624140625,10.0395388625L22.5249171625,10.0395388625C22.3629159625,8.8650390625,21.3369150625,7.8525390625,19.986915562500002,7.8525390625C18.7989153625,7.8525390625,17.7864150625,8.8650390625,17.6244149625,10.0395388625L14.5869140625,10.0395388625L14.5869140625,13.252537762500001C14.5869140625,14.0895385625,15.2619143725,14.764538762499999,16.1124145625,14.764538762499999ZM30.7869150625,24.3900370625C29.9499160625,23.3775360625,28.5999220625,22.7025380625,27.2499170625,22.7025380625L26.412916062500003,22.7025380625C25.8999180625,22.7025380625,25.5759160625,22.8780390625,25.0629190625,23.2155400625C24.0504169625,23.7285370625,23.1999158625,24.7275330625,22.700415562499998,25.9155390625C22.5384173625,26.4285390625,22.5384173625,26.9280380625,22.5384173625,27.4275380625L22.5384173625,27.5895390625C22.700415562499998,30.1275410625,24.7254170625,31.9770390625,27.1014200625,31.9770390625C28.4514180625,31.9770390625,29.8014230625,31.3020400625,30.6384180625,30.2895320625C31.3134210625,29.4525340625,31.6509170625,28.4265380625,31.6509170625,27.2520330625C31.8129160625,26.2395310625,31.2999250625,25.2270370625,30.7869150625,24.3900370625ZM29.7879200625,26.5770380625L27.0879160625,29.2770390625C26.7504160625,29.6145400625,26.412916062500003,29.6145400625,26.0754160625,29.2770390625L24.387915562499998,27.5895390625C24.0504169625,27.2520370625,24.0504169625,26.9145390625,24.387915562499998,26.5770380625C24.725415062499998,26.2395380625,25.0629150625,26.2395400625,25.4004160625,26.5770380625L26.2374170625,27.4140400625L26.5749150625,27.7515370625L28.7619150625,25.5645350625C29.0994140625,25.2270370625,29.4369190625,25.2270370625,29.774416062500002,25.5645350625C30.1119160625,25.9020370625,30.1119160625,26.2395380625,29.7879200625,26.5770380625Z" fill="url(#master_svg3_88_26531)" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="40" height="40" viewBox="0 0 40 40"><defs><mask id="master_svg0_88_35670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="40" height="40"><ellipse cx="20" cy="20" rx="20" ry="20" fill="#FFFFFF" fill-opacity="1"/></mask><clipPath id="master_svg1_88_35666"><rect x="7" y="7" width="27" height="27" rx="0"/></clipPath><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_88_26531"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="98.57142567634583%" stop-color="#F0FBFF" stop-opacity="1"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg3_88_26531"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="98.57142567634583%" stop-color="#F0FBFF" stop-opacity="1"/></linearGradient></defs><g mask="url(#master_svg0_88_35670)"><ellipse cx="20" cy="20" rx="20" ry="20" fill="#5EB334" fill-opacity="1"/><g clip-path="url(#master_svg1_88_35666)"><path d="M21.175671875,27.58515925L14.263672875000001,27.58515925C13.750673275,27.58515925,13.426672974999999,27.24765625,13.426672974999999,26.74815725C13.426672974999999,26.23515525,13.764173075,25.911160250000002,14.263672875000001,25.911160250000002L21.351173875,25.911160250000002C21.688676875,24.89865825,22.188173875,23.88615425,22.863174875,23.211156250000002L14.263672875000001,23.211156250000002C13.750673275,23.211156250000002,13.426672974999999,22.87365525,13.426672974999999,22.37415225C13.426672974999999,21.87465325,13.764173075,21.537155249999998,14.263672875000001,21.537155249999998L25.738675875,21.537155249999998C26.251674875,21.37515325,26.751174875,21.37515325,27.088676875,21.37515325C28.438678875,21.37515325,29.626676875,21.88815525,30.625678875,22.549656249999998L30.625678875,13.072656349999999C30.625678875,11.38515625,29.275674875,10.03515625,27.588174875,10.03515625L27.075177875,10.03515625L27.075177875,13.24815675C27.075177875,14.935656550000001,25.725173875,16.285657450000002,24.037676875000002,16.285657450000002L16.113174475,16.285657450000002C14.425674475000001,16.272157149999998,13.075673375000001,14.922158249999999,13.075673375000001,13.23465635L13.075673375000001,10.03515625L12.238672475,10.03515625C10.551171974999999,10.03515625,9.201171875,11.38515625,9.201171875,13.072656349999999L9.201171875,29.94765825C9.201171875,31.63515625,10.551171974999999,32.985161250000004,12.238672475,32.985161250000004L25.576673875,32.985161250000004C23.200674875,32.485662250000004,21.337675875000002,30.28515825,21.175671875,27.58515925Z" fill="url(#master_svg2_88_26531)" fill-opacity="1" style="mix-blend-mode:passthrough"/><path d="M16.1124145625,14.764538762499999L24.0504169625,14.764538762499999C24.8874170625,14.764538762499999,25.5624140625,14.0895385625,25.5624140625,13.252537762500001L25.5624140625,10.0395388625L22.5249171625,10.0395388625C22.3629159625,8.8650390625,21.3369150625,7.8525390625,19.986915562500002,7.8525390625C18.7989153625,7.8525390625,17.7864150625,8.8650390625,17.6244149625,10.0395388625L14.5869140625,10.0395388625L14.5869140625,13.252537762500001C14.5869140625,14.0895385625,15.2619143725,14.764538762499999,16.1124145625,14.764538762499999ZM30.7869150625,24.3900370625C29.9499160625,23.3775360625,28.5999220625,22.7025380625,27.2499170625,22.7025380625L26.412916062500003,22.7025380625C25.8999180625,22.7025380625,25.5759160625,22.8780390625,25.0629190625,23.2155400625C24.0504169625,23.7285370625,23.1999158625,24.7275330625,22.700415562499998,25.9155390625C22.5384173625,26.4285390625,22.5384173625,26.9280380625,22.5384173625,27.4275380625L22.5384173625,27.5895390625C22.700415562499998,30.1275410625,24.7254170625,31.9770390625,27.1014200625,31.9770390625C28.4514180625,31.9770390625,29.8014230625,31.3020400625,30.6384180625,30.2895320625C31.3134210625,29.4525340625,31.6509170625,28.4265380625,31.6509170625,27.2520330625C31.8129160625,26.2395310625,31.2999250625,25.2270370625,30.7869150625,24.3900370625ZM29.7879200625,26.5770380625L27.0879160625,29.2770390625C26.7504160625,29.6145400625,26.412916062500003,29.6145400625,26.0754160625,29.2770390625L24.387915562499998,27.5895390625C24.0504169625,27.2520370625,24.0504169625,26.9145390625,24.387915562499998,26.5770380625C24.725415062499998,26.2395380625,25.0629150625,26.2395400625,25.4004160625,26.5770380625L26.2374170625,27.4140400625L26.5749150625,27.7515370625L28.7619150625,25.5645350625C29.0994140625,25.2270370625,29.4369190625,25.2270370625,29.774416062500002,25.5645350625C30.1119160625,25.9020370625,30.1119160625,26.2395380625,29.7879200625,26.5770380625Z" fill="url(#master_svg3_88_26531)" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="40" height="40" viewBox="0 0 40 40"><defs><mask id="master_svg0_88_35670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="40" height="40"><ellipse cx="20" cy="20" rx="20" ry="20" fill="#FFFFFF" fill-opacity="1"/></mask><clipPath id="master_svg1_88_35666"><rect x="7" y="7" width="27" height="27" rx="0"/></clipPath><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_88_26531"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="98.57142567634583%" stop-color="#F0FBFF" stop-opacity="1"/></linearGradient><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg3_88_26531"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="98.57142567634583%" stop-color="#F0FBFF" stop-opacity="1"/></linearGradient></defs><g mask="url(#master_svg0_88_35670)"><ellipse cx="20" cy="20" rx="20" ry="20" fill="#8000FF" fill-opacity="1"/><g clip-path="url(#master_svg1_88_35666)"><path d="M21.175671875,27.58515925L14.263672875000001,27.58515925C13.750673275,27.58515925,13.426672974999999,27.24765625,13.426672974999999,26.74815725C13.426672974999999,26.23515525,13.764173075,25.911160250000002,14.263672875000001,25.911160250000002L21.351173875,25.911160250000002C21.688676875,24.89865825,22.188173875,23.88615425,22.863174875,23.211156250000002L14.263672875000001,23.211156250000002C13.750673275,23.211156250000002,13.426672974999999,22.87365525,13.426672974999999,22.37415225C13.426672974999999,21.87465325,13.764173075,21.537155249999998,14.263672875000001,21.537155249999998L25.738675875,21.537155249999998C26.251674875,21.37515325,26.751174875,21.37515325,27.088676875,21.37515325C28.438678875,21.37515325,29.626676875,21.88815525,30.625678875,22.549656249999998L30.625678875,13.072656349999999C30.625678875,11.38515625,29.275674875,10.03515625,27.588174875,10.03515625L27.075177875,10.03515625L27.075177875,13.24815675C27.075177875,14.935656550000001,25.725173875,16.285657450000002,24.037676875000002,16.285657450000002L16.113174475,16.285657450000002C14.425674475000001,16.272157149999998,13.075673375000001,14.922158249999999,13.075673375000001,13.23465635L13.075673375000001,10.03515625L12.238672475,10.03515625C10.551171974999999,10.03515625,9.201171875,11.38515625,9.201171875,13.072656349999999L9.201171875,29.94765825C9.201171875,31.63515625,10.551171974999999,32.985161250000004,12.238672475,32.985161250000004L25.576673875,32.985161250000004C23.200674875,32.485662250000004,21.337675875000002,30.28515825,21.175671875,27.58515925Z" fill="url(#master_svg2_88_26531)" fill-opacity="1" style="mix-blend-mode:passthrough"/><path d="M16.1124145625,14.764538762499999L24.0504169625,14.764538762499999C24.8874170625,14.764538762499999,25.5624140625,14.0895385625,25.5624140625,13.252537762500001L25.5624140625,10.0395388625L22.5249171625,10.0395388625C22.3629159625,8.8650390625,21.3369150625,7.8525390625,19.986915562500002,7.8525390625C18.7989153625,7.8525390625,17.7864150625,8.8650390625,17.6244149625,10.0395388625L14.5869140625,10.0395388625L14.5869140625,13.252537762500001C14.5869140625,14.0895385625,15.2619143725,14.764538762499999,16.1124145625,14.764538762499999ZM30.7869150625,24.3900370625C29.9499160625,23.3775360625,28.5999220625,22.7025380625,27.2499170625,22.7025380625L26.412916062500003,22.7025380625C25.8999180625,22.7025380625,25.5759160625,22.8780390625,25.0629190625,23.2155400625C24.0504169625,23.7285370625,23.1999158625,24.7275330625,22.700415562499998,25.9155390625C22.5384173625,26.4285390625,22.5384173625,26.9280380625,22.5384173625,27.4275380625L22.5384173625,27.5895390625C22.700415562499998,30.1275410625,24.7254170625,31.9770390625,27.1014200625,31.9770390625C28.4514180625,31.9770390625,29.8014230625,31.3020400625,30.6384180625,30.2895320625C31.3134210625,29.4525340625,31.6509170625,28.4265380625,31.6509170625,27.2520330625C31.8129160625,26.2395310625,31.2999250625,25.2270370625,30.7869150625,24.3900370625ZM29.7879200625,26.5770380625L27.0879160625,29.2770390625C26.7504160625,29.6145400625,26.412916062500003,29.6145400625,26.0754160625,29.2770390625L24.387915562499998,27.5895390625C24.0504169625,27.2520370625,24.0504169625,26.9145390625,24.387915562499998,26.5770380625C24.725415062499998,26.2395380625,25.0629150625,26.2395400625,25.4004160625,26.5770380625L26.2374170625,27.4140400625L26.5749150625,27.7515370625L28.7619150625,25.5645350625C29.0994140625,25.2270370625,29.4369190625,25.2270370625,29.774416062500002,25.5645350625C30.1119160625,25.9020370625,30.1119160625,26.2395380625,29.7879200625,26.5770380625Z" fill="url(#master_svg3_88_26531)" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg> |
| | |
| | | <template> |
| | | <div class="app-container analytics-container"> |
| | | <div class="app-container analytics-container" v-loading="loading"> |
| | | |
| | | <!-- å
³é®ææ å¡ç --> |
| | | <el-row :gutter="20" class="metrics-cards"> |
| | |
| | | <component :is="item.icon" /> |
| | | </el-icon> |
| | | </div> |
| | | <div class="card-info"> |
| | | <div class="card-info"> |
| | | <div class="card-number"> |
| | | <el-skeleton-item v-if="loading" variant="text" style="width: 60px; height: 32px;" /> |
| | | <span v-else>{{ item.value }}{{ item.unit }}</span> |
| | |
| | | |
| | | <!-- 第äºè¡å¾è¡¨ --> |
| | | <el-row :gutter="20" class="charts-section"> |
| | | <!-- ç¼å¶è¾¾æç --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>ç¼å¶è¾¾æç</span> |
| | | <el-tag type="warning">åé¨é¨å¯¹æ¯</el-tag> |
| | | </div> |
| | | </template> |
| | | <div class="chart-container"> |
| | | <div ref="staffingChartRef" class="chart"></div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <!-- åå·¥æµå¤±åå åæ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, onMounted, onUnmounted } from 'vue' |
| | | import { ref, onMounted, onUnmounted, nextTick } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { |
| | | Refresh, |
| | | User, |
| | | TrendCharts, |
| | | DataAnalysis, |
| | | PieChart, |
| | | ArrowUp, |
| | | ArrowDown |
| | | } from '@element-plus/icons-vue' |
| | | import * as echarts from 'echarts' |
| | | import { staffOnJobListPage } from '@/api/personnelManagement/staffOnJob.js' |
| | | import {listDept} from "@/api/system/dept.js"; |
| | | import { |
| | | findStaffAnalysisMonthlyTurnoverRateFor12Months, |
| | | findStaffLeaveReasonAnalysis, |
| | | findStaffAnalysisTotalStatistic |
| | | } from "@/api/personnelManagement/staffAnalytics.js"; |
| | | |
| | | // ååºå¼æ°æ® |
| | | const loading = ref(false) |
| | |
| | | trend: 0 |
| | | }, |
| | | { |
| | | label: 'ç¼å¶è¾¾æç', |
| | | value: 0, |
| | | unit: '%', |
| | | icon: 'DataAnalysis', |
| | | type: 'success', |
| | | trend: 0 |
| | | }, |
| | | { |
| | | label: 'å¨èåå·¥æ°', |
| | | value: 0, |
| | | unit: '人', |
| | |
| | | |
| | | // é¨é¨æ°æ® |
| | | const departmentData = ref([]) |
| | | // åå·¥æµå¤±åå åææ°æ® |
| | | const staffLeaveReasons = ref([]) |
| | | // 12个æåå·¥æµå¨æµå¤±çåææ°æ® |
| | | const turnoverRateStatistics = ref([]) |
| | | |
| | | // è·åå¨èåå·¥æ° |
| | | const getStaffCount = async () => { |
| | | // è·åé¨é¨æ°æ® |
| | | const getDepartmentData = async () => { |
| | | try { |
| | | const res = await staffOnJobListPage({ staffState: 1, current: 1, size: 1 }) |
| | | const res = await listDept() |
| | | if (res && res.data) { |
| | | keyMetrics.value[3].value = res.data.total || 0 |
| | | departmentData.value = res.data |
| | | } |
| | | } catch (error) { |
| | | console.error('è·åå¨èåå·¥æ°å¤±è´¥:', error) |
| | | console.error('è·åé¨é¨æ°æ®å¤±è´¥:', error) |
| | | } |
| | | } |
| | | |
| | | const getStaffLeaveReasonAnalysis = async () => { |
| | | try { |
| | | const res = await findStaffLeaveReasonAnalysis() |
| | | if (res && res.data) { |
| | | staffLeaveReasons.value = res.data || [] |
| | | } |
| | | } catch (error) { |
| | | console.error('è·ååå·¥æµå¤±åå åæå¤±è´¥:', error) |
| | | } |
| | | } |
| | | |
| | | // ä¿®æ¹ä¸ºè¿åPromiseç弿¥å½æ° |
| | | const getMonthlyTurnoverRateFor12Months = async () => { |
| | | try { |
| | | const res = await findStaffAnalysisMonthlyTurnoverRateFor12Months() |
| | | if (res && res.data) { |
| | | turnoverRateStatistics.value = res.data || [] |
| | | } |
| | | } catch (error) { |
| | | console.error('è·å12个æåå·¥æµå¨æµå¤±çåææ°æ®å¤±è´¥:', error) |
| | | } |
| | | } |
| | | |
| | | const getStaffAnalysisTotalStatistic = async () => { |
| | | try { |
| | | const res = await findStaffAnalysisTotalStatistic() |
| | | if (res && res.data) { |
| | | keyMetrics.value[0].value = res.data.totalFlowRate || 0 |
| | | keyMetrics.value[1].value = res.data.totalTurnoverRate || 0 |
| | | keyMetrics.value[2].value = res.data.currentOnJobCount || 0 |
| | | } |
| | | } catch (error) { |
| | | console.error('è·åå工忿»ç»è®¡æ°æ®å¤±è´¥:', error) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // çææ¨¡ææ°æ® |
| | | const generateMockData = () => { |
| | | // çæå
³é®ææ æ°æ® |
| | | keyMetrics.value[0].value = (Math.random() * 5 + 2).toFixed(1) |
| | | keyMetrics.value[0].trend = (Math.random() * 3 - 1.5).toFixed(1) |
| | | |
| | | keyMetrics.value[1].value = (Math.random() * 3 + 1).toFixed(1) |
| | | keyMetrics.value[1].trend = (Math.random() * 2 - 1).toFixed(1) |
| | | |
| | | keyMetrics.value[2].value = (Math.random() * 15 + 85).toFixed(1) |
| | | keyMetrics.value[2].trend = (Math.random() * 3 - 1.5).toFixed(1) |
| | | |
| | | // çæé¨é¨æ°æ® |
| | | const departments = ['ææ¯é¨', 'éå®é¨', '人äºé¨', 'è´¢å¡é¨', 'ç产é¨', 'å¸åºé¨'] |
| | | departmentData.value = departments.map(dept => ({ |
| | | department: dept, |
| | | currentStaff: Math.floor(Math.random() * 30 + 20), |
| | | plannedStaff: Math.floor(Math.random() * 10 + 35), |
| | | staffingRate: Math.floor(Math.random() * 20 + 80), |
| | | turnoverRate: (Math.random() * 4 + 1).toFixed(1), |
| | | attritionRate: (Math.random() * 2 + 0.5).toFixed(1), |
| | | newHires: Math.floor(Math.random() * 5 + 1), |
| | | resignations: Math.floor(Math.random() * 3 + 1), |
| | | status: Math.random() > 0.7 ? 'å¼å¸¸' : 'æ£å¸¸' |
| | | })) |
| | | } |
| | | |
| | | // å·æ°æ°æ® |
| | | // ä¿®æ¹ä¸ºå¼æ¥å½æ°ï¼ç¡®ä¿æ°æ®å è½½å®æå忏²æå¾è¡¨ |
| | | const refreshData = async () => { |
| | | loading.value = true |
| | | try { |
| | | // 模æAPIè°ç¨å»¶è¿ |
| | | await new Promise(resolve => setTimeout(resolve, 500)) |
| | | |
| | | generateMockData() |
| | | loading.value = true |
| | | |
| | | // çå¾
æææ°æ®å è½½å®æ |
| | | await Promise.all([ |
| | | getDepartmentData(), |
| | | getStaffLeaveReasonAnalysis(), |
| | | getMonthlyTurnoverRateFor12Months(), |
| | | getStaffAnalysisTotalStatistic() |
| | | ]) |
| | | |
| | | await nextTick() |
| | | renderAllCharts() |
| | | |
| | | |
| | | if (!autoRefreshEnabled.value) { |
| | | ElMessage.success('æ°æ®å·æ°æå') |
| | | } |
| | | } catch (error) { |
| | | console.error('å·æ°æ°æ®å¤±è´¥:', error) |
| | | ElMessage.error('å·æ°æ°æ®å¤±è´¥') |
| | | console.error('æ°æ®å·æ°å¤±è´¥:', error) |
| | | ElMessage.error('æ°æ®å·æ°å¤±è´¥') |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | |
| | | if (attritionChartRef.value) { |
| | | attritionChart = echarts.init(attritionChartRef.value) |
| | | } |
| | | |
| | | renderAllCharts() |
| | | |
| | | // åå§åæ¶ä¹å
å è½½æ°æ®å渲æå¾è¡¨ |
| | | refreshData() |
| | | }, 300) |
| | | } |
| | | |
| | |
| | | renderAttritionChart() |
| | | } |
| | | |
| | | // 渲æåå·¥æµå¨çè¶å¿å¾ |
| | | // ä¿®æ¹ä¸ºä½¿ç¨APIè¿åçå®é
æ°æ® |
| | | const renderTurnoverChart = () => { |
| | | if (!turnoverChart) return |
| | | |
| | | const months = ['1æ', '2æ', '3æ', '4æ', '5æ', '6æ', '7æ', '8æ', '9æ', '10æ', '11æ', '12æ'] |
| | | const turnoverData = months.map(() => (Math.random() * 5 + 2).toFixed(1)) |
| | | const attritionData = months.map(() => (Math.random() * 3 + 1).toFixed(1)) |
| | | |
| | | |
| | | // 使ç¨APIè¿åçå®é
æ°æ® |
| | | const months = turnoverRateStatistics.value.map(item => item.month) |
| | | const turnoverData = turnoverRateStatistics.value.map(item => item.flowRate || 0) |
| | | const attritionData = turnoverRateStatistics.value.map(item => item.turnoverRate || 0) |
| | | |
| | | const option = { |
| | | title: { |
| | | text: 'åå·¥æµå¨çè¶å¿', |
| | |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | | turnoverChart.setOption(option) |
| | | } |
| | | |
| | | // 渲æé¨é¨äººååå¸å¾ |
| | | const renderDepartmentChart = () => { |
| | | if (!departmentChart) return |
| | | |
| | | |
| | | const data = departmentData.value.map(item => ({ |
| | | name: item.department, |
| | | value: item.currentStaff |
| | | name: item.deptName, |
| | | value: item.staffCount |
| | | })) |
| | | |
| | | |
| | | const option = { |
| | | title: { |
| | | text: 'é¨é¨äººååå¸', |
| | |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | | departmentChart.setOption(option) |
| | | } |
| | | |
| | | // 渲æç¼å¶è¾¾æçå¾ |
| | | const renderStaffingChart = () => { |
| | | if (!staffingChart) return |
| | | |
| | | const departments = departmentData.value.map(item => item.department) |
| | | |
| | | const departments = departmentData.value.map(item => item.deptName) |
| | | const rates = departmentData.value.map(item => item.staffingRate) |
| | | |
| | | |
| | | const option = { |
| | | title: { |
| | | text: 'ç¼å¶è¾¾æç', |
| | |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | | staffingChart.setOption(option) |
| | | } |
| | | |
| | | // 渲æåå·¥æµå¤±åå åæå¾ |
| | | const renderAttritionChart = () => { |
| | | if (!attritionChart) return |
| | | |
| | | const reasons = ['èªèµå¾
é', 'èä¸åå±', 'å·¥ä½ç¯å¢', '个人åå ', 'å
¶ä»'] |
| | | const data = reasons.map(() => Math.floor(Math.random() * 20 + 5)) |
| | | |
| | | |
| | | const reasons = staffLeaveReasons.value.map(item => item.reasonText) |
| | | const data = staffLeaveReasons.value.map(item => item.count) |
| | | |
| | | const option = { |
| | | title: { |
| | | text: 'åå·¥æµå¤±åå åæ', |
| | |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | | attritionChart.setOption(option) |
| | | } |
| | | |
| | | |
| | | // çå½å¨æ |
| | | onMounted(() => { |
| | | generateMockData() |
| | | getStaffCount() |
| | | initCharts() |
| | | startAutoRefresh() |
| | | }) |
| | |
| | | .analytics-container { |
| | | padding: 10px; |
| | | } |
| | | |
| | | |
| | | .page-header { |
| | | padding: 15px; |
| | | } |
| | | |
| | | |
| | | .page-header h2 { |
| | | font-size: 24px; |
| | | } |
| | | |
| | | |
| | | .header-controls { |
| | | flex-direction: column; |
| | | gap: 15px; |
| | | } |
| | | |
| | | |
| | | .refresh-btn { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .metrics-cards .el-col { |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | |
| | | .charts-section .el-col { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | |
| | | .chart-container { |
| | | height: 300px; |
| | | } |
| | |
| | | .page-header h2 { |
| | | font-size: 20px; |
| | | } |
| | | |
| | | |
| | | .card-number { |
| | | font-size: 24px; |
| | | } |
| | | |
| | | |
| | | .chart-container { |
| | | height: 250px; |
| | | } |
| | |
| | | <template> |
| | | <div class="report-management"> |
| | | <!-- ç鿡件 --> |
| | | <el-card class="filter-card" shadow="never"> |
| | | <el-form :model="filterForm" inline> |
| | | <el-form-item label="æ¶é´èå´"> |
| | | <el-date-picker |
| | | style="width: 300px" |
| | | v-model="filterForm.dateRange" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | @change="handleFilterChange" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥è¡¨ç±»å"> |
| | | <el-select v-model="filterForm.reportType" placeholder="è¯·éæ©æ¥è¡¨ç±»å" @change="handleFilterChange" style="width: 300px"> |
| | | <el-option label="æ ·åè¿åº¦æ¥è¡¨" value="sample" /> |
| | | <el-option label="设å¤ä½¿ç¨æ¥è¡¨" value="equipment" /> |
| | | <el-option label="æ£æµé¡¹ç®æ¥è¡¨" value="inspection" /> |
| | | <el-option label="é¢ç¨è®°å½æ¥è¡¨" value="usage" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleFilterChange">æ¥è¯¢</el-button> |
| | | <el-button @click="resetFilter">éç½®</el-button> |
| | | <el-button type="success" @click="exportReport">å¯¼åºæ¥è¡¨</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <!-- ç»è®¡å¡ç --> |
| | | <div class="statistics-cards"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-card class="stat-card" shadow="hover"> |
| | | <div class="stat-content"> |
| | | <div class="stat-icon"> |
| | | <el-icon><Box /></el-icon> |
| | | </div> |
| | | <div class="stat-info"> |
| | | <div class="stat-number">{{ statistics.totalSamples }}</div> |
| | | <div class="stat-label">æ»æ ·åæ°</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-card class="stat-card" shadow="hover"> |
| | | <div class="stat-content"> |
| | | <div class="stat-icon"> |
| | | <el-icon><Tools /></el-icon> |
| | | </div> |
| | | <div class="stat-info"> |
| | | <div class="stat-number">{{ statistics.activeEquipment }}</div> |
| | | <div class="stat-label">å¨ç¨è®¾å¤</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-card class="stat-card" shadow="hover"> |
| | | <div class="stat-content"> |
| | | <div class="stat-icon"> |
| | | <el-icon><Document /></el-icon> |
| | | </div> |
| | | <div class="stat-info"> |
| | | <div class="stat-number">{{ statistics.completedInspections }}</div> |
| | | <div class="stat-label">å·²å®ææ£æµ</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-card class="stat-card" shadow="hover"> |
| | | <div class="stat-content"> |
| | | <div class="stat-icon"> |
| | | <el-icon><ShoppingCart /></el-icon> |
| | | </div> |
| | | <div class="stat-info"> |
| | | <div class="stat-number">{{ statistics.totalUsage }}</div> |
| | | <div class="stat-label">æ»é¢ç¨æ¬¡æ°</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <!-- å¾è¡¨åºå --> |
| | | <div class="charts-container"> |
| | | <el-row :gutter="20"> |
| | | <!-- æ ·åè¿åº¦å¾è¡¨ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>æ ·åè¿åº¦ç»è®¡</span> |
| | | <el-button link @click="refreshSampleChart">å·æ°</el-button> |
| | | </div> |
| | | </template> |
| | | <div ref="sampleChartRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <!-- 设å¤ä½¿ç¨å¾è¡¨ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>设å¤ä½¿ç¨çç»è®¡</span> |
| | | <el-button link @click="refreshEquipmentChart">å·æ°</el-button> |
| | | </div> |
| | | </template> |
| | | <div ref="equipmentChartRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20" style="margin-top: 20px;"> |
| | | <!-- æ£æµé¡¹ç®ç»è®¡ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>æ£æµé¡¹ç®åå¸</span> |
| | | <el-button link @click="refreshInspectionChart">å·æ°</el-button> |
| | | </div> |
| | | </template> |
| | | <div ref="inspectionChartRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <!-- é¢ç¨è®°å½è¶å¿ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>é¢ç¨è®°å½è¶å¿</span> |
| | | <el-button link @click="refreshUsageChart">å·æ°</el-button> |
| | | </div> |
| | | </template> |
| | | <div ref="usageChartRef" class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <!-- è¯¦ç»æ°æ®è¡¨æ ¼ --> |
| | | <el-card class="table-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>è¯¦ç»æ°æ®</span> |
| | | <div> |
| | | <el-button type="primary" size="small" @click="refreshTable">å·æ°</el-button> |
| | | <el-button type="success" size="small" @click="exportTable">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | v-loading="tableLoading" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="id" label="ç¼å·" width="80" /> |
| | | <el-table-column prop="name" label="åç§°" /> |
| | | <el-table-column prop="status" label="ç¶æ"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.status)"> |
| | | {{ scope.row.status }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="progress" label="è¿åº¦"> |
| | | <template #default="scope"> |
| | | <el-progress :percentage="scope.row.progress" :status="getProgressStatus(scope.row.progress)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" width="180" /> |
| | | <el-table-column prop="updateTime" label="æ´æ°æ¶é´" width="180" /> |
| | | <el-table-column label="æä½" width="150" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button link size="small" @click="viewDetail(scope.row)">æ¥ç</el-button> |
| | | <el-button link size="small" @click="editItem(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pagination-container"> |
| | | <el-pagination |
| | | v-model:current-page="pagination.currentPage" |
| | | v-model:page-size="pagination.pageSize" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :total="pagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div class="report-management"> |
| | | <!-- å¾è¡¨åºå --> |
| | | <div class="charts-container"> |
| | | <el-row :gutter="20"> |
| | | <!-- åç±»å宿æ°é --> |
| | | <el-col :span="9"> |
| | | <el-card class="chart-card" |
| | | shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div class="chart-title-line"></div> |
| | | <span>åç±»å宿æ°é</span> |
| | | </div> |
| | | </template> |
| | | <div class="top-container"> |
| | | <div class="typeNum"> |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard.svg" |
| | | alt="å¾è¡¨" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text">åææ</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine">-</div> |
| | | <div class="typeNum-rightLine"></div> |
| | | </div> |
| | | <div class="typeNum-right"> |
| | | <div class="typeNum-right-top"> |
| | | <div class="typeNum-right-top-name">æ»æ°é</div> |
| | | <div class="typeNum-right-top-text">2099 <span class="unit">个</span></div> |
| | | </div> |
| | | <div class="typeNum-right-bottom"> |
| | | <div class="typeNum-right-top-name">已宿æ°</div> |
| | | <div class="typeNum-right-top-text">2099 <span class="unit">个</span></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="typeNum"> |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard2.svg" |
| | | alt="å¾è¡¨" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text" |
| | | style="color: #5EB334;">åæå</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine2">-</div> |
| | | <div class="typeNum-rightLine2"></div> |
| | | </div> |
| | | <div class="typeNum-right"> |
| | | <div class="typeNum-right-top"> |
| | | <div class="typeNum-right-top-name">æ»æ°é</div> |
| | | <div class="typeNum-right-top-text">2099 <span class="unit">个</span></div> |
| | | </div> |
| | | <div class="typeNum-right-bottom"> |
| | | <div class="typeNum-right-top-name">已宿æ°</div> |
| | | <div class="typeNum-right-top-text">2099 <span class="unit">个</span></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="typeNum"> |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard3.svg" |
| | | alt="å¾è¡¨" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text" |
| | | style="color: #8000FF;">æå</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine3">-</div> |
| | | <div class="typeNum-rightLine3"></div> |
| | | </div> |
| | | <div class="typeNum-right"> |
| | | <div class="typeNum-right-top"> |
| | | <div class="typeNum-right-top-name">æ»æ°é</div> |
| | | <div class="typeNum-right-top-text">2099 <span class="unit">个</span></div> |
| | | </div> |
| | | <div class="typeNum-right-bottom"> |
| | | <div class="typeNum-right-top-name">已宿æ°</div> |
| | | <div class="typeNum-right-top-text">2099 <span class="unit">个</span></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <!-- è´¨æ£åæ ¼ç --> |
| | | <el-col :span="15"> |
| | | <el-card class="chart-card" |
| | | shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div class="chart-title-line"></div> |
| | | <span>è´¨æ£åæ ¼ç</span> |
| | | </div> |
| | | </template> |
| | | <div class="top-container flex-center"> |
| | | <div class="quality-card blue-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard.svg" |
| | | alt="åææ" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | åææåæ ¼ç |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label blue-label">宿ç</div> |
| | | <div class="quality-item-tip">å æ¯</div> |
| | | <div class="quality-item-value">80%</div> |
| | | </div> |
| | | <div class="quality-item-chart" |
| | | ref="materialCompletionChart"></div> |
| | | </div> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label green-label">åæ ¼ç</div> |
| | | <div class="quality-item-tip">å æ¯</div> |
| | | <div class="quality-item-value">80%</div> |
| | | </div> |
| | | <div class="quality-item-chart" |
| | | ref="materialQualityChart"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="quality-card green-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard2.svg" |
| | | alt="åæå" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | åæååæ ¼ç |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label blue-label">宿ç</div> |
| | | <div class="quality-item-tip">å æ¯</div> |
| | | <div class="quality-item-value">80%</div> |
| | | </div> |
| | | <div class="quality-item-chart" |
| | | ref="semiCompletionChart"></div> |
| | | </div> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label green-label">åæ ¼ç</div> |
| | | <div class="quality-item-tip">å æ¯</div> |
| | | <div class="quality-item-value">80%</div> |
| | | </div> |
| | | <div class="quality-item-chart" |
| | | ref="semiQualityChart"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="quality-card purple-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard3.svg" |
| | | alt="æå" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | æååæ ¼ç |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label blue-label">宿ç</div> |
| | | <div class="quality-item-tip">å æ¯</div> |
| | | <div class="quality-item-value">80%</div> |
| | | </div> |
| | | <div class="quality-item-chart" |
| | | ref="finalCompletionChart"></div> |
| | | </div> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label green-label">åæ ¼ç</div> |
| | | <div class="quality-item-tip">å æ¯</div> |
| | | <div class="quality-item-value">80%</div> |
| | | </div> |
| | | <div class="quality-item-chart" |
| | | ref="finalQualityChart"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="charts-container"> |
| | | <el-row :gutter="20"> |
| | | <!-- è´¨æ£åæ ¼ç --> |
| | | <el-col :span="24"> |
| | | <el-card class="chart-card" |
| | | shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div class="chart-title-line"></div> |
| | | <span>è´¨æ£åæ ¼ç</span> |
| | | </div> |
| | | </template> |
| | | <div class="chart-container-line"> |
| | | <div class="container-line-left"> |
| | | <div style="height: 100%; width: 100%;" |
| | | ref="usageChartRef"> |
| | | </div> |
| | | </div> |
| | | <div class="container-line-right"> |
| | | <div style="height: 80%; width: 100%;" |
| | | ref="inspectionChartRef"> |
| | | </div> |
| | | <div class="container-line-right-bottom"> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">åæææ½æ£æ°</div> |
| | | <div class="chart-box-num">600</div> |
| | | </div> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">åæåæ½æ£æ°</div> |
| | | <div class="chart-box-num">200</div> |
| | | </div> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">æåæ½æ£æ°</div> |
| | | <div class="chart-box-num">200</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- </div> --> |
| | | <!-- <div ref="sampleChartRef" |
| | | class="chart-container"></div> --> |
| | | <div class="yearchange"> |
| | | <div style="margin-right: 8px;font-size: 14px;">年份:</div> |
| | | <el-date-picker v-model="value3" |
| | | size="mini" |
| | | :clearable="false" |
| | | style="width: 60px;" |
| | | type="year" |
| | | :disabled-date="disabledDate" |
| | | placeholder=""> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="charts-container"> |
| | | <el-row :gutter="20"> |
| | | <!-- æ ·åè¿åº¦å¾è¡¨ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card" |
| | | shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div class="chart-title-line"></div> |
| | | <span>è´¨é宿æç»</span> |
| | | </div> |
| | | </template> |
| | | <div ref="equipmentChartRef" |
| | | class="chart-container"></div> |
| | | </el-card> |
| | | </el-col> |
| | | <!-- 设å¤ä½¿ç¨å¾è¡¨ --> |
| | | <el-col :span="12"> |
| | | <el-card class="chart-card" |
| | | shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div class="chart-title-line"></div> |
| | | <span>æ£æµé¡¹ç®åç±»</span> |
| | | </div> |
| | | </template> |
| | | <div class="chart-container-line"> |
| | | <div class="container-line2-left"> |
| | | <div class="info-box"> |
| | | <div class="info-box-header">项ç®åå¸</div> |
| | | <div class="info-line"> |
| | | <div class="info-icon" |
| | | style="background-color: #165DFF"></div> |
| | | <div class="info-line-title">ç©çæ§è½</div> |
| | | <div class="info-line-value1">30%</div> |
| | | <div class="info-line-value2">300</div> |
| | | </div> |
| | | <div class="info-line"> |
| | | <div class="info-icon" |
| | | style="background-color: #14C9C9;"></div> |
| | | <div class="info-line-title">ç©çæ§è½</div> |
| | | <div class="info-line-value1">30%</div> |
| | | <div class="info-line-value2">300</div> |
| | | </div> |
| | | <div class="info-line"> |
| | | <div class="info-icon" |
| | | style="background-color: #F7BA1E;"></div> |
| | | <div class="info-line-title">ç©çæ§è½</div> |
| | | <div class="info-line-value1">30%</div> |
| | | <div class="info-line-value2">300</div> |
| | | </div> |
| | | <div class="info-line"> |
| | | <div class="info-icon" |
| | | style="background-color: #722ED1;"></div> |
| | | <div class="info-line-title">ç©çæ§è½</div> |
| | | <div class="info-line-value1">30%</div> |
| | | <div class="info-line-value2">300</div> |
| | | </div> |
| | | <div class="info-line"> |
| | | <div class="info-icon" |
| | | style="background-color: #3491FA;"></div> |
| | | <div class="info-line-title">ç©çæ§è½</div> |
| | | <div class="info-line-value1">30%</div> |
| | | <div class="info-line-value2">300</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div ref="sampleChartRef" |
| | | style="height: 100%; width: 50%;" |
| | | class="chart-container"></div> |
| | | </div> |
| | | <!-- Tab éæ©å¨ --> |
| | | <div class="tab-selector"> |
| | | <div class="tab-item" |
| | | :class="{ active: activeTab === 'raw' }" |
| | | @click="activeTab = 'raw'">åææ</div> |
| | | <div class="tab-item" |
| | | :class="{ active: activeTab === 'semi' }" |
| | | @click="activeTab = 'semi'">åæå</div> |
| | | <div class="tab-item" |
| | | :class="{ active: activeTab === 'final' }" |
| | | @click="activeTab = 'final'">æå</div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, onMounted, nextTick } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import * as echarts from 'echarts' |
| | | import { Box, Tools, Document, ShoppingCart } from '@element-plus/icons-vue' |
| | | import { ref, reactive, onMounted, nextTick } from "vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import * as echarts from "echarts"; |
| | | import { Box, Tools, Document, ShoppingCart } from "@element-plus/icons-vue"; |
| | | |
| | | // ååºå¼æ°æ® |
| | | const filterForm = reactive({ |
| | | dateRange: [], |
| | | reportType: 'sample' |
| | | }) |
| | | // ååºå¼æ°æ® |
| | | const filterForm = reactive({ |
| | | dateRange: [], |
| | | reportType: "sample", |
| | | }); |
| | | |
| | | const statistics = reactive({ |
| | | totalSamples: 1250, |
| | | activeEquipment: 45, |
| | | completedInspections: 890, |
| | | totalUsage: 2340 |
| | | }) |
| | | const statistics = reactive({ |
| | | totalSamples: 1250, |
| | | activeEquipment: 45, |
| | | completedInspections: 890, |
| | | totalUsage: 2340, |
| | | }); |
| | | |
| | | const tableData = ref([]) |
| | | const tableLoading = ref(false) |
| | | const pagination = reactive({ |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }) |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const pagination = reactive({ |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | total: 0, |
| | | }); |
| | | |
| | | // å¾è¡¨å¼ç¨ |
| | | const sampleChartRef = ref(null) |
| | | const equipmentChartRef = ref(null) |
| | | const inspectionChartRef = ref(null) |
| | | const usageChartRef = ref(null) |
| | | // åå§å年份为å½å年份ï¼ä½¿ç¨Dateå¯¹è±¡ï¼ |
| | | const currentYear = new Date().getFullYear(); |
| | | const value3 = ref(new Date(currentYear, 0, 1)); |
| | | |
| | | // å¾è¡¨å®ä¾ |
| | | let sampleChart = null |
| | | let equipmentChart = null |
| | | let inspectionChart = null |
| | | let usageChart = null |
| | | // éå¶æ¥æéæ©ï¼ä¸å
è®¸éæ©ä»å¹´ä¹åç年份 |
| | | const disabledDate = time => { |
| | | const currentYear = new Date().getFullYear(); |
| | | return time.getFullYear() > currentYear; |
| | | }; |
| | | |
| | | // åå§åæ°æ® |
| | | const initData = () => { |
| | | // 模æè¡¨æ ¼æ°æ® |
| | | tableData.value = [ |
| | | { |
| | | id: 'SP001', |
| | | name: 'æ ·åA-001', |
| | | type: 'é屿æ', |
| | | status: 'æ£æµä¸', |
| | | progress: 75, |
| | | createTime: '2025-01-15 09:30:00', |
| | | updateTime: '2025-01-20 14:20:00' |
| | | }, |
| | | { |
| | | id: 'SP002', |
| | | name: 'æ ·åB-002', |
| | | type: '塿å¶å', |
| | | status: '已宿', |
| | | progress: 100, |
| | | createTime: '2025-01-10 10:15:00', |
| | | updateTime: '2025-01-18 16:45:00' |
| | | }, |
| | | { |
| | | id: 'SP003', |
| | | name: 'æ ·åC-003', |
| | | type: 'çµåå
ä»¶', |
| | | status: 'å¾
æ£æµ', |
| | | progress: 0, |
| | | createTime: '2025-01-22 08:45:00', |
| | | updateTime: '2025-01-22 08:45:00' |
| | | }, |
| | | { |
| | | id: 'EQ001', |
| | | name: 'æ£æµè®¾å¤A', |
| | | type: 'å
谱仪', |
| | | status: '使ç¨ä¸', |
| | | progress: 60, |
| | | createTime: '2025-01-05 14:20:00', |
| | | updateTime: '2025-01-20 11:30:00' |
| | | }, |
| | | { |
| | | id: 'EQ002', |
| | | name: 'æ£æµè®¾å¤B', |
| | | type: 'æ¾å¾®é', |
| | | status: '空é²', |
| | | progress: 0, |
| | | createTime: '2025-01-08 16:10:00', |
| | | updateTime: '2025-01-19 09:15:00' |
| | | } |
| | | ] |
| | | |
| | | pagination.total = tableData.value.length |
| | | } |
| | | // Tab éæ©å¨å½åæ¿æ´»é¡¹ |
| | | const activeTab = ref("raw"); |
| | | |
| | | // åå§åæ ·åè¿åº¦å¾è¡¨ |
| | | const initSampleChart = () => { |
| | | if (sampleChartRef.value) { |
| | | sampleChart = echarts.init(sampleChartRef.value) |
| | | const option = { |
| | | title: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '{a} <br/>{b}: {c} ({d}%)' |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'æ ·åç¶æ', |
| | | type: 'pie', |
| | | radius: ['40%', '70%'], |
| | | avoidLabelOverlap: false, |
| | | label: { |
| | | show: false, |
| | | position: 'center' |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: '18', |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | data: [ |
| | | { value: 450, name: '已宿' }, |
| | | { value: 320, name: 'æ£æµä¸' }, |
| | | { value: 280, name: 'å¾
æ£æµ' }, |
| | | { value: 200, name: 'å·²æå' } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | sampleChart.setOption(option) |
| | | } |
| | | } |
| | | // å¾è¡¨å¼ç¨ |
| | | const sampleChartRef = ref(null); |
| | | const equipmentChartRef = ref(null); |
| | | const inspectionChartRef = ref(null); |
| | | const usageChartRef = ref(null); |
| | | |
| | | // åå§å设å¤ä½¿ç¨å¾è¡¨ |
| | | const initEquipmentChart = () => { |
| | | if (equipmentChartRef.value) { |
| | | equipmentChart = echarts.init(equipmentChartRef.value) |
| | | const option = { |
| | | title: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['å
谱仪', 'æ¾å¾®é', '硬度计', 'æåæº', 'å²å»æº', 'éç¸ä»ª'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | name: '使ç¨ç(%)' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '使ç¨ç', |
| | | type: 'bar', |
| | | data: [85, 60, 75, 90, 45, 70], |
| | | itemStyle: { |
| | | color: function(params) { |
| | | const colors = ['#409EFF', '#67C23A', '#E6A23C', '#F56C6C', '#909399', '#9C27B0'] |
| | | return colors[params.dataIndex] |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | equipmentChart.setOption(option) |
| | | } |
| | | } |
| | | // è´¨æ£åæ ¼çå¾è¡¨å¼ç¨ |
| | | const materialCompletionChart = ref(null); |
| | | const materialQualityChart = ref(null); |
| | | const semiCompletionChart = ref(null); |
| | | const semiQualityChart = ref(null); |
| | | const finalCompletionChart = ref(null); |
| | | const finalQualityChart = ref(null); |
| | | |
| | | // åå§åæ£æµé¡¹ç®å¾è¡¨ |
| | | const initInspectionChart = () => { |
| | | if (inspectionChartRef.value) { |
| | | inspectionChart = echarts.init(inspectionChartRef.value) |
| | | const option = { |
| | | title: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'æ£æµé¡¹ç®', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 335, name: 'ç©çæ§è½' }, |
| | | { value: 310, name: 'åå¦åæ' }, |
| | | { value: 234, name: '尺寸æµé' }, |
| | | { value: 135, name: 'å¤è§æ£æ¥' }, |
| | | { value: 148, name: 'å
¶ä»æ£æµ' } |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | inspectionChart.setOption(option) |
| | | } |
| | | } |
| | | // å¾è¡¨å®ä¾ |
| | | let sampleChart = null; |
| | | let equipmentChart = null; |
| | | let inspectionChart = null; |
| | | let usageChart = null; |
| | | |
| | | // åå§åé¢ç¨è®°å½å¾è¡¨ |
| | | const initUsageChart = () => { |
| | | if (usageChartRef.value) { |
| | | usageChart = echarts.init(usageChartRef.value) |
| | | const option = { |
| | | title: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['é¢ç¨æ¬¡æ°', 'å½è¿æ¬¡æ°'] |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1æ', '2æ', '3æ', '4æ', '5æ', '6æ', '7æ', '8æ', '9æ', '10æ', '11æ', '12æ'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'é¢ç¨æ¬¡æ°', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330] |
| | | }, |
| | | { |
| | | name: 'å½è¿æ¬¡æ°', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [110, 125, 95, 128, 85, 220, 200, 175, 185, 225, 280, 320] |
| | | } |
| | | ] |
| | | } |
| | | usageChart.setOption(option) |
| | | } |
| | | } |
| | | // è´¨æ£åæ ¼çå¾è¡¨å®ä¾ |
| | | let materialCompletionChartInstance = null; |
| | | let materialQualityChartInstance = null; |
| | | let semiCompletionChartInstance = null; |
| | | let semiQualityChartInstance = null; |
| | | let finalCompletionChartInstance = null; |
| | | let finalQualityChartInstance = null; |
| | | |
| | | // äºä»¶å¤ç彿° |
| | | const handleFilterChange = () => { |
| | | ElMessage.success('çéæ¡ä»¶å·²æ´æ°') |
| | | // è¿éå¯ä»¥æ ¹æ®ç鿡件鿰å è½½æ°æ® |
| | | } |
| | | // åå§åæ°æ® |
| | | const initData = () => { |
| | | // 模æè¡¨æ ¼æ°æ® |
| | | tableData.value = [ |
| | | { |
| | | id: "SP001", |
| | | name: "æ ·åA-001", |
| | | type: "é屿æ", |
| | | status: "æ£æµä¸", |
| | | progress: 75, |
| | | createTime: "2025-01-15 09:30:00", |
| | | updateTime: "2025-01-20 14:20:00", |
| | | }, |
| | | { |
| | | id: "SP002", |
| | | name: "æ ·åB-002", |
| | | type: "塿å¶å", |
| | | status: "已宿", |
| | | progress: 100, |
| | | createTime: "2025-01-10 10:15:00", |
| | | updateTime: "2025-01-18 16:45:00", |
| | | }, |
| | | { |
| | | id: "SP003", |
| | | name: "æ ·åC-003", |
| | | type: "çµåå
ä»¶", |
| | | status: "å¾
æ£æµ", |
| | | progress: 0, |
| | | createTime: "2025-01-22 08:45:00", |
| | | updateTime: "2025-01-22 08:45:00", |
| | | }, |
| | | { |
| | | id: "EQ001", |
| | | name: "æ£æµè®¾å¤A", |
| | | type: "åææ", |
| | | status: "使ç¨ä¸", |
| | | progress: 60, |
| | | createTime: "2025-01-05 14:20:00", |
| | | updateTime: "2025-01-20 11:30:00", |
| | | }, |
| | | { |
| | | id: "EQ002", |
| | | name: "æ£æµè®¾å¤B", |
| | | type: "åæå", |
| | | status: "空é²", |
| | | progress: 0, |
| | | createTime: "2025-01-08 16:10:00", |
| | | updateTime: "2025-01-19 09:15:00", |
| | | }, |
| | | ]; |
| | | |
| | | const resetFilter = () => { |
| | | filterForm.dateRange = [] |
| | | filterForm.reportType = 'sample' |
| | | ElMessage.info('ç鿡件已éç½®') |
| | | } |
| | | pagination.total = tableData.value.length; |
| | | }; |
| | | |
| | | const exportReport = () => { |
| | | ElMessage.success('æ¥è¡¨å¯¼åºåè½å¼åä¸...') |
| | | } |
| | | // åå§åæ ·åè¿åº¦å¾è¡¨ |
| | | const initSampleChart = () => { |
| | | if (sampleChartRef.value) { |
| | | sampleChart = echarts.init(sampleChartRef.value); |
| | | const option = { |
| | | title: { |
| | | show: false, |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | formatter: "{a} <br/>{b}: {c} ({d}%)", |
| | | }, |
| | | // legend: { |
| | | // orient: "vertical", |
| | | // left: "left", |
| | | // }, |
| | | series: [ |
| | | { |
| | | name: "æ ·åç¶æ", |
| | | type: "pie", |
| | | radius: ["40%", "80%"], |
| | | avoidLabelOverlap: false, |
| | | label: { |
| | | show: false, |
| | | position: "center", |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: "18", |
| | | fontWeight: "bold", |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | show: false, |
| | | }, |
| | | data: [ |
| | | { value: 450, name: "已宿" }, |
| | | { value: 320, name: "æ£æµä¸" }, |
| | | { value: 280, name: "å¾
æ£æµ" }, |
| | | { value: 200, name: "å·²æå" }, |
| | | ], |
| | | }, |
| | | ], |
| | | }; |
| | | sampleChart.setOption(option); |
| | | } |
| | | }; |
| | | |
| | | const refreshSampleChart = () => { |
| | | initSampleChart() |
| | | ElMessage.success('æ ·åè¿åº¦å¾è¡¨å·²å·æ°') |
| | | } |
| | | // åå§å设å¤ä½¿ç¨å¾è¡¨ |
| | | const initEquipmentChart = () => { |
| | | if (equipmentChartRef.value) { |
| | | equipmentChart = echarts.init(equipmentChartRef.value); |
| | | const option = { |
| | | title: { |
| | | show: false, |
| | | }, |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: "shadow", |
| | | }, |
| | | }, |
| | | grid: { |
| | | left: "1%", |
| | | right: "1%", |
| | | bottom: "1%", |
| | | containLabel: true, |
| | | }, |
| | | legend: { |
| | | data: ["åææ", "åæå", "æå"], // å¾ä¾æ°æ® |
| | | icon: ["circle", "circle", "circle"], |
| | | itemWidth: 10, // è®¾ç½®å¾æ 宽度 |
| | | itemHeight: 10, |
| | | itemGap: 30, |
| | | right: 10, |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: [ |
| | | value3.value.getFullYear() + "-1", |
| | | value3.value.getFullYear() + "-2", |
| | | value3.value.getFullYear() + "-3", |
| | | value3.value.getFullYear() + "-4", |
| | | value3.value.getFullYear() + "-5", |
| | | value3.value.getFullYear() + "-6", |
| | | value3.value.getFullYear() + "-7", |
| | | value3.value.getFullYear() + "-8", |
| | | value3.value.getFullYear() + "-9", |
| | | value3.value.getFullYear() + "-10", |
| | | value3.value.getFullYear() + "-11", |
| | | value3.value.getFullYear() + "-12", |
| | | ], // æ¹ä¸ºåäºä¸ªæ |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | name: "æ°(个)", |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "åææ", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | data: [85, 75, 80, 85, 90, 88, 92, 87, 89, 91, 93, 95], |
| | | itemStyle: { |
| | | color: "#409EFF", |
| | | }, |
| | | }, |
| | | { |
| | | name: "åæå", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | |
| | | const refreshEquipmentChart = () => { |
| | | initEquipmentChart() |
| | | ElMessage.success('设å¤ä½¿ç¨å¾è¡¨å·²å·æ°') |
| | | } |
| | | data: [60, 65, 70, 68, 72, 75, 78, 80, 79, 82, 84, 85], |
| | | itemStyle: { |
| | | color: "#67C23A", |
| | | }, |
| | | }, |
| | | { |
| | | name: "æå", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | |
| | | const refreshInspectionChart = () => { |
| | | initInspectionChart() |
| | | ElMessage.success('æ£æµé¡¹ç®å¾è¡¨å·²å·æ°') |
| | | } |
| | | data: [75, 78, 80, 82, 85, 83, 86, 88, 87, 89, 90, 92], |
| | | itemStyle: { |
| | | color: "#E6A23C", |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | equipmentChart.setOption(option); |
| | | } |
| | | }; |
| | | |
| | | const refreshUsageChart = () => { |
| | | initUsageChart() |
| | | ElMessage.success('é¢ç¨è®°å½å¾è¡¨å·²å·æ°') |
| | | } |
| | | // åå§åæ£æµé¡¹ç®å¾è¡¨ |
| | | const initInspectionChart = () => { |
| | | if (inspectionChartRef.value) { |
| | | inspectionChart = echarts.init(inspectionChartRef.value); |
| | | const option = { |
| | | title: { |
| | | show: false, |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | }, |
| | | series: [ |
| | | { |
| | | type: "pie", |
| | | radius: "80%", |
| | | data: [ |
| | | { value: 335, name: "åææ", itemStyle: { color: "#1890FF" } }, |
| | | { value: 310, name: "åæå", itemStyle: { color: "#F7BA1E" } }, |
| | | { value: 234, name: "æå", itemStyle: { color: "#14C9C9" } }, |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: "rgba(0, 0, 0, 0.5)", |
| | | }, |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | inspectionChart.setOption(option); |
| | | } |
| | | }; |
| | | |
| | | const refreshTable = () => { |
| | | tableLoading.value = true |
| | | setTimeout(() => { |
| | | tableLoading.value = false |
| | | ElMessage.success('è¡¨æ ¼æ°æ®å·²å·æ°') |
| | | }, 1000) |
| | | } |
| | | // åå§åé¢ç¨è®°å½å¾è¡¨ |
| | | const initUsageChart = () => { |
| | | // æ£æ¥å¾è¡¨å®¹å¨æ¯å¦åå¨ |
| | | if (usageChartRef.value) { |
| | | // åå§å ECharts å®ä¾ |
| | | usageChart = echarts.init(usageChartRef.value); |
| | | // é
ç½®å¾è¡¨é项 |
| | | const option = { |
| | | // æ é¢é
ç½®ï¼éèï¼ |
| | | title: { |
| | | show: false, |
| | | }, |
| | | |
| | | const exportTable = () => { |
| | | ElMessage.success('è¡¨æ ¼å¯¼åºåè½å¼åä¸...') |
| | | } |
| | | // ç½æ ¼é
ç½®ï¼è°æ´è¾¹è·ï¼ |
| | | grid: { |
| | | left: "1%", |
| | | right: "4%", |
| | | bottom: "3%", |
| | | top: "14%", |
| | | containLabel: true, |
| | | }, |
| | | // æç¤ºæ¡é
ç½® |
| | | tooltip: { |
| | | trigger: "axis", // 触åç±»åä¸ºåæ è½´è§¦å |
| | | }, |
| | | // å¾ä¾é
ç½® |
| | | legend: { |
| | | data: ["åææ", "åæå", "æå"], // å¾ä¾æ°æ® |
| | | icon: ["circle", "circle", "circle"], |
| | | itemWidth: 10, // è®¾ç½®å¾æ 宽度 |
| | | itemHeight: 10, |
| | | itemGap: 30, |
| | | }, |
| | | // Xè½´é
ç½® |
| | | xAxis: { |
| | | type: "category", // ç±»å«è½´ |
| | | boundaryGap: false, // åæ è½´ä¸¤è¾¹çç½çç¥ |
| | | data: [ |
| | | value3.value.getFullYear() + "-1", |
| | | value3.value.getFullYear() + "-2", |
| | | value3.value.getFullYear() + "-3", |
| | | value3.value.getFullYear() + "-4", |
| | | value3.value.getFullYear() + "-5", |
| | | value3.value.getFullYear() + "-6", |
| | | value3.value.getFullYear() + "-7", |
| | | value3.value.getFullYear() + "-8", |
| | | value3.value.getFullYear() + "-9", |
| | | value3.value.getFullYear() + "-10", |
| | | value3.value.getFullYear() + "-11", |
| | | value3.value.getFullYear() + "-12", |
| | | ], // Xè½´æ°æ® |
| | | }, |
| | | // Yè½´é
ç½® |
| | | yAxis: { |
| | | type: "value", // æ°å¼è½´ |
| | | name: "åä½ï¼%", |
| | | }, |
| | | // ç³»åæ°æ® |
| | | series: [ |
| | | { |
| | | name: "åææ", // ç³»ååç§° |
| | | type: "line", // å¾è¡¨ç±»å为æçº¿å¾ |
| | | stack: "Total", // å å åç§° |
| | | symbol: "none", |
| | | itemStyle: { |
| | | color: "#1890FF", // è®¾ç½®è¿æ¡çº¿çé¢è² |
| | | }, |
| | | data: [120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330], // é¢ç¨æ¬¡æ°æ°æ® |
| | | }, |
| | | { |
| | | name: "åæå", // ç³»ååç§° |
| | | type: "line", // å¾è¡¨ç±»å为æçº¿å¾ |
| | | stack: "Total", // å å åç§° |
| | | symbol: "none", |
| | | itemStyle: { |
| | | color: "#F7BA1E", // è®¾ç½®è¿æ¡çº¿çé¢è² |
| | | }, |
| | | data: [110, 125, 95, 128, 85, 220, 200, 175, 185, 225, 280, 320], // å½è¿æ¬¡æ°æ°æ® |
| | | }, |
| | | { |
| | | name: "æå", // ç³»ååç§° |
| | | type: "line", // å¾è¡¨ç±»å为æçº¿å¾ |
| | | stack: "Total", // å å åç§° |
| | | symbol: "none", |
| | | itemStyle: { |
| | | color: "#14C9C9", // è®¾ç½®è¿æ¡çº¿çé¢è² |
| | | }, |
| | | data: [110, 125, 95, 128, 85, 220, 200, 175, 185, 225, 280, 320], // å½è¿æ¬¡æ°æ°æ® |
| | | }, |
| | | ], |
| | | }; |
| | | // å°é
ç½®åºç¨å°å¾è¡¨ |
| | | usageChart.setOption(option); |
| | | } |
| | | }; |
| | | |
| | | const handleSizeChange = (val) => { |
| | | pagination.pageSize = val |
| | | // éæ°å è½½æ°æ® |
| | | } |
| | | // åå§åè´¨æ£åæ ¼çå¾è¡¨ |
| | | const initQualityChart = (chartRef, color) => { |
| | | if (chartRef.value) { |
| | | const chart = echarts.init(chartRef.value); |
| | | const option = { |
| | | series: [ |
| | | { |
| | | type: "pie", |
| | | radius: ["45%", "90%"], |
| | | itemStyle: { |
| | | borderColor: "#f5f5f5", |
| | | // borderWidth: 2, |
| | | }, |
| | | labelLine: { |
| | | show: false, |
| | | }, |
| | | data: [ |
| | | { value: 0.8, itemStyle: { color: color } }, |
| | | { value: 0.2, itemStyle: { color: "#f5f5f5" } }, |
| | | ], |
| | | }, |
| | | ], |
| | | }; |
| | | chart.setOption(option); |
| | | return chart; |
| | | } |
| | | return null; |
| | | }; |
| | | |
| | | const handleCurrentChange = (val) => { |
| | | pagination.currentPage = val |
| | | // éæ°å è½½æ°æ® |
| | | } |
| | | // åå§åææè´¨æ£åæ ¼çå¾è¡¨ |
| | | const initAllQualityCharts = () => { |
| | | materialCompletionChartInstance = initQualityChart( |
| | | materialCompletionChart, |
| | | "#1890ff" |
| | | ); |
| | | materialQualityChartInstance = initQualityChart( |
| | | materialQualityChart, |
| | | "#52c41a" |
| | | ); |
| | | semiCompletionChartInstance = initQualityChart( |
| | | semiCompletionChart, |
| | | "#1890ff" |
| | | ); |
| | | semiQualityChartInstance = initQualityChart(semiQualityChart, "#52c41a"); |
| | | finalCompletionChartInstance = initQualityChart( |
| | | finalCompletionChart, |
| | | "#1890ff" |
| | | ); |
| | | finalQualityChartInstance = initQualityChart(finalQualityChart, "#722ed1"); |
| | | }; |
| | | |
| | | const getStatusType = (status) => { |
| | | const statusMap = { |
| | | '已宿': 'success', |
| | | 'æ£æµä¸': 'warning', |
| | | 'å¾
æ£æµ': 'info', |
| | | 'å·²æå': 'danger', |
| | | '使ç¨ä¸': 'primary', |
| | | '空é²': 'info' |
| | | } |
| | | return statusMap[status] || 'info' |
| | | } |
| | | // äºä»¶å¤ç彿° |
| | | const handleFilterChange = () => { |
| | | ElMessage.success("çéæ¡ä»¶å·²æ´æ°"); |
| | | // è¿éå¯ä»¥æ ¹æ®ç鿡件鿰å è½½æ°æ® |
| | | }; |
| | | |
| | | const getProgressStatus = (progress) => { |
| | | if (progress === 100) return 'success' |
| | | if (progress >= 80) return 'warning' |
| | | if (progress >= 50) return '' |
| | | return 'exception' |
| | | } |
| | | const resetFilter = () => { |
| | | filterForm.dateRange = []; |
| | | filterForm.reportType = "sample"; |
| | | ElMessage.info("ç鿡件已éç½®"); |
| | | }; |
| | | |
| | | const viewDetail = (row) => { |
| | | ElMessage.info(`æ¥ç详æ
: ${row.name}`) |
| | | } |
| | | const exportReport = () => { |
| | | ElMessage.success("æ¥è¡¨å¯¼åºåè½å¼åä¸..."); |
| | | }; |
| | | |
| | | const editItem = (row) => { |
| | | ElMessage.info(`ç¼è¾é¡¹ç®: ${row.name}`) |
| | | } |
| | | const refreshSampleChart = () => { |
| | | initSampleChart(); |
| | | ElMessage.success("æ ·åè¿åº¦å¾è¡¨å·²å·æ°"); |
| | | }; |
| | | |
| | | // çå½å¨æ |
| | | onMounted(() => { |
| | | initData() |
| | | nextTick(() => { |
| | | initSampleChart() |
| | | initEquipmentChart() |
| | | initInspectionChart() |
| | | initUsageChart() |
| | | }) |
| | | |
| | | // çå¬çªå£å¤§å°ååï¼éæ°è°æ´å¾è¡¨å¤§å° |
| | | window.addEventListener('resize', () => { |
| | | sampleChart?.resize() |
| | | equipmentChart?.resize() |
| | | inspectionChart?.resize() |
| | | usageChart?.resize() |
| | | }) |
| | | }) |
| | | const refreshEquipmentChart = () => { |
| | | initEquipmentChart(); |
| | | ElMessage.success("设å¤ä½¿ç¨å¾è¡¨å·²å·æ°"); |
| | | }; |
| | | |
| | | const refreshInspectionChart = () => { |
| | | initInspectionChart(); |
| | | ElMessage.success("æ£æµé¡¹ç®å¾è¡¨å·²å·æ°"); |
| | | }; |
| | | |
| | | const refreshUsageChart = () => { |
| | | initUsageChart(); |
| | | ElMessage.success("é¢ç¨è®°å½å¾è¡¨å·²å·æ°"); |
| | | }; |
| | | |
| | | const refreshTable = () => { |
| | | tableLoading.value = true; |
| | | setTimeout(() => { |
| | | tableLoading.value = false; |
| | | ElMessage.success("è¡¨æ ¼æ°æ®å·²å·æ°"); |
| | | }, 1000); |
| | | }; |
| | | |
| | | const exportTable = () => { |
| | | ElMessage.success("è¡¨æ ¼å¯¼åºåè½å¼åä¸..."); |
| | | }; |
| | | |
| | | const handleSizeChange = val => { |
| | | pagination.pageSize = val; |
| | | // éæ°å è½½æ°æ® |
| | | }; |
| | | |
| | | const handleCurrentChange = val => { |
| | | pagination.currentPage = val; |
| | | // éæ°å è½½æ°æ® |
| | | }; |
| | | |
| | | const getStatusType = status => { |
| | | const statusMap = { |
| | | 已宿: "success", |
| | | æ£æµä¸: "warning", |
| | | å¾
æ£æµ: "info", |
| | | å·²æå: "danger", |
| | | 使ç¨ä¸: "primary", |
| | | 空é²: "info", |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | }; |
| | | |
| | | const getProgressStatus = progress => { |
| | | if (progress === 100) return "success"; |
| | | if (progress >= 80) return "warning"; |
| | | if (progress >= 50) return ""; |
| | | return "exception"; |
| | | }; |
| | | |
| | | const viewDetail = row => { |
| | | ElMessage.info(`æ¥ç详æ
: ${row.name}`); |
| | | }; |
| | | |
| | | const editItem = row => { |
| | | ElMessage.info(`ç¼è¾é¡¹ç®: ${row.name}`); |
| | | }; |
| | | |
| | | // çå½å¨æ |
| | | onMounted(() => { |
| | | initData(); |
| | | nextTick(() => { |
| | | initSampleChart(); |
| | | initEquipmentChart(); |
| | | initInspectionChart(); |
| | | initUsageChart(); |
| | | initAllQualityCharts(); |
| | | }); |
| | | // çå¬çªå£å¤§å°ååï¼éæ°è°æ´å¾è¡¨å¤§å° |
| | | window.addEventListener("resize", () => { |
| | | sampleChart?.resize(); |
| | | equipmentChart?.resize(); |
| | | inspectionChart?.resize(); |
| | | usageChart?.resize(); |
| | | |
| | | // è°æ´è´¨æ£åæ ¼çå¾è¡¨å¤§å° |
| | | materialCompletionChartInstance?.resize(); |
| | | materialQualityChartInstance?.resize(); |
| | | semiCompletionChartInstance?.resize(); |
| | | semiQualityChartInstance?.resize(); |
| | | finalCompletionChartInstance?.resize(); |
| | | finalQualityChartInstance?.resize(); |
| | | }); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .report-management { |
| | | padding: 20px; |
| | | background-color: #f5f5f5; |
| | | min-height: 100vh; |
| | | } |
| | | .report-management { |
| | | padding: 20px; |
| | | background-color: #f5f5f5; |
| | | min-height: 100vh; |
| | | /* height: 87vh; |
| | | overflow: hidden; */ |
| | | } |
| | | |
| | | .page-header { |
| | | margin-bottom: 20px; |
| | | text-align: center; |
| | | } |
| | | .page-header { |
| | | margin-bottom: 20px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .page-header h2 { |
| | | color: #303133; |
| | | margin-bottom: 8px; |
| | | font-size: 24px; |
| | | font-weight: 600; |
| | | } |
| | | .page-header h2 { |
| | | color: #303133; |
| | | margin-bottom: 8px; |
| | | font-size: 24px; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .page-header p { |
| | | color: #909399; |
| | | font-size: 14px; |
| | | margin: 0; |
| | | } |
| | | .page-header p { |
| | | color: #909399; |
| | | font-size: 14px; |
| | | margin: 0; |
| | | } |
| | | |
| | | .filter-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | .filter-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .statistics-cards { |
| | | margin-bottom: 20px; |
| | | } |
| | | .statistics-cards { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .stat-card { |
| | | height: 120px; |
| | | } |
| | | .stat-card { |
| | | height: 120px; |
| | | } |
| | | |
| | | .stat-content { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | } |
| | | .stat-content { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | .stat-icon { |
| | | width: 60px; |
| | | height: 60px; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-right: 20px; |
| | | font-size: 24px; |
| | | color: white; |
| | | } |
| | | .stat-icon { |
| | | width: 60px; |
| | | height: 60px; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-right: 20px; |
| | | font-size: 24px; |
| | | color: white; |
| | | } |
| | | |
| | | .stat-card:nth-child(1) .stat-icon { |
| | | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| | | } |
| | | .stat-card:nth-child(1) .stat-icon { |
| | | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| | | } |
| | | |
| | | .stat-card:nth-child(2) .stat-icon { |
| | | background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); |
| | | } |
| | | .stat-card:nth-child(2) .stat-icon { |
| | | background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); |
| | | } |
| | | |
| | | .stat-card:nth-child(3) .stat-icon { |
| | | background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); |
| | | } |
| | | .stat-card:nth-child(3) .stat-icon { |
| | | background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); |
| | | } |
| | | |
| | | .stat-card:nth-child(4) .stat-icon { |
| | | background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); |
| | | } |
| | | .stat-card:nth-child(4) .stat-icon { |
| | | background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); |
| | | } |
| | | |
| | | .stat-info { |
| | | flex: 1; |
| | | } |
| | | .stat-info { |
| | | flex: 1; |
| | | } |
| | | |
| | | .stat-number { |
| | | font-size: 28px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | margin-bottom: 8px; |
| | | } |
| | | .stat-number { |
| | | font-size: 28px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .stat-label { |
| | | font-size: 14px; |
| | | color: #909399; |
| | | } |
| | | .stat-label { |
| | | font-size: 14px; |
| | | color: #909399; |
| | | } |
| | | |
| | | .charts-container { |
| | | margin-bottom: 20px; |
| | | } |
| | | .charts-container { |
| | | /* margin-bottom: 20px; */ |
| | | position: relative; |
| | | } |
| | | |
| | | .chart-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | .chart-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | .container-line-right-bottom { |
| | | height: 20%; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | align-items: center; |
| | | /* background-color: #5b3f3f; */ |
| | | } |
| | | .card-header { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | font-family: Source Han Sans, Source Han Sans; |
| | | font-weight: 700; |
| | | font-size: 18px; |
| | | color: #000000; |
| | | /* line-height: 27px; */ |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | .chart-title-line { |
| | | width: 6px; |
| | | height: 22px; |
| | | background-color: #161a9a; |
| | | margin-right: 16px; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .card-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | .chart-container { |
| | | height: 250px; |
| | | width: 100%; |
| | | } |
| | | .chart-container-line { |
| | | height: 250px; |
| | | width: 100%; |
| | | display: flex; |
| | | position: relative; |
| | | } |
| | | |
| | | .chart-container { |
| | | height: 300px; |
| | | width: 100%; |
| | | } |
| | | /* Tab 鿩卿 ·å¼ */ |
| | | .tab-selector { |
| | | position: absolute; |
| | | top: 20px; |
| | | right: 40px; |
| | | display: flex; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .table-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | .tab-item { |
| | | padding: 4px 12px; |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | color: #606266; |
| | | background-color: #fff; |
| | | border-right: 1px solid #dcdfe6; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .pagination-container { |
| | | margin-top: 20px; |
| | | text-align: right; |
| | | } |
| | | .tab-item:last-child { |
| | | border-right: none; |
| | | } |
| | | |
| | | :deep(.el-card__header) { |
| | | padding: 15px 20px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | background-color: #fafafa; |
| | | } |
| | | .tab-item:hover { |
| | | color: #409eff; |
| | | } |
| | | |
| | | :deep(.el-card__body) { |
| | | padding: 20px; |
| | | } |
| | | .tab-item.active { |
| | | color: #fff; |
| | | background-color: #409eff; |
| | | } |
| | | .container-line-left { |
| | | height: 100%; |
| | | width: 66%; |
| | | } |
| | | .container-line-right { |
| | | height: 100%; |
| | | width: 34%; |
| | | } |
| | | .container-line2-left { |
| | | height: 100%; |
| | | width: 50%; |
| | | } |
| | | .info-box { |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | height: 100%; |
| | | background-color: #f7f8fa; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | } |
| | | .info-box-header { |
| | | width: 100%; |
| | | margin-left: 20px; |
| | | color: #1d2129; |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | :deep(.el-table) { |
| | | margin-bottom: 20px; |
| | | } |
| | | .info-line { |
| | | width: 100%; |
| | | display: flex; |
| | | padding-left: 20px; |
| | | align-items: center; |
| | | } |
| | | .info-icon { |
| | | width: 7px; |
| | | height: 7px; |
| | | border-radius: 50%; |
| | | margin-right: 8px; |
| | | } |
| | | .info-line-title { |
| | | font-size: 12px; |
| | | color: #4e5969; |
| | | flex: 1; |
| | | } |
| | | .info-line-value1 { |
| | | font-size: 12px; |
| | | color: #3d3d3d; |
| | | color: #1d2129; |
| | | font-weight: 500; |
| | | margin-right: 15%; |
| | | } |
| | | .info-line-value2 { |
| | | font-size: 12px; |
| | | color: #3d3d3d; |
| | | color: #1d2129; |
| | | font-weight: 500; |
| | | margin-right: 10%; |
| | | } |
| | | .top-container { |
| | | height: 130px; |
| | | width: 100%; |
| | | display: flex; |
| | | } |
| | | .typeNum { |
| | | height: 100%; |
| | | width: 33.33%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .typeNum-left { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .typeNum-left-text { |
| | | font-size: 12px; |
| | | color: #3491fa; |
| | | font-weight: 500; |
| | | margin-top: 5px; |
| | | } |
| | | .table-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | .typeNum-center { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-left: 10px; |
| | | } |
| | | .typeNum-leftLine { |
| | | color: #3491fa; |
| | | font-size: 12px; |
| | | } |
| | | .typeNum-rightLine { |
| | | border-top: 1px solid #3491fa; |
| | | border-left: 1px solid #3491fa; |
| | | border-bottom: 1px solid #3491fa; |
| | | height: 80px; |
| | | width: 8px; |
| | | } |
| | | .typeNum-leftLine2 { |
| | | color: #5eb334; |
| | | font-size: 12px; |
| | | } |
| | | .typeNum-rightLine2 { |
| | | border-top: 1px solid #3491fa; |
| | | border-left: 1px solid #5eb334; |
| | | border-bottom: 1px solid #5eb334; |
| | | height: 80px; |
| | | width: 8px; |
| | | } |
| | | .typeNum-leftLine3 { |
| | | color: #8000ff; |
| | | font-size: 12px; |
| | | } |
| | | .typeNum-rightLine3 { |
| | | border-top: 1px solid #8000ff; |
| | | border-left: 1px solid #8000ff; |
| | | border-bottom: 1px solid #8000ff; |
| | | height: 80px; |
| | | width: 8px; |
| | | } |
| | | .typeNum-right { |
| | | margin-left: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 90%; |
| | | justify-content: space-between; |
| | | } |
| | | .typeNum-right-top-name { |
| | | font-weight: 400; |
| | | font-size: 12px; |
| | | color: #3d3d3d; |
| | | } |
| | | .typeNum-right-top-text { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | margin-top: 5px; |
| | | } |
| | | .unit { |
| | | font-size: 12px; |
| | | color: #3d3d3d; |
| | | } |
| | | .inspection-chart-box { |
| | | height: 50px; |
| | | width: 30%; |
| | | background-color: #f7f8fa; |
| | | border-radius: 8px; |
| | | padding-left: 15px; |
| | | } |
| | | .chart-box-title { |
| | | font-size: 12px; |
| | | color: #4e5969; |
| | | margin-top: 5px; |
| | | } |
| | | .unit { |
| | | font-size: 12px; |
| | | color: #3d3d3d; |
| | | } |
| | | .chart-box-num { |
| | | font-size: 18px; |
| | | color: #000; |
| | | margin-top: 5px; |
| | | font-weight: 500; |
| | | } |
| | | /* è´¨æ£åæ ¼çå¡çæ ·å¼ */ |
| | | .top-containeråæ ¼ç { |
| | | height: 130px; |
| | | width: 100%; |
| | | display: flex; |
| | | gap: 15px; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | .flex-center { |
| | | justify-content: space-evenly; |
| | | } |
| | | .quality-card { |
| | | /* flex: 1; */ |
| | | width: 32%; |
| | | /* height: 100px; */ |
| | | border-radius: 8px; |
| | | padding: 12px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | :deep(.el-progress) { |
| | | margin: 0; |
| | | } |
| | | .blue-card { |
| | | background-color: #e6f7ff; |
| | | } |
| | | |
| | | :deep(.el-tag) { |
| | | margin: 0; |
| | | } |
| | | .green-card { |
| | | background-color: #f6ffed; |
| | | color: #000000; |
| | | } |
| | | |
| | | .purple-card { |
| | | background-color: #f9f0ff; |
| | | } |
| | | |
| | | .quality-card-title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .quality-item-tip { |
| | | font-size: 12px; |
| | | color: #666666; |
| | | margin-bottom: 3px; |
| | | } |
| | | .blue-label { |
| | | color: #1890ff; |
| | | } |
| | | .green-label { |
| | | color: #52c41a; |
| | | } |
| | | |
| | | .quality-card-title { |
| | | color: #000; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .quality-card-content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | flex: 1; |
| | | } |
| | | |
| | | .quality-item { |
| | | display: flex; |
| | | /* flex-direction: column; */ |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-top: 5px; |
| | | flex: 1; |
| | | } |
| | | |
| | | .quality-item-label { |
| | | font-size: 12px; |
| | | /* color: #666; */ |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .quality-item-value { |
| | | font-size: 20px; |
| | | font-weight: 500; |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .quality-item-chart { |
| | | width: 60px; |
| | | height: 60px; |
| | | margin-left: 10px; |
| | | } |
| | | /* .flex-center { |
| | | justify-content: space-evenly; |
| | | } */ |
| | | |
| | | .blue-chart { |
| | | /* background-color: rgba(24, 144, 255, 0.1); */ |
| | | } |
| | | |
| | | .green-chart { |
| | | /* background-color: rgba(82, 196, 26, 0.1); */ |
| | | } |
| | | |
| | | .purple-chart { |
| | | /* background-color: rgba(114, 46, 209, 0.1); */ |
| | | } |
| | | |
| | | .chart-ring { |
| | | width: 60px; |
| | | height: 60px; |
| | | border-radius: 50%; |
| | | border: 15px solid transparent; |
| | | position: relative; |
| | | } |
| | | |
| | | .blue-chart .chart-ring { |
| | | border-top-color: #1890ff; |
| | | border-right-color: #1890ff; |
| | | border-bottom-color: #1890ff; |
| | | transform: rotate(45deg); |
| | | } |
| | | |
| | | .green-chart .chart-ring { |
| | | border-top-color: #52c41a; |
| | | border-right-color: #52c41a; |
| | | border-bottom-color: #52c41a; |
| | | transform: rotate(45deg); |
| | | } |
| | | |
| | | .purple-chart .chart-ring { |
| | | border-top-color: #722ed1; |
| | | border-right-color: #722ed1; |
| | | border-bottom-color: #722ed1; |
| | | transform: rotate(45deg); |
| | | } |
| | | |
| | | .pagination-container { |
| | | margin-top: 20px; |
| | | text-align: right; |
| | | } |
| | | .yearchange { |
| | | position: absolute; |
| | | right: 40px; |
| | | top: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | /* width: 60px; */ |
| | | } |
| | | |
| | | :deep(.el-card__header) { |
| | | padding: 15px 20px; |
| | | border-bottom: 1px solid #ffffff; |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | :deep(.el-card__body) { |
| | | padding: 20px; |
| | | } |
| | | |
| | | :deep(.el-table) { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | :deep(.el-progress) { |
| | | margin: 0; |
| | | } |
| | | |
| | | :deep(.el-tag) { |
| | | margin: 0; |
| | | } |
| | | :deep(.el-input__prefix) { |
| | | display: none !important; |
| | | } |
| | | </style> |