import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; import { RoleEnum } from '/@/enums/roleEnum'; import { getServiceTypes,queryServiceTags,queryDicsByName,queryCoors } from '/@/api/resource/map'; const resTag = await queryServiceTags() let listTag = [] resTag.map(item => { listTag.push({ label: item.name, value: item.code }) }) /** * 密级字典 */ export const secrets = await queryDicsByName('密级') /** * 服务标签 */ export const serviceTags = listTag; /** * 坐标系列表 */ export const sysCoors = await queryCoors() /** * 服务类型 */ export const serviceTypes = await getServiceTypes() /** * 责任处室 */ export const respDept = await queryDicsByName('责任处室') /** * 保管单位 */ export const collectDept = await queryDicsByName('保管单位') /** * EPSG code */ export const EPSGCodes = await queryDicsByName('EPSG code') const checkStatus = [ { label: '未提交', value: 1 }, { label: '审核中', value: 2 }, { label: '审核不通过', value: 3 }, { label: '被驳回', value: 4 }, { label: '审核通过', value: 5 }, { label: '我的', value: 6 }, ] export enum KeysTypeEnum { DISABLED = 'disabled', ENABLED = 'enabled', } export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }> = { [RoleEnum.PLATFORM_ADMIN]: { key: 'enabled_platform_admin_auth', keyType: KeysTypeEnum.ENABLED }, [RoleEnum.SYS_ADMIN]: { key: 'enabled_sysadmin_auth', keyType: KeysTypeEnum.ENABLED }, [RoleEnum.TENANT_ADMIN]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED }, [RoleEnum.CUSTOMER_USER]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED }, }; /** * 查询条件 */ export const searchFormSchema: FormSchema[] = [ { field: 'resTag', label: '资源标签', component: 'Select', componentProps: { options: serviceTags, // [ // { label: '标签1', value: 1 }, // { label: '标签2', value: 2 }, // { label: '标签3', value: 3 }, // ], }, colProps: { span: 5 }, }, { field: 'resName', label: '资源名称', component: 'Input', colProps: { span: 5 }, componentProps: { maxLength: 255, }, }, { field: 'checkStatus', label: '审核状态', component: 'Select', componentProps: { options: checkStatus, }, colProps: { span: 5 }, }, ]; /** * 列表显示信息 */ export const columns: BasicColumn[] = [ { title: '资源标签', dataIndex: 'typename', width: 120, }, { title: '资源名称', dataIndex: 'servicename', width: 160, }, { title: '应用系统', dataIndex: 'servicename', width: 160, }, { title: '申请单位', dataIndex: 'servicename', width: 160, }, // { // title: '发布人', // dataIndex: 'publisher', // width: 120, // }, // { // title: '发布时间', // dataIndex: 'publishdate', // width: 180, // slots: { customRender: 'pdate' }, // }, { title: '申请时间', dataIndex: 'checkTime', width: 100, }, { title: '申请人', dataIndex: 'curHandler', width: 100, }, { title: '审核状态', dataIndex: 'status', width: 110, slots: { customRender: 'status' }, }, ]; /** * 表单 */ export const formSchema: FormSchema[] = [ { field: 'groupName', label: '角色名称', required: true, component: 'Input', componentProps: { maxLength: 255, placeholder: '请输入角色名称', }, }, { label: '排序', field: 'sort', component: 'Input', componentProps: { maxLength: 255, placeholder: '请输入排序', }, } ];