device.data.ts 9.8 KB

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