device.data.ts 8.0 KB

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