RootPage.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. <template>
  2. <div class="dashboard-container">
  3. <div class="content-area" v-if="isDataLoaded">
  4. <!-- 顶部信息卡片 -->
  5. <div class="top-info">
  6. <!-- {{ mineStore.getRoot }} -->
  7. <div class="info-card">
  8. <div class="card-title">
  9. <div class="info-details">
  10. <div class="label">{{ mineStore.getRoot?.departName }}</div>
  11. <!-- <div class="tag" :style="{ backgroundColor: getAlarmColor(mineStore.alarmLevel), color: '#fff' }">{{ getRiskText(mineStore.alarmLevel) }}</div> -->
  12. </div>
  13. <div>
  14. <a-button class="btn" @click="handleGoToPageQuery('/basicinfo/access-statistics')">接入详情</a-button>
  15. </div>
  16. <div class="info-border">
  17. <div class="info-border-icon"></div>
  18. <div class="info-border-line"></div>
  19. <div class="info-border-icon"></div>
  20. </div>
  21. </div>
  22. <div class="card-details">
  23. <div v-for="value in accessStatics" :key="value.id" class="card-item">
  24. <div class="item-cont">
  25. 组织机构:{{ value.name }}
  26. </div>
  27. <div class="item-cont">
  28. 应接入:{{ value.yjNum }}
  29. </div>
  30. <div class="item-cont">
  31. 在线:{{ value.yjNum }}
  32. </div>
  33. <div class="item-cont">
  34. 中断:{{ value.yjNum }}
  35. </div>
  36. <div class="item-cont">
  37. 未接入:{{ value.yjNum }}
  38. </div>
  39. <div class="item-cont">
  40. 接入密闭数:{{ value.yjNum }}
  41. </div>
  42. <div class="bg-line">
  43. </div>
  44. <div class="bg-icon"></div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. <!-- 预警统计 -->
  50. <div class="warning-statistics">
  51. <div class="statistics-header">
  52. <div class="title">实时预警统计</div>
  53. <div class="btn-group">
  54. <!-- <button class="btn">预警级别</button> -->
  55. </div>
  56. </div>
  57. <div class="statistics-content">
  58. <div class="stat-item high-risk">
  59. <div class="icon">
  60. <div class="icon-top"></div>
  61. <div class="icon-bottom"></div>
  62. </div>
  63. <div class="text">超限异常报警</div>
  64. <div class="count">{{ realtimeWarning.overLimitCount }}</div>
  65. </div>
  66. <div class="stat-item medium-risk">
  67. <div class="icon">
  68. <div class="icon-top"></div>
  69. <div class="icon-bottom"></div>
  70. </div>
  71. <div class="text">预测预警</div>
  72. <div class="count">{{ realtimeWarning.alarmInfoCount }}</div>
  73. </div>
  74. <div class="stat-item normal-risk">
  75. <div class="icon">
  76. <div class="icon-top"></div>
  77. <div class="icon-bottom"></div>
  78. </div>
  79. <div class="text">数据中断</div>
  80. <div class="count">{{ realtimeWarning.dataBreakCount }}</div>
  81. </div>
  82. <div class="stat-item low-risk">
  83. <div class="icon">
  84. <div class="icon-top"></div>
  85. <div class="icon-bottom"></div>
  86. </div>
  87. <div class="text">数据质量</div>
  88. <div class="count">{{ realtimeWarning.dataQualityCount }}</div>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- 预警数据详情 -->
  93. <div class="warning-details">
  94. <div class="details-header">
  95. <div class="title">预警数据详情</div>
  96. <div class="btn-group">
  97. <button class="btn" @click="handleShowDetail({deptId:mineStore.getRootId})">展开详情</button>
  98. </div>
  99. </div>
  100. <div class="details-content">
  101. <div
  102. v-for="(item, index) in mineData?.records"
  103. :key="index"
  104. class="warning-item"
  105. >
  106. <div class="item-header">
  107. <div class="header-left">
  108. <div class="icon"></div>
  109. <div class="name">煤矿名称: {{ item.mineName }}</div>
  110. <div
  111. class="risk-level"
  112. :style="{ backgroundColor: getAlarmColor(item.alarmLevel), color: '#fff' }"
  113. >
  114. {{ getRiskText(item.alarmLevel) }}
  115. </div>
  116. </div>
  117. <a-button
  118. class="expand-btn"
  119. @click="handleShowDetail(item)"
  120. >
  121. 详情
  122. <div class="arrow-icon-wrapper">
  123. <div class="arrow-icon" ></div>
  124. </div>
  125. </a-button>
  126. </div>
  127. <div class="item-body">
  128. <div class="data-row">
  129. <div
  130. v-for="(col, colIndex) in dataColumns"
  131. :key="colIndex"
  132. class="data-col"
  133. :class="{
  134. 'col-first-row': colIndex < 5,
  135. 'col-second-row': colIndex >= 5,
  136. 'col-span-3': colIndex === 5
  137. }"
  138. >
  139. <div class="col-icon">
  140. <div class="icon-item" :class="`alarm-icon-${(colIndex % 8) + 1}`"></div>
  141. </div>
  142. <div class="col-cont">
  143. <div class="col-title">{{ col.label }}</div>
  144. <div
  145. class="col-value"
  146. :style="{ color: getColValueColor(col, item) }"
  147. >
  148. <span
  149. v-if="col.showPoint"
  150. class="status-dot"
  151. :style="{
  152. backgroundColor: getColValueColor(col, item),
  153. boxShadow: `0 0 10px ${getColValueColor(col, item)}`
  154. }"
  155. ></span>
  156. {{ getColDisplayText(col, item) }}
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <!-- 近半年报警统计 -->
  166. <div class="half-year-statistics">
  167. <div class="statistics-header">
  168. <div class="title">近半年预测预报统计</div>
  169. <div class="btn-group">
  170. <button class="btn" @click="toggleChartVisibility">
  171. {{ isChartVisible ? '收起图表' : '展开图表' }}
  172. </button>
  173. </div>
  174. </div>
  175. <div class="statistics-content" v-show="isChartVisible">
  176. <!-- 左侧饼图区域 -->
  177. <div class="chart-item pie-chart">
  178. <div class="chart-title">预测预报类型统计</div>
  179. <Pie :chart-data="alarmType"></Pie>
  180. </div>
  181. <!-- 右侧柱状图区域 -->
  182. <div class="chart-item bar-chart">
  183. <div class="chart-title">重点矿井报警次数统计</div>
  184. <Bar :chart-data="historyAlarmNum"></Bar>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <!-- 实时数据表格 -->
  190. <BasicModal
  191. v-model:open="isDetailModalVisible"
  192. title="实时数据详情"
  193. width="70%"
  194. centered
  195. :footer="null"
  196. @cancel="handleModalClose"
  197. >
  198. <BasicTable @register="registerRealtimeTable" />
  199. </BasicModal>
  200. </div>
  201. </template>
  202. <script setup lang="ts">
  203. import { useRouter, useRoute } from 'vue-router';
  204. import { onMounted, ref } from 'vue';
  205. import { getAlarmType, getGoafAccessCount, getHistoryAlarmNum, getMineData, getRealAlarmNum, getGoafData } from '../overhaul.api';
  206. import { columns } from '../overhaul.data';
  207. import { useMineDepartmentStore } from '/@/store/modules/mine';
  208. import { useListPage } from '/@/hooks/system/useListPage';
  209. import dayjs from 'dayjs';
  210. import Pie from '/@/components/chart/Pie.vue';
  211. import Bar from '/@/components/chart/Bar.vue';
  212. import { StatusColorEnum } from '/@/enums/jeecgEnum';
  213. import { BasicTable } from '/@/components/Table';
  214. import { BasicModal } from '/@/components/Modal';
  215. // 处理矿名选择器相关的逻辑
  216. const isDetailModalVisible = ref(false);
  217. const currentDeptId = ref<string | number>('');
  218. const getDynamicTableData = (params: any) => {
  219. // 如果 currentDeptId 存在,则覆盖 params 中的 deptId
  220. if (currentDeptId.value) {
  221. params.deptId = currentDeptId.value;
  222. } else {
  223. // 默认使用 rootId,防止初始加载时无数据
  224. params.deptId = mineStore.getRootId;
  225. }
  226. return getGoafData(params);
  227. };
  228. // 注册实时数据表格
  229. const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
  230. tableProps: {
  231. api: getDynamicTableData,
  232. columns,
  233. showIndexColumn: false,
  234. scroll: { x: 'max-content', y: 500 },
  235. useSearchForm: false, // 隐藏搜索表单
  236. showActionButtonGroup: false,
  237. },
  238. pagination: false,
  239. exportConfig: {
  240. url: '/ventanaly-province/province/device/exportGoafReal',
  241. name: '老空区永久密闭监测数据',
  242. // params: {
  243. // goafId,
  244. // },
  245. },
  246. });
  247. const [registerRealtimeTable, realtimeTable] = ctxRealtime;
  248. const handleShowDetail = (item: any) => {
  249. // 设置当前选中的 deptId
  250. currentDeptId.value = item.deptId;
  251. // 显示弹框
  252. isDetailModalVisible.value = true;
  253. // 关键:手动触发表格刷新,因为 api 依赖的 ref 变化可能不会自动触发 BasicTable 的内部重载
  254. // 使用 nextTick 确保 DOM 更新后再重载,或者直接在 modal 的 open 事件中处理
  255. setTimeout(() => {
  256. realtimeTable?.reload();
  257. }, 100);
  258. };
  259. const handleModalClose = () => {
  260. isDetailModalVisible.value = false;
  261. currentDeptId.value = ''; // 可选:清空状态
  262. };
  263. // 路由实例
  264. const router = useRouter();
  265. const mineStore = useMineDepartmentStore();
  266. // 数据加载状态
  267. const isDataLoaded = ref(false);
  268. const accessStatics = ref<any[]>([]);
  269. // 控制图表显示/隐藏的状态
  270. const isChartVisible = ref(true);
  271. const dataColumns = [
  272. { label: '瓦斯等级', key: 'gasLevelName', type: 'alarm', showPoint: true },
  273. { label: '煤层自燃倾向性', key: 'coalSeamLevel', type: 'text' },
  274. { label: '联网', key: 'status', colorKey: 'status', type: 'status',showPoint: true },
  275. { label: '永久密闭数量', key: 'goafNum', type: 'text' },
  276. { label: '报警数量', key: 'alarmCount', type: 'custom' },
  277. { label: '报警原因', key: 'alarmReasons', type: 'custom' },
  278. { label: '开始时间', key: 'earliestTime', type: 'text' },
  279. { label: '最新监测时间', key: 'latestReadTime',type: 'text' },
  280. ];
  281. const alartTypeColumns = [
  282. 'fireAlarm',
  283. 'fireAlarmOut',
  284. 'explosionAlarm',
  285. 'sourcePressureAlarm',
  286. 'leakageAlarm',
  287. 'unsealAlarm',
  288. // {key: 'fireAlarm', label: '闭内自燃发火'},
  289. // {key: 'fireAlarmOut', label: '闭外自燃发火'},
  290. // {key: 'explosionAlarm', label: '爆炸预警'},
  291. // {key: 'sourcePressureAlarm', label: '压差隐患'},
  292. // {key: 'leakageAlarm', label: '漏风'},
  293. // {key: 'unsealAlarm', label: '密闭启封'},
  294. ];
  295. async function fetchAccessStatics() {
  296. accessStatics.value = await getGoafAccessCount({ deptId: mineStore.getRootId });
  297. }
  298. const realtimeWarning = ref<any>({});
  299. async function fetchRealtimeWarning() {
  300. realtimeWarning.value = await getRealAlarmNum({ deptId: mineStore.getRootId });
  301. }
  302. const alarmType = ref<any[]>([]);
  303. async function fetchAlarmType() {
  304. const result = await getAlarmType({
  305. deptId: mineStore.getRootId,
  306. startTime: dayjs().add(-6, 'months').format('YYYY-MM-DD HH:mm:ss'),
  307. endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
  308. });
  309. alarmType.value = result.map((e) => ({
  310. name: e.name,
  311. value: e.num,
  312. }));
  313. }
  314. const historyAlarmNum = ref<any[]>([]);
  315. async function fetchHistoryAlarmNum() {
  316. const result = await getHistoryAlarmNum({
  317. deptId: mineStore.getRootId,
  318. startTime: dayjs().add(-6, 'months').format('YYYY-MM-DD HH:mm:ss'),
  319. endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
  320. });
  321. historyAlarmNum.value = result.map((e) => ({
  322. name: e.mine_name,
  323. value: e.num,
  324. }));
  325. }
  326. const mineData = ref<any>();
  327. async function fetchMineData() {
  328. mineData.value = await getMineData({
  329. deptId: mineStore.getRootId,
  330. });
  331. }
  332. /**
  333. * 风险等级映射配置
  334. */
  335. const RISK_LEVEL_MAP: Record<string, { text: string; color: string }> = {
  336. '4': { text: '高风险', color: StatusColorEnum.red },
  337. '3': { text: '较高风险', color: StatusColorEnum.gold },
  338. '2': { text: '一般风险', color: StatusColorEnum.yellow },
  339. '1': { text: '低风险', color: StatusColorEnum.blue },
  340. '0': { text: '无风险', color: '#333' }, // 假设 0 为无风险或默认
  341. };
  342. /**
  343. * 获取报警颜色
  344. * @param level 报警级别 '1', '2', '3', '4'
  345. */
  346. const getAlarmColor = (level?: string | number) => {
  347. if (!level && level !== 0) return '#333'; // 默认颜色
  348. return RISK_LEVEL_MAP[String(level)]?.color;
  349. };
  350. /**
  351. * 获取风险等级对应的文本
  352. * @param level 报警级别 '1', '2', '3', '4'
  353. */
  354. const getRiskText = (level?: string | number) => {
  355. if (!level && level !== 0) return '-';
  356. return RISK_LEVEL_MAP[String(level)]?.text || '未知';
  357. };
  358. /**
  359. * 通用页面跳转方法
  360. * @param record 当前行数据
  361. * @param path 目标路径
  362. */
  363. function handleGoToPageQuery(path: string) {
  364. router.push({
  365. path,
  366. }).catch(err => {
  367. console.error('跳转失败:', err);
  368. });
  369. }
  370. /**
  371. * 获取列显示的颜色
  372. */
  373. const getColValueColor = (col: any, item: any) => {
  374. if (col.key === 'gasLevelName') {
  375. const val = getDataValue(item, col.key);
  376. if (!val || val === '-') return '#000';
  377. const strVal = String(val);
  378. if (strVal.includes('突出')) {
  379. return StatusColorEnum.red; // 红色
  380. } else if (strVal.includes('高瓦斯')) {
  381. return StatusColorEnum.gold; // 橙色/金色
  382. } else if (strVal.includes('低瓦斯')) {
  383. return StatusColorEnum.blue; // 蓝色
  384. }
  385. return '#000';
  386. }
  387. // 如果是报警类型,使用原有的报警颜色逻辑
  388. if (col.type === 'alarm' && col.colorKey) {
  389. return getAlarmColor(getDataValue(item, col.colorKey));
  390. }
  391. // 如果是设备状态类型,使用状态颜色逻辑
  392. if (col.type === 'status') {
  393. return getlinkStatusInfo(getDataValue(item, col.key)).color;
  394. }
  395. // 默认黑色
  396. return '#000';
  397. };
  398. /**
  399. * 根据点分字符串路径获取对象值 (例如: 'fireAlarm.alarmName')
  400. * @param item 数据对象
  401. * @param path 路径字符串
  402. * @param defaultValue 默认值
  403. */
  404. const getDataValue = (item: any, path: string, defaultValue: string = '-') => {
  405. if (!item || !path) return defaultValue;
  406. const val = path.split('.').reduce((acc, part) => acc && acc[part], item);
  407. return val ?? defaultValue;
  408. };
  409. /**
  410. * 获取设备状态信息 (文本和颜色)
  411. * @param status 0: 断开, 1: 正常
  412. */
  413. const getlinkStatusInfo = (status?: number | string) => {
  414. if (status === 1 || status === '1') {
  415. return { text: '正常', color: '#52c41a' }; // 绿色
  416. }
  417. return { text: '断开', color: '#ff4d4f' }; // 红色
  418. };
  419. /**
  420. * 获取列显示的文本
  421. */
  422. const getColDisplayText = (col: any, item: any) => {
  423. const rawValue = getDataValue(item, col.key);
  424. if (col.type === 'status') {
  425. return getlinkStatusInfo(rawValue).text;
  426. }
  427. if (col.key === 'alarmCount') {
  428. // 取 alarmRecordList 的长度
  429. return item.alarmRecordList ? item.alarmRecordList.length : 0;
  430. }
  431. if (col.key === 'alarmReasons') {
  432. // 遍历 alarmRecordList 拼接 alarmName
  433. if (!item.alarmRecordList || !Array.isArray(item.alarmRecordList)) {
  434. return '-';
  435. }
  436. const names = item.alarmRecordList.map((record: any) => record.alarmName).filter(Boolean);
  437. return names.length > 0 ? names.join('、') : '-';
  438. }
  439. if (col.key === 'latestReadTime') {
  440. // 安全获取 goafDataList 第一个元素的 readTime
  441. if (item.goafDataList && Array.isArray(item.goafDataList) && item.goafDataList.length > 0) {
  442. return item.goafDataList[0].readTime || '-';
  443. }
  444. return '-';
  445. }
  446. // 默认直接返回原始值或经过 getDataValue 处理后的值
  447. return rawValue;
  448. };
  449. // 切换图表显示状态
  450. const toggleChartVisibility = () => {
  451. isChartVisible.value = !isChartVisible.value;
  452. };
  453. onMounted(async() => {
  454. console.log(mineStore.getRoot)
  455. await Promise.all([
  456. fetchAccessStatics(),
  457. fetchRealtimeWarning(),
  458. fetchAlarmType(),
  459. fetchHistoryAlarmNum(),
  460. fetchMineData(),
  461. ]);
  462. isDataLoaded.value = true;
  463. });
  464. </script>
  465. <style lang="less" scoped>
  466. .dashboard-container {
  467. display: flex;
  468. flex-direction: column;
  469. height: 100%;
  470. overflow: scroll;
  471. }
  472. .content-area {
  473. flex: 1;
  474. padding: 20px;
  475. background-color: #f0f8ff;
  476. }
  477. // 顶部信息总览样式
  478. .top-info {
  479. width: 100%;
  480. height: 200px;
  481. margin-bottom: 20px;
  482. flex-shrink: 0;
  483. }
  484. .info-card {
  485. width: 100%;
  486. height: 100%;
  487. display: flex;
  488. flex-direction: row;
  489. background-image: url('/@/assets/images/overHaul/leafPage/info-card-bg.png');
  490. background-repeat: no-repeat;
  491. background-size: 100%;
  492. border-radius: 8px;
  493. padding: 20px;
  494. }
  495. .card-title {
  496. width: 20%;
  497. position: relative;
  498. display: flex;
  499. flex-direction: column;
  500. justify-content: space-between;
  501. padding: 8px 10px 8px 50px;
  502. .btn {
  503. color: #fff;
  504. background-color: #2b6ff0;
  505. &:hover {
  506. background-color: #397af3;
  507. }
  508. }
  509. }
  510. .info-border {
  511. position: absolute;
  512. top: 20px;
  513. left: 20px;
  514. .info-border-icon {
  515. width: 16px;
  516. height: 16px;
  517. background-image: url('/@/assets/images/overHaul/leafPage/info-card-icon1.svg');
  518. background-repeat: no-repeat;
  519. background-size: 100%;
  520. }
  521. .info-border-line {
  522. width: 1px;
  523. height: 95px;
  524. border-left: 2px dotted #397af3;
  525. margin-left: 7px;
  526. }
  527. }
  528. .info-details {
  529. display: flex;
  530. flex-direction: column;
  531. justify-content: space-between;
  532. padding: 8px 0;
  533. .label {
  534. font-size: 16px;
  535. color: #000;
  536. }
  537. .value {
  538. font-size: 16px;
  539. color: #000;
  540. }
  541. .tag {
  542. width: fit-content;
  543. height: 24px;
  544. padding: 2px 8px;
  545. border-radius: 15px;
  546. font-size: 12px;
  547. background-color: #ff6b6b;
  548. color: white;
  549. }
  550. }
  551. .card-details {
  552. width: 80%;
  553. height: 100%;
  554. display: flex;
  555. flex-direction: column;
  556. overflow-y: scroll;
  557. gap: 15px;
  558. }
  559. .card-item {
  560. position: relative;
  561. display: flex;
  562. justify-content: space-between;
  563. background-color: #f1f7ff;
  564. height: 40px;
  565. align-items: center;
  566. box-sizing: border-box;
  567. flex-shrink: 0;
  568. padding: 0 0 0 20px;
  569. overflow: hidden;
  570. .item-cont {
  571. color: #000;
  572. font-weight: 500;
  573. background-color: #f1f7ff;
  574. z-index: 1;
  575. padding: 0 10px;
  576. }
  577. .bg-line {
  578. position: absolute;
  579. width: 100%;
  580. height: 1px;
  581. border-top: 2px dotted #397af3;
  582. }
  583. .bg-icon {
  584. width: 15px;
  585. height: 15px;
  586. position: absolute;
  587. left: 10px;
  588. background-image: url('/@/assets/images/overHaul/leafPage/info-card-icon.svg');
  589. background-repeat: no-repeat;
  590. background-size: 100%;
  591. z-index: 1;
  592. }
  593. }
  594. /* // 预警统计样式 */
  595. .warning-statistics {
  596. background-color: #ffffff;
  597. margin-bottom: 20px;
  598. padding: 10px 12px;
  599. border-radius: 4px;
  600. .statistics-header {
  601. display: flex;
  602. justify-content: space-between;
  603. align-items: center;
  604. margin-bottom: 10px;
  605. }
  606. .title {
  607. font-size: 16px;
  608. font-weight: bold;
  609. color: #333;
  610. }
  611. .btn-group {
  612. display: flex;
  613. gap: 8px;
  614. }
  615. .btn {
  616. color: #2b6ff0;
  617. padding: 6px 12px;
  618. border: 1px solid #2b6ff0;
  619. border-radius: 4px;
  620. background-color: #E9F0FE;
  621. cursor: pointer;
  622. font-size: 12px;
  623. }
  624. .btn:hover {
  625. background-color: #f5f5f5;
  626. }
  627. .statistics-content {
  628. display: flex;
  629. gap: 50px;
  630. }
  631. .stat-item {
  632. flex: 1;
  633. padding: 16px 50px 10px 90px;
  634. text-align: left;
  635. position: relative;
  636. overflow: hidden;
  637. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-bg.png');
  638. background-repeat: no-repeat;
  639. background-size: 100%;
  640. .icon {
  641. position: absolute;
  642. top: 15px;
  643. left: 20px;
  644. }
  645. .text {
  646. font-size: 16px;
  647. color: #000;
  648. font-weight: bold;
  649. .text-sub {
  650. font-size: 12px;
  651. color: #989587;
  652. }
  653. }
  654. .count {
  655. font-size: 24px;
  656. font-weight: bold;
  657. }
  658. .icon-top{
  659. width: 40px;
  660. height: 40px;
  661. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-icon1.svg');
  662. background-repeat: no-repeat;
  663. background-size: 100%;;
  664. }
  665. .icon-bottom{
  666. width: 40px;
  667. height: 20px;
  668. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-icon2.png');
  669. background-repeat: no-repeat;
  670. background-size: 100%;
  671. margin-top: -5px;
  672. }
  673. }
  674. .stat-item.high-risk {
  675. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-bg.png');
  676. .icon-top {
  677. background-image: url('/@/assets/images/overHaul/rootPage/over-limit-icon.svg');
  678. }
  679. .icon-bottom {
  680. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-icon2.png');
  681. }
  682. .count {
  683. color: #FF0000;
  684. }
  685. }
  686. .stat-item.medium-risk {
  687. background-image: url('/@/assets/images/overHaul/leafPage/medium-risk-bg.png');
  688. .icon-top {
  689. background-image: url('/@/assets/images/overHaul/leafPage/medium-risk-icon1.svg');
  690. }
  691. .icon-bottom {
  692. background-image: url('/@/assets/images/overHaul/leafPage/medium-risk-icon2.png');
  693. }
  694. .count {
  695. color: #FF7700;
  696. }
  697. }
  698. .stat-item.normal-risk {
  699. background-image: url('/@/assets/images/overHaul/leafPage/normal-risk-bg.png');
  700. .icon-top {
  701. background-image: url('/@/assets/images/overHaul/rootPage/data-break-icon.svg');
  702. }
  703. .icon-bottom {
  704. background-image: url('/@/assets/images/overHaul/leafPage/normal-risk-icon2.png');
  705. }
  706. .count {
  707. color: #D5C702;
  708. }
  709. }
  710. .stat-item.low-risk {
  711. background-image: url('/@/assets/images/overHaul/leafPage/low-risk-bg.png');
  712. .icon-top {
  713. background-image: url('/@/assets/images/overHaul/rootPage/data-quality-icon.svg');
  714. }
  715. .icon-bottom {
  716. background-image: url('/@/assets/images/overHaul/leafPage/low-risk-icon2.png');
  717. }
  718. .count {
  719. color: #0070FF;
  720. }
  721. }
  722. }
  723. /* // 预警详情样式 */
  724. .warning-details {
  725. background-color: #ffffff;
  726. margin-bottom: 20px;
  727. padding: 10px 12px;
  728. border-radius: 4px;
  729. }
  730. .details-header {
  731. display: flex;
  732. justify-content: space-between;
  733. align-items: center;
  734. margin-bottom: 16px;
  735. .title {
  736. font-size: 16px;
  737. font-weight: bold;
  738. color: #333;
  739. }
  740. .btn-group {
  741. display: flex;
  742. gap: 8px;
  743. }
  744. }
  745. .details-content {
  746. height: 450px;
  747. overflow-y: scroll;
  748. scroll-snap-type: y mandatory;
  749. }
  750. .warning-item {
  751. margin-bottom: 20px;
  752. background-color: rgba(218, 234, 251, 0.5);
  753. border-radius: 8px;
  754. padding: 16px;
  755. scroll-snap-align: start;
  756. }
  757. .item-header {
  758. display: flex;
  759. justify-content: space-between;
  760. align-items: center;
  761. padding-bottom: 10px;
  762. margin-bottom: 16px;
  763. border-bottom: 1px solid rgba(43, 111, 240, 0.2);
  764. .icon {
  765. width: 16px;
  766. height: 16px;
  767. background-image: url('/@/assets/images/overHaul/leafPage/info-card-icon1.svg');
  768. background-repeat: no-repeat;
  769. background-size: 100%;
  770. }
  771. .name {
  772. font-size: 16px;
  773. font-weight: bold;
  774. color: #333;
  775. margin: 0 15px 0px 5px;
  776. }
  777. .risk-level {
  778. width: fit-content;
  779. height: 24px;
  780. padding: 2px 8px;
  781. border-radius: 15px;
  782. font-size: 12px;
  783. background-color: #ff6b6b;
  784. color: white;
  785. }
  786. .header-left {
  787. display: flex;
  788. align-items: center;
  789. }
  790. .expand-btn {
  791. color: #2b6ff0;
  792. display: flex;
  793. align-items: center;
  794. gap: 4px;
  795. padding: 6px 12px;
  796. border: 1px solid #2b6ff0;
  797. border-radius: 4px;
  798. background-color: #E9F0FE;
  799. cursor: pointer;
  800. font-size: 12px;
  801. }
  802. .expand-btn:hover {
  803. color: #1a5cc8;
  804. }
  805. .arrow-icon-wrapper {
  806. width: 16px;
  807. height: 16px;
  808. position: relative;
  809. display: inline-block;
  810. }
  811. .arrow-icon {
  812. width: 16px;
  813. height: 16px;
  814. position: absolute;
  815. top: 50%;
  816. left: 50%;
  817. transform: translate(-50%, -50%);
  818. background-image: url('/@/assets/images/overHaul/rootPage/icon-details.png');
  819. background-repeat: no-repeat;
  820. background-size: 100% 100%;
  821. transition: transform 0.3s ease;
  822. }
  823. .arrow-icon.rotate {
  824. transform: translate(-50%, -50%) rotate(180deg);
  825. }
  826. }
  827. .btn-group {
  828. display: flex;
  829. gap: 8px;
  830. }
  831. .btn {
  832. color: #2b6ff0;
  833. padding: 6px 12px;
  834. border: 1px solid #2b6ff0;
  835. border-radius: 4px;
  836. background-color: #E9F0FE;
  837. cursor: pointer;
  838. font-size: 12px;
  839. }
  840. .data-row {
  841. display: grid;
  842. grid-template-columns: repeat(5, 1fr);
  843. gap: 12px;
  844. margin-bottom: 8px;
  845. }
  846. .data-col {
  847. width: 100%;
  848. height: 50px;
  849. position: relative;
  850. display: flex;
  851. flex-direction: row;
  852. align-items: start;
  853. justify-content: center ;
  854. padding: 0 16px 0 30px;
  855. border-radius: 4px;
  856. font-size: 12px;
  857. .col-icon {
  858. width: 50px;
  859. height: 50px;
  860. background-image: url('/@/assets/images/overHaul/rootPage/alarm-icon-bg.png');
  861. background-repeat: no-repeat;
  862. background-size: 100% 100%;
  863. align-items: center;
  864. display: flex;
  865. justify-content: center;
  866. .icon-item {
  867. width: 25px;
  868. height: 25px;
  869. background-image: url('/@/assets/images/overHaul/rootPage/alarm-icon-1.svg');
  870. background-repeat: no-repeat;
  871. background-size: 100% 100%;
  872. z-index: 1;
  873. }
  874. .alarm-icon-1 {
  875. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-1.svg');
  876. }
  877. .alarm-icon-2 {
  878. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-2.svg');
  879. }
  880. .alarm-icon-3 {
  881. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-3.svg');
  882. }
  883. .alarm-icon-4 {
  884. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-4.svg');
  885. }
  886. .alarm-icon-5 {
  887. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-5.svg');
  888. }
  889. .alarm-icon-6 {
  890. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-6.svg');
  891. }
  892. .alarm-icon-7 {
  893. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-7.svg');
  894. }
  895. .alarm-icon-8 {
  896. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-8.svg');
  897. }
  898. }
  899. .col-cont {
  900. width: calc(100% - 50px);
  901. height: 50px;
  902. background-image: url('/@/assets/images/overHaul/rootPage/alarm-content-bg.png');
  903. background-repeat: no-repeat;
  904. background-size: 100% 100%;
  905. padding: 0 20px;
  906. }
  907. .col-title {
  908. color: #000;
  909. font-size: 14px;
  910. margin-bottom: 5px;
  911. }
  912. .col-value {
  913. color: #000;
  914. font-size: 14px;
  915. .status-dot {
  916. width: 8px;
  917. height: 8px;
  918. border-radius: 50%;
  919. display: inline-block;
  920. }
  921. }
  922. .col-first-row {
  923. grid-column: span 1;
  924. }
  925. .col-second-row:nth-child(6) {
  926. grid-column: 1 / span 3; // 占据第 1 到第 3 列
  927. }
  928. .col-second-row:nth-child(7) {
  929. grid-column: span 1; // 占据第 4 列
  930. }
  931. .col-second-row:nth-child(8) {
  932. grid-column: span 1; // 占据第 5 列
  933. }
  934. }
  935. .half-year-statistics {
  936. background-color: #ffffff;
  937. margin-bottom: 20px;
  938. padding: 10px 12px;
  939. border-radius: 4px;
  940. .statistics-header {
  941. display: flex;
  942. justify-content: space-between;
  943. align-items: center;
  944. margin-bottom: 10px;
  945. }
  946. .title {
  947. font-size: 16px;
  948. font-weight: bold;
  949. color: #333;
  950. }
  951. .statistics-content {
  952. display: flex;
  953. gap: 20px; // 图表之间的间距
  954. }
  955. .chart-item {
  956. flex: 1;
  957. min-width: 0;
  958. padding: 10px;
  959. border-radius: 4px;
  960. background-color: #ecf4fd;
  961. align-items: center;
  962. display: flex;
  963. flex-direction: column;
  964. }
  965. .chart-title {
  966. min-width: 400px;
  967. font-size: 14px;
  968. font-weight: bold;
  969. color: #333;
  970. text-align: center;
  971. background-image: url('/@/assets/images/overHaul/rootPage/chart-title-bg.png');
  972. background-repeat: no-repeat;
  973. background-size: 100% 100%;
  974. }
  975. }
  976. </style>