device.data.ts 10 KB

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