definies.tsx 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. import { ReactNode } from "react";
  2. import { CronLocalization } from "@sbzen/re-cron";
  3. import {
  4. ApiOutlined,
  5. BookOutlined,
  6. ChromeFilled,
  7. CodeOutlined,
  8. EditOutlined,
  9. GithubOutlined,
  10. HomeOutlined,
  11. LogoutOutlined,
  12. MenuOutlined,
  13. MessageOutlined,
  14. MonitorOutlined,
  15. QuestionCircleFilled,
  16. SearchOutlined,
  17. ToolOutlined,
  18. UserOutlined,
  19. ExclamationCircleFilled,
  20. AreaChartOutlined,
  21. PieChartOutlined,
  22. BarChartOutlined,
  23. LineChartOutlined,
  24. SlidersOutlined,
  25. PhoneOutlined,
  26. AndroidOutlined,
  27. AppleOutlined,
  28. WindowsOutlined,
  29. ChromeOutlined,
  30. WechatOutlined,
  31. AccountBookOutlined,
  32. BankOutlined,
  33. BugOutlined,
  34. CarOutlined,
  35. ClearOutlined,
  36. CloudOutlined,
  37. EnvironmentOutlined,
  38. ExperimentOutlined,
  39. FormatPainterOutlined,
  40. MailOutlined,
  41. ShoppingCartOutlined,
  42. SyncOutlined,
  43. WifiOutlined,
  44. } from "@ant-design/icons";
  45. import {
  46. faAddressCard,
  47. faBookAtlas,
  48. faChalkboardUser,
  49. faDatabase,
  50. faDesktop,
  51. faFileWaveform,
  52. faGear,
  53. faList,
  54. faLocationArrow,
  55. faMemory,
  56. faReceipt,
  57. faRectangleList,
  58. faSitemap,
  59. faTableCells,
  60. faThumbtack,
  61. faUsers,
  62. } from "@fortawesome/free-solid-svg-icons";
  63. import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
  64. //登录请求
  65. export type LoginReq = {
  66. username: string;
  67. password: string;
  68. code: string;
  69. uuid: string;
  70. };
  71. //用户简单信息定义
  72. export type UserInfo = {
  73. nickName: string;
  74. avatar: string;
  75. };
  76. //用户详细信息
  77. export type UserDetailInfo = {
  78. userName: string;
  79. phonenumber: string;
  80. email: string;
  81. deptName: string;
  82. postGroup: string;
  83. roleName: string;
  84. nickName: string;
  85. sex: number | string;
  86. createTime: string;
  87. };
  88. //路由/菜单定义
  89. export type RouteInfo = {
  90. path: string;
  91. name?: string;
  92. icon?: ReactNode;
  93. routes?: Array<RouteInfo>;
  94. };
  95. export type IconType = {
  96. [key: string]: ReactNode;
  97. };
  98. //图标映射
  99. export const IconMap: IconType = {
  100. system: <FontAwesomeIcon icon={faGear} />,
  101. monitor: <MonitorOutlined />,
  102. tool: <ToolOutlined />,
  103. guide: <FontAwesomeIcon icon={faLocationArrow} />,
  104. user: <UserOutlined />,
  105. peoples: <FontAwesomeIcon icon={faUsers} />,
  106. treetable: <FontAwesomeIcon icon={faList} />,
  107. tree: <FontAwesomeIcon icon={faSitemap} />,
  108. post: <FontAwesomeIcon icon={faAddressCard} />,
  109. dict: <FontAwesomeIcon icon={faBookAtlas} />,
  110. edit: <EditOutlined />,
  111. message: <MessageOutlined />,
  112. log: <BookOutlined />,
  113. online: <FontAwesomeIcon icon={faChalkboardUser} />,
  114. job: <FontAwesomeIcon icon={faThumbtack} />,
  115. druid: <FontAwesomeIcon icon={faFileWaveform} />,
  116. server: <FontAwesomeIcon icon={faDesktop} />,
  117. redis: <FontAwesomeIcon icon={faDatabase} />,
  118. redislist: <FontAwesomeIcon icon={faMemory} />,
  119. build: <FontAwesomeIcon icon={faTableCells} />,
  120. code: <CodeOutlined />,
  121. swagger: <ApiOutlined />,
  122. form: <FontAwesomeIcon icon={faRectangleList} />,
  123. logininfor: <FontAwesomeIcon icon={faReceipt} />,
  124. areachart: <AreaChartOutlined />,
  125. pie: <PieChartOutlined />,
  126. barchart: <BarChartOutlined />,
  127. linechart: <LineChartOutlined />,
  128. slider: <SlidersOutlined />,
  129. phone: <PhoneOutlined />,
  130. android: <AndroidOutlined />,
  131. apple: <AppleOutlined />,
  132. window: <WindowsOutlined />,
  133. chrome: <ChromeOutlined />,
  134. wechat: <WechatOutlined />,
  135. account: <AccountBookOutlined />,
  136. bank: <BankOutlined />,
  137. bug: <BugOutlined />,
  138. car: <CarOutlined />,
  139. clear: <ClearOutlined />,
  140. cloud: <CloudOutlined />,
  141. command: <CodeOutlined />,
  142. map: <EnvironmentOutlined />,
  143. experiment: <ExperimentOutlined />,
  144. painter: <FormatPainterOutlined />,
  145. home: <HomeOutlined />,
  146. mail: <MailOutlined />,
  147. shop: <ShoppingCartOutlined />,
  148. sync: <SyncOutlined />,
  149. wifi: <WifiOutlined />,
  150. };
  151. //Cron框本地化内容
  152. export const MortnonCronLocalization: CronLocalization = {
  153. common: {
  154. month: {
  155. january: "一月",
  156. february: "二月",
  157. march: "三月",
  158. april: "四月",
  159. may: "五月",
  160. june: "六月",
  161. july: "七月",
  162. august: "八月",
  163. september: "九月",
  164. october: "十月",
  165. november: "十一月",
  166. december: "十二月",
  167. },
  168. dayOfWeek: {
  169. sunday: "星期天",
  170. monday: "星期一",
  171. tuesday: "星期二",
  172. wednesday: "星期三",
  173. thursday: "星期四",
  174. friday: "星期五",
  175. saturday: "星期六",
  176. },
  177. dayOfMonth: {
  178. "1st": "第1",
  179. "2nd": "第2",
  180. "3rd": "第3",
  181. "4th": "第4",
  182. "5th": "第5",
  183. "6th": "第6",
  184. "7th": "第7",
  185. "8th": "第8",
  186. "9th": "第9",
  187. "10th": "第10",
  188. "11th": "第11",
  189. "12th": "第12",
  190. "13th": "第13",
  191. "14th": "第14",
  192. "15th": "第15",
  193. "16th": "第16",
  194. "17th": "第17",
  195. "18th": "第18",
  196. "19th": "第19",
  197. "20th": "第20",
  198. "21st": "第21",
  199. "22nd": "第22",
  200. "23rd": "第23",
  201. "24th": "第24",
  202. "25th": "第25",
  203. "26th": "第26",
  204. "27th": "第27",
  205. "28th": "第28",
  206. "29th": "第29",
  207. "30th": "第30",
  208. "31st": "第31",
  209. },
  210. },
  211. tabs: {
  212. seconds: "秒",
  213. minutes: "分种",
  214. hours: "小时",
  215. day: "天",
  216. month: "月",
  217. year: "年",
  218. },
  219. quartz: {
  220. day: {
  221. every: {
  222. label: "每天",
  223. },
  224. dayOfWeekIncrement: {
  225. label1: "每",
  226. label2: "天,从这天开始:",
  227. },
  228. dayOfMonthIncrement: {
  229. label1: "每",
  230. label2: "天,从本月",
  231. label3: "天开始",
  232. },
  233. dayOfWeekAnd: {
  234. label: "指定每周的某天(选一天或多天)",
  235. },
  236. dayOfWeekRange: {
  237. label1: "每一天,从",
  238. label2: "到",
  239. },
  240. dayOfMonthAnd: {
  241. label: "指定每月的某天(选一天或多天)",
  242. },
  243. dayOfMonthLastDay: {
  244. label: "在当月最后一天",
  245. },
  246. dayOfMonthLastDayWeek: {
  247. label: "在当月最后一个工作日",
  248. },
  249. dayOfWeekLastNTHDayWeek: {
  250. label1: "在当月的最后一个",
  251. label2: "",
  252. },
  253. dayOfMonthDaysBeforeEndMonth: {
  254. label: "天(在当月结束前)",
  255. },
  256. dayOfMonthNearestWeekDayOfMonth: {
  257. label1: "最接近当月",
  258. label2: "天的工作日(星期一至星期五)",
  259. },
  260. dayOfWeekNTHWeekDayOfMonth: {
  261. label1: "在当月",
  262. label2: "",
  263. },
  264. },
  265. month: {
  266. every: {
  267. label: "每月",
  268. },
  269. increment: {
  270. label1: "每",
  271. label2: "个月,从这个月开始:",
  272. },
  273. and: {
  274. label: "指定月份(选择一个或多个)",
  275. },
  276. range: {
  277. label1: "每个月,从",
  278. label2: "到",
  279. },
  280. },
  281. second: {
  282. every: {
  283. label: "每秒",
  284. },
  285. increment: {
  286. label1: "每",
  287. label2: "秒,从这一秒开始:",
  288. },
  289. and: {
  290. label: "指定秒(选择一个或多个)",
  291. },
  292. range: {
  293. label1: "每秒,从",
  294. label2: "到",
  295. },
  296. },
  297. minute: {
  298. every: {
  299. label: "每分钟",
  300. },
  301. increment: {
  302. label1: "每",
  303. label2: "分钟,从这一分钟开始:",
  304. },
  305. and: {
  306. label: "指定分钟(选择一个或多个)",
  307. },
  308. range: {
  309. label1: "每分钟,从",
  310. label2: "到",
  311. },
  312. },
  313. hour: {
  314. every: {
  315. label: "每小时",
  316. },
  317. increment: {
  318. label1: "每",
  319. label2: "小时,从这一小时开始:",
  320. },
  321. and: {
  322. label: "指定小时(选择一个或多个)",
  323. },
  324. range: {
  325. label1: "每小时,从",
  326. label2: "到",
  327. },
  328. },
  329. year: {
  330. every: {
  331. label: "任意年份",
  332. },
  333. increment: {
  334. label1: "每",
  335. label2: "年,从这一年开始:",
  336. },
  337. and: {
  338. label: "指定年份(选择一个或多个)",
  339. },
  340. range: {
  341. label1: "每年,从",
  342. label2: "到",
  343. },
  344. },
  345. }
  346. };