RootPage.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349
  1. <template>
  2. <div class="dashboard-container">
  3. <Skeleton v-if="loading" active class="p-20px"></Skeleton>
  4. <div class="content-area" v-if="!loading">
  5. <!-- 顶部信息卡片 -->
  6. <div class="top-info">
  7. <!-- {{ mineStore.getRoot }} -->
  8. <div class="info-card">
  9. <div class="card-title">
  10. <div class="info-details">
  11. <div class="label">{{ mineStore.getRoot?.departName }}</div>
  12. <!-- <div class="tag" :style="{ backgroundColor: getAlarmColor(mineStore.alarmLevel), color: '#fff' }">{{ getRiskText(mineStore.alarmLevel) }}</div> -->
  13. </div>
  14. <div>
  15. <a-button class="btn" @click="handleGoToPageQuery('/basicinfo/access-statistics')">接入详情</a-button>
  16. </div>
  17. <div class="info-border">
  18. <div class="info-border-icon"></div>
  19. <div class="info-border-line"></div>
  20. <div class="info-border-icon"></div>
  21. </div>
  22. </div>
  23. <div class="card-details">
  24. <div v-for="value in accessStatics" :key="value.id" class="card-item">
  25. <div class="item-cont"> 组织机构:{{ value.name }} </div>
  26. <div class="item-cont"> 应接入:{{ value.yjNum }} </div>
  27. <div class="item-cont"> 在线:{{ value.zxNum }} </div>
  28. <div class="item-cont"> 中断:{{ value.zdNum }} </div>
  29. <div class="item-cont"> 未接入:{{ value.wjNum }} </div>
  30. <div class="item-cont"> 接入密闭数:{{ value.goafNum }} </div>
  31. <div class="bg-line"> </div>
  32. <div class="bg-icon"></div>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <!-- 预警统计 -->
  38. <div class="warning-statistics">
  39. <div class="statistics-header">
  40. <div class="title">实时预警统计</div>
  41. <div class="btn-group">
  42. <!-- <button class="btn">预警级别</button> -->
  43. </div>
  44. </div>
  45. <div class="statistics-content">
  46. <div class="stat-item high-risk">
  47. <div class="icon">
  48. <div class="icon-top"></div>
  49. <div class="icon-bottom"></div>
  50. </div>
  51. <div class="text cursor-pointer" @click="handleRouterPush('/warningAnalysis/overlimit-alarm')">超限异常报警</div>
  52. <div class="count">{{ get(realtimeWarning, 'overLimitCount', '-') }}</div>
  53. </div>
  54. <div class="stat-item medium-risk">
  55. <div class="icon">
  56. <div class="icon-top"></div>
  57. <div class="icon-bottom"></div>
  58. </div>
  59. <div class="text cursor-pointer" @click="handleRouterPush('/sealed')">预测预警</div>
  60. <div class="count">{{ get(realtimeWarning, 'alarmInfoCount', '-') }}</div>
  61. </div>
  62. <div class="stat-item normal-risk">
  63. <div class="icon">
  64. <div class="icon-top"></div>
  65. <div class="icon-bottom"></div>
  66. </div>
  67. <div class="text cursor-pointer" @click="handleRouterPush('/warningAnalysis/report-analysis')">数据中断</div>
  68. <div class="count">{{ get(realtimeWarning, 'dataBreakCount', '-') }}</div>
  69. </div>
  70. <div class="stat-item low-risk">
  71. <div class="icon">
  72. <div class="icon-top"></div>
  73. <div class="icon-bottom"></div>
  74. </div>
  75. <div class="text cursor-pointer" @click="handleRouterPush('/basicinfo/data-quality')">数据质量</div>
  76. <div class="count">{{ get(realtimeWarning, 'dataQualityCount', '-') }}</div>
  77. </div>
  78. </div>
  79. </div>
  80. <!-- 预警数据详情 -->
  81. <div class="warning-details">
  82. <div class="details-header">
  83. <div class="title">预警数据详情</div>
  84. <div class="btn-group">
  85. <button class="btn" @click="handleShowDetail({ deptId: mineStore.getDepartId })">展开详情</button>
  86. </div>
  87. </div>
  88. <div class="details-content">
  89. <div v-for="(item, index) in mineData" :key="index" class="warning-item">
  90. <div class="item-header">
  91. <div class="header-left">
  92. <div class="icon"></div>
  93. <div class="name">煤矿名称: {{ item.mineName }}</div>
  94. <div class="risk-level" :style="{ backgroundColor: getAlarmColor(item.alarmLevel), color: '#fff' }">
  95. {{ getRiskText(item.alarmLevel) }}
  96. </div>
  97. </div>
  98. <a-button class="expand-btn" @click="handleShowDetail(item)">
  99. 详情
  100. <div class="arrow-icon-wrapper">
  101. <div class="arrow-icon"></div>
  102. </div>
  103. </a-button>
  104. </div>
  105. <div class="item-body">
  106. <div class="data-row">
  107. <div v-for="(col, colIndex) in dataColumns" :key="colIndex" class="data-col" :style="{ gridColumn: `span ${col.span}` }">
  108. <div class="col-icon">
  109. <div class="icon-item" :class="`alarm-icon-${(colIndex % 8) + 1}`"></div>
  110. </div>
  111. <div class="col-cont">
  112. <div class="col-title">{{ col.label }}</div>
  113. <div class="col-value" :style="{ color: getColValueColor(col, item) }">
  114. <span
  115. v-if="col.showPoint"
  116. class="status-dot"
  117. :style="{
  118. backgroundColor: getColValueColor(col, item),
  119. boxShadow: `0 0 10px ${getColValueColor(col, item)}`,
  120. }"
  121. ></span>
  122. <span class="text-content"> {{ getColDisplayText(col, item) }} </span>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <!-- 近半年报警统计 -->
  132. <div class="half-year-statistics">
  133. <div class="statistics-header">
  134. <div class="title">近半年预测预报统计</div>
  135. <div class="btn-group">
  136. <button class="btn" @click="toggleChartVisibility">
  137. {{ isChartVisible ? '收起图表' : '展开图表' }}
  138. </button>
  139. </div>
  140. </div>
  141. <div class="statistics-content" v-show="isChartVisible">
  142. <!-- 左侧饼图区域 -->
  143. <div class="chart-item pie-chart">
  144. <div class="chart-title">预测预报类型统计</div>
  145. <div class="flex w-full h-full items-center">
  146. <div class="flex-basis-300px flex-shrink-0">
  147. <Pie :option="pieOption" :chart-data="alarmType" height="390px"></Pie>
  148. </div>
  149. <div class="flex justify-around items-center flex-wrap h-300px">
  150. <div v-for="item in alarmType" :key="item.key" class="pie-legends">
  151. <div class="pie-legends-title">{{ item.name }}</div>
  152. <div class="pie-legends-value">{{ item.value }}</div>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <!-- 右侧柱状图区域 -->
  158. <div class="chart-item bar-chart">
  159. <div class="chart-title">重点矿井报警次数统计</div>
  160. <Bar :chart-data="historyAlarmNum" :option="barOption" height="390px"></Bar>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <!-- 实时数据表格 -->
  166. <BasicModal v-model:open="isDetailModalVisible" title="实时数据详情" width="70%" centered :footer="null" @cancel="handleModalClose">
  167. <BasicTable @register="registerRealtimeTable">
  168. <template #action="{ record }">
  169. <div class="action-buttons">
  170. <button @click="openModal(record)" class="action-btn" title="详情">
  171. <SvgIcon name="details" />
  172. </button>
  173. </div>
  174. </template>
  175. </BasicTable>
  176. </BasicModal>
  177. <!-- 密闭监测详情弹框 -->
  178. <HistoricalDetailsModal :modal-details-data="modalDetailsData" @register="registerDetailModal" @close="resume" />
  179. </div>
  180. </template>
  181. <script setup lang="ts">
  182. import { useRouter } from 'vue-router';
  183. import { ref, watch } from 'vue';
  184. import { getAlarmType, getGoafAccessCount, getHistoryAlarmNum, getMineData, getRealAlarmNum, getGoafData } from '../overhaul.api';
  185. import { columns } from '../overhaul.data';
  186. import { useMineDepartmentStore } from '/@/store/modules/mine';
  187. import { useListPage } from '/@/hooks/system/useListPage';
  188. import dayjs from 'dayjs';
  189. import Pie from '/@/components/chart/Pie.vue';
  190. import Bar from '/@/components/chart/Bar.vue';
  191. import { StatusColorEnum } from '/@/enums/jeecgEnum';
  192. import { BasicTable } from '/@/components/Table';
  193. import { BasicModal } from '/@/components/Modal';
  194. import { Skeleton } from 'ant-design-vue';
  195. import { EChartsOption, graphic } from 'echarts';
  196. import IMG1 from '/@/assets/images/overHaul/rootPage/pie-chart-center.png';
  197. import IMG2 from '/@/assets/images/overHaul/rootPage/alarm-icon-9.svg';
  198. import { get } from 'lodash-es';
  199. import HistoricalDetailsModal from '../../../monitor/sealedMonitor/components/HistoricalDetailsModal.vue';
  200. import { modalDetailsData } from '../../../monitor/sealedMonitor/monitor.data';
  201. import { useModal } from '/@/components/Modal';
  202. import { SvgIcon } from '/@/components/Icon';
  203. import { useIntervalFn } from '@vueuse/core';
  204. import { advancedRoutePush } from '/@/utils';
  205. // 处理矿名选择器相关的逻辑
  206. const isDetailModalVisible = ref(false);
  207. const currentDeptId = ref<string | number>('');
  208. const getDynamicTableData = (params: any) => {
  209. // 如果 currentDeptId 存在,则覆盖 params 中的 deptId
  210. if (currentDeptId.value) {
  211. params.deptId = currentDeptId.value;
  212. } else {
  213. // 默认使用 rootId,防止初始加载时无数据
  214. params.deptId = mineStore.getDepartId;
  215. }
  216. return getGoafData(params);
  217. };
  218. // 注册实时数据表格
  219. const { tableContext: ctxRealtime } = useListPage({
  220. tableProps: {
  221. api: getDynamicTableData,
  222. columns,
  223. showIndexColumn: false,
  224. scroll: { x: 'max-content', y: 500 },
  225. useSearchForm: false, // 隐藏搜索表单
  226. // showActionButtonGroup: false,
  227. },
  228. pagination: false,
  229. exportConfig: {
  230. url: '/ventanaly-province/province/device/exportGoafReal',
  231. name: '老空区永久密闭监测数据',
  232. // params: {
  233. // goafId,
  234. // },
  235. },
  236. });
  237. const [registerRealtimeTable, realtimeTable] = ctxRealtime;
  238. const handleShowDetail = (item: any) => {
  239. // 设置当前选中的 deptId
  240. currentDeptId.value = item.deptId;
  241. // 显示弹框
  242. isDetailModalVisible.value = true;
  243. // 关键:手动触发表格刷新,因为 api 依赖的 ref 变化可能不会自动触发 BasicTable 的内部重载
  244. // 使用 nextTick 确保 DOM 更新后再重载,或者直接在 modal 的 open 事件中处理
  245. setTimeout(() => {
  246. realtimeTable?.reload();
  247. }, 100);
  248. };
  249. const handleModalClose = () => {
  250. isDetailModalVisible.value = false;
  251. currentDeptId.value = ''; // 可选:清空状态
  252. };
  253. // 详情弹窗(复用 HistoricalDetailsModal)
  254. const [registerDetailModal, { openModal: openDetailModal }] = useModal();
  255. const { resume } = useIntervalFn(() => {}, 60000, { immediate: false });
  256. const openModal = (record: any) => {
  257. openDetailModal(true, record);
  258. };
  259. // 路由实例
  260. const router = useRouter();
  261. const mineStore = useMineDepartmentStore();
  262. // 数据加载状态
  263. const loading = ref(false);
  264. const accessStatics = ref<any[]>([]);
  265. // 控制图表显示/隐藏的状态
  266. const isChartVisible = ref(true);
  267. const dataColumns = [
  268. { label: '瓦斯等级', key: 'gasLevelName', type: 'alarm', showPoint: true, span: 1 },
  269. { label: '煤层自燃倾向性', key: 'fire', type: 'text', span: 1 },
  270. { label: '联网', key: 'status', colorKey: 'status', type: 'status', showPoint: true, span: 1 },
  271. { label: '永久密闭数量', key: 'goafDataCount', type: 'custom', span: 1 },
  272. { label: '报警数量', key: 'alarmGoafNum', type: 'custom', span: 1 },
  273. // { label: '报警原因', key: 'alarmReasons', type: 'custom', span: 1 },
  274. { label: '开始预警时间', key: 'earliestTime', type: 'text', span: 1 },
  275. { label: '最新监测时间', key: 'latestReadTime', type: 'text', span: 1 },
  276. ];
  277. // const alartTypeColumns = [
  278. // 'fireAlarm',
  279. // 'fireAlarmOut',
  280. // 'explosionAlarm',
  281. // 'sourcePressureAlarm',
  282. // 'leakageAlarm',
  283. // 'unsealAlarm',
  284. // // {key: 'fireAlarm', label: '闭内自燃发火'},
  285. // // {key: 'fireAlarmOut', label: '闭外自燃发火'},
  286. // // {key: 'explosionAlarm', label: '爆炸预警'},
  287. // // {key: 'sourcePressureAlarm', label: '压差隐患'},
  288. // // {key: 'leakageAlarm', label: '漏风'},
  289. // // {key: 'unsealAlarm', label: '密闭启封'},
  290. // ];
  291. /**
  292. * 单一刷新方法:并行获取所有接口数据,统一处理空数组/undefined 兜底
  293. */
  294. const realtimeWarning = ref<any>({});
  295. const alarmType = ref<any[]>([]);
  296. const historyAlarmNum = ref<any[]>([]);
  297. const mineData = ref<any>([]);
  298. async function fetchAllData() {
  299. const deptId = mineStore.getDepartId;
  300. if (!deptId) return;
  301. const [accessResult, realtimeResult, alarmTypeResult, historyResult, mineResult] = await Promise.all([
  302. getGoafAccessCount({ deptId }),
  303. getRealAlarmNum({ deptId }),
  304. getAlarmType({
  305. deptId,
  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. getHistoryAlarmNum({
  310. deptId,
  311. startTime: dayjs().add(-6, 'months').format('YYYY-MM-DD HH:mm:ss'),
  312. endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
  313. }),
  314. getMineData({ deptId }),
  315. ]);
  316. // —— 兜底处理:接口返回空数组/undefined 时使用安全的默认值 ——
  317. accessStatics.value = Array.isArray(accessResult) ? accessResult : [];
  318. realtimeWarning.value = realtimeResult ?? {};
  319. const alarmTypeList = Array.isArray(alarmTypeResult) ? alarmTypeResult : [];
  320. alarmType.value = alarmTypeList.map((e) => ({
  321. key: e.alarm_type,
  322. name: e.name,
  323. value: e.num,
  324. }));
  325. const historyList = Array.isArray(historyResult) ? historyResult : [];
  326. historyAlarmNum.value = historyList.map((e) => ({
  327. name: e.mine_name,
  328. value: e.num,
  329. }));
  330. const mineRecords = Array.isArray(mineResult?.records) ? mineResult.records : [];
  331. mineData.value = mineRecords;
  332. }
  333. /**
  334. * 风险等级映射配置
  335. */
  336. const RISK_LEVEL_MAP: Record<string, { text: string; color: string }> = {
  337. '4': { text: '高风险', color: StatusColorEnum.red },
  338. '3': { text: '较高风险', color: StatusColorEnum.gold },
  339. '2': { text: '一般风险', color: StatusColorEnum.yellow },
  340. '1': { text: '低风险', color: StatusColorEnum.blue },
  341. '0': { text: '无风险', color: '#333' }, // 假设 0 为无风险或默认
  342. };
  343. /**
  344. * 获取报警颜色
  345. * @param level 报警级别 '1', '2', '3', '4'
  346. */
  347. const getAlarmColor = (level?: string | number) => {
  348. if (!level && level !== 0) return '#333'; // 默认颜色
  349. return RISK_LEVEL_MAP[String(level)]?.color;
  350. };
  351. /**
  352. * 获取风险等级对应的文本
  353. * @param level 报警级别 '1', '2', '3', '4'
  354. */
  355. const getRiskText = (level?: string | number) => {
  356. if (!level && level !== 0) return '-';
  357. return RISK_LEVEL_MAP[String(level)]?.text || '-';
  358. };
  359. /**
  360. * 通用页面跳转方法
  361. * @param record 当前行数据
  362. * @param path 目标路径
  363. */
  364. function handleGoToPageQuery(path: string) {
  365. router
  366. .push({
  367. path,
  368. })
  369. .catch((err) => {
  370. console.error('跳转失败:', err);
  371. });
  372. }
  373. /**
  374. * 获取列显示的颜色
  375. */
  376. const getColValueColor = (col: any, item: any) => {
  377. if (col.key === 'gasLevelName') {
  378. const val = getDataValue(item, col.key);
  379. if (!val || val === '-') return '#000';
  380. const strVal = String(val);
  381. if (strVal.includes('突出')) {
  382. return StatusColorEnum.red; // 红色
  383. } else if (strVal.includes('高瓦斯')) {
  384. return StatusColorEnum.gold; // 橙色/金色
  385. } else if (strVal.includes('低瓦斯')) {
  386. return StatusColorEnum.blue; // 蓝色
  387. }
  388. return '#000';
  389. }
  390. // 如果是报警类型,使用原有的报警颜色逻辑
  391. if (col.type === 'alarm' && col.colorKey) {
  392. return getAlarmColor(getDataValue(item, col.colorKey));
  393. }
  394. // 如果是设备状态类型,使用状态颜色逻辑
  395. if (col.type === 'status') {
  396. return getlinkStatusInfo(getDataValue(item, col.key)).color;
  397. }
  398. // 默认黑色
  399. return '#000';
  400. };
  401. /**
  402. * 根据点分字符串路径获取对象值 (例如: 'fireAlarm.alarmName')
  403. * @param item 数据对象
  404. * @param path 路径字符串
  405. * @param defaultValue 默认值
  406. */
  407. const getDataValue = (item: any, path: string, defaultValue: string = '-') => {
  408. if (!item || !path) return defaultValue;
  409. const val = path.split('.').reduce((acc, part) => acc && acc[part], item);
  410. return val ?? defaultValue;
  411. };
  412. /**
  413. * 获取设备状态信息 (文本和颜色)
  414. * @param status 0: 断开, 1: 正常
  415. */
  416. const getlinkStatusInfo = (status?: number | string) => {
  417. if (status === 1 || status === '1') {
  418. return { text: '正常', color: '#52c41a' }; // 绿色
  419. }
  420. return { text: '断开', color: '#ff4d4f' }; // 红色
  421. };
  422. /**
  423. * 获取列显示的文本
  424. */
  425. const getColDisplayText = (col: any, item: any) => {
  426. const rawValue = getDataValue(item, col.key);
  427. if (col.type === 'status') {
  428. return getlinkStatusInfo(rawValue).text;
  429. }
  430. // 处理永久密闭数量:取 goafDataList 的长度
  431. if (col.key === 'goafDataCount') {
  432. return item.goafDataList && Array.isArray(item.goafDataList) ? item.goafDataList.length : 0;
  433. }
  434. if (col.key === 'alarmCount') {
  435. // 取 alarmRecordList 的长度
  436. return item.alarmRecordList ? item.alarmRecordList.length : 0;
  437. }
  438. if (col.key === 'alarmReasons') {
  439. // 遍历 alarmRecordList 拼接 alarmName
  440. if (!item.alarmRecordList || !Array.isArray(item.alarmRecordList)) {
  441. return '-';
  442. }
  443. const names = item.alarmRecordList.map((record: any) => record.alarmName).filter(Boolean);
  444. return names.length > 0 ? names.join('、') : '-';
  445. }
  446. if (col.key === 'latestReadTime') {
  447. // 安全获取 goafDataList 第一个元素的 readTime
  448. if (item.goafDataList && Array.isArray(item.goafDataList) && item.goafDataList.length > 0) {
  449. return item.goafDataList[0].readTime || '-';
  450. }
  451. return '-';
  452. }
  453. // 默认直接返回原始值或经过 getDataValue 处理后的值
  454. return rawValue;
  455. };
  456. // 跳转至密闭监测页面(不带 level 过滤,展示所有预警)
  457. function handleRouterPush(path) {
  458. return advancedRoutePush({
  459. path,
  460. query: { deptId: mineStore.getDepartId },
  461. });
  462. }
  463. // 切换图表显示状态
  464. const toggleChartVisibility = () => {
  465. isChartVisible.value = !isChartVisible.value;
  466. };
  467. const pieOption: EChartsOption = {
  468. series: [
  469. {
  470. type: 'pie',
  471. // 关键: radius 数组,第一个值是内径(留白),第二个是外径(扇区范围)
  472. radius: ['54%', '70%'],
  473. color: ['#0070ff', '#0bc9d6', '#00c31a', '#ffa200', '#d2c629', '#8a53c1'],
  474. colorBy: 'data',
  475. // 其他饼图样式配置(可选)
  476. label: { show: false },
  477. // padAngle: 4,
  478. itemStyle: { borderColor: '#fff', borderWidth: 2 },
  479. minAngle: 5,
  480. },
  481. ],
  482. // 关键: graphic 配置,用于在中心添加图片
  483. graphic: {
  484. elements: [
  485. {
  486. type: 'image', // 类型为图片
  487. // left: 'center' 和 top: 'center' 使图片居中于图表容器
  488. left: 'center',
  489. top: 'center',
  490. style: {
  491. // 图片路径或 base64
  492. image: IMG1,
  493. width: 260, // 图片宽度,单位px
  494. height: 260, // 图片高度,单位px
  495. },
  496. // 可选:设置 z 层级确保不被扇区遮盖
  497. // z: 100,
  498. },
  499. {
  500. type: 'image', // 类型为图片
  501. // left: 'center' 和 top: 'center' 使图片居中于图表容器
  502. left: 'center',
  503. top: 'center',
  504. style: {
  505. // 图片路径或 base64
  506. image: IMG2,
  507. width: 80, // 图片宽度,单位px
  508. height: 80, // 图片高度,单位px
  509. },
  510. },
  511. ],
  512. },
  513. };
  514. const barConfig = {
  515. halfWidth: 12,
  516. offsetY: 6,
  517. };
  518. // ========== 左侧面 ==========
  519. const CubeLeft = graphic.extendShape({
  520. shape: { x: 0, y: 0 },
  521. buildPath: function (ctx, shape) {
  522. const { halfWidth, offsetY } = barConfig;
  523. const xAxisPoint = shape.xAxisPoint;
  524. const c0 = [shape.x, shape.y];
  525. const c1 = [shape.x - halfWidth, shape.y - offsetY];
  526. const c2 = [xAxisPoint[0] - halfWidth, xAxisPoint[1]];
  527. const c3 = [xAxisPoint[0], xAxisPoint[1] + offsetY];
  528. ctx.moveTo(c0[0], c0[1])!.lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
  529. },
  530. });
  531. const CubeRight = graphic.extendShape({
  532. shape: { x: 0, y: 0 },
  533. buildPath: function (ctx, shape) {
  534. const { halfWidth, offsetY } = barConfig;
  535. const xAxisPoint = shape.xAxisPoint;
  536. const c0 = [shape.x, shape.y];
  537. const c1 = [xAxisPoint[0], xAxisPoint[1] + offsetY];
  538. const c2 = [xAxisPoint[0] + halfWidth, xAxisPoint[1]];
  539. const c3 = [shape.x + halfWidth, shape.y - offsetY];
  540. ctx.moveTo(c0[0], c0[1])!.lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
  541. },
  542. });
  543. // ========== 顶面 ==========
  544. const CubeTop = graphic.extendShape({
  545. shape: { x: 0, y: 0 },
  546. buildPath: function (ctx, shape) {
  547. const { halfWidth, offsetY } = barConfig;
  548. const c0 = [shape.x, shape.y];
  549. const c1 = [shape.x - halfWidth, shape.y - offsetY];
  550. const c2 = [shape.x, shape.y - 2 * offsetY];
  551. const c3 = [shape.x + halfWidth, shape.y - offsetY];
  552. ctx.moveTo(c0[0], c0[1])!.lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
  553. },
  554. });
  555. // 注册形状
  556. graphic.registerShape('CubeLeft', CubeLeft);
  557. graphic.registerShape('CubeRight', CubeRight);
  558. graphic.registerShape('CubeTop', CubeTop);
  559. const barOption: EChartsOption = {
  560. grid: {
  561. left: '10%',
  562. right: '10%',
  563. bottom: '10%',
  564. top: '10%',
  565. },
  566. xAxis: {
  567. type: 'category',
  568. axisLabel: {
  569. interval: 0,
  570. overflow: 'break',
  571. width: 100,
  572. },
  573. },
  574. yAxis: {
  575. type: 'value',
  576. name: '报警数量',
  577. },
  578. // @ts-ignore-next-line
  579. series: [
  580. {
  581. type: 'custom',
  582. renderItem: function (params, api) {
  583. // 获取当前柱子的数值和位置
  584. const value = api.value(1);
  585. const point = api.coord([api.value(0), value]);
  586. const basePoint = api.coord([api.value(0), 0]);
  587. // 统一柱子颜色(渐变)
  588. return {
  589. type: 'group',
  590. children: [
  591. {
  592. type: 'CubeLeft',
  593. shape: { x: point[0], y: point[1], xAxisPoint: basePoint },
  594. style: {
  595. fill: new graphic.LinearGradient(0, 0, 1, 1, [
  596. { offset: 0, color: '#004dbb' },
  597. { offset: 1, color: '#157cfe' },
  598. ]),
  599. },
  600. },
  601. {
  602. type: 'CubeRight',
  603. shape: { x: point[0], y: point[1], xAxisPoint: basePoint },
  604. style: {
  605. fill: new graphic.LinearGradient(1, 0, 0, 0, [
  606. { offset: 0, color: '#004dbb' },
  607. { offset: 1, color: '#157cfe' },
  608. ]),
  609. },
  610. },
  611. {
  612. type: 'CubeTop',
  613. shape: { x: point[0], y: point[1] },
  614. style: {
  615. fill: new graphic.LinearGradient(0, 0, 0, 1, [
  616. { offset: 0, color: '#004dbb' },
  617. { offset: 1, color: '#157cfe' },
  618. ]),
  619. },
  620. },
  621. ],
  622. };
  623. },
  624. },
  625. ],
  626. };
  627. watch(
  628. () => mineStore.getDepartId,
  629. async (newId) => {
  630. if (!newId) return;
  631. loading.value = true;
  632. await fetchAllData();
  633. loading.value = false;
  634. },
  635. {
  636. immediate: true,
  637. }
  638. );
  639. </script>
  640. <style lang="less" scoped>
  641. .dashboard-container {
  642. display: flex;
  643. flex-direction: column;
  644. height: 100%;
  645. overflow: scroll;
  646. }
  647. .content-area {
  648. flex: 1;
  649. padding: 20px;
  650. background-color: #f0f8ff;
  651. }
  652. // 顶部信息总览样式
  653. .top-info {
  654. width: 100%;
  655. height: 200px;
  656. margin-bottom: 20px;
  657. flex-shrink: 0;
  658. }
  659. .info-card {
  660. width: 100%;
  661. height: 100%;
  662. display: flex;
  663. flex-direction: row;
  664. background-image: url('/@/assets/images/overHaul/leafPage/info-card-bg.png');
  665. background-repeat: no-repeat;
  666. background-size: 100%;
  667. border-radius: 8px;
  668. padding: 20px;
  669. }
  670. .card-title {
  671. width: 20%;
  672. position: relative;
  673. display: flex;
  674. flex-direction: column;
  675. justify-content: space-between;
  676. padding: 8px 10px 8px 50px;
  677. .btn {
  678. color: #fff;
  679. background-color: #2b6ff0;
  680. &:hover {
  681. background-color: #397af3;
  682. }
  683. }
  684. }
  685. .info-border {
  686. position: absolute;
  687. top: 20px;
  688. left: 20px;
  689. .info-border-icon {
  690. width: 16px;
  691. height: 16px;
  692. background-image: url('/@/assets/images/overHaul/leafPage/info-card-icon1.svg');
  693. background-repeat: no-repeat;
  694. background-size: 100%;
  695. }
  696. .info-border-line {
  697. width: 1px;
  698. height: 95px;
  699. border-left: 2px dotted #397af3;
  700. margin-left: 7px;
  701. }
  702. }
  703. .info-details {
  704. display: flex;
  705. flex-direction: column;
  706. justify-content: space-between;
  707. padding: 8px 0;
  708. .label {
  709. font-size: 16px;
  710. color: #000;
  711. }
  712. .value {
  713. font-size: 16px;
  714. color: #000;
  715. }
  716. .tag {
  717. width: fit-content;
  718. height: 24px;
  719. padding: 2px 8px;
  720. border-radius: 15px;
  721. font-size: 12px;
  722. background-color: #ff6b6b;
  723. color: white;
  724. }
  725. }
  726. .card-details {
  727. width: 80%;
  728. height: 100%;
  729. display: flex;
  730. flex-direction: column;
  731. overflow-y: auto;
  732. gap: 15px;
  733. }
  734. .card-item {
  735. position: relative;
  736. display: flex;
  737. justify-content: space-between;
  738. background-color: #f1f7ff;
  739. height: 40px;
  740. align-items: center;
  741. box-sizing: border-box;
  742. flex-shrink: 0;
  743. padding: 0 0 0 20px;
  744. overflow: hidden;
  745. .item-cont {
  746. color: #000;
  747. font-weight: 500;
  748. background-color: #f1f7ff;
  749. z-index: 1;
  750. padding: 0 10px;
  751. }
  752. .bg-line {
  753. position: absolute;
  754. width: 100%;
  755. height: 1px;
  756. border-top: 2px dotted #397af3;
  757. }
  758. .bg-icon {
  759. width: 15px;
  760. height: 15px;
  761. position: absolute;
  762. left: 10px;
  763. background-image: url('/@/assets/images/overHaul/leafPage/info-card-icon.svg');
  764. background-repeat: no-repeat;
  765. background-size: 100%;
  766. z-index: 1;
  767. }
  768. }
  769. /* // 预警统计样式 */
  770. .warning-statistics {
  771. background-color: #ffffff;
  772. margin-bottom: 20px;
  773. padding: 10px 12px;
  774. border-radius: 4px;
  775. .statistics-header {
  776. display: flex;
  777. justify-content: space-between;
  778. align-items: center;
  779. margin-bottom: 10px;
  780. }
  781. .title {
  782. font-size: 16px;
  783. font-weight: bold;
  784. color: #333;
  785. }
  786. .btn-group {
  787. display: flex;
  788. gap: 8px;
  789. }
  790. .btn {
  791. color: #2b6ff0;
  792. padding: 6px 12px;
  793. border: 1px solid #2b6ff0;
  794. border-radius: 4px;
  795. background-color: #e9f0fe;
  796. cursor: pointer;
  797. font-size: 12px;
  798. }
  799. .btn:hover {
  800. background-color: #f5f5f5;
  801. }
  802. .statistics-content {
  803. display: flex;
  804. gap: 50px;
  805. }
  806. .stat-item {
  807. flex: 1;
  808. padding: 16px 50px 10px 90px;
  809. text-align: left;
  810. position: relative;
  811. overflow: hidden;
  812. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-bg.png');
  813. background-repeat: no-repeat;
  814. background-size: 100%;
  815. .icon {
  816. position: absolute;
  817. top: 15px;
  818. left: 20px;
  819. }
  820. .text {
  821. font-size: 16px;
  822. color: #000;
  823. font-weight: bold;
  824. .text-sub {
  825. font-size: 12px;
  826. color: #989587;
  827. }
  828. }
  829. .count {
  830. font-size: 24px;
  831. font-weight: bold;
  832. }
  833. .icon-top {
  834. width: 40px;
  835. height: 40px;
  836. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-icon1.svg');
  837. background-repeat: no-repeat;
  838. background-size: 100%;
  839. }
  840. .icon-bottom {
  841. width: 40px;
  842. height: 20px;
  843. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-icon2.png');
  844. background-repeat: no-repeat;
  845. background-size: 100%;
  846. margin-top: -5px;
  847. }
  848. }
  849. .stat-item.high-risk {
  850. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-bg.png');
  851. .icon-top {
  852. background-image: url('/@/assets/images/overHaul/rootPage/over-limit-icon.svg');
  853. }
  854. .icon-bottom {
  855. background-image: url('/@/assets/images/overHaul/leafPage/high-risk-icon2.png');
  856. }
  857. .count {
  858. color: #ff0000;
  859. }
  860. }
  861. .stat-item.medium-risk {
  862. background-image: url('/@/assets/images/overHaul/leafPage/medium-risk-bg.png');
  863. .icon-top {
  864. background-image: url('/@/assets/images/overHaul/leafPage/medium-risk-icon1.svg');
  865. }
  866. .icon-bottom {
  867. background-image: url('/@/assets/images/overHaul/leafPage/medium-risk-icon2.png');
  868. }
  869. .count {
  870. color: #ff7700;
  871. }
  872. }
  873. .stat-item.normal-risk {
  874. background-image: url('/@/assets/images/overHaul/leafPage/normal-risk-bg.png');
  875. .icon-top {
  876. background-image: url('/@/assets/images/overHaul/rootPage/data-break-icon.svg');
  877. }
  878. .icon-bottom {
  879. background-image: url('/@/assets/images/overHaul/leafPage/normal-risk-icon2.png');
  880. }
  881. .count {
  882. color: #d5c702;
  883. }
  884. }
  885. .stat-item.low-risk {
  886. background-image: url('/@/assets/images/overHaul/leafPage/low-risk-bg.png');
  887. .icon-top {
  888. background-image: url('/@/assets/images/overHaul/rootPage/data-quality-icon.svg');
  889. }
  890. .icon-bottom {
  891. background-image: url('/@/assets/images/overHaul/leafPage/low-risk-icon2.png');
  892. }
  893. .count {
  894. color: #0070ff;
  895. }
  896. }
  897. }
  898. /* // 预警详情样式 */
  899. .warning-details {
  900. background-color: #ffffff;
  901. margin-bottom: 20px;
  902. padding: 10px 12px;
  903. border-radius: 4px;
  904. }
  905. .details-header {
  906. display: flex;
  907. justify-content: space-between;
  908. align-items: center;
  909. margin-bottom: 16px;
  910. .title {
  911. font-size: 16px;
  912. font-weight: bold;
  913. color: #333;
  914. }
  915. .btn-group {
  916. display: flex;
  917. gap: 8px;
  918. }
  919. }
  920. .details-content {
  921. max-height: 450px;
  922. overflow-y: auto;
  923. scroll-snap-type: y mandatory;
  924. }
  925. .warning-item {
  926. margin-bottom: 20px;
  927. background-color: rgba(218, 234, 251, 0.5);
  928. border-radius: 8px;
  929. padding: 16px;
  930. scroll-snap-align: start;
  931. }
  932. .item-header {
  933. display: flex;
  934. justify-content: space-between;
  935. align-items: center;
  936. padding-bottom: 10px;
  937. margin-bottom: 16px;
  938. border-bottom: 1px solid rgba(43, 111, 240, 0.2);
  939. .icon {
  940. width: 16px;
  941. height: 16px;
  942. background-image: url('/@/assets/images/overHaul/leafPage/info-card-icon1.svg');
  943. background-repeat: no-repeat;
  944. background-size: 100%;
  945. }
  946. .name {
  947. font-size: 16px;
  948. font-weight: bold;
  949. color: #333;
  950. margin: 0 15px 0px 5px;
  951. }
  952. .risk-level {
  953. width: fit-content;
  954. height: 24px;
  955. padding: 2px 8px;
  956. border-radius: 15px;
  957. font-size: 12px;
  958. background-color: #ff6b6b;
  959. color: white;
  960. }
  961. .header-left {
  962. display: flex;
  963. align-items: center;
  964. }
  965. .expand-btn {
  966. color: #2b6ff0;
  967. display: flex;
  968. align-items: center;
  969. gap: 4px;
  970. padding: 6px 12px;
  971. border: 1px solid #2b6ff0;
  972. border-radius: 4px;
  973. background-color: #e9f0fe;
  974. cursor: pointer;
  975. font-size: 12px;
  976. }
  977. .expand-btn:hover {
  978. color: #1a5cc8;
  979. }
  980. .arrow-icon-wrapper {
  981. width: 16px;
  982. height: 16px;
  983. position: relative;
  984. display: inline-block;
  985. }
  986. .arrow-icon {
  987. width: 16px;
  988. height: 16px;
  989. position: absolute;
  990. top: 50%;
  991. left: 50%;
  992. transform: translate(-50%, -50%);
  993. background-image: url('/@/assets/images/overHaul/rootPage/icon-details.png');
  994. background-repeat: no-repeat;
  995. background-size: 100% 100%;
  996. transition: transform 0.3s ease;
  997. }
  998. .arrow-icon.rotate {
  999. transform: translate(-50%, -50%) rotate(180deg);
  1000. }
  1001. }
  1002. .btn-group {
  1003. display: flex;
  1004. gap: 8px;
  1005. }
  1006. .btn {
  1007. color: #2b6ff0;
  1008. padding: 6px 12px;
  1009. border: 1px solid #2b6ff0;
  1010. border-radius: 4px;
  1011. background-color: #e9f0fe;
  1012. cursor: pointer;
  1013. font-size: 12px;
  1014. }
  1015. .data-row {
  1016. display: grid;
  1017. grid-template-columns: repeat(4, 1fr);
  1018. gap: 12px;
  1019. margin-bottom: 8px;
  1020. }
  1021. .data-col {
  1022. width: 100%;
  1023. height: 50px;
  1024. position: relative;
  1025. display: flex;
  1026. flex-direction: row;
  1027. align-items: start;
  1028. justify-content: center;
  1029. padding: 0 16px 0 30px;
  1030. border-radius: 4px;
  1031. font-size: 12px;
  1032. .col-icon {
  1033. width: 50px;
  1034. height: 50px;
  1035. background-image: url('/@/assets/images/overHaul/rootPage/alarm-icon-bg.png');
  1036. background-repeat: no-repeat;
  1037. background-size: 100% 100%;
  1038. align-items: center;
  1039. display: flex;
  1040. justify-content: center;
  1041. .icon-item {
  1042. width: 25px;
  1043. height: 25px;
  1044. background-image: url('/@/assets/images/overHaul/rootPage/alarm-icon-1.svg');
  1045. background-repeat: no-repeat;
  1046. background-size: 100% 100%;
  1047. z-index: 1;
  1048. }
  1049. .alarm-icon-1 {
  1050. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-1.svg');
  1051. }
  1052. .alarm-icon-2 {
  1053. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-2.svg');
  1054. }
  1055. .alarm-icon-3 {
  1056. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-3.svg');
  1057. }
  1058. .alarm-icon-4 {
  1059. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-4.svg');
  1060. }
  1061. .alarm-icon-5 {
  1062. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-5.svg');
  1063. }
  1064. .alarm-icon-6 {
  1065. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-6.svg');
  1066. }
  1067. .alarm-icon-7 {
  1068. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-7.svg');
  1069. }
  1070. .alarm-icon-8 {
  1071. background-image: url('@/assets/images/overHaul/rootPage/alarm-icon-8.svg');
  1072. }
  1073. }
  1074. .col-cont {
  1075. width: calc(100% - 50px);
  1076. height: 50px;
  1077. background-image: url('/@/assets/images/overHaul/rootPage/alarm-content-bg.png');
  1078. background-repeat: no-repeat;
  1079. background-size: 100% 100%;
  1080. padding: 0 20px;
  1081. }
  1082. .col-title {
  1083. color: #000;
  1084. font-size: 14px;
  1085. margin-bottom: 5px;
  1086. }
  1087. .col-value {
  1088. color: #000;
  1089. font-size: 14px;
  1090. display: flex;
  1091. align-items: center;
  1092. width: 100%;
  1093. overflow: visible;
  1094. .status-dot {
  1095. width: 8px;
  1096. height: 8px;
  1097. margin-right: 5px;
  1098. border-radius: 50%;
  1099. display: inline-block;
  1100. flex-shrink: 0;
  1101. }
  1102. .text-content {
  1103. flex: 1;
  1104. white-space: nowrap;
  1105. overflow: hidden;
  1106. text-overflow: ellipsis;
  1107. min-width: 0;
  1108. }
  1109. }
  1110. .col-first-row {
  1111. grid-column: span 1;
  1112. }
  1113. .col-second-row:nth-child(6) {
  1114. grid-column: 1 / span 3;
  1115. }
  1116. .col-second-row:nth-child(7) {
  1117. grid-column: span 1;
  1118. }
  1119. .col-second-row:nth-child(8) {
  1120. grid-column: span 1;
  1121. }
  1122. }
  1123. .half-year-statistics {
  1124. background-color: #ffffff;
  1125. margin-bottom: 20px;
  1126. padding: 10px 12px;
  1127. border-radius: 4px;
  1128. .statistics-header {
  1129. display: flex;
  1130. justify-content: space-between;
  1131. align-items: center;
  1132. margin-bottom: 10px;
  1133. }
  1134. .title {
  1135. font-size: 16px;
  1136. font-weight: bold;
  1137. color: #333;
  1138. }
  1139. .statistics-content {
  1140. display: flex;
  1141. gap: 20px; // 图表之间的间距
  1142. }
  1143. .chart-item {
  1144. flex: 1;
  1145. min-width: 0;
  1146. padding: 10px;
  1147. border-radius: 4px;
  1148. height: 440px;
  1149. background-color: #ecf4fd;
  1150. /* align-items: center; */
  1151. /* display: flex; */
  1152. /* flex-direction: column; */
  1153. }
  1154. .chart-title {
  1155. min-width: 400px;
  1156. font-size: 16px;
  1157. font-weight: bold;
  1158. color: #333;
  1159. text-align: center;
  1160. padding-bottom: 3px;
  1161. background-image: url('/@/assets/images/overHaul/rootPage/chart-title-bg.png');
  1162. background-repeat: no-repeat;
  1163. background-position: bottom center;
  1164. }
  1165. .pie-legends {
  1166. height: 80px;
  1167. width: 200px;
  1168. padding: 20px 0 20px 10px;
  1169. background-repeat: no-repeat;
  1170. background-image: url('/@/assets/images/overHaul/rootPage/border-top.png');
  1171. background-position: top center;
  1172. &-title {
  1173. font-size: 16px;
  1174. color: #333;
  1175. padding: 0 10px;
  1176. }
  1177. &-value {
  1178. font-size: 16px;
  1179. color: #333;
  1180. padding: 0 10px;
  1181. font-weight: bold;
  1182. }
  1183. &:nth-child(1) {
  1184. .pie-legends-title {
  1185. border-left: 3px solid #0070ff;
  1186. }
  1187. .pie-legends-value {
  1188. color: #0070ff;
  1189. border-left: 3px solid #0070ff55;
  1190. }
  1191. }
  1192. &:nth-child(2) {
  1193. .pie-legends-title {
  1194. border-left: 3px solid #0bc9d6;
  1195. }
  1196. .pie-legends-value {
  1197. color: #0bc9d6;
  1198. border-left: 3px solid #0bc9d655;
  1199. }
  1200. }
  1201. &:nth-child(3) {
  1202. .pie-legends-title {
  1203. border-left: 3px solid #00c31a;
  1204. }
  1205. .pie-legends-value {
  1206. color: #00c31a;
  1207. border-left: 3px solid #00c31a55;
  1208. }
  1209. }
  1210. &:nth-child(4) {
  1211. .pie-legends-title {
  1212. border-left: 3px solid #ffa200;
  1213. }
  1214. .pie-legends-value {
  1215. color: #ffa200;
  1216. border-left: 3px solid #ffa20055;
  1217. }
  1218. }
  1219. &:nth-child(5) {
  1220. .pie-legends-title {
  1221. border-left: 3px solid #d2c629;
  1222. }
  1223. .pie-legends-value {
  1224. color: #d2c629;
  1225. border-left: 3px solid #d2c62955;
  1226. }
  1227. }
  1228. &:nth-child(6) {
  1229. .pie-legends-title {
  1230. border-left: 3px solid #8a53c1;
  1231. }
  1232. .pie-legends-value {
  1233. color: #8a53c1;
  1234. border-left: 3px solid #8a53c155;
  1235. }
  1236. }
  1237. }
  1238. }
  1239. </style>