device.data.ts 9.5 KB

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