mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-02 18:36:40 +00:00
perf 数据源优化
This commit is contained in:
@@ -6,9 +6,7 @@
|
||||
<vxe-column field="key" title="数据源" />
|
||||
<vxe-column fixed="right" width="50" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-popconfirm title="是否删除" @confirm="remove(row)" okText="是" cancelText="否">
|
||||
<a-link danger>删除</a-link>
|
||||
</a-popconfirm>
|
||||
<a-link danger @click="remove(row)">删除</a-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
@@ -44,7 +42,7 @@
|
||||
function remove(record) {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '重新添加',
|
||||
title: '移除',
|
||||
content: '是否将该数据源从系统中移除',
|
||||
onOk: () => {
|
||||
removeDataSourceByKey(record.key).then(() => {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { defHttp } from '/@/utils/http/axios'
|
||||
import { PageResult, Result } from '/#/axios'
|
||||
import { BaseEntity, KeyValue } from "/#/web";
|
||||
import { BaseEntity, KeyValue } from '/#/web'
|
||||
import { LabeledValue } from 'ant-design-vue/lib/select'
|
||||
|
||||
/**
|
||||
|
@@ -47,7 +47,7 @@
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button key="cancel" @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="!showable" preIcon="ant-design:api-outlined" @click="testConnectionInfo">测试连接</a-button>
|
||||
<a-button v-if="addable" preIcon="ant-design:api-outlined" @click="testConnectionInfo">测试连接</a-button>
|
||||
<a-button v-if="!showable" key="forward" :loading="confirmLoading" type="primary" @click="handleOk">保存</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -79,12 +79,14 @@
|
||||
initFormEditType,
|
||||
handleCancel,
|
||||
search,
|
||||
diffForm,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
modalWidth,
|
||||
title,
|
||||
confirmLoading,
|
||||
visible,
|
||||
addable,
|
||||
editable,
|
||||
showable,
|
||||
formEditType,
|
||||
@@ -99,12 +101,14 @@
|
||||
id: null,
|
||||
code: '',
|
||||
name: '',
|
||||
databaseType: undefined,
|
||||
dbDriver: '',
|
||||
dbUrl: '',
|
||||
dbUsername: '',
|
||||
dbPassword: '',
|
||||
remark: '',
|
||||
})
|
||||
let rawForm
|
||||
// 校验
|
||||
const rules = reactive({
|
||||
code: [
|
||||
@@ -137,6 +141,7 @@
|
||||
confirmLoading.value = true
|
||||
get(id).then(({ data }) => {
|
||||
form = data
|
||||
rawForm = { ...data }
|
||||
confirmLoading.value = false
|
||||
})
|
||||
} else {
|
||||
@@ -167,7 +172,7 @@
|
||||
if (formEditType.value === FormEditType.Add) {
|
||||
await add(form)
|
||||
} else if (formEditType.value === FormEditType.Edit) {
|
||||
await update(form)
|
||||
await update({ ...form, ...diffForm(rawForm, form, 'webhookKey') })
|
||||
}
|
||||
confirmLoading.value = false
|
||||
handleCancel()
|
||||
|
@@ -130,7 +130,7 @@
|
||||
function show(record) {
|
||||
dynamicDataSourceEdit.init(record.id, FormEditType.Show)
|
||||
}
|
||||
// 查看
|
||||
// 查看数据源列表
|
||||
function showDatabaseList() {
|
||||
dataSourceList.show()
|
||||
}
|
||||
|
Reference in New Issue
Block a user