{{scope.row.method}}
@@ -64,7 +64,7 @@
layout="total, sizes, prev, pager, next, jumper"
>
-
+
@@ -107,7 +107,7 @@ import {
deleteApi
} from '@/api/api'
import infoList from '@/components/mixins/infoList'
-import {toSQLLine} from '@/utils/stringFun'
+import { toSQLLine } from '@/utils/stringFun'
const methodOptions = [
{
value: 'POST',
@@ -138,6 +138,7 @@ export default {
return {
listApi: getApiList,
dialogFormVisible: false,
+ dialogTitle: '新增Api',
form: {
path: '',
apiGroup: '',
@@ -148,7 +149,9 @@ export default {
type: '',
rules: {
path: [{ required: true, message: '请输入api路径', trigger: 'blur' }],
- apiGroup: [{ required: true, message: '请输入组名称', trigger: 'blur' }],
+ apiGroup: [
+ { required: true, message: '请输入组名称', trigger: 'blur' }
+ ],
method: [
{ required: true, message: '请选择请求方式', trigger: 'blur' }
],
@@ -160,12 +163,12 @@ export default {
},
methods: {
// 排序
- sortChange({prop,order}){
- if(prop){
+ sortChange({ prop, order }) {
+ if (prop) {
this.searchInfo.orderKey = toSQLLine(prop)
- this.searchInfo.desc = order=="descending"
+ this.searchInfo.desc = order == 'descending'
}
- this.getTableData()
+ this.getTableData()
},
//条件搜索前端看此方法
onSubmit() {
@@ -181,6 +184,16 @@ export default {
this.dialogFormVisible = false
},
openDialog(type) {
+ switch (type) {
+ case 'addApi':
+ this.dialogTitlethis = '新增Api'
+ break
+ case 'edit':
+ this.dialogTitlethis = '编辑Api'
+ break
+ default:
+ break
+ }
this.type = type
this.dialogFormVisible = true
},
diff --git a/web/src/view/superAdmin/authority/authority.vue b/web/src/view/superAdmin/authority/authority.vue
index 7f4865d7..5cf9e9e9 100644
--- a/web/src/view/superAdmin/authority/authority.vue
+++ b/web/src/view/superAdmin/authority/authority.vue
@@ -22,7 +22,7 @@
-
+
@@ -79,6 +79,7 @@ export default {
drawer: false,
activeRow: {},
activeUserId: 0,
+ dialogTitle:"新增角色",
dialogFormVisible: false,
apiDialogFlag: false,
form: {
diff --git a/web/src/view/superAdmin/menu/menu.vue b/web/src/view/superAdmin/menu/menu.vue
index 4eee179e..4fce4fdb 100644
--- a/web/src/view/superAdmin/menu/menu.vue
+++ b/web/src/view/superAdmin/menu/menu.vue
@@ -35,7 +35,7 @@
-
+
@@ -89,6 +89,7 @@ export default {
return {
listApi: getMenuList,
dialogFormVisible: false,
+ dialogTitle:"新增菜单",
form: {
ID: 0,
path: '',
@@ -198,12 +199,14 @@ export default {
},
// 添加菜单方法,id为 0则为添加根菜单
addMenu(id) {
+ this.dialogTitle = "新增菜单"
this.form.parentId = String(id)
this.isEdit = false
this.dialogFormVisible = true
},
// 修改菜单方法
async editMenu(id) {
+ this.dialogTitle = "编辑菜单"
const res = await getBaseMenuById({ id })
this.form = res.data.menu
this.dialogFormVisible = true