Skip to content

Commit 379ca23

Browse files
committed
【代码优化】移除无用的,优化代码排版
1 parent 3f5681b commit 379ca23

File tree

13 files changed

+15
-64
lines changed

13 files changed

+15
-64
lines changed

src/api/infra/codegen/index.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ export type DatabaseTableVO = {
4646
comment: string
4747
}
4848

49-
export type CodegenDetailVO = {
50-
table: CodegenTableVO
51-
columns: CodegenColumnVO[]
52-
}
53-
5449
export type CodegenPreviewVO = {
5550
filePath: string
5651
code: string
@@ -61,11 +56,6 @@ export type CodegenUpdateReqVO = {
6156
columns: CodegenColumnVO[]
6257
}
6358

64-
export type CodegenCreateListReqVO = {
65-
dataSourceConfigId: number
66-
tableNames: string[]
67-
}
68-
6959
// 查询列表代码生成表定义
7060
export const getCodegenTableList = (dataSourceConfigId: number) => {
7161
return request.get({ url: '/infra/codegen/table/list?dataSourceConfigId=' + dataSourceConfigId })
@@ -81,11 +71,6 @@ export const getCodegenTable = (id: number) => {
8171
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
8272
}
8373

84-
// 新增代码生成表定义
85-
export const createCodegenTable = (data: CodegenCreateListReqVO) => {
86-
return request.post({ url: '/infra/codegen/create', data })
87-
}
88-
8974
// 修改代码生成表定义
9075
export const updateCodegenTable = (data: CodegenUpdateReqVO) => {
9176
return request.put({ url: '/infra/codegen/update', data })

src/api/infra/file/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import request from '@/config/axios'
22

3-
export interface FilePageReqVO extends PageParam {
4-
path?: string
5-
type?: string
6-
createTime?: Date[]
7-
}
8-
93
// 文件预签名地址 Response VO
104
export interface FilePresignedUrlRespVO {
115
// 文件配置编号
@@ -17,7 +11,7 @@ export interface FilePresignedUrlRespVO {
1711
}
1812

1913
// 查询文件列表
20-
export const getFilePage = (params: FilePageReqVO) => {
14+
export const getFilePage = (params: PageParam) => {
2115
return request.get({ url: '/infra/file/page', params })
2216
}
2317

src/api/login/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import request from '@/config/axios'
2-
import { getRefreshToken } from '@/utils/auth'
32
import type { RegisterVO, UserLoginVO } from './types'
43

54
export interface SmsCodeVO {
@@ -72,7 +71,6 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
7271
}
7372
// 获取验证图片以及 token
7473
export const getCode = (data: any) => {
75-
debugger
7674
return request.postOriginal({ url: 'system/captcha/get', data })
7775
}
7876

src/components/FormCreate/src/components/useApiSelect.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,12 @@ export const useApiSelect = (option: ApiSelectProps) => {
7474
case 'GET':
7575
let url: string = props.url
7676
if (props.remote) {
77-
if(queryParam.value!=undefined)
78-
{
79-
if(checkUrl(url))
80-
{
77+
if (queryParam.value != undefined) {
78+
if (url.includes('?')) {
8179
url = `${url}&${props.remoteField}=${queryParam.value}`
82-
}else
83-
{
80+
} else {
8481
url = `${url}?${props.remoteField}=${queryParam.value}`
8582
}
86-
}else
87-
{
88-
url = `${url}`
8983
}
9084
}
9185
parseOptions(await request.get({ url: url }))
@@ -100,11 +94,6 @@ export const useApiSelect = (option: ApiSelectProps) => {
10094
}
10195
}
10296

103-
function checkUrl(url)
104-
{
105-
return url.includes('?')
106-
}
107-
10897
function parseOptions(data: any) {
10998
// 情况一:如果有自定义解析函数优先使用自定义解析
11099
if (!isEmpty(props.parseFunc)) {

src/components/FormCreate/src/useFormCreateDesigner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
6464
label: '接口选择器',
6565
icon: 'icon-server',
6666
props: [...apiSelectRule],
67-
event:['click','change','visibleChange','clear','blur','focus']
67+
event: ['click', 'change', 'visibleChange', 'clear', 'blur', 'focus']
6868
})
6969

7070
/**

src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ const removeListenerField = (index) => {
370370
}
371371
// 移除监听器
372372
const removeListener = (index) => {
373-
debugger
374373
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
375374
confirmButtonText: '确 认',
376375
cancelButtonText: '取 消'

src/components/bpmnProcessDesigner/package/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { toRaw } from 'vue'
22
const bpmnInstances = () => (window as any)?.bpmnInstances
33
// 创建监听器实例
44
export function createListenerObject(options, isTask, prefix) {
5-
debugger
65
const listenerObj = Object.create(null)
76
listenerObj.event = options.event
87
isTask && (listenerObj.id = options.id) // 任务监听器特有的 id 字段

src/utils/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const SystemUserSocialTypeEnum = {
7171
export const InfraCodegenTemplateTypeEnum = {
7272
CRUD: 1, // 基础 CRUD
7373
TREE: 2, // 树形 CRUD
74-
SUB: 3 // 主子表 CRUD
74+
SUB: 15 // 主子表 CRUD
7575
}
7676

7777
/**
@@ -461,5 +461,5 @@ export const BpmProcessInstanceStatus = {
461461
export const BpmAutoApproveType = {
462462
NONE: 0, // 不自动通过
463463
APPROVE_ALL: 1, // 仅审批一次,后续重复的审批节点均自动通过
464-
APPROVE_SEQUENT: 2, // 仅针对连续审批的节点自动通过
464+
APPROVE_SEQUENT: 2 // 仅针对连续审批的节点自动通过
465465
}

src/utils/index.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -522,21 +522,6 @@ export function jsonParse(str: string) {
522522
}
523523
}
524524

525-
/**
526-
* 截取字符串
527-
*
528-
* @param name
529-
* @param start
530-
* @param end
531-
*/
532-
533-
export const sliceName = (name: string, start: number, end: number) => {
534-
if (name.length > end) {
535-
return name.slice(start, end)
536-
}
537-
return name
538-
}
539-
540525
/**
541526
* 截取字符串
542527
*

src/views/Login/components/LoginForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ const doSocialLogin = async (type: number) => {
312312
}
313313
}
314314
// 计算 redirectUri
315-
// tricky: type、redirect需要先encode一次,否则钉钉回调会丢失。
316-
// 配合 Login/SocialLogin.vue#getUrlValue() 使用
315+
// 注意: type、redirect 需要先 encode 一次,否则钉钉回调会丢失。
316+
// 配合 social-login.vue#getUrlValue() 使用
317317
const redirectUri =
318318
location.origin +
319319
'/social-login?' +

0 commit comments

Comments
 (0)