commit
This commit is contained in:
@@ -300,11 +300,11 @@ export default {
|
||||
// path: '/convertDocView',
|
||||
// menuId: '3F52K25546'
|
||||
// },
|
||||
{
|
||||
title: '菜单管理',
|
||||
path: '/menuManage',
|
||||
menuId: '82665e94d406c6fc0d1f627e5880230b'
|
||||
},
|
||||
// {
|
||||
// title: '菜单管理',
|
||||
// path: '/menuManage',
|
||||
// menuId: '82665e94d406c6fc0d1f627e5880230b'
|
||||
// },
|
||||
// // {
|
||||
// // title: '保密管理',
|
||||
// // path: '/convertDocView'
|
||||
|
||||
@@ -3,15 +3,11 @@
|
||||
<div class="nav-menu">
|
||||
<div class="lattice">
|
||||
<div class="menu-wrap">
|
||||
<enter-card label="高级检索" path="/advancedSearch"></enter-card>
|
||||
<enter-card label="个人中心" path="/collection"></enter-card>
|
||||
<enter-card label="统计图表" path="/"></enter-card>
|
||||
<enter-card label="国内法规" path="/domesticStandardsAndRegulations"></enter-card>
|
||||
<enter-card label="国外法规" path="/foreignStandardsAndRegulations"></enter-card>
|
||||
<enter-card label="标准清单" path="/accessStandardsAndRegulations"></enter-card>
|
||||
<enter-card label="国内外政策" path="/"></enter-card>
|
||||
<enter-card label="企业标准" path="/"></enter-card>
|
||||
<enter-card label="标准预警" path="/standardWarning"></enter-card>
|
||||
<enter-card v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:path="item.path"
|
||||
:class="list.length === 1 ? 'wx-card1' : (list.length == 2 ? 'wx-card2' :'')"></enter-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -25,12 +21,32 @@
|
||||
mixins: [],
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData (){
|
||||
this.$http.get('/sarPersonalCenter/sar-user-personal-menu/getList',
|
||||
{
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {_this: this}, res => {
|
||||
if (res.ok) {
|
||||
res.data.records.forEach( item => {
|
||||
if (item.state == 1) {
|
||||
var json = {}
|
||||
json.label = item.menuName
|
||||
json.path = item.menuUrl
|
||||
this.list.push(json)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
toPage() {
|
||||
this.$router.push(this.path)
|
||||
}
|
||||
@@ -42,6 +58,7 @@
|
||||
.nav-menu {
|
||||
.lattice {
|
||||
.menu-wrap {
|
||||
height: 324px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content:space-between;
|
||||
@@ -55,6 +72,12 @@
|
||||
width: 32%;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
.wx-card1 {
|
||||
width: 100%;
|
||||
}
|
||||
.wx-card2 {
|
||||
width: 49%;
|
||||
}
|
||||
.menu-item {
|
||||
flex: 1;
|
||||
line-height: 88px;
|
||||
|
||||
@@ -50,11 +50,14 @@ export default {
|
||||
methods: {
|
||||
// 右侧列表元素变化时触发
|
||||
handleChange (newTargetKeys, direction, moveKeys) {
|
||||
if (direction === 'left') {
|
||||
if (newTargetKeys.length > 9) {
|
||||
this.$message.warning('个人展示模块最多仅能展示9个')
|
||||
}
|
||||
if (direction === 'left') {
|
||||
this.oldData.forEach( item => {
|
||||
moveKeys.forEach( items => {
|
||||
if (items === item.id) {
|
||||
item.state = 1
|
||||
item.state = 0
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -62,7 +65,7 @@ export default {
|
||||
this.oldData.forEach( item => {
|
||||
moveKeys.forEach( items => {
|
||||
if (items === item.id) {
|
||||
item.state = 0
|
||||
item.state = 1
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -71,8 +74,8 @@ export default {
|
||||
this.numData = []
|
||||
},
|
||||
selectedChange (sourceSelectedKeys, targetSelectedKeys) {
|
||||
this.numData = sourceSelectedKeys
|
||||
this.sourceSelectedKeys = targetSelectedKeys
|
||||
this.numData = sourceSelectedKeys
|
||||
this.sourceSelectedKeys = targetSelectedKeys
|
||||
},
|
||||
savePersonal () {
|
||||
if (this.targetKeys.length === 0) {
|
||||
@@ -81,6 +84,9 @@ export default {
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
} else if (this.targetKeys.length > 9) {
|
||||
this.$message.warning('个人展示模块最多仅能展示9个')
|
||||
return
|
||||
}
|
||||
this.$http.postData('sarPersonalCenter/sar-user-personal-menu/update',
|
||||
{
|
||||
@@ -107,7 +113,7 @@ export default {
|
||||
res.data.records.map((item) => {
|
||||
if (item.menuName === '首页') {
|
||||
this.selected.push(item)
|
||||
} else if (item.state == 0) {
|
||||
} else if (item.state == 1) {
|
||||
this.selected.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user