device.data.ts 7.9 KB

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