diff --git a/.gitignore b/.gitignore index 3efc9c525cc78ef5bb689500323f93f0b7933b2a..0b05e6a63fc87385c1aa6705768dbd1724535b60 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,3 @@ dist-ssr /dist* *-lock.* pnpm-debug - -.idea -.history \ No newline at end of file diff --git a/src/views/bpm/form/formEditor.vue b/src/views/bpm/form/formEditor.vue index 989ea56ed71d5494214d9d5adc75a736c0a790de..418a75e852b188b547b7d8562d75eef099227167 100644 --- a/src/views/bpm/form/formEditor.vue +++ b/src/views/bpm/form/formEditor.vue @@ -133,15 +133,24 @@ const openModel = (title: string) => { } /** 复制 **/ const copy = async (text: string) => { - const { copy, copied, isSupported } = useClipboard({ source: text }) - if (!isSupported) { - message.error(t('common.copyError')) - } else { - await copy() - if (unref(copied)) { - message.success(t('common.copySuccess')) - } - } + // const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) }) + // if (!isSupported.value) { + // message.error(t('common.copyError')) + // } else { + // await copy() + // if (unref(copied.value)) { + // message.success(t('common.copySuccess')) + // } + // } + let url = JSON.stringify(text) + let oInput = document.createElement('textarea') + oInput.value = url + document.body.appendChild(oInput) + oInput.select() // 选择对象; + // console.log(oInput.value) + document.execCommand('Copy') // 执行浏览器复制命令 + message.success(t('common.copySuccess')) + oInput.remove() } // ========== 初始化 ========== onMounted(() => { diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue index 6f577e952b00a21da77e32b7879a8b6fd2ed2877..b3af638b4b504d13143e0a51433395591e8428e8 100644 --- a/src/views/infra/build/index.vue +++ b/src/views/infra/build/index.vue @@ -77,15 +77,24 @@ const showTemplate = () => { /** 复制 **/ const copy = async (text: string) => { - const { copy, copied, isSupported } = useClipboard({ source: text }) - if (!isSupported) { - message.error(t('common.copyError')) - } else { - await copy() - if (unref(copied)) { - message.success(t('common.copySuccess')) - } - } + // const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) }) + // if (!isSupported.value) { + // message.error(t('common.copyError')) + // } else { + // await copy() + // if (unref(copied.value)) { + // message.success(t('common.copySuccess')) + // } + // } + let url = JSON.stringify(text) + let oInput = document.createElement('textarea') + oInput.value = url + document.body.appendChild(oInput) + oInput.select() // 选择对象; + // console.log(oInput.value) + document.execCommand('Copy') // 执行浏览器复制命令 + message.success(t('common.copySuccess')) + oInput.remove() } const makeTemplate = () => { diff --git a/src/views/infra/codegen/components/Preview.vue b/src/views/infra/codegen/components/Preview.vue index 2d9482ff0468f0649fc94718db168e1c811dc989..6a6246a8eb8849ce7e64d24c1194c45ac17b1cc3 100644 --- a/src/views/infra/codegen/components/Preview.vue +++ b/src/views/infra/codegen/components/Preview.vue @@ -130,11 +130,11 @@ const handleFiles = (datas: CodegenPreviewVO[]) => { /** 复制 **/ const copy = async (text: string) => { const { copy, copied, isSupported } = useClipboard({ source: text }) - if (!isSupported) { + if (!isSupported.value) { message.error(t('common.copyError')) } else { await copy() - if (unref(copied)) { + if (unref(copied.value)) { message.success(t('common.copySuccess')) } } diff --git a/src/views/infra/config/config.data.ts b/src/views/infra/config/config.data.ts index 41acfa1536998a80e2dd7ea63d1bbfc6c01bdc68..635745a5613cddcb7579bbae4e46fae33c0d4ee2 100644 --- a/src/views/infra/config/config.data.ts +++ b/src/views/infra/config/config.data.ts @@ -6,7 +6,8 @@ export const rules = reactive({ category: [required], name: [required], key: [required], - value: [required] + value: [required], + visible: [{ required: true, message: '请选择是否可见', trigger: 'change' }] }) // CrudSchema diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue index b2bc8a8b43df37c5e1becf3611ba0c5d42bf192f..ddf9eebae4d028843e56b4f62115434455b492f3 100644 --- a/src/views/infra/config/index.vue +++ b/src/views/infra/config/index.vue @@ -93,8 +93,8 @@ const message = useMessage() // 消息弹窗 // 列表相关的变量 const [registerTable, { reload, deleteData, exportList }] = useXTable({ allSchemas: allSchemas, - getListApi: ConfigApi.getConfigPageApi, - deleteApi: ConfigApi.deleteConfigApi, + getListApi: ConfigApi.getConfigPage, + deleteApi: ConfigApi.deleteConfig, exportListApi: ConfigApi.exportConfigApi }) @@ -127,14 +127,6 @@ const handleCreate = async () => { }, 2 ) - unref(formRef)?.addSchema( - { - field: 'value', - label: '参数键值', - component: 'Input' - }, - 3 - ) } } @@ -142,17 +134,15 @@ const handleCreate = async () => { const handleUpdate = async (rowId: number) => { setDialogTile('update') // 设置数据 - const res = await ConfigApi.getConfigApi(rowId) + const res = await ConfigApi.getConfig(rowId) unref(formRef)?.delSchema('key') - unref(formRef)?.delSchema('value') - unref(formRef)?.setValues(res) } // 详情操作 const handleDetail = async (rowId: number) => { setDialogTile('detail') - const res = await ConfigApi.getConfigApi(rowId) + const res = await ConfigApi.getConfig(rowId) detailData.value = res } @@ -167,10 +157,10 @@ const submitForm = async () => { try { const data = unref(formRef)?.formModel as ConfigApi.ConfigVO if (actionType.value === 'create') { - await ConfigApi.createConfigApi(data) + await ConfigApi.createConfig(data) message.success(t('common.createSuccess')) } else { - await ConfigApi.updateConfigApi(data) + await ConfigApi.updateConfig(data) message.success(t('common.updateSuccess')) } dialogVisible.value = false diff --git a/src/views/infra/fileList/index.vue b/src/views/infra/fileList/index.vue index b9bfb81506175d656975220894f66bc27a3971bd..2309d05ce80effe4f58f7c3397d83b6e41285e97 100644 --- a/src/views/infra/fileList/index.vue +++ b/src/views/infra/fileList/index.vue @@ -59,6 +59,7 @@ :on-exceed="handleExceed" :on-success="handleFileSuccess" :on-error="excelUploadError" + :on-change="handleFileChange" :before-remove="beforeRemove" :auto-upload="false" accept=".jpg, .png, .gif" @@ -83,7 +84,7 @@ diff --git a/src/views/infra/job/JobLog.vue b/src/views/infra/job/JobLog.vue index daa20046bb731f076292bcfdb94e47513f0209ff..1771bbd74442baab21a973e78e774695944b0612 100644 --- a/src/views/infra/job/JobLog.vue +++ b/src/views/infra/job/JobLog.vue @@ -1,179 +1,77 @@