diff --git a/src/api/mdm/CountryRegion/index.ts b/src/api/mdm/CountryRegion/index.ts new file mode 100644 index 0000000..2654f79 --- /dev/null +++ b/src/api/mdm/CountryRegion/index.ts @@ -0,0 +1,87 @@ +import { LngBRegionPageModel, LngBRegionPageParams, LngBRegionPageResult } from './model/CountryRegionModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/mdm/countryRegion/page', + List = '/mdm/countryRegion/list', + Info = '/mdm/countryRegion/info', + LngBRegion = '/mdm/countryRegion', + + +} + +/** + * @description: 查询LngBRegion分页列表 + */ +export async function getLngBRegionPage(params: LngBRegionPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngBRegion信息 + */ +export async function getLngBRegion(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngBRegion + */ +export async function addLngBRegion(lngBRegion: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngBRegion, + params: lngBRegion, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngBRegion + */ +export async function updateLngBRegion(lngBRegion: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngBRegion, + params: lngBRegion, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngBRegion(批量删除) + */ +export async function deleteLngBRegion(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngBRegion, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/mdm/CountryRegion/model/CountryRegionModel.ts b/src/api/mdm/CountryRegion/model/CountryRegionModel.ts new file mode 100644 index 0000000..21a731e --- /dev/null +++ b/src/api/mdm/CountryRegion/model/CountryRegionModel.ts @@ -0,0 +1,85 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngBRegion分页参数 模型 + */ +export interface LngBRegionPageParams extends BasicPageParams { + id: string; + + code: string; + + createUserId: string; + + regionTypeCode: string; + + pid: string; + + fullName: string; + + valid: string; + + note: string; +} + +/** + * @description: LngBRegion分页返回值模型 + */ +export interface LngBRegionPageModel { + id: string; + + regionTypeCode: string; + + valid: string; + + code: string; + + fullName: string; + + pid: string; + + note: string; + + createUserId: string; +} + +/** + * @description: LngBRegion表类型 + */ +export interface LngBRegionModel { + id: number; + + code: string; + + fullName: string; + + regionTypeCode: string; + + pid: number; + + fullPath: string; + + valid: string; + + note: string; + + createUserId: number; + + createDate: string; + + modifyUserId: number; + + modifyDate: string; + + deleteMark: number; + + tenantId: number; + + deptId: number; + + ruleUserId: number; +} + +/** + * @description: LngBRegion分页返回值结构 + */ +export type LngBRegionPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/views/mdm/CountryRegion/components/CountryRegionModal.vue b/src/views/mdm/CountryRegion/components/CountryRegionModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/mdm/CountryRegion/components/CountryRegionModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/mdm/CountryRegion/components/Form.vue b/src/views/mdm/CountryRegion/components/Form.vue new file mode 100644 index 0000000..8637e72 --- /dev/null +++ b/src/views/mdm/CountryRegion/components/Form.vue @@ -0,0 +1,224 @@ + + \ No newline at end of file diff --git a/src/views/mdm/CountryRegion/components/config.ts b/src/views/mdm/CountryRegion/components/config.ts new file mode 100644 index 0000000..0e46ff7 --- /dev/null +++ b/src/views/mdm/CountryRegion/components/config.ts @@ -0,0 +1,505 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'id', + label: 'id', + component: 'Input', + }, + { + field: 'code', + label: '编码', + component: 'Input', + }, + { + field: 'createUserId', + label: '名称', + component: 'Input', + }, + { + field: 'regionTypeCode', + label: '类型', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '1980458729324212226' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + }, + { + field: 'pid', + label: '上级ID', + component: 'Input', + }, + { + field: 'fullName', + label: '全路径名称', + component: 'Input', + }, + { + field: 'valid', + label: '有效标志', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '1978057078528327681' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + }, + { + field: 'note', + label: '备注', + component: 'Input', + }, +]; + +export const columns: BasicColumn[] = [ + { + dataIndex: 'id', + title: 'id', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'regionTypeCode', + title: '类型', + componentType: 'select', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'valid', + title: '有效标志', + componentType: 'select', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'code', + title: '编码', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'fullName', + title: '全路径名称', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'pid', + title: '上级ID', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'note', + title: '备注', + componentType: 'textarea', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'createUserId', + title: '名称', + componentType: 'input', + align: 'left', + + sorter: true, + }, +]; +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; +export const formProps: FormProps = { + labelCol: { span: 3, offset: 0 }, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: '3665616565b14649b7cc18269b7a2d06', + field: 'id', + label: 'id', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入id', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '04cf4a78d06244f282a8082070bdd160', + field: 'code', + label: '编码', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入编码', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '569e80f61cfa49338d3a629acf403b2f', + field: 'createUserId', + label: '名称', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入名称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'ac57735d6de3479ab78a092cce60af35', + field: 'regionTypeCode', + label: '类型', + type: 'select', + component: 'XjrSelect', + colProps: { span: 24 }, + componentProps: { + width: '100%', + span: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请选择下拉选择类型', + sepTextField: '', + showLabel: true, + showSearch: false, + clearable: false, + disabled: false, + staticOptions: [ + { key: 1, label: 'Option 1', value: 'Option 1' }, + { key: 2, label: 'Option 2', value: 'Option 2' }, + { key: 3, label: 'Option 3', value: 'Option 3' }, + ], + defaultSelect: null, + datasourceType: 'dic', + params: { itemId: '1980458729324212226' }, + labelField: 'name', + valueField: 'value', + apiConfig: { + path: 'CodeGeneration/selection', + method: 'GET', + apiId: '93d735dcb7364a0f8102188ec4d77ac7', + }, + dicOptions: [], + required: false, + rules: [], + events: {}, + isShow: true, + itemId: '1980458729324212226', + style: { width: '100%' }, + }, + }, + { + key: '8b4d0e4a36164d219b2fe9045e056581', + field: 'pid', + label: '上级ID', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入上级ID', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'd71fb1fcf5924520b059b1f0b79837f3', + field: 'fullName', + label: '全路径名称', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入全路径名称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '5ee69ee1a3c846aa9ae77035208eac66', + field: 'valid', + label: '有效标志', + type: 'select', + component: 'XjrSelect', + colProps: { span: 24 }, + componentProps: { + width: '100%', + span: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请选择下拉选择', + sepTextField: '', + showLabel: true, + showSearch: false, + clearable: false, + disabled: false, + staticOptions: [ + { key: 1, label: 'Option 1', value: 'Option 1' }, + { key: 2, label: 'Option 2', value: 'Option 2' }, + { key: 3, label: 'Option 3', value: 'Option 3' }, + ], + defaultSelect: null, + datasourceType: 'dic', + params: { itemId: '1978057078528327681' }, + labelField: 'name', + valueField: 'value', + apiConfig: { + path: 'CodeGeneration/selection', + method: 'GET', + apiId: '93d735dcb7364a0f8102188ec4d77ac7', + }, + dicOptions: [], + required: false, + rules: [], + events: {}, + isShow: true, + itemId: '1978057078528327681', + style: { width: '100%' }, + }, + }, + { + key: 'fa22773393104485870ba4f6c54e5457', + field: 'note', + label: '备注', + type: 'textarea', + component: 'InputTextArea', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: true, + placeholder: '请输入备注', + maxlength: 200, + rows: 4, + autoSize: false, + showCount: false, + disabled: false, + showLabel: true, + allowClear: false, + required: false, + isShow: true, + rules: [], + events: {}, + style: { width: '100%' }, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/mdm/CountryRegion/components/workflowPermission.ts b/src/views/mdm/CountryRegion/components/workflowPermission.ts new file mode 100644 index 0000000..d97da25 --- /dev/null +++ b/src/views/mdm/CountryRegion/components/workflowPermission.ts @@ -0,0 +1,122 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: 'id', + fieldId: 'id', + isSubTable: false, + showChildren: true, + type: 'input', + key: '3665616565b14649b7cc18269b7a2d06', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '编码', + fieldId: 'code', + isSubTable: false, + showChildren: true, + type: 'input', + key: '04cf4a78d06244f282a8082070bdd160', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '名称', + fieldId: 'createUserId', + isSubTable: false, + showChildren: true, + type: 'input', + key: '569e80f61cfa49338d3a629acf403b2f', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '类型', + fieldId: 'regionTypeCode', + isSubTable: false, + showChildren: true, + type: 'select', + key: 'ac57735d6de3479ab78a092cce60af35', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '上级ID', + fieldId: 'pid', + isSubTable: false, + showChildren: true, + type: 'input', + key: '8b4d0e4a36164d219b2fe9045e056581', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '全路径名称', + fieldId: 'fullName', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'd71fb1fcf5924520b059b1f0b79837f3', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '有效标志', + fieldId: 'valid', + isSubTable: false, + showChildren: true, + type: 'select', + key: '5ee69ee1a3c846aa9ae77035208eac66', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '备注', + fieldId: 'note', + isSubTable: false, + showChildren: true, + type: 'textarea', + key: 'fa22773393104485870ba4f6c54e5457', + children: [], + }, +]; \ No newline at end of file diff --git a/src/views/mdm/CountryRegion/index.vue b/src/views/mdm/CountryRegion/index.vue new file mode 100644 index 0000000..065bd2c --- /dev/null +++ b/src/views/mdm/CountryRegion/index.vue @@ -0,0 +1,284 @@ + + + \ No newline at end of file