index5.vue 31 KB

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