5 changed files with 167 additions and 25 deletions
-
2src/views/modules/common/file-list.vue
-
131src/views/modules/oss/file-menu.vue
-
53src/views/modules/oss/oss.vue
-
2src/views/modules/shopOrder/shopOrder/shopOrder.vue
-
4src/views/modules/yieldReport/print_roll_label.js
@ -0,0 +1,131 @@ |
|||
<template> |
|||
<el-dialog |
|||
title="菜单列表" |
|||
@close="close" |
|||
:close-on-click-modal="false" |
|||
:visible.sync="visible"> |
|||
<div class="mod-menu"> |
|||
<el-table |
|||
:data="dataList" |
|||
v-loading="dataListLoading" |
|||
border |
|||
:height="tableHeight" |
|||
style="width: 100%; "> |
|||
<el-table-column |
|||
prop="name" |
|||
header-align="center" |
|||
min-width="150" |
|||
label="名称"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="parentName" |
|||
header-align="center" |
|||
align="center" |
|||
width="120" |
|||
label="上级菜单"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
header-align="center" |
|||
align="center" |
|||
label="图标"> |
|||
<template slot-scope="scope"> |
|||
<icon-svg :name="scope.row.icon || ''"></icon-svg> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="type" |
|||
header-align="center" |
|||
align="center" |
|||
label="类型"> |
|||
<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> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
fixed="right" |
|||
header-align="center" |
|||
align="center" |
|||
width="150" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a v-if="isAuth('sys:oss:all') && scope.row.type === 1 " type="text" size="small" |
|||
@click="helpFileList(scope.row.menuId)">帮助文档</a> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<FileList ref="helpFileList" v-if="helpFileVisible"></FileList> |
|||
</div> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="visible = false">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import FileList from '../common/file-list' |
|||
import { treeDataTranslate } from '@/utils' |
|||
export default { |
|||
data() { |
|||
return { |
|||
// height: 450, |
|||
dataForm: {}, |
|||
dataList: [], |
|||
tableHeight: 0, |
|||
visible:false, |
|||
dataListLoading: false, |
|||
addOrUpdateVisible: false, |
|||
menuLanguageVisible: false, |
|||
helpFileVisible: false, |
|||
} |
|||
}, |
|||
components: { |
|||
FileList |
|||
}, |
|||
activated() { |
|||
this.getDataList() |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.tableHeight = (window.innerHeight*0.65); |
|||
}) |
|||
}, |
|||
methods: { |
|||
init(){ |
|||
this.visible = true |
|||
this.getDataList() |
|||
}, |
|||
getDataList () { |
|||
this.dataListLoading = true |
|||
this.$http({ |
|||
url: this.$http.adornUrl('/sys/menu/list/'+this.$i18n.locale), |
|||
method: 'get', |
|||
params: this.$http.adornParams() |
|||
}).then(({data}) => { |
|||
this.dataList = data.filter( item => item.type === 1 && item.menuType === 'pc') |
|||
this.dataListLoading = false |
|||
}) |
|||
}, |
|||
// 帮助文档列表 |
|||
helpFileList(val) { |
|||
let fileMappingDto = { |
|||
fileId: '', |
|||
fileType: '功能帮助文档', |
|||
orderRef1: val, |
|||
orderRef2: '*', |
|||
orderRef3: '*', |
|||
} |
|||
this.helpFileVisible = true; |
|||
this.$nextTick(() => { |
|||
this.$refs.helpFileList.init(fileMappingDto) |
|||
}) |
|||
}, |
|||
close(){ |
|||
this.dataList = [] |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue