Browse Source

启动页配置

preview
jiangyy 4 years ago
parent
commit
776dd908c4
  1. 2
      epmet-oper-web/.vscode/settings.json
  2. 22
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  3. 290
      epmet-oper-web/src/views/modules/customer/customize/StartPage copy.vue
  4. 366
      epmet-oper-web/src/views/modules/customer/customize/StartPage.vue
  5. 236
      epmet-oper-web/src/views/modules/productConfig/workRoleAuth.vue
  6. 123
      epmet-oper-web/src/views/modules/workPc/startupConfig.vue

2
epmet-oper-web/.vscode/settings.json

@ -1,6 +1,6 @@
{
"workbench.colorTheme": "One Monokai",
"window.zoomLevel": 3,
"window.zoomLevel": 2,
"terminal.integrated.fontWeightBold": "normal",
"workbench.iconTheme": "material-icon-theme",
// vscodetabsize

22
epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue

@ -42,7 +42,7 @@
fixed="right"
header-align="center"
align="center"
width="500">
width="700">
<template slot-scope="scope">
<el-button type="text"
size="small"
@ -65,6 +65,9 @@
<el-button type="text"
size="small"
@click="showCategory(scope.row.customerId,scope.row.customerName)">分类配置</el-button>
<el-button type="text"
size="small"
@click="showStartPage(scope.row.customerId,scope.row.customerName,0)">启动页配置</el-button>
</template>
</el-table-column>
</el-table>
@ -109,6 +112,13 @@
:customer-id="customerId"
:customer-name="customerName" />
</el-dialog>
<div v-show="showType==='startPage'">
<start-page ref="ref_startPage"
:customer-id="customerId"
:showFrom="'customize'"
:tableKeywork="'FootBarCustomize'"
@cancleBack="cancleBack"></start-page>
</div>
</el-card>
</div>
</template>
@ -120,6 +130,7 @@ import MiniHome from './MiniHome'
import MostList from './MostList'
import RoleList from './roleList'
import categoryList from './CategoryList'
import StartPage from './StartPage'
export default {
data () {
return {
@ -147,7 +158,8 @@ export default {
RoleList,
FootbarList,
MostList,
categoryList
categoryList,
StartPage
},
activated () {
if (this.showType === 'footbar') {
@ -243,6 +255,12 @@ export default {
// this.$message.warning("");
},
//
showStartPage (customerId, customerName) {
this.showType = 'startPage'
this.$refs['ref_startPage'].initData(customerId, customerName)
},
pageCurrentChangeHandle (val) {
this.pageNo = val
this.queryCustomerList()

290
epmet-oper-web/src/views/modules/customer/customize/StartPage copy.vue

@ -0,0 +1,290 @@
<template>
<div>
<div class="div_btn">
<span style="margin-right:20px">{{customerName}}</span>
<el-button type="default"
size="mini"
@click="diaCancel">取消返回</el-button>
<el-button type="primary"
size="mini"
@click="addShow">自定义初始化</el-button>
</div>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import CTable from '@c/CTableNoPage'
import Edit from './FootbarEdit'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading//
export default {
data () {
return {
activeName: 'resi',
customerId: '', // id
customerName: '', //
//
tableParamsWork: {
appType: 'gov',
},
tableParamsResi: {
appType: 'resi',
},
tableData: [],
//
tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/customerfootbars',
// tableUrl: '/oper/customize/customerfootbar/customerfootbars',
operations: [
{
lable: (display) => {
if (display === 0) {
return '隐藏'
} else {
return '显示'
}
}, //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'changeState', //
isShow: (row) => {
return true
}
},
{
lable: '修改', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'editShow', //
isShow: (row) => {
return true
}
}
],
orderOperations: [
{
style: 'width=100px;height=100px',
type: 'text',
icon: "el-icon-top",
methodName: 'moveUp', //
isShow: (row) => {
return true
}
},
],
//
form: {
dataUrl: [], // //url
data: { //
fromApp: [
{
value: 'resi',
label: '居民端'
},
{
value: 'gov',
label: '工作端'
}
]
}
}
}
},
components: {
CDialog, CTable, Edit
},
mounted () {
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80
},
...mapGetters(['clientHeight', 'env'])
},
activated () {
this.$nextTick(() => {
if (this.activeName === 'gov') {
this.$refs['table_work'].doLayout() //
} else if (this.activeName === 'resi') {
this.$refs['table_resi'].doLayout() //
}
})
},
methods: {
initData (customerId, customerName) {
this.customerId = customerId
this.customerName = customerName
this.tableParamsWork.customerId = customerId
this.tableParamsResi.customerId = customerId
this.loadResiTableData()
},
//
refresh () {
if (this.activeName === 'gov') {
this.loadWorkTableData() //
} else if (this.activeName === 'resi') {
this.loadResiTableData() //
}
},
tabClick (tab) {
if (tab.name === 'gov') {
this.loadWorkTableData() //
}
if (tab.name === 'resi') {
this.loadResiTableData() //
}
},
//
loadWorkTableData () {
this.$nextTick(() => {
this.$refs['table_work'].loadData() //
})
},
//
loadResiTableData () {
this.$nextTick(() => {
this.$refs['table_resi'].loadData() //
})
},
//
addShow () {
this.$refs['ref_edit'].init('', 'A', this.activeName)
},
//
editShow (row) {
this.$refs['ref_edit'].init(row.id, 'U')
},
//
changeState (row, index) {
let display = row.display === 0 ? 1 : 0
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/updatedisplaystatus'
// const url = '/oper/customize/customerfootbar/updatedisplaystatus'
const param = {
id: row.id,
display: display
}
window.app.ajax.post(url, param,
(data, rspMsg) => {
this.$message.success('操作成功' + rspMsg)
this.refresh()
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
},
//
moveUp (row, index) {
if (index > 0) {
this.tableData = this.$refs.table.getTableData() //
//console.log(this.tableData)
this.startLoading()
let resultList = []
let one = {}
for (let i = 0; i < this.tableData.length; i++) {
let obj = {}
// eslint-disable-next-line
// debugger
if (i === index - 1) {
one.id = this.tableData[i].id
one.orderIndex = index
} else if (i === index) {
obj.id = this.tableData[i].id
obj.orderIndex = index - 1
resultList.push(obj)
resultList.push(one)
} else {
obj.id = this.tableData[i].id
obj.orderIndex = i
resultList.push(obj)
}
}
//console.log(resultList)
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updatedisplayorder'
const url = '/oper/customize/customerfunctiondetail/updatedisplayorder'
window.app.ajax.post(url, resultList,
(data, rspMsg) => {
this.endLoading()
this.loadTableData()
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
} else {
this.$message.warning('无法上移')
return false
}
},
//
diaCancel () {
this.$emit('cancleBack')
},
editDiaOK () {
this.refresh()
},
editDiaCancel () {
},
async renderSelData () { // //
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
}
}
</script>
<style>
.div_btn {
z-index: 10;
position: absolute;
right: 40px;
top: 35px;
/* margin: 0 0 20px 0; */
}
</style>

366
epmet-oper-web/src/views/modules/customer/customize/StartPage.vue

@ -0,0 +1,366 @@
<template>
<div>
<div>
<el-button size="mini"
type="default"
@click="handelBack">返回</el-button>
</div>
<el-row class="row"
:style="{paddingLeft: paddingWidth+'px',paddingRight:paddingWidth+'px'}"
:gutter="100">
<el-col :span="12">
<el-card>
<div slot="header"
class="clearfix">
<span>居民端</span>
</div>
<div class="div_content"
:style="{height:rowHeight}">
<div class="div_image">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="function (res, file) { return handleImgSuccess(res, file, 'resi')}"
:before-upload="beforeImgUpload">
<img v-if="resiForm.url"
:src="resiForm.url"
:style="{height:imageHeight+'px',width:imageWidth+'px'}">
<i v-else
class="el-icon-plus avatar-uploader-icon"
:style="{height:imageHeight+'px',width:imageWidth+'px'}"></i>
</el-upload>
</div>
<div class="div_button">
<el-button class="btn"
type="primary"
@click="changeImage('resi')">修改</el-button>
<el-button class="btn btn_2"
@click="changeDefault('resi')">恢复默认</el-button>
<div class="div_tip">{{tip}}</div>
</div>
<div class="div_time">
<span>启动页展示时长</span>
<el-input-number v-model="resiForm.time"
:min="3"
:max="10"
label="启动页展示时长"></el-input-number>
</div>
</div>
</el-card>
</el-col>
<el-col :span="12">
<el-card>
<div slot="header"
class="clearfix">
<span>工作端</span>
</div>
<div>
<div class="div_content"
:style="{height:rowHeight}">
<div class="div_image">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="function (res, file) { return handleImgSuccess(res, file, 'work')}"
:before-upload="beforeImgUpload">
<img v-if="workForm.url"
:src="workForm.url"
:style="{height:imageHeight+'px',width:imageWidth+'px'}">
<i v-else
class="el-icon-plus avatar-uploader-icon"
:style="{height:imageHeight+'px',width:imageWidth+'px'}"></i>
</el-upload>
</div>
<div class="div_button">
<el-button class="btn"
type="primary"
@click="changeImage('work')">修改</el-button>
<el-button class="btn btn_2"
@click="changeDefault('work')">恢复默认</el-button>
<div class="div_tip">{{tip}}</div>
</div>
<div class="div_time">
<span>启动页展示时长</span>
<el-input-number v-model="workForm.time"
:min="3"
:max="10"
label="启动页展示时长"></el-input-number>
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
loading: false,
labelWidth: '100px',
// customerId: '', // id
// clientType: '', //
customerName: '',
params: {
customerId: '',
},
tip: "(文件大小不能超过200kb,格式仅支持jpg、png、gif)",
// imageHeight: 444,
// imageWidth: 250,
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload',
resiForm: {
url: '',//url
clientType: 'resi',//: resi : work
time: '5',//
type: 'image',//( - image - video) 750*1334
defUrl: '',
defClientType: '',
defTime: '',
defType: ''
},
workForm: {
url: '',//url
clientType: 'work',//: resi : work
time: '5',//
type: 'image',//( - image - video)
defUrl: '',
defClientType: '',
defTime: '',
defType: ''
},
}
},
components: {
CDialog
},
mounted () {
},
computed: {
rowHeight () {
return (this.clientHeight - 300) + 'px'
},
paddingWidth () {
return this.resolution === 'small' ? 150 : 350
},
imageHeight () {
return this.resolution === 'small' ? 222 : 444
},
imageWidth () {
return this.resolution === 'small' ? 125 : 250
},
...mapGetters(['clientHeight', 'resolution'])
},
methods: {
initData (customerId, customerName) {
this.params = { customerId }
this.customerName = customerName
this.loadData()
},
//
async loadData () {
const url = '/oper/customize/customerstartpage/startpage'
this.startLoading()
const { data, code, msg } = await requestPost(url, this.params)
this.endLoading()
if (code === 0) {
data.forEach(element => {
if (!element.url) {
element.url = element.defUrl
element.clientType = element.defClientType
element.time = element.defTime
element.type = element.defType
}
if (element.clientType === 'resi') {
this.resiForm = element
} else {
this.workForm = element
}
});
} else {
this.$message.error(msg)
}
},
changeImage (type) {
let params = {}
if (type === 'resi') {
params = this.resiForm
} else {
params = this.workForm
}
this.saveImage(params)
},
beforeImgUpload (file) {
// const isPNG = file.type === 'image/png'
const isLt1M = file.size / 1024 < 200
// if (!isPNG) {
// this.$message.error(' PNG !')
// }
if (!isLt1M) {
this.$message.error('上传图片大小不能超过 200kb!')
}
// return isPNG && isLt1M
return isLt1M
},
//
handleImgSuccess (res, file, type) {
if (res.code === 0 && res.msg === 'success') {
if (type === 'resi') {
this.resiForm.url = res.data.url
} else {
this.workForm.url = res.data.url
}
} else {
this.$message.error(res.msg)
}
},
//
changeDefault (type) {
let params = {}
if (type === 'resi') {
this.resiForm.url = this.resiForm.defUrl
params = this.resiForm
} else {
this.workForm.url = this.workForm.defUrl
params = this.workForm
}
this.saveImage(params)
},
handelBack () {
this.$emit('cancleBack')
},
async saveImage (params) {
console.log('params', params)
let startPage = {
customerId: this.params.customerId,
...params
}
const url = '/oper/customize/customerstartpage/savestartpage'
this.startLoading()
const { data, code, msg } = await requestPost(url, startPage)
this.endLoading()
if (code === 0) {
this.$message.success('保存成功')
} else {
this.$message.error(msg)
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
props: {
}
}
</script>
<style scoped >
.clearfix {
height: 25px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
}
.row {
/* padding: 0 100px; */
}
.el-card {
overflow-y: auto;
}
.div_image {
width: 100%;
text-align: center;
}
.div_button {
margin-top: 20px;
width: 100%;
text-align: center;
}
.btn {
}
.btn_2 {
margin-left: 50px;
}
.div_tip {
margin-top: 10px;
font-size: 10px;
}
.div_time {
margin-top: 30px;
text-align: center;
}
</style>

236
epmet-oper-web/src/views/modules/productConfig/workRoleAuth.vue

@ -1,55 +1,104 @@
<template>
<div class="role-container">
<el-card class="flex1">
<div class="now-name">
上下拖动可改变角色顺序
<el-button type="primary"
size="small"
@click="handleSaveSort">保存顺序</el-button>
</div>
<el-table ref="roleTable"
v-loading="loading1"
:data="roleList"
row-key="roleKey"
border
style="width: 100%">
<el-table-column type="index"
header-align="center"
align="center"
width="50"></el-table-column>
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName"
label="角色名称"
header-align="center"
align="center"
width="160">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit"
v-model="scope.row.roleName"
clearable>
</el-input>
<span v-else>{{scope.row.constName}}</span>
</template>
</el-table-column>
<el-table-column v-if="!funcShow"
prop="roleKey"
header-align="center"
align="center"
label="角色Key"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-tabs v-model="activeName"
@tab-click="tabClick"
class="el-tabs">
<el-tab-pane label="工作端"
name="work">
<div class="now-name">
上下拖动可改变角色顺序
<el-button type="primary"
size="mini"
@click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<!-- <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
<el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button>
<el-button size="small" @click="scope.row.isEdit=false">取消</el-button>
</span>
<el-button v-else type="primary" size="mini" @click="handleChangeName(scope.row)">修改名称</el-button> -->
</template>
</el-table-column>
</el-table>
size="small"
@click="handleSaveSort">保存顺序</el-button>
</div>
<el-table ref="roleTable"
v-loading="loading1"
:data="roleList"
row-key="roleKey"
border
style="width: 100%">
<el-table-column type="index"
header-align="center"
align="center"
width="50"></el-table-column>
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName"
label="角色名称"
header-align="center"
align="center"
width="180">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit"
v-model="scope.row.roleName"
clearable>
</el-input>
<span v-else>{{scope.row.constName}}</span>
</template>
</el-table-column>
<el-table-column v-if="!funcShow"
prop="roleKey"
header-align="center"
align="center"
label="角色Key"
width="150"></el-table-column>
<el-table-column prop="description"
label="角色职责"
header-align="center"
align="center"
width="380">
<template slot-scope="scope">
<p>{{scope.row.description}}</p>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="mini"
@click="handelChangeDuty(scope.row.roleId, scope.row.description)">修改职责</el-button>
<el-button type="primary"
size="mini"
@click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<span v-if="scope.row.isEdit"
style="display: inline-block; margin-left: 10px;">
<el-button type="primary"
size="small"
@click="handleSaveChange(scope.row)">保存</el-button>
<el-button size="small"
@click="scope.row.isEdit=false">取消</el-button>
</span>
<el-button v-else
type="primary"
size="mini"
@click="handleChangeName(scope.row)">修改名称</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="居民端"
name="resi">
</el-tab-pane>
</el-tabs>
</el-card>
<!-- 角色职责弹出框 -->
<el-dialog :visible.sync="dutyShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="角色职责"
@closed="handleDutyClosed">
<div class="d-textarea"
v-if="dutyShow">
<el-input type="textarea"
v-model="description"></el-input>
</div>
</el-dialog>
<!-- 功能配置弹出框 -->
<el-dialog :visible.sync="funcShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
@ -118,6 +167,8 @@
<script>
import Sortable from 'sortablejs'
import { requestPost } from "@/js/dai/request";
export default {
name: 'RoleList',
props: {
@ -132,9 +183,17 @@ export default {
},
data () {
return {
activeName: "work",
loading1: false,
loading2: false,
loading3: false,
selRoleId: '',
//
dutyShow: false,
description: '',
//
funcShow: false,
roleShow: false,
roleName: '',
@ -166,21 +225,17 @@ export default {
}
},
methods: {
handleDialogClosed () {
this.roleName = ''
this.roleKey = ''
this.funcName = ''
this.operateSection = []
this.scopeSection = []
this.funcShow = false
this.roleShow = false
tabClick () {
},
listRolesByCustomerId (customerId) {
//
listRolesByCustomerId () {
this.loading1 = true
this.$http
.post('/epmetuser/govstaffrole/roletemplates')
.then(({ data: res }) => {
console.log('ressss', res)
if (res.code === 0) {
this.roleList = res.data.map(item => {
return {
@ -189,12 +244,69 @@ export default {
isEdit: false
}
})
console.log('roleList', this.roleList)
}
setTimeout(() => {
this.loading1 = false
}, 500)
})
},
//
handleDutyClosed () {
this.selRoleId = ''
this.description = ''
this.dutyShow = false
},
//
handelChangeDuty (roleId, description) {
this.selRoleId = roleId
this.description = description
this.dutyShow = true
},
//
async saveDuty () {
const url = "/gov/access/govcustomermenu/getcustomerids"
const params = {
tableId: this.tableId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.menuList = data
this.menuList.forEach(element => {
if (this.customerIdList.indexOf(element) > -1) {
this.menuListShow.push(element)
}
});
this.handleCheckedCitiesChange(this.menuListShow)
} else {
this.$message.error(msg)
}
},
//
handleDialogClosed () {
this.roleName = ''
this.roleKey = ''
this.funcName = ''
this.operateSection = []
this.scopeSection = []
this.funcShow = false
this.roleShow = false
},
//
toOperationConfig (roleKey, roleName) {
this.roleName = roleName
this.funcShow = true
this.opeList = []
this.listOperations4AccessConfig(roleKey)
},
listOperations4AccessConfig (roleKey) {
this.roleKey = roleKey
this.loading2 = true
@ -238,12 +350,7 @@ export default {
}
}
},
toOperationConfig (roleKey, roleName) {
this.roleName = roleName
this.funcShow = true
this.opeList = []
this.listOperations4AccessConfig(roleKey)
},
toScopeConfig (operationKey, operationName) {
this.roleShow = true
this.operationKey = operationKey
@ -400,4 +507,7 @@ export default {
.role-container .el-dialog__body {
padding: 0 20px 20px;
}
.d-textarea {
height: 500px;
}
</style>

123
epmet-oper-web/src/views/modules/workPc/startupConfig.vue

@ -1,123 +0,0 @@
<template>
<el-card shadow="never"
class="aui-card--fill">
<div class="mod-sys__menu">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
<el-form-item>
<el-button type="primary"
@click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading"
:data="dataList"
row-key="id"
border
:height="tableHeight"
style="width: 100%;">
<el-table-column prop="name"
:label="$t('menu.name')"
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>
</template>
</el-table-column>
<el-table-column prop="type"
:label="$t('menu.type')"
header-align="center"
align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.type === 0"
size="small">{{ $t('menu.type0') }}</el-tag>
<el-tag v-else
size="small"
type="info">{{ $t('menu.type1') }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="sort"
:label="$t('menu.sort')"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="url"
:label="$t('menu.url')"
header-align="center"
align="center"
width="150"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="permissions"
:label="$t('menu.permissions')"
header-align="center"
align="center"
width="150"
:show-overflow-tooltip="true"></el-table-column>
<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="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
<el-button type="text"
size="small"
@click="showCustomerMenu(scope.row.id)">{{ '客户配置' }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
<!-- 客户菜单配置 -->
<customer-add-or-update ref="customerForm"
@refreshDataList="getDataList"></customer-add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './menu-add-or-update'
import { mapGetters } from 'vuex'
import CustomerAddOrUpdate from './customer-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/gov/access/menu/list',
deleteURL: '/gov/access/menu'
},
customerFormVisible: false
}
},
components: {
AddOrUpdate, CustomerAddOrUpdate
},
computed: {
tableHeight () {
// return this.resolution === 'small' ? this.clientHeight - 210 : this.clientHeight - 220
return this.clientHeight - 210
},
...mapGetters(['clientHeight', 'resolution']),
},
methods: {
showCustomerMenu (tableId) {
this.$refs['customerForm'].init(tableId)
}
}
}
</script>
Loading…
Cancel
Save