refactor(api): 统一API接口命名规范
This commit is contained in:
@@ -140,7 +140,7 @@ export default {
|
||||
name: 'Dept',
|
||||
components: { Treeselect, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '部门', url: 'api/dept', searchRouter: '/queryAllDeptByArgs', crudMethod: { ...crudDept }})
|
||||
return CRUD({ title: '部门', url: 'api/dept', searchRouter: '/searchDept', crudMethod: { ...crudDept }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 设置数据字典
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
args: { pid: tree.id }
|
||||
}
|
||||
setTimeout(() => {
|
||||
crudDept.queryDeptList(params).then(res => {
|
||||
crudDept.searchDept(params).then(res => {
|
||||
resolve(res.content)
|
||||
})
|
||||
}, 100)
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getDepts() {
|
||||
crudDept.queryDeptList({
|
||||
crudDept.searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
args: { enabled: true }
|
||||
@@ -228,7 +228,7 @@ export default {
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudDept.queryDeptList({
|
||||
crudDept.searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
args: { enabled: true, pid: parentNode.id }
|
||||
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
name: 'Menu',
|
||||
components: { Treeselect, IconSelect, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '菜单', url: 'api/menu', searchRouter: '/queryAllMenu', crudMethod: { ...crudMenu }})
|
||||
return CRUD({ title: '菜单', url: 'api/menu', searchRouter: '/searchMenu', crudMethod: { ...crudMenu }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
data() {
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
<script>
|
||||
import crudRoles from '@/api/system/role'
|
||||
import { queryDeptList, queryDeptSuperiorTree } from '@/api/system/dept'
|
||||
import { searchDept, queryDeptSuperiorTree } from '@/api/system/dept'
|
||||
import { queryChildMenuSet, queryMenuListByPid } from '@/api/system/menu'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
@@ -313,7 +313,7 @@ export default {
|
||||
},
|
||||
// 获取部门数据
|
||||
getDepts() {
|
||||
queryDeptList({
|
||||
searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
args: { enabled: true }
|
||||
@@ -350,7 +350,7 @@ export default {
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
queryDeptList({
|
||||
searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
args: { enabled: true, pid: parentNode.id }
|
||||
|
||||
@@ -154,7 +154,7 @@ export default {
|
||||
return {
|
||||
show: false,
|
||||
monitor: null,
|
||||
url: 'api/monitor/queryServerMonitorInfo',
|
||||
url: 'api/monitor/getServerMonitorInfo',
|
||||
data: {},
|
||||
cpuInfo: {
|
||||
tooltip: {
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
<script>
|
||||
import store from '@/store'
|
||||
import { validEmail } from '@/utils/CsValidateUtil'
|
||||
import { IsValidEmail } from '@/utils/CsValidateUtil'
|
||||
import { updateEmail } from '@/api/system/user'
|
||||
import { sendResetEmailCaptcha } from '@/api/system/code'
|
||||
import { sendResetEmailCode } from '@/api/system/code'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
callback(new Error('新邮箱不能为空'))
|
||||
} else if (value === this.email) {
|
||||
callback(new Error('新邮箱不能与旧邮箱相同'))
|
||||
} else if (validEmail(value)) {
|
||||
} else if (IsValidEmail(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error('邮箱格式错误'))
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
this.codeLoading = true
|
||||
this.buttonName = '验证码发送中'
|
||||
const _this = this
|
||||
sendResetEmailCaptcha(this.form.email).then(res => {
|
||||
sendResetEmailCode(this.form.email).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '发送成功,验证码有效期5分钟',
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
<script>
|
||||
import crudUser from '@/api/system/user'
|
||||
import { IsValidPhone } from '@/utils/CsValidateUtil'
|
||||
import { queryDeptList, queryDeptSuperiorTree } from '@/api/system/dept'
|
||||
import { searchDept, queryDeptSuperiorTree } from '@/api/system/dept'
|
||||
import { getLevel, queryRoleList } from '@/api/system/role'
|
||||
import { queryAllEnableJob } from '@/api/system/job'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
@@ -228,7 +228,7 @@ export default {
|
||||
name: 'User',
|
||||
components: { CuteDeptTree, Treeselect, crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', url: 'api/user', searchRouter: '/aggregationSearchUserByArgs', crudMethod: { ...crudUser }})
|
||||
return CRUD({ title: '用户', url: 'api/user', searchRouter: '/aggregationSearchUser', crudMethod: { ...crudUser }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
@@ -401,7 +401,7 @@ export default {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getDepts() {
|
||||
queryDeptList({
|
||||
searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
args: { enabled: true }
|
||||
@@ -434,7 +434,7 @@ export default {
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
queryDeptList({
|
||||
searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
args: { enabled: true, pid: parentNode.id }
|
||||
|
||||
Reference in New Issue
Block a user