device.data.ts 9.6 KB

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