refactor(api): 重构系统模块API函数命名规范
This commit is contained in:
@@ -35,7 +35,7 @@ export function searchDept(params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryDeptSuperiorTree(ids, exclude) {
|
export function searchDeptTree(ids, exclude) {
|
||||||
exclude = exclude !== undefined ? exclude : false
|
exclude = exclude !== undefined ? exclude : false
|
||||||
const data = Array.isArray(ids) ? ids : [ids]
|
const data = Array.isArray(ids) ? ids : [ids]
|
||||||
return request({
|
return request({
|
||||||
@@ -45,4 +45,4 @@ export function queryDeptSuperiorTree(ids, exclude) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, searchDept, queryDeptSuperiorTree }
|
export default { add, edit, del, searchDept, searchDeptTree }
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryPageDict(data) {
|
export function searchDict(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/dict',
|
url: 'api/dict/searchDict',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, queryPageDict }
|
export default { add, edit, del, searchDict }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export function getLastEmailConfig() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function modifyEmailConfig(data) {
|
export function updateEmailConfigById(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/email/updateEmailConfigById',
|
url: 'api/email/updateEmailConfigById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -15,7 +15,7 @@ export function modifyEmailConfig(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sendEmail(data) {
|
export function send(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/email/send',
|
url: 'api/email/send',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function edit(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function queryAllEnableJob() {
|
export function searchJob() {
|
||||||
const params = {
|
const params = {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 9999999,
|
size: 9999999,
|
||||||
|
|||||||
@@ -27,14 +27,14 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryMenuListByPid(pid) {
|
export function listMenuByPid(pid) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/menu/listMenuByPid?pid=' + pid,
|
url: 'api/menu/listMenuByPid?pid=' + pid,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryMenuByArgs(params) {
|
export function searchMenu(params) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/menu/searchMenu',
|
url: 'api/menu/searchMenu',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -51,7 +51,7 @@ export function queryMenuSuperior(ids) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryChildMenuSet(id) {
|
export function listChildMenuSetByMenuId(id) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/menu/listChildMenuSetByMenuId?id=' + id,
|
url: 'api/menu/listChildMenuSetByMenuId?id=' + id,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@@ -65,4 +65,4 @@ export function buildMenus() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, queryMenuListByPid, queryMenuSuperior, queryMenuByArgs, queryChildMenuSet }
|
export default { add, edit, del, listMenuByPid, queryMenuSuperior, searchMenu, listChildMenuSetByMenuId }
|
||||||
|
|||||||
@@ -35,14 +35,14 @@ export function edit(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取所有的Role
|
// 获取所有的Role
|
||||||
export function queryRoleList() {
|
export function listAllRole() {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/role/listAllRole',
|
url: 'api/role/listAllRole',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getLevel() {
|
export function getCurrentUserRoleLevel() {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/role/getCurrentUserRoleLevel',
|
url: 'api/role/getCurrentUserRoleLevel',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@@ -57,4 +57,4 @@ export function editMenu(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, get, editMenu, getLevel }
|
export default { add, edit, del, get, editMenu, getCurrentUserRoleLevel }
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function resetPwd(ids) {
|
export function resetUserPasswordByIds(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/user/resetUserPasswordByIds',
|
url: 'api/user/resetUserPasswordByIds',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -36,7 +36,7 @@ export function resetPwd(ids) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function editUser(data) {
|
export function updateUserCenterInfoById(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/user/updateUserCenterInfoById',
|
url: 'api/user/updateUserCenterInfoById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -44,7 +44,7 @@ export function editUser(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updatePass(user) {
|
export function updateUserPasswordByUsername(user) {
|
||||||
const data = {
|
const data = {
|
||||||
oldPass: encrypt(user.oldPass),
|
oldPass: encrypt(user.oldPass),
|
||||||
newPass: encrypt(user.newPass)
|
newPass: encrypt(user.newPass)
|
||||||
@@ -56,7 +56,7 @@ export function updatePass(user) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateEmail(form) {
|
export function updateUserEmailByUsername(form) {
|
||||||
const data = {
|
const data = {
|
||||||
password: encrypt(form.pass),
|
password: encrypt(form.pass),
|
||||||
email: form.email
|
email: form.email
|
||||||
@@ -68,7 +68,7 @@ export function updateEmail(form) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryUserMetaPage(query) {
|
export function queryUserMetadataOptions(query) {
|
||||||
const params = {
|
const params = {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 50,
|
size: 50,
|
||||||
@@ -83,5 +83,5 @@ export function queryUserMetaPage(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, resetPwd, queryUserMetaPage }
|
export default { add, edit, del, resetUserPasswordByIds, queryUserMetadataOptions }
|
||||||
|
|
||||||
|
|||||||
@@ -57,15 +57,15 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.queryUserMetaPage(query)
|
this.queryUserMetadataOptions(query)
|
||||||
}, 200)
|
}, 200)
|
||||||
} else {
|
} else {
|
||||||
this.options = []
|
this.options = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryUserMetaPage(query, options) {
|
queryUserMetadataOptions(query, options) {
|
||||||
const that = this
|
const that = this
|
||||||
UserService.queryUserMetaPage(query).then(res => {
|
UserService.queryUserMetadataOptions(query).then(res => {
|
||||||
that.options = res
|
that.options = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -67,15 +67,15 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.queryUserMetaPage(query)
|
this.queryUserMetadataOptions(query)
|
||||||
}, 200)
|
}, 200)
|
||||||
} else {
|
} else {
|
||||||
this.options = []
|
this.options = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryUserMetaPage(query, options) {
|
queryUserMetadataOptions(query, options) {
|
||||||
const that = this
|
const that = this
|
||||||
UserService.queryUserMetaPage(query).then(res => {
|
UserService.queryUserMetadataOptions(query).then(res => {
|
||||||
that.options = res
|
that.options = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetch: async(queryParams) => {
|
fetch: async(queryParams) => {
|
||||||
return DictService.queryPageDict(queryParams)
|
return DictService.searchDict(queryParams)
|
||||||
},
|
},
|
||||||
pageProps: {
|
pageProps: {
|
||||||
current: 1,
|
current: 1,
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetch: async(queryParams) => {
|
fetch: async(queryParams) => {
|
||||||
return DictService.queryPageDict(queryParams)
|
return DictService.searchDict(queryParams)
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ prop: 'name', label: '名称' },
|
{ prop: 'name', label: '名称' },
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSupDepts(id) {
|
getSupDepts(id) {
|
||||||
crudDept.queryDeptSuperiorTree(id, true).then(res => {
|
crudDept.searchDeptTree(id, true).then(res => {
|
||||||
const data = res.content
|
const data = res.content
|
||||||
this.buildDepts(data)
|
this.buildDepts(data)
|
||||||
this.depts = data
|
this.depts = data
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getLastEmailConfig, modifyEmailConfig } from '@/api/system/email'
|
import { getLastEmailConfig, updateEmailConfigById } from '@/api/system/email'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Config',
|
name: 'Config',
|
||||||
@@ -67,7 +67,7 @@ export default {
|
|||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
modifyEmailConfig(this.form).then(res => {
|
updateEmailConfigById(this.form).then(res => {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '修改成功',
|
title: '修改成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { sendEmail } from '@/api/system/email'
|
import { send } from '@/api/system/email'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import E from 'wangeditor'
|
import E from 'wangeditor'
|
||||||
import { UploadFile } from '@/utils/CsDomUtil'
|
import { UploadFile } from '@/utils/CsDomUtil'
|
||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
sendEmail(this.form).then(res => {
|
send(this.form).then(res => {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '发送成功',
|
title: '发送成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
v-loading="crud.loading"
|
v-loading="crud.loading"
|
||||||
lazy
|
lazy
|
||||||
:load="queryMenuByArgs"
|
:load="searchMenu"
|
||||||
:data="crud.data"
|
:data="crud.data"
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@@ -273,14 +273,14 @@ export default {
|
|||||||
this.menus.push({ id: 0, label: '顶级类目', children: null })
|
this.menus.push({ id: 0, label: '顶级类目', children: null })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryMenuByArgs(tree, treeNode, resolve) {
|
searchMenu(tree, treeNode, resolve) {
|
||||||
const params = {
|
const params = {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 9999999,
|
size: 9999999,
|
||||||
args: { pid: tree.id }
|
args: { pid: tree.id }
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudMenu.queryMenuByArgs(params).then(res => {
|
crudMenu.searchMenu(params).then(res => {
|
||||||
resolve(res.content)
|
resolve(res.content)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -298,7 +298,7 @@ export default {
|
|||||||
},
|
},
|
||||||
loadMenus({ action, parentNode, callback }) {
|
loadMenus({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudMenu.queryMenuListByPid(parentNode.id).then(res => {
|
crudMenu.listMenuByPid(parentNode.id).then(res => {
|
||||||
parentNode.children = res.map(function(obj) {
|
parentNode.children = res.map(function(obj) {
|
||||||
if (!obj.leaf) {
|
if (!obj.leaf) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
|
|||||||
@@ -151,9 +151,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudRoles from '@/api/system/role'
|
import crudRoles, {getCurrentUserRoleLevel} from '@/api/system/role'
|
||||||
import { searchDept, queryDeptSuperiorTree } from '@/api/system/dept'
|
import { searchDept, searchDeptTree } from '@/api/system/dept'
|
||||||
import { queryChildMenuSet, queryMenuListByPid } from '@/api/system/menu'
|
import { listChildMenuSetByMenuId, listMenuByPid } from '@/api/system/menu'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -190,14 +190,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
crudRoles.getLevel().then(data => {
|
crudRoles.getCurrentUserRoleLevel().then(data => {
|
||||||
this.level = data.level
|
this.level = data.level
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMenuDatas(node, resolve) {
|
getMenuDatas(node, resolve) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
queryMenuListByPid(node.data.id ? node.data.id : 0).then(res => {
|
listMenuByPid(node.data.id ? node.data.id : 0).then(res => {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -261,7 +261,7 @@ export default {
|
|||||||
},
|
},
|
||||||
menuChange(menu) {
|
menuChange(menu) {
|
||||||
// 获取该节点的所有子节点,id 包含自身
|
// 获取该节点的所有子节点,id 包含自身
|
||||||
queryChildMenuSet(menu.id).then(childIds => {
|
listChildMenuSetByMenuId(menu.id).then(childIds => {
|
||||||
// 判断是否在 menuIds 中,如果存在则删除,否则添加
|
// 判断是否在 menuIds 中,如果存在则删除,否则添加
|
||||||
if (this.menuIds.indexOf(menu.id) !== -1) {
|
if (this.menuIds.indexOf(menu.id) !== -1) {
|
||||||
for (let i = 0; i < childIds.length; i++) {
|
for (let i = 0; i < childIds.length; i++) {
|
||||||
@@ -331,7 +331,7 @@ export default {
|
|||||||
depts.forEach(dept => {
|
depts.forEach(dept => {
|
||||||
ids.push(dept.id)
|
ids.push(dept.id)
|
||||||
})
|
})
|
||||||
queryDeptSuperiorTree(ids).then(res => {
|
searchDeptTree(ids).then(res => {
|
||||||
const date = res.content
|
const date = res.content
|
||||||
this.buildDepts(date)
|
this.buildDepts(date)
|
||||||
this.depts = date
|
this.depts = date
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ import { getToken } from '@/utils/auth'
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { IsValidPhone } from '@/utils/CsValidateUtil'
|
import { IsValidPhone } from '@/utils/CsValidateUtil'
|
||||||
import crud from '@/mixins/crud'
|
import crud from '@/mixins/crud'
|
||||||
import { editUser } from '@/api/system/user'
|
import { updateUserCenterInfoById } from '@/api/system/user'
|
||||||
import Avatar from '@/assets/images/avatar.png'
|
import Avatar from '@/assets/images/avatar.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -223,7 +223,7 @@ export default {
|
|||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.saveLoading = true
|
this.saveLoading = true
|
||||||
editUser(this.form).then(() => {
|
updateUserCenterInfoById(this.form).then(() => {
|
||||||
this.editSuccessNotify()
|
this.editSuccessNotify()
|
||||||
store.dispatch('GetInfo').then(() => {
|
store.dispatch('GetInfo').then(() => {
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { IsValidEmail } from '@/utils/CsValidateUtil'
|
import { IsValidEmail } from '@/utils/CsValidateUtil'
|
||||||
import { updateEmail } from '@/api/system/user'
|
import { updateUserEmailByUsername } from '@/api/system/user'
|
||||||
import { sendResetEmailCode } from '@/api/system/code'
|
import { sendResetEmailCode } from '@/api/system/code'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -113,7 +113,7 @@ export default {
|
|||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
updateEmail(this.form).then(res => {
|
updateUserEmailByUsername(this.form).then(res => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { updatePass } from '@/api/system/user'
|
import { updateUserPasswordByUsername } from '@/api/system/user'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
updatePass(this.form).then(res => {
|
updateUserPasswordByUsername(this.form).then(res => {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '密码修改成功,请重新登录',
|
title: '密码修改成功,请重新登录',
|
||||||
|
|||||||
@@ -196,9 +196,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import crudUser from '@/api/system/user'
|
import crudUser from '@/api/system/user'
|
||||||
import { IsValidPhone } from '@/utils/CsValidateUtil'
|
import { IsValidPhone } from '@/utils/CsValidateUtil'
|
||||||
import { searchDept, queryDeptSuperiorTree } from '@/api/system/dept'
|
import { searchDept, searchDeptTree } from '@/api/system/dept'
|
||||||
import { getLevel, queryRoleList } from '@/api/system/role'
|
import { getCurrentUserRoleLevel, listAllRole } from '@/api/system/role'
|
||||||
import { queryAllEnableJob } from '@/api/system/job'
|
import { searchJob } from '@/api/system/job'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -415,7 +415,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSupDepts(deptId) {
|
getSupDepts(deptId) {
|
||||||
queryDeptSuperiorTree(deptId).then(res => {
|
searchDeptTree(deptId).then(res => {
|
||||||
const date = res.content
|
const date = res.content
|
||||||
this.buildDepts(date)
|
this.buildDepts(date)
|
||||||
this.depts = date
|
this.depts = date
|
||||||
@@ -469,21 +469,21 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取弹窗内角色数据
|
// 获取弹窗内角色数据
|
||||||
getRoles() {
|
getRoles() {
|
||||||
queryRoleList().then(res => {
|
listAllRole().then(res => {
|
||||||
this.roles = res
|
this.roles = res
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取弹窗内岗位数据
|
// 获取弹窗内岗位数据
|
||||||
getJobs() {
|
getJobs() {
|
||||||
queryAllEnableJob().then(res => {
|
searchJob().then(res => {
|
||||||
this.jobs = res.content
|
this.jobs = res.content
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取权限级别
|
// 获取权限级别
|
||||||
getRoleLevel() {
|
getRoleLevel() {
|
||||||
getLevel().then(res => {
|
getCurrentUserRoleLevel().then(res => {
|
||||||
this.level = res.level
|
this.level = res.level
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
@@ -502,7 +502,7 @@ export default {
|
|||||||
ids.push(val.id)
|
ids.push(val.id)
|
||||||
})
|
})
|
||||||
console.log(ids)
|
console.log(ids)
|
||||||
crudUser.resetPwd(ids).then(() => {
|
crudUser.resetUserPasswordByIds(ids).then(() => {
|
||||||
this.crud.notify('重置成功, 用户新密码:123456', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('重置成功, 用户新密码:123456', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user