Former-commit-id: dc7edf456fe2bce41e554b6fc7975ed9d0b7305d
master
wangbing 5 years ago
parent 13ccd1b3f0
commit 7f838050ca

@ -14,6 +14,7 @@ import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Resource;
import ${basePackage}.module.system.ent.ResourceTree;
import ${basePackage}.module.system.mpr.ResourceMapper;
import ${basePackage}.module.system.req.ResourceCreateRequest;
import ${basePackage}.module.system.req.ResourceDeleteRequest;
@ -28,6 +29,7 @@ import ${basePackage}.module.system.rsp.ResourceGetResponse;
import ${basePackage}.module.system.rsp.ResourceTreeResponse;
import ${basePackage}.module.system.rsp.ResourceUpdateResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -204,11 +206,10 @@ public class ResourceManagerImpl implements ResourceManager {
return response;
}
Map<String, ResourceTree> treeMap = new HashMap<>();
List<ResourceTree> data = new ArrayList<>();
Map<String, ResourceTree> allMap = new HashMap<>();
List<Resource> result = resourceFindResponse.getResult();
// 获取最顶级资源
int level = 1;
while (result.size() > 0) {
Iterator<Resource> iterator = result.iterator();
@ -217,7 +218,11 @@ public class ResourceManagerImpl implements ResourceManager {
ResourceTree tree = new ResourceTree();
tree.setId(next.getId());
tree.setCode(next.getCode());
tree.setResourceType(next.getResourceType());
tree.setValid(next.getValid());
tree.setComment(next.getComment());
tree.setValue(next.getValue());
tree.setRowVersion(next.getRowVersion());
if (next.getCode() != null && next.getCode().split("_").length == level) {
allMap.put(tree.getCode(), tree);
@ -231,16 +236,17 @@ public class ResourceManagerImpl implements ResourceManager {
if (Ptree != null) break;
}
if (Ptree != null) {
tree.setpId(Ptree.getpId());
tree.setpId(Ptree.getId());
Ptree.getChildren().add(tree);
} else {
treeMap.put(tree.getCode(), tree);
data.add(tree);
}
}
}
level++;
}
response.setResult(data);
return response;
}
}

