Former-commit-id: 94398d70fb6fd5a80f66de8658b8b16b5394cf0a
master
wangbing 5 years ago
parent 79171916a0
commit 2db8190b5b

@ -34,15 +34,15 @@ public class Dept extends BaseEntity {
@ColumnDescription("")
private String deptAlias;
/**
* SUP_CODE -
* SUP_CODE -
*/
@ColumnName("父部门代码")
@ColumnName("上级代码")
@ColumnDescription("")
private String supCode;
/**
* SUP_NAME -
* SUP_NAME -
*/
@ColumnName("父部门名称")
@ColumnName("上级名称")
@ColumnDescription("")
private String supName;
/**

@ -35,15 +35,15 @@ public class DeptCreateRequest extends BaseRequest {
private String deptAlias;
/**
*
*
*/
@Length(min = 0, max = 50, message = "[supCode]父部门代码长度不合法(0-50)")
@Length(min = 0, max = 50, message = "[supCode]上级代码长度不合法(0-50)")
private String supCode;
/**
*
*
*/
@Length(min = 0, max = 100, message = "[supName]父部门名称长度不合法(0-100)")
@Length(min = 0, max = 100, message = "[supName]上级名称长度不合法(0-100)")
private String supName;
/**

@ -27,12 +27,12 @@ public class DeptFindRequest extends BaseFindRequest {
private String deptAlias;
/**
*
*
*/
private String supCode;
/**
*
*
*/
private String supName;

@ -41,15 +41,15 @@ public class DeptUpdateRequest extends BaseUpdateRequest {
private String deptAlias;
/**
*
*
*/
@Length(min = 0, max = 50, message = "[supCode]父部门代码长度不合法(0-50)")
@Length(min = 0, max = 50, message = "[supCode]上级代码长度不合法(0-50)")
private String supCode;
/**
*
*
*/
@Length(min = 0, max = 100, message = "[supName]父部门名称长度不合法(0-100)")
@Length(min = 0, max = 100, message = "[supName]上级名称长度不合法(0-100)")
private String supName;
/**

@ -99,8 +99,8 @@ CREATE TABLE `SYS_DEPT` (
`DEPT_CODE` VARCHAR(50) NOT NULL COMMENT '部门代码',
`DEPT_NAME` VARCHAR(100) NOT NULL COMMENT '部门名称',
`DEPT_ALIAS` VARCHAR(50) COMMENT '部门别名',
`SUP_CODE` VARCHAR(50) COMMENT '父部门代码',
`SUP_NAME` VARCHAR(100) COMMENT '父部门名称',
`SUP_CODE` VARCHAR(50) COMMENT '上级代码',
`SUP_NAME` VARCHAR(100) COMMENT '上级名称',
`VALID` TINYINT(1) NOT NULL COMMENT '是否有效',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
`IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',

@ -84,8 +84,8 @@
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50" fieldName="DEPT_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100" fieldName="DEPT_NAME" fieldType="String_var100" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="部门别名" fieldLength="50" fieldName="DEPT_ALIAS" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="父部门代码" fieldLength="50" fieldName="SUP_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="父部门名称" fieldLength="100" fieldName="SUP_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="上级代码" fieldLength="50" fieldName="SUP_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="上级名称" fieldLength="100" fieldName="SUP_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>

@ -1,6 +1,10 @@
<#-- since 2017-01-01-->
<div id="app" v-cloak>
<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="deptCode">
<el-input v-model="vm.deptCode" clearable size="small" placeholder="请输入部门代码"></el-input>
@ -11,11 +15,11 @@
<el-form-item label="部门别名" prop="deptAlias">
<el-input v-model="vm.deptAlias" clearable size="small" placeholder="请输入部门别名"></el-input>
</el-form-item>
<el-form-item label="父部门代码" prop="supCode">
<el-input v-model="vm.supCode" clearable size="small" placeholder="请输入父部门代码"></el-input>
<el-form-item label="上级代码" prop="supCode">
<el-input v-model="vm.supCode" clearable size="small" placeholder="请输入上级代码"></el-input>
</el-form-item>
<el-form-item label="父部门名称" prop="supName">
<el-input v-model="vm.supName" clearable size="small" placeholder="请输入父部门名称"></el-input>
<el-form-item label="上级名称" prop="supName">
<el-input v-model="vm.supName" clearable size="small" placeholder="请输入上级名称"></el-input>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="vm.valid" clearable size="small">
@ -28,9 +32,9 @@
<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">
<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>
@ -94,12 +98,12 @@
<el-table-column
align="center"
prop="supCode"
label="父部门代码">
label="上级代码">
</el-table-column>
<el-table-column
align="center"
prop="supName"
label="父部门名称">
label="上级名称">
</el-table-column>
<el-table-column
align="center"
@ -140,6 +144,56 @@
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">
@ -154,11 +208,11 @@
<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 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 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">
@ -218,10 +272,10 @@
{min: 1, max: 50, message: '部门别名长度在 1 到 50 个字符', trigger: 'blur'}
],
supCode: [
{min: 1, max: 50, message: '父部门代码长度在 1 到 50 个字符', trigger: 'blur'}
{min: 1, max: 50, message: '上级代码长度在 1 到 50 个字符', trigger: 'blur'}
],
supName: [
{min: 1, max: 100, message: '父部门名称长度在 1 到 100 个字符', trigger: 'blur'}
{min: 1, max: 100, message: '上级名称长度在 1 到 100 个字符', trigger: 'blur'}
],
valid: [
{required: true, message: '是否有效不能为空', trigger: 'blur'},

@ -164,20 +164,17 @@
<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 label="部门机构" prop="deptId">
<el-cascader
:options="deptList"
:props="{ checkStrictly: true }"
clearable></el-cascader>
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" clearable size="small" placeholder="请输入部门名称"></el-input>
<el-form-item label="用户角色" prop="roleList">
<el-transfer v-model="form.roleList" :data="roleList" :titles="['未选角色','已选角色']"></el-transfer>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -215,7 +212,7 @@
userCode: "",
userAlias: "",
userPwd: "",
userStatus: "",
userStatus: "1",
deptId: "",
deptCode: "",
deptName: "",
@ -240,15 +237,16 @@
userStatus: [
{required: true, message: '用户状态不能为空', trigger: 'blur'},
],
deptId: [
],
deptId: [],
deptCode: [
{min: 1, max: 50, message: '部门代码长度在 1 到 50 个字符', trigger: 'blur'}
],
deptName: [
{min: 1, max: 100, message: '部门名称长度在 1 到 100 个字符', trigger: 'blur'}
],
}
},
roleList: [],
deptList: []
},
methods: {
onCreate: function () {
@ -290,9 +288,37 @@
break;
}
},
loadRoles: function () {
this.$ajax.find("system", "role", {pageSize: 0}).then(function (response) {
if (response.errors.length > 0) {
this.e(response.errors[0].message);
} else {
this.roleList = response.result;
for (var i = 0; i < this.roleList.length; i++) {
this.roleList[i].key = this.roleList[i].id;
this.roleList[i].label = this.roleList[i].name;
}
}
}.bind(this))
},
loadDepts: function () {
this.$ajax.find("system", "dept", {pageSize: 0}).then(function (response) {
if (response.errors.length > 0) {
this.e(response.errors[0].message);
} else {
this.deptList = response.result;
for (var i = 0; i < this.deptList.length; i++) {
this.deptList[i].key = this.deptList[i].id;
this.deptList[i].label = this.deptList[i].name;
}
}
}.bind(this))
}
},
mounted: function () {
this.onFind();
this.loadRoles();
this.loadDepts();
},
})
</script>

@ -38,8 +38,8 @@ public class DeptTest {
request.setDeptCode("部门代码");
request.setDeptName("部门名称");
request.setDeptAlias("部门别名");
request.setSupCode("父部门代码");
request.setSupName("父部门名称");
request.setSupCode("上级代码");
request.setSupName("上级名称");
request.setValid(true);
DeptCreateResponse response = deptManager.create(request,token);
@ -55,8 +55,8 @@ public class DeptTest {
createRequest.setDeptCode("部门代码");
createRequest.setDeptName("部门名称");
createRequest.setDeptAlias("部门别名");
createRequest.setSupCode("父部门代码");
createRequest.setSupName("父部门名称");
createRequest.setSupCode("上级代码");
createRequest.setSupName("上级名称");
createRequest.setValid(true);
DeptCreateResponse createResponse = deptManager.create(createRequest,token);
@ -78,8 +78,8 @@ public class DeptTest {
createRequest.setDeptCode("部门代码");
createRequest.setDeptName("部门名称");
createRequest.setDeptAlias("部门别名");
createRequest.setSupCode("父部门代码");
createRequest.setSupName("父部门名称");
createRequest.setSupCode("上级代码");
createRequest.setSupName("上级名称");
createRequest.setValid(true);
DeptCreateResponse createResponse = deptManager.create(createRequest, token);
@ -92,8 +92,8 @@ public class DeptTest {
request.setDeptCode("部门代码");
request.setDeptName("部门名称");
request.setDeptAlias("部门别名");
request.setSupCode("父部门代码");
request.setSupName("父部门名称");
request.setSupCode("上级代码");
request.setSupName("上级名称");
request.setValid(true);
DeptUpdateResponse response = deptManager.update(request,token);
@ -107,8 +107,8 @@ public class DeptTest {
request.setDeptCode("部门代码");
request.setDeptName("部门名称");
request.setDeptAlias("部门别名");
request.setSupCode("父部门代码");
request.setSupName("父部门名称");
request.setSupCode("上级代码");
request.setSupName("上级名称");
request.setValid(true);
DeptFindResponse response = deptManager.find(request,token);
@ -123,8 +123,8 @@ public class DeptTest {
createRequest.setDeptCode("部门代码");
createRequest.setDeptName("部门名称");
createRequest.setDeptAlias("部门别名");
createRequest.setSupCode("父部门代码");
createRequest.setSupName("父部门名称");
createRequest.setSupCode("上级代码");
createRequest.setSupName("上级名称");
createRequest.setValid(true);
DeptCreateResponse createResponse = deptManager.create(createRequest, token);

Loading…
Cancel
Save

Powered by TurnKey Linux.