feat: acs国际化
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="模糊搜索"
|
||||
:placeholder="$t('menu.placeholder.fuzzy_search')"
|
||||
style="width: 200px;margin-bottom: 10px"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="queryBlurry"
|
||||
@@ -16,7 +16,7 @@
|
||||
<el-select
|
||||
v-model="query.system_type"
|
||||
style="width: 100px; height: 35px;top: -5px;"
|
||||
placeholder="所属系统"
|
||||
:placeholder="$t('menu.placeholder.owning_system')"
|
||||
@change="changetype"
|
||||
>
|
||||
<el-option
|
||||
@@ -81,15 +81,36 @@
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单可见" prop="hidden">
|
||||
<el-radio-group v-model="form.hidden" size="mini">
|
||||
<el-radio-button label="true">是</el-radio-button>
|
||||
<el-radio-button label="false">否</el-radio-button>
|
||||
<el-radio-button label="false">是</el-radio-button>
|
||||
<el-radio-button label="true">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type.toString() !== '2'" label="菜单标题" prop="title">
|
||||
<el-form-item v-if="form.type.toString() !== '2'" label="默认标题" prop="title">
|
||||
<el-input
|
||||
v-model="form.title"
|
||||
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||
placeholder="菜单标题"
|
||||
placeholder="默认标题"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type.toString() !== '2'" label="中文标题" prop="zh_title">
|
||||
<el-input
|
||||
v-model="form.zh_title"
|
||||
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||
placeholder="中文标题"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type.toString() !== '2'" label="英文标题" prop="en_title">
|
||||
<el-input
|
||||
v-model="form.en_title"
|
||||
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||
placeholder="英文标题"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type.toString() !== '2'" label="印尼标题" prop="in_title">
|
||||
<el-input
|
||||
v-model="form.in_title"
|
||||
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||
placeholder="印尼标题"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type.toString() === '2'" label="按钮名称" prop="title">
|
||||
@@ -149,46 +170,46 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="菜单标题" prop="title" :min-width="100" />
|
||||
<el-table-column label="所属系统" prop="system_type" :min-width="flexWidth('system_type',crud.data,'所属系统')">
|
||||
<el-table-column :label="$t('menu.table_title.menu_title')" :prop="$langPre.computedProp('title')" :min-width="flexWidth($langPre.computedProp('title'),crud.data,$t('menu.table_title.menu_title'))" />
|
||||
<el-table-column :label="$t('menu.table_title.system')" prop="system_type" :min-width="flexWidth('system_type',crud.data,$t('menu.table_title.system'))">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.system_type[scope.row.system_type] }} : {{ scope.row.system_type }}
|
||||
{{ dict.label.system_type[scope.row.system_type] }} : {{scope.row.system_type}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="icon" label="图标" align="center" :min-width="flexWidth('icon',crud.data,'图标')">
|
||||
<el-table-column prop="icon" :label="$t('menu.table_title.icon')" align="center" :min-width="flexWidth('icon',crud.data, $t('menu.table_title.system'))">
|
||||
<template slot-scope="scope">
|
||||
<svg-icon :icon-class="scope.row.icon ? scope.row.icon : ''" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="menu_sort" align="center" label="排序" :min-width="flexWidth('menu_sort',crud.data,'排序')">
|
||||
<el-table-column prop="menu_sort" align="center" :label="$t('menu.table_title.sort')" :min-width="flexWidth('menu_sort',crud.data,$t('menu.table_title.sort'))">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.menu_sort }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="permission" label="权限标识" :min-width="flexWidth('permission',crud.data,'权限标识')" />
|
||||
<el-table-column prop="component" label="组件路径" min-width="120" />
|
||||
<el-table-column prop="iframe" label="外链" :formatter="crud.formatIsOrNot" :min-width="flexWidth('iframe',crud.data,'外链')">
|
||||
<el-table-column prop="permission" :label="$t('menu.table_title.permission_ident')" :min-width="flexWidth('permission',crud.data,$t('menu.table_title.permission_ident'))" />
|
||||
<el-table-column prop="component" :label="$t('menu.table_title.path')" min-width="120" />
|
||||
<el-table-column prop="iframe" :label="$t('menu.table_title.outside_chain')" :formatter="crud.formatIsOrNot" :min-width="flexWidth('iframe',crud.data,$t('menu.table_title.outside_chain'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.iframe">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cache" label="缓存" :formatter="crud.formatIsOrNot" :min-width="flexWidth('cache',crud.data,'缓存')">
|
||||
<el-table-column prop="cache" :label="$t('menu.table_title.cache')" :formatter="crud.formatIsOrNot" :min-width="flexWidth('cache',crud.data,$t('menu.table_title.cache'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.cache">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="hidden" label="可见" :formatter="crud.formatIsOrNot" :min-width="flexWidth('hidden',crud.data,'可见')">
|
||||
<el-table-column prop="hidden" :label="$t('menu.table_title.visible')" :formatter="crud.formatIsOrNot" :min-width="flexWidth('hidden',crud.data,$t('menu.table_title.visible'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.hidden">否</span>
|
||||
<span v-else>是</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建日期" :min-width="flexWidth('create_time',crud.data,'创建日期')" />
|
||||
<el-table-column prop="create_time" :label="$t('menu.table_title.create_time')" :min-width="flexWidth('create_time',crud.data,$t('menu.table_title.create_time'))" />
|
||||
<el-table-column
|
||||
v-permission="['admin','menu:edit','menu:del']"
|
||||
label="操作"
|
||||
:label="$t('common.Operate')"
|
||||
width="130px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
@@ -197,7 +218,7 @@
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||
:msg="$t('menu.msg.delete_msg')"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -222,6 +243,9 @@ import Dict from '../../../components/Dict/Dict'
|
||||
const defaultForm = {
|
||||
menu_id: null,
|
||||
title: null,
|
||||
en_title: null,
|
||||
in_title: null,
|
||||
zh_title: null,
|
||||
menu_sort: 999,
|
||||
path: null,
|
||||
system_type: null,
|
||||
@@ -233,15 +257,15 @@ const defaultForm = {
|
||||
pid: 0,
|
||||
icon: null,
|
||||
cache: false,
|
||||
hidden: true,
|
||||
type: 0,
|
||||
hidden: false,
|
||||
type: 2,
|
||||
permission: null
|
||||
}
|
||||
export default {
|
||||
name: 'Menu',
|
||||
components: { Treeselect, IconSelect, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '菜单', idField: 'menu_id', url: 'api/sysMenu', crudMethod: { ...crudMenu }, sort: 'menu_sort,asc'})
|
||||
return CRUD({ title: '菜单', idField: 'menu_id', url: 'api/sysMenu', crudMethod: { ...crudMenu }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['system_type'],
|
||||
@@ -259,6 +283,15 @@ export default {
|
||||
title: [
|
||||
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||
],
|
||||
zh_title: [
|
||||
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||
],
|
||||
en_title: [
|
||||
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||
],
|
||||
in_title: [
|
||||
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||
],
|
||||
path: [
|
||||
{ required: true, message: '请输入地址', trigger: 'blur' }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user