| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092 |
- <template>
- <div class="index5-container">
- <!-- 右侧内容,根据showRankingTable状态动态调整宽度 -->
- <div class="right-content" :style="{ width: showRankingTable ? '70%' : '100%' }">
- <!-- 第一行:4个图标,每个占据25%宽度 -->
- <div class="icons-row">
- <!-- 修改我的待办卡片的布局和角标位置 -->
- <el-card class="floating-card icon-item" @click="toRoute(1)">
- <div class="todo-content">
- <div class="icon-wrapper">
- <div class="icon-circle bg-color-blue">
- <el-icon class="fa fa-pencil text-primary blue-color"></el-icon>
- <!-- 角标位置调整到卡片右上角 -->
- <div v-if="homePageData.todoNum>0" class="badge">{{ homePageData.todoNum }}</div>
- </div>
- </div>
- <div class="icon-label">我的待办</div>
- </div>
- </el-card>
- <!-- 修改我处理的卡片的布局 -->
- <el-card class="floating-card icon-item" @click="toRoute(3)">
- <div class="todo-content">
- <div class="icon-wrapper">
- <div class="icon-circle bg-color-red">
- <el-icon class="fa fa-check text-danger"></el-icon>
- </div>
- </div>
- <div class="icon-label">我处理的</div>
- </div>
- </el-card>
- <el-card class="floating-card icon-item">
- <div class="todo-content">
- <div class="icon-wrapper">
- <div class="icon-circle bg-color-green">
- <el-icon class="fa fa-wrench green-color"></el-icon>
- </div>
- </div>
- <div>
- <div class="card-header">
- <span class="card-title">维保工单总数</span>
- </div>
- <div class="card-content">
- <div class="data-value green-color">{{ homePageData.workOrderNum }}</div>
- </div>
- <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.workOrderJsy) }">
- <i v-if="homePageData.workOrderJsy > 0">+</i>
- {{ homePageData.workOrderJsy }}% 较上月
- </div> -->
- </div>
- </div>
- </el-card>
- <el-card class="floating-card icon-item">
- <div class="todo-content">
- <div class="icon-wrapper">
- <div class="icon-circle bg-color-yellow">
- <el-icon class="fa fa-cogs deep-yellow-color"></el-icon>
- </div>
- </div>
- <div>
- <div class="card-header">
- <span class="card-title">维修工单总数</span>
- </div>
- <div class="card-content">
- <div class="data-value deep-yellow-color">{{ homePageData.repairOrderNum }}</div>
- </div>
- <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.repairOrderJsy) }">
- <i v-if="homePageData.repairOrderJsy > 0">+</i>
- {{ homePageData.repairOrderJsy }}% 较上月
- </div> -->
- </div>
- </div>
- </el-card>
- </div>
- <!-- 第二行:3个表单,工时和工分卡片各占据20%宽度,个人排名卡片占据60%宽度 -->
- <div class="forms-row">
- <el-card class="floating-card form-item work-hour-card">
- <div class="todo-content">
- <div class="icon-wrapper">
- <div class="icon-circle bg-color-purple">
- <el-icon class="fa fa-clock-o purple-color"></el-icon>
- </div>
- </div>
- <div>
- <div class="card-header">
- <span class="card-title">本月工时(小时)</span>
- </div>
- <div class="card-content">
- <div class="data-value purple-color">{{ formatWorkValue(homePageData.wbgs) }}</div>
- </div>
- <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.wbjsy) }">
- <i v-if="homePageData.wbjsy > 0">+</i>
- {{ homePageData.wbjsy }}% 较上月
- </div> -->
- </div>
- </div>
- </el-card>
- <el-card class="floating-card form-item work-score-card">
- <div class="todo-content">
- <div class="icon-wrapper">
- <div class="icon-circle bg-color-orange">
- <el-icon class="fa fa-star orange-color"></el-icon>
- </div>
- </div>
- <div>
- <div class="card-header">
- <span class="card-title">本月工分</span>
- </div>
- <div class="card-content">
- <div class="data-value orange-color">{{ formatWorkValue(homePageData.score) }}</div>
- </div>
- <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.gfjsy) }">
- <i v-if="homePageData.gfjsy > 0">+</i>
- {{ homePageData.gfjsy }}% 较上月
- </div> -->
- </div>
- </div>
- </el-card>
- <div class="form-item ranking-card">
- <el-card class="data-card floating-card">
- <div class="card-header">
- <span class="sort-title">个人排名</span>
- </div>
- <div class="card-content">
- <!-- 添加个人排名内容 -->
- <div class="ranking-container">
- <!-- 场站排名 -->
- <div class="ranking-info horizontal-ranking">
- <div class="ranking-section">
- <!-- 第一行:东山风电场 -->
- <div class="ranking-row" @click="showRankingList('dept')">{{ homePageData.deptName }}</div>
- <!-- 第二行:3/15 和 第3名 -->
- <div class="ranking-row" @click="showRankingList('dept')">
- <div class="ranking-item">
- <div class="circle bg-light-blue">
- <span class="circle-text blue-bold">{{ homePageData.deptSort+'/'+homePageData.scoreDept.length }}</span>
- </div>
- <span class="black-bold" style="margin-right: 5px;">第{{ homePageData.deptSort }}名</span>
- <i
- v-if="homePageData.deptSort < 4"
- class="fa fa-trophy"
- :style="{ color: homePageData.deptSort === 1 ? '#FFD700' : homePageData.deptSort === 2 ? '#C0C0C0' : '#CD7F32' , 'font-size': '20px'} "
- ></i>
- </div>
- </div>
- </div>
- </div>
- <!-- 中心排名 -->
- <div class="ranking-info horizontal-ranking">
- <div class="ranking-section">
- <!-- 第三行:陆上设备维保中心 -->
- <div class="ranking-row" @click="showRankingList('center')">{{ homePageData.center }}</div>
- <!-- 第四行:12/86 和 第12名 -->
- <div class="ranking-row" @click="showRankingList('center')">
- <div class="ranking-item">
- <div class="circle bg-light-blue">
- <span class="circle-text blue-bold">{{ homePageData.centerSort+'/'+homePageData.scoreCenter.length }}</span>
- </div>
- <span class="black-bold" style="margin-right: 5px;">第{{ homePageData.centerSort }}名</span>
- <i
- v-if="homePageData.centerSort < 4"
- class="fa fa-trophy"
- :style="{ color: homePageData.centerSort === 1 ? '#FFD700' : homePageData.centerSort === 2 ? '#C0C0C0' : '#CD7F32' , 'font-size': '20px'}"
- ></i>
- </div>
- </div>
- </div>
- </div>
- <!-- 公司排名 -->
- <div class="ranking-info horizontal-ranking">
- <div class="ranking-section">
- <!-- 第五行:公司 -->
- <div class="ranking-row" @click="showRankingList('company')">{{ homePageData.companyName }}</div>
- <!-- 第六行:45/320 和 第45名 -->
- <div class="ranking-row" @click="showRankingList('company')">
- <div class="ranking-item">
- <div class="circle bg-light-blue">
- <span class="circle-text blue-bold">{{ homePageData.companySort+'/'+homePageData.scoreCompany.length }}</span>
- </div>
- <span class="black-bold" style="margin-right: 5px;">第{{ homePageData.companySort }}名</span>
- <i
- v-if="homePageData.companySort < 4"
- class="fa fa-trophy"
- :style="{ color: homePageData.companySort === 1 ? '#FFD700' : homePageData.companySort === 2 ? '#C0C0C0' : '#CD7F32' , 'font-size': '20px'}"
- ></i>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- </div> <!-- 第三行:工单数据列表 -->
- <div class="list-row">
- <el-card class="list-card floating-card">
- <template #header>
- <div class="list-header">
- <i class="fa fa-table blue-color" style="margin-right: 10px;"></i>
- <span>工分明细列表</span>
- <div class="header-buttons">
- <el-input
- v-model="queryParams.orderCode"
- placeholder="搜索工单编码..."
- @keyup.enter="handleQuery"
- style="width: 200px; margin-right: 10px;"
- prefix-icon="search"
- clearable
- />
- </div>
- </div>
- </template>
- <el-table :data="orderPersonList" style="width: 100%">
- <el-table-column prop="orderCode" label="工单编码" header-align="center" align="center"></el-table-column>
- <el-table-column prop="center" label="维保中心" header-align="center" align="center"></el-table-column>
- <el-table-column prop="parent" label="所属场站" header-align="center" align="center"></el-table-column>
- <el-table-column prop="pcs" label="作业场站" header-align="center" align="center"></el-table-column>
- <el-table-column prop="orderType" label="工单类型" header-align="center" align="center"></el-table-column>
- <el-table-column prop="finishDate" label="完成日期" header-align="center" align="center"></el-table-column>
- <el-table-column prop="score" label="得分" header-align="center" align="center" :formatter="formatScore"></el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- v-model:page="queryParams.pageNum"
- v-model:limit="queryParams.pageSize"
- @pagination="applyFilter"
- />
- </el-card>
- </div>
- </div>
- <div class="sort-form" v-if="showRankingTable">
- <!-- 新增的排名列表卡片 -->
- <div style="width: 100%;height: 100%;">
- <el-card class="floating-card ranking-table-card">
- <div class="card-content">
- <el-table :data="currentRankingData" style="width: 100%;" height="800">
- <el-table-column prop="rank" label="排名" width="80" align="center"></el-table-column>
- <el-table-column prop="name" label="名字" width="120" align="center">
- <template #default="scope">
- <span :style="{ color: scope.row.name === homePageData.nickName ? 'red' : '' }">{{ scope.row.name }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="station" label="场站" align="center"></el-table-column>
- <el-table-column prop="finalScore" label="工分" width="80" align="center"></el-table-column>
- </el-table>
- </div>
- </el-card>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { ref, reactive } from 'vue';
- import { selectHomePageData } from '@/api/gxt/repairOrder';
- import { listMyTodo } from '@/api/gxt/orderMine';
- import { listGxtOrderPerson } from '@/api/gxt/gxtOrderPerson';
- import { encryptParams } from '@/utils/encrypt';
- import { getConfigKey } from '@/api/system/config';
- export default {
- name: 'Index5',
- data() {
- return {
- // 添加时间筛选相关数据
- selectedPeriod: '本月', // 选中的时间段(本月、上月、本季度)
- startDate: '', // 开始日期
- endDate: '', // 结束日期
- // 添加查询参数
- total: 0,
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- orderCode: null,
- },
- orderPersonList: [],
- // 添加首页统计数据
- homePageData: {
- workOrderNum: 120, // 维保工单总数
- workOrderJsy: 15, // 维保工单较上月增长百分比
- repairOrderNum: 85, // 维修工单总数
- repairOrderJsy: 8, // 维修工单较上月增长百分比
- wbgs: 168, // 本月工时
- wbjsy: 12, // 本月工时较上月增长百分比
- score: 92, // 本月工分
- gfjsy: 5, // 本月工分较上月增长百分比
- repairPending: 0,
- workPending: 0,
- pendingNum: 0,
- todoNum: 0, // 我的待办数量
- hasCenter: null,
- timeOutNum: 0,
- scoreCompany: [],
- companySort: null,
- scoreCenter: [],
- centerSort: null,
- scoreDept: [],
- deptSort: null,
- deptName: null,
- center: null,
- companyName: null,
- },
- // 新增的数据属性
- showRankingTable: false, // 控制排名列表卡片显示
- currentRankingType: '', // 当前显示的排名类型
- currentRankingData: [], // 当前显示的排名数据
- // 定时器
- timer: null
- }
- },
- created() {
- this.loadHomePageData(); // 首次加载首页统计数据
- this.applyFilter();
- // 设置定时器,每3秒执行一次loadHomePageData函数
- this.timer = setInterval(() => {
- this.loadHomePageData();
- }, 3000);
- },
- methods: {
- // 在组件销毁前清除定时器
- beforeDestroy() {
- if (this.timer) {
- clearInterval(this.timer);
- this.timer = null;
- }
- },
- // 新增的方法:显示排名列表
- showRankingList(type) {
- // 如果点击的是同一个排名类型,则隐藏列表卡片
- if (this.currentRankingType === type) {
- this.showRankingTable = false;
- this.currentRankingType = '';
- this.currentRankingData = [];
- } else {
- // 否则显示对应类型的排名列表
- this.currentRankingType = type;
- this.showRankingTable = true;
- // 根据类型设置数据并按finalScore排序实现RANK模式
- let rankingData = [];
- if (type === 'dept') {
- rankingData = [...this.homePageData.scoreDept];
- } else if (type === 'center') {
- rankingData = [...this.homePageData.scoreCenter];
- } else if (type === 'company') {
- rankingData = [...this.homePageData.scoreCompany];
- }
- // 按finalScore降序排序
- rankingData.sort((a, b) => (b.finalScore || 0) - (a.finalScore || 0));
- // 实现RANK模式排名
- const rankedData = [];
- rankingData.forEach((item, index) => {
- // 计算RANK排名
- let rank = index + 1;
- // 如果当前项的finalScore与前一项相同,则排名也相同
- if (index > 0 && item.finalScore === rankingData[index - 1].finalScore) {
- rank = rankedData[index - 1].rank;
- }
- rankedData.push({
- rank: rank,
- name: item.nickName,
- station: item.deptName,
- finalScore: item.finalScore || 0
- });
- });
- this.currentRankingData = rankedData;
- }
- },
- applyFilter() {
- // 获取工单人员列表数据
- listGxtOrderPerson(this.queryParams).then(response => {
- if (response.code === 200) {
- this.total = response.total;
- this.orderPersonList = response.rows;
- }
- });
- },
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.applyFilter();
- },
- formatScore(row, column, cellValue) {
- if (cellValue == null || cellValue === '') return '--'; // 处理空值
- return parseFloat(cellValue).toFixed(2); // 保留两位小数
- },
- // 格式化工时和工分显示,0显示为0,小数位超过两位时四舍五入
- formatWorkValue(value) {
- if (value == null || value === '') return '--'; // 处理空值
- const num = parseFloat(value);
- // 四舍五入保留两位小数
- const rounded = num.toFixed(2);
- // 去掉不必要的末尾0
- return parseFloat(rounded).toString();
- },
- // 加载首页统计数据
- loadHomePageData() {
- selectHomePageData().then(response => {
- if (response.code === 200) {
- this.homePageData.nickName = response.data.nickName;
- this.homePageData.workOrderNum = response.data.workOrderNum || 0;
- this.homePageData.workOrderJsy = response.data.workOrderJsy || 0;
- this.homePageData.repairOrderNum = response.data.repairOrderNum || 0;
- this.homePageData.repairOrderJsy = response.data.repairOrderJsy || 0;
- this.homePageData.wbgs = response.data.wbgs || 0;
- this.homePageData.wbjsy = response.data.wbjsy || 0;
- this.homePageData.score = response.data.score || 0;
- this.homePageData.gfjsy = response.data.gfjsy || 0;
- this.homePageData.repairPending = response.data.repairPending || 0;
- this.homePageData.workPending = 0;
- this.homePageData.pendingNum = this.homePageData.repairPending + this.homePageData.workPending;
- this.homePageData.hasCenter = response.data.hasCenter;
- this.homePageData.timeOutNum = response.data.timeOutNum;
- this.homePageData.scoreCompany = response.data.scoreCompany || [];
- this.homePageData.companySort = response.data.companySort || null;
- this.homePageData.scoreCenter = response.data.scoreCenter || [];
- this.homePageData.centerSort = response.data.centerSort || null;
- this.homePageData.scoreDept = response.data.scoreDept || [];
- this.homePageData.deptSort = response.data.deptSort || null;
- this.homePageData.deptName = null;
- this.homePageData.center = null;
- this.homePageData.companyName = null;
- if(response.data.scoreDept.length>0){
- this.homePageData.deptName = response.data.scoreDept[0].deptName;
- this.homePageData.center = response.data.scoreDept[0].center;
- this.homePageData.companyName = response.data.scoreDept[0].companyName;
- }
- }
- });
- // 获取我的待办数量
- listMyTodo({ pageNum: 1, pageSize: 1 }).then(response => {
- if (response.code === 200) {
- this.homePageData.todoNum = response.total || 0;
- }
- });
- },
- getTextColor(jsy) {
- if(jsy>0) {
- return '#22c55e';
- }else if(jsy<0) {
- return '#ef4444';
- }else{
- return 'gray';
- }
- },
- toRoute(num) {
- if(num==0) {
- // 获取系统配置中的超时时间参数
- getConfigKey("gxt.order.timeout").then(response => {
- let timeoutValue = 30; // 默认值
- if (response && response.msg) {
- timeoutValue = parseInt(response.msg) || 30;
- }
- // 加密参数并传递到目标路由页面
- const params = {
- timeOutNum: timeoutValue,
- workOrderStatus: 'assigned'
- };
- const encryptedParams = encryptParams(params);
- this.$router.push({
- path: "/workOrder/repairOrder",
- query: {
- data: encryptedParams
- }
- });
- }).catch(() => {
- // 如果获取配置失败,使用默认值
- const params = {
- timeOutNum: 30,
- workOrderStatus: 'assigned'
- };
- const encryptedParams = encryptParams(params);
- this.$router.push({
- path: "/workOrder/repairOrder",
- query: {
- data: encryptedParams
- }
- });
- });
- }else if(num==1) {
- this.$router.push("/mine/orderMyTodo");
- }else if (num==2) {
- this.$router.push("/mine/orderMyCreate");
- }else if (num==3) {
- this.$router.push("/mine/orderMyDone");
- }else{
- this.$router.push("/mine/orderMyRelate");
- }
- },
- }
- }
- </script>
- <style scoped>
- .index5-container {
- display: flex;
- padding: 20px;
- min-height: calc(100vh - 84px);
- position: relative;
- }
- .right-content {
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
- .right-content.full-width {
- width: 100%;
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
- .sort-form {
- width: 30%;
- height: 100%;
- box-sizing: border-box;
- margin-left: 10px;
- }
- .form-card {
- height: 100%;
- }
- .form-title {
- font-size: 18px;
- font-weight: bold;
- margin-bottom: 20px;
- text-align: center;
- }
- .form-buttons {
- display: flex;
- flex-direction: column;
- gap: 10px;
- margin-top: 20px;
- width: 100%;
- }
- .form-button {
- text-align: center;
- }
- .filter-button {
- color: white;
- border: none;
- width: 100%;
- margin-bottom: 10px;
- }
- .filter-button:hover {
- opacity: 0.9;
- transform: translateY(-2px);
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
- }
- .reset-button {
- background-color: #165dff;
- }
- .apply-button {
- background-color: #165dff;
- }
- /* 图标行样式 */
- .icons-row {
- display: flex;
- justify-content: space-between;
- }
- .icon-item {
- width: 24%;
- text-align: center;
- cursor: pointer;
- transition: all 0.3s ease;
- }
- .icon-item:hover {
- transform: scale(1);
- }
- .icon-wrapper {
- position: relative;
- }
- .icon-circle {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 0 auto 10px;
- font-size: 18px;
- position: relative;
- margin: 10px;
- }
- .icon-size {
- width: 18px;
- height: 18px;
- }
- .blue-color {
- color: #165dff;
- }
- .green-color {
- color: #00b42a;
- }
- .purple-color {
- color: #a855f7;
- }
- .deep-yellow-color {
- color: #c98701;
- }
- .orange-color {
- color: #f97316;
- }
- .bg-color-blue {
- background-color: #dbeafe;
- }
- .bg-color-yellow {
- background-color: #fef9c3;
- }
- .bg-color-red {
- background-color: #fee2e2;
- }
- .bg-color-green {
- background-color: #dcfce7;
- }
- .bg-color-orange {
- background-color: #ffedd5;
- }
- .bg-color-purple {
- background-color: #f3e8ff;
- }
- .icon-label {
- font-size: 14px;
- color: #606266;
- }
- .badge {
- position: absolute;
- top: -3px;
- right: -3px;
- background-color: #ff4d4f;
- color: white;
- border-radius: 50%;
- width: 20px;
- height: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 12px;
- font-weight: bold;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- z-index: 10;
- }
- /* 表单行样式 */
- .forms-row {
- display: flex;
- justify-content: space-between;
- }
- .form-item {
- width: 32.5%; /* 留一些间距 */
- }
- .work-hour-card {
- width: 24%;
- }
- .work-score-card {
- width: 24%;
- }
- .ranking-card {
- width: 49.3%;
- }
- .data-card {
- min-height: 120px;
- height: auto;
- }
- .card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 5px;
- }
- .card-title {
- font-size: 14px;
- }
- .sort-title {
- /* 字体大小:比内容大一号,视觉层级突出 */
- font-size: 18px;
- /* 字体粗细:加粗,强化标题属性 */
- font-weight: 600;
- /* 颜色:深色主色调,与内容浅灰色区分 */
- color: #2c3e50;
- /* 间距:底部留白,与内容拉开距离 */
- margin: 0 0 5px 0;
- /* 装饰:底部短横线,增强视觉区分 */
- /* padding-bottom: 8px; */
- /* border-bottom: 2px solid #3498db; */
- /* 行高:保证垂直居中,视觉舒适 */
- /* line-height: 1.4; */
- /* 可选:文字不换行,避免标题折行影响美观 */
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .card-icon {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 18px;
- }
- .card-content {
- text-align: left;
- display: flex;
- align-items: center;
- gap: 10px;
- }
- .data-value {
- font-size: 32px;
- font-weight: bold;
- margin-bottom: 5px;
- }
- .data-description {
- font-size: 13px;
- color: #909399;
- }
- /* 列表行样式 */
- .list-row {
- flex: 1;
- }
- .list-header {
- font-weight: bold;
- font-size: 18px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .header-buttons {
- display: flex;
- gap: 10px;
- margin-left: auto;
- }
- /* 表头加粗 */
- .el-table th {
- font-weight: bold !important;
- }
- /* 悬浮卡片通用样式 */
- .floating-card {
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
- transition: box-shadow 0.3s ease;
- }
- .floating-card:hover {
- box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
- }
- /* 时间筛选标题样式 */
- .time-filter-title {
- font-size: 16px;
- margin: 20px 0 10px 0;
- text-align: left;
- color: #303133;
- }
- /* 时间段按钮容器 */
- .period-buttons {
- display: flex;
- justify-content: space-between;
- margin-bottom: 15px;
- }
- /* 时间段按钮样式 */
- .period-button {
- flex: 1;
- padding: 5px;
- background-color: #f5f7fa;
- color: #606266;
- border: 1px solid #dcdfe6;
- }
- .todo-content {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- margin: 8px;
- gap: 10px;
- }
- /* 选中的时间段按钮样式 */
- .period-button.active {
- background-color: #165dff;
- color: white;
- border-color: #165dff;
- }
- /* 日期选择器容器 */
- .date-picker-container {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 15px;
- }
- /* 日期选择器 */
- .date-picker {
- flex: 1;
- }
- /* 日期分隔符 */
- .date-separator {
- margin: 0 3px;
- color: #606266;
- }
- /* 表单卡片调整 */
- .form-card {
- height: auto;
- }
- /* 维度筛选样式 */
- .filter-card {
- background: white;
- border-radius: 8px;
- }
- /* 修改复选框选中时的颜色 */
- .el-checkbox :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
- background-color: #165dff;
- border-color: #165dff;
- }
- .tree-select {
- margin-bottom: 0px;
- }
- .tree-header {
- display: flex;
- align-items: center;
- gap: 5px;
- padding: 3px 0;
- cursor: pointer;
- user-select: none;
- }
- .tree-content {
- max-height: 0;
- overflow: hidden;
- transition: max-height 0.3s ease-out;
- }
- .tree-content.show {
- max-height: 500px;
- transition: max-height 0.3s ease-in;
- }
- .checkbox-item {
- display: flex;
- align-items: center;
- cursor: pointer;
- }
- .checkbox-input {
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
- .rotate-90 {
- transform: rotate(-90deg);
- }
- .rotate-180 {
- transform: rotate(180deg);
- }
- .hidden {
- display: none;
- }
- .flex {
- display: flex;
- }
- .justify-between {
- justify-content: space-between;
- }
- .items-center {
- align-items: center;
- }
- .mb-4 {
- margin-bottom: 1rem;
- }
- .ml-2 {
- margin-left: 0.5rem;
- }
- .mt-1 {
- margin-top: 0.25rem;
- }
- .pl-2 {
- padding-left: 0.5rem;
- }
- .border-l-2 {
- border-left-width: 2px;
- }
- .border-neutral-200 {
- border-color: #e5e5e5;
- }
- .cursor-pointer {
- cursor: pointer;
- }
- .font-semibold {
- font-weight: 600;
- }
- .font-medium {
- font-weight: 100;
- }
- .text-lg {
- font-size: 1.125rem;
- }
- .text-neutral-700 {
- color: #404040;
- }
- .text-neutral-400 {
- color: #a3a3a3;
- }
- .transition-transform {
- transition: transform 0.3s ease;
- }
- .duration-300 {
- transition-duration: 300ms;
- }
- .flex-1 {
- flex: 1 1 0%;
- }
- /* 添加个人排名相关的样式 */
- .ranking-container {
- display: flex;
- width: 100%;
- justify-content: space-between;
- }
- .horizontal-ranking {
- flex: 1;
- width: 33%;
- padding: 0 5px;
- box-sizing: border-box;
- }
- .ranking-section {
- width: 100%;
- }
- .ranking-info {
- width: 100%;
- }
- .ranking-row {
- display: flex;
- align-items: center;
- width: 100%;
- margin-bottom: 8px;
- font-size: 14px;
- cursor: pointer; /* 添加指针样式表示可点击 */
- }
- .ranking-row:hover {
- background-color: #f5f7fa; /* 添加hover效果 */
- }
- .ranking-row:last-child {
- margin-bottom: 0;
- }
- .ranking-item {
- display: flex;
- align-items: center;
- }
- .circle {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 10px;
- }
- .bg-light-blue {
- background-color: #dbeafe;
- }
- .circle-text {
- font-size: 12px;
- }
- .blue-bold {
- color: #165dff;
- font-weight: bold;
- }
- .black-bold {
- color: #000;
- font-weight: bold;
- }
- /* 工时和工分卡片靠上对齐样式 */
- .top-aligned {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- }
- .top-aligned .card-header {
- align-self: stretch;
- }
- .top-aligned .card-content {
- align-self: stretch;
- justify-content: flex-start;
- }
- .top-aligned .data-description {
- align-self: stretch;
- }
- /* 新增的排名列表卡片样式 */
- .ranking-table-card {
- width: 100%;
- height: 100%;
- }
- </style>
|