功能优化
This commit is contained in:
parent
853d8f95ea
commit
192a5d8066
|
|
@ -84,15 +84,8 @@ public class UploadController {
|
||||||
String originalFileName = file.getOriginalFilename();
|
String originalFileName = file.getOriginalFilename();
|
||||||
String fileExtension = originalFileName != null && originalFileName.contains(".")
|
String fileExtension = originalFileName != null && originalFileName.contains(".")
|
||||||
? originalFileName.split("\\.")[originalFileName.split("\\.").length - 1] : "";
|
? originalFileName.split("\\.")[originalFileName.split("\\.").length - 1] : "";
|
||||||
if (!"xls".equalsIgnoreCase(fileExtension)
|
if (!"jpg".equalsIgnoreCase(fileExtension)) {
|
||||||
&& !"xlsx".equalsIgnoreCase(fileExtension)
|
ar.setFailMsg("文件类型错误,请上传jpg格式的文件");
|
||||||
&& !"doc".equalsIgnoreCase(fileExtension)
|
|
||||||
&& !"docx".equalsIgnoreCase(fileExtension)
|
|
||||||
&& !"pdf".equalsIgnoreCase(fileExtension)
|
|
||||||
&& !"jpg".equalsIgnoreCase(fileExtension)
|
|
||||||
&& !"jpeg".equalsIgnoreCase(fileExtension)
|
|
||||||
&& !"png".equalsIgnoreCase(fileExtension)) {
|
|
||||||
ar.setFailMsg("文件类型错误,请上传xls/xlsx/doc/docx/jpg/jpeg/png/pdf格式的文件");
|
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,11 @@ function initTreeTable() {
|
||||||
let html = "";
|
let html = "";
|
||||||
|
|
||||||
if ([1, 2, 3, 4].includes(d.level)) {
|
if ([1, 2, 3, 4].includes(d.level)) {
|
||||||
|
if (user.roleId == 1) {
|
||||||
|
html += '<a lay-event="add" style="color: #009688;cursor: pointer;font-size: 15px" id="add">新增</a>';
|
||||||
|
html += ' ';
|
||||||
|
html += '<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px" id="add">修改名称</a>';
|
||||||
|
}
|
||||||
if (user.roleId == 6 || user.roleId == 5) {
|
if (user.roleId == 6 || user.roleId == 5) {
|
||||||
html += '<a lay-event="add" style="color: #009688;cursor: pointer;font-size: 15px" id="add">新增</a>';
|
html += '<a lay-event="add" style="color: #009688;cursor: pointer;font-size: 15px" id="add">新增</a>';
|
||||||
html += ' ';
|
html += ' ';
|
||||||
|
|
@ -140,6 +145,9 @@ function initTreeTable() {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (d.level === 5) {
|
if (d.level === 5) {
|
||||||
|
if (user.roleId == 1) {
|
||||||
|
html += '<a lay-event="changeTheTeamLeader" style="color: #009688;cursor: pointer;font-size: 15px" id="changeTheTeamLeader">更换班长</a>';
|
||||||
|
}
|
||||||
if (user.roleId == 6 || user.roleId == 5) {
|
if (user.roleId == 6 || user.roleId == 5) {
|
||||||
html += '<a lay-event="changeTheTeamLeader" style="color: #009688;cursor: pointer;font-size: 15px" id="changeTheTeamLeader">更换班长</a>';
|
html += '<a lay-event="changeTheTeamLeader" style="color: #009688;cursor: pointer;font-size: 15px" id="changeTheTeamLeader">更换班长</a>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,13 +51,13 @@ function initTreeTable() {
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
field: "sex",
|
field: "sex",
|
||||||
title: "性别",
|
title: "性别",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},*/
|
||||||
// {
|
// {
|
||||||
// field: "idCard",
|
// field: "idCard",
|
||||||
// title: "身份证号码",
|
// title: "身份证号码",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="">
|
<html lang="">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>评价模板配置</title>
|
<title>项目信息对照表</title>
|
||||||
<link rel="stylesheet" href="../../../layui/css/layui.css" />
|
<link rel="stylesheet" href="../../../layui/css/layui.css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.widget-toolbar a {
|
.widget-toolbar a {
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
||||||
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
||||||
<div class="password-book-title">人员密码本</div>
|
<div class="password-book-title">项目信息对照表</div>
|
||||||
<div class="password-book-list">
|
<div class="password-book-list">
|
||||||
<!-- <div class="password-book-item">
|
<!-- <div class="password-book-item">
|
||||||
<span>密码1</span>
|
<span>密码1</span>
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,14 @@
|
||||||
autocomplete="off" class="layui-input" lay-verify="required" maxlength="20">
|
autocomplete="off" class="layui-input" lay-verify="required" maxlength="20">
|
||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
<div class="layui-form-item" style="width: 90%">
|
<!-- <div class="layui-form-item" style="width: 90%">
|
||||||
<label class="layui-form-label" style="width: 150px"><span
|
<label class="layui-form-label" style="width: 150px"><span
|
||||||
style="color: red">*</span>身份证号码:</label>
|
style="color: red">*</span>身份证号码:</label>
|
||||||
<div class="layui-input-inline" style="width: 60%">
|
<div class="layui-input-inline" style="width: 60%">
|
||||||
<input class="layui-input" id="idCard" name="idCard" lay-verify="required\|idCard"
|
<input class="layui-input" id="idCard" name="idCard" lay-verify="required\|idCard"
|
||||||
lay-affix="clear" autocomplete="off" maxlength="18">
|
lay-affix="clear" autocomplete="off" maxlength="18">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="layui-form-item" style="width: 90%">
|
<div class="layui-form-item" style="width: 90%">
|
||||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>姓名:</label>
|
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>姓名:</label>
|
||||||
<div class="layui-input-inline" style="width: 60%">
|
<div class="layui-input-inline" style="width: 60%">
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
autocomplete="off" maxlength="30">
|
autocomplete="off" maxlength="30">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="width: 90%">
|
<!-- <div class="layui-form-item" style="width: 90%">
|
||||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>性别:</label>
|
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>性别:</label>
|
||||||
<div class="layui-input-inline" style="width: 60%">
|
<div class="layui-input-inline" style="width: 60%">
|
||||||
<select id="sex" name="sex" class="layui-select" lay-search>
|
<select id="sex" name="sex" class="layui-select" lay-search>
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<option value="2">女</option>
|
<option value="2">女</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="layui-form-item" style="width: 90%">
|
<div class="layui-form-item" style="width: 90%">
|
||||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>联系电话:</label>
|
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>联系电话:</label>
|
||||||
<div class="layui-input-inline" style="width: 60%">
|
<div class="layui-input-inline" style="width: 60%">
|
||||||
|
|
@ -162,11 +162,11 @@
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
form.verify({
|
form.verify({
|
||||||
idCard: function (value, item) {
|
/* idCard: function (value, item) {
|
||||||
if (!checkPsidno(value)) {
|
if (!checkPsidno(value)) {
|
||||||
return '请输入正确的身份证号';
|
return '请输入正确的身份证号';
|
||||||
}
|
}
|
||||||
},
|
},*/
|
||||||
phone: function (value, item) {
|
phone: function (value, item) {
|
||||||
if (!phone_reg(value)) {
|
if (!phone_reg(value)) {
|
||||||
return '请输入正确的手机号';
|
return '请输入正确的手机号';
|
||||||
|
|
@ -186,23 +186,23 @@
|
||||||
// 提交事件
|
// 提交事件
|
||||||
form.on('submit(formSubmit)', function (data) {
|
form.on('submit(formSubmit)', function (data) {
|
||||||
//对身份证和手机号验证
|
//对身份证和手机号验证
|
||||||
if ($('#idCard').val() == null || $('#idCard').val() == "") {
|
/* if ($('#idCard').val() == null || $('#idCard').val() == "") {
|
||||||
layer.msg("请输入身份证号", {icon: 2, time: 2000});
|
layer.msg("请输入身份证号", {icon: 2, time: 2000});
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
if (!checkPsidno($("#idCard").val())) {
|
/* if (!checkPsidno($("#idCard").val())) {
|
||||||
layer.msg("身份证号码格式不正确", {icon: 2, time: 2000});
|
layer.msg("身份证号码格式不正确", {icon: 2, time: 2000});
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if ($('#name').val() == null || $('#name').val() == "") {
|
if ($('#name').val() == null || $('#name').val() == "") {
|
||||||
layer.msg("请输入姓名", {icon: 2, time: 2000});
|
layer.msg("请输入姓名", {icon: 2, time: 2000});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($('#sex').val() == null || $('#sex').val() == "") {
|
/* if ($('#sex').val() == null || $('#sex').val() == "") {
|
||||||
layer.msg("请选择性别", {icon: 2, time: 2000});
|
layer.msg("请选择性别", {icon: 2, time: 2000});
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
if ($('#phone').val() == null || $('#phone').val() == "") {
|
if ($('#phone').val() == null || $('#phone').val() == "") {
|
||||||
layer.msg("请输入手机号", {icon: 2, time: 2000});
|
layer.msg("请输入手机号", {icon: 2, time: 2000});
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -289,9 +289,9 @@
|
||||||
{
|
{
|
||||||
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
|
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
|
||||||
},
|
},
|
||||||
{field: 'idCard', title: '身份证号', align: 'center', minWidth: 180},
|
// {field: 'idCard', title: '身份证号', align: 'center', minWidth: 180},
|
||||||
{field: 'name', title: '姓名', align: 'center', minWidth: 160},
|
{field: 'name', title: '姓名', align: 'center', minWidth: 160},
|
||||||
{field: 'sex', title: '性别', align: 'center', minWidth: 80},
|
// {field: 'sex', title: '性别', align: 'center', minWidth: 80},
|
||||||
{field: 'phone', title: '联系电话', align: 'center', minWidth: 160},
|
{field: 'phone', title: '联系电话', align: 'center', minWidth: 160},
|
||||||
{field: 'deptName', title: '所属部门/项目', align: 'center', minWidth: 160},
|
{field: 'deptName', title: '所属部门/项目', align: 'center', minWidth: 160},
|
||||||
{field: 'roleName', title: '系统角色', align: 'center', minWidth: 160},
|
{field: 'roleName', title: '系统角色', align: 'center', minWidth: 160},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
class="layui-input">
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<!-- <div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>性别</label>
|
<label class="layui-form-label"><span style="color: red">*</span>性别</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select class="layui-select" id="sex" name="sex" lay-verify="required">
|
<select class="layui-select" id="sex" name="sex" lay-verify="required">
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<option value="0">女</option>
|
<option value="0">女</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<!-- <div class="layui-form-item">
|
<!-- <div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>身份证号</label>
|
<label class="layui-form-label"><span style="color: red">*</span>身份证号</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue