views.d.ts 5.3 KB

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