12 Commits

Author SHA1 Message Date
YunaiV
06fcac16fa 【版本发布】2.3.0 发布~ 2024-10-07 15:33:04 +08:00
YunaiV
43b933341b 【功能修复】用户管理的部门名字回显不对问题 2024-09-29 08:03:49 +08:00
YunaiV
89c0a036b4 【功能修复】代码生成配置提交时,editValueRefs、submitCbs、cancelCbs、validCbs 导致异常的问题 2024-09-29 07:59:26 +08:00
YunaiV
fb33d662f6 Merge remote-tracking branch 'origin/master' 2024-09-25 19:13:57 +08:00
YunaiV
60183b6110 【代码优化】去除 VITE_GLOB_UPLOAD_URL、VITE_PROXY 的 upload 配置,使用 VITE_GLOB_API_URL + '/infra/file/upload' 替代 2024-09-25 19:13:51 +08:00
xingyu
b716516b85 !47 修复下载Excel文件时的异常处理问题
Merge pull request !47 from kuxiao/master
2024-09-13 09:21:46 +00:00
DESKTOP-ELFHO53\zqx
ee0d67182c fix: 修复下载Excel文件时的异常处理问题
在后端抛出异常的情况下,现在前端将停止下载文件并显示错误提示。之前,即使后端发生异常,前端也会继续下载文件而不向用户提示任何错误。
2024-09-13 17:10:00 +08:00
YunaiV
ac237eebd0 Merge remote-tracking branch 'origin/master' 2024-09-12 19:28:50 +08:00
YunaiV
4044a080fc 【功能修复】download 无法导出 excel 的问题 2024-09-12 19:28:40 +08:00
xingyu
26df81a16f update README.md.
Signed-off-by: xingyu <xingyu4j@vip.qq.com>
2024-08-15 08:34:21 +00:00
xingyu
f496637790 update README.md.
Signed-off-by: xingyu <xingyu4j@vip.qq.com>
2024-08-15 08:33:33 +00:00
YunaiV
762faab90c V2.2.0 版本发布 2024-08-02 23:05:04 +08:00
12 changed files with 31 additions and 42 deletions

View File

@@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
# 本地开发代理,可以解决跨域及多地址代理
# 如果接口地址匹配到则会转发到http://localhost:3000防止本地出现跨域问题
# 可以有多个,注意多个不能换行,否则代理将会失效
VITE_PROXY = [["/dev-api","http://localhost:48080/admin-api"],["/upload","http://localhost:48080/admin-api/infra/file/upload"]]
VITE_PROXY = [["/dev-api","http://localhost:48080/admin-api"]]
# VITE_PROXY=[["/api","http://vben.xingyuv.com/test"]]
# 是否删除Console.log
@@ -18,9 +18,6 @@ VITE_GLOB_BASE_URL = "http://localhost:48080"
# 接口地址,如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL = /dev-api
# 文件上传接口 可选
VITE_GLOB_UPLOAD_URL = /upload
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =

View File

@@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
# 本地开发代理,可以解决跨域及多地址代理
# 如果接口地址匹配到则会转发到http://localhost:3000防止本地出现跨域问题
# 可以有多个,注意多个不能换行,否则代理将会失效
VITE_PROXY = [["/dev-api","http://api-dashboard.yudao.iocoder.cn/admin-api"],["/upload","http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload"]]
VITE_PROXY = [["/dev-api","http://api-dashboard.yudao.iocoder.cn/admin-api"]]
# VITE_PROXY=[["/api","http://vben.xingyuv.com/test"]]
# 是否删除Console.log
@@ -18,9 +18,6 @@ VITE_GLOB_BASE_URL = "http://api-dashboard.yudao.iocoder.cn"
# 接口地址,如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL = /dev-api
# 文件上传接口 可选
VITE_GLOB_UPLOAD_URL = /upload
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =

View File

@@ -17,9 +17,6 @@ VITE_GLOB_BASE_URL = "http://localhost:48080"
# 接口地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_API_URL = http://localhost:48080/admin-api
# 文件上传地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_UPLOAD_URL = /upload
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =

View File

@@ -17,9 +17,6 @@ VITE_GLOB_BASE_URL = "http://127.0.0.1:48080"
# 接口地址,如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL = http://127.0.0.1:48080/admin-api
# 文件上传地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_UPLOAD_URL = /upload
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =

View File

@@ -17,9 +17,6 @@ VITE_GLOB_BASE_URL = "http://localhost:48080"
# 接口地址,如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL = http://localhost:48080/admin-api
# 文件上传地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_UPLOAD_URL = /upload
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =

View File

@@ -1,4 +1,4 @@
**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!**
**新版本更新中master仓库不再维护请关注v5-dev分支进度**
**「我喜欢写代码,乐此不疲」**
**「我喜欢做开源,以此为乐」**
@@ -15,9 +15,8 @@
- 视频教程:<https://doc.iocoder.cn/video/>
- 交流群:<https://doc.iocoder.cn/qun/>
## 外包项目请联系
## 外包项目请联系【非项目需求请勿扫码,非客服,不解答项目问题】
微信号xinyu370
![alt 定制开发](./public/resource/img/wx2.png)

View File

