提交 5f8a0126 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

feat: 路由名称改为英文

上级 14a5d7f6
......@@ -45,7 +45,7 @@ export default {
return false
}
// return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
return name.trim().toLocaleLowerCase() === '仪表板'.toLocaleLowerCase()
return name.trim().toLocaleLowerCase() === 'panel'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
......
<template>
<layout-content :header="formType=='add' ? $t('datasource.create') : $t('datasource.modify')" back-name="数据源">
<layout-content :header="formType=='add' ? $t('datasource.create') : $t('datasource.modify')" back-name="datasource">
<el-form ref="dsForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" autocomplete="off" />
......@@ -127,7 +127,7 @@ export default {
}
},
backToList() {
this.$router.push({ name: '数据源' })
this.$router.push({ name: 'datasource' })
}
}
}
......
......@@ -165,7 +165,7 @@ export default {
// this.dialogVisible = true
// },
create() {
this.$router.push({ name: '数据源表单' })
this.$router.push({ name: 'datasource-form' })
},
// edit(row) {
......@@ -175,7 +175,7 @@ export default {
// this.form.configuration = JSON.parse(this.form.configuration)
// },
edit(row) {
this.$router.push({ name: '数据源表单', params: row })
this.$router.push({ name: 'datasource-form', params: row })
},
_handleDelete(datasource) {
......
<template>
<layout-content :header="formType=='add' ? $t('organization.create') : $t('organization.modify')" back-name="组织管理">
<layout-content :header="formType=='add' ? $t('organization.create') : $t('organization.modify')" back-name="system-dept">
<el-form ref="deptForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('organization.name')" prop="name">
<el-input v-model="form.name" />
......@@ -157,7 +157,7 @@ export default {
})
},
backToList() {
this.$router.push({ name: '组织管理' })
this.$router.push({ name: 'system-dept' })
}
}
}
......
......@@ -7,7 +7,7 @@
>
<template #toolbar>
<el-button v-permission="['dept:add']" icon="el-icon-circle-plus-outline" @click="create">{{ $t('organization.create') }}</el-button>
</template>
</template>
<el-table
ref="table"
:data="tableData"
......@@ -184,10 +184,10 @@ export default {
// this.treeByRow(row)
// },
create() {
this.$router.push({ name: '组织表单' })
this.$router.push({ name: 'system-dept-form' })
},
edit(row) {
this.$router.push({ name: '组织表单', params: row })
this.$router.push({ name: 'system-dept-form', params: row })
},
treeByRow(row) {
......
<template>
<layout-content :header="formType=='add' ? $t('menu.create') : $t('menu.modify')" back-name="菜单管理">
<layout-content :header="formType=='add' ? $t('menu.create') : $t('menu.modify')" back-name="system-menu">
<el-form ref="menuForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item label="菜单类型" prop="type">
<el-radio-group v-model="form.type" size="mini" :disabled="formType!=='add'">
......@@ -167,7 +167,7 @@ export default {
})
},
backToList() {
this.$router.push({ name: '菜单管理' })
this.$router.push({ name: 'system-menu' })
}
}
}
......
......@@ -201,7 +201,7 @@ export default {
// this.formType = 'add'
// },
create() {
this.$router.push({ name: '菜单表单' })
this.$router.push({ name: 'system-menu-form' })
},
search(condition) {
console.log(condition)
......@@ -215,7 +215,7 @@ export default {
// this.treeByRow(row)
// },
edit(row) {
this.$router.push({ name: '菜单表单', params: row })
this.$router.push({ name: 'system-menu-form', params: row })
},
treeByRow(row) {
......
<template>
<layout-content :header="formType=='add' ? $t('role.add') : $t('role.modify')" back-name="角色管理">
<layout-content :header="formType=='add' ? $t('role.add') : $t('role.modify')" back-name="system-role">
<el-form ref="roleForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" />
</el-form-item>
<el-form-item :label="$t('commons.description')" prop="description">
<el-form-item :label="$t('commons.description')" prop="description">
<el-input v-model="form.description" type="textarea" />
</el-form-item>
<el-form-item>
......@@ -97,7 +97,7 @@ export default {
}
},
backToList() {
this.$router.push({ name: '角色管理' })
this.$router.push({ name: 'system-role' })
}
}
}
......
......@@ -148,7 +148,7 @@ export default {
console.log(tab, event)
},
create() {
this.$router.push({ name: '角色表单' })
this.$router.push({ name: 'system-role-form' })
},
search(condition) {
const temp = formatCondition(condition)
......@@ -160,7 +160,7 @@ export default {
})
},
edit(row) {
this.$router.push({ name: '角色表单', params: row })
this.$router.push({ name: 'system-role-form', params: row })
},
saveRole(roleForm) {
......@@ -250,9 +250,9 @@ export default {
this.$refs.menu.setCheckedKeys(this.menuIds)
},
handleDelete(row) {
this.$confirm( this.$t('commons.confirm_delete') + ": " + row.name + '?', this.$t('role.tips'), {
this.$confirm(this.$t('commons.confirm_delete') + ': ' + row.name + '?', this.$t('role.tips'), {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
delRole(row.roleId).then(res => {
......
<template>
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="用户管理">
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="system-user">
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('commons.name')" prop="username">
<el-input v-model="form.username" />
......@@ -258,7 +258,7 @@ export default {
})
},
backToList() {
this.$router.push({ name: '用户管理' })
this.$router.push({ name: 'system-user' })
},
filterData(instanceId) {
const results = this.depts.map(node => {
......
......@@ -299,7 +299,7 @@ export default {
})
},
create() {
this.$router.push({ name: '用户表单' })
this.$router.push({ name: 'system-user-form' })
},
// create() {
// this.depts = null
......@@ -308,7 +308,7 @@ export default {
// this.dialogVisible = true
// },
edit(row) {
this.$router.push({ name: '用户表单', params: row })
this.$router.push({ name: 'system-user-form', params: row })
},
// edit(row) {
// this.depts = null
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论