map.data.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. export const respDept = await queryDicsByName('责任处室')
  30. export const collectDept = await queryDicsByName('保管单位')
  31. const checkStatus = [
  32. { label: '未提交', value: 1 },
  33. { label: '审核中', value: 2 },
  34. { label: '审核不通过', value: 3 },
  35. { label: '被驳回', value: 4 },
  36. { label: '审核通过', value: 5 },
  37. ]
  38. export enum KeysTypeEnum {
  39. DISABLED = 'disabled',
  40. ENABLED = 'enabled',
  41. }
  42. export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }> = {
  43. [RoleEnum.PLATFORM_ADMIN]: { key: 'enabled_platform_admin_auth', keyType: KeysTypeEnum.ENABLED },
  44. [RoleEnum.SYS_ADMIN]: { key: 'enabled_sysadmin_auth', keyType: KeysTypeEnum.ENABLED },
  45. [RoleEnum.TENANT_ADMIN]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
  46. [RoleEnum.CUSTOMER_USER]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
  47. };
  48. /**
  49. * 列表显示信息
  50. */
  51. export const columns: BasicColumn[] = [
  52. {
  53. title: '序号',
  54. dataIndex: 'xh',
  55. width: 90,
  56. },
  57. {
  58. title: '资源编号',
  59. dataIndex: 'serviceid',
  60. width: 120,
  61. },
  62. {
  63. title: '资源名称',
  64. dataIndex: 'servicename',
  65. width: 160,
  66. },
  67. {
  68. title: '坐标系名称',
  69. dataIndex: 'crs',
  70. width: 120,
  71. },
  72. {
  73. title: '资源标签',
  74. dataIndex: 'service',
  75. width: 120,
  76. },
  77. {
  78. title: '发布人',
  79. dataIndex: 'publisher',
  80. width: 100,
  81. },
  82. {
  83. title: '发布时间',
  84. dataIndex: 'publishdate',
  85. width: 180,
  86. slots: { customRender: 'pdate' },
  87. },
  88. {
  89. title: '当前环节',
  90. dataIndex: 'curLink',
  91. width: 90,
  92. },
  93. {
  94. title: '当前处理人',
  95. dataIndex: 'curHandler',
  96. width: 100,
  97. },
  98. {
  99. title: '审核状态',
  100. dataIndex: 'status',
  101. width: 110,
  102. slots: { customRender: 'status' },
  103. },
  104. {
  105. title: '审核时间',
  106. dataIndex: 'checkTime',
  107. width: 180,
  108. },
  109. ];
  110. /**
  111. * 查询条件
  112. */
  113. export const searchFormSchema: FormSchema[] = [
  114. {
  115. field: 'resTag',
  116. label: '资源标签',
  117. component: 'Select',
  118. componentProps: {
  119. options: serviceTags,
  120. // [
  121. // { label: '标签1', value: 1 },
  122. // { label: '标签2', value: 2 },
  123. // { label: '标签3', value: 3 },
  124. // ],
  125. },
  126. colProps: { span: 6 },
  127. },
  128. {
  129. field: 'resName',
  130. label: '资源名称',
  131. component: 'Input',
  132. colProps: { span: 6 },
  133. componentProps: {
  134. maxLength: 255,
  135. },
  136. },
  137. {
  138. field: 'checkStatus',
  139. label: '审核状态',
  140. component: 'Select',
  141. componentProps: {
  142. options: checkStatus,
  143. },
  144. colProps: { span: 6 },
  145. },
  146. ];
  147. /**
  148. * 表单
  149. */
  150. export const formSchema: FormSchema[] = [
  151. {
  152. field: 'groupName',
  153. label: '角色名称',
  154. required: true,
  155. component: 'Input',
  156. componentProps: {
  157. maxLength: 255,
  158. placeholder: '请输入角色名称',
  159. },
  160. },
  161. {
  162. label: '排序',
  163. field: 'sort',
  164. component: 'Input',
  165. componentProps: {
  166. maxLength: 255,
  167. placeholder: '请输入排序',
  168. },
  169. }
  170. ];