index5.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. <template>
  2. <div class="index5-container">
  3. <!-- 右侧内容,根据showRankingTable状态动态调整宽度 -->
  4. <div class="right-content" :style="{ width: showRankingTable ? '70%' : '100%' }">
  5. <!-- 第一行:4个图标,每个占据25%宽度 -->
  6. <div class="icons-row">
  7. <!-- 修改我的待办卡片的布局和角标位置 -->
  8. <el-card class="floating-card icon-item" @click="toRoute(1)">
  9. <div class="todo-content">
  10. <div class="icon-wrapper">
  11. <div class="icon-circle bg-color-blue">
  12. <el-icon class="fa fa-pencil text-primary blue-color"></el-icon>
  13. <!-- 角标位置调整到卡片右上角 -->
  14. <div v-if="homePageData.todoNum>0" class="badge">{{ homePageData.todoNum }}</div>
  15. </div>
  16. </div>
  17. <div class="icon-label">我的待办</div>
  18. </div>
  19. </el-card>
  20. <!-- 修改我处理的卡片的布局 -->
  21. <el-card class="floating-card icon-item" @click="toRoute(3)">
  22. <div class="todo-content">
  23. <div class="icon-wrapper">
  24. <div class="icon-circle bg-color-red">
  25. <el-icon class="fa fa-check text-danger"></el-icon>
  26. </div>
  27. </div>
  28. <div class="icon-label">我处理的</div>
  29. </div>
  30. </el-card>
  31. <el-card class="floating-card icon-item">
  32. <div class="todo-content">
  33. <div class="icon-wrapper">
  34. <div class="icon-circle bg-color-green">
  35. <el-icon class="fa fa-wrench green-color"></el-icon>
  36. </div>
  37. </div>
  38. <div>
  39. <div class="card-header">
  40. <span class="card-title">维保工单总数</span>
  41. </div>
  42. <div class="card-content">
  43. <div class="data-value green-color">{{ homePageData.workOrderNum }}</div>
  44. </div>
  45. <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.workOrderJsy) }">
  46. <i v-if="homePageData.workOrderJsy > 0">+</i>
  47. {{ homePageData.workOrderJsy }}% 较上月
  48. </div> -->
  49. </div>
  50. </div>
  51. </el-card>
  52. <el-card class="floating-card icon-item">
  53. <div class="todo-content">
  54. <div class="icon-wrapper">
  55. <div class="icon-circle bg-color-yellow">
  56. <el-icon class="fa fa-cogs deep-yellow-color"></el-icon>
  57. </div>
  58. </div>
  59. <div>
  60. <div class="card-header">
  61. <span class="card-title">维修工单总数</span>
  62. </div>
  63. <div class="card-content">
  64. <div class="data-value deep-yellow-color">{{ homePageData.repairOrderNum }}</div>
  65. </div>
  66. <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.repairOrderJsy) }">
  67. <i v-if="homePageData.repairOrderJsy > 0">+</i>
  68. {{ homePageData.repairOrderJsy }}% 较上月
  69. </div> -->
  70. </div>
  71. </div>
  72. </el-card>
  73. </div>
  74. <!-- 第二行:3个表单,工时和工分卡片各占据20%宽度,个人排名卡片占据60%宽度 -->
  75. <div class="forms-row">
  76. <el-card class="floating-card form-item work-hour-card">
  77. <div class="todo-content">
  78. <div class="icon-wrapper">
  79. <div class="icon-circle bg-color-purple">
  80. <el-icon class="fa fa-clock-o purple-color"></el-icon>
  81. </div>
  82. </div>
  83. <div>
  84. <div class="card-header">
  85. <span class="card-title">本月工时(小时)</span>
  86. </div>
  87. <div class="card-content">
  88. <div class="data-value purple-color">{{ formatWorkValue(homePageData.wbgs) }}</div>
  89. </div>
  90. <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.wbjsy) }">
  91. <i v-if="homePageData.wbjsy > 0">+</i>
  92. {{ homePageData.wbjsy }}% 较上月
  93. </div> -->
  94. </div>
  95. </div>
  96. </el-card>
  97. <el-card class="floating-card form-item work-score-card">
  98. <div class="todo-content">
  99. <div class="icon-wrapper">
  100. <div class="icon-circle bg-color-orange">
  101. <el-icon class="fa fa-star orange-color"></el-icon>
  102. </div>
  103. </div>
  104. <div>
  105. <div class="card-header">
  106. <span class="card-title">本月工分</span>
  107. </div>
  108. <div class="card-content">
  109. <div class="data-value orange-color">{{ formatWorkValue(homePageData.score) }}</div>
  110. </div>
  111. <!-- <div class="data-description" :style="{ color: getTextColor(homePageData.gfjsy) }">
  112. <i v-if="homePageData.gfjsy > 0">+</i>
  113. {{ homePageData.gfjsy }}% 较上月
  114. </div> -->
  115. </div>
  116. </div>
  117. </el-card>
  118. <div class="form-item ranking-card">
  119. <el-card class="data-card floating-card">
  120. <div class="card-header">
  121. <span class="sort-title">个人排名</span>
  122. </div>
  123. <div class="card-content">
  124. <!-- 添加个人排名内容 -->
  125. <div class="ranking-container">
  126. <!-- 场站排名 -->
  127. <div class="ranking-info horizontal-ranking">
  128. <div class="ranking-section">
  129. <!-- 第一行:东山风电场 -->
  130. <div class="ranking-row" @click="showRankingList('dept')">{{ homePageData.deptName }}</div>
  131. <!-- 第二行:3/15 和 第3名 -->
  132. <div class="ranking-row" @click="showRankingList('dept')">
  133. <div class="ranking-item">
  134. <div class="circle bg-light-blue">
  135. <span class="circle-text blue-bold">{{ homePageData.deptSort+'/'+homePageData.scoreDept.length }}</span>
  136. </div>
  137. <span class="black-bold" style="margin-right: 5px;">第{{ homePageData.deptSort }}名</span>
  138. <i
  139. v-if="homePageData.deptSort < 4"
  140. class="fa fa-trophy"
  141. :style="{ color: homePageData.deptSort === 1 ? '#FFD700' : homePageData.deptSort === 2 ? '#C0C0C0' : '#CD7F32' , 'font-size': '20px'} "
  142. ></i>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <!-- 中心排名 -->
  148. <div class="ranking-info horizontal-ranking">
  149. <div class="ranking-section">
  150. <!-- 第三行:陆上设备维保中心 -->
  151. <div class="ranking-row" @click="showRankingList('center')">{{ homePageData.center }}</div>
  152. <!-- 第四行:12/86 和 第12名 -->
  153. <div class="ranking-row" @click="showRankingList('center')">
  154. <div class="ranking-item">
  155. <div class="circle bg-light-blue">
  156. <span class="circle-text blue-bold">{{ homePageData.centerSort+'/'+homePageData.scoreCenter.length }}</span>
  157. </div>
  158. <span class="black-bold" style="margin-right: 5px;">第{{ homePageData.centerSort }}名</span>
  159. <i
  160. v-if="homePageData.centerSort < 4"
  161. class="fa fa-trophy"
  162. :style="{ color: homePageData.centerSort === 1 ? '#FFD700' : homePageData.centerSort === 2 ? '#C0C0C0' : '#CD7F32' , 'font-size': '20px'}"
  163. ></i>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. <!-- 公司排名 -->
  169. <div class="ranking-info horizontal-ranking">
  170. <div class="ranking-section">
  171. <!-- 第五行:公司 -->
  172. <div class="ranking-row" @click="showRankingList('company')">{{ homePageData.companyName }}</div>
  173. <!-- 第六行:45/320 和 第45名 -->
  174. <div class="ranking-row" @click="showRankingList('company')">
  175. <div class="ranking-item">
  176. <div class="circle bg-light-blue">
  177. <span class="circle-text blue-bold">{{ homePageData.companySort+'/'+homePageData.scoreCompany.length }}</span>
  178. </div>
  179. <span class="black-bold" style="margin-right: 5px;">第{{ homePageData.companySort }}名</span>
  180. <i
  181. v-if="homePageData.companySort < 4"
  182. class="fa fa-trophy"
  183. :style="{ color: homePageData.companySort === 1 ? '#FFD700' : homePageData.companySort === 2 ? '#C0C0C0' : '#CD7F32' , 'font-size': '20px'}"
  184. ></i>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. </el-card>
  192. </div>
  193. </div> <!-- 第三行:工单数据列表 -->
  194. <div class="list-row">
  195. <el-card class="list-card floating-card">
  196. <template #header>
  197. <div class="list-header">
  198. <i class="fa fa-table blue-color" style="margin-right: 10px;"></i>
  199. <span>工分明细列表</span>
  200. <div class="header-buttons">
  201. <el-input
  202. v-model="queryParams.orderCode"
  203. placeholder="搜索工单编码..."
  204. @keyup.enter="handleQuery"
  205. style="width: 200px; margin-right: 10px;"
  206. prefix-icon="search"
  207. clearable
  208. />
  209. </div>
  210. </div>
  211. </template>
  212. <el-table :data="orderPersonList" style="width: 100%">
  213. <el-table-column prop="orderCode" label="工单编码" header-align="center" align="center"></el-table-column>
  214. <el-table-column prop="center" label="维保中心" header-align="center" align="center"></el-table-column>
  215. <el-table-column prop="parent" label="所属场站" header-align="center" align="center"></el-table-column>
  216. <el-table-column prop="pcs" label="作业场站" header-align="center" align="center"></el-table-column>
  217. <el-table-column prop="orderType" label="工单类型" header-align="center" align="center"></el-table-column>
  218. <el-table-column prop="finishDate" label="完成日期" header-align="center" align="center"></el-table-column>
  219. <el-table-column prop="score" label="得分" header-align="center" align="center" :formatter="formatScore"></el-table-column>
  220. </el-table>
  221. <pagination
  222. v-show="total > 0"
  223. :total="total"
  224. v-model:page="queryParams.pageNum"
  225. v-model:limit="queryParams.pageSize"
  226. @pagination="applyFilter"
  227. />
  228. </el-card>
  229. </div>
  230. </div>
  231. <div class="sort-form" v-if="showRankingTable">
  232. <!-- 新增的排名列表卡片 -->
  233. <div style="width: 100%;height: 100%;">
  234. <el-card class="floating-card ranking-table-card">
  235. <div class="card-content">
  236. <el-table :data="currentRankingData" style="width: 100%;" height="800">
  237. <el-table-column prop="rank" label="排名" width="80" align="center"></el-table-column>
  238. <el-table-column prop="name" label="名字" width="120" align="center">
  239. <template #default="scope">
  240. <span :style="{ color: scope.row.name === homePageData.nickName ? 'red' : '' }">{{ scope.row.name }}</span>
  241. </template>
  242. </el-table-column>
  243. <el-table-column prop="station" label="场站" align="center"></el-table-column>
  244. <el-table-column prop="finalScore" label="工分" width="80" align="center"></el-table-column>
  245. </el-table>
  246. </div>
  247. </el-card>
  248. </div>
  249. </div>
  250. </div>
  251. </template>
  252. <script>
  253. import { ref, reactive } from 'vue';
  254. import { selectHomePageData } from '@/api/gxt/repairOrder';
  255. import { listMyTodo } from '@/api/gxt/orderMine';
  256. import { listGxtOrderPerson } from '@/api/gxt/gxtOrderPerson';
  257. import { encryptParams } from '@/utils/encrypt';
  258. import { getConfigKey } from '@/api/system/config';
  259. export default {
  260. name: 'Index5',
  261. data() {
  262. return {
  263. // 添加时间筛选相关数据
  264. selectedPeriod: '本月', // 选中的时间段(本月、上月、本季度)
  265. startDate: '', // 开始日期
  266. endDate: '', // 结束日期
  267. // 添加查询参数
  268. total: 0,
  269. queryParams: {
  270. pageNum: 1,
  271. pageSize: 10,
  272. orderCode: null,
  273. },
  274. orderPersonList: [],
  275. // 添加首页统计数据
  276. homePageData: {
  277. workOrderNum: 120, // 维保工单总数
  278. workOrderJsy: 15, // 维保工单较上月增长百分比
  279. repairOrderNum: 85, // 维修工单总数
  280. repairOrderJsy: 8, // 维修工单较上月增长百分比
  281. wbgs: 168, // 本月工时
  282. wbjsy: 12, // 本月工时较上月增长百分比
  283. score: 92, // 本月工分
  284. gfjsy: 5, // 本月工分较上月增长百分比
  285. repairPending: 0,
  286. workPending: 0,
  287. pendingNum: 0,
  288. todoNum: 0, // 我的待办数量
  289. hasCenter: null,
  290. timeOutNum: 0,
  291. scoreCompany: [],
  292. companySort: null,
  293. scoreCenter: [],
  294. centerSort: null,
  295. scoreDept: [],
  296. deptSort: null,
  297. deptName: null,
  298. center: null,
  299. companyName: null,
  300. },
  301. // 新增的数据属性
  302. showRankingTable: false, // 控制排名列表卡片显示
  303. currentRankingType: '', // 当前显示的排名类型
  304. currentRankingData: [], // 当前显示的排名数据
  305. // 定时器
  306. timer: null
  307. }
  308. },
  309. created() {
  310. this.loadHomePageData(); // 首次加载首页统计数据
  311. this.applyFilter();
  312. // 设置定时器,每3秒执行一次loadHomePageData函数
  313. this.timer = setInterval(() => {
  314. this.loadHomePageData();
  315. }, 3000);
  316. },
  317. methods: {
  318. // 在组件销毁前清除定时器
  319. beforeDestroy() {
  320. if (this.timer) {
  321. clearInterval(this.timer);
  322. this.timer = null;
  323. }
  324. },
  325. // 新增的方法:显示排名列表
  326. showRankingList(type) {
  327. // 如果点击的是同一个排名类型,则隐藏列表卡片
  328. if (this.currentRankingType === type) {
  329. this.showRankingTable = false;
  330. this.currentRankingType = '';
  331. this.currentRankingData = [];
  332. } else {
  333. // 否则显示对应类型的排名列表
  334. this.currentRankingType = type;
  335. this.showRankingTable = true;
  336. // 根据类型设置数据并按finalScore排序实现RANK模式
  337. let rankingData = [];
  338. if (type === 'dept') {
  339. rankingData = [...this.homePageData.scoreDept];
  340. } else if (type === 'center') {
  341. rankingData = [...this.homePageData.scoreCenter];
  342. } else if (type === 'company') {
  343. rankingData = [...this.homePageData.scoreCompany];
  344. }
  345. // 按finalScore降序排序
  346. rankingData.sort((a, b) => (b.finalScore || 0) - (a.finalScore || 0));
  347. // 实现RANK模式排名
  348. const rankedData = [];
  349. rankingData.forEach((item, index) => {
  350. // 计算RANK排名
  351. let rank = index + 1;
  352. // 如果当前项的finalScore与前一项相同,则排名也相同
  353. if (index > 0 && item.finalScore === rankingData[index - 1].finalScore) {
  354. rank = rankedData[index - 1].rank;
  355. }
  356. rankedData.push({
  357. rank: rank,
  358. name: item.nickName,
  359. station: item.deptName,
  360. finalScore: item.finalScore || 0
  361. });
  362. });
  363. this.currentRankingData = rankedData;
  364. }
  365. },
  366. applyFilter() {
  367. // 获取工单人员列表数据
  368. listGxtOrderPerson(this.queryParams).then(response => {
  369. if (response.code === 200) {
  370. this.total = response.total;
  371. this.orderPersonList = response.rows;
  372. }
  373. });
  374. },
  375. handleQuery() {
  376. this.queryParams.pageNum = 1;
  377. this.applyFilter();
  378. },
  379. formatScore(row, column, cellValue) {
  380. if (cellValue == null || cellValue === '') return '--'; // 处理空值
  381. return parseFloat(cellValue).toFixed(2); // 保留两位小数
  382. },
  383. // 格式化工时和工分显示,0显示为0,小数位超过两位时四舍五入
  384. formatWorkValue(value) {
  385. if (value == null || value === '') return '--'; // 处理空值
  386. const num = parseFloat(value);
  387. // 四舍五入保留两位小数
  388. const rounded = num.toFixed(2);
  389. // 去掉不必要的末尾0
  390. return parseFloat(rounded).toString();
  391. },
  392. // 加载首页统计数据
  393. loadHomePageData() {
  394. selectHomePageData().then(response => {
  395. if (response.code === 200) {
  396. this.homePageData.nickName = response.data.nickName;
  397. this.homePageData.workOrderNum = response.data.workOrderNum || 0;
  398. this.homePageData.workOrderJsy = response.data.workOrderJsy || 0;
  399. this.homePageData.repairOrderNum = response.data.repairOrderNum || 0;
  400. this.homePageData.repairOrderJsy = response.data.repairOrderJsy || 0;
  401. this.homePageData.wbgs = response.data.wbgs || 0;
  402. this.homePageData.wbjsy = response.data.wbjsy || 0;
  403. this.homePageData.score = response.data.score || 0;
  404. this.homePageData.gfjsy = response.data.gfjsy || 0;
  405. this.homePageData.repairPending = response.data.repairPending || 0;
  406. this.homePageData.workPending = 0;
  407. this.homePageData.pendingNum = this.homePageData.repairPending + this.homePageData.workPending;
  408. this.homePageData.hasCenter = response.data.hasCenter;
  409. this.homePageData.timeOutNum = response.data.timeOutNum;
  410. this.homePageData.scoreCompany = response.data.scoreCompany || [];
  411. this.homePageData.companySort = response.data.companySort || null;
  412. this.homePageData.scoreCenter = response.data.scoreCenter || [];
  413. this.homePageData.centerSort = response.data.centerSort || null;
  414. this.homePageData.scoreDept = response.data.scoreDept || [];
  415. this.homePageData.deptSort = response.data.deptSort || null;
  416. this.homePageData.deptName = null;
  417. this.homePageData.center = null;
  418. this.homePageData.companyName = null;
  419. if(response.data.scoreDept.length>0){
  420. this.homePageData.deptName = response.data.scoreDept[0].deptName;
  421. this.homePageData.center = response.data.scoreDept[0].center;
  422. this.homePageData.companyName = response.data.scoreDept[0].companyName;
  423. }
  424. }
  425. });
  426. // 获取我的待办数量
  427. listMyTodo({ pageNum: 1, pageSize: 1 }).then(response => {
  428. if (response.code === 200) {
  429. this.homePageData.todoNum = response.total || 0;
  430. }
  431. });
  432. },
  433. getTextColor(jsy) {
  434. if(jsy>0) {
  435. return '#22c55e';
  436. }else if(jsy<0) {
  437. return '#ef4444';
  438. }else{
  439. return 'gray';
  440. }
  441. },
  442. toRoute(num) {
  443. if(num==0) {
  444. // 获取系统配置中的超时时间参数
  445. getConfigKey("gxt.order.timeout").then(response => {
  446. let timeoutValue = 30; // 默认值
  447. if (response && response.msg) {
  448. timeoutValue = parseInt(response.msg) || 30;
  449. }
  450. // 加密参数并传递到目标路由页面
  451. const params = {
  452. timeOutNum: timeoutValue,
  453. workOrderStatus: 'assigned'
  454. };
  455. const encryptedParams = encryptParams(params);
  456. this.$router.push({
  457. path: "/workOrder/repairOrder",
  458. query: {
  459. data: encryptedParams
  460. }
  461. });
  462. }).catch(() => {
  463. // 如果获取配置失败,使用默认值
  464. const params = {
  465. timeOutNum: 30,
  466. workOrderStatus: 'assigned'
  467. };
  468. const encryptedParams = encryptParams(params);
  469. this.$router.push({
  470. path: "/workOrder/repairOrder",
  471. query: {
  472. data: encryptedParams
  473. }
  474. });
  475. });
  476. }else if(num==1) {
  477. this.$router.push("/mine/orderMyTodo");
  478. }else if (num==2) {
  479. this.$router.push("/mine/orderMyCreate");
  480. }else if (num==3) {
  481. this.$router.push("/mine/orderMyDone");
  482. }else{
  483. this.$router.push("/mine/orderMyRelate");
  484. }
  485. },
  486. }
  487. }
  488. </script>
  489. <style scoped>
  490. .index5-container {
  491. display: flex;
  492. padding: 20px;
  493. min-height: calc(100vh - 84px);
  494. position: relative;
  495. }
  496. .right-content {
  497. display: flex;
  498. flex-direction: column;
  499. gap: 20px;
  500. }
  501. .right-content.full-width {
  502. width: 100%;
  503. display: flex;
  504. flex-direction: column;
  505. gap: 20px;
  506. }
  507. .sort-form {
  508. width: 30%;
  509. height: 100%;
  510. box-sizing: border-box;
  511. margin-left: 10px;
  512. }
  513. .form-card {
  514. height: 100%;
  515. }
  516. .form-title {
  517. font-size: 18px;
  518. font-weight: bold;
  519. margin-bottom: 20px;
  520. text-align: center;
  521. }
  522. .form-buttons {
  523. display: flex;
  524. flex-direction: column;
  525. gap: 10px;
  526. margin-top: 20px;
  527. width: 100%;
  528. }
  529. .form-button {
  530. text-align: center;
  531. }
  532. .filter-button {
  533. color: white;
  534. border: none;
  535. width: 100%;
  536. margin-bottom: 10px;
  537. }
  538. .filter-button:hover {
  539. opacity: 0.9;
  540. transform: translateY(-2px);
  541. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  542. }
  543. .reset-button {
  544. background-color: #165dff;
  545. }
  546. .apply-button {
  547. background-color: #165dff;
  548. }
  549. /* 图标行样式 */
  550. .icons-row {
  551. display: flex;
  552. justify-content: space-between;
  553. }
  554. .icon-item {
  555. width: 24%;
  556. text-align: center;
  557. cursor: pointer;
  558. transition: all 0.3s ease;
  559. }
  560. .icon-item:hover {
  561. transform: scale(1);
  562. }
  563. .icon-wrapper {
  564. position: relative;
  565. }
  566. .icon-circle {
  567. width: 50px;
  568. height: 50px;
  569. border-radius: 50%;
  570. display: flex;
  571. align-items: center;
  572. justify-content: center;
  573. margin: 0 auto 10px;
  574. font-size: 18px;
  575. position: relative;
  576. margin: 10px;
  577. }
  578. .icon-size {
  579. width: 18px;
  580. height: 18px;
  581. }
  582. .blue-color {
  583. color: #165dff;
  584. }
  585. .green-color {
  586. color: #00b42a;
  587. }
  588. .purple-color {
  589. color: #a855f7;
  590. }
  591. .deep-yellow-color {
  592. color: #c98701;
  593. }
  594. .orange-color {
  595. color: #f97316;
  596. }
  597. .bg-color-blue {
  598. background-color: #dbeafe;
  599. }
  600. .bg-color-yellow {
  601. background-color: #fef9c3;
  602. }
  603. .bg-color-red {
  604. background-color: #fee2e2;
  605. }
  606. .bg-color-green {
  607. background-color: #dcfce7;
  608. }
  609. .bg-color-orange {
  610. background-color: #ffedd5;
  611. }
  612. .bg-color-purple {
  613. background-color: #f3e8ff;
  614. }
  615. .icon-label {
  616. font-size: 14px;
  617. color: #606266;
  618. }
  619. .badge {
  620. position: absolute;
  621. top: -3px;
  622. right: -3px;
  623. background-color: #ff4d4f;
  624. color: white;
  625. border-radius: 50%;
  626. width: 20px;
  627. height: 20px;
  628. display: flex;
  629. align-items: center;
  630. justify-content: center;
  631. font-size: 12px;
  632. font-weight: bold;
  633. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  634. z-index: 10;
  635. }
  636. /* 表单行样式 */
  637. .forms-row {
  638. display: flex;
  639. justify-content: space-between;
  640. }
  641. .form-item {
  642. width: 32.5%; /* 留一些间距 */
  643. }
  644. .work-hour-card {
  645. width: 24%;
  646. }
  647. .work-score-card {
  648. width: 24%;
  649. }
  650. .ranking-card {
  651. width: 49.3%;
  652. }
  653. .data-card {
  654. min-height: 120px;
  655. height: auto;
  656. }
  657. .card-header {
  658. display: flex;
  659. justify-content: space-between;
  660. align-items: center;
  661. margin-bottom: 5px;
  662. }
  663. .card-title {
  664. font-size: 14px;
  665. }
  666. .sort-title {
  667. /* 字体大小:比内容大一号,视觉层级突出 */
  668. font-size: 18px;
  669. /* 字体粗细:加粗,强化标题属性 */
  670. font-weight: 600;
  671. /* 颜色:深色主色调,与内容浅灰色区分 */
  672. color: #2c3e50;
  673. /* 间距:底部留白,与内容拉开距离 */
  674. margin: 0 0 5px 0;
  675. /* 装饰:底部短横线,增强视觉区分 */
  676. /* padding-bottom: 8px; */
  677. /* border-bottom: 2px solid #3498db; */
  678. /* 行高:保证垂直居中,视觉舒适 */
  679. /* line-height: 1.4; */
  680. /* 可选:文字不换行,避免标题折行影响美观 */
  681. white-space: nowrap;
  682. overflow: hidden;
  683. text-overflow: ellipsis;
  684. }
  685. .card-icon {
  686. width: 36px;
  687. height: 36px;
  688. border-radius: 50%;
  689. display: flex;
  690. align-items: center;
  691. justify-content: center;
  692. font-size: 18px;
  693. }
  694. .card-content {
  695. text-align: left;
  696. display: flex;
  697. align-items: center;
  698. gap: 10px;
  699. }
  700. .data-value {
  701. font-size: 32px;
  702. font-weight: bold;
  703. margin-bottom: 5px;
  704. }
  705. .data-description {
  706. font-size: 13px;
  707. color: #909399;
  708. }
  709. /* 列表行样式 */
  710. .list-row {
  711. flex: 1;
  712. }
  713. .list-header {
  714. font-weight: bold;
  715. font-size: 18px;
  716. display: flex;
  717. align-items: center;
  718. justify-content: space-between;
  719. }
  720. .header-buttons {
  721. display: flex;
  722. gap: 10px;
  723. margin-left: auto;
  724. }
  725. /* 表头加粗 */
  726. .el-table th {
  727. font-weight: bold !important;
  728. }
  729. /* 悬浮卡片通用样式 */
  730. .floating-card {
  731. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  732. transition: box-shadow 0.3s ease;
  733. }
  734. .floating-card:hover {
  735. box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  736. }
  737. /* 时间筛选标题样式 */
  738. .time-filter-title {
  739. font-size: 16px;
  740. margin: 20px 0 10px 0;
  741. text-align: left;
  742. color: #303133;
  743. }
  744. /* 时间段按钮容器 */
  745. .period-buttons {
  746. display: flex;
  747. justify-content: space-between;
  748. margin-bottom: 15px;
  749. }
  750. /* 时间段按钮样式 */
  751. .period-button {
  752. flex: 1;
  753. padding: 5px;
  754. background-color: #f5f7fa;
  755. color: #606266;
  756. border: 1px solid #dcdfe6;
  757. }
  758. .todo-content {
  759. display: flex;
  760. align-items: center;
  761. justify-content: flex-start;
  762. margin: 8px;
  763. gap: 10px;
  764. }
  765. /* 选中的时间段按钮样式 */
  766. .period-button.active {
  767. background-color: #165dff;
  768. color: white;
  769. border-color: #165dff;
  770. }
  771. /* 日期选择器容器 */
  772. .date-picker-container {
  773. display: flex;
  774. align-items: center;
  775. justify-content: space-between;
  776. margin-bottom: 15px;
  777. }
  778. /* 日期选择器 */
  779. .date-picker {
  780. flex: 1;
  781. }
  782. /* 日期分隔符 */
  783. .date-separator {
  784. margin: 0 3px;
  785. color: #606266;
  786. }
  787. /* 表单卡片调整 */
  788. .form-card {
  789. height: auto;
  790. }
  791. /* 维度筛选样式 */
  792. .filter-card {
  793. background: white;
  794. border-radius: 8px;
  795. }
  796. /* 修改复选框选中时的颜色 */
  797. .el-checkbox :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  798. background-color: #165dff;
  799. border-color: #165dff;
  800. }
  801. .tree-select {
  802. margin-bottom: 0px;
  803. }
  804. .tree-header {
  805. display: flex;
  806. align-items: center;
  807. gap: 5px;
  808. padding: 3px 0;
  809. cursor: pointer;
  810. user-select: none;
  811. }
  812. .tree-content {
  813. max-height: 0;
  814. overflow: hidden;
  815. transition: max-height 0.3s ease-out;
  816. }
  817. .tree-content.show {
  818. max-height: 500px;
  819. transition: max-height 0.3s ease-in;
  820. }
  821. .checkbox-item {
  822. display: flex;
  823. align-items: center;
  824. cursor: pointer;
  825. }
  826. .checkbox-input {
  827. width: 16px;
  828. height: 16px;
  829. cursor: pointer;
  830. }
  831. .rotate-90 {
  832. transform: rotate(-90deg);
  833. }
  834. .rotate-180 {
  835. transform: rotate(180deg);
  836. }
  837. .hidden {
  838. display: none;
  839. }
  840. .flex {
  841. display: flex;
  842. }
  843. .justify-between {
  844. justify-content: space-between;
  845. }
  846. .items-center {
  847. align-items: center;
  848. }
  849. .mb-4 {
  850. margin-bottom: 1rem;
  851. }
  852. .ml-2 {
  853. margin-left: 0.5rem;
  854. }
  855. .mt-1 {
  856. margin-top: 0.25rem;
  857. }
  858. .pl-2 {
  859. padding-left: 0.5rem;
  860. }
  861. .border-l-2 {
  862. border-left-width: 2px;
  863. }
  864. .border-neutral-200 {
  865. border-color: #e5e5e5;
  866. }
  867. .cursor-pointer {
  868. cursor: pointer;
  869. }
  870. .font-semibold {
  871. font-weight: 600;
  872. }
  873. .font-medium {
  874. font-weight: 100;
  875. }
  876. .text-lg {
  877. font-size: 1.125rem;
  878. }
  879. .text-neutral-700 {
  880. color: #404040;
  881. }
  882. .text-neutral-400 {
  883. color: #a3a3a3;
  884. }
  885. .transition-transform {
  886. transition: transform 0.3s ease;
  887. }
  888. .duration-300 {
  889. transition-duration: 300ms;
  890. }
  891. .flex-1 {
  892. flex: 1 1 0%;
  893. }
  894. /* 添加个人排名相关的样式 */
  895. .ranking-container {
  896. display: flex;
  897. width: 100%;
  898. justify-content: space-between;
  899. }
  900. .horizontal-ranking {
  901. flex: 1;
  902. width: 33%;
  903. padding: 0 5px;
  904. box-sizing: border-box;
  905. }
  906. .ranking-section {
  907. width: 100%;
  908. }
  909. .ranking-info {
  910. width: 100%;
  911. }
  912. .ranking-row {
  913. display: flex;
  914. align-items: center;
  915. width: 100%;
  916. margin-bottom: 8px;
  917. font-size: 14px;
  918. cursor: pointer; /* 添加指针样式表示可点击 */
  919. }
  920. .ranking-row:hover {
  921. background-color: #f5f7fa; /* 添加hover效果 */
  922. }
  923. .ranking-row:last-child {
  924. margin-bottom: 0;
  925. }
  926. .ranking-item {
  927. display: flex;
  928. align-items: center;
  929. }
  930. .circle {
  931. width: 40px;
  932. height: 40px;
  933. border-radius: 50%;
  934. display: flex;
  935. align-items: center;
  936. justify-content: center;
  937. margin-right: 10px;
  938. }
  939. .bg-light-blue {
  940. background-color: #dbeafe;
  941. }
  942. .circle-text {
  943. font-size: 12px;
  944. }
  945. .blue-bold {
  946. color: #165dff;
  947. font-weight: bold;
  948. }
  949. .black-bold {
  950. color: #000;
  951. font-weight: bold;
  952. }
  953. /* 工时和工分卡片靠上对齐样式 */
  954. .top-aligned {
  955. display: flex;
  956. flex-direction: column;
  957. align-items: flex-start;
  958. }
  959. .top-aligned .card-header {
  960. align-self: stretch;
  961. }
  962. .top-aligned .card-content {
  963. align-self: stretch;
  964. justify-content: flex-start;
  965. }
  966. .top-aligned .data-description {
  967. align-self: stretch;
  968. }
  969. /* 新增的排名列表卡片样式 */
  970. .ranking-table-card {
  971. width: 100%;
  972. height: 100%;
  973. }
  974. </style>