diff --git a/src/api/system/template/index.ts b/src/api/system/template/index.ts new file mode 100644 index 0000000..6a81c01 --- /dev/null +++ b/src/api/system/template/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +// 模板 VO +export interface TemplateVO { + id: number // 主键ID + type: string // 类型 + orgid: number // 组织ID + content: string // 内容 + createtime: Date // 创建时间 + updatetime: Date // 更新时间 +} + +// 模板 API +export const TemplateApi = { + // 查询模板分页 + getTemplatePage: async (params: any) => { + return await request.get({ url: `/system/template/page`, params }) + }, + + // 查询模板详情 + getTemplate: async (id: number) => { + return await request.get({ url: `/system/template/get?id=` + id }) + }, + // 查询模板列表 + getTemplateList: async (type: string, orgid: number) => { + return await request.get({ url: `/system/template/list?type=` + type + `&orgid=` + orgid }) + }, + + // 新增模板 + createTemplate: async (data: TemplateVO) => { + return await request.post({ url: `/system/template/create`, data }) + }, + + // 修改模板 + updateTemplate: async (data: TemplateVO) => { + return await request.put({ url: `/system/template/update`, data }) + }, + + // 删除模板 + deleteTemplate: async (id: number) => { + return await request.delete({ url: `/system/template/delete?id=` + id }) + }, + + // 导出模板 Excel + exportTemplate: async (params) => { + return await request.download({ url: `/system/template/export-excel`, params }) + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 947f9f3..2ee3b1d 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -244,5 +244,7 @@ export enum DICT_TYPE { IOT_PLUGIN_STATUS = 'iot_plugin_status', // IOT 插件状态 IOT_PLUGIN_TYPE = 'iot_plugin_type', // IOT 插件类型 IOT_DATA_BRIDGE_DIRECTION_ENUM = 'iot_data_bridge_direction_enum', // 桥梁方向 - IOT_DATA_BRIDGE_TYPE_ENUM = 'iot_data_bridge_type_enum' // 桥梁类型 + IOT_DATA_BRIDGE_TYPE_ENUM = 'iot_data_bridge_type_enum', // 桥梁类型 + //=================TEMPLATE_TYPE================= + TEMPLATE_TYPE = 'template_type' // 模板类型 } diff --git a/src/views/system/template/TemplateForm.vue b/src/views/system/template/TemplateForm.vue new file mode 100644 index 0000000..b8466af --- /dev/null +++ b/src/views/system/template/TemplateForm.vue @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + 确 定 + 取 消 + + + + + diff --git a/src/views/system/template/index.vue b/src/views/system/template/index.vue new file mode 100644 index 0000000..411e196 --- /dev/null +++ b/src/views/system/template/index.vue @@ -0,0 +1,300 @@ + + + + + + + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + + + + + + +