map.data.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { RoleEnum } from '/@/enums/roleEnum';
  4. import { getServiceTypes,queryServiceTags,queryDicsByName,queryCoors } from '/@/api/resource/map';
  5. const resTag = await queryServiceTags()
  6. let listTag = []
  7. resTag.map(item => {
  8. listTag.push({
  9. label: item.name,
  10. value: item.code
  11. })
  12. })
  13. /**
  14. * 密级字典
  15. */
  16. export const secrets = await queryDicsByName('密级')
  17. /**
  18. * 服务标签
  19. */
  20. export const serviceTags = listTag;
  21. /**
  22. * 坐标系列表
  23. */
  24. export const sysCoors = await queryCoors()
  25. /**
  26. * 服务类型
  27. */
  28. export const serviceTypes = await getServiceTypes()
  29. /**
  30. * 责任处室
  31. */
  32. export const respDept = await queryDicsByName('责任处室')
  33. /**
  34. * 保管单位
  35. */
  36. export const collectDept = await queryDicsByName('保管单位')
  37. /**
  38. * EPSG code
  39. */
  40. export const EPSGCodes = await queryDicsByName('EPSG code')
  41. const checkStatus = [
  42. { label: '未提交', value: 1 },
  43. { label: '审核中', value: 2 },
  44. { label: '审核不通过', value: 3 },
  45. { label: '被驳回', value: 4 },
  46. { label: '审核通过', value: 5 },
  47. { label: '我的', value: 6 },
  48. ]
  49. export enum KeysTypeEnum {
  50. DISABLED = 'disabled',
  51. ENABLED = 'enabled',
  52. }
  53. export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }> = {
  54. [RoleEnum.PLATFORM_ADMIN]: { key: 'enabled_platform_admin_auth', keyType: KeysTypeEnum.ENABLED },
  55. [RoleEnum.SYS_ADMIN]: { key: 'enabled_sysadmin_auth', keyType: KeysTypeEnum.ENABLED },
  56. [RoleEnum.TENANT_ADMIN]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
  57. [RoleEnum.CUSTOMER_USER]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
  58. };
  59. /**
  60. * 查询条件
  61. */
  62. export const searchFormSchema: FormSchema[] = [
  63. {
  64. field: 'resTag',
  65. label: '资源标签',
  66. component: 'Select',
  67. componentProps: {
  68. options: serviceTags,
  69. // [
  70. // { label: '标签1', value: 1 },
  71. // { label: '标签2', value: 2 },
  72. // { label: '标签3', value: 3 },
  73. // ],
  74. },
  75. colProps: { span: 5 },
  76. },
  77. {
  78. field: 'resName',
  79. label: '资源名称',
  80. component: 'Input',
  81. colProps: { span: 5 },
  82. componentProps: {
  83. maxLength: 255,
  84. },
  85. },
  86. {
  87. field: 'checkStatus',
  88. label: '审核状态',
  89. component: 'Select',
  90. componentProps: {
  91. options: checkStatus,
  92. },
  93. colProps: { span: 5 },
  94. },
  95. ];
  96. /**
  97. * 列表显示信息
  98. */
  99. export const columns: BasicColumn[] = [
  100. {
  101. title: '资源标签',
  102. dataIndex: 'typename',
  103. width: 120,
  104. },
  105. {
  106. title: '资源名称',
  107. dataIndex: 'servicename',
  108. width: 160,
  109. },
  110. {
  111. title: '应用系统',
  112. dataIndex: 'servicename',
  113. width: 160,
  114. },
  115. {
  116. title: '申请单位',
  117. dataIndex: 'servicename',
  118. width: 160,
  119. },
  120. // {
  121. // title: '发布人',
  122. // dataIndex: 'publisher',
  123. // width: 120,
  124. // },
  125. // {
  126. // title: '发布时间',
  127. // dataIndex: 'publishdate',
  128. // width: 180,
  129. // slots: { customRender: 'pdate' },
  130. // },
  131. {
  132. title: '申请时间',
  133. dataIndex: 'checkTime',
  134. width: 100,
  135. },
  136. {
  137. title: '申请人',
  138. dataIndex: 'curHandler',
  139. width: 100,
  140. },
  141. {
  142. title: '审核状态',
  143. dataIndex: 'status',
  144. width: 110,
  145. slots: { customRender: 'status' },
  146. },
  147. ];
  148. /**
  149. * 表单
  150. */
  151. export const formSchema: FormSchema[] = [
  152. {
  153. field: 'groupName',
  154. label: '角色名称',
  155. required: true,
  156. component: 'Input',
  157. componentProps: {
  158. maxLength: 255,
  159. placeholder: '请输入角色名称',
  160. },
  161. },
  162. {
  163. label: '排序',
  164. field: 'sort',
  165. component: 'Input',
  166. componentProps: {
  167. maxLength: 255,
  168. placeholder: '请输入排序',
  169. },
  170. }
  171. ];