device.data.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. import { defineAsyncComponent } from 'vue';
  2. import { BasicColumn } from '/@/components/Table';
  3. import { useGlobSetting } from '/@/hooks/setting';
  4. export const locationList = [
  5. {
  6. title: '风门',
  7. deviceType: 'gate',
  8. isVisible: 0,
  9. },
  10. {
  11. title: '风窗',
  12. deviceType: 'gate1',
  13. isVisible: 0,
  14. },
  15. {
  16. title: '测风装置',
  17. deviceType: 'gate2',
  18. isVisible: 0,
  19. },
  20. {
  21. title: '传感器',
  22. deviceType: 'gate3',
  23. isVisible: 0,
  24. },
  25. {
  26. title: '局部风机',
  27. deviceType: 'gate4',
  28. isVisible: 0,
  29. },
  30. {
  31. title: '主风机',
  32. deviceType: 'gate5',
  33. isVisible: 0,
  34. },
  35. {
  36. title: '风筒',
  37. deviceType: 'gate6',
  38. isVisible: 0,
  39. },
  40. {
  41. title: '密闭墙',
  42. deviceType: 'gate7',
  43. isVisible: 0,
  44. },
  45. ];
  46. export function getMonitorComponent() {
  47. const { sysOrgCode } = useGlobSetting();
  48. // const sysOrgCode = 'sdmtjtsgtmk';
  49. let FiberModal;
  50. switch (sysOrgCode) {
  51. case 'sdmtjtsgtmk': //石圪台
  52. case 'sdmtjthlgmk': //哈拉沟
  53. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.hlg.vue'));
  54. break;
  55. case 'sdmtjtcctmk': // 寸草塔
  56. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.cct.vue'));
  57. break;
  58. case 'shsddlsjh': //沙吉海
  59. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.sjh.vue'));
  60. break;
  61. case 'sdmtjtbdmk': //保德
  62. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.bd.vue'));
  63. break;
  64. case 'sdmtjtbetmk': //布尔台
  65. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal-Gx.vue'));
  66. break;
  67. default:
  68. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.hlg.vue'));
  69. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.sw.vue'));
  70. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue'));
  71. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal-Gx.vue'));
  72. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.cct.vue'));
  73. }
  74. const BundleModal = defineAsyncComponent(() => import('./modal/bundle.modal.vue'));
  75. const FiremonModal = defineAsyncComponent(() => import('./modal/firemon.modal.vue'));
  76. const DustModal = defineAsyncComponent(() => import('./modal/dust.modal.vue'));
  77. const BallvalveModal = defineAsyncComponent(() => import('./modal/ballvalve.modal.vue'));
  78. const AtomizingModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue'));
  79. const GaspatrolModal = defineAsyncComponent(() => import('./modal/gaspatrol.modal.vue'));
  80. const WisdomBallModal = defineAsyncComponent(() => import('./modal/wisdomball.modal.vue'));
  81. return { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal };
  82. }
  83. export const chartsColumnList = [
  84. {
  85. legend: '一氧化碳',
  86. seriesName: '(ppm)',
  87. ymax: 15,
  88. yname: 'ppm',
  89. linetype: 'line',
  90. yaxispos: 'left',
  91. color: '#FDB146',
  92. sort: 1,
  93. xRotate: 0,
  94. dataIndex: 'coval',
  95. },
  96. {
  97. legend: '乙炔',
  98. seriesName: '',
  99. ymax: 15,
  100. yname: 'ppm',
  101. linetype: 'line',
  102. yaxispos: 'left',
  103. color: '#00FFA8',
  104. sort: 1,
  105. xRotate: 0,
  106. dataIndex: 'chval',
  107. },
  108. {
  109. legend: '乙烯',
  110. seriesName: '',
  111. ymax: 15,
  112. yname: 'ppm',
  113. linetype: 'line',
  114. yaxispos: 'left',
  115. color: '#AE19FF',
  116. sort: 1,
  117. xRotate: 0,
  118. dataIndex: 'ch2val',
  119. },
  120. {
  121. legend: '二氧化碳',
  122. seriesName: '(%)',
  123. ymax: 20,
  124. yname: '%',
  125. linetype: 'line',
  126. yaxispos: 'right',
  127. color: '#9C83D9',
  128. sort: 2,
  129. xRotate: 0,
  130. dataIndex: 'co2val',
  131. },
  132. {
  133. legend: '甲烷',
  134. seriesName: '',
  135. ymax: 20,
  136. yname: '%',
  137. linetype: 'line',
  138. yaxispos: 'right',
  139. color: '#DA3914',
  140. sort: 2,
  141. xRotate: 0,
  142. dataIndex: 'gasval',
  143. },
  144. {
  145. legend: '氧气',
  146. seriesName: '(%)',
  147. ymax: 30,
  148. yname: '%',
  149. linetype: 'line',
  150. yaxispos: 'right',
  151. color: '#03C2EC',
  152. sort: 3,
  153. xRotate: 0,
  154. dataIndex: 'o2val',
  155. },
  156. ];
  157. export const chartsColumnListGx = [
  158. {
  159. legend: '最高温度',
  160. seriesName: '( °C)',
  161. ymax: 100,
  162. yname: ' °C',
  163. linetype: 'line',
  164. yaxispos: 'left',
  165. color: '#FDB146',
  166. sort: 1,
  167. xRotate: 0,
  168. dataIndex: 'hightemperature',
  169. },
  170. {
  171. legend: '平均温度',
  172. seriesName: '( °C)',
  173. ymax: 100,
  174. yname: ' °C',
  175. linetype: 'line',
  176. yaxispos: 'left',
  177. color: '#00FFA8',
  178. sort: 1,
  179. xRotate: 0,
  180. dataIndex: 'avgtemperature',
  181. },
  182. ];
  183. export const chartsColumnListBall = [
  184. {
  185. legend: '一氧化碳',
  186. seriesName: '(ppm)',
  187. ymax: 30,
  188. yname: 'ppm',
  189. linetype: 'line',
  190. yaxispos: 'left',
  191. color: '#FDB146',
  192. sort: 1,
  193. xRotate: 0,
  194. dataIndex: 'coValue',
  195. },
  196. {
  197. legend: '氧气',
  198. seriesName: '',
  199. ymax: 30,
  200. yname: '%',
  201. linetype: 'line',
  202. yaxispos: 'right',
  203. color: '#00FFA8',
  204. sort: 2,
  205. xRotate: 0,
  206. dataIndex: 'o2Value',
  207. },
  208. {
  209. legend: '温度',
  210. seriesName: '(℃)',
  211. ymax: 30,
  212. yname: '℃',
  213. linetype: 'line',
  214. yaxispos: 'right',
  215. color: '#AE19FF',
  216. sort: 3,
  217. xRotate: 0,
  218. dataIndex: 'tempValue',
  219. },
  220. {
  221. legend: '二氧化碳',
  222. seriesName: '(%)',
  223. ymax: 30,
  224. yname: '%',
  225. linetype: 'line',
  226. yaxispos: 'right',
  227. color: '#9C83D9',
  228. sort: 2,
  229. xRotate: 0,
  230. dataIndex: 'co2val',
  231. },
  232. ];
  233. export const majorColumns: BasicColumn[] = [
  234. {
  235. title: '序号',
  236. dataIndex: '',
  237. key: 'rowIndex',
  238. width: 60,
  239. align: 'center',
  240. customRender: ({ index }) => {
  241. return `${index + 1}`;
  242. },
  243. },
  244. {
  245. title: '测段名称',
  246. align: 'center',
  247. dataIndex: 'name',
  248. width: 110,
  249. },
  250. {
  251. title: '始点',
  252. children: [
  253. {
  254. title: '测点位置',
  255. align: 'center',
  256. dataIndex: 'name1',
  257. width: 140,
  258. },
  259. {
  260. title: '风压(Pa)',
  261. align: 'center',
  262. dataIndex: 'pressure1',
  263. width: 100,
  264. },
  265. // {
  266. // title:'风压(kPa)',
  267. // align:"center",
  268. // dataIndex: 'name1'
  269. // },
  270. {
  271. title: '密度(kg/m³)',
  272. align: 'center',
  273. dataIndex: 'density1',
  274. width: 100,
  275. },
  276. {
  277. title: '标高(m)',
  278. align: 'center',
  279. dataIndex: 'elevation1',
  280. width: 100,
  281. },
  282. ],
  283. },
  284. {
  285. title: '末点',
  286. children: [
  287. {
  288. title: '测点位置',
  289. align: 'center',
  290. dataIndex: 'name2',
  291. width: 140,
  292. },
  293. {
  294. title: '风压(Pa)',
  295. align: 'center',
  296. dataIndex: 'pressure2',
  297. width: 100,
  298. },
  299. // {
  300. // title:'风压(kPa)',
  301. // align:"center",
  302. // dataIndex: 'name1'
  303. // },
  304. {
  305. title: '密度(kg/m³)',
  306. align: 'center',
  307. dataIndex: 'density2',
  308. width: 100,
  309. },
  310. {
  311. title: '标高(m)',
  312. align: 'center',
  313. dataIndex: 'elevation2',
  314. width: 100,
  315. },
  316. ],
  317. },
  318. {
  319. title: '风量(m³/min)',
  320. align: 'center',
  321. dataIndex: 'm3',
  322. width: 110,
  323. },
  324. {
  325. title: '阻力(Pa)',
  326. align: 'center',
  327. dataIndex: 'drag',
  328. width: 100,
  329. },
  330. {
  331. title: '风阻(Ns²/m⁸)',
  332. align: 'center',
  333. dataIndex: 'wdrag',
  334. width: 110,
  335. },
  336. {
  337. title: '更新时间',
  338. dataIndex: 'datatime',
  339. align: 'center',
  340. width: 127,
  341. },
  342. ];
  343. export const surfaceChartsColumns = [
  344. {
  345. legend: '进风',
  346. seriesName: '(m³/min)',
  347. ymax: 5000,
  348. yname: 'm³/min',
  349. linetype: 'line',
  350. yaxispos: 'left',
  351. color: '#00FFA8',
  352. sort: 1,
  353. xRotate: 0,
  354. dataIndex: 'jin',
  355. },
  356. {
  357. legend: '回风',
  358. seriesName: '',
  359. ymax: 5000,
  360. yname: 'm³/min',
  361. linetype: 'line',
  362. yaxispos: 'left',
  363. color: '#F07070',
  364. sort: 1,
  365. xRotate: 0,
  366. dataIndex: 'hui',
  367. },
  368. ];
  369. export const ballvalveColumns: BasicColumn[] = [
  370. {
  371. title: '设备编号',
  372. dataIndex: 'deviceNum',
  373. width: 60,
  374. align: 'center',
  375. },
  376. {
  377. title: '温度(℃)',
  378. dataIndex: 'tempRealtime',
  379. align: 'center',
  380. width: 60,
  381. },
  382. {
  383. title: 'CO(ppm)',
  384. dataIndex: 'CORealtime',
  385. align: 'center',
  386. width: 50,
  387. },
  388. {
  389. title: '压力(Pa)',
  390. dataIndex: 'PressureRealtime',
  391. align: 'center',
  392. width: 50,
  393. },
  394. {
  395. title: '烟雾(%)',
  396. dataIndex: 'SmokeRealtime485',
  397. align: 'center',
  398. width: 50,
  399. },
  400. {
  401. title: '是否报警',
  402. dataIndex: 'isWarn',
  403. align: 'center',
  404. width: 50,
  405. // customRender: () => {
  406. // return `正常`;
  407. // },
  408. },
  409. ];
  410. export const noDetailArr = ['nitrogen', 'forcFan']; // 前端详情的,
  411. // 棋盘井球阀监测数据只有温度
  412. export const haveDetailArr = [
  413. 'windrect',
  414. 'window',
  415. 'gate',
  416. 'fanlocal',
  417. 'fanmain',
  418. 'fiber',
  419. 'bundletube',
  420. 'gaspatrol',
  421. // 'dusting', // 保德要求去掉
  422. // 'ballvalve',
  423. 'pump',
  424. 'safetymonitor',
  425. 'nitrogen',
  426. 'atomizing',
  427. 'firemon',
  428. 'forcFan',
  429. 'pulping',
  430. ];
  431. export const locationFormConfig = {
  432. labelAlign: 'left',
  433. showAdvancedButton: false,
  434. showResetButton: true,
  435. showSubmitButton: false,
  436. size: 'small',
  437. // baseColProps: {
  438. // // offset: 0.5,
  439. // xs: 24,
  440. // sm: 24,
  441. // md: 24,
  442. // lg: 9,
  443. // xl: 7,
  444. // xxl: 4,
  445. // },
  446. schemas: [
  447. {
  448. label: '人员名称',
  449. field: 'strname',
  450. component: 'Input',
  451. },
  452. {
  453. label: '所属部门',
  454. field: 'department',
  455. component: 'MTreeSelect',
  456. componentProps: {
  457. placeholder: '请选择所属部门',
  458. virtual: false,
  459. api: '/monitor/getDepartmentInfo',
  460. },
  461. },
  462. {
  463. label: '分站名称',
  464. field: 'stationname',
  465. component: 'Input',
  466. },
  467. ],
  468. colProps: {
  469. span: 4,
  470. },
  471. };
  472. export const vehicleFormConfig = {
  473. labelAlign: 'left',
  474. showAdvancedButton: false,
  475. showResetButton: true,
  476. showSubmitButton: false,
  477. // size: 'small',
  478. // baseColProps: {
  479. // // offset: 0.5,
  480. // xs: 24,
  481. // sm: 24,
  482. // md: 24,
  483. // lg: 9,
  484. // xl: 7,
  485. // xxl: 4,
  486. // },
  487. schemas: [
  488. {
  489. label: '车辆名称',
  490. field: 'strname',
  491. component: 'Input',
  492. },
  493. {
  494. label: '分站名称',
  495. field: 'stationname',
  496. component: 'Input',
  497. },
  498. ],
  499. colProps: {
  500. span: 4,
  501. },
  502. };
  503. export const haveHandlerArr = [
  504. 'windrect',
  505. 'window',
  506. 'gate',
  507. 'fanlocal',
  508. // 'fanmain',
  509. 'pump',
  510. 'obfurage',
  511. 'nitrogen',
  512. 'pulping',
  513. 'spray',
  514. 'dustdev',
  515. 'gate_linkdlfm',
  516. // 'firemon',
  517. ]; // table无操作
  518. export const noWarningArr = [
  519. 'location',
  520. 'vehicle',
  521. 'cheliang',
  522. 'majorpath',
  523. 'gasDayReport',
  524. 'dustDayReport',
  525. 'bundleDayReport',
  526. 'bundleSpyDayReport',
  527. 'gate_linkdlfm',
  528. 'substation_normal',
  529. ]; // 无预警详情的
  530. export const haveSysDetailArr = ['forcFan', 'pulping']; //有场景详情的
  531. // export const haveSysDetailArr = ['']; //有场景详情的
  532. export const noHistoryArr = () =>
  533. History_Type['type'] == 'remote'
  534. ? ['surface_history', 'majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gasDay', 'gate_linkdlfm']
  535. : ['majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm', 'gasDay', 'substation_normal'];