device.data.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. import { BasicColumn } from '/@/components/Table';
  2. export const chartsColumns = (deviceType) => {
  3. if (deviceType === '') {
  4. return [];
  5. }
  6. };
  7. export const locationList = [
  8. {
  9. title: '风门',
  10. deviceType: 'gate',
  11. isVisible: 0,
  12. },
  13. {
  14. title: '风窗',
  15. deviceType: 'gate1',
  16. isVisible: 0,
  17. },
  18. {
  19. title: '测风装置',
  20. deviceType: 'gate2',
  21. isVisible: 0,
  22. },
  23. {
  24. title: '传感器',
  25. deviceType: 'gate3',
  26. isVisible: 0,
  27. },
  28. {
  29. title: '局部风机',
  30. deviceType: 'gate4',
  31. isVisible: 0,
  32. },
  33. {
  34. title: '主风机',
  35. deviceType: 'gate5',
  36. isVisible: 0,
  37. },
  38. {
  39. title: '风筒',
  40. deviceType: 'gate6',
  41. isVisible: 0,
  42. },
  43. {
  44. title: '密闭墙',
  45. deviceType: 'gate7',
  46. isVisible: 0,
  47. },
  48. ];
  49. // export const searchFormSchema: FormSchema[] = [
  50. // {
  51. // label: '查询日期',
  52. // field: 'tData',
  53. // component: 'DatePicker',
  54. // defaultValue: dayjs(),
  55. // componentProps: {
  56. // valueFormat: 'YYYY-MM-DD',
  57. // },
  58. // },
  59. // {
  60. // label: '时间区间',
  61. // field: 'tickectDate',
  62. // component: 'TimeRangePicker',
  63. // componentProps: {
  64. // placeholder: ['开始时间', '结束时间'],
  65. // valueFormat: 'HH:mm:ss',
  66. // },
  67. // },
  68. // {
  69. // label: '设备类型',
  70. // field: 'gdeviceid',
  71. // component: 'ApiSelect',
  72. // componentProps: {
  73. // api: props.deviceListApi,
  74. // resultField: 'records',
  75. // labelField: 'strname',
  76. // valueField: 'id',
  77. // },
  78. // },
  79. // {
  80. // label: '间隔时间',
  81. // field: 'skip',
  82. // component: 'Select',
  83. // componentProps: {
  84. // options: [
  85. // {
  86. // label: '5秒',
  87. // value: '1',
  88. // },
  89. // {
  90. // label: '10秒',
  91. // value: '2',
  92. // },
  93. // {
  94. // label: '1分钟',
  95. // value: '3',
  96. // },
  97. // {
  98. // label: '5分钟',
  99. // value: '4',
  100. // },
  101. // {
  102. // label: '10分钟',
  103. // value: '5',
  104. // },
  105. // ],
  106. // },
  107. // },
  108. // ];
  109. export const majorColumns: BasicColumn[] = [
  110. {
  111. title: '序号',
  112. dataIndex: '',
  113. key: 'rowIndex',
  114. width: 60,
  115. align: 'center',
  116. customRender: ({ index }) => {
  117. return `${index}`;
  118. },
  119. },
  120. {
  121. title: '测段名称',
  122. align: 'center',
  123. dataIndex: 'name',
  124. width: 110,
  125. },
  126. {
  127. title: '始点',
  128. children: [
  129. {
  130. title: '测点位置',
  131. align: 'center',
  132. dataIndex: 'name1',
  133. width: 140,
  134. },
  135. {
  136. title: '风压(Pa)',
  137. align: 'center',
  138. dataIndex: 'pressure1',
  139. width: 100,
  140. },
  141. // {
  142. // title:'风压(KPa)',
  143. // align:"center",
  144. // dataIndex: 'name1'
  145. // },
  146. {
  147. title: '密度(kg/m³)',
  148. align: 'center',
  149. dataIndex: 'density1',
  150. width: 100,
  151. },
  152. {
  153. title: '标高(m)',
  154. align: 'center',
  155. dataIndex: 'elevation1',
  156. width: 100,
  157. },
  158. ],
  159. },
  160. {
  161. title: '末点',
  162. children: [
  163. {
  164. title: '测点位置',
  165. align: 'center',
  166. dataIndex: 'name2',
  167. width: 140,
  168. },
  169. {
  170. title: '风压(Pa)',
  171. align: 'center',
  172. dataIndex: 'pressure2',
  173. width: 100,
  174. },
  175. // {
  176. // title:'风压(KPa)',
  177. // align:"center",
  178. // dataIndex: 'name1'
  179. // },
  180. {
  181. title: '密度(kg/m³)',
  182. align: 'center',
  183. dataIndex: 'density2',
  184. width: 100,
  185. },
  186. {
  187. title: '标高(m)',
  188. align: 'center',
  189. dataIndex: 'elevation2',
  190. width: 100,
  191. },
  192. ],
  193. },
  194. {
  195. title: '风量(m³/min)',
  196. align: 'center',
  197. dataIndex: 'm3',
  198. width: 110,
  199. },
  200. {
  201. title: '阻力(Pa)',
  202. align: 'center',
  203. dataIndex: 'drag',
  204. width: 100,
  205. },
  206. {
  207. title: '风阻(Ns²/m⁸)',
  208. align: 'center',
  209. dataIndex: 'wdrag',
  210. width: 110,
  211. },
  212. {
  213. title: '更新时间',
  214. dataIndex: 'datatime',
  215. align: 'center',
  216. width: 127,
  217. },
  218. ];
  219. export const surfaceChartsColumns = [
  220. {
  221. legend: '进风',
  222. seriesName: '(m³/min)',
  223. ymax: 5000,
  224. yname: 'm³/min',
  225. linetype: 'line',
  226. yaxispos: 'left',
  227. color: '#00FFA8',
  228. sort: 1,
  229. xRotate: 0,
  230. dataIndex: 'jin',
  231. },
  232. {
  233. legend: '回风',
  234. seriesName: '',
  235. ymax: 5000,
  236. yname: 'm³/min',
  237. linetype: 'line',
  238. yaxispos: 'left',
  239. color: '#F07070',
  240. sort: 1,
  241. xRotate: 0,
  242. dataIndex: 'hui',
  243. },
  244. ];
  245. export const ballvalveColumns = [
  246. {
  247. title: '设备编号',
  248. dataIndex: 'deviceNum',
  249. width: 60,
  250. align: 'center',
  251. },
  252. {
  253. title: '温度(℃)',
  254. dataIndex: 'tempRealtime',
  255. align: 'center',
  256. width: 60,
  257. },
  258. {
  259. title: 'CO(ppm)',
  260. dataIndex: 'CORealtime',
  261. align: 'center',
  262. width: 50,
  263. },
  264. {
  265. title: '压力(Pa)',
  266. dataIndex: 'PressureRealtime',
  267. align: 'center',
  268. width: 50,
  269. },
  270. {
  271. title: '烟雾(%)',
  272. dataIndex: 'SmokeRealtime485',
  273. align: 'center',
  274. width: 50,
  275. customRender: () => {
  276. return `正常`;
  277. },
  278. },
  279. {
  280. title: '是否报警',
  281. dataIndex: 'isWarn',
  282. align: 'center',
  283. width: 50,
  284. // customRender: () => {
  285. // return `正常`;
  286. // },
  287. },
  288. ];
  289. export const noDetailArr = ['nitrogen', 'forcFan']; // 前端详情的,
  290. export const haveDetailArr = [
  291. 'windrect',
  292. 'window',
  293. 'gate',
  294. 'fanlocal',
  295. 'fanmain',
  296. 'fiber',
  297. 'bundletube',
  298. 'dusting',
  299. 'pump',
  300. 'safetymonitor',
  301. 'nitrogen',
  302. ];
  303. export const haveHandlerArr = ['windrect', 'window', 'gate', 'fanlocal', 'fanmain', 'pump', 'obfurage', 'nitrogen', 'pulping', 'spray', 'dustdev']; // table无操作
  304. export const noWarningArr = ['location', 'vehicle', 'cheliang']; // 无预警详情的
  305. export const haveSysDetailArr = ['']; //有场景详情的
  306. export const noHistoryArr = () => History_Type['type'] == 'remote' ? ['surface_history'] : [];