diff --git a/core/core-backend/src/main/resources/db/migration/V2.10__ddl.sql b/core/core-backend/src/main/resources/db/migration/V2.10__ddl.sql index 0ed36649c2..5f1d1d8455 100644 --- a/core/core-backend/src/main/resources/db/migration/V2.10__ddl.sql +++ b/core/core-backend/src/main/resources/db/migration/V2.10__ddl.sql @@ -70,3 +70,16 @@ alter table `core_chart_view` update visualization_outer_params_target_view_info tvi INNER JOIN core_chart_view ccv on tvi.target_view_id = ccv.id set tvi.target_ds_id = ccv.table_id + + +DROP TABLE IF EXISTS `core_font`; +CREATE TABLE `core_font` +( + `id` bigint NOT NULL COMMENT 'ID', + `name` varchar(255) NOT NULL COMMENT '字体名称', + `file_name` varchar(255) NOT NULL COMMENT '文件名称', + `file_trans_name` varchar(255) NOT NULL COMMENT '文件转换名称', + `is_default` tinyint(1) NOT NULL COMMENT '是否默认', + `is_BuiltIn` tinyint(1) NOT NULL COMMENT '是否内置', + PRIMARY KEY (`id`) +); diff --git a/core/core-frontend/src/api/font.ts b/core/core-frontend/src/api/font.ts new file mode 100644 index 0000000000..b47c556342 --- /dev/null +++ b/core/core-frontend/src/api/font.ts @@ -0,0 +1,39 @@ +import request from '@/config/axios' + +export interface Font { + id: string + name: string + fileName: string + isDefault: boolean + isBuiltin?: boolean +} + +export const list = (data = {}) => { + return request.post({ url: '/typeface/listFont', data }).then(res => { + return res?.data + }) +} + +export const create = (data = {}) => { + return request.post({ url: '/typeface/create', data }).then(res => { + return res?.data + }) +} + +export const edit = (data = {}) => { + return request.post({ url: '/typeface/edit', data }).then(res => { + return res?.data + }) +} + +export const changeDefault = (data = {}) => { + return request.post({ url: '/typeface/changeDefault', data }).then(res => { + return res?.data + }) +} + +export const deleteById = id => { + return request.post({ url: '/typeface/delete/' + id, data: {} }).then(res => { + return res?.data + }) +} diff --git a/core/core-frontend/src/views/system/font/index.vue b/core/core-frontend/src/views/system/font/index.vue index 9a2321fc65..e55dd41f84 100644 --- a/core/core-frontend/src/views/system/font/index.vue +++ b/core/core-frontend/src/views/system/font/index.vue @@ -1,12 +1,39 @@