index6.vue 30 KB

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