From 379ca2373c167b27493b0667c1704381f8aa6bbe Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Apr 2025 12:45:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E6=8E=92=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/codegen/index.ts | 15 --------------- src/api/infra/file/index.ts | 8 +------- src/api/login/index.ts | 2 -- .../FormCreate/src/components/useApiSelect.tsx | 17 +++-------------- .../FormCreate/src/useFormCreateDesigner.ts | 2 +- .../penal/listeners/ElementListeners.vue | 1 - .../bpmnProcessDesigner/package/utils.ts | 1 - src/utils/constants.ts | 4 ++-- src/utils/index.ts | 15 --------------- src/views/Login/components/LoginForm.vue | 4 ++-- src/views/bpm/model/CategoryDraggableModel.vue | 1 - src/views/infra/codegen/ImportTable.vue | 8 ++++++-- src/views/iot/thingmodel/ThingModelForm.vue | 1 - 13 files changed, 15 insertions(+), 64 deletions(-) diff --git a/src/api/infra/codegen/index.ts b/src/api/infra/codegen/index.ts index 441ca83b..b6e88f00 100644 --- a/src/api/infra/codegen/index.ts +++ b/src/api/infra/codegen/index.ts @@ -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 }) diff --git a/src/api/infra/file/index.ts b/src/api/infra/file/index.ts index 0e1b2e7c..c70e3c3e 100644 --- a/src/api/infra/file/index.ts +++ b/src/api/infra/file/index.ts @@ -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 }) } diff --git a/src/api/login/index.ts b/src/api/login/index.ts index f23305f0..7d7d407b 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -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 }) } diff --git a/src/components/FormCreate/src/components/useApiSelect.tsx b/src/components/FormCreate/src/components/useApiSelect.tsx index 61454097..c02e7971 100644 --- a/src/components/FormCreate/src/components/useApiSelect.tsx +++ b/src/components/FormCreate/src/components/useApiSelect.tsx @@ -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)) { diff --git a/src/components/FormCreate/src/useFormCreateDesigner.ts b/src/components/FormCreate/src/useFormCreateDesigner.ts index c0307950..dff1333b 100644 --- a/src/components/FormCreate/src/useFormCreateDesigner.ts +++ b/src/components/FormCreate/src/useFormCreateDesigner.ts @@ -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'] }) /** diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue index de5445c8..a161205a 100644 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue @@ -370,7 +370,6 @@ const removeListenerField = (index) => { } // 移除监听器 const removeListener = (index) => { - debugger ElMessageBox.confirm('确认移除该监听器吗?', '提示', { confirmButtonText: '确 认', cancelButtonText: '取 消' diff --git a/src/components/bpmnProcessDesigner/package/utils.ts b/src/components/bpmnProcessDesigner/package/utils.ts index 8996788b..bb6c5d52 100644 --- a/src/components/bpmnProcessDesigner/package/utils.ts +++ b/src/components/bpmnProcessDesigner/package/utils.ts @@ -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 字段 diff --git a/src/utils/constants.ts b/src/utils/constants.ts index f673bdca..91e18272 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -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 // 仅针对连续审批的节点自动通过 } diff --git a/src/utils/index.ts b/src/utils/index.ts index 5951d58d..f0b4faae 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -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 -} - /** * 截取字符串 * diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 193f4781..fa661236 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -312,8 +312,8 @@ const doSocialLogin = async (type: number) => { } } // 计算 redirectUri - // tricky: type、redirect需要先encode一次,否则钉钉回调会丢失。 - // 配合 Login/SocialLogin.vue#getUrlValue() 使用 + // 注意: type、redirect 需要先 encode 一次,否则钉钉回调会丢失。 + // 配合 social-login.vue#getUrlValue() 使用 const redirectUri = location.origin + '/social-login?' + diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 89a3217e..0c6f3689 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -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) diff --git a/src/views/infra/codegen/ImportTable.vue b/src/views/infra/codegen/ImportTable.vue index 79d5aba9..132a602f 100644 --- a/src/views/infra/codegen/ImportTable.vue +++ b/src/views/infra/codegen/ImportTable.vue @@ -62,8 +62,12 @@ diff --git a/src/views/iot/thingmodel/ThingModelForm.vue b/src/views/iot/thingmodel/ThingModelForm.vue index f800257d..f52179bf 100644 --- a/src/views/iot/thingmodel/ThingModelForm.vue +++ b/src/views/iot/thingmodel/ThingModelForm.vue @@ -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 {