mirror of
https://gitee.com/myxzgzs/boyue-ui-admin-vue3
synced 2025-08-08 16:32:43 +08:00
【代码优化】移除无用的,优化代码排版
This commit is contained in:
parent
3f5681be6c
commit
379ca2373c
@ -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 = {
|
|||||||
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) => {
|
|||||||
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 })
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
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 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询文件列表
|
// 查询文件列表
|
||||||
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 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
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) => {
|
|||||||
}
|
}
|
||||||
// 获取验证图片以及 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 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkUrl(url)
|
|
||||||
{
|
|
||||||
return url.includes('?')
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseOptions(data: any) {
|
function parseOptions(data: any) {
|
||||||
// 情况一:如果有自定义解析函数优先使用自定义解析
|
// 情况一:如果有自定义解析函数优先使用自定义解析
|
||||||
if (!isEmpty(props.parseFunc)) {
|
if (!isEmpty(props.parseFunc)) {
|
||||||
|
@ -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']
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -370,7 +370,6 @@ const removeListenerField = (index) => {
|
|||||||
}
|
}
|
||||||
// 移除监听器
|
// 移除监听器
|
||||||
const removeListener = (index) => {
|
const removeListener = (index) => {
|
||||||
debugger
|
|
||||||
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
|
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
|
||||||
confirmButtonText: '确 认',
|
confirmButtonText: '确 认',
|
||||||
cancelButtonText: '取 消'
|
cancelButtonText: '取 消'
|
||||||
|
@ -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 字段
|
||||||
|
@ -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 = {
|
|||||||
export const BpmAutoApproveType = {
|
export const BpmAutoApproveType = {
|
||||||
NONE: 0, // 不自动通过
|
NONE: 0, // 不自动通过
|
||||||
APPROVE_ALL: 1, // 仅审批一次,后续重复的审批节点均自动通过
|
APPROVE_ALL: 1, // 仅审批一次,后续重复的审批节点均自动通过
|
||||||
APPROVE_SEQUENT: 2, // 仅针对连续审批的节点自动通过
|
APPROVE_SEQUENT: 2 // 仅针对连续审批的节点自动通过
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 截取字符串
|
* 截取字符串
|
||||||
*
|
*
|
||||||
|
@ -312,8 +312,8 @@ const doSocialLogin = async (type: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 计算 redirectUri
|
// 计算 redirectUri
|
||||||
// tricky: type、redirect需要先encode一次,否则钉钉回调会丢失。
|
// 注意: type、redirect 需要先 encode 一次,否则钉钉回调会丢失。
|
||||||
// 配合 Login/SocialLogin.vue#getUrlValue() 使用
|
// 配合 social-login.vue#getUrlValue() 使用
|
||||||
const redirectUri =
|
const redirectUri =
|
||||||
location.origin +
|
location.origin +
|
||||||
'/social-login?' +
|
'/social-login?' +
|
||||||
|
@ -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)
|
||||||
|
@ -62,7 +62,11 @@
|
|||||||
</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>
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user