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
379ca237
authored
Apr 12, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码优化】移除无用的,优化代码排版
parent
3f5681be
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
15 additions
and
64 deletions
+15
-64
src/api/infra/codegen/index.ts
+0
-15
src/api/infra/file/index.ts
+1
-7
src/api/login/index.ts
+0
-2
src/components/FormCreate/src/components/useApiSelect.tsx
+3
-14
src/components/FormCreate/src/useFormCreateDesigner.ts
+1
-1
src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue
+0
-1
src/components/bpmnProcessDesigner/package/utils.ts
+0
-1
src/utils/constants.ts
+2
-2
src/utils/index.ts
+0
-15
src/views/Login/components/LoginForm.vue
+2
-2
src/views/bpm/model/CategoryDraggableModel.vue
+0
-1
src/views/infra/codegen/ImportTable.vue
+6
-2
src/views/iot/thingmodel/ThingModelForm.vue
+0
-1
No files found.
src/api/infra/codegen/index.ts
View file @
379ca237
...
@@ -46,11 +46,6 @@ export type DatabaseTableVO = {
...
@@ -46,11 +46,6 @@ export type DatabaseTableVO = {
comment
:
string
comment
:
string
}
}
export
type
CodegenDetailVO
=
{
table
:
CodegenTableVO
columns
:
CodegenColumnVO
[]
}
export
type
CodegenPreviewVO
=
{
export
type
CodegenPreviewVO
=
{
filePath
:
string
filePath
:
string
code
:
string
code
:
string
...
@@ -61,11 +56,6 @@ export type CodegenUpdateReqVO = {
...
@@ -61,11 +56,6 @@ export type CodegenUpdateReqVO = {
columns
:
CodegenColumnVO
[]
columns
:
CodegenColumnVO
[]
}
}
export
type
CodegenCreateListReqVO
=
{
dataSourceConfigId
:
number
tableNames
:
string
[]
}
// 查询列表代码生成表定义
// 查询列表代码生成表定义
export
const
getCodegenTableList
=
(
dataSourceConfigId
:
number
)
=>
{
export
const
getCodegenTableList
=
(
dataSourceConfigId
:
number
)
=>
{
return
request
.
get
({
url
:
'/infra/codegen/table/list?dataSourceConfigId='
+
dataSourceConfigId
})
return
request
.
get
({
url
:
'/infra/codegen/table/list?dataSourceConfigId='
+
dataSourceConfigId
})
...
@@ -81,11 +71,6 @@ export const getCodegenTable = (id: number) => {
...
@@ -81,11 +71,6 @@ export const getCodegenTable = (id: number) => {
return
request
.
get
({
url
:
'/infra/codegen/detail?tableId='
+
id
})
return
request
.
get
({
url
:
'/infra/codegen/detail?tableId='
+
id
})
}
}
// 新增代码生成表定义
export
const
createCodegenTable
=
(
data
:
CodegenCreateListReqVO
)
=>
{
return
request
.
post
({
url
:
'/infra/codegen/create'
,
data
})
}
// 修改代码生成表定义
// 修改代码生成表定义
export
const
updateCodegenTable
=
(
data
:
CodegenUpdateReqVO
)
=>
{
export
const
updateCodegenTable
=
(
data
:
CodegenUpdateReqVO
)
=>
{
return
request
.
put
({
url
:
'/infra/codegen/update'
,
data
})
return
request
.
put
({
url
:
'/infra/codegen/update'
,
data
})
...
...
src/api/infra/file/index.ts
View file @
379ca237
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
export
interface
FilePageReqVO
extends
PageParam
{
path
?:
string
type
?:
string
createTime
?:
Date
[]
}
// 文件预签名地址 Response VO
// 文件预签名地址 Response VO
export
interface
FilePresignedUrlRespVO
{
export
interface
FilePresignedUrlRespVO
{
// 文件配置编号
// 文件配置编号
...
@@ -17,7 +11,7 @@ export interface FilePresignedUrlRespVO {
...
@@ -17,7 +11,7 @@ export interface FilePresignedUrlRespVO {
}
}
// 查询文件列表
// 查询文件列表
export
const
getFilePage
=
(
params
:
FilePageReqVO
)
=>
{
export
const
getFilePage
=
(
params
:
PageParam
)
=>
{
return
request
.
get
({
url
:
'/infra/file/page'
,
params
})
return
request
.
get
({
url
:
'/infra/file/page'
,
params
})
}
}
...
...
src/api/login/index.ts
View file @
379ca237
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
getRefreshToken
}
from
'@/utils/auth'
import
type
{
RegisterVO
,
UserLoginVO
}
from
'./types'
import
type
{
RegisterVO
,
UserLoginVO
}
from
'./types'
export
interface
SmsCodeVO
{
export
interface
SmsCodeVO
{
...
@@ -72,7 +71,6 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
...
@@ -72,7 +71,6 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
}
}
// 获取验证图片以及 token
// 获取验证图片以及 token
export
const
getCode
=
(
data
:
any
)
=>
{
export
const
getCode
=
(
data
:
any
)
=>
{
debugger
return
request
.
postOriginal
({
url
:
'system/captcha/get'
,
data
})
return
request
.
postOriginal
({
url
:
'system/captcha/get'
,
data
})
}
}
...
...
src/components/FormCreate/src/components/useApiSelect.tsx
View file @
379ca237
...
@@ -74,18 +74,12 @@ export const useApiSelect = (option: ApiSelectProps) => {
...
@@ -74,18 +74,12 @@ export const useApiSelect = (option: ApiSelectProps) => {
case
'GET'
:
case
'GET'
:
let
url
:
string
=
props
.
url
let
url
:
string
=
props
.
url
if
(
props
.
remote
)
{
if
(
props
.
remote
)
{
if
(
queryParam
.
value
!=
undefined
)
if
(
queryParam
.
value
!=
undefined
)
{
{
if
(
url
.
includes
(
'?'
))
{
if
(
checkUrl
(
url
))
{
url
=
`
${
url
}
&
${
props
.
remoteField
}
=
${
queryParam
.
value
}
`
url
=
`
${
url
}
&
${
props
.
remoteField
}
=
${
queryParam
.
value
}
`
}
else
}
else
{
{
url
=
`
${
url
}
?
${
props
.
remoteField
}
=
${
queryParam
.
value
}
`
url
=
`
${
url
}
?
${
props
.
remoteField
}
=
${
queryParam
.
value
}
`
}
}
}
else
{
url
=
`
${
url
}
`
}
}
}
}
parseOptions
(
await
request
.
get
({
url
:
url
}))
parseOptions
(
await
request
.
get
({
url
:
url
}))
...
@@ -100,11 +94,6 @@ export const useApiSelect = (option: ApiSelectProps) => {
...
@@ -100,11 +94,6 @@ export const useApiSelect = (option: ApiSelectProps) => {
}
}
}
}
function
checkUrl
(
url
)
{
return
url
.
includes
(
'?'
)
}
function
parseOptions
(
data
:
any
)
{
function
parseOptions
(
data
:
any
)
{
// 情况一:如果有自定义解析函数优先使用自定义解析
// 情况一:如果有自定义解析函数优先使用自定义解析
if
(
!
isEmpty
(
props
.
parseFunc
))
{
if
(
!
isEmpty
(
props
.
parseFunc
))
{
...
...
src/components/FormCreate/src/useFormCreateDesigner.ts
View file @
379ca237
...
@@ -64,7 +64,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
...
@@ -64,7 +64,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
label
:
'接口选择器'
,
label
:
'接口选择器'
,
icon
:
'icon-server'
,
icon
:
'icon-server'
,
props
:
[...
apiSelectRule
],
props
:
[...
apiSelectRule
],
event
:
[
'click'
,
'change'
,
'visibleChange'
,
'clear'
,
'blur'
,
'focus'
]
event
:
[
'click'
,
'change'
,
'visibleChange'
,
'clear'
,
'blur'
,
'focus'
]
})
})
/**
/**
...
...
src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue
View file @
379ca237
...
@@ -370,7 +370,6 @@ const removeListenerField = (index) => {
...
@@ -370,7 +370,6 @@ const removeListenerField = (index) => {
}
}
// 移除监听器
// 移除监听器
const
removeListener
=
(
index
)
=>
{
const
removeListener
=
(
index
)
=>
{
debugger
ElMessageBox
.
confirm
(
'确认移除该监听器吗?'
,
'提示'
,
{
ElMessageBox
.
confirm
(
'确认移除该监听器吗?'
,
'提示'
,
{
confirmButtonText
:
'确 认'
,
confirmButtonText
:
'确 认'
,
cancelButtonText
:
'取 消'
cancelButtonText
:
'取 消'
...
...
src/components/bpmnProcessDesigner/package/utils.ts
View file @
379ca237
...
@@ -2,7 +2,6 @@ import { toRaw } from 'vue'
...
@@ -2,7 +2,6 @@ import { toRaw } from 'vue'
const
bpmnInstances
=
()
=>
(
window
as
any
)?.
bpmnInstances
const
bpmnInstances
=
()
=>
(
window
as
any
)?.
bpmnInstances
// 创建监听器实例
// 创建监听器实例
export
function
createListenerObject
(
options
,
isTask
,
prefix
)
{
export
function
createListenerObject
(
options
,
isTask
,
prefix
)
{
debugger
const
listenerObj
=
Object
.
create
(
null
)
const
listenerObj
=
Object
.
create
(
null
)
listenerObj
.
event
=
options
.
event
listenerObj
.
event
=
options
.
event
isTask
&&
(
listenerObj
.
id
=
options
.
id
)
// 任务监听器特有的 id 字段
isTask
&&
(
listenerObj
.
id
=
options
.
id
)
// 任务监听器特有的 id 字段
...
...
src/utils/constants.ts
View file @
379ca237
...
@@ -71,7 +71,7 @@ export const SystemUserSocialTypeEnum = {
...
@@ -71,7 +71,7 @@ export const SystemUserSocialTypeEnum = {
export
const
InfraCodegenTemplateTypeEnum
=
{
export
const
InfraCodegenTemplateTypeEnum
=
{
CRUD
:
1
,
// 基础 CRUD
CRUD
:
1
,
// 基础 CRUD
TREE
:
2
,
// 树形 CRUD
TREE
:
2
,
// 树形 CRUD
SUB
:
3
// 主子表 CRUD
SUB
:
15
// 主子表 CRUD
}
}
/**
/**
...
@@ -461,5 +461,5 @@ export const BpmProcessInstanceStatus = {
...
@@ -461,5 +461,5 @@ export const BpmProcessInstanceStatus = {
export
const
BpmAutoApproveType
=
{
export
const
BpmAutoApproveType
=
{
NONE
:
0
,
// 不自动通过
NONE
:
0
,
// 不自动通过
APPROVE_ALL
:
1
,
// 仅审批一次,后续重复的审批节点均自动通过
APPROVE_ALL
:
1
,
// 仅审批一次,后续重复的审批节点均自动通过
APPROVE_SEQUENT
:
2
,
// 仅针对连续审批的节点自动通过
APPROVE_SEQUENT
:
2
// 仅针对连续审批的节点自动通过
}
}
src/utils/index.ts
View file @
379ca237
...
@@ -525,21 +525,6 @@ export function jsonParse(str: string) {
...
@@ -525,21 +525,6 @@ export function jsonParse(str: string) {
/**
/**
* 截取字符串
* 截取字符串
*
*
* @param name
* @param start
* @param end
*/
export
const
sliceName
=
(
name
:
string
,
start
:
number
,
end
:
number
)
=>
{
if
(
name
.
length
>
end
)
{
return
name
.
slice
(
start
,
end
)
}
return
name
}
/**
* 截取字符串
*
* @param str 字符串
* @param str 字符串
* @param start 开始位置
* @param start 开始位置
* @param end 结束位置
* @param end 结束位置
...
...
src/views/Login/components/LoginForm.vue
View file @
379ca237
...
@@ -312,8 +312,8 @@ const doSocialLogin = async (type: number) => {
...
@@ -312,8 +312,8 @@ const doSocialLogin = async (type: number) => {
}
}
}
}
// 计算 redirectUri
// 计算 redirectUri
//
tricky: type、redirect需要先encode
一次,否则钉钉回调会丢失。
//
注意: type、redirect 需要先 encode
一次,否则钉钉回调会丢失。
// 配合
Login/SocialL
ogin.vue#getUrlValue() 使用
// 配合
social-l
ogin.vue#getUrlValue() 使用
const
redirectUri
=
const
redirectUri
=
location
.
origin
+
location
.
origin
+
'/social-login?'
+
'/social-login?'
+
...
...
src/views/bpm/model/CategoryDraggableModel.vue
View file @
379ca237
...
@@ -449,7 +449,6 @@ const handleChangeState = async (row: any) => {
...
@@ -449,7 +449,6 @@ const handleChangeState = async (row: any) => {
try
{
try
{
// 修改状态的二次确认
// 修改状态的二次确认
const
id
=
row
.
id
const
id
=
row
.
id
debugger
const
statusState
=
state
===
1
?
'停用'
:
'启用'
const
statusState
=
state
===
1
?
'停用'
:
'启用'
const
content
=
'是否确认'
+
statusState
+
'流程名字为"'
+
row
.
name
+
'"的数据项?'
const
content
=
'是否确认'
+
statusState
+
'流程名字为"'
+
row
.
name
+
'"的数据项?'
await
message
.
confirm
(
content
)
await
message
.
confirm
(
content
)
...
...
src/views/infra/codegen/ImportTable.vue
View file @
379ca237
...
@@ -62,8 +62,12 @@
...
@@ -62,8 +62,12 @@
</el-row>
</el-row>
<!-- 操作 -->
<!-- 操作 -->
<template
#
footer
>
<template
#
footer
>
<el-button
:disabled=
"tableList.length === 0 || dbTableLoading"
type=
"primary"
@
click=
"handleImportTable"
>
<el-button
导入
:disabled=
"tableList.length === 0 || dbTableLoading"
type=
"primary"
@
click=
"handleImportTable"
>
导入
</el-button>
</el-button>
<el-button
@
click=
"close"
>
关闭
</el-button>
<el-button
@
click=
"close"
>
关闭
</el-button>
</
template
>
</
template
>
...
...
src/views/iot/thingmodel/ThingModelForm.vue
View file @
379ca237
...
@@ -132,7 +132,6 @@ defineExpose({ open, close: () => (dialogVisible.value = false) })
...
@@ -132,7 +132,6 @@ defineExpose({ open, close: () => (dialogVisible.value = false) })
/** 提交表单 */
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
const
emit
=
defineEmits
([
'success'
])
const
submitForm
=
async
()
=>
{
const
submitForm
=
async
()
=>
{
debugger
await
formRef
.
value
.
validate
()
await
formRef
.
value
.
validate
()
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
...
...
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