|
|
@ -33,6 +33,7 @@ |
|
|
|
|
|
|
|
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|
|
|
<el-table-column prop="name" :label="$t('menu.name')" header-align="center" min-width="150"></el-table-column> |
|
|
|
<el-table-column prop="originName" label="原名" header-align="center" min-width="150"></el-table-column> |
|
|
|
<el-table-column prop="icon" :label="$t('menu.icon')" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${scope.row.icon}`"></use></svg> |
|
|
@ -49,7 +50,7 @@ |
|
|
|
|
|
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
<el-button type="text" size="small" @click="onAddOrUpdateClick(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
<el-button type="text" size="small" v-if="scope.row.useFlag == '0'" @click="open(scope.row.id)">{{ '开启' }}</el-button> |
|
|
|
<el-button type="text" size="small" v-if="scope.row.useFlag == '1'" @click="close(scope.row.id)">{{ '关闭' }}</el-button> |
|
|
|
</template> |
|
|
@ -298,13 +299,13 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
open(id) { |
|
|
|
open(menuId) { |
|
|
|
let menuIds = []; |
|
|
|
this.multipleSelection = []; |
|
|
|
this.getData(this.dataList); |
|
|
|
|
|
|
|
if (id != '') { |
|
|
|
menuIds = [id]; |
|
|
|
if (menuId != '') { |
|
|
|
menuIds = [menuId]; |
|
|
|
} else { |
|
|
|
if (this.multipleSelection.length > 0) { |
|
|
|
menuIds = this.multipleSelection; |
|
|
@ -314,8 +315,9 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
let params = { |
|
|
|
ids: menuIds, |
|
|
|
use: '1' |
|
|
|
menuIds: menuIds, |
|
|
|
use: '1', |
|
|
|
customerId: this.customerId |
|
|
|
}; |
|
|
|
this.$http.post('/gov/access/govMenuCustomerRelation/useUpdate/', params).then(({ data: res }) => { |
|
|
|
console.log(res); |
|
|
@ -325,13 +327,13 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
close(id) { |
|
|
|
close(menuId) { |
|
|
|
let menuIds = []; |
|
|
|
this.multipleSelection = []; |
|
|
|
this.getData(this.dataList); |
|
|
|
|
|
|
|
if (id != '') { |
|
|
|
menuIds = [id]; |
|
|
|
if (menuId != '') { |
|
|
|
menuIds = [menuId]; |
|
|
|
} else { |
|
|
|
if (this.multipleSelection.length > 0) { |
|
|
|
menuIds = this.multipleSelection; |
|
|
@ -340,8 +342,9 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
let params = { |
|
|
|
ids: menuIds, |
|
|
|
use: '0' |
|
|
|
menuIds: menuIds, |
|
|
|
use: '0', |
|
|
|
customerId: this.customerId |
|
|
|
}; |
|
|
|
this.$http.post('/gov/access/govMenuCustomerRelation/useUpdate/', params).then(({ data: res }) => { |
|
|
|
console.log(res); |
|
|
@ -407,7 +410,16 @@ export default { |
|
|
|
// 取消 |
|
|
|
diaCancel() { |
|
|
|
this.$emit('cancleBack'); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
onAddOrUpdateClick(menuId) { |
|
|
|
this.addOrUpdateVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.addOrUpdate.dataForm.customerId = this.customerId |
|
|
|
this.$refs.addOrUpdate.dataForm.id = menuId |
|
|
|
this.$refs.addOrUpdate.init() |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|