@@ -1,6 +1,6 @@
{
"name": "yudao-ui-admin-vben",
"version": "2.1.0-snapshot",
"version": "2.3.0-snapshot",
"author": {
"name": "xingyuv",
"email": "xingyu4j@vip.qq.com",

View File

@@ -9,7 +9,6 @@ export function useGlobSetting(): Readonly<GlobConfig> {
VITE_GLOB_API_URL,
VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX,
VITE_GLOB_UPLOAD_URL,
VITE_GLOB_APP_TENANT_ENABLE,
VITE_GLOB_APP_CAPTCHA_ENABLE,
} = getAppEnvConfig()
@@ -26,7 +25,7 @@ export function useGlobSetting(): Readonly<GlobConfig> {
apiUrl: VITE_GLOB_API_URL,
shortName: VITE_GLOB_APP_SHORT_NAME,
urlPrefix: VITE_GLOB_API_URL_PREFIX,
uploadUrl: VITE_GLOB_UPLOAD_URL,
uploadUrl: VITE_GLOB_API_URL + '/infra/file/upload',
tenantEnable: VITE_GLOB_APP_TENANT_ENABLE,
captchaEnable: VITE_GLOB_APP_CAPTCHA_ENABLE,
}

View File

@@ -176,8 +176,6 @@ export interface GlobEnvConfig {
VITE_GLOB_API_URL_PREFIX?: string
// Project abbreviation
VITE_GLOB_APP_SHORT_NAME: string
// Upload url
VITE_GLOB_UPLOAD_URL?: string
// 租户开关
VITE_GLOB_APP_TENANT_ENABLE: string
// 验证码开关

View File

@@ -15,7 +15,7 @@ import type { RequestOptions, Result, UploadFileParams } from '@/types/axios'
import { ContentTypeEnum, RequestEnum } from '@/enums/httpEnum'
import { downloadByData } from '@/utils/file/download'
import { useGlobSetting } from '@/hooks/setting'
import {getAccessToken, getRefreshToken, getTenantId, setAccessToken} from '@/utils/auth'
import { getAccessToken, getRefreshToken, getTenantId, setAccessToken } from '@/utils/auth'
export * from './axiosTransform'
@@ -126,13 +126,12 @@ export class VAxios {
const config = res.config
// 二进制数据则直接返回,例如说 Excel 导出
if (
res.request.responseType === 'blob' ||
res.request.responseType === 'arraybuffer'
res.request.responseType === 'blob'
|| res.request.responseType === 'arraybuffer'
) {
// 注意:如果导出的响应为 json说明可能失败了不直接返回进行下载
if (res.data.type === 'application/json') {
if (res.data.type === 'application/json')
res.data = await new Response(res.data).json()
}
}
// 处理 accessToken 过期的情况
if (res.data.code === 401) {
@@ -289,7 +288,6 @@ export class VAxios {
this.axiosInstance
.request<any, AxiosResponse<Result>>(conf)
.then((res: AxiosResponse<Result>) => {
debugger
if (transformResponseHook && isFunction(transformResponseHook)) {
try {
const ret = transformResponseHook(res, opt)
@@ -298,12 +296,19 @@ export class VAxios {
catch (err) {
reject(err || new Error('request error!'))
}
return
// 注释 return解决无法导出的问题。参见 https://t.zsxq.com/79cmo 说明。
}
resolve(res as unknown as Promise<T>)
else {
resolve(res as unknown as Promise<T>)
}
// download file
if (typeof res != 'undefined')
downloadByData(res?.data as unknown as BlobPart, title || 'export')
if (res && typeof res !== 'undefined' && res.headers) {
const contentType = res.headers['content-type']
// ExcelUtils.java的write函数setContentType顺序问题导致没有contentType
if (!contentType || !contentType.startsWith('application/json'))
downloadByData(res?.data as unknown as BlobPart, title || 'export')
}
})
.catch((e: Error | AxiosError) => {
if (requestCatchHook && isFunction(requestCatchHook)) {
@@ -344,7 +349,6 @@ export class VAxios {
this.axiosInstance
.request<any, AxiosResponse<Result>>(conf)
.then((res: AxiosResponse<Result>) => {
debugger
if (transformResponseHook && isFunction(transformResponseHook)) {
try {
const ret = transformResponseHook(res, opt)

View File

@@ -7,6 +7,7 @@ import CloumInfoForm from './components/CloumInfoForm.vue'
import FinishForm from './components/FinishForm.vue'
import { PageWrapper } from '@/components/Page'
import { getCodegenTable, updateCodegenTable } from '@/api/infra/codegen'
import { cloneDeep } from 'lodash-es'
const Step = Steps.Step
@@ -47,9 +48,15 @@ async function handleStep2Next(step2Values: any) {
async function handleSubmit() {
basicInfoValue.value.id = query.id as unknown as number
const genTable = {
table: basicInfoValue.value,
columns: columnsInfoValue.value,
table: cloneDeep(basicInfoValue.value),
columns: cloneDeep(columnsInfoValue.value),
}
genTable.columns.forEach((column: any) => {
delete column.editValueRefs
delete column.submitCbs
delete column.cancelCbs
delete column.validCbs
})
await updateCodegenTable(genTable)
}

View File

@@ -29,11 +29,8 @@ export const columns: BasicColumn[] = [
},
{
title: '部门',
dataIndex: 'deptId',
dataIndex: 'deptName',
width: 120,
customRender: ({ record }) => {
return useRender.renderTag(record.dept && record.dept.name)
},
},
{
title: '手机号码',