device.data.ts 7.8 KB

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