device.data.ts 8.5 KB

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