device.data.ts 11 KB

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