no message
parent
ead5985316
commit
93b0d36771
|
|
@ -1,4 +1,4 @@
|
||||||
# 是否打开mock
|
# 是否打开 mock
|
||||||
VITE_USE_MOCK = true
|
VITE_USE_MOCK = true
|
||||||
|
|
||||||
# 发布路径
|
# 发布路径
|
||||||
|
|
@ -8,22 +8,25 @@ VITE_PUBLIC_PATH = /
|
||||||
# 跨域代理,您可以配置多个 ,请注意,没有换行符
|
# 跨域代理,您可以配置多个 ,请注意,没有换行符
|
||||||
VITE_PROXY = [["/cpte-wms","http://localhost:8000/cpte-wms"],["/upload","http://localhost:3300/upload"]]
|
VITE_PROXY = [["/cpte-wms","http://localhost:8000/cpte-wms"],["/upload","http://localhost:3300/upload"]]
|
||||||
|
|
||||||
#后台接口全路径地址(必填)
|
#后台接口全路径地址 (必填)
|
||||||
VITE_GLOB_DOMAIN_URL=http://localhost:8000/cpte-wms
|
VITE_GLOB_DOMAIN_URL=http://localhost:8000/cpte-wms
|
||||||
|
|
||||||
#后台接口父地址(必填)
|
#后台接口父地址 (必填)
|
||||||
VITE_GLOB_API_URL=/cpte-wms
|
VITE_GLOB_API_URL=/cpte-wms
|
||||||
|
|
||||||
# 接口前缀
|
# 接口前缀
|
||||||
VITE_GLOB_API_URL_PREFIX=
|
VITE_GLOB_API_URL_PREFIX=
|
||||||
|
|
||||||
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,cpte-app-1为子应用的项目名称,也是子应用的路由父路径
|
#微前端 qiankun 应用,命名必须以 VITE_APP_SUB_开头,cpte-app-1 为子应用的项目名称,也是子应用的路由父路径
|
||||||
VITE_APP_SUB_cpte-app-1 = '//localhost:8092'
|
VITE_APP_SUB_cpte-app-1 = '//localhost:8092'
|
||||||
|
|
||||||
|
# 基础服务微服务地址 (8001 端口)
|
||||||
|
VITE_GLOB_BASIC_SERVICE_URL=http://localhost:8001/cpte-wms-basic/api/wms/basic
|
||||||
|
|
||||||
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示cpte-vue3将以乾坤子应用模式启动)
|
|
||||||
|
# 填写后将作为乾坤子应用启动,主应用注册时 AppName 需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示 cpte-vue3 将以乾坤子应用模式启动)
|
||||||
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=cpte-vue3
|
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=cpte-vue3
|
||||||
# 作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致
|
# 作为乾坤子应用启动时必填,需与 qiankun 主应用注册子应用时填写的 entry 保持一致
|
||||||
#VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/cpte-vue3
|
#VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/cpte-vue3
|
||||||
|
|
||||||
# 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开
|
# 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,20 @@ VITE_BUILD_COMPRESS = 'gzip'
|
||||||
# 使用压缩时是否删除原始文件,默认为false
|
# 使用压缩时是否删除原始文件,默认为false
|
||||||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
||||||
|
|
||||||
#后台接口父地址(必填)
|
#后台接口父地址 (必填)
|
||||||
VITE_GLOB_API_URL=/cpte-wms
|
VITE_GLOB_API_URL=/cpte-wms
|
||||||
|
|
||||||
#后台接口全路径地址(必填)
|
#后台接口全路径地址 (必填)
|
||||||
#VITE_GLOB_DOMAIN_URL=http://10.180.9.60:8000/cpte-wms
|
#VITE_GLOB_DOMAIN_URL=http://10.180.9.60:8000/cpte-wms
|
||||||
#VITE_GLOB_DOMAIN_URL=http://47.117.45.79:8000/cpte-wms
|
#VITE_GLOB_DOMAIN_URL=http://47.117.45.79:8000/cpte-wms
|
||||||
VITE_GLOB_DOMAIN_URL=http://10.254.27.192:8000/cpte-wms
|
VITE_GLOB_DOMAIN_URL=http://10.254.27.192:8000/cpte-wms
|
||||||
# 接口父路径前缀
|
# 接口父路径前缀
|
||||||
VITE_GLOB_API_URL_PREFIX=
|
VITE_GLOB_API_URL_PREFIX=
|
||||||
|
|
||||||
|
# 基础服务微服务地址 (8001 端口)
|
||||||
|
# 生产环境请根据实际部署情况修改地址
|
||||||
|
VITE_GLOB_BASIC_SERVICE_URL=http://10.254.27.192:8001/cpte-wms-basic/api/wms/basic
|
||||||
|
|
||||||
|
|
||||||
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示cpte-vue3将以乾坤子应用模式启动)
|
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示cpte-vue3将以乾坤子应用模式启动)
|
||||||
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=cpte-vue3
|
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=cpte-vue3
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
|
||||||
VITE_GLOB_DOMAIN_URL,
|
VITE_GLOB_DOMAIN_URL,
|
||||||
VITE_GLOB_ONLINE_VIEW_URL,
|
VITE_GLOB_ONLINE_VIEW_URL,
|
||||||
VITE_GLOB_RUN_PLATFORM,
|
VITE_GLOB_RUN_PLATFORM,
|
||||||
|
VITE_GLOB_BASIC_SERVICE_URL,
|
||||||
|
|
||||||
// 【CPTE作为乾坤子应用】
|
// 【CPTE 作为乾坤子应用】
|
||||||
VITE_GLOB_QIANKUN_MICRO_APP_NAME,
|
VITE_GLOB_QIANKUN_MICRO_APP_NAME,
|
||||||
VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
|
VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
|
||||||
} = getAppEnvConfig();
|
} = getAppEnvConfig();
|
||||||
|
|
@ -26,7 +27,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 短标题:替换shortName的下划线为空格
|
// 短标题:替换 shortName 的下划线为空格
|
||||||
const shortTitle = VITE_GLOB_APP_SHORT_NAME.replace(/_/g, " ");
|
const shortTitle = VITE_GLOB_APP_SHORT_NAME.replace(/_/g, " ");
|
||||||
// Take global configuration
|
// Take global configuration
|
||||||
const glob: Readonly<GlobConfig> = {
|
const glob: Readonly<GlobConfig> = {
|
||||||
|
|
@ -44,10 +45,12 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
|
||||||
// 当前是否运行在 electron 平台
|
// 当前是否运行在 electron 平台
|
||||||
isElectronPlatform: VITE_GLOB_RUN_PLATFORM === 'electron',
|
isElectronPlatform: VITE_GLOB_RUN_PLATFORM === 'electron',
|
||||||
|
|
||||||
// 【CPTE作为乾坤子应用】是否以乾坤子应用模式启动
|
// 【CPTE 作为乾坤子应用】是否以乾坤子应用模式启动
|
||||||
isQiankunMicro: VITE_GLOB_QIANKUN_MICRO_APP_NAME != null && VITE_GLOB_QIANKUN_MICRO_APP_NAME !== '',
|
isQiankunMicro: VITE_GLOB_QIANKUN_MICRO_APP_NAME != null && VITE_GLOB_QIANKUN_MICRO_APP_NAME !== '',
|
||||||
// 【CPTE作为乾坤子应用】乾坤子应用入口
|
// 【CPTE 作为乾坤子应用】乾坤子应用入口
|
||||||
qiankunMicroAppEntry: VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
|
qiankunMicroAppEntry: VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
|
||||||
|
// 基础服务微服务地址
|
||||||
|
basicServiceUrl: VITE_GLOB_BASIC_SERVICE_URL,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 【CPTE作为乾坤子应用】乾坤子应用下,需要定义一下
|
// 【CPTE作为乾坤子应用】乾坤子应用下,需要定义一下
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ export function getAppEnvConfig() {
|
||||||
|
|
||||||
//在线文档编辑版本。可选属性:wps, onlyoffice
|
//在线文档编辑版本。可选属性:wps, onlyoffice
|
||||||
VITE_GLOB_ONLINE_DOCUMENT_VERSION,
|
VITE_GLOB_ONLINE_DOCUMENT_VERSION,
|
||||||
|
// 基础服务微服务地址
|
||||||
|
VITE_GLOB_BASIC_SERVICE_URL,
|
||||||
} = ENV;
|
} = ENV;
|
||||||
|
|
||||||
// if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
// if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
||||||
|
|
@ -69,12 +71,14 @@ export function getAppEnvConfig() {
|
||||||
VITE_GLOB_HIDE_LAYOUT_TYPES,
|
VITE_GLOB_HIDE_LAYOUT_TYPES,
|
||||||
VITE_GLOB_RUN_PLATFORM,
|
VITE_GLOB_RUN_PLATFORM,
|
||||||
|
|
||||||
// 【CPTE作为乾坤子应用】
|
// 【CPTE 作为乾坤子应用】
|
||||||
VITE_GLOB_QIANKUN_MICRO_APP_NAME,
|
VITE_GLOB_QIANKUN_MICRO_APP_NAME,
|
||||||
VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
|
VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
|
||||||
|
|
||||||
//在线文档编辑版本。可选属性:wps, onlyoffice
|
//在线文档编辑版本。可选属性:wps, onlyoffice
|
||||||
VITE_GLOB_ONLINE_DOCUMENT_VERSION
|
VITE_GLOB_ONLINE_DOCUMENT_VERSION,
|
||||||
|
// 基础服务微服务地址
|
||||||
|
VITE_GLOB_BASIC_SERVICE_URL,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -318,9 +318,10 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
|
||||||
}
|
}
|
||||||
export const defHttp = createAxios();
|
export const defHttp = createAxios();
|
||||||
|
|
||||||
// other api url
|
// 基础服务微服务 API (8001 端口)
|
||||||
// export const otherHttp = createAxios({
|
// 开发环境从 .env.development 读取,生产环境从 .env.production 读取 VITE_GLOB_BASIC_SERVICE_URL
|
||||||
// requestOptions: {
|
export const basicHttp = createAxios({
|
||||||
// apiUrl: 'xxx',
|
requestOptions: {
|
||||||
// },
|
apiUrl: globSetting.basicServiceUrl,
|
||||||
// });
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { basicHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/base/area/list',
|
list = '/area/list',
|
||||||
queryById='/base/area/queryById',
|
queryById='/area/queryById',
|
||||||
save = '/base/area/add',
|
save = '/area/add',
|
||||||
edit = '/base/area/edit',
|
edit = '/area/edit',
|
||||||
deleteOne = '/base/area/delete',
|
deleteOne = '/area/delete',
|
||||||
deleteBatch = '/base/area/deleteBatch',
|
deleteBatch = '/area/deleteBatch',
|
||||||
importExcel = '/base/area/importExcel',
|
importExcel = '/area/importExcel',
|
||||||
exportXls = '/base/area/exportXls',
|
exportXls = '/area/exportXls',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出api
|
* 导出 api
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getExportUrl = Api.exportXls;
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入api
|
* 导入 api
|
||||||
*/
|
*/
|
||||||
export const getImportUrl = Api.importExcel;
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
|
@ -29,20 +29,20 @@ export const getImportUrl = Api.importExcel;
|
||||||
* 列表接口
|
* 列表接口
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => basicHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id查询
|
* id 查询
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
|
export const queryById = (params) => basicHttp.get({ url: Api.queryById, params });
|
||||||
/**
|
/**
|
||||||
* 删除单个
|
* 删除单个
|
||||||
* @param params
|
* @param params
|
||||||
* @param handleSuccess
|
* @param handleSuccess
|
||||||
*/
|
*/
|
||||||
export const deleteOne = (params, handleSuccess) => {
|
export const deleteOne = (params, handleSuccess) => {
|
||||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
return basicHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -60,7 +60,7 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
return defHttp
|
return basicHttp
|
||||||
.delete(
|
.delete(
|
||||||
{
|
{
|
||||||
url: Api.deleteBatch,
|
url: Api.deleteBatch,
|
||||||
|
|
@ -82,6 +82,6 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
*/
|
*/
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
const url = isUpdate ? Api.edit : Api.save;
|
const url = isUpdate ? Api.edit : Api.save;
|
||||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
return basicHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { basicHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/base/item/list',
|
list = '/item/list',
|
||||||
queryById = '/base/item/queryById',
|
queryById = '/item/queryById',
|
||||||
save = '/base/item/add',
|
save = '/item/add',
|
||||||
edit = '/base/item/edit',
|
edit = '/item/edit',
|
||||||
deleteOne = '/base/item/delete',
|
deleteOne = '/item/delete',
|
||||||
deleteBatch = '/base/item/deleteBatch',
|
deleteBatch = '/item/deleteBatch',
|
||||||
importExcel = '/base/item/importExcel',
|
importExcel = '/item/importExcel',
|
||||||
exportXls = '/base/item/exportXls',
|
exportXls = '/item/exportXls',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出api
|
* 导出 api
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getExportUrl = Api.exportXls;
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入api
|
* 导入 api
|
||||||
*/
|
*/
|
||||||
export const getImportUrl = Api.importExcel;
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
|
@ -29,13 +29,13 @@ export const getImportUrl = Api.importExcel;
|
||||||
* 列表接口
|
* 列表接口
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => basicHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id查询
|
* id 查询
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
|
export const queryById = (params) => basicHttp.get({ url: Api.queryById, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除单个
|
* 删除单个
|
||||||
|
|
@ -43,7 +43,7 @@ export const queryById = (params) => defHttp.get({ url: Api.queryById, params })
|
||||||
* @param handleSuccess
|
* @param handleSuccess
|
||||||
*/
|
*/
|
||||||
export const deleteOne = (params, handleSuccess) => {
|
export const deleteOne = (params, handleSuccess) => {
|
||||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
return basicHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -61,7 +61,7 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
return defHttp
|
return basicHttp
|
||||||
.delete(
|
.delete(
|
||||||
{
|
{
|
||||||
url: Api.deleteBatch,
|
url: Api.deleteBatch,
|
||||||
|
|
@ -83,5 +83,5 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
*/
|
*/
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
const url = isUpdate ? Api.edit : Api.save;
|
const url = isUpdate ? Api.edit : Api.save;
|
||||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
return basicHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,28 @@
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { basicHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from "/@/hooks/web/useMessage";
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/base/point/list',
|
list = '/point/list',
|
||||||
queryById='/base/point/queryById',
|
queryById='/point/queryById',
|
||||||
save='/base/point/add',
|
save='/point/add',
|
||||||
edit='/base/point/edit',
|
edit='/point/edit',
|
||||||
deleteOne = '/base/point/delete',
|
deleteOne = '/point/delete',
|
||||||
deleteBatch = '/base/point/deleteBatch',
|
deleteBatch = '/point/deleteBatch',
|
||||||
importExcel = '/base/point/importExcel',
|
importExcel = '/point/importExcel',
|
||||||
exportXls = '/base/point/exportXls',
|
exportXls = '/point/exportXls',
|
||||||
queryOutWorkStation='/base/point/queryOutWorkStation',
|
queryOutWorkStation='/point/queryOutWorkStation',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出api
|
* 导出 api
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getExportUrl = Api.exportXls;
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入api
|
* 导入 api
|
||||||
*/
|
*/
|
||||||
export const getImportUrl = Api.importExcel;
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
|
@ -30,14 +30,14 @@ export const getImportUrl = Api.importExcel;
|
||||||
* 列表接口
|
* 列表接口
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => basicHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id查询
|
* id 查询
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
|
export const queryById = (params) => basicHttp.get({ url: Api.queryById, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除单个
|
* 删除单个
|
||||||
|
|
@ -45,7 +45,7 @@ export const queryById = (params) => defHttp.get({ url: Api.queryById, params })
|
||||||
* @param handleSuccess
|
* @param handleSuccess
|
||||||
*/
|
*/
|
||||||
export const deleteOne = (params,handleSuccess) => {
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
return basicHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +63,7 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
return basicHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -77,11 +77,11 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
*/
|
*/
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
const url = isUpdate ? Api.edit : Api.save;
|
const url = isUpdate ? Api.edit : Api.save;
|
||||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
return basicHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const queryOutWorkStation = (params) => defHttp.get(
|
export const queryOutWorkStation = (params) => basicHttp.get(
|
||||||
{ url: Api.queryOutWorkStation, params },
|
{ url: Api.queryOutWorkStation, params },
|
||||||
{isTransformResponse: false,}
|
{isTransformResponse: false,}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { basicHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from "/@/hooks/web/useMessage";
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/base/stock/list',
|
list = '/stock/list',
|
||||||
queryById='/base/stock/queryById',
|
queryById='/stock/queryById',
|
||||||
save='/base/stock/add',
|
save='/stock/add',
|
||||||
edit='/base/stock/edit',
|
edit='/stock/edit',
|
||||||
deleteOne = '/base/stock/delete',
|
deleteOne = '/stock/delete',
|
||||||
deleteBatch = '/base/stock/deleteBatch',
|
deleteBatch = '/stock/deleteBatch',
|
||||||
importExcel = '/base/stock/importExcel',
|
importExcel = '/stock/importExcel',
|
||||||
exportXls = '/base/stock/exportXls',
|
exportXls = '/stock/exportXls',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出api
|
* 导出 api
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getExportUrl = Api.exportXls;
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入api
|
* 导入 api
|
||||||
*/
|
*/
|
||||||
export const getImportUrl = Api.importExcel;
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
|
@ -29,13 +29,13 @@ export const getImportUrl = Api.importExcel;
|
||||||
* 列表接口
|
* 列表接口
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => basicHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id查询
|
* id 查询
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
|
export const queryById = (params) => basicHttp.get({ url: Api.queryById, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除单个
|
* 删除单个
|
||||||
|
|
@ -43,7 +43,7 @@ export const queryById = (params) => defHttp.get({ url: Api.queryById, params })
|
||||||
* @param handleSuccess
|
* @param handleSuccess
|
||||||
*/
|
*/
|
||||||
export const deleteOne = (params,handleSuccess) => {
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
return basicHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -61,7 +61,7 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
return basicHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -75,5 +75,5 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
*/
|
*/
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
let url = isUpdate ? Api.edit : Api.save;
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
return basicHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,10 +166,12 @@ export interface GlobConfig {
|
||||||
// 当前是否运行在 electron 平台
|
// 当前是否运行在 electron 平台
|
||||||
isElectronPlatform: boolean;
|
isElectronPlatform: boolean;
|
||||||
|
|
||||||
// 【CPTE作为乾坤子应用】是否以乾坤子应用模式启动
|
// 【CPTE 作为乾坤子应用】是否以乾坤子应用模式启动
|
||||||
isQiankunMicro: boolean;
|
isQiankunMicro: boolean;
|
||||||
// 【CPTE作为乾坤子应用】乾坤子应用入口
|
// 【CPTE 作为乾坤子应用】乾坤子应用入口
|
||||||
qiankunMicroAppEntry?: string;
|
qiankunMicroAppEntry?: string;
|
||||||
|
// 基础服务微服务地址
|
||||||
|
basicServiceUrl?: string;
|
||||||
}
|
}
|
||||||
export interface GlobEnvConfig {
|
export interface GlobEnvConfig {
|
||||||
// Site title
|
// Site title
|
||||||
|
|
@ -203,4 +205,6 @@ export interface GlobEnvConfig {
|
||||||
VITE_GLOB_ONLINE_DOCUMENT_VERSION?: string;
|
VITE_GLOB_ONLINE_DOCUMENT_VERSION?: string;
|
||||||
// 当前运行在什么平台
|
// 当前运行在什么平台
|
||||||
VITE_GLOB_RUN_PLATFORM?: 'web' | 'electron';
|
VITE_GLOB_RUN_PLATFORM?: 'web' | 'electron';
|
||||||
|
// 基础服务微服务地址
|
||||||
|
VITE_GLOB_BASIC_SERVICE_URL?: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue