dataCollection.mock.ts 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. import { defineMock } from "../base";
  2. export default defineMock([
  3. {
  4. url: "dataCollection/page",
  5. method: ["GET"],
  6. body: {
  7. code: "00000",
  8. data: {
  9. list: [
  10. {
  11. id: 1,
  12. siteName: "站点1",
  13. siteNumber: "1",
  14. channelNumber: "2",
  15. sensorType: "振动",
  16. sensorCoordinates: "A10",
  17. time: "2024-03-26 11:35:56",
  18. validValue: "0.210069342000400",
  19. maxValue: "0.224300636823651",
  20. healthStatus: 1,
  21. },
  22. {
  23. id: 2,
  24. siteName: "站点1",
  25. siteNumber: "1",
  26. channelNumber: "2",
  27. sensorType: "振动",
  28. sensorCoordinates: "A11",
  29. time: "2024-03-26 11:35:56",
  30. validValue: "0.21040204167366",
  31. maxValue: "-0.0177574195647",
  32. healthStatus: 1,
  33. },
  34. {
  35. id: 3,
  36. siteName: "站点1",
  37. siteNumber: "1",
  38. channelNumber: "3",
  39. sensorType: "振动",
  40. sensorCoordinates: "A12",
  41. time: "2024-03-26 11:35:56",
  42. validValue: "0.209233790636036",
  43. maxValue: "0.07523538174526",
  44. healthStatus: 1,
  45. },
  46. {
  47. id: 4,
  48. siteName: "站点1",
  49. siteNumber: "1",
  50. channelNumber: "4",
  51. sensorType: "振动",
  52. sensorCoordinates: "A13",
  53. time: "2024-03-26 11:35:56",
  54. validValue: "0.211453402800669",
  55. maxValue: "0.16496707632154",
  56. healthStatus: 1,
  57. },
  58. {
  59. id: 5,
  60. siteName: "站点1",
  61. siteNumber: "1",
  62. channelNumber: "5",
  63. sensorType: "压力",
  64. sensorCoordinates: "B21",
  65. time: "2024-03-26 11:35:56",
  66. validValue: "-3.046634829124908",
  67. maxValue: "-3.03802514032163",
  68. healthStatus: 1,
  69. },
  70. {
  71. id: 6,
  72. siteName: "站点1",
  73. siteNumber: "1",
  74. channelNumber: "6",
  75. sensorType: "压力",
  76. sensorCoordinates: "B22",
  77. time: "2024-03-26 11:35:56",
  78. validValue: "-9.74457550048828",
  79. maxValue: "-9.73577594723653",
  80. healthStatus: 1,
  81. },
  82. {
  83. id: 7,
  84. siteName: "站点1",
  85. siteNumber: "1",
  86. channelNumber: "7",
  87. sensorType: "流速",
  88. sensorCoordinates: "C31",
  89. time: "2024-03-26 11:35:56",
  90. validValue: "-2.54472327232361",
  91. maxValue: "-2.54447360412365",
  92. healthStatus: 1,
  93. },
  94. {
  95. id: 8,
  96. siteName: "站点1",
  97. siteNumber: "1",
  98. channelNumber: "8",
  99. sensorType: "流速",
  100. sensorCoordinates: "C32",
  101. time: "2024-03-26 11:35:56",
  102. validValue: "-2.66635298728943",
  103. maxValue: "-2.66610383915432",
  104. healthStatus: 1,
  105. },
  106. {
  107. id: 9,
  108. siteName: "站点1",
  109. siteNumber: "1",
  110. channelNumber: "9",
  111. sensorType: "温度",
  112. sensorCoordinates: "D41",
  113. time: "2024-03-26 11:35:56",
  114. validValue: "-137.339324951172",
  115. maxValue: "-137.30499261248654",
  116. healthStatus: 1,
  117. },
  118. {
  119. id: 10,
  120. siteName: "站点1",
  121. siteNumber: "1",
  122. channelNumber: "10",
  123. sensorType: "温度",
  124. sensorCoordinates: "D42",
  125. time: "2024-03-26 11:35:56",
  126. validValue: "-160.112747192383",
  127. maxValue: "-160.07223514598321",
  128. healthStatus: 1,
  129. },
  130. {
  131. id: 11,
  132. siteName: "站点1",
  133. siteNumber: "1",
  134. channelNumber: "11",
  135. sensorType: "温度",
  136. sensorCoordinates: "D43",
  137. time: "2024-03-26 11:35:56",
  138. validValue: "-169.500579833984",
  139. maxValue: "-169.44480893652984",
  140. healthStatus: 1,
  141. },
  142. {
  143. id: 12,
  144. siteName: "站点1",
  145. siteNumber: "1",
  146. channelNumber: "12",
  147. sensorType: "温度",
  148. sensorCoordinates: "D44",
  149. time: "2024-03-26 11:35:56",
  150. validValue: "-108.504341125488",
  151. maxValue: "-108.48224634856327",
  152. healthStatus: 1,
  153. },
  154. {
  155. id: 13,
  156. siteName: "站点1",
  157. siteNumber: "1",
  158. channelNumber: "13",
  159. sensorType: "交流电",
  160. sensorCoordinates: "E51",
  161. time: "2024-03-26 11:35:56",
  162. validValue: "0.00581519678235054",
  163. maxValue: "0.00693559734236953",
  164. healthStatus: 1,
  165. },
  166. {
  167. id: 14,
  168. siteName: "站点1",
  169. siteNumber: "1",
  170. channelNumber: "14",
  171. sensorType: "交流电",
  172. sensorCoordinates: "E52",
  173. time: "2024-03-26 11:35:56",
  174. validValue: "0.062148357956423",
  175. maxValue: "0.06594863214756",
  176. healthStatus: 1,
  177. },
  178. {
  179. id: 15,
  180. siteName: "站点1",
  181. siteNumber: "1",
  182. channelNumber: "15",
  183. sensorType: "湿度",
  184. sensorCoordinates: "O75",
  185. time: "2024-03-26 11:35:56",
  186. validValue: "57.5",
  187. maxValue: "60.0",
  188. healthStatus: 1,
  189. },
  190. {
  191. id: 16,
  192. siteName: "站点1",
  193. siteNumber: "1",
  194. channelNumber: "16",
  195. sensorType: "振动",
  196. sensorCoordinates: "P80",
  197. time: "2024-03-26 11:35:56",
  198. validValue: "0.206",
  199. maxValue: "0.216",
  200. healthStatus: 1,
  201. },
  202. {
  203. id: 17,
  204. siteName: "站点1",
  205. siteNumber: "1",
  206. channelNumber: "17",
  207. sensorType: "压力",
  208. sensorCoordinates: "Q85",
  209. time: "2024-03-26 11:35:56",
  210. validValue: "101.5",
  211. maxValue: "104.0",
  212. healthStatus: 1,
  213. },
  214. {
  215. id: 18,
  216. siteName: "站点1",
  217. siteNumber: "1",
  218. channelNumber: "18",
  219. sensorType: "温度",
  220. sensorCoordinates: "R90",
  221. time: "2024-03-26 11:35:56",
  222. validValue: "23.5",
  223. maxValue: "25.0",
  224. healthStatus: 1,
  225. },
  226. {
  227. id: 19,
  228. siteName: "站点1",
  229. siteNumber: "1",
  230. channelNumber: "19",
  231. sensorType: "湿度",
  232. sensorCoordinates: "S95",
  233. time: "2024-03-26 11:35:56",
  234. validValue: "59.0",
  235. maxValue: "63.5",
  236. healthStatus: 1,
  237. },
  238. {
  239. id: 20,
  240. siteName: "站点1",
  241. siteNumber: "1",
  242. channelNumber: "20",
  243. sensorType: "振动",
  244. sensorCoordinates: "T100",
  245. time: "2024-03-26 11:35:56",
  246. validValue: "0.207",
  247. maxValue: "0.217",
  248. healthStatus: 1,
  249. },
  250. ],
  251. total: 20,
  252. },
  253. msg: "一切ok",
  254. },
  255. },
  256. ]);
  257. // 角色映射表数据
  258. // const roleMap: Record<string, any> = {
  259. // 2: {
  260. // id: 2,
  261. // name: "系统管理员",
  262. // code: "ADMIN",
  263. // status: 1,
  264. // sort: 2,
  265. // createTime: "2021-03-25 12:39:54",
  266. // updateTime: null,
  267. // },
  268. // 3: {
  269. // id: 3,
  270. // name: "访问游客",
  271. // code: "GUEST",
  272. // status: 1,
  273. // sort: 3,
  274. // createTime: "2021-05-26 15:49:05",
  275. // updateTime: "2019-05-05 16:00:00",
  276. // },
  277. // 4: {
  278. // id: 4,
  279. // name: "系统管理员1",
  280. // code: "ADMIN1",
  281. // status: 1,
  282. // sort: 2,
  283. // createTime: "2021-03-25 12:39:54",
  284. // updateTime: null,
  285. // },
  286. // 5: {
  287. // id: 5,
  288. // name: "系统管理员2",
  289. // code: "ADMIN2",
  290. // status: 1,
  291. // sort: 2,
  292. // createTime: "2021-03-25 12:39:54",
  293. // updateTime: null,
  294. // },
  295. // 6: {
  296. // id: 6,
  297. // name: "系统管理员3",
  298. // code: "ADMIN3",
  299. // status: 1,
  300. // sort: 2,
  301. // createTime: "2021-03-25 12:39:54",
  302. // updateTime: null,
  303. // },
  304. // 7: {
  305. // id: 7,
  306. // name: "系统管理员4",
  307. // code: "ADMIN4",
  308. // status: 1,
  309. // sort: 2,
  310. // createTime: "2021-03-25 12:39:54",
  311. // updateTime: null,
  312. // },
  313. // 8: {
  314. // id: 8,
  315. // name: "系统管理员5",
  316. // code: "ADMIN5",
  317. // status: 1,
  318. // sort: 2,
  319. // createTime: "2021-03-25 12:39:54",
  320. // updateTime: null,
  321. // },
  322. // 9: {
  323. // id: 9,
  324. // name: "系统管理员6",
  325. // code: "ADMIN6",
  326. // status: 1,
  327. // sort: 2,
  328. // createTime: "2021-03-25 12:39:54",
  329. // updateTime: "2023-12-04 11:43:15",
  330. // },
  331. // 10: {
  332. // id: 10,
  333. // name: "系统管理员7",
  334. // code: "ADMIN7",
  335. // status: 1,
  336. // sort: 2,
  337. // createTime: "2021-03-25 12:39:54",
  338. // updateTime: null,
  339. // },
  340. // 11: {
  341. // id: 11,
  342. // name: "系统管理员8",
  343. // code: "ADMIN8",
  344. // status: 1,
  345. // sort: 2,
  346. // createTime: "2021-03-25 12:39:54",
  347. // updateTime: null,
  348. // },
  349. // };