device.data.ts 8.3 KB

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