device.data.ts 11 KB

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