diff --git a/.env.development b/.env.development index f8e66ec..0de7757 100644 --- a/.env.development +++ b/.env.development @@ -11,7 +11,7 @@ VITE_PUBLIC_PATH = / # 可以有多个,注意多个不能换行,否则代理将会失效 #VITE_PROXY = [["/api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]] #VITE_PROXY=[["/api/workflow","http://10.0.0.2:8093/workflow/"],["/api","http://10.10.2.102:9500"]] -VITE_PROXY=[["/api","http://10.10.2.102:9500"]] +VITE_PROXY=[["/api/sys/jar/","http://127.0.0.1:8091/sys/jar/"],["/api","http://10.10.2.102:9500"]] #VITE_PROXY=[["/api/approve/","http://127.0.0.1:8096","/approve/"],["/api","http://10.10.2.102:9500"]] #VITE_PROXY=[["/api/system/generator/","http://127.0.0.1:8091/system/generator/"],["/api/system/file/","http://127.0.0.1:8091/system/file/"],["/api/system/oss/","http://127.0.0.1:8091/system/oss/"],["/api/sales/","http://127.0.0.1:8096","/sales/"],["/api/mdm/","http://127.0.0.1:8096","/mdm/"],["/api","http://10.10.2.102:9500"]] #VITE_PROXY=[["/api/sales/","http://127.0.0.1:8096","/sales/"],["/api/mdm/","http://127.0.0.1:8096","/mdm/"],["/api","http://10.10.2.102:9500"]] diff --git a/Dockerfile b/Dockerfile index 0a525c4..4c2d939 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ VOLUME ["/etc/nginx/nginx.conf", "/usr/share/nginx/html"] CMD ["nginx","-g","daemon off;"] -# docker build -t docker.ges.bjgastx.com/itc-web:1.1.20 . +# docker build -t docker.ges.bjgastx.com/itc-web:1.1.25 . diff --git a/src/api/system/jarInfo/index.ts b/src/api/system/jarInfo/index.ts new file mode 100644 index 0000000..92b8431 --- /dev/null +++ b/src/api/system/jarInfo/index.ts @@ -0,0 +1,223 @@ +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +export interface SysJarInfo { + id?: string; + name?: string; + vs?: string; + custom?: string; + bootStart?: string; + active?: string; + libs?: string; + ossPath?: string; + size?: number; + env?: string; + createTime?: string; +} + +export interface SysJarInfoPageListSearchModel { + name?: string; + custom?: string; + bootStart?: string; + active?: string; + page?: number; + pageSize?: number; +} + +export interface SysJarInfoPageListResultModel { + records: SysJarInfo[]; + total: number; +} + +export interface JarHistoryVersion { + id?: string; + name?: string; + vs?: string; + custom?: string; + bootStart?: string; + active?: string; + libs?: string; + ossPath?: string; + size?: number; + env?: string; + createTime?: string; +} + +export interface JarHistoryVersionPageListResultModel { + records: JarHistoryVersion[]; + total: number; +} + +export interface PublishEnv { + label: string; + value: string; +} + +enum Api { + JarInfoPage = '/sys/jar/page', + JarInfoList = '/sys/jarInfo/list', + JarInfo = '/sys/jarInfo', + JarHistoryPage = '/sys/jarInfo/history/page', + JarDownload = '/sys/jar/ad/download', + JarPublish = '/sys/jar/release', + PublishEnvs = '/sys/jarInfo/publish/envs', +} + +/** + * @description: 查询jar包信息分页列表 + */ +export async function getSysJarInfoPageList( + params: SysJarInfoPageListSearchModel, + mode: ErrorMessageMode = 'modal', +) { + return defHttp.get( + { + url: Api.JarInfoPage, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 查询jar包信息列表 + */ +export async function getSysJarInfoList( + params: SysJarInfoPageListSearchModel, + mode: ErrorMessageMode = 'modal', +) { + return defHttp.get( + { + url: Api.JarInfoList, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取jar包信息 + */ +export async function getSysJarInfo(id: string, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.JarInfo, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除jar包信息(批量删除) + */ +export async function deleteSysJarInfo(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.JarInfo, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增jar包信息 + */ +export async function addSysJarInfo(jarInfo: SysJarInfo, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.JarInfo, + params: jarInfo, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新jar包信息 + */ +export async function updateSysJarInfo(jarInfo: SysJarInfo, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.JarInfo, + params: jarInfo, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 查询历史版本分页列表 + */ +export async function getJarHistoryVersionPageList( + params: { jarId: string; page?: number; pageSize?: number }, + mode: ErrorMessageMode = 'modal', +) { + return defHttp.get( + { + url: Api.JarHistoryPage, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 下载jar包 + */ +export async function downloadJar(name: string, env: string, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.JarDownload+`?name=${encodeURIComponent(name)}&env=${encodeURIComponent(env)}`, + responseType: 'blob', + }, + { + errorMessageMode: mode, + isTransformResponse: false, + }, + ); +} + +/** + * @description: 发布jar包 + */ +export async function publishJar(params: { name: string; env: string; fromEnv: string }, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.JarPublish, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取可发布的环境列表 + */ +export async function getPublishEnvs(mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.PublishEnvs, + }, + { + errorMessageMode: mode, + }, + ); +} diff --git a/src/views/system/jarInfo/components/HistoryVersionModal.vue b/src/views/system/jarInfo/components/HistoryVersionModal.vue new file mode 100644 index 0000000..f662e61 --- /dev/null +++ b/src/views/system/jarInfo/components/HistoryVersionModal.vue @@ -0,0 +1,165 @@ + + + diff --git a/src/views/system/jarInfo/components/PublishModal.vue b/src/views/system/jarInfo/components/PublishModal.vue new file mode 100644 index 0000000..141480b --- /dev/null +++ b/src/views/system/jarInfo/components/PublishModal.vue @@ -0,0 +1,142 @@ + + + diff --git a/src/views/system/jarInfo/index.vue b/src/views/system/jarInfo/index.vue new file mode 100644 index 0000000..527117a --- /dev/null +++ b/src/views/system/jarInfo/index.vue @@ -0,0 +1,255 @@ + + +