device.data.ts 9.9 KB

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