|
@@ -42,6 +42,14 @@
|
|
|
{{ scope.row.hid == 1 ? '隐藏' : '不隐藏' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column width="100px"
|
|
|
+ label="是否缓存">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ parseInt(scope.row.keepAlive) == 0 ? '缓存' : '不缓存' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="onOperation('update', scope.row)"
|
|
@@ -98,6 +106,15 @@
|
|
|
:value="1"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="是否缓存"
|
|
|
+ :label-width="formLabelWidth">
|
|
|
+ <el-select v-model="form.keepAlive">
|
|
|
+ <el-option label="是"
|
|
|
+ value="0"></el-option>
|
|
|
+ <el-option label="否"
|
|
|
+ value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="菜单类型"
|
|
|
:label-width="formLabelWidth">
|
|
|
<el-select v-model.number="form.type">
|
|
@@ -141,7 +158,8 @@ export default {
|
|
|
component: null,
|
|
|
hid: 1,
|
|
|
type: 1,
|
|
|
- parentPermission: null
|
|
|
+ parentPermission: null,
|
|
|
+ keepAlive: '0'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -163,6 +181,7 @@ export default {
|
|
|
}
|
|
|
*/
|
|
|
onOperation (type, row) {
|
|
|
+ console.log(row)
|
|
|
this.branchStatus = true
|
|
|
this.operationType = type
|
|
|
if (type == 'update') {
|
|
@@ -176,7 +195,8 @@ export default {
|
|
|
id: row.id,
|
|
|
hid: row.hid,
|
|
|
type: Number(row.type),
|
|
|
- parentPermission: row.parentPermission
|
|
|
+ parentPermission: row.parentPermission,
|
|
|
+ keepAlive: row.keepAlive
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -192,7 +212,8 @@ export default {
|
|
|
parentId: form.parentId,
|
|
|
hid: form.hid,
|
|
|
type: form.type,
|
|
|
- parentPermission: form.parentPermission
|
|
|
+ parentPermission: form.parentPermission,
|
|
|
+ keepAlive: form.keepAlive
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('添加成功')
|
|
@@ -233,6 +254,7 @@ export default {
|
|
|
sort: res.sort,
|
|
|
hid: res.hid,
|
|
|
type: res.type,
|
|
|
+ keepAlive: res.keepAlive,
|
|
|
parentPermission: res.parentPermission
|
|
|
}
|
|
|
if (res.sysMenus && res.sysMenus.length > 0) {
|
|
@@ -261,7 +283,8 @@ export default {
|
|
|
component: null,
|
|
|
hid: 1,
|
|
|
type: 1,
|
|
|
- parentPermission: null
|
|
|
+ parentPermission: null,
|
|
|
+ keepAlive: null
|
|
|
}
|
|
|
this.$refs[formName].resetFields()
|
|
|
}
|