views.d.ts 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. /**
  2. * views personal
  3. */
  4. type NewInfo = {
  5. title: string;
  6. date: string;
  7. link: string;
  8. };
  9. type Recommend = {
  10. title: string;
  11. msg: string;
  12. icon: string;
  13. bg: string;
  14. iconColor: string;
  15. };
  16. declare type PersonalState = {
  17. newsInfoList: NewInfo[];
  18. recommendList: Recommend[];
  19. personalForm: {
  20. name: string;
  21. email: string;
  22. autograph: string;
  23. occupation: string;
  24. phone: string;
  25. sex: string;
  26. };
  27. };
  28. /**
  29. * views visualizing
  30. */
  31. declare type Demo2State<T = any> = {
  32. time: {
  33. txt: string;
  34. fun: number;
  35. };
  36. dropdownList: T[];
  37. dropdownActive: string;
  38. skyList: T[];
  39. dBtnList: T[];
  40. chartData4Index: number;
  41. dBtnActive: number;
  42. earth3DBtnList: T[];
  43. chartData4List: T[];
  44. myCharts: T[];
  45. };
  46. /**
  47. * views params
  48. */
  49. declare type ParamsState = {
  50. value: string;
  51. tagsViewName: string;
  52. tagsViewNameIsI18n: boolean;
  53. };
  54. /**
  55. * views system
  56. */
  57. // role
  58. declare interface RowRoleType {
  59. roleName: string;
  60. roleSign: string;
  61. describe: string;
  62. sort: number;
  63. status: boolean;
  64. createTime: string;
  65. }
  66. interface SysRoleTableType extends TableType {
  67. data: RowRoleType[];
  68. }
  69. declare interface SysRoleState {
  70. tableData: SysRoleTableType;
  71. }
  72. declare type TreeType = {
  73. id: number;
  74. label: string;
  75. children?: TreeType[];
  76. };
  77. // user
  78. declare type RowUserType<T = any> = {
  79. id: number,
  80. userName: string;
  81. userNickname: string;
  82. roleSign: string;
  83. department: string[];
  84. phone: string;
  85. email: string;
  86. sex: string;
  87. password: string;
  88. overdueTime: T;
  89. status: boolean;
  90. describe: string;
  91. createTime: T;
  92. };
  93. interface SysUserTableType extends TableType {
  94. data: RowUserType[];
  95. }
  96. declare interface SysUserState {
  97. tableData: SysUserTableType;
  98. }
  99. declare type SelectTreeType = {
  100. value: number;
  101. label: string;
  102. key?: string;
  103. disabled?: boolean;
  104. children?: SelectTreeType[];
  105. };
  106. declare type DeptTreeType = {
  107. deptName: string;
  108. createTime: string;
  109. status: boolean;
  110. sort: number;
  111. describe: string;
  112. id: number | string;
  113. children?: DeptTreeType[];
  114. };
  115. // dept
  116. declare interface RowDeptType extends DeptTreeType {
  117. deptLevel: string[];
  118. person: string;
  119. phone: string;
  120. email: string;
  121. }
  122. interface SysDeptTableType extends TableType {
  123. data: DeptTreeType[];
  124. }
  125. declare interface SysDeptState {
  126. tableData: SysDeptTableType;
  127. }
  128. // dic
  129. type ListType = {
  130. id: number;
  131. label: string;
  132. value: string;
  133. };
  134. declare interface RowDicType {
  135. dicName: string;
  136. fieldName: string;
  137. describe: string;
  138. status: boolean;
  139. createTime: string;
  140. list: ListType[];
  141. }
  142. interface SysDicTableType extends TableType {
  143. data: RowDicType[];
  144. }
  145. declare interface SysDicState {
  146. tableData: SysDicTableType;
  147. }
  148. /**
  149. * views pages
  150. */
  151. // filtering
  152. declare type FilteringChilType = {
  153. id: number | string;
  154. label: string;
  155. active: boolean;
  156. };
  157. declare type FilterListType = {
  158. img: string;
  159. title: string;
  160. evaluate: string;
  161. collection: string;
  162. price: string;
  163. monSales: string;
  164. id: number | string;
  165. loading?: boolean;
  166. };
  167. declare type FilteringRowType = {
  168. title: string;
  169. isMore: boolean;
  170. isShowMore: boolean;
  171. id: number | string;
  172. children: FilteringChilType[];
  173. };
  174. // tableRules
  175. declare type TableRulesHeaderType = {
  176. prop: string;
  177. width: string | number;
  178. label: string;
  179. isRequired?: boolean;
  180. isTooltip?: boolean;
  181. type: string;
  182. };
  183. declare type TableRulesState = {
  184. tableData: {
  185. data: EmptyObjectType[];
  186. header: TableRulesHeaderType[];
  187. option: SelectOptionType[];
  188. };
  189. };
  190. declare type TableRulesOneProps = {
  191. name: string;
  192. email: string;
  193. autograph: string;
  194. occupation: string;
  195. };
  196. // tree
  197. declare type RowTreeType = {
  198. id: number;
  199. label: string;
  200. label1: string;
  201. label2: string;
  202. isShow: boolean;
  203. children?: RowTreeType[];
  204. };
  205. // workflow index
  206. declare type NodeListState = {
  207. id: string | number;
  208. nodeId: string | undefined;
  209. class: HTMLElement | string;
  210. left: number | string;
  211. top: number | string;
  212. icon: string;
  213. name: string;
  214. };
  215. declare type LineListState = {
  216. sourceId: string;
  217. targetId: string;
  218. label: string;
  219. };
  220. declare type XyState = {
  221. x: string | number;
  222. y: string | number;
  223. };
  224. declare type WorkflowState<T = any> = {
  225. leftNavList: T[];
  226. dropdownNode: XyState;
  227. dropdownLine: XyState;
  228. isShow: boolean;
  229. jsPlumb: T;
  230. jsPlumbNodeIndex: null | number;
  231. jsplumbDefaults: T;
  232. jsplumbMakeSource: T;
  233. jsplumbMakeTarget: T;
  234. jsplumbConnect: T;
  235. jsplumbData: {
  236. nodeList: NodeListState[];
  237. lineList: LineListState[];
  238. };
  239. };
  240. // workflow drawer
  241. declare type WorkflowDrawerNodeState<T = any> = {
  242. node: { [key: string]: T };
  243. nodeRules: T;
  244. form: T;
  245. tabsActive: string;
  246. loading: {
  247. extend: boolean;
  248. };
  249. };
  250. declare type WorkflowDrawerLabelType = {
  251. type: string;
  252. label: string;
  253. };
  254. declare type WorkflowDrawerState<T = any> = {
  255. isOpen: boolean;
  256. nodeData: {
  257. type: string;
  258. };
  259. jsplumbConn: T;
  260. };
  261. /**
  262. * views make
  263. */
  264. // tableDemo
  265. declare type TableDemoPageType = {
  266. pageNum: number;
  267. pageSize: number;
  268. };
  269. declare type TableHeaderType = {
  270. key: string;
  271. title: string;
  272. type: string | number;
  273. colWidth: string;
  274. width?: string | number;
  275. height?: string | number;
  276. isCheck: boolean;
  277. };
  278. declare type TableSearchType = {
  279. label: string;
  280. prop: string;
  281. placeholder: string;
  282. required: boolean;
  283. type: string;
  284. options?: SelectOptionType[];
  285. };
  286. declare type TableDemoState = {
  287. tableData: {
  288. data: EmptyObjectType[];
  289. header: TableHeaderType[];
  290. config: {
  291. total: number;
  292. loading: boolean;
  293. isBorder: boolean;
  294. isSelection: boolean;
  295. isSerialNo: boolean;
  296. isOperate: boolean;
  297. };
  298. search: TableSearchType[];
  299. param: EmptyObjectType;
  300. };
  301. };
  302. declare type Dict = {
  303. name: string,
  304. code: number,
  305. value: string,
  306. des?: string,
  307. color?: string
  308. }
  309. declare type Dicts<T extends Dict = any> = T[];