Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4404554c
authored
Apr 05, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 统一化代码
2. 增加 DocAlert 关联文档
parent
bb88e3d7
Hide whitespace changes
Inline
Side-by-side
Showing
111 changed files
with
640 additions
and
567 deletions
+640
-567
.env
+2
-0
src/api/bpm/leave/index.ts
+3
-3
src/api/bpm/processInstance/index.ts
+4
-4
src/api/infra/config/index.ts
+1
-1
src/api/infra/dbDoc/index.ts
+3
-3
src/api/infra/job/index.ts
+1
-1
src/api/infra/redis/index.ts
+9
-6
src/api/login/index.ts
+11
-11
src/api/pay/app/index.ts
+8
-8
src/api/pay/channel/index.ts
+6
-28
src/api/pay/order/index.ts
+6
-6
src/api/pay/refund/index.ts
+6
-6
src/api/system/dept/index.ts
+5
-10
src/api/system/errorCode/index.ts
+6
-14
src/api/system/menu/index.ts
+1
-1
src/api/system/notify/message/index.ts
+2
-2
src/api/system/user/profile.ts
+4
-4
src/components/DictTag/src/DictTag.vue
+1
-0
src/components/DocAlert/index.vue
+32
-0
src/components/Verifition/src/Verify/VerifyPoints.vue
+3
-3
src/components/Verifition/src/Verify/VerifySlide.vue
+4
-4
src/layout/components/Message/src/Message.vue
+2
-2
src/locales/zh-CN.ts
+1
-2
src/router/modules/remaining.ts
+2
-2
src/store/modules/permission.ts
+2
-2
src/store/modules/user.ts
+3
-3
src/types/auto-components.d.ts
+2
-0
src/views/Login/components/LoginForm.vue
+4
-4
src/views/Login/components/MobileForm.vue
+4
-4
src/views/Profile/components/BasicInfo.vue
+4
-4
src/views/Profile/components/ProfileUser.vue
+2
-2
src/views/Profile/components/ResetPwd.vue
+2
-2
src/views/Profile/components/UserAvatar.vue
+2
-2
src/views/Profile/components/UserSocial.vue
+2
-2
src/views/bpm/form/index.vue
+4
-4
src/views/bpm/oa/leave/create.vue
+1
-1
src/views/bpm/oa/leave/detail.vue
+1
-1
src/views/bpm/oa/leave/index.vue
+2
-2
src/views/bpm/processInstance/create/index.vue
+1
-1
src/views/bpm/processInstance/detail/index.vue
+1
-1
src/views/bpm/processInstance/index.vue
+2
-2
src/views/infra/apiAccessLog/index.vue
+12
-16
src/views/infra/apiErrorLog/index.vue
+2
-0
src/views/infra/codegen/EditTable.vue
+2
-2
src/views/infra/codegen/index.vue
+7
-4
src/views/infra/config/ConfigForm.vue
+2
-2
src/views/infra/config/index.vue
+18
-16
src/views/infra/dataSourceConfig/DataSourceConfigForm.vue
+2
-2
src/views/infra/dataSourceConfig/index.vue
+12
-12
src/views/infra/dbDoc/index.vue
+6
-4
src/views/infra/druid/index.vue
+3
-0
src/views/infra/file/FileForm.vue
+3
-6
src/views/infra/file/index.vue
+13
-11
src/views/infra/fileConfig/FileConfigForm.vue
+2
-3
src/views/infra/fileConfig/index.vue
+18
-16
src/views/infra/job/index.vue
+10
-6
src/views/infra/job/logger/index.vue
+8
-4
src/views/infra/redis/index.vue
+10
-7
src/views/infra/server/index.vue
+1
-0
src/views/infra/skywalking/index.vue
+1
-0
src/views/infra/swagger/index.vue
+2
-0
src/views/mall/product/property/PropertyForm.vue
+2
-4
src/views/mp/account/index.vue
+8
-8
src/views/mp/freePublish/index.vue
+6
-4
src/views/mp/statistics/index.vue
+4
-4
src/views/mp/tag/index.vue
+2
-0
src/views/pay/app/index.vue
+7
-7
src/views/pay/merchant/index.vue
+4
-4
src/views/pay/order/index.vue
+3
-3
src/views/pay/refund/index.vue
+3
-3
src/views/system/area/AreaForm.vue
+2
-2
src/views/system/area/index.vue
+12
-10
src/views/system/dept/DeptForm.vue
+8
-12
src/views/system/dept/index.vue
+9
-4
src/views/system/dict/DictTypeForm.vue
+8
-9
src/views/system/dict/data/DictDataForm.vue
+8
-7
src/views/system/dict/data/index.vue
+31
-26
src/views/system/dict/index.vue
+21
-16
src/views/system/errorCode/ErrorCodeForm.vue
+5
-5
src/views/system/errorCode/index.vue
+25
-29
src/views/system/loginlog/index.vue
+6
-4
src/views/system/mail/account/MailAccountForm.vue
+2
-3
src/views/system/mail/account/account.data.ts
+0
-1
src/views/system/mail/account/index.vue
+13
-11
src/views/system/mail/log/MailLogDetail.vue
+2
-2
src/views/system/mail/log/index.vue
+12
-10
src/views/system/mail/log/log.data.ts
+2
-2
src/views/system/mail/template/MailTemplateForm.vue
+2
-3
src/views/system/mail/template/MailTemplateSendForm.vue
+2
-3
src/views/system/mail/template/index.vue
+19
-17
src/views/system/mail/template/template.data.ts
+4
-4
src/views/system/menu/MenuForm.vue
+1
-1
src/views/system/menu/index.vue
+3
-0
src/views/system/notice/NoticeForm.vue
+8
-7
src/views/system/notice/index.vue
+15
-16
src/views/system/notify/message/index.vue
+6
-4
src/views/system/notify/my/index.vue
+7
-5
src/views/system/oauth2/client/index.vue
+7
-4
src/views/system/oauth2/token/index.vue
+6
-4
src/views/system/operatelog/OperateLogDetail.vue
+2
-2
src/views/system/operatelog/index.vue
+16
-14
src/views/system/post/PostForm.vue
+6
-6
src/views/system/post/index.vue
+5
-5
src/views/system/role/index.vue
+3
-0
src/views/system/sms/channel/index.vue
+3
-1
src/views/system/sms/log/index.vue
+2
-0
src/views/system/sms/template/index.vue
+3
-1
src/views/system/tenant/TenantForm.vue
+0
-0
src/views/system/tenant/index.vue
+6
-4
src/views/system/tenantPackage/index.vue
+3
-1
src/views/system/user/index.vue
+10
-6
No files found.
.env
View file @
4404554c
...
...
@@ -13,3 +13,5 @@ VITE_APP_TENANT_ENABLE=true
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=true
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=true
src/api/bpm/leave/index.ts
View file @
4404554c
...
...
@@ -12,16 +12,16 @@ export type LeaveVO = {
}
// 创建请假申请
export
const
createLeave
Api
=
async
(
data
:
LeaveVO
)
=>
{
export
const
createLeave
=
async
(
data
:
LeaveVO
)
=>
{
return
await
request
.
post
({
url
:
'/bpm/oa/leave/create'
,
data
:
data
})
}
// 获得请假申请
export
const
getLeave
Api
=
async
(
id
:
number
)
=>
{
export
const
getLeave
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/oa/leave/get?id='
+
id
})
}
// 获得请假申请分页
export
const
getLeavePage
Api
=
async
(
params
)
=>
{
export
const
getLeavePage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/oa/leave/page'
,
params
})
}
src/api/bpm/processInstance/index.ts
View file @
4404554c
...
...
@@ -20,15 +20,15 @@ export type ProcessInstanceVO = {
endTime
:
string
}
export
const
getMyProcessInstancePage
Api
=
async
(
params
)
=>
{
export
const
getMyProcessInstancePage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/process-instance/my-page'
,
params
})
}
export
const
createProcessInstance
Api
=
async
(
data
)
=>
{
export
const
createProcessInstance
=
async
(
data
)
=>
{
return
await
request
.
post
({
url
:
'/bpm/process-instance/create'
,
data
:
data
})
}
export
const
cancelProcessInstance
Api
=
async
(
id
:
number
,
reason
:
string
)
=>
{
export
const
cancelProcessInstance
=
async
(
id
:
number
,
reason
:
string
)
=>
{
const
data
=
{
id
:
id
,
reason
:
reason
...
...
@@ -36,6 +36,6 @@ export const cancelProcessInstanceApi = async (id: number, reason: string) => {
return
await
request
.
delete
({
url
:
'/bpm/process-instance/cancel'
,
data
:
data
})
}
export
const
getProcessInstance
Api
=
async
(
id
:
number
)
=>
{
export
const
getProcessInstance
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/process-instance/get?id='
+
id
})
}
src/api/infra/config/index.ts
View file @
4404554c
...
...
@@ -43,6 +43,6 @@ export const deleteConfig = (id: number) => {
}
// 导出参数
export
const
exportConfig
Api
=
(
params
)
=>
{
export
const
exportConfig
=
(
params
)
=>
{
return
request
.
download
({
url
:
'/infra/config/export'
,
params
})
}
src/api/infra/dbDoc/index.ts
View file @
4404554c
import
request
from
'@/config/axios'
// 导出Html
export
const
exportHtml
Api
=
()
=>
{
export
const
exportHtml
=
()
=>
{
return
request
.
download
({
url
:
'/infra/db-doc/export-html'
})
}
// 导出Word
export
const
exportWord
Api
=
()
=>
{
export
const
exportWord
=
()
=>
{
return
request
.
download
({
url
:
'/infra/db-doc/export-word'
})
}
// 导出Markdown
export
const
exportMarkdown
Api
=
()
=>
{
export
const
exportMarkdown
=
()
=>
{
return
request
.
download
({
url
:
'/infra/db-doc/export-markdown'
})
}
src/api/infra/job/index.ts
View file @
4404554c
...
...
@@ -53,7 +53,7 @@ export const updateJobStatus = (id: number, status: number) => {
}
// 定时任务立即执行一次
export
const
runJob
Api
=
(
id
:
number
)
=>
{
export
const
runJob
=
(
id
:
number
)
=>
{
return
request
.
put
({
url
:
'/infra/job/trigger?id='
+
id
})
}
...
...
src/api/infra/redis/index.ts
View file @
4404554c
...
...
@@ -3,17 +3,19 @@ import request from '@/config/axios'
/**
* 获取redis 监控信息
*/
export
const
getCache
Api
=
()
=>
{
export
const
getCache
=
()
=>
{
return
request
.
get
({
url
:
'/infra/redis/get-monitor-info'
})
}
// 获取模块
export
const
getKeyDefineList
Api
=
()
=>
{
export
const
getKeyDefineList
=
()
=>
{
return
request
.
get
({
url
:
'/infra/redis/get-key-define-list'
})
}
/**
* 获取redis key列表
*/
export
const
getKeyList
Api
=
(
keyTemplate
:
string
)
=>
{
export
const
getKeyList
=
(
keyTemplate
:
string
)
=>
{
return
request
.
get
({
url
:
'/infra/redis/get-key-list'
,
params
:
{
...
...
@@ -21,17 +23,18 @@ export const getKeyListApi = (keyTemplate: string) => {
}
})
}
// 获取缓存内容
export
const
getKeyValue
Api
=
(
key
:
string
)
=>
{
export
const
getKeyValue
=
(
key
:
string
)
=>
{
return
request
.
get
({
url
:
'/infra/redis/get-key-value?key='
+
key
})
}
// 根据键名删除缓存
export
const
deleteKey
Api
=
(
key
:
string
)
=>
{
export
const
deleteKey
=
(
key
:
string
)
=>
{
return
request
.
delete
({
url
:
'/infra/redis/delete-key?key='
+
key
})
}
export
const
deleteKeys
Api
=
(
keyTemplate
:
string
)
=>
{
export
const
deleteKeys
=
(
keyTemplate
:
string
)
=>
{
return
request
.
delete
({
url
:
'/infra/redis/delete-keys?'
,
params
:
{
...
...
src/api/login/index.ts
View file @
4404554c
...
...
@@ -17,7 +17,7 @@ export interface SmsLoginVO {
}
// 登录
export
const
login
Api
=
(
data
:
UserLoginVO
)
=>
{
export
const
login
=
(
data
:
UserLoginVO
)
=>
{
return
request
.
post
({
url
:
'/system/auth/login'
,
data
})
}
...
...
@@ -27,47 +27,47 @@ export const refreshToken = () => {
}
// 使用租户名,获得租户编号
export
const
getTenantIdByName
Api
=
(
name
:
string
)
=>
{
export
const
getTenantIdByName
=
(
name
:
string
)
=>
{
return
request
.
get
({
url
:
'/system/tenant/get-id-by-name?name='
+
name
})
}
// 登出
export
const
loginOut
Api
=
()
=>
{
export
const
loginOut
=
()
=>
{
return
request
.
post
({
url
:
'/system/auth/logout'
})
}
// 获取用户权限信息
export
const
getInfo
Api
=
()
=>
{
export
const
getInfo
=
()
=>
{
return
request
.
get
({
url
:
'/system/auth/get-permission-info'
})
}
// 路由
export
const
getAsyncRoutes
Api
=
()
=>
{
export
const
getAsyncRoutes
=
()
=>
{
return
request
.
get
({
url
:
'/system/auth/list-menus'
})
}
//获取登录验证码
export
const
sendSmsCode
Api
=
(
data
:
SmsCodeVO
)
=>
{
export
const
sendSmsCode
=
(
data
:
SmsCodeVO
)
=>
{
return
request
.
post
({
url
:
'/system/auth/send-sms-code'
,
data
})
}
// 短信验证码登录
export
const
smsLogin
Api
=
(
data
:
SmsLoginVO
)
=>
{
export
const
smsLogin
=
(
data
:
SmsLoginVO
)
=>
{
return
request
.
post
({
url
:
'/system/auth/sms-login'
,
data
})
}
// 社交授权的跳转
export
const
socialAuthRedirect
Api
=
(
type
:
number
,
redirectUri
:
string
)
=>
{
export
const
socialAuthRedirect
=
(
type
:
number
,
redirectUri
:
string
)
=>
{
return
request
.
get
({
url
:
'/system/auth/social-auth-redirect?type='
+
type
+
'&redirectUri='
+
redirectUri
})
}
// 获取验证图片
以及
token
export
const
getCode
Api
=
(
data
)
=>
{
// 获取验证图片
以及
token
export
const
getCode
=
(
data
)
=>
{
return
request
.
postOriginal
({
url
:
'system/captcha/get'
,
data
})
}
// 滑动或者点选验证
export
const
reqCheck
Api
=
(
data
)
=>
{
export
const
reqCheck
=
(
data
)
=>
{
return
request
.
postOriginal
({
url
:
'system/captcha/check'
,
data
})
}
src/api/pay/app/index.ts
View file @
4404554c
...
...
@@ -38,41 +38,41 @@ export interface AppUpdateStatusReqVO {
}
// 查询列表支付应用
export
const
getAppPage
Api
=
(
params
:
AppPageReqVO
)
=>
{
export
const
getAppPage
=
(
params
:
AppPageReqVO
)
=>
{
return
request
.
get
({
url
:
'/pay/app/page'
,
params
})
}
// 查询详情支付应用
export
const
getApp
Api
=
(
id
:
number
)
=>
{
export
const
getApp
=
(
id
:
number
)
=>
{
return
request
.
get
({
url
:
'/pay/app/get?id='
+
id
})
}
// 新增支付应用
export
const
createApp
Api
=
(
data
:
AppVO
)
=>
{
export
const
createApp
=
(
data
:
AppVO
)
=>
{
return
request
.
post
({
url
:
'/pay/app/create'
,
data
})
}
// 修改支付应用
export
const
updateApp
Api
=
(
data
:
AppVO
)
=>
{
export
const
updateApp
=
(
data
:
AppVO
)
=>
{
return
request
.
put
({
url
:
'/pay/app/update'
,
data
})
}
// 支付应用信息状态修改
export
const
changeAppStatus
Api
=
(
data
:
AppUpdateStatusReqVO
)
=>
{
export
const
changeAppStatus
=
(
data
:
AppUpdateStatusReqVO
)
=>
{
return
request
.
put
({
url
:
'/pay/app/update-status'
,
data
:
data
})
}
// 删除支付应用
export
const
deleteApp
Api
=
(
id
:
number
)
=>
{
export
const
deleteApp
=
(
id
:
number
)
=>
{
return
request
.
delete
({
url
:
'/pay/app/delete?id='
+
id
})
}
// 导出支付应用
export
const
exportApp
Api
=
(
params
:
AppExportReqVO
)
=>
{
export
const
exportApp
=
(
params
:
AppExportReqVO
)
=>
{
return
request
.
download
({
url
:
'/pay/app/export-excel'
,
params
})
}
// 根据商ID称搜索应用列表
export
const
getAppListByMerchantId
Api
=
(
merchantId
:
number
)
=>
{
export
const
getAppListByMerchantId
=
(
merchantId
:
number
)
=>
{
return
request
.
get
({
url
:
'/pay/app/list-merchant-id'
,
params
:
{
merchantId
:
merchantId
}
})
}
src/api/pay/channel/index.ts
View file @
4404554c
...
...
@@ -12,35 +12,13 @@ export interface ChannelVO {
createTime
:
Date
}
export
interface
ChannelPageReqVO
extends
PageParam
{
code
?:
string
status
?:
number
remark
?:
string
feeRate
?:
number
merchantId
?:
number
appId
?:
number
config
?:
string
createTime
?:
Date
[]
}
export
interface
ChannelExportReqVO
{
code
?:
string
status
?:
number
remark
?:
string
feeRate
?:
number
merchantId
?:
number
appId
?:
number
config
?:
string
createTime
?:
Date
[]
}
// 查询列表支付渠道
export
const
getChannelPage
Api
=
(
params
:
ChannelPageReqVO
)
=>
{
export
const
getChannelPage
=
(
params
:
PageParam
)
=>
{
return
request
.
get
({
url
:
'/pay/channel/page'
,
params
})
}
// 查询详情支付渠道
export
const
getChannel
Api
=
(
merchantId
:
number
,
appId
:
string
,
code
:
string
)
=>
{
export
const
getChannel
=
(
merchantId
:
number
,
appId
:
string
,
code
:
string
)
=>
{
const
params
=
{
merchantId
:
merchantId
,
appId
:
appId
,
...
...
@@ -50,21 +28,21 @@ export const getChannelApi = (merchantId: number, appId: string, code: string) =
}
// 新增支付渠道
export
const
createChannel
Api
=
(
data
:
ChannelVO
)
=>
{
export
const
createChannel
=
(
data
:
ChannelVO
)
=>
{
return
request
.
post
({
url
:
'/pay/channel/create'
,
data
})
}
// 修改支付渠道
export
const
updateChannel
Api
=
(
data
:
ChannelVO
)
=>
{
export
const
updateChannel
=
(
data
:
ChannelVO
)
=>
{
return
request
.
put
({
url
:
'/pay/channel/update'
,
data
})
}
// 删除支付渠道
export
const
deleteChannel
Api
=
(
id
:
number
)
=>
{
export
const
deleteChannel
=
(
id
:
number
)
=>
{
return
request
.
delete
({
url
:
'/pay/channel/delete?id='
+
id
})
}
// 导出支付渠道
export
const
exportChannel
Api
=
(
params
:
ChannelExportReqVO
)
=>
{
export
const
exportChannel
=
(
params
)
=>
{
return
request
.
download
({
url
:
'/pay/channel/export-excel'
,
params
})
}
src/api/pay/order/index.ts
View file @
4404554c
...
...
@@ -79,31 +79,31 @@ export interface OrderExportReqVO {
}
// 查询列表支付订单
export
const
getOrderPage
Api
=
async
(
params
:
OrderPageReqVO
)
=>
{
export
const
getOrderPage
=
async
(
params
:
OrderPageReqVO
)
=>
{
return
await
request
.
get
({
url
:
'/pay/order/page'
,
params
})
}
// 查询详情支付订单
export
const
getOrder
Api
=
async
(
id
:
number
)
=>
{
export
const
getOrder
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/pay/order/get?id='
+
id
})
}
// 新增支付订单
export
const
createOrder
Api
=
async
(
data
:
OrderVO
)
=>
{
export
const
createOrder
=
async
(
data
:
OrderVO
)
=>
{
return
await
request
.
post
({
url
:
'/pay/order/create'
,
data
})
}
// 修改支付订单
export
const
updateOrder
Api
=
async
(
data
:
OrderVO
)
=>
{
export
const
updateOrder
=
async
(
data
:
OrderVO
)
=>
{
return
await
request
.
put
({
url
:
'/pay/order/update'
,
data
})
}
// 删除支付订单
export
const
deleteOrder
Api
=
async
(
id
:
number
)
=>
{
export
const
deleteOrder
=
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
'/pay/order/delete?id='
+
id
})
}
// 导出支付订单
export
const
exportOrder
Api
=
async
(
params
:
OrderExportReqVO
)
=>
{
export
const
exportOrder
=
async
(
params
:
OrderExportReqVO
)
=>
{
return
await
request
.
download
({
url
:
'/pay/order/export-excel'
,
params
})
}
src/api/pay/refund/index.ts
View file @
4404554c
...
...
@@ -86,31 +86,31 @@ export interface PayRefundExportReqVO {
}
// 查询列表退款订单
export
const
getRefundPage
Api
=
(
params
:
RefundPageReqVO
)
=>
{
export
const
getRefundPage
=
(
params
:
RefundPageReqVO
)
=>
{
return
request
.
get
({
url
:
'/pay/refund/page'
,
params
})
}
// 查询详情退款订单
export
const
getRefund
Api
=
(
id
:
number
)
=>
{
export
const
getRefund
=
(
id
:
number
)
=>
{
return
request
.
get
({
url
:
'/pay/refund/get?id='
+
id
})
}
// 新增退款订单
export
const
createRefund
Api
=
(
data
:
RefundVO
)
=>
{
export
const
createRefund
=
(
data
:
RefundVO
)
=>
{
return
request
.
post
({
url
:
'/pay/refund/create'
,
data
})
}
// 修改退款订单
export
const
updateRefund
Api
=
(
data
:
RefundVO
)
=>
{
export
const
updateRefund
=
(
data
:
RefundVO
)
=>
{
return
request
.
put
({
url
:
'/pay/refund/update'
,
data
})
}
// 删除退款订单
export
const
deleteRefund
Api
=
(
id
:
number
)
=>
{
export
const
deleteRefund
=
(
id
:
number
)
=>
{
return
request
.
delete
({
url
:
'/pay/refund/delete?id='
+
id
})
}
// 导出退款订单
export
const
exportRefund
Api
=
(
params
:
PayRefundExportReqVO
)
=>
{
export
const
exportRefund
=
(
params
:
PayRefundExportReqVO
)
=>
{
return
request
.
download
({
url
:
'/pay/refund/export-excel'
,
params
})
}
src/api/system/dept/index.ts
View file @
4404554c
...
...
@@ -12,37 +12,32 @@ export interface DeptVO {
createTime
:
Date
}
export
interface
DeptPageReqVO
{
name
?:
string
status
?:
number
}
// 查询部门(精简)列表
export
const
getSimpleDeptList
=
async
():
Promise
<
DeptVO
[]
>
=>
{
return
await
request
.
get
({
url
:
'/system/dept/list-all-simple'
})
}
// 查询部门列表
export
const
getDeptPage
Api
=
async
(
params
:
DeptPageReqVO
)
=>
{
export
const
getDeptPage
=
async
(
params
:
PageParam
)
=>
{
return
await
request
.
get
({
url
:
'/system/dept/list'
,
params
})
}
// 查询部门详情
export
const
getDept
Api
=
async
(
id
:
number
)
=>
{
export
const
getDept
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/system/dept/get?id='
+
id
})
}
// 新增部门
export
const
createDept
Api
=
async
(
data
:
DeptVO
)
=>
{
export
const
createDept
=
async
(
data
:
DeptVO
)
=>
{
return
await
request
.
post
({
url
:
'/system/dept/create'
,
data
:
data
})
}
// 修改部门
export
const
updateDept
Api
=
async
(
params
:
DeptVO
)
=>
{
export
const
updateDept
=
async
(
params
:
DeptVO
)
=>
{
return
await
request
.
put
({
url
:
'/system/dept/update'
,
data
:
params
})
}
// 删除部门
export
const
deleteDept
Api
=
async
(
id
:
number
)
=>
{
export
const
deleteDept
=
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
'/system/dept/delete?id='
+
id
})
}
src/api/system/errorCode/index.ts
View file @
4404554c
...
...
@@ -10,39 +10,31 @@ export interface ErrorCodeVO {
createTime
:
Date
}
export
interface
ErrorCodePageReqVO
extends
PageParam
{
type
?:
number
applicationName
?:
string
code
?:
number
message
?:
string
createTime
?:
Date
[]
}
// 查询错误码列表
export
const
getErrorCodePage
Api
=
(
params
:
ErrorCodePageReqVO
)
=>
{
export
const
getErrorCodePage
=
(
params
:
PageParam
)
=>
{
return
request
.
get
({
url
:
'/system/error-code/page'
,
params
})
}
// 查询错误码详情
export
const
getErrorCode
Api
=
(
id
:
number
)
=>
{
export
const
getErrorCode
=
(
id
:
number
)
=>
{
return
request
.
get
({
url
:
'/system/error-code/get?id='
+
id
})
}
// 新增错误码
export
const
createErrorCode
Api
=
(
data
:
ErrorCodeVO
)
=>
{
export
const
createErrorCode
=
(
data
:
ErrorCodeVO
)
=>
{
return
request
.
post
({
url
:
'/system/error-code/create'
,
data
})
}
// 修改错误码
export
const
updateErrorCode
Api
=
(
data
:
ErrorCodeVO
)
=>
{
export
const
updateErrorCode
=
(
data
:
ErrorCodeVO
)
=>
{
return
request
.
put
({
url
:
'/system/error-code/update'
,
data
})
}
// 删除错误码
export
const
deleteErrorCode
Api
=
(
id
:
number
)
=>
{
export
const
deleteErrorCode
=
(
id
:
number
)
=>
{
return
request
.
delete
({
url
:
'/system/error-code/delete?id='
+
id
})
}
// 导出错误码
export
const
excelErrorCode
Api
=
(
params
:
ErrorCodePageReqVO
)
=>
{
export
const
excelErrorCode
=
(
params
)
=>
{
return
request
.
download
({
url
:
'/system/error-code/export-excel'
,
params
})
}
src/api/system/menu/index.ts
View file @
4404554c
...
...
@@ -29,7 +29,7 @@ export const getMenuList = (params) => {
}
// 获取菜单详情
export
const
getMenu
Api
=
(
id
:
number
)
=>
{
export
const
getMenu
=
(
id
:
number
)
=>
{
return
request
.
get
({
url
:
'/system/menu/get?id='
+
id
})
}
...
...
src/api/system/notify/message/index.ts
View file @
4404554c
...
...
@@ -38,11 +38,11 @@ export const updateAllNotifyMessageRead = async () => {
}
// 获取当前用户的最新站内信列表
export
const
getUnreadNotifyMessageList
Api
=
async
()
=>
{
export
const
getUnreadNotifyMessageList
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/system/notify-message/get-unread-list'
})
}
// 获得当前用户的未读站内信数量
export
const
getUnreadNotifyMessageCount
Api
=
async
()
=>
{
export
const
getUnreadNotifyMessageCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/system/notify-message/get-unread-count'
})
}
src/api/system/user/profile.ts
View file @
4404554c
...
...
@@ -51,17 +51,17 @@ export interface UserProfileUpdateReqVO {
}
// 查询用户个人信息
export
const
getUserProfile
Api
=
()
=>
{
export
const
getUserProfile
=
()
=>
{
return
request
.
get
({
url
:
'/system/user/profile/get'
})
}
// 修改用户个人信息
export
const
updateUserProfile
Api
=
(
data
:
UserProfileUpdateReqVO
)
=>
{
export
const
updateUserProfile
=
(
data
:
UserProfileUpdateReqVO
)
=>
{
return
request
.
put
({
url
:
'/system/user/profile/update'
,
data
})
}
// 用户密码重置
export
const
updateUserP
wdApi
=
(
oldPassword
:
string
,
newPassword
:
string
)
=>
{
export
const
updateUserP
assword
=
(
oldPassword
:
string
,
newPassword
:
string
)
=>
{
return
request
.
put
({
url
:
'/system/user/profile/update-password'
,
data
:
{
...
...
@@ -72,6 +72,6 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
}
// 用户头像上传
export
const
uploadAvatar
Api
=
(
data
)
=>
{
export
const
uploadAvatar
=
(
data
)
=>
{
return
request
.
upload
({
url
:
'/system/user/profile/update-avatar'
,
data
:
data
})
}
src/components/DictTag/src/DictTag.vue
View file @
4404554c
...
...
@@ -48,6 +48,7 @@ export default defineComponent({
?
dictData
.
value
?.
cssClass
:
''
}
disableTransitions
=
{
true
}
>
{
dictData
.
value
?.
label
}
<
/ElTag
>
...
...
src/components/DocAlert/index.vue
0 → 100644
View file @
4404554c
<
template
>
<el-alert
v-if=
"getEnable()"
type=
"success"
show-icon
>
<template
#
title
>
<div
@
click=
"goToUrl"
>
{{
'【'
+
title
+
'】文档地址:'
+
url
}}
</div>
</
template
>
</el-alert>
</template>
<
script
setup
lang=
"tsx"
name=
"DocAlert"
>
import
{
propTypes
}
from
'@/utils/propTypes'
const
props
=
defineProps
({
title
:
propTypes
.
string
,
url
:
propTypes
.
string
})
/** 跳转 URL 链接 */
const
goToUrl
=
()
=>
{
window
.
open
(
props
.
url
)
}
/** 是否开启 */
const
getEnable
=
()
=>
{
return
import
.
meta
.
env
.
VITE_APP_TENANT_ENABLE
===
'true'
}
</
script
>
<
style
scoped
>
.el-alert--success.is-light
{
border
:
1px
solid
green
;
margin-bottom
:
10px
;
cursor
:
pointer
;
}
</
style
>
src/components/Verifition/src/Verify/VerifyPoints.vue
View file @
4404554c
...
...
@@ -64,7 +64,7 @@
* */
import
{
resetSize
}
from
'./../utils/util'
import
{
aesEncrypt
}
from
'./../utils/ase'
import
{
getCode
Api
,
reqCheckApi
}
from
'@/api/login'
import
{
getCode
,
reqCheck
}
from
'@/api/login'
import
{
onMounted
,
reactive
,
ref
,
nextTick
,
toRefs
,
getCurrentInstance
}
from
'vue'
const
props
=
defineProps
({
...
...
@@ -170,7 +170,7 @@ const canvasClick = (e) => {
:
JSON
.
stringify
(
checkPosArr
),
token
:
backToken
.
value
}
reqCheck
Api
(
data
).
then
((
res
)
=>
{
reqCheck
(
data
).
then
((
res
)
=>
{
if
(
res
.
repCode
==
'0000'
)
{
barAreaColor
.
value
=
'#4cae4c'
barAreaBorderColor
.
value
=
'#5cb85c'
...
...
@@ -227,7 +227,7 @@ const getPictrue = async () => {
let
data
=
{
captchaType
:
captchaType
.
value
}
const
res
=
await
getCode
Api
(
data
)
const
res
=
await
getCode
(
data
)
if
(
res
.
repCode
==
'0000'
)
{
pointBackImgBase
.
value
=
res
.
repData
.
originalImageBase64
backToken
.
value
=
res
.
repData
.
token
...
...
src/components/Verifition/src/Verify/VerifySlide.vue
View file @
4404554c
...
...
@@ -78,7 +78,7 @@
* */
import
{
aesEncrypt
}
from
'./../utils/ase'
import
{
resetSize
}
from
'./../utils/util'
import
{
getCode
Api
,
reqCheckApi
}
from
'@/api/login'
import
{
getCode
,
reqCheck
}
from
'@/api/login'
const
props
=
defineProps
({
captchaType
:
{
...
...
@@ -286,7 +286,7 @@ const end = () => {
:
JSON
.
stringify
({
x
:
moveLeftDistance
,
y
:
5.0
}),
token
:
backToken
.
value
}
reqCheck
Api
(
data
).
then
((
res
)
=>
{
reqCheck
(
data
).
then
((
res
)
=>
{
if
(
res
.
repCode
==
'0000'
)
{
moveBlockBackgroundColor
.
value
=
'#5cb85c'
leftBarBorderColor
.
value
=
'#5cb85c'
...
...
@@ -301,7 +301,7 @@ const end = () => {
},
1500
)
}
passFlag
.
value
=
true
tipWords
.
value
=
`
${((
endMovetime
.
value
-
startMoveTime
.
value
)
/
1000
).
toFixed
(
2
)}
s
tipWords
.
value
=
`
${((
endMovetime
.
value
-
startMoveTime
.
value
)
/
1000
).
toFixed
(
2
)}
s
${
t
(
'captcha.success'
)}
`
var
captchaVerification
=
secretKey
.
value
?
aesEncrypt
(
...
...
@@ -363,7 +363,7 @@ const getPictrue = async () => {
let
data
=
{
captchaType
:
captchaType
.
value
}
const
res
=
await
getCode
Api
(
data
)
const
res
=
await
getCode
(
data
)
if
(
res
.
repCode
==
'0000'
)
{
backImgBase
.
value
=
res
.
repData
.
originalImageBase64
blockBackImgBase
.
value
=
res
.
repData
.
jigsawImageBase64
...
...
src/layout/components/Message/src/Message.vue
View file @
4404554c
...
...
@@ -9,14 +9,14 @@ const list = ref<any[]>([]) // 消息列表
// 获得消息列表
const
getList
=
async
()
=>
{
list
.
value
=
await
NotifyMessageApi
.
getUnreadNotifyMessageList
Api
()
list
.
value
=
await
NotifyMessageApi
.
getUnreadNotifyMessageList
()
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
unreadCount
.
value
=
0
}
// 获得未读消息数
const
getUnreadCount
=
async
()
=>
{
NotifyMessageApi
.
getUnreadNotifyMessageCount
Api
().
then
((
data
)
=>
{
NotifyMessageApi
.
getUnreadNotifyMessageCount
().
then
((
data
)
=>
{
unreadCount
.
value
=
data
})
}
...
...
src/locales/zh-CN.ts
View file @
4404554c
...
...
@@ -297,8 +297,7 @@ export default {
typeCreate
:
'字典类型新增'
,
typeUpdate
:
'字典类型编辑'
,
dataCreate
:
'字典数据新增'
,
dataUpdate
:
'字典数据编辑'
,
fileUpload
:
'上传文件'
dataUpdate
:
'字典数据编辑'
},
dialog
:
{
dialog
:
'弹窗'
,
...
...
src/router/modules/remaining.ts
View file @
4404554c
...
...
@@ -115,7 +115,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children
:
[
{
path
:
'type/data/:dictType'
,
component
:
()
=>
import
(
'@/views/system/dict/data.vue'
),
component
:
()
=>
import
(
'@/views/system/dict/data
/index
.vue'
),
name
:
'data'
,
meta
:
{
title
:
'字典数据'
,
...
...
@@ -123,7 +123,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
hidden
:
true
,
canTo
:
true
,
icon
:
''
,
activeMenu
:
'
system/dict/data
'
activeMenu
:
'
/system/dict
'
}
}
]
...
...
src/store/modules/permission.ts
View file @
4404554c
...
...
@@ -3,7 +3,7 @@ import { store } from '../index'
import
{
cloneDeep
}
from
'lodash-es'
import
remainingRouter
from
'@/router/modules/remaining'
import
{
generateRoute
,
flatMultiLevelRoutes
}
from
'@/utils/routerHelper'
import
{
getAsyncRoutes
Api
}
from
'@/api/login'
import
{
getAsyncRoutes
}
from
'@/api/login'
import
{
CACHE_KEY
,
useCache
}
from
'@/hooks/web/useCache'
const
{
wsCache
}
=
useCache
()
...
...
@@ -38,7 +38,7 @@ export const usePermissionStore = defineStore('permission', {
if
(
wsCache
.
get
(
CACHE_KEY
.
ROLE_ROUTERS
))
{
res
=
wsCache
.
get
(
CACHE_KEY
.
ROLE_ROUTERS
)
as
AppCustomRouteRecordRaw
[]
}
else
{
res
=
await
getAsyncRoutes
Api
()
res
=
await
getAsyncRoutes
()
wsCache
.
set
(
CACHE_KEY
.
ROLE_ROUTERS
,
res
)
}
const
routerMap
:
AppRouteRecordRaw
[]
=
generateRoute
(
res
as
AppCustomRouteRecordRaw
[])
...
...
src/store/modules/user.ts
View file @
4404554c
...
...
@@ -2,7 +2,7 @@ import { store } from '../index'
import
{
defineStore
}
from
'pinia'
import
{
getAccessToken
,
removeToken
}
from
'@/utils/auth'
import
{
CACHE_KEY
,
useCache
}
from
'@/hooks/web/useCache'
import
{
getInfo
Api
,
loginOutApi
}
from
'@/api/login'
import
{
getInfo
,
loginOut
}
from
'@/api/login'
const
{
wsCache
}
=
useCache
()
...
...
@@ -51,7 +51,7 @@ export const useUserStore = defineStore('admin-user', {
}
let
userInfo
=
wsCache
.
get
(
CACHE_KEY
.
USER
)
if
(
!
userInfo
)
{
userInfo
=
await
getInfo
Api
()
userInfo
=
await
getInfo
()
}
this
.
permissions
=
userInfo
.
permissions
this
.
roles
=
userInfo
.
roles
...
...
@@ -60,7 +60,7 @@ export const useUserStore = defineStore('admin-user', {
wsCache
.
set
(
CACHE_KEY
.
USER
,
userInfo
)
},
async
loginOut
()
{
await
loginOut
Api
()
await
loginOut
()
removeToken
()
wsCache
.
clear
()
this
.
resetState
()
...
...
src/types/auto-components.d.ts
View file @
4404554c
...
...
@@ -21,8 +21,10 @@ declare module '@vue/runtime-core' {
Descriptions
:
typeof
import
(
'./../components/Descriptions/src/Descriptions.vue'
)[
'default'
]
Dialog
:
typeof
import
(
'./../components/Dialog/src/Dialog.vue'
)[
'default'
]
DictTag
:
typeof
import
(
'./../components/DictTag/src/DictTag.vue'
)[
'default'
]
DocAlert
:
typeof
import
(
'./../components/DocAlert/index.vue'
)[
'default'
]
Echart
:
typeof
import
(
'./../components/Echart/src/Echart.vue'
)[
'default'
]
Editor
:
typeof
import
(
'./../components/Editor/src/Editor.vue'
)[
'default'
]
ElAlert
:
typeof
import
(
'element-plus/es'
)[
'ElAlert'
]
ElAutoResizer
:
typeof
import
(
'element-plus/es'
)[
'ElAutoResizer'
]
ElAvatar
:
typeof
import
(
'element-plus/es'
)[
'ElAvatar'
]
ElBadge
:
typeof
import
(
'element-plus/es'
)[
'ElBadge'
]
...
...
src/views/Login/components/LoginForm.vue
View file @
4404554c
...
...
@@ -195,7 +195,7 @@ const getCode = async () => {
//获取租户ID
const
getTenantId
=
async
()
=>
{
if
(
loginData
.
tenantEnable
===
'true'
)
{
const
res
=
await
LoginApi
.
getTenantIdByName
Api
(
loginData
.
loginForm
.
tenantName
)
const
res
=
await
LoginApi
.
getTenantIdByName
(
loginData
.
loginForm
.
tenantName
)
authUtil
.
setTenantId
(
res
)
}
}
...
...
@@ -222,7 +222,7 @@ const handleLogin = async (params) => {
return
}
loginData
.
loginForm
.
captchaVerification
=
params
.
captchaVerification
const
res
=
await
LoginApi
.
login
Api
(
loginData
.
loginForm
)
const
res
=
await
LoginApi
.
login
(
loginData
.
loginForm
)
if
(
!
res
)
{
return
}
...
...
@@ -259,7 +259,7 @@ const doSocialLogin = async (type: number) => {
loginLoading
.
value
=
true
if
(
loginData
.
tenantEnable
===
'true'
)
{
await
message
.
prompt
(
'请输入租户名称'
,
t
(
'common.reminder'
)).
then
(
async
({
value
})
=>
{
const
res
=
await
LoginApi
.
getTenantIdByName
Api
(
value
)
const
res
=
await
LoginApi
.
getTenantIdByName
(
value
)
authUtil
.
setTenantId
(
res
)
})
}
...
...
@@ -267,7 +267,7 @@ const doSocialLogin = async (type: number) => {
const
redirectUri
=
location
.
origin
+
'/social-login?type='
+
type
+
'&redirect='
+
(
redirect
.
value
||
'/'
)
// 进行跳转
const
res
=
await
LoginApi
.
socialAuthRedirect
Api
(
type
,
encodeURIComponent
(
redirectUri
))
const
res
=
await
LoginApi
.
socialAuthRedirect
(
type
,
encodeURIComponent
(
redirectUri
))
window
.
location
.
href
=
res
}
}
...
...
src/views/Login/components/MobileForm.vue
View file @
4404554c
...
...
@@ -98,7 +98,7 @@ import { useIcon } from '@/hooks/web/useIcon'
import
{
setTenantId
,
setToken
}
from
'@/utils/auth'
import
{
usePermissionStore
}
from
'@/store/modules/permission'
import
{
getTenantIdByName
Api
,
sendSmsCodeApi
,
smsLoginApi
}
from
'@/api/login'
import
{
getTenantIdByName
,
sendSmsCode
,
smsLogin
}
from
'@/api/login'
import
LoginFormTitle
from
'./LoginFormTitle.vue'
import
{
useLoginState
,
LoginStateEnum
,
useFormValid
}
from
'./useLogin'
...
...
@@ -149,7 +149,7 @@ const redirect = ref<string>('')
const
getSmsCode
=
async
()
=>
{
await
getTenantId
()
smsVO
.
smsCode
.
mobile
=
loginData
.
loginForm
.
mobileNumber
await
sendSmsCode
Api
(
smsVO
.
smsCode
).
then
(
async
()
=>
{
await
sendSmsCode
(
smsVO
.
smsCode
).
then
(
async
()
=>
{
message
.
success
(
t
(
'login.SmsSendMsg'
))
// 设置倒计时
mobileCodeTimer
.
value
=
60
...
...
@@ -173,7 +173,7 @@ watch(
// 获取租户 ID
const
getTenantId
=
async
()
=>
{
if
(
loginData
.
tenantEnable
===
'true'
)
{
const
res
=
await
getTenantIdByName
Api
(
loginData
.
loginForm
.
tenantName
)
const
res
=
await
getTenantIdByName
(
loginData
.
loginForm
.
tenantName
)
setTenantId
(
res
)
}
}
...
...
@@ -185,7 +185,7 @@ const signIn = async () => {
loginLoading
.
value
=
true
smsVO
.
loginSms
.
mobile
=
loginData
.
loginForm
.
mobileNumber
smsVO
.
loginSms
.
code
=
loginData
.
loginForm
.
code
await
smsLogin
Api
(
smsVO
.
loginSms
)
await
smsLogin
(
smsVO
.
loginSms
)
.
then
(
async
(
res
)
=>
{
setToken
(
res
?.
token
)
if
(
!
redirect
.
value
)
{
...
...
src/views/Profile/components/BasicInfo.vue
View file @
4404554c
...
...
@@ -17,8 +17,8 @@ import { ElMessage } from 'element-plus'
import
{
FormSchema
}
from
'@/types/form'
import
type
{
FormExpose
}
from
'@/components/Form'
import
{
getUserProfile
Api
,
updateUserProfile
Api
,
getUserProfile
,
updateUserProfile
,
UserProfileUpdateReqVO
}
from
'@/api/system/user/profile'
...
...
@@ -73,14 +73,14 @@ const submit = () => {
elForm
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
const
data
=
unref
(
formRef
)?.
formModel
as
UserProfileUpdateReqVO
await
updateUserProfile
Api
(
data
)
await
updateUserProfile
(
data
)
ElMessage
.
success
(
t
(
'common.updateSuccess'
))
await
init
()
}
})
}
const
init
=
async
()
=>
{
const
res
=
await
getUserProfile
Api
()
const
res
=
await
getUserProfile
()
unref
(
formRef
)?.
setValues
(
res
)
}
onMounted
(
async
()
=>
{
...
...
src/views/Profile/components/ProfileUser.vue
View file @
4404554c
...
...
@@ -43,12 +43,12 @@
import
{
formatDate
}
from
'@/utils/formatTime'
import
UserAvatar
from
'./UserAvatar.vue'
import
{
getUserProfile
Api
,
ProfileVO
}
from
'@/api/system/user/profile'
import
{
getUserProfile
,
ProfileVO
}
from
'@/api/system/user/profile'
const
{
t
}
=
useI18n
()
const
userInfo
=
ref
<
ProfileVO
>
()
const
getUserInfo
=
async
()
=>
{
const
users
=
await
getUserProfile
Api
()
const
users
=
await
getUserProfile
()
userInfo
.
value
=
users
}
onMounted
(
async
()
=>
{
...
...
src/views/Profile/components/ResetPwd.vue
View file @
4404554c
...
...
@@ -19,7 +19,7 @@
import
type
{
FormRules
,
FormInstance
}
from
'element-plus'
import
{
InputPassword
}
from
'@/components/InputPassword'
import
{
updateUserP
wdApi
}
from
'@/api/system/user/profile'
import
{
updateUserP
assword
}
from
'@/api/system/user/profile'
const
{
t
}
=
useI18n
()
const
message
=
useMessage
()
...
...
@@ -56,7 +56,7 @@ const submit = (formEl: FormInstance | undefined) => {
if
(
!
formEl
)
return
formEl
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
await
updateUserP
wdApi
(
password
.
oldPassword
,
password
.
newPassword
)
await
updateUserP
assword
(
password
.
oldPassword
,
password
.
newPassword
)
message
.
success
(
t
(
'common.updateSuccess'
))
}
})
...
...
src/views/Profile/components/UserAvatar.vue
View file @
4404554c
...
...
@@ -12,7 +12,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
propTypes
}
from
'@/utils/propTypes'
import
{
uploadAvatar
Api
}
from
'@/api/system/user/profile'
import
{
uploadAvatar
}
from
'@/api/system/user/profile'
const
props
=
defineProps
({
img
:
propTypes
.
string
.
def
(
''
)
})
...
...
@@ -22,7 +22,7 @@ const avatar = computed(() => {
const
cropperRef
=
ref
()
const
handelUpload
=
async
({
data
})
=>
{
await
uploadAvatar
Api
({
avatarFile
:
data
})
await
uploadAvatar
({
avatarFile
:
data
})
cropperRef
.
value
.
close
()
}
</
script
>
...
...
src/views/Profile/components/UserSocial.vue
View file @
4404554c
...
...
@@ -23,7 +23,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
SystemUserSocialTypeEnum
}
from
'@/utils/constants'
import
{
getUserProfile
Api
,
ProfileVO
}
from
'@/api/system/user/profile'
import
{
getUserProfile
,
ProfileVO
}
from
'@/api/system/user/profile'
import
{
socialAuthRedirect
,
socialUnbind
}
from
'@/api/system/user/socialUser'
const
message
=
useMessage
()
...
...
@@ -31,7 +31,7 @@ const socialUsers = ref<any[]>([])
const
userInfo
=
ref
<
ProfileVO
>
()
const
initSocial
=
async
()
=>
{
const
res
=
await
getUserProfile
Api
()
const
res
=
await
getUserProfile
()
userInfo
.
value
=
res
for
(
const
i
in
SystemUserSocialTypeEnum
)
{
const
socialUser
=
{
...
SystemUserSocialTypeEnum
[
i
]
}
...
...
src/views/bpm/form/index.vue
View file @
4404554c
<
template
>
<
content-w
rap>
<
ContentW
rap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -25,10 +25,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"表单名"
align=
"center"
prop=
"name"
/>
...
...
@@ -75,7 +75,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单详情的弹窗 -->
<Dialog
title=
"表单详情"
v-model=
"detailVisible"
width=
"800"
>
...
...
src/views/bpm/oa/leave/create.vue
View file @
4404554c
...
...
@@ -44,7 +44,7 @@ const submitForm = async () => {
data
.
startTime
=
Date
.
parse
(
new
Date
(
data
.
startTime
).
toString
()).
toString
()
data
.
endTime
=
Date
.
parse
(
new
Date
(
data
.
endTime
).
toString
()).
toString
()
// 添加的提交
await
LeaveApi
.
createLeave
Api
(
data
)
await
LeaveApi
.
createLeave
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
// 关闭窗口
push
(
'/bpm/oa/leave'
)
...
...
src/views/bpm/oa/leave/detail.vue
View file @
4404554c
...
...
@@ -35,7 +35,7 @@ onMounted(() => {
return
}
// 获得请假信息
LeaveApi
.
getLeave
Api
(
id
.
value
).
then
((
data
)
=>
{
LeaveApi
.
getLeave
(
id
.
value
).
then
((
data
)
=>
{
formData
.
value
=
data
})
})
...
...
src/views/bpm/oa/leave/index.vue
View file @
4404554c
...
...
@@ -37,7 +37,7 @@ const { push } = useRouter() // 路由
const
[
registerTable
,
{
reload
}]
=
useXTable
({
allSchemas
:
allSchemas
,
getListApi
:
LeaveApi
.
getLeavePage
Api
getListApi
:
LeaveApi
.
getLeavePage
})
// 发起请假
...
...
@@ -55,7 +55,7 @@ const cancelLeave = (row) => {
inputPattern
:
/^
[\s\S]
*.*
\S[\s\S]
*$/
,
// 判断非空,且非空格
inputErrorMessage
:
'取消原因不能为空'
}).
then
(
async
({
value
})
=>
{
await
ProcessInstanceApi
.
cancelProcessInstance
Api
(
row
.
id
,
value
)
await
ProcessInstanceApi
.
cancelProcessInstance
(
row
.
id
,
value
)
message
.
success
(
'取消成功'
)
reload
()
})
...
...
src/views/bpm/processInstance/create/index.vue
View file @
4404554c
...
...
@@ -111,7 +111,7 @@ const submitForm = async (formData) => {
// 提交请求
fApi
.
value
.
btn
.
loading
(
true
)
try
{
await
ProcessInstanceApi
.
createProcessInstance
Api
({
await
ProcessInstanceApi
.
createProcessInstance
({
processDefinitionId
:
selectProcessInstance
.
value
.
id
,
variables
:
formData
})
...
...
src/views/bpm/processInstance/detail/index.vue
View file @
4404554c
...
...
@@ -189,7 +189,7 @@ const getDetail = () => {
const
getProcessInstance
=
async
()
=>
{
try
{
processInstanceLoading
.
value
=
true
const
data
=
await
ProcessInstanceApi
.
getProcessInstance
Api
(
id
)
const
data
=
await
ProcessInstanceApi
.
getProcessInstance
(
id
)
if
(
!
data
)
{
message
.
error
(
'查询不到流程信息!'
)
return
...
...
src/views/bpm/processInstance/index.vue
View file @
4404554c
...
...
@@ -57,7 +57,7 @@ const { t } = useI18n() // 国际化
// ========== 列表相关 ==========
const
[
registerTable
,
{
reload
}]
=
useXTable
({
allSchemas
:
allSchemas
,
getListApi
:
ProcessInstanceApi
.
getMyProcessInstancePage
Api
getListApi
:
ProcessInstanceApi
.
getMyProcessInstancePage
})
/** 发起流程操作 **/
...
...
@@ -85,7 +85,7 @@ const handleCancel = (row) => {
inputPattern
:
/^
[\s\S]
*.*
\S[\s\S]
*$/
,
// 判断非空,且非空格
inputErrorMessage
:
'取消原因不能为空'
}).
then
(
async
({
value
})
=>
{
await
ProcessInstanceApi
.
cancelProcessInstance
Api
(
row
.
id
,
value
)
await
ProcessInstanceApi
.
cancelProcessInstance
(
row
.
id
,
value
)
message
.
success
(
'取消成功'
)
reload
()
})
...
...
src/views/infra/apiAccessLog/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"系统日志"
url=
"https://doc.iocoder.cn/system-log/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -25,10 +27,10 @@
class=
"!w-240px"
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.USER_TYPE)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.USER_TYPE)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"
parseInt(dict.value)
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -84,10 +86,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"日志编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"用户编号"
align=
"center"
prop=
"userId"
/>
...
...
@@ -105,15 +107,11 @@
</
template
>
</el-table-column>
<el-table-column
label=
"执行时长"
align=
"center"
prop=
"duration"
width=
"180"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
duration
}}
ms
</span>
</
template
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
duration
}}
ms
</
template
>
</el-table-column>
<el-table-column
label=
"操作结果"
align=
"center"
prop=
"status"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
resultCode
===
0
?
'成功'
:
'失败('
+
scope
.
row
.
resultMsg
+
')'
}}
</span>
{{
scope
.
row
.
resultCode
===
0
?
'成功'
:
'失败('
+
scope
.
row
.
resultMsg
+
')'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
...
...
@@ -136,19 +134,17 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<ApiAccessLogDetail
ref=
"detailRef"
/>
</template>
<
script
setup
lang=
"ts"
name=
"ApiAccessLog"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
download
from
'@/utils/download'
import
{
formatDate
}
from
'@/utils/formatTime'
import
*
as
ApiAccessLogApi
from
'@/api/infra/apiAccessLog'
import
ApiAccessLogDetail
from
'./ApiAccessLogDetail.vue'
const
message
=
useMessage
()
// 消息弹窗
const
loading
=
ref
(
true
)
// 列表的加载中
...
...
src/views/infra/apiErrorLog/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"系统日志"
url=
"https://doc.iocoder.cn/system-log/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
...
...
src/views/infra/codegen/EditTable.vue
View file @
4404554c
<
template
>
<
content-w
rap
v-loading=
"formLoading"
>
<
ContentW
rap
v-loading=
"formLoading"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"基本信息"
name=
"basicInfo"
>
<basic-info-form
ref=
"basicInfoRef"
:table=
"formData.table"
/>
...
...
@@ -17,7 +17,7 @@
<el-button
@
click=
"close"
>
返回
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
...
...
src/views/infra/codegen/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"代码生成"
url=
"https://doc.iocoder.cn/new-feature/"
/>
<doc-alert
title=
"单元测试"
url=
"https://doc.iocoder.cn/unit-test/"
/>
<!-- 搜索 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -45,10 +48,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"数据源"
align=
"center"
>
<template
#
default=
"scope"
>
...
...
@@ -132,7 +135,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 弹窗:导入表 -->
<ImportTable
ref=
"importRef"
success=
"getList"
/>
...
...
src/views/infra/config/
f
orm.vue
→
src/views/infra/config/
ConfigF
orm.vue
View file @
4404554c
...
...
@@ -70,7 +70,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -85,7 +85,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/infra/config/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"配置中心"
url=
"https://doc.iocoder.cn/config-center/"
/>
<!-- 搜索 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -34,10 +36,10 @@
class=
"!w-240px"
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.INFRA_CONFIG_TYPE)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"
parseInt(dict.value)
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -58,7 +60,7 @@
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['infra:config:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
...
...
@@ -74,10 +76,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"参数主键"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"参数分类"
align=
"center"
prop=
"category"
/>
...
...
@@ -107,7 +109,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['infra:config:update']"
>
编辑
...
...
@@ -130,17 +132,17 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
config-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
ConfigForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"Config"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
ConfigApi
from
'@/api/infra/config'
import
ConfigForm
from
'./
f
orm.vue'
import
ConfigForm
from
'./
ConfigF
orm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -183,9 +185,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
@@ -208,7 +210,7 @@ const handleExport = async () => {
await
message
.
exportConfirm
()
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
ConfigApi
.
exportConfig
Api
(
queryParams
)
const
data
=
await
ConfigApi
.
exportConfig
(
queryParams
)
download
.
excel
(
data
,
'参数配置.xls'
)
}
catch
{
}
finally
{
...
...
src/views/infra/dataSourceConfig/
f
orm.vue
→
src/views/infra/dataSourceConfig/
DataSourceConfigF
orm.vue
View file @
4404554c
...
...
@@ -52,7 +52,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -67,7 +67,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/infra/dataSourceConfig/index.vue
View file @
4404554c
<
template
>
<
content-w
rap>
<
ContentW
rap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
:inline=
"true"
>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['infra:data-source-config:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"主键编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"数据源名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"数据源连接"
align=
"center"
prop=
"url"
:show-overflow-tooltip=
"true"
/>
...
...
@@ -34,7 +34,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['infra:data-source-config:update']"
:disabled=
"scope.row.id === 0"
>
...
...
@@ -52,15 +52,15 @@
</
template
>
</el-table-column>
</el-table>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
data-source-config-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
DataSourceConfigForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"DataSourceConfig"
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
DataSourceConfigApi
from
'@/api/infra/dataSourceConfig'
import
DataSourceConfigForm
from
'./
f
orm.vue'
import
DataSourceConfigForm
from
'./
DataSourceConfigF
orm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -78,9 +78,9 @@ const getList = async () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/infra/dbDoc/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"数据库文档"
url=
"https://doc.iocoder.cn/db-doc/"
/>
<ContentWrap
title=
"数据库文档"
>
<!-- 操作工具栏 -->
<div
class=
"mb-10px"
>
...
...
@@ -34,7 +36,7 @@ const src = ref('')
const
loding
=
ref
(
true
)
/** 页面加载 */
const
init
=
async
()
=>
{
const
res
=
await
DbDocApi
.
exportHtml
Api
()
const
res
=
await
DbDocApi
.
exportHtml
()
let
blob
=
new
Blob
([
res
],
{
type
:
'text/html'
})
let
blobUrl
=
window
.
URL
.
createObjectURL
(
blob
)
src
.
value
=
blobUrl
...
...
@@ -43,15 +45,15 @@ const init = async () => {
/** 处理导出 */
const
handleExport
=
async
(
type
:
string
)
=>
{
if
(
type
===
'HTML'
)
{
const
res
=
await
DbDocApi
.
exportHtml
Api
()
const
res
=
await
DbDocApi
.
exportHtml
()
download
.
html
(
res
,
'数据库文档.html'
)
}
if
(
type
===
'Word'
)
{
const
res
=
await
DbDocApi
.
exportWord
Api
()
const
res
=
await
DbDocApi
.
exportWord
()
download
.
word
(
res
,
'数据库文档.doc'
)
}
if
(
type
===
'Markdown'
)
{
const
res
=
await
DbDocApi
.
exportMarkdown
Api
()
const
res
=
await
DbDocApi
.
exportMarkdown
()
download
.
markdown
(
res
,
'数据库文档.md'
)
}
}
...
...
src/views/infra/druid/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"数据库 MyBatis"
url=
"https://doc.iocoder.cn/mybatis/"
/>
<doc-alert
title=
"多数据源(读写分离)"
url=
"https://doc.iocoder.cn/dynamic-datasource/"
/>
<ContentWrap>
<IFrame
:src=
"src"
/>
</ContentWrap>
...
...
src/views/infra/file/
f
orm.vue
→
src/views/infra/file/
FileF
orm.vue
View file @
4404554c
<
template
>
<Dialog
:title=
"dialogTitle
"
v-model=
"dialogVisible"
>
<Dialog
title=
"上传文件
"
v-model=
"dialogVisible"
>
<el-upload
ref=
"uploadRef"
:limit=
"1"
...
...
@@ -28,11 +28,9 @@
</
template
>
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
Dialog
}
from
'@/components/Dialog'
import
{
getAccessToken
}
from
'@/utils/auth'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -45,11 +43,10 @@ const data = ref({ path: '' })
const
uploadRef
=
ref
()
/** 打开弹窗 */
const
open
Modal
=
async
()
=>
{
const
open
=
async
()
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.fileUpload'
)
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/infra/file/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"上传下载"
url=
"https://doc.iocoder.cn/file/"
/>
<!-- 搜索 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
ref=
"queryFormRef"
:inline=
"true"
>
<el-form-item
label=
"文件路径"
prop=
"path"
>
<el-input
...
...
@@ -31,16 +33,16 @@
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"open
Modal
"
>
<el-button
type=
"primary"
@
click=
"open
Form
"
>
<Icon
icon=
"ep:upload"
class=
"mr-5px"
/>
上传文件
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"文件名"
align=
"center"
prop=
"name"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"文件路径"
align=
"center"
prop=
"path"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"URL"
align=
"center"
prop=
"url"
:show-overflow-tooltip=
"true"
/>
...
...
@@ -79,16 +81,16 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
file-upload-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
FileForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"Config"
>
import
{
fileSizeFormatter
}
from
'@/utils'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
FileApi
from
'@/api/infra/file'
import
FileUploadForm
from
'./
f
orm.vue'
import
FileUploadForm
from
'./
FileF
orm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -129,9 +131,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
()
=>
{
modalRef
.
value
.
openModal
()
const
form
Ref
=
ref
()
const
open
Form
=
()
=>
{
formRef
.
value
.
open
()
}
/** 删除按钮操作 */
...
...
src/views/infra/fileConfig/
f
orm.vue
→
src/views/infra/fileConfig/
FileConfigF
orm.vue
View file @
4404554c
...
...
@@ -101,7 +101,6 @@
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
*
as
FileConfigApi
from
'@/api/infra/fileConfig'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -136,7 +135,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -151,7 +150,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/infra/fileConfig/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"上传下载"
url=
"https://doc.iocoder.cn/file/"
/>
<!-- 搜索 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
ref=
"queryFormRef"
:inline=
"true"
>
<el-form-item
label=
"配置名"
prop=
"name"
>
<el-input
...
...
@@ -13,10 +15,10 @@
<el-form-item
label=
"存储器"
prop=
"storage"
>
<el-select
v-model=
"queryParams.storage"
placeholder=
"请选择存储器"
clearable
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.INFRA_FILE_STORAGE)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"
parseInt(dict.value)
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -36,18 +38,18 @@
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['infra:file-config:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"配置名"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"存储器"
align=
"center"
prop=
"storage"
>
...
...
@@ -73,7 +75,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['infra:file-config:update']"
>
编辑
...
...
@@ -106,15 +108,15 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
file-config-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
FileConfigForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"Config"
>
import
*
as
FileConfigApi
from
'@/api/infra/fileConfig'
import
FileConfigForm
from
'./
f
orm.vue'
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
FileConfigForm
from
'./
FileConfigF
orm.vue'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -156,9 +158,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/infra/job/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"定时任务"
url=
"https://doc.iocoder.cn/job/"
/>
<doc-alert
title=
"异步任务"
url=
"https://doc.iocoder.cn/async-task/"
/>
<doc-alert
title=
"消息队列"
url=
"https://doc.iocoder.cn/message-queue/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -66,10 +70,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"任务编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"name"
/>
...
...
@@ -136,7 +140,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<JobForm
ref=
"formRef"
@
success=
"getList"
/>
...
...
@@ -271,7 +275,7 @@ const handleRun = async (row: JobApi.JobVO) => {
// 二次确认
await
message
.
confirm
(
'确认要立即执行一次'
+
row
.
name
+
'?'
,
t
(
'common.reminder'
))
// 提交执行
await
JobApi
.
runJob
Api
(
row
.
id
)
await
JobApi
.
runJob
(
row
.
id
)
message
.
success
(
'执行成功'
)
// 刷新列表
await
getList
()
...
...
@@ -286,7 +290,7 @@ const openDetail = (id: number) => {
/** 跳转执行日志 */
const
handleJobLog
=
(
id
:
number
)
=>
{
if
(
id
)
{
if
(
id
>
0
)
{
push
(
'/job/job-log?id='
+
id
)
}
else
{
push
(
'/job/job-log'
)
...
...
src/views/infra/job/logger/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"定时任务"
url=
"https://doc.iocoder.cn/job/"
/>
<doc-alert
title=
"异步任务"
url=
"https://doc.iocoder.cn/async-task/"
/>
<doc-alert
title=
"消息队列"
url=
"https://doc.iocoder.cn/message-queue/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -67,10 +71,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"日志编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"任务编号"
align=
"center"
prop=
"jobId"
/>
...
...
@@ -112,7 +116,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:查看 -->
<JobLogDetail
ref=
"detailRef"
/>
...
...
src/views/infra/redis/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"Redis 缓存"
url=
"https://doc.iocoder.cn/redis-cache/"
/>
<doc-alert
title=
"本地缓存"
url=
"https://doc.iocoder.cn/local-cache/"
/>
<el-scrollbar
height=
"calc(100vh - 88px - 40px - 50px)"
>
<el-row>
<el-col
:span=
"24"
class=
"card-box"
shadow=
"hover"
>
...
...
@@ -130,18 +133,18 @@ import { DICT_TYPE } from '@/utils/dict'
import
*
as
RedisApi
from
'@/api/infra/redis'
import
{
RedisKeyInfo
,
RedisMonitorInfoVO
}
from
'@/api/infra/redis/types'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
cache
=
ref
<
RedisMonitorInfoVO
>
()
const
keyListLoad
=
ref
(
true
)
const
keyList
=
ref
<
RedisKeyInfo
[]
>
([])
// 基本信息
const
readRedisInfo
=
async
()
=>
{
const
data
=
await
RedisApi
.
getCache
Api
()
const
data
=
await
RedisApi
.
getCache
()
cache
.
value
=
data
loadEchartOptions
(
data
.
commandStats
)
const
redisKeysInfo
=
await
RedisApi
.
getKeyDefineList
Api
()
const
redisKeysInfo
=
await
RedisApi
.
getKeyDefineList
()
keyList
.
value
=
redisKeysInfo
keyListLoad
.
value
=
false
//加载完成
}
...
...
@@ -250,19 +253,19 @@ const cacheForm = ref<{
})
const
openKeyTemplate
=
async
(
row
:
RedisKeyInfo
)
=>
{
keyTemplate
.
value
=
row
.
keyTemplate
cacheKeys
.
value
=
await
RedisApi
.
getKeyList
Api
(
row
.
keyTemplate
)
cacheKeys
.
value
=
await
RedisApi
.
getKeyList
(
row
.
keyTemplate
)
dialogVisible
.
value
=
true
}
const
handleDeleteKey
=
async
(
row
)
=>
{
RedisApi
.
deleteKey
Api
(
row
)
RedisApi
.
deleteKey
(
row
)
message
.
success
(
t
(
'common.delSuccess'
))
}
const
handleDeleteKeys
=
async
(
row
)
=>
{
RedisApi
.
deleteKeys
Api
(
row
)
RedisApi
.
deleteKeys
(
row
)
message
.
success
(
t
(
'common.delSuccess'
))
}
const
handleKeyValue
=
async
(
row
)
=>
{
const
res
=
await
RedisApi
.
getKeyValue
Api
(
row
)
const
res
=
await
RedisApi
.
getKeyValue
(
row
)
cacheForm
.
value
=
res
}
onBeforeMount
(()
=>
{
...
...
src/views/infra/server/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"服务监控"
url=
"https://doc.iocoder.cn/server-monitor/"
/>
<ContentWrap>
<IFrame
:src=
"src"
/>
</ContentWrap>
...
...
src/views/infra/skywalking/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"服务监控"
url=
"https://doc.iocoder.cn/server-monitor/"
/>
<ContentWrap>
<IFrame
:src=
"src"
/>
</ContentWrap>
...
...
src/views/infra/swagger/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"接口文档"
url=
"https://doc.iocoder.cn/api-doc/"
/>
<ContentWrap>
<IFrame
:src=
"src"
/>
</ContentWrap>
...
...
src/views/mall/product/property/PropertyForm.vue
View file @
4404554c
...
...
@@ -15,10 +15,8 @@
</el-form-item>
</el-form>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"submitForm"
type=
"primary"
:disabled=
"formLoading"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</div>
<el-button
@
click=
"submitForm"
type=
"primary"
:disabled=
"formLoading"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</
template
>
</Dialog>
</template>
...
...
src/views/mp/account/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"公众号接入"
url=
"https://doc.iocoder.cn/mp/account/"
/>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -25,10 +27,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"微信号"
align=
"center"
prop=
"account"
width=
"180"
/>
...
...
@@ -86,15 +88,14 @@
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
<!-- 分页 -->
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 对话框(添加 / 修改) -->
<AccountForm
ref=
"formRef"
@
success=
"getList"
/>
...
...
@@ -102,7 +103,6 @@
<
script
setup
lang=
"ts"
name=
"MpAccount"
>
import
*
as
AccountApi
from
'@/api/mp/account'
import
AccountForm
from
'./AccountForm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
src/views/mp/freePublish/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"公众号图文"
url=
"https://doc.iocoder.cn/mp/article/"
/>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -23,10 +25,10 @@
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<div
class=
"waterfall"
v-loading=
"loading"
>
<div
class=
"waterfall-item"
...
...
@@ -54,7 +56,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
</
template
>
<
script
setup
lang=
"ts"
name=
"freePublish"
>
...
...
src/views/mp/statistics/index.vue
View file @
4404554c
<
template
>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
ref=
"queryForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"公众号"
prop=
"accountId"
>
<el-select
v-model=
"accountId"
@
change=
"getSummary"
class=
"!w-240px"
>
...
...
@@ -24,10 +24,10 @@
/>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 图表 -->
<
content-w
rap>
<
ContentW
rap>
<el-row>
<el-col
:span=
"12"
class=
"card-box"
>
<el-card>
...
...
@@ -70,7 +70,7 @@
</el-card>
</el-col>
</el-row>
</
content-w
rap>
</
ContentW
rap>
</template>
<
script
setup
lang=
"ts"
name=
"MpStatistics"
>
...
...
src/views/mp/tag/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"公众号标签"
url=
"https://doc.iocoder.cn/mp/tag/"
/>
<!-- 搜索工作栏 -->
<ContentWrap>
<el-form
...
...
src/views/pay/app/index.vue
View file @
4404554c
...
...
@@ -86,9 +86,9 @@ const message = useMessage() // 消息弹窗
// 列表相关的变量
const
[
registerTable
,
{
reload
,
deleteData
,
exportList
}]
=
useXTable
({
allSchemas
:
allSchemas
,
getListApi
:
AppApi
.
getAppPage
Api
,
deleteApi
:
AppApi
.
deleteApp
Api
,
exportListApi
:
AppApi
.
exportApp
Api
getListApi
:
AppApi
.
getAppPage
,
deleteApi
:
AppApi
.
deleteApp
,
exportListApi
:
AppApi
.
exportApp
})
// ========== CRUD 相关 ==========
...
...
@@ -115,14 +115,14 @@ const handleCreate = () => {
const
handleUpdate
=
async
(
rowId
:
number
)
=>
{
setDialogTile
(
'update'
)
// 设置数据
const
res
=
await
AppApi
.
getApp
Api
(
rowId
)
const
res
=
await
AppApi
.
getApp
(
rowId
)
unref
(
formRef
)?.
setValues
(
res
)
}
// 详情操作
const
handleDetail
=
async
(
rowId
:
number
)
=>
{
setDialogTile
(
'detail'
)
const
res
=
await
AppApi
.
getApp
Api
(
rowId
)
const
res
=
await
AppApi
.
getApp
(
rowId
)
detailData
.
value
=
res
}
...
...
@@ -137,10 +137,10 @@ const submitForm = async () => {
try
{
const
data
=
unref
(
formRef
)?.
formModel
as
AppApi
.
AppVO
if
(
actionType
.
value
===
'create'
)
{
await
AppApi
.
createApp
Api
(
data
)
await
AppApi
.
createApp
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
}
else
{
await
AppApi
.
updateApp
Api
(
data
)
await
AppApi
.
updateApp
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
}
dialogVisible
.
value
=
false
...
...
src/views/pay/merchant/index.vue
View file @
4404554c
<
template
>
<
content-w
rap>
<
ContentW
rap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -77,10 +77,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"商户编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"商户号"
align=
"center"
prop=
"no"
/>
...
...
@@ -132,7 +132,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<MerchantForm
ref=
"formRef"
@
success=
"getList"
/>
...
...
src/views/pay/order/index.vue
View file @
4404554c
...
...
@@ -49,8 +49,8 @@ const { t } = useI18n() // 国际化
// 列表相关的变量
const
[
registerTable
,
{
exportList
}]
=
useXTable
({
allSchemas
:
allSchemas
,
getListApi
:
OrderApi
.
getOrderPage
Api
,
exportListApi
:
OrderApi
.
exportOrder
Api
getListApi
:
OrderApi
.
getOrderPage
,
exportListApi
:
OrderApi
.
exportOrder
})
// ========== CRUD 相关 ==========
const
actionLoading
=
ref
(
false
)
// 遮罩层
...
...
@@ -73,7 +73,7 @@ const handleCreate = () => {
// 详情操作
const
handleDetail
=
async
(
rowId
:
number
)
=>
{
setDialogTile
(
'detail'
)
const
res
=
await
OrderApi
.
getOrder
Api
(
rowId
)
const
res
=
await
OrderApi
.
getOrder
(
rowId
)
detailData
.
value
=
res
}
</
script
>
src/views/pay/refund/index.vue
View file @
4404554c
...
...
@@ -42,8 +42,8 @@ const { t } = useI18n() // 国际化
// 列表相关的变量
const
[
registerTable
,
{
exportList
}]
=
useXTable
({
allSchemas
:
allSchemas
,
getListApi
:
RefundApi
.
getRefundPage
Api
,
exportListApi
:
RefundApi
.
exportRefund
Api
getListApi
:
RefundApi
.
getRefundPage
,
exportListApi
:
RefundApi
.
exportRefund
})
// ========== CRUD 相关 ==========
...
...
@@ -53,7 +53,7 @@ const detailData = ref() // 详情 Ref
// 详情操作
const
handleDetail
=
async
(
rowId
:
number
)
=>
{
// 设置数据
detailData
.
value
=
RefundApi
.
getRefund
Api
(
rowId
)
detailData
.
value
=
RefundApi
.
getRefund
(
rowId
)
dialogVisible
.
value
=
true
}
</
script
>
src/views/system/area/
f
orm.vue
→
src/views/system/area/
AreaF
orm.vue
View file @
4404554c
...
...
@@ -36,11 +36,11 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
()
=>
{
const
open
=
async
()
=>
{
dialogVisible
.
value
=
true
resetForm
()
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
submitForm
=
async
()
=>
{
...
...
src/views/system/area/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"地区 & IP"
url=
"https://doc.iocoder.cn/area-and-ip/"
/>
<!-- 操作栏 -->
<
content-w
rap>
<el-button
type=
"primary"
plain
@
click=
"open
Modal
()"
>
<
ContentW
rap>
<el-button
type=
"primary"
plain
@
click=
"open
Form
()"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
IP 查询
</el-button>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<div
style=
"width: 100%; height: 700px"
>
<!-- AutoResizer 自动调节大小 -->
<el-auto-resizer>
...
...
@@ -23,14 +25,14 @@
</
template
>
</el-auto-resizer>
</div>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
area-form
ref=
"modal
Ref"
/>
<
AreaForm
ref=
"form
Ref"
/>
</template>
<
script
setup
lang=
"tsx"
name=
"Area"
>
import
type
{
Column
}
from
'element-plus'
import
AreaForm
from
'./
f
orm.vue'
import
AreaForm
from
'./
AreaF
orm.vue'
import
*
as
AreaApi
from
'@/api/system/area'
// 表格的 column 字段
...
...
@@ -59,9 +61,9 @@ const getList = async () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
()
=>
{
modalRef
.
value
.
openModal
()
const
form
Ref
=
ref
()
const
open
Form
=
()
=>
{
formRef
.
value
.
open
()
}
/** 初始化 **/
...
...
src/views/system/dept/DeptForm.vue
View file @
4404554c
...
...
@@ -11,7 +11,7 @@
<el-tree-select
v-model=
"formData.parentId"
:data=
"deptTree"
:props=
"
{ value: 'id', label: 'name', children: 'children' }
"
:props=
"
defaultProps
"
value-key=
"deptId"
placeholder=
"请选择上级部门"
check-strictly
...
...
@@ -25,12 +25,7 @@
<el-input-number
v-model=
"formData.sort"
controls-position=
"right"
:min=
"0"
/>
</el-form-item>
<el-form-item
label=
"负责人"
prop=
"leaderUserId"
>
<el-select
v-model=
"formData.leaderUserId"
placeholder=
"请输入负责人"
clearable
style=
"width: 100%"
>
<el-select
v-model=
"formData.leaderUserId"
placeholder=
"请输入负责人"
clearable
>
<el-option
v-for=
"item in userList"
:key=
"item.id"
...
...
@@ -64,7 +59,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
handleTree
}
from
'@/utils/tree'
import
{
handleTree
,
defaultProps
}
from
'@/utils/tree'
import
*
as
DeptApi
from
'@/api/system/dept'
import
*
as
UserApi
from
'@/api/system/user'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
...
...
@@ -93,7 +88,8 @@ const formRules = reactive({
email
:
[{
type
:
'email'
,
message
:
'请输入正确的邮箱地址'
,
trigger
:
[
'blur'
,
'change'
]
}],
phone
:
[
{
pattern
:
/^1
[
3|4|5|6|7|8|9
][
0-9
]\d{8}
$/
,
message
:
'请输入正确的手机号码'
,
trigger
:
'blur'
}
]
],
status
:
[{
required
:
true
,
message
:
'状态不能为空'
,
trigger
:
'blur'
}]
})
const
formRef
=
ref
()
// 表单 Ref
const
deptTree
=
ref
()
// 树形结构
...
...
@@ -109,7 +105,7 @@ const open = async (type: string, id?: number) => {
if
(
id
)
{
formLoading
.
value
=
true
try
{
formData
.
value
=
await
DeptApi
.
getDept
Api
(
id
)
formData
.
value
=
await
DeptApi
.
getDept
(
id
)
}
finally
{
formLoading
.
value
=
false
}
...
...
@@ -133,10 +129,10 @@ const submitForm = async () => {
try
{
const
data
=
formData
.
value
as
unknown
as
DeptApi
.
DeptVO
if
(
formType
.
value
===
'create'
)
{
await
DeptApi
.
createDept
Api
(
data
)
await
DeptApi
.
createDept
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
}
else
{
await
DeptApi
.
updateDept
Api
(
data
)
await
DeptApi
.
updateDept
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
}
dialogVisible
.
value
=
false
...
...
src/views/system/dept/index.vue
View file @
4404554c
...
...
@@ -51,7 +51,13 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
row-key=
"id"
default-expand-all
v-if=
"refreshTable"
>
<el-table
v-loading=
"loading"
:data=
"list"
row-key=
"id"
:default-expand-all=
"isExpandAll"
v-if=
"refreshTable"
>
<el-table-column
prop=
"name"
label=
"部门名称"
width=
"260"
/>
<el-table-column
prop=
"leader"
label=
"负责人"
width=
"120"
>
<template
#
default=
"scope"
>
...
...
@@ -125,7 +131,7 @@ const userList = ref<UserApi.UserVO[]>([]) // 用户列表
const
getList
=
async
()
=>
{
loading
.
value
=
true
try
{
const
data
=
await
DeptApi
.
getDeptPage
Api
(
queryParams
)
const
data
=
await
DeptApi
.
getDeptPage
(
queryParams
)
list
.
value
=
handleTree
(
data
)
}
finally
{
loading
.
value
=
false
...
...
@@ -136,7 +142,6 @@ const getList = async () => {
const
toggleExpandAll
=
()
=>
{
refreshTable
.
value
=
false
isExpandAll
.
value
=
!
isExpandAll
.
value
console
.
log
(
isExpandAll
.
value
)
nextTick
(()
=>
{
refreshTable
.
value
=
true
})
...
...
@@ -166,7 +171,7 @@ const handleDelete = async (id: number) => {
// 删除的二次确认
await
message
.
delConfirm
()
// 发起删除
await
DeptApi
.
deleteDept
Api
(
id
)
await
DeptApi
.
deleteDept
(
id
)
message
.
success
(
t
(
'common.delSuccess'
))
// 刷新列表
await
getList
()
...
...
src/views/system/dict/
f
orm.vue
→
src/views/system/dict/
DictTypeF
orm.vue
View file @
4404554c
...
...
@@ -20,14 +20,14 @@
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"formData.status"
>
<el-radio
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"parseInt(dict.value)"
:label=
"parseInt(dict.value)"
>
{{
dict
.
label
}}
</el-radio
v-for=
"dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"formData.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
...
...
@@ -39,10 +39,9 @@
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
*
as
DictTypeApi
from
'@/api/system/dict/dict.type'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -64,7 +63,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -79,7 +78,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/system/dict/data
.f
orm.vue
→
src/views/system/dict/data
/DictDataF
orm.vue
View file @
4404554c
...
...
@@ -26,11 +26,12 @@
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"formData.status"
>
<el-radio
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"parseInt(dict.value)"
:label=
"parseInt(dict.value)"
>
{{
dict
.
label
}}
</el-radio
v-for=
"dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"颜色类型"
prop=
"colorType"
>
...
...
@@ -57,7 +58,7 @@
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
*
as
DictDataApi
from
'@/api/system/dict/dict.data'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -114,7 +115,7 @@ const colorTypeOptions = readonly([
])
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -129,7 +130,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/system/dict/data.vue
→
src/views/system/dict/data
/index
.vue
View file @
4404554c
<
template
>
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -9,7 +9,12 @@
>
<el-form-item
label=
"字典名称"
prop=
"dictType"
>
<el-select
v-model=
"queryParams.dictType"
class=
"!w-240px"
>
<el-option
v-for=
"item in dicts"
:key=
"item.type"
:label=
"item.name"
:value=
"item.type"
/>
<el-option
v-for=
"item in dictTypeList"
:key=
"item.type"
:label=
"item.name"
:value=
"item.type"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"字典标签"
prop=
"label"
>
...
...
@@ -24,7 +29,7 @@
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"数据状态"
clearable
class=
"!w-240px"
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
...
...
@@ -34,7 +39,12 @@
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"openModal('create')"
v-hasPermi=
"['system:dict:create']"
>
<el-button
type=
"primary"
plain
@
click=
"openForm('create')"
v-hasPermi=
"['system:dict:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
...
...
@@ -48,10 +58,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"字典编码"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"字典标签"
align=
"center"
prop=
"label"
/>
...
...
@@ -77,7 +87,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['system:dict:update']"
>
修改
...
...
@@ -100,18 +110,18 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
data-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
DictDataForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"Data"
>
<
script
setup
lang=
"ts"
name=
"DictData"
>
import
{
getIntDictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
DictDataApi
from
'@/api/system/dict/dict.data'
import
*
as
DictTypeApi
from
'@/api/system/dict/dict.type'
import
{
getDictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
import
download
from
'@/utils/download'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
DataForm
from
'./data.form.vue'
import
DictDataForm
from
'./DictDataForm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
const
route
=
useRoute
()
// 路由
...
...
@@ -128,7 +138,7 @@ const queryParams = reactive({
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
const
dict
s
=
ref
<
DictTypeApi
.
DictTypeVO
[]
>
()
// 字典类型的列表
const
dict
TypeList
=
ref
<
DictTypeApi
.
DictTypeVO
[]
>
()
// 字典类型的列表
/** 查询列表 */
const
getList
=
async
()
=>
{
...
...
@@ -155,9 +165,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
@@ -188,15 +198,10 @@ const handleExport = async () => {
}
}
/** 查询字典(精简)列表 */
const
getDictList
=
async
()
=>
{
dicts
.
value
=
await
DictTypeApi
.
getSimpleDictTypeList
()
}
/** 初始化 **/
onMounted
(()
=>
{
getList
()
onMounted
(
async
()
=>
{
await
getList
()
// 查询字典(精简)列表
getDict
List
()
dictTypeList
.
value
=
await
DictTypeApi
.
getSimpleDictType
List
()
})
</
script
>
src/views/system/dict/index.vue
View file @
4404554c
<
template
>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -27,10 +27,15 @@
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"字典状态"
clearable
class=
"!w-240px"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择字典状态"
clearable
class=
"!w-240px"
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"dict.value"
/>
...
...
@@ -53,7 +58,7 @@
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['system:dict:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
...
...
@@ -69,10 +74,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"字典编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"字典名称"
align=
"center"
prop=
"name"
show-overflow-tooltip
/>
...
...
@@ -95,7 +100,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['system:dict:update']"
>
修改
...
...
@@ -121,17 +126,17 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
dict-type-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
DictTypeForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"Dict"
>
import
{
getDictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
<
script
setup
lang=
"ts"
name=
"Dict
Type
"
>
import
{
get
Int
DictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
DictTypeApi
from
'@/api/system/dict/dict.type'
import
DictTypeForm
from
'./
f
orm.vue'
import
DictTypeForm
from
'./
DictTypeF
orm.vue'
import
download
from
'@/utils/download'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -175,9 +180,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/system/errorCode/
f
orm.vue
→
src/views/system/errorCode/
ErrorCodeF
orm.vue
View file @
4404554c
...
...
@@ -53,7 +53,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -62,13 +62,13 @@ const openModal = async (type: string, id?: number) => {
if
(
id
)
{
formLoading
.
value
=
true
try
{
formData
.
value
=
await
ErrorCodeApi
.
getErrorCode
Api
(
id
)
formData
.
value
=
await
ErrorCodeApi
.
getErrorCode
(
id
)
}
finally
{
formLoading
.
value
=
false
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
@@ -82,10 +82,10 @@ const submitForm = async () => {
try
{
const
data
=
formData
.
value
as
ErrorCodeApi
.
ErrorCodeVO
if
(
formType
.
value
===
'create'
)
{
await
ErrorCodeApi
.
createErrorCode
Api
(
data
)
await
ErrorCodeApi
.
createErrorCode
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
}
else
{
await
ErrorCodeApi
.
updateErrorCode
Api
(
data
)
await
ErrorCodeApi
.
updateErrorCode
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
}
dialogVisible
.
value
=
false
...
...
src/views/system/errorCode/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"异常处理(错误码)"
url=
"https://doc.iocoder.cn/exception/"
/>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -11,7 +13,7 @@
<el-form-item
label=
"错误码类型"
prop=
"type"
>
<el-select
v-model=
"queryParams.type"
placeholder=
"请选择错误码类型"
clearable
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE)"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
...
...
@@ -34,6 +36,7 @@
placeholder=
"请输入错误码编码"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"错误码提示"
prop=
"message"
>
...
...
@@ -62,7 +65,7 @@
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['system:error-code:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
...
...
@@ -78,10 +81,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
width=
"80"
>
...
...
@@ -105,7 +108,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['system:error-code:update']"
>
编辑
...
...
@@ -128,30 +131,25 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
error-code-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
ErrorCodeForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"ErrorCode"
>
import
*
as
ErrorCodeApi
from
'@/api/system/errorCode'
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
ErrorCodeForm
from
'./form.vue'
import
download
from
'@/utils/download'
import
*
as
ErrorCodeApi
from
'@/api/system/errorCode'
import
ErrorCodeForm
from
'./ErrorCodeForm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
// 遮罩层
const
loading
=
ref
(
true
)
// 导出遮罩层
const
exportLoading
=
ref
(
false
)
// 总条数
const
total
=
ref
(
0
)
// 错误码列表
const
list
=
ref
([])
// 查询参数
const
loading
=
ref
(
true
)
// 遮罩层
const
exportLoading
=
ref
(
false
)
// 导出遮罩层
const
total
=
ref
(
0
)
// 总条数
const
list
=
ref
([])
// 错误码列表
const
queryParams
=
reactive
({
pageNo
:
1
,
pageSize
:
10
,
...
...
@@ -161,15 +159,13 @@ const queryParams = reactive({
message
:
undefined
,
createTime
:
[]
})
// 搜索的表单
const
queryFormRef
=
ref
()
const
queryFormRef
=
ref
()
// 搜索的表单
/** 查询列表 */
const
getList
=
async
()
=>
{
loading
.
value
=
true
// 执行查询
try
{
const
data
=
await
ErrorCodeApi
.
getErrorCodePage
Api
(
queryParams
)
const
data
=
await
ErrorCodeApi
.
getErrorCodePage
(
queryParams
)
list
.
value
=
data
.
list
total
.
value
=
data
.
total
}
finally
{
...
...
@@ -190,9 +186,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
@@ -200,7 +196,7 @@ const handleDelete = async (id: number) => {
try
{
// 删除的二次确认
await
message
.
delConfirm
()
await
ErrorCodeApi
.
deleteErrorCode
Api
(
id
)
await
ErrorCodeApi
.
deleteErrorCode
(
id
)
message
.
success
(
t
(
'common.delSuccess'
))
// 刷新列表
await
getList
()
...
...
@@ -214,7 +210,7 @@ const handleExport = async () => {
await
message
.
exportConfirm
()
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
ErrorCodeApi
.
excelErrorCode
Api
(
queryParams
)
const
data
=
await
ErrorCodeApi
.
excelErrorCode
(
queryParams
)
download
.
excel
(
data
,
'错误码.xls'
)
}
catch
{
}
finally
{
...
...
src/views/system/loginlog/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"系统日志"
url=
"https://doc.iocoder.cn/system-log/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -51,10 +53,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"日志编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"操作类型"
align=
"center"
prop=
"logType"
>
...
...
@@ -97,7 +99,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<LoginLogDetail
ref=
"detailRef"
/>
...
...
src/views/system/mail/account/
f
orm.vue
→
src/views/system/mail/account/
MailAccountF
orm.vue
View file @
4404554c
...
...
@@ -10,7 +10,6 @@
<
script
setup
lang=
"ts"
>
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
import
{
rules
,
allSchemas
}
from
'./account.data'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -21,7 +20,7 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -36,7 +35,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/system/mail/account/account.data.ts
View file @
4404554c
import
type
{
CrudSchema
}
from
'@/hooks/web/useCrudSchemas'
import
{
dateFormatter
}
from
'@/utils/formatTime'
const
{
t
}
=
useI18n
()
// 国际化
// 表单校验
...
...
src/views/system/mail/account/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"邮件配置"
url=
"https://doc.iocoder.cn/mail"
/>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<Search
:schema=
"allSchemas.searchSchema"
@
search=
"setSearchParams"
@
reset=
"setSearchParams"
>
<!-- 新增等操作按钮 -->
<template
#
actionMore
>
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['system:mail-account:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
</
template
>
</Search>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<Table
:columns=
"allSchemas.tableColumns"
:data=
"tableObject.tableList"
...
...
@@ -32,7 +34,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', row.id)"
@
click=
"open
Form
('update', row.id)"
v-hasPermi=
"['system:mail-account:update']"
>
编辑
...
...
@@ -47,15 +49,15 @@
</el-button>
</
template
>
</Table>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
mail-account-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
MailAccountForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
name=
"MailAccount"
>
import
{
allSchemas
}
from
'./account.data'
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
import
MailAccountForm
from
'./
f
orm.vue'
import
MailAccountForm
from
'./
MailAccountF
orm.vue'
// tableObject:表格的属性对象,可获得分页大小、条数等属性
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
...
...
@@ -68,9 +70,9 @@ const { tableObject, tableMethods } = useTable({
const
{
getList
,
setSearchParams
}
=
tableMethods
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/system/mail/log/
d
etail.vue
→
src/views/system/mail/log/
MailLogD
etail.vue
View file @
4404554c
...
...
@@ -17,7 +17,7 @@ const detailLoading = ref(false) // 表单的加载中
const
detailData
=
ref
()
// 详情数据
/** 打开弹窗 */
const
open
Modal
=
async
(
id
:
number
)
=>
{
const
open
=
async
(
id
:
number
)
=>
{
dialogVisible
.
value
=
true
// 设置数据
detailLoading
.
value
=
true
...
...
@@ -27,5 +27,5 @@ const openModal = async (id: number) => {
detailLoading
.
value
=
false
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
</
script
>
src/views/system/mail/log/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"邮件配置"
url=
"https://doc.iocoder.cn/mail"
/>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<Search
:schema=
"allSchemas.searchSchema"
@
search=
"setSearchParams"
@
reset=
"setSearchParams"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<Table
:columns=
"allSchemas.tableColumns"
:data=
"tableObject.tableList"
...
...
@@ -20,22 +22,22 @@
<el-button
link
type=
"primary"
@
click=
"open
Moda
l(row.id)"
@
click=
"open
Detai
l(row.id)"
v-hasPermi=
"['system:mail-log:query']"
>
详情
</el-button>
</
template
>
</Table>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<mail-log-detail
ref=
"
moda
lRef"
/>
<mail-log-detail
ref=
"
detai
lRef"
/>
</template>
<
script
setup
lang=
"ts"
name=
"MailLog"
>
import
{
allSchemas
}
from
'./log.data'
import
*
as
MailLogApi
from
'@/api/system/mail/log'
import
MailLogDetail
from
'./
d
etail.vue'
import
MailLogDetail
from
'./
MailLogD
etail.vue'
// tableObject:表格的属性对象,可获得分页大小、条数等属性
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
...
...
@@ -47,9 +49,9 @@ const { tableObject, tableMethods } = useTable({
const
{
getList
,
setSearchParams
}
=
tableMethods
/** 详情操作 */
const
moda
lRef
=
ref
()
const
open
Moda
l
=
(
id
:
number
)
=>
{
modalRef
.
value
.
openModal
(
id
)
const
detai
lRef
=
ref
()
const
open
Detai
l
=
(
id
:
number
)
=>
{
detailRef
.
value
.
open
(
id
)
}
/** 初始化 **/
...
...
src/views/system/mail/log/log.data.ts
View file @
4404554c
...
...
@@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
// 邮箱账号的列表
const
account
s
=
await
MailAccountApi
.
getSimpleMailAccountList
()
const
account
List
=
await
MailAccountApi
.
getSimpleMailAccountList
()
// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
const
crudSchemas
=
reactive
<
CrudSchema
[]
>
([
...
...
@@ -74,7 +74,7 @@ const crudSchemas = reactive<CrudSchema[]>([
search
:
{
show
:
true
,
component
:
'Select'
,
api
:
()
=>
account
s
,
api
:
()
=>
account
List
,
componentProps
:
{
optionsAlias
:
{
labelField
:
'mail'
,
...
...
src/views/system/mail/template/
f
orm.vue
→
src/views/system/mail/template/
MailTemplateF
orm.vue
View file @
4404554c
...
...
@@ -16,7 +16,6 @@
<
script
setup
lang=
"ts"
>
import
*
as
MailTemplateApi
from
'@/api/system/mail/template'
import
{
allSchemas
,
rules
}
from
'./template.data'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -27,7 +26,7 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -42,7 +41,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/system/mail/template/
send
.vue
→
src/views/system/mail/template/
MailTemplateSendForm
.vue
View file @
4404554c
...
...
@@ -33,7 +33,6 @@
</template>
<
script
setup
lang=
"ts"
>
import
*
as
MailTemplateApi
from
'@/api/system/mail/template'
const
message
=
useMessage
()
// 消息弹窗
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
...
...
@@ -53,7 +52,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
id
:
number
)
=>
{
const
open
=
async
(
id
:
number
)
=>
{
dialogVisible
.
value
=
true
resetForm
()
// 设置数据
...
...
@@ -76,7 +75,7 @@ const openModal = async (id: number) => {
formLoading
.
value
=
false
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
submitForm
=
async
()
=>
{
...
...
src/views/system/mail/template/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"邮件配置"
url=
"https://doc.iocoder.cn/mail"
/>
<!-- 搜索工作栏 -->
<
content-w
rap>
<
ContentW
rap>
<Search
:schema=
"allSchemas.searchSchema"
@
search=
"setSearchParams"
@
reset=
"setSearchParams"
>
<!-- 新增等操作按钮 -->
<template
#
actionMore
>
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['system:mail-account:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
</
template
>
</Search>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<Table
:columns=
"allSchemas.tableColumns"
:data=
"tableObject.tableList"
...
...
@@ -32,7 +34,7 @@
<el-button
link
type=
"primary"
@
click=
"openSend(row.id)"
@
click=
"openSend
Form
(row.id)"
v-hasPermi=
"['system:mail-template:send-mail']"
>
测试
...
...
@@ -40,7 +42,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', row.id)"
@
click=
"open
Form
('update', row.id)"
v-hasPermi=
"['system:mail-template:update']"
>
编辑
...
...
@@ -55,19 +57,19 @@
</el-button>
</
template
>
</Table>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
mail-template-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
MailTemplateForm
ref=
"form
Ref"
@
success=
"getList"
/>
<!-- 表单弹窗:发送测试 -->
<
mail-template-send
ref=
"send
Ref"
/>
<
MailTemplateSendForm
ref=
"sendForm
Ref"
/>
</template>
<
script
setup
lang=
"ts"
name=
"MailTemplate"
>
import
{
allSchemas
}
from
'./template.data'
import
*
as
MailTemplateApi
from
'@/api/system/mail/template'
import
MailTemplateForm
from
'./
f
orm.vue'
import
MailTemplateSend
from
'./send
.vue'
import
MailTemplateForm
from
'./
MailTemplateF
orm.vue'
import
MailTemplateSend
Form
from
'./MailTemplateSendForm
.vue'
// tableObject:表格的属性对象,可获得分页大小、条数等属性
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
...
...
@@ -80,9 +82,9 @@ const { tableObject, tableMethods } = useTable({
const
{
getList
,
setSearchParams
}
=
tableMethods
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
@@ -91,9 +93,9 @@ const handleDelete = (id: number) => {
}
/** 发送测试操作 */
const
sendRef
=
ref
()
const
openSend
=
(
id
:
number
)
=>
{
send
Ref
.
value
.
openModal
(
id
)
const
send
Form
Ref
=
ref
()
const
openSend
Form
=
(
id
:
number
)
=>
{
send
FormRef
.
value
.
open
(
id
)
}
/** 初始化 **/
...
...
src/views/system/mail/template/template.data.ts
View file @
4404554c
...
...
@@ -4,7 +4,7 @@ import { TableColumn } from '@/types/table'
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
// 邮箱账号的列表
const
account
s
=
await
MailAccountApi
.
getSimpleMailAccountList
()
const
account
List
=
await
MailAccountApi
.
getSimpleMailAccountList
()
// 表单校验
export
const
rules
=
reactive
({
...
...
@@ -49,12 +49,12 @@ const crudSchemas = reactive<CrudSchema[]>([
field
:
'accountId'
,
width
:
'200px'
,
formatter
:
(
_
:
Recordable
,
__
:
TableColumn
,
cellValue
:
number
)
=>
{
return
account
s
.
find
((
account
)
=>
account
.
id
===
cellValue
)?.
mail
return
account
List
.
find
((
account
)
=>
account
.
id
===
cellValue
)?.
mail
},
search
:
{
show
:
true
,
component
:
'Select'
,
api
:
()
=>
account
s
,
api
:
()
=>
account
List
,
componentProps
:
{
optionsAlias
:
{
labelField
:
'mail'
,
...
...
@@ -64,7 +64,7 @@ const crudSchemas = reactive<CrudSchema[]>([
},
form
:
{
component
:
'Select'
,
api
:
()
=>
account
s
,
api
:
()
=>
account
List
,
componentProps
:
{
optionsAlias
:
{
labelField
:
'mail'
,
...
...
src/views/system/menu/MenuForm.vue
View file @
4404554c
...
...
@@ -163,7 +163,7 @@ const open = async (type: string, id?: number, parentId?: number) => {
if
(
id
)
{
formLoading
.
value
=
true
try
{
formData
.
value
=
await
MenuApi
.
getMenu
Api
(
id
)
formData
.
value
=
await
MenuApi
.
getMenu
(
id
)
}
finally
{
formLoading
.
value
=
false
}
...
...
src/views/system/menu/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"功能权限"
url=
"https://doc.iocoder.cn/resource-permission"
/>
<doc-alert
title=
"菜单路由"
url=
"https://doc.iocoder.cn/vue2/route/"
/>
<!-- 搜索工作栏 -->
<ContentWrap>
<el-form
...
...
src/views/system/notice/
f
orm.vue
→
src/views/system/notice/
NoticeF
orm.vue
View file @
4404554c
...
...
@@ -16,7 +16,7 @@
<el-form-item
label=
"公告类型"
prop=
"type"
>
<el-select
v-model=
"formData.type"
placeholder=
"请选择公告类型"
clearable
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE)"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE)"
:key=
"parseInt(dict.value)"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
...
...
@@ -26,7 +26,7 @@
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"formData.status"
placeholder=
"请选择状态"
clearable
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"parseInt(dict.value)"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
...
...
@@ -44,7 +44,8 @@
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
import
*
as
NoticeApi
from
'@/api/system/notice'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -58,7 +59,7 @@ const formData = ref({
title
:
''
,
type
:
undefined
,
content
:
''
,
status
:
undefined
,
status
:
CommonStatusEnum
.
ENABLE
,
remark
:
''
})
const
formRules
=
reactive
({
...
...
@@ -70,7 +71,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -85,7 +86,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
@@ -120,7 +121,7 @@ const resetForm = () => {
title
:
''
,
type
:
undefined
,
content
:
''
,
status
:
undefined
,
status
:
CommonStatusEnum
.
ENABLE
,
remark
:
''
}
formRef
.
value
?.
resetFields
()
...
...
src/views/system/notice/index.vue
View file @
4404554c
<
template
>
<
content-w
rap>
<
ContentW
rap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -25,10 +25,10 @@
class=
"!w-240px"
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"
parseInt(dict.value)
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -38,17 +38,17 @@
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['system:notice:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"公告编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"公告标题"
align=
"center"
prop=
"title"
/>
...
...
@@ -74,7 +74,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['system:notice:update']"
>
编辑
...
...
@@ -97,17 +97,16 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<
notice-form
ref=
"modal
Ref"
@
success=
"getList"
/>
<
NoticeForm
ref=
"form
Ref"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"tsx"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
NoticeApi
from
'@/api/system/notice'
import
{
DictTag
}
from
'@/components/DictTag'
import
NoticeForm
from
'./form.vue'
import
NoticeForm
from
'./NoticeForm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
@@ -148,9 +147,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
modal
Ref
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
type
,
id
)
const
form
Ref
=
ref
()
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/system/notify/message/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"站内信配置"
url=
"https://doc.iocoder.cn/notify/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -72,10 +74,10 @@
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"用户类型"
align=
"center"
prop=
"userType"
>
...
...
@@ -146,7 +148,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<NotifyMessageDetail
ref=
"detailRef"
/>
...
...
src/views/system/notify/my/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"站内信配置"
url=
"https://doc.iocoder.cn/notify/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -45,10 +47,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<
content-wrap
>
<!-- 列表 --
>
<
!-- 列表 --
>
<ContentWrap
>
<el-table
v-loading=
"loading"
:data=
"list"
...
...
@@ -107,7 +109,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<MyNotifyMessageDetail
ref=
"detailRef"
/>
...
...
src/views/system/oauth2/client/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"OAuth 2.0(SSO 单点登录)"
url=
"https://doc.iocoder.cn/oauth2/"
/>
<!-- 搜索 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -40,10 +42,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"客户端编号"
align=
"center"
prop=
"clientId"
/>
<el-table-column
label=
"客户端密钥"
align=
"center"
prop=
"secret"
/>
...
...
@@ -71,6 +73,7 @@
:key=
"index"
v-for=
"(authorizedGrantType, index) in scope.row.authorizedGrantTypes"
:index=
"index"
class=
"mr-5px"
>
{{
authorizedGrantType
}}
</el-tag>
...
...
@@ -111,7 +114,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:添加/修改 -->
<ClientForm
ref=
"formRef"
@
success=
"getList"
/>
...
...
src/views/system/oauth2/token/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"OAuth 2.0(SSO 单点登录)"
url=
"https://doc.iocoder.cn/oauth2/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -46,10 +48,10 @@
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"访问令牌"
align=
"center"
prop=
"accessToken"
width=
"300"
/>
<el-table-column
label=
"刷新令牌"
align=
"center"
prop=
"refreshToken"
width=
"300"
/>
...
...
@@ -93,7 +95,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
</template>
<
script
setup
lang=
"ts"
name=
"Oauth2AccessToken"
>
...
...
src/views/system/operatelog/
d
etail.vue
→
src/views/system/operatelog/
OperateLogD
etail.vue
View file @
4404554c
...
...
@@ -66,7 +66,7 @@ const detailLoading = ref(false) // 表单的加载中
const
detailData
=
ref
()
// 详情数据
/** 打开弹窗 */
const
open
Modal
=
async
(
data
:
OperateLogApi
.
OperateLogVO
)
=>
{
const
open
=
async
(
data
:
OperateLogApi
.
OperateLogVO
)
=>
{
dialogVisible
.
value
=
true
// 设置数据
detailLoading
.
value
=
true
...
...
@@ -76,5 +76,5 @@ const openModal = async (data: OperateLogApi.OperateLogVO) => {
detailLoading
.
value
=
false
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
</
script
>
src/views/system/operatelog/index.vue
View file @
4404554c
<
template
>
<content-wrap>
<doc-alert
title=
"系统日志"
url=
"https://doc.iocoder.cn/system-log/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15px"
...
...
@@ -34,10 +36,10 @@
class=
"!w-240px"
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"
parseInt(dict.value)
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -77,10 +79,10 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"日志编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"操作模块"
align=
"center"
prop=
"module"
width=
"180"
/>
...
...
@@ -113,7 +115,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Moda
l(scope.row)"
@
click=
"open
Detai
l(scope.row)"
v-hasPermi=
"['infra:config:query']"
>
详情
...
...
@@ -128,17 +130,17 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<
operate-log-detail
ref=
"moda
lRef"
/>
<
OperateLogDetail
ref=
"detai
lRef"
/>
</template>
<
script
setup
lang=
"ts"
name=
"OperateLog"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
OperateLogApi
from
'@/api/system/operatelog'
import
OperateLogDetail
from
'./
d
etail.vue'
import
OperateLogDetail
from
'./
OperateLogD
etail.vue'
const
message
=
useMessage
()
// 消息弹窗
const
loading
=
ref
(
true
)
// 列表的加载中
...
...
@@ -181,9 +183,9 @@ const resetQuery = () => {
}
/** 详情操作 */
const
moda
lRef
=
ref
()
const
open
Moda
l
=
(
data
:
OperateLogApi
.
OperateLogVO
)
=>
{
modalRef
.
value
.
openModal
(
data
)
const
detai
lRef
=
ref
()
const
open
Detai
l
=
(
data
:
OperateLogApi
.
OperateLogVO
)
=>
{
detailRef
.
value
.
open
(
data
)
}
/** 导出按钮操作 */
...
...
src/views/system/post/PostForm.vue
View file @
4404554c
...
...
@@ -16,10 +16,10 @@
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"formData.status"
placeholder=
"请选择状态"
clearable
>
<el-option
v-for=
"dict in getDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"
parseInt(dict.value)
"
v-for=
"dict in get
Int
DictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"
dict.value
"
:label=
"dict.label"
:value=
"
parseInt(dict.value)
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -34,7 +34,7 @@
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
get
Int
DictOptions
}
from
'@/utils/dict'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
import
*
as
PostApi
from
'@/api/system/post'
...
...
@@ -62,7 +62,7 @@ const formRules = reactive({
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
Modal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
open
=
async
(
type
:
string
,
id
?:
number
)
=>
{
dialogVisible
.
value
=
true
dialogTitle
.
value
=
t
(
'action.'
+
type
)
formType
.
value
=
type
...
...
@@ -77,7 +77,7 @@ const openModal = async (type: string, id?: number) => {
}
}
}
defineExpose
({
open
Modal
})
// 提供 openModal
方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open
方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
...
...
src/views/system/post/index.vue
View file @
4404554c
...
...
@@ -40,7 +40,7 @@
<el-button
type=
"primary"
plain
@
click=
"open
Modal
('create')"
@
click=
"open
Form
('create')"
v-hasPermi=
"['system:notice:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
...
...
@@ -60,7 +60,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"岗位编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"岗位名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"岗位编码"
align=
"center"
prop=
"code"
/>
...
...
@@ -83,7 +83,7 @@
<el-button
link
type=
"primary"
@
click=
"open
Modal
('update', scope.row.id)"
@
click=
"open
Form
('update', scope.row.id)"
v-hasPermi=
"['system:post:update']"
>
编辑
...
...
@@ -160,8 +160,8 @@ const resetQuery = () => {
/** 添加/修改操作 */
const
formRef
=
ref
()
const
open
Modal
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
Modal
(
type
,
id
)
const
open
Form
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
...
...
src/views/system/role/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"功能权限"
url=
"https://doc.iocoder.cn/resource-permission"
/>
<doc-alert
title=
"数据权限"
url=
"https://doc.iocoder.cn/data-permission"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
...
...
src/views/system/sms/channel/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"短信配置"
url=
"https://doc.iocoder.cn/sms/"
/>
<ContentWrap>
<el-form
class=
"-mb-15px"
...
...
@@ -52,7 +54,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"短信签名"
align=
"center"
prop=
"signature"
/>
<el-table-column
label=
"渠道编码"
align=
"center"
prop=
"code"
>
...
...
src/views/system/sms/log/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"短信配置"
url=
"https://doc.iocoder.cn/sms/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
...
...
src/views/system/sms/template/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"短信配置"
url=
"https://doc.iocoder.cn/sms/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
...
...
@@ -111,7 +113,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"模板编码"
align=
"center"
...
...
src/views/system/tenant/
f
orm.vue
→
src/views/system/tenant/
TenantF
orm.vue
View file @
4404554c
File moved
src/views/system/tenant/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"SaaS 多租户"
url=
"https://doc.iocoder.cn/saas-tenant/"
/>
<!-- 搜索 -->
<ContentWrap>
<el-form
...
...
@@ -96,15 +98,15 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"租户编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"租户名"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"租户套餐"
align=
"center"
prop=
"packageId"
>
<template
#
default=
"scope"
>
<el-tag
v-if=
"scope.row.packageId === 0"
type=
"danger"
>
系统租户
</el-tag>
<template
v-else
v-for=
"item in packageList"
>
<el-tag
type=
"success"
:key=
"item.id"
v-if=
"item.id === scope.row.packageId"
>
{{
item
.
name
}}
<el-tag
type=
"success"
:key=
"item.id"
v-if=
"item.id === scope.row.packageId"
>
{{
item
.
name
}}
</el-tag>
</
template
>
</template>
...
...
@@ -175,7 +177,7 @@ import { dateFormatter } from '@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
TenantApi
from
'@/api/system/tenant'
import
*
as
TenantPackageApi
from
'@/api/system/tenantPackage'
import
TenantForm
from
'./
f
orm.vue'
import
TenantForm
from
'./
TenantF
orm.vue'
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
...
...
src/views/system/tenantPackage/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"SaaS 多租户"
url=
"https://doc.iocoder.cn/saas-tenant/"
/>
<!-- 搜索 -->
<ContentWrap>
<el-form
...
...
@@ -55,7 +57,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
align=
"center"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"套餐编号"
align=
"center"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"套餐名"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
width=
"100"
>
...
...
src/views/system/user/index.vue
View file @
4404554c
<
template
>
<doc-alert
title=
"用户体系"
url=
"https://doc.iocoder.cn/user-center/"
/>
<doc-alert
title=
"三方登陆"
url=
"https://doc.iocoder.cn/social-user/"
/>
<doc-alert
title=
"Excel 导入导出"
url=
"https://doc.iocoder.cn/excel-import-and-export/"
/>
<el-row
:gutter=
"20"
>
<!-- 左侧部门树 -->
<el-col
:span=
"4"
:xs=
"24"
>
<
content-w
rap
class=
"h-1/1"
>
<
ContentW
rap
class=
"h-1/1"
>
<DeptTree
@
node-click=
"handleDeptNodeClick"
/>
</
content-w
rap>
</
ContentW
rap>
</el-col>
<el-col
:span=
"20"
:xs=
"24"
>
<!-- 搜索 -->
<
content-w
rap>
<
ContentW
rap>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
...
...
@@ -89,8 +93,8 @@
</el-button>
</el-form-item>
</el-form>
</
content-w
rap>
<
content-w
rap>
</
ContentW
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"用户编号"
align=
"center"
key=
"id"
prop=
"id"
/>
<el-table-column
...
...
@@ -183,7 +187,7 @@
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</
content-w
rap>
</
ContentW
rap>
</el-col>
</el-row>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment