|
|
@ -1,6 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="菜单列表" |
|
|
|
|
|
|
|
|
:title="buttons.menuList || '菜单列表'" |
|
|
@close="close" |
|
|
@close="close" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
:visible.sync="visible"> |
|
|
:visible.sync="visible"> |
|
|
@ -15,19 +15,19 @@ |
|
|
prop="name" |
|
|
prop="name" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
min-width="150" |
|
|
min-width="150" |
|
|
label="名称"> |
|
|
|
|
|
|
|
|
:label="buttons.name || '名称'"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="parentName" |
|
|
prop="parentName" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="120" |
|
|
width="120" |
|
|
label="上级菜单"> |
|
|
|
|
|
|
|
|
:label="buttons.parentName || '上级菜单'"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
label="图标"> |
|
|
|
|
|
|
|
|
:label="buttons.icon || '图标'"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<icon-svg :name="scope.row.icon || ''"></icon-svg> |
|
|
<icon-svg :name="scope.row.icon || ''"></icon-svg> |
|
|
</template> |
|
|
</template> |
|
|
@ -36,11 +36,12 @@ |
|
|
prop="type" |
|
|
prop="type" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
label="类型"> |
|
|
|
|
|
|
|
|
:label="buttons.type || '类型'"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-link v-if="scope.row.type === 0" type="success">目录</el-link> |
|
|
|
|
|
<el-link v-else-if="scope.row.type === 1" size="small" type="success">菜单</el-link> |
|
|
|
|
|
<el-link v-else-if="scope.row.type === 2" size="small" type="info">按钮</el-link> |
|
|
|
|
|
|
|
|
<el-link v-if="scope.row.type === 0" type="success">{{ buttons.type1 || '目录' }}</el-link> |
|
|
|
|
|
<el-link v-else-if="scope.row.type === 1" size="small" type="success">{{ buttons.type2 || '菜单' }} |
|
|
|
|
|
</el-link> |
|
|
|
|
|
<el-link v-else-if="scope.row.type === 2" size="small" type="info">{{ buttons.type3 || '按钮' }}</el-link> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -48,10 +49,10 @@ |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="150" |
|
|
width="150" |
|
|
label="操作"> |
|
|
|
|
|
|
|
|
:label="buttons.cz || '操作'"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a v-if="isAuth('sys:oss:all') && scope.row.type === 1 " type="text" size="small" |
|
|
<a v-if="isAuth('sys:oss:all') && scope.row.type === 1 " type="text" size="small" |
|
|
@click="helpFileList(scope.row.menuId)">帮助文档</a> |
|
|
|
|
|
|
|
|
@click="helpFileList(scope.row.menuId)">{{ buttons.helpFileList || '帮助文档' }}</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -59,15 +60,18 @@ |
|
|
<FileList ref="helpFileList" v-if="helpFileVisible"></FileList> |
|
|
<FileList ref="helpFileList" v-if="helpFileVisible"></FileList> |
|
|
</div> |
|
|
</div> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="visible = false">关闭</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="visible = false">{{ buttons.close || '关闭' }}</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
searchFunctionButtonList, |
|
|
|
|
|
} from "@/api/sysLanguage.js" |
|
|
import FileList from '../common/file-list' |
|
|
import FileList from '../common/file-list' |
|
|
import { treeDataTranslate } from '@/utils' |
|
|
|
|
|
|
|
|
import {treeDataTranslate} from '@/utils' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -75,11 +79,28 @@ export default { |
|
|
dataForm: {}, |
|
|
dataForm: {}, |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
tableHeight: 0, |
|
|
tableHeight: 0, |
|
|
visible:false, |
|
|
|
|
|
|
|
|
visible: false, |
|
|
dataListLoading: false, |
|
|
dataListLoading: false, |
|
|
addOrUpdateVisible: false, |
|
|
addOrUpdateVisible: false, |
|
|
menuLanguageVisible: false, |
|
|
menuLanguageVisible: false, |
|
|
helpFileVisible: false, |
|
|
helpFileVisible: false, |
|
|
|
|
|
buttons: { |
|
|
|
|
|
menuList: '菜单列表', |
|
|
|
|
|
name: '名称', |
|
|
|
|
|
cz: '操作', |
|
|
|
|
|
upload: '上传', |
|
|
|
|
|
delete: '删除', |
|
|
|
|
|
fileDownload: '下载', |
|
|
|
|
|
deleteList: '批量删除', |
|
|
|
|
|
helpFileList: '帮助文档', |
|
|
|
|
|
parentName: '上级菜单', |
|
|
|
|
|
icon: '图标', |
|
|
|
|
|
type: '类型', |
|
|
|
|
|
type1: '目录', |
|
|
|
|
|
type2: '菜单', |
|
|
|
|
|
type3: '按钮', |
|
|
|
|
|
close: '关闭' |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: { |
|
|
components: { |
|
|
@ -90,22 +111,36 @@ export default { |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.tableHeight = (window.innerHeight*0.65); |
|
|
|
|
|
|
|
|
this.tableHeight = (window.innerHeight * 0.65); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
init(){ |
|
|
|
|
|
|
|
|
// 获取button的词典 |
|
|
|
|
|
getFunctionButtonList() { |
|
|
|
|
|
let queryButton = { |
|
|
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
tableId: '*', |
|
|
|
|
|
languageCode: this.$i18n.locale, |
|
|
|
|
|
objectType: 'button' |
|
|
|
|
|
} |
|
|
|
|
|
searchFunctionButtonList(queryButton).then(({data}) => { |
|
|
|
|
|
if (data.code == 0 && data.data) { |
|
|
|
|
|
this.buttons = data.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
init() { |
|
|
this.visible = true |
|
|
this.visible = true |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
getDataList () { |
|
|
|
|
|
|
|
|
getDataList() { |
|
|
this.dataListLoading = true |
|
|
this.dataListLoading = true |
|
|
this.$http({ |
|
|
this.$http({ |
|
|
url: this.$http.adornUrl('/sys/menu/list/'+this.$i18n.locale), |
|
|
|
|
|
|
|
|
url: this.$http.adornUrl('/sys/menu/list/' + this.$i18n.locale), |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: this.$http.adornParams() |
|
|
params: this.$http.adornParams() |
|
|
}).then(({data}) => { |
|
|
}).then(({data}) => { |
|
|
this.dataList = data.filter( item => item.type === 1 && item.menuType === 'pc') |
|
|
|
|
|
|
|
|
this.dataList = data.filter(item => item.type === 1 && item.menuType === 'pc') |
|
|
this.dataListLoading = false |
|
|
this.dataListLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -123,9 +158,12 @@ export default { |
|
|
this.$refs.helpFileList.init(fileMappingDto) |
|
|
this.$refs.helpFileList.init(fileMappingDto) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
close(){ |
|
|
|
|
|
|
|
|
close() { |
|
|
this.dataList = [] |
|
|
this.dataList = [] |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
this.getFunctionButtonList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |