【代码优化】移除无用的,优化代码排版

This commit is contained in:
YunaiV 2025-04-12 12:45:28 +08:00
parent 3f5681be6c
commit 379ca2373c
13 changed files with 15 additions and 64 deletions

View File

@ -46,11 +46,6 @@ export type DatabaseTableVO = {
comment: string
}
export type CodegenDetailVO = {
table: CodegenTableVO
columns: CodegenColumnVO[]
}
export type CodegenPreviewVO = {
filePath: string
code: string
@ -61,11 +56,6 @@ export type CodegenUpdateReqVO = {
columns: CodegenColumnVO[]
}
export type CodegenCreateListReqVO = {
dataSourceConfigId: number
tableNames: string[]
}
// 查询列表代码生成表定义
export const getCodegenTableList = (dataSourceConfigId: number) => {
return request.get({ url: '/infra/codegen/table/list?dataSourceConfigId=' + dataSourceConfigId })
@ -81,11 +71,6 @@ export const getCodegenTable = (id: number) => {
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) => {
return request.put({ url: '/infra/codegen/update', data })

View File

@ -1,11 +1,5 @@
import request from '@/config/axios'
export interface FilePageReqVO extends PageParam {
path?: string
type?: string
createTime?: Date[]
}
// 文件预签名地址 Response VO
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 })
}

View File

@ -1,5 +1,4 @@
import request from '@/config/axios'
import { getRefreshToken } from '@/utils/auth'
import type { RegisterVO, UserLoginVO } from './types'
export interface SmsCodeVO {
@ -72,7 +71,6 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
}
// 获取验证图片以及 token
export const getCode = (data: any) => {
debugger
return request.postOriginal({ url: 'system/captcha/get', data })
}

View File

@ -74,18 +74,12 @@ export const useApiSelect = (option: ApiSelectProps) => {
case 'GET':
let url: string = props.url
if (props.remote) {
if(queryParam.value!=undefined)
{
if(checkUrl(url))
{
if (queryParam.value != undefined) {
if (url.includes('?')) {
url = `${url}&${props.remoteField}=${queryParam.value}`
}else
{
} else {
url = `${url}?${props.remoteField}=${queryParam.value}`
}
}else
{
url = `${url}`
}
}
parseOptions(await request.get({ url: url }))
@ -100,11 +94,6 @@ export const useApiSelect = (option: ApiSelectProps) => {
}
}
function checkUrl(url)
{
return url.includes('?')
}
function parseOptions(data: any) {
// 情况一:如果有自定义解析函数优先使用自定义解析
if (!isEmpty(props.parseFunc)) {

View File

@ -64,7 +64,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
label: '接口选择器',
icon: 'icon-server',
props: [...apiSelectRule],
event:['click','change','visibleChange','clear','blur','focus']
event: ['click', 'change', 'visibleChange', 'clear', 'blur', 'focus']
})
/**

View File

@ -370,7 +370,6 @@ const removeListenerField = (index) => {
}
//
const removeListener = (index) => {
debugger
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
confirmButtonText: '确 认',
cancelButtonText: '取 消'

View File

@ -2,7 +2,6 @@ import { toRaw } from 'vue'
const bpmnInstances = () => (window as any)?.bpmnInstances
// 创建监听器实例
export function createListenerObject(options, isTask, prefix) {
debugger
const listenerObj = Object.create(null)
listenerObj.event = options.event
isTask && (listenerObj.id = options.id) // 任务监听器特有的 id 字段

View File

@ -71,7 +71,7 @@ export const SystemUserSocialTypeEnum = {
export const InfraCodegenTemplateTypeEnum = {
CRUD: 1, // 基础 CRUD
TREE: 2, // 树形 CRUD
SUB: 3 // 主子表 CRUD
SUB: 15 // 主子表 CRUD
}
/**
@ -461,5 +461,5 @@ export const BpmProcessInstanceStatus = {
export const BpmAutoApproveType = {
NONE: 0, // 不自动通过
APPROVE_ALL: 1, // 仅审批一次,后续重复的审批节点均自动通过
APPROVE_SEQUENT: 2, // 仅针对连续审批的节点自动通过
APPROVE_SEQUENT: 2 // 仅针对连续审批的节点自动通过
}

View File

@ -522,21 +522,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
}
/**
*
*

View File

@ -312,8 +312,8 @@ const doSocialLogin = async (type: number) => {
}
}
// redirectUri
// tricky: typeredirectencode
// Login/SocialLogin.vue#getUrlValue() 使
// : typeredirect encode
// social-login.vue#getUrlValue() 使
const redirectUri =
location.origin +
'/social-login?' +

View File

@ -449,7 +449,6 @@ const handleChangeState = async (row: any) => {
try {
//
const id = row.id
debugger
const statusState = state === 1 ? '停用' : '启用'
const content = '是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?'
await message.confirm(content)

View File

@ -62,7 +62,11 @@
</el-row>
<!-- 操作 -->
<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 @click="close">关闭</el-button>

View File

@ -132,7 +132,6 @@ defineExpose({ open, close: () => (dialogVisible.value = false) })
/** 提交表单 */
const emit = defineEmits(['success'])
const submitForm = async () => {
debugger
await formRef.value.validate()
formLoading.value = true
try {