map.data.ts 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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: 3 },
  43. // { label: '审核中', value: 2 },
  44. // { label: '审核不通过', value: 0 },
  45. // { label: '被驳回', value: 4 },
  46. // { label: '审核通过', value: 1 },
  47. // { label: '全部状态', value: '7' },
  48. // { label: '待审核', value: 0 },
  49. // { label: '审核通过', value: 1 },
  50. // { label: '审核不通过', value: 2 },
  51. // { label: '在办', value: 1 },
  52. { label: '待办', value: 1 },
  53. { label: '已办结', value: 2 },
  54. // { label: '待审核', value: 1 },
  55. // { label: '已审核', value: 2 },
  56. ]
  57. export enum KeysTypeEnum {
  58. DISABLED = 'disabled',
  59. ENABLED = 'enabled',
  60. }
  61. export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }> = {
  62. [RoleEnum.PLATFORM_ADMIN]: { key: 'enabled_platform_admin_auth', keyType: KeysTypeEnum.ENABLED },
  63. [RoleEnum.SYS_ADMIN]: { key: 'enabled_sysadmin_auth', keyType: KeysTypeEnum.ENABLED },
  64. [RoleEnum.TENANT_ADMIN]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
  65. [RoleEnum.CUSTOMER_USER]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
  66. };
  67. /**
  68. * 查询条件
  69. */
  70. export const searchFormSchemaMR: FormSchema[] = [
  71. {
  72. field: 'keyStr',
  73. label: '关键字',
  74. component: 'Input',
  75. colProps: { span: 5 },
  76. componentProps: {
  77. maxLength: 255,
  78. },
  79. },
  80. {
  81. field: 'checkStatus',
  82. label: '审核状态',
  83. component: 'Select',
  84. defaultValue: 1,
  85. componentProps: {
  86. options: checkStatus,
  87. },
  88. colProps: { span: 5 },
  89. },
  90. ];
  91. /**
  92. * 查询条件
  93. */
  94. export const searchFormSchemaER: FormSchema[] = [
  95. {
  96. field: 'keyStr',
  97. label: '关键字',
  98. component: 'Input',
  99. colProps: { span: 5 },
  100. componentProps: {
  101. maxLength: 255,
  102. },
  103. },
  104. {
  105. field: 'checkStatus',
  106. label: '审核状态',
  107. component: 'Select',
  108. defaultValue: 1,
  109. componentProps: {
  110. options: checkStatus,
  111. },
  112. colProps: { span: 5 },
  113. },
  114. ];
  115. /**
  116. * 查询条件
  117. */
  118. export const searchFormSchemaDR: FormSchema[] = [
  119. {
  120. field: 'keyStr',
  121. label: '关键字',
  122. component: 'Input',
  123. colProps: { span: 5 },
  124. componentProps: {
  125. maxLength: 255,
  126. },
  127. },
  128. {
  129. field: 'checkStatus',
  130. label: '审核状态',
  131. component: 'Select',
  132. defaultValue: 1,
  133. componentProps: {
  134. options: checkStatus,
  135. },
  136. colProps: { span: 5 },
  137. },
  138. ];
  139. /**
  140. * 查询条件
  141. */
  142. export const searchFormSchemaSR: FormSchema[] = [
  143. {
  144. field: 'keyStr',
  145. label: '关键字',
  146. component: 'Input',
  147. colProps: { span: 5 },
  148. componentProps: {
  149. maxLength: 255,
  150. },
  151. },
  152. {
  153. field: 'checkStatus',
  154. label: '审核状态',
  155. component: 'Select',
  156. defaultValue: 1,
  157. componentProps: {
  158. options: checkStatus,
  159. },
  160. colProps: { span: 5 },
  161. },
  162. ];
  163. /**
  164. * 列表显示信息
  165. */
  166. export const columns: BasicColumn[] = [
  167. {
  168. title: '资源类型',
  169. dataIndex: 'FLOWNAME',
  170. width: 120,
  171. slots: { customRender: 'FLOWNAME' },
  172. },
  173. {
  174. title: '资源名称',
  175. dataIndex: 'SERVICENAME',
  176. width: 160,
  177. },
  178. {
  179. title: '申请时间',
  180. dataIndex: 'SQSJ',
  181. width: 180,
  182. // slots: { customRender: 'pdate' },
  183. },
  184. {
  185. title: '发布人',
  186. dataIndex: 'SQR',
  187. width: 80,
  188. },
  189. {
  190. title: '当前环节',
  191. dataIndex: 'NODENAME',
  192. width: 90,
  193. },
  194. {
  195. title: '当前处理人',
  196. dataIndex: 'USERNAME',
  197. width: 100,
  198. },
  199. // {
  200. // title: '审核状态',
  201. // dataIndex: 'BLZT',
  202. // width: 80,
  203. // slots: { customRender: 'BLZT' },
  204. // },
  205. {
  206. title: '审核结果',
  207. dataIndex: 'ISPASS',
  208. align: 'center',
  209. width: 80,
  210. slots: { customRender: 'ISPASS' },
  211. },
  212. {
  213. title: '审核意见',
  214. dataIndex: 'CHECKINFO',
  215. align: 'center',
  216. width: 80,
  217. },
  218. // {
  219. // title: '审核时间',
  220. // dataIndex: 'checkTime',
  221. // width: 180,
  222. // },
  223. // {
  224. // title: '审核意见',
  225. // dataIndex: 'examine',
  226. // width: 180,
  227. // },
  228. ];
  229. /**
  230. * 表单
  231. */
  232. export const formSchema: FormSchema[] = [
  233. {
  234. field: 'groupName',
  235. label: '角色名称',
  236. required: true,
  237. component: 'Input',
  238. componentProps: {
  239. maxLength: 255,
  240. placeholder: '请输入角色名称',
  241. },
  242. },
  243. {
  244. label: '排序',
  245. field: 'sort',
  246. component: 'Input',
  247. componentProps: {
  248. maxLength: 255,
  249. placeholder: '请输入排序',
  250. },
  251. }
  252. ];
  253. function getOp() {
  254. return new Promise<void>((resolve, reject) => {
  255. resolve([
  256. { label: "通过", value: '1' },
  257. { label: "不通过", value: '0' },
  258. ])
  259. })
  260. }
  261. // 新增表单配置
  262. export const accountFormSchema = [
  263. {
  264. field: 'ispass',
  265. label: "审核结果", //状态
  266. component: 'RadioButtonGroup',
  267. required: true,
  268. colProps: { span: 24 },
  269. defaultValue: '1',
  270. componentProps: {
  271. options: [
  272. { label: "通过", value: '1' },
  273. { label: "不通过", value: '0' },
  274. ],
  275. },
  276. },
  277. {
  278. field: 'opinion',
  279. label: '审核意见',
  280. component: 'Input',
  281. defaultValue: '',
  282. colProps: { span: 24 },
  283. componentProps: {
  284. placeholder: '请输入审核意见',
  285. },
  286. dynamicRules: ({ values }) => {
  287. if (values?.ispass) {
  288. var type = Number(values?.ispass) ? false : true
  289. return [{
  290. required: type,
  291. validator(_, value) {
  292. return new Promise((resolve, reject) => {
  293. if (type && !value) {
  294. reject('不通过意见不能为空!');
  295. } else {
  296. resolve();
  297. }
  298. });
  299. }
  300. }];
  301. }
  302. },
  303. },
  304. ]