Beta:发布v2.7.5测试版本 (#1896)
* 生产环境时移除console * 更新第三方库道最新版本,修正导致的兼容问题 * feat: 版本号变更,修复自动化历史的结构体描述 * feat: 放弃element的按需引用,增加自定义表单组件,替换原始的iframe引入模式。 * feat: 放开表单生成器的key输入 * feat: 自动化代码关联属性支持跨数据库关联 * fixed: 修复跨库关联模板 * feat: 允许清空跨数据关联的业务库选项 * feat: 增加用户搜索功能 * feat: 允许单条API同步 --------- Co-authored-by: task <121913992@qq.com> Co-authored-by: task <ms.yangdan@gmail.com>
This commit is contained in:
@@ -163,7 +163,6 @@
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
icon="edit"
|
||||
|
||||
type="primary"
|
||||
link
|
||||
@click="editApiFunc(scope.row)"
|
||||
@@ -172,7 +171,6 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="delete"
|
||||
|
||||
type="primary"
|
||||
link
|
||||
@click="deleteApiFunc(scope.row)"
|
||||
@@ -282,7 +280,10 @@
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{row}">
|
||||
<el-button type="primary" text @click="ignoreApiFunc(row,true)">
|
||||
<el-button icon="plus" type="primary" link @click="addApiFunc(row)">
|
||||
单条新增
|
||||
</el-button>
|
||||
<el-button icon="sunrise" type="primary" link @click="ignoreApiFunc(row,true)">
|
||||
忽略
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -365,7 +366,7 @@
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{row}">
|
||||
<el-button type="primary" text @click="ignoreApiFunc(row,false)">
|
||||
<el-button icon="sunny" type="primary" link @click="ignoreApiFunc(row,false)">
|
||||
取消忽略
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -568,14 +569,49 @@ const ignoreApiFunc = async (row,flag) =>{
|
||||
}
|
||||
}
|
||||
|
||||
const addApiFunc = async(row)=>{
|
||||
if(!row.apiGroup){
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请先选择API分组'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!row.description){
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请先填写API描述'
|
||||
})
|
||||
return
|
||||
}
|
||||
const res = await createApi(row)
|
||||
if (res.code === 0) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '添加成功',
|
||||
showClose: true
|
||||
})
|
||||
syncApiData.value.newApis = syncApiData.value.newApis.filter(item => !(item.path === row.path && item.method === row.method))
|
||||
}
|
||||
getTableData()
|
||||
getGroup()
|
||||
}
|
||||
|
||||
const closeSyncDialog = () => {
|
||||
syncApiFlag.value = false
|
||||
}
|
||||
|
||||
const syncing = ref(false)
|
||||
|
||||
|
||||
const enterSyncDialog = async() => {
|
||||
if( syncApiData.value.newApis.some(item => !item.apiGroup || !item.description)){
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '存在API未分组或未填写描述'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
syncing.value = true
|
||||
const res = await enterSyncApi(syncApiData.value)
|
||||
syncing.value = false
|
||||
|
||||
@@ -1,6 +1,53 @@
|
||||
<template>
|
||||
<div>
|
||||
<warning-bar title="注:右上角头像下拉可切换角色" />
|
||||
<div class="gva-search-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:inline="true"
|
||||
:model="searchInfo"
|
||||
>
|
||||
<el-form-item label="用户名">
|
||||
<el-input
|
||||
v-model="searchInfo.username"
|
||||
placeholder="用户名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称">
|
||||
<el-input
|
||||
v-model="searchInfo.nickname"
|
||||
placeholder="昵称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<el-input
|
||||
v-model="searchInfo.phone"
|
||||
placeholder="手机号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
v-model="searchInfo.email"
|
||||
placeholder="邮箱"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="search"
|
||||
@click="onSubmit"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="refresh"
|
||||
@click="onReset"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="gva-table-box">
|
||||
<div class="gva-btn-list">
|
||||
<el-button
|
||||
@@ -246,7 +293,27 @@ defineOptions({
|
||||
name: 'User',
|
||||
})
|
||||
|
||||
const path = ref(import.meta.env.VITE_BASE_API + '/')
|
||||
const searchInfo = ref({
|
||||
username: '',
|
||||
nickname: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
})
|
||||
|
||||
const onSubmit = () => {
|
||||
page.value = 1
|
||||
getTableData()
|
||||
}
|
||||
|
||||
const onReset = () => {
|
||||
searchInfo.value = {
|
||||
username: '',
|
||||
nickname: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
}
|
||||
getTableData()
|
||||
}
|
||||
// 初始化相关
|
||||
const setAuthorityOptions = (AuthorityData, optionsData) => {
|
||||
AuthorityData &&
|
||||
@@ -286,7 +353,7 @@ const handleCurrentChange = (val) => {
|
||||
|
||||
// 查询
|
||||
const getTableData = async() => {
|
||||
const table = await getUserList({ page: page.value, pageSize: pageSize.value })
|
||||
const table = await getUserList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
|
||||
if (table.code === 0) {
|
||||
tableData.value = table.data.list
|
||||
total.value = table.data.total
|
||||
@@ -341,11 +408,6 @@ const setAuthorityIds = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const chooseImg = ref(null)
|
||||
const openHeaderChange = () => {
|
||||
chooseImg.value.open()
|
||||
}
|
||||
|
||||
const authOptions = ref([])
|
||||
const setOptions = (authData) => {
|
||||
authOptions.value = []
|
||||
|
||||
Reference in New Issue
Block a user