device.data.ts 8.0 KB

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