device.data.ts 11 KB

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