@ -702,27 +702,25 @@ code {
min-width: 1060px;
}
.box-card.search .el-form-item__content,
.box-card.search .el-form-item__content > div {
.el-form.form .el-form-item__content,
.el-form.form .el-form-item__content > div,
.el-form.search .el-form-item__content,
.el-form.search .el-form-item__content > div {
width: 220px;
}
.box-card.data .el-table {
.form-dialog .el-dialog{
width: 700px;
}
.el-table.data {
margin-top: 10px;
width: 100%;
}
.box-card.data .el-table .cell {
.el-table.data .cell {
max-height: 46px;
min-height: 23px;
}
.form .el-dialog {
width: 700px;
}
.form .el-dialog .el-form-item__content,
.form .el-dialog .el-form-item__content > div{
width: 220px;
}
/* 以上为APP样式 */

@ -98,7 +98,7 @@
// 正则匹配文件名
var fileName = dis.match(/filename="(.*\..*)"/)[1];
// 模拟下载
utils.blobtoDown(decodeURIComponent(fileName),new Blob([response.data]))
utils.blobtoDown(decodeURIComponent(fileName), new Blob([response.data]))
return Promise.resolve({errors: []});
}
}, function (error) {
@ -140,7 +140,7 @@
// 正则匹配文件名
var fileName = dis.match(/filename="(.*\..*)"/)[1];
// 模拟下载
utils.blobtoDown(decodeURIComponent(fileName),new Blob([response.data]))
utils.blobtoDown(decodeURIComponent(fileName), new Blob([response.data]))
return Promise.resolve({errors: []});
}
}, function (response) {
@ -149,6 +149,12 @@
};
// 定义共享异步请求对象
Vue.prototype.$ajax = {
post: function (config) {
return jsonRequest({
url: "/ajax/" + config["module"] + "/" + config["target"] + "/" + config["method"],
data: JSON.stringify(config["data"]),
})
},
login: function (data) {
return jsonRequest({
url: "/ajax/system/User/login",
@ -169,7 +175,7 @@
},
create: function (module, target, data) {
return jsonRequest({
url: '/ajax/' + module + "/" + target + "/create",
url: '/ajax/' + module + "/" + target + "/create",
data: JSON.stringify(data),
})
},
@ -472,7 +478,7 @@
}).then(function () {
for (var i = 0; i < this.select.length; i++) {
(function (obj) {
this.$ajax.delete(this.module, this.target, {id: obj.id}).then(function (response) {
this.$ajax.delete(this.module, this.target, {id: obj.id}).then(function (response) {
if (response.errors.length > 0) {
this.e(response.errors[0].message);
} else {

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<#list fields as item>
<#if item.isQuery>
<#if item.fieldType.javaType() =="Boolean">
@ -72,84 +72,12 @@
</el-form>
</el-card>
<el-card class="box-card data">
<el-card class="box-card">
<el-row>
<el-col :span="12">
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="right" label-width="90px">
<#list fields as item>
<#if !item.isSystem>
<#if item.fieldType.javaType() =="Boolean">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-radio-group v-model="form.${item.getFName()}" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
<#elseif item.fieldType.javaType() =="String" && item.fieldType != "Dict">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}"></el-input>
</el-form-item>
<#elseif item.fieldType.javaType() =="String" && item.fieldType == "Dict">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-dict v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" dict-name="${item.getFieldName()}" ></el-input-dict>
</el-form-item>
<#elseif item.fieldType.javaType() =="Byte">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}"clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :min="-128" :max="127" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Short">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :min="-32768" :max="32767" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Integer">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :min="-2147483648" :max="2147483647" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Long">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Float">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="0.01" step-strictly :precision="2"></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Double">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="0.01" step-strictly :precision="2"></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Character">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" minlength="0" maxlength="1"></el-input>
</el-form-item>
<#elseif item.fieldType.javaType() =="Date">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-date-picker
size="small"
v-model="form.${item.getFName()}"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<#elseif item.fieldType.javaType() =="BigDecimal">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}"clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="1" step-strictly :precision="2" :step="0.01"></el-input-number>
</el-form-item>
</#if>
</#if>
</#list>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -174,6 +102,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -233,6 +162,78 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog :title="form.title" :visible.sync="form.dialog">
<el-form class="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">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-radio-group v-model="form.${item.getFName()}" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
<#elseif item.fieldType.javaType() =="String" && item.fieldType != "Dict">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}"></el-input>
</el-form-item>
<#elseif item.fieldType.javaType() =="String" && item.fieldType == "Dict">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-dict v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" dict-name="${item.getFieldName()}" ></el-input-dict>
</el-form-item>
<#elseif item.fieldType.javaType() =="Byte">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}"clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :min="-128" :max="127" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Short">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :min="-32768" :max="32767" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Integer">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :min="-2147483648" :max="2147483647" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Long">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="1" step-strictly></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Float">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="0.01" step-strictly :precision="2"></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Double">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="0.01" step-strictly :precision="2"></el-input-number>
</el-form-item>
<#elseif item.fieldType.javaType() =="Character">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input v-model="form.${item.getFName()}" clearable size="small" placeholder="请输入${item.fieldComment?default("")}" minlength="0" maxlength="1"></el-input>
</el-form-item>
<#elseif item.fieldType.javaType() =="Date">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-date-picker
size="small"
v-model="form.${item.getFName()}"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<#elseif item.fieldType.javaType() =="BigDecimal">
<el-form-item label="${item.fieldComment?default("")}" prop="${item.getFName()}">
<el-input-number v-model="form.${item.getFName()}"clearable size="small" placeholder="请输入${item.fieldComment?default("")}" :step="1" step-strictly :precision="2" :step="0.01"></el-input-number>
</el-form-item>
</#if>
</#if>
</#list>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :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>
@ -30,43 +30,12 @@
</el-form>
</el-card>
<el-card class="box-card data">
<el-card class="box-card">
<el-row>
<el-col :span="12">
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="right"
label-width="90px">
<el-form-item label="部门代码" prop="deptCode">
<el-input v-model="form.deptCode" clearable size="small" placeholder="请输入部门代码"></el-input>
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" clearable size="small" placeholder="请输入部门名称"></el-input>
</el-form-item>
<el-form-item label="部门别名" prop="deptAlias">
<el-input v-model="form.deptAlias" clearable size="small" placeholder="请输入部门别名"></el-input>
</el-form-item>
<el-form-item label="父部门代码" prop="supCode">
<el-input v-model="form.supCode" clearable size="small" placeholder="请输入父部门代码"></el-input>
</el-form-item>
<el-form-item label="父部门名称" prop="supName">
<el-input v-model="form.supName" clearable size="small" placeholder="请输入父部门名称"></el-input>
</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>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -91,6 +60,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -171,6 +141,37 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=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>
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" clearable size="small" placeholder="请输入部门名称"></el-input>
</el-form-item>
<el-form-item label="部门别名" prop="deptAlias">
<el-input v-model="form.deptAlias" clearable size="small" placeholder="请输入部门别名"></el-input>
</el-form-item>
<el-form-item label="父部门代码" prop="supCode">
<el-input v-model="form.supCode" clearable size="small" placeholder="请输入父部门代码"></el-input>
</el-form-item>
<el-form-item label="父部门名称" prop="supName">
<el-input v-model="form.supName" clearable size="small" placeholder="请输入父部门名称"></el-input>
</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>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :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>
@ -27,37 +27,6 @@
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="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>
<el-form-item label="字典描述" prop="dictComment">
<el-input v-model="form.dictComment" clearable size="small" placeholder="请输入字典描述"></el-input>
</el-form-item>
<el-form-item label="字典版本" prop="version" required>
<el-date-picker
size="small"
v-model="form.version"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</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>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -82,6 +51,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -156,6 +126,38 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=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>
<el-form-item label="字典描述" prop="dictComment">
<el-input v-model="form.dictComment" clearable size="small" placeholder="请输入字典描述"></el-input>
</el-form-item>
<el-form-item label="字典版本" prop="version" required>
<el-date-picker
size="small"
v-model="form.version"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</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>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :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>
@ -30,32 +30,6 @@
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="right"
label-width="90px">
<el-form-item label="字典键" prop="key">
<el-input v-model="form.key" clearable size="small" placeholder="请输入字典键"></el-input>
</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="sort">
<el-input-number size="small" v-model="form.sort" :min="1" :max="10000"
label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="form.valid" clearable>
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -80,6 +54,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -153,6 +128,32 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=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>
</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="sort">
<el-input-number size="small" v-model="form.sort" :min="1" :max="10000"
label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="form.valid" clearable>
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :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>
@ -27,36 +27,6 @@
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="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>
<el-form-item label="文件类型" prop="fileType">
<el-input-dict v-model="form.fileType" clearable size="small" placeholder="请输入文件类型" dict-name="FILE_TYPE" ></el-input-dict>
</el-form-item>
<el-form-item label="扩展属性1" prop="attribute1">
<el-input v-model="form.attribute1" clearable size="small" placeholder="请输入扩展属性1"></el-input>
</el-form-item>
<el-form-item label="扩展属性2" prop="attribute2">
<el-input v-model="form.attribute2" clearable size="small" placeholder="请输入扩展属性2"></el-input>
</el-form-item>
<el-form-item label="存放地址" prop="location">
<el-input v-model="form.location" clearable size="small" placeholder="请输入存放地址"></el-input>
</el-form-item>
<el-form-item label="访问地址" prop="url">
<el-input v-model="form.url" clearable size="small" placeholder="请输入访问地址"></el-input>
</el-form-item>
<el-form-item label="下载地址" prop="urlDownload">
<el-input v-model="form.urlDownload" clearable size="small" placeholder="请输入下载地址"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -81,6 +51,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -146,6 +117,37 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=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>
<el-form-item label="文件类型" prop="fileType">
<el-input-dict v-model="form.fileType" clearable size="small" placeholder="请输入文件类型" dict-name="FILE_TYPE" ></el-input-dict>
</el-form-item>
<el-form-item label="扩展属性1" prop="attribute1">
<el-input v-model="form.attribute1" clearable size="small" placeholder="请输入扩展属性1"></el-input>
</el-form-item>
<el-form-item label="扩展属性2" prop="attribute2">
<el-input v-model="form.attribute2" clearable size="small" placeholder="请输入扩展属性2"></el-input>
</el-form-item>
<el-form-item label="存放地址" prop="location">
<el-input v-model="form.location" clearable size="small" placeholder="请输入存放地址"></el-input>
</el-form-item>
<el-form-item label="访问地址" prop="url">
<el-input v-model="form.url" clearable size="small" placeholder="请输入访问地址"></el-input>
</el-form-item>
<el-form-item label="下载地址" prop="urlDownload">
<el-input v-model="form.urlDownload" clearable size="small" placeholder="请输入下载地址"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

@ -1,164 +1,243 @@
<div id="app" v-cloak>
<el-card class="box-card search">
<el-form :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-card class="box-card">
<el-tabs :value="'list'">
<el-tab-pane label="列表展示" name="list">
<span slot="label"><i class="el-icon-s-operation"></i>列表展示</span>
<el-form class="search" :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="资源代码" prop="code">
<el-input v-model="vm.code" clearable size="small" placeholder="请输入资源代码"></el-input>
</el-form-item>
<el-form-item label="资源内容" prop="value">
<el-input v-model="vm.value" clearable size="small" placeholder="请输入资源内容"></el-input>
</el-form-item>
<el-form-item label="资源描述" prop="comment">
<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-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="vm.valid" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="onSearch">搜索</el-button>
<el-button type="warning" size="small" icon="el-icon-refresh-left" @click="onReset('vm')">重置</el-button>
</el-form-item>
</el-form>
<el-divider><i class="el-icon-search"></i></el-divider>
<el-row>
<el-col :span="12">
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<el-button type="warning" size="small" icon="el-icon-download" @click="onExport">导出</el-button>
</el-col>
<el-col :span="12">
<el-button-group style="float: right;">
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-button size="small" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="Excel导入" placement="bottom">
<el-button size="small" icon="el-icon-upload2" @click="onImport"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="批量删除" placement="bottom">
<el-button size="small" icon="el-icon-delete" @click="onBitchDelete"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="刷新" placement="bottom">
<el-button size="small" icon="el-icon-refresh" @click="onFind"></el-button>
</el-tooltip>
</el-button-group>
</el-col>
</el-row>
<el-table
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
size="mini">
<el-table-column
align="center"
type="selection"
width="40">
</el-table-column>
<el-table-column
align="center"
prop="id"
label="主键"
width="140">
</el-table-column>
<el-table-column
align="center"
prop="valid"
label="是否有效"
width="60">
<template slot-scope="scope">
<el-tag size="mini" v-if="scope.row.valid">有效</el-tag>
<el-tag size="mini" type="danger" v-if="!scope.row.valid">无效</el-tag>
</template>
</el-table-column>
<el-table-column
align="center"
prop="code"
label="资源代码">
</el-table-column>
<el-table-column
align="center"
prop="value"
label="资源内容"
width="300">
</el-table-column>
<el-table-column
align="center"
prop="comment"
label="资源描述">
</el-table-column>
<el-table-column
align="center"
prop="resourceType"
label="资源类型">
</el-table-column>
<el-table-column
align="center"
prop="createTime"
width="140"
label="创建时间">
</el-table-column>
<el-table-column
align="center"
fixed="right"
width="120"
label="操作">
<template slot-scope="scope">
<el-dropdown size="mini" split-button type="primary"
@click="onCommand(['edit',scope.row])"
@command="onCommand">
<i class="el-icon-edit"></i>编辑
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="['delete',scope.row]" icon="el-icon-delete">删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<el-pagination
background
v-if="vm.totalCount > vm.pageSize"
style="margin-top: 10px"
@current-change="onPage"
:current-page="vm.pageNumber"
:page-size="vm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="vm.totalCount">
</el-pagination>
</el-tab-pane>
<el-tab-pane label="树状展示" name="tree">
<span slot="label"><i class="el-icon-share"></i>树状展示</span>
<el-row>
<el-col :span="12">
<el-input v-model="treeKeyword" clearable size="mini" placeholder="请输入资源内容" @change="onChange" style="width: 200px;" ></el-input>
</el-col>
<el-col :span="12">
<el-button-group style="float: right;">
<el-tooltip effect="dark" content="批量删除" placement="bottom">
<el-button size="small" icon="el-icon-delete" @click="onBitchDelete"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="刷新" placement="bottom">
<el-button size="small" icon="el-icon-refresh" @click="onLoadTree"></el-button>
</el-tooltip>
</el-button-group>
</el-col>
</el-row>
<el-tree
style="margin-top: 10px"
:data="treeData"
show-checkbox
node-key="id"
ref="tree"
default-expand-all
:filter-node-method="filterTree"
:expand-on-click-node="false">
<div class="tree" slot-scope="{ node, data }">
<span>{{ data.comment }}<span style="color: #409EFF">[{{data.code}}]</span></span>
<span>
<el-button
icon="el-icon-plus"
type="text"
size="mini"
@click="onTreeCreate(data)">
</el-button>
<el-button
icon="el-icon-edit"
type="text"
size="mini"
@click="onTreeEdit(data)">
</el-button>
</span>
</div>
</el-tree>
</el-tab-pane>
</el-tabs>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="资源代码" prop="code">
<el-input v-model="vm.code" clearable size="small" placeholder="请输入资源代码"></el-input>
<el-input v-model="form.code" clearable size="small"
placeholder="请输入资源代码"></el-input>
</el-form-item>
<el-form-item label="资源内容" prop="value">
<el-input v-model="vm.value" clearable size="small" placeholder="请输入资源内容"></el-input>
<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="vm.comment" clearable size="small" placeholder="请输入资源描述"></el-input>
<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="vm.resourceType" clearable size="small" placeholder="请输入资源类型" dict-name="RESOURCE_TYPE" ></el-input-dict>
<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="vm.valid" clearable size="small">
<el-radio-group v-model="form.valid" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="onSearch">搜索</el-button>
<el-button type="warning" size="small" icon="el-icon-refresh-left" @click="onReset('vm')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="box-card data">
<el-row>
<el-col :span="12">
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="right" label-width="90px">
<el-form-item label="资源代码" prop="code">
<el-input v-model="form.code" clearable size="small" placeholder="请输入资源代码"></el-input>
</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="valid">
<el-radio-group v-model="form.valid" clearable size="small">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
<el-button-group style="float: right;">
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-button size="small" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="Excel导入" placement="bottom">
<el-button size="small" icon="el-icon-upload2" @click="onImport"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="批量删除" placement="bottom">
<el-button size="small" icon="el-icon-delete" @click="onBitchDelete"></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="刷新" placement="bottom">
<el-button size="small" icon="el-icon-refresh" @click="onFind"></el-button>
</el-tooltip>
</el-button-group>
</el-col>
</el-row>
<el-table
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
size="mini">
<el-table-column
align="center"
type="selection"
width="40">
</el-table-column>
<el-table-column
align="center"
prop="id"
label="主键"
width="140">
</el-table-column>
<el-table-column
align="center"
prop="code"
label="资源代码">
</el-table-column>
<el-table-column
align="center"
prop="value"
label="资源内容">
</el-table-column>
<el-table-column
align="center"
prop="comment"
label="资源描述">
</el-table-column>
<el-table-column
align="center"
prop="resourceType"
label="资源类型">
</el-table-column>
<el-table-column
align="center"
prop="valid"
label="是否有效">
</el-table-column>
<el-table-column
align="center"
prop="createTime"
width="140"
label="创建时间">
</el-table-column>
<el-table-column
align="center"
fixed="right"
width="120"
label="操作">
<template slot-scope="scope">
<el-dropdown size="mini" split-button type="primary" @click="onCommand(['edit',scope.row])"
@command="onCommand">
<i class="el-icon-edit"></i>编辑
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="['delete',scope.row]" icon="el-icon-delete">删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<el-pagination
background
v-if="vm.totalCount > vm.pageSize"
style="margin-top: 10px"
@current-change="onPage"
:current-page="vm.pageNumber"
:page-size="vm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="vm.totalCount">
</el-pagination>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<style>
.tree {
flex: auto;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
}
</style>
<script>
var app = new Vue({
mixins: [mixin],
@ -175,8 +254,8 @@
pageNumber: 1,
pageSize: 10,
totalCount: 0,
sortKey:'CREATE_TIME',
sortType:'DESC'
sortKey: 'CREATE_TIME',
sortType: 'DESC'
},
form: {//待提交表单
title: "",
@ -207,7 +286,9 @@
valid: [
{required: true, message: '是否有效不能为空', trigger: 'blur'},
],
}
},
treeKeyword: '',
treeData: []
},
methods: {
onCreate: function () {
@ -220,6 +301,34 @@
this.form.resourceType = "";
this.form.valid = "";
},
onTreeCreate: function (pItem) {
this.form.title = "资源新增";
this.form.dialog = true;
this.form.id = "";
this.form.code = pItem.code + "_";
this.form.value = "";
this.form.comment = "";
this.form.resourceType = "";
this.form.valid = "";
},
onTreeEdit: function (pItem) {
this.form.title = "资源编辑";
this.form.dialog = true;
this.form.id = pItem.id;
this.form.code = pItem.code;
this.form.value = pItem.value;
this.form.comment = pItem.comment;
this.form.resourceType = pItem.resourceType;
this.form.valid = pItem.valid;
this.form.rowVersion = pItem.rowVersion;
},
onChange:function (value) {
this.$refs.tree.filter(value);
},
filterTree:function (value, data) {
if (!value) return true;
return data.comment.indexOf(value) !== -1;
},
onCommand: function (arg) {
const cmd = arg[0];
const item = arg[1];
@ -243,9 +352,29 @@
break;
}
},
onLoadTree: function () {
this.$ajax.post({
module: "system",
target: "resource",
method: "tree",
data: {}
}).then(function (response) {
if (response.errors.length > 0) {
this.e(response.errors[0].message);
} else {
this.treeData = response.result;
}
}.bind(this))
},
},
watch: {
treeKeyword:function(val) {
this.$refs.tree.filter(val);
}
},
mounted: function () {
this.onFind();
},
this.onLoadTree();
}
})
</script>

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
<el-form-item label="角色代码" prop="code">
<el-input v-model="vm.code" clearable size="small" placeholder="请输入角色代码"></el-input>
</el-form-item>
@ -23,24 +23,6 @@
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="right" label-width="90px">
<el-form-item label="角色代码" prop="code">
<el-input v-model="form.code" clearable size="small" placeholder="请输入角色代码"></el-input>
</el-form-item>
<el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" 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>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -65,6 +47,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -130,6 +113,25 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="角色代码" prop="code">
<el-input v-model="form.code" clearable size="small" placeholder="请输入角色代码"></el-input>
</el-form-item>
<el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" 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>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :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>
@ -65,6 +65,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"

@ -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="right" label-width="90px">
<el-card class="box-card">
<el-form class="search" :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>
@ -30,45 +30,12 @@
</el-form>
</el-card>
<el-card class="box-card data">
<el-card class="box-card">
<el-row>
<el-col :span="12">
<el-button type="success" size="small" icon="el-icon-plus" @click="onCreate">新增</el-button>
<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="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>
<el-form-item label="用户代码" prop="userCode">
<el-input v-model="form.userCode" clearable size="small" placeholder="请输入用户代码"></el-input>
</el-form-item>
<el-form-item label="用户别名" prop="userAlias">
<el-input v-model="form.userAlias" clearable size="small" placeholder="请输入用户别名"></el-input>
</el-form-item>
<el-form-item label="用户密码" prop="userPwd">
<el-input v-model="form.userPwd" clearable size="small" placeholder="请输入用户密码"></el-input>
</el-form-item>
<el-form-item label="用户状态" prop="userStatus">
<el-input-dict v-model="form.userStatus" clearable size="small" placeholder="请输入用户状态" dict-name="USER_STATUS" ></el-input-dict>
</el-form-item>
<el-form-item label="部门主键" prop="deptId">
<el-input-number v-model="form.deptId" clearable size="small" placeholder="请输入部门主键" :step="1" step-strictly></el-input-number>
</el-form-item>
<el-form-item label="部门代码" prop="deptCode">
<el-input v-model="form.deptCode" clearable size="small" placeholder="请输入部门代码"></el-input>
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" clearable size="small" placeholder="请输入部门名称"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="12">
@ -93,6 +60,7 @@
</el-row>
<el-table
class="data"
@selection-change="onSelectionChange"
empty-text="无数据"
:data="result"
@ -183,6 +151,40 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog class="form-dialog" :title="form.title" :visible.sync="form.dialog">
<el-form class=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>
<el-form-item label="用户代码" prop="userCode">
<el-input v-model="form.userCode" clearable size="small" placeholder="请输入用户代码"></el-input>
</el-form-item>
<el-form-item label="用户别名" prop="userAlias">
<el-input v-model="form.userAlias" clearable size="small" placeholder="请输入用户别名"></el-input>
</el-form-item>
<el-form-item label="用户密码" prop="userPwd">
<el-input v-model="form.userPwd" clearable size="small" placeholder="请输入用户密码"></el-input>
</el-form-item>
<el-form-item label="用户状态" prop="userStatus">
<el-input-dict v-model="form.userStatus" clearable size="small" placeholder="请输入用户状态" dict-name="USER_STATUS" ></el-input-dict>
</el-form-item>
<el-form-item label="部门主键" prop="deptId">
<el-input-number v-model="form.deptId" clearable size="small" placeholder="请输入部门主键" :step="1" step-strictly></el-input-number>
</el-form-item>
<el-form-item label="部门代码" prop="deptCode">
<el-input v-model="form.deptCode" clearable size="small" placeholder="请输入部门代码"></el-input>
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" clearable size="small" placeholder="请输入部门名称"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="form.dialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="onSave">保存</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({

Loading…
Cancel
Save

Powered by TurnKey Linux.