Former-commit-id: faf021b3efb15e0c258033fbe9614d58049a3974
master
wangbing 5 years ago
parent 0af7bb03fe
commit 027fd78a68

@ -3,6 +3,7 @@ package ${basePackage}.config;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.config.CacheConfiguration;
import net.sf.ehcache.config.DiskStoreConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.context.annotation.Bean;
@ -35,8 +36,8 @@ public class CacheConfig {
private Cache buildTokenCache() {
CacheConfiguration config = new CacheConfiguration();
config.setMemoryStoreEvictionPolicy("LFU");//最少使用
config.setTimeToLiveSeconds(60);//最长有效时间
config.setTimeToIdleSeconds(60);//无访问最长有效时间
config.setTimeToLiveSeconds(60 * 60);//最长有效时间
config.setTimeToIdleSeconds(60 * 60);//无访问最长有效时间
config.setName(TOKEN_CACHE);
return new Cache(config);
}

@ -8,9 +8,9 @@ import ${basePackage}.frame.base.BaseEntity;
/**
* RESOURCE -
*
* @author author
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
* @since 2019-12-25
*/
@SheetName("资源")
public class Resource extends BaseEntity {
@ -33,6 +33,18 @@ public class Resource extends BaseEntity {
@ColumnName("资源类型")
@ColumnDescription("")
private String resourceType;
/**
* NODE -
*/
@ColumnName("是否节点")
@ColumnDescription("")
private Boolean node;
/**
* SUP_ID -
*/
@ColumnName("上级主键")
@ColumnDescription("")
private Long supId;
/**
* VALID -
*/
@ -64,6 +76,22 @@ public class Resource extends BaseEntity {
this.resourceType = resourceType;
}
public Boolean getNode() {
return this.node;
}
public void setNode(Boolean node) {
this.node = node;
}
public Long getSupId() {
return this.supId;
}
public void setSupId(Long supId) {
this.supId = supId;
}
public Boolean getValid() {
return this.valid;
}

@ -1,7 +1,7 @@
<#-- since ${date?string("yyyy-MM-dd")}-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<#list fields as item>
<#if item.isQuery>
<#if item.fieldType.javaType() =="Boolean">
@ -80,7 +80,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left" label-width="90px">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<#list fields as item>
<#if !item.isSystem>
<#if item.fieldType.javaType() =="Boolean">

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="部门代码" prop="deptCode">
<el-input v-model="vm.deptCode" clearable size="small" placeholder="请输入部门代码"></el-input>
</el-form-item>
@ -38,7 +38,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left"
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right"
label-width="90px">
<el-form-item label="部门代码" prop="deptCode">
<el-input v-model="form.deptCode" clearable size="small" placeholder="请输入部门代码"></el-input>

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="vm.dictName" clearable size="small" placeholder="请输入字典名称"></el-input>
</el-form-item>
@ -29,7 +29,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left" label-width="90px">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="字典名称" prop="dictName" required>
<el-input v-model="form.dictName" clearable size="small" placeholder="请输入字典名称"></el-input>
</el-form-item>

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="vm.dictName" clearable size="small" placeholder="请输入字典名称" readonly></el-input>
</el-form-item>
@ -32,7 +32,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left"
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right"
label-width="90px">
<el-form-item label="字典键" prop="key">
<el-input v-model="form.key" clearable size="small" placeholder="请输入字典键"></el-input>

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="文件名称" prop="name">
<el-input v-model="vm.name" clearable size="small" placeholder="请输入文件名称"></el-input>
</el-form-item>
@ -29,7 +29,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left" label-width="90px">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="文件名称" prop="name">
<el-input v-model="form.name" clearable size="small" placeholder="请输入文件名称"></el-input>
</el-form-item>

@ -1,6 +1,6 @@
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="资源内容" prop="value">
<el-input v-model="vm.value" clearable size="small" placeholder="请输入资源内容"></el-input>
</el-form-item>
@ -8,7 +8,8 @@
<el-input v-model="vm.comment" clearable size="small" placeholder="请输入资源描述"></el-input>
</el-form-item>
<el-form-item label="资源类型" prop="resourceType">
<el-input-dict v-model="vm.resourceType" clearable size="small" placeholder="请输入资源类型" dict-name="RESOURCE_TYPE" ></el-input-dict>
<el-input-dict v-model="vm.resourceType" clearable size="small" placeholder="请输入资源类型"
dict-name="RESOURCE_TYPE"></el-input-dict>
</el-form-item>
<el-form-item label="是否节点" prop="node">
<el-radio-group v-model="vm.node" clearable size="small">
@ -17,7 +18,8 @@
</el-radio-group>
</el-form-item>
<el-form-item label="上级主键" prop="supId">
<el-input-number v-model="vm.supId" clearable size="small" placeholder="请输入上级主键" :step="1" step-strictly></el-input-number>
<el-input-number v-model="vm.supId" clearable size="small" placeholder="请输入上级主键" :step="1"
step-strictly></el-input-number>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="vm.valid" clearable size="small">
@ -40,25 +42,36 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left" label-width="90px">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right"
label-width="90px">
<el-form-item label="是否目录" prop="node">
<el-radio-group v-model="form.node" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="上级目录" v-if="form.node" prop="supId">
<el-cascader
:options="options"
size="small"
:props="{ checkStrictly: true }"
clearable></el-cascader>
</el-form-item>
<el-form-item label="资源内容" prop="value">
<el-input v-model="form.value" clearable size="small" placeholder="请输入资源内容"></el-input>
</el-form-item>
<el-form-item label="资源描述" prop="comment">
<el-input v-model="form.comment" clearable size="small" placeholder="请输入资源描述"></el-input>
</el-form-item>
<el-form-item label="资源类型" prop="resourceType">
<el-input-dict v-model="form.resourceType" clearable size="small" placeholder="请输入资源类型" dict-name="RESOURCE_TYPE" ></el-input-dict>
</el-form-item>
<el-form-item label="是否节点" prop="node">
<el-radio-group v-model="form.node" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="上级主键" prop="supId">
<el-input-number v-model="form.supId" clearable size="small" placeholder="请输入上级主键" :step="1" step-strictly></el-input-number>
<el-form-item label="资源类型" v-if="!form.node" prop="resourceType">
<el-input-dict v-model="form.resourceType" clearable size="small" placeholder="请输入资源类型"
dict-name="RESOURCE_TYPE"></el-input-dict>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="form.valid" clearable size="small">
<el-radio :label="true">是</el-radio>
@ -193,8 +206,8 @@
pageNumber: 1,
pageSize: 10,
totalCount: 0,
sortKey:'CREATE_TIME',
sortType:'DESC'
sortKey: 'CREATE_TIME',
sortType: 'DESC'
},
form: {//待提交表单
title: "",
@ -222,12 +235,25 @@
node: [
{required: true, message: '是否节点不能为空', trigger: 'blur'},
],
supId: [
],
supId: [],
valid: [
{required: true, message: '是否有效不能为空', trigger: 'blur'},
],
}
},
options: [
{
value: "111",
label: "指南",
children: [{
value: 'shejiyuanze',
label: '设计原则',
children: [{
value: 'yizhi',
label: '一致'
}]
}]
}
]
},
methods: {
onCreate: function () {
@ -237,9 +263,9 @@
this.form.value = "";
this.form.comment = "";
this.form.resourceType = "";
this.form.node = "";
this.form.node = false;
this.form.supId = "";
this.form.valid = "";
this.form.valid = true;
},
onCommand: function (arg) {
const cmd = arg[0];

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="vm.roleName" clearable size="small" placeholder="请输入角色名称"></el-input>
</el-form-item>
@ -26,7 +26,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left" label-width="90px">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" clearable size="small" placeholder="请输入角色名称"></el-input>
</el-form-item>

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="用户主键" prop="userId">
<el-input v-model="vm.userId" clearable size="small" placeholder="请输入用户主键"></el-input>
</el-form-item>

@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="left" label-width="90px">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="用户账户" prop="userName">
<el-input v-model="vm.userName" clearable size="small" placeholder="请输入用户账户"></el-input>
</el-form-item>
@ -38,7 +38,7 @@
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
<el-dialog class="form" :title="form.title" :visible.sync="form.dialog">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="left" label-width="90px">
<el-form :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="用户账户" prop="userName">
<el-input v-model="form.userName" clearable size="small" placeholder="请输入用户账户"></el-input>
</el-form-item>

Loading…
Cancel
Save

Powered by TurnKey Linux.