From e172143f89d6a5362d2dbe37de000585459d435e Mon Sep 17 00:00:00 2001 From: zhaoyantao Date: Tue, 26 Nov 2024 15:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E9=A1=B5=E9=9D=A2=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=86=8D=E6=AC=A1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RwkStaffInformationController.java | 38 +- .../main/resources/static/css/use/css1.css | 55 ++ .../src/main/resources/templates/main.html | 4 +- .../templates/system/information/add.html | 707 ++++++------------ .../templates/system/information/edit.html | 618 ++++++--------- .../system/information/information.html | 8 + .../system/information/informationView.html | 67 +- .../system/domain/RwkStaffInformation.java | 32 +- .../mapper/RwkStaffInformationMapper.java | 44 +- .../service/IRwkStaffInformationService.java | 18 +- .../impl/RwkStaffInformationServiceImpl.java | 75 +- .../system/RwkStaffInformationMapper.xml | 63 +- 12 files changed, 765 insertions(+), 964 deletions(-) diff --git a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java index 9062a4b..187da9d 100644 --- a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java +++ b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java @@ -2,9 +2,7 @@ package com.rwk.web.controller.ability; import java.util.ArrayList; import java.util.List; - -import com.rwk.common.utils.StringUtils; -import com.rwk.system.domain.RwkFamilyMember; +import com.rwk.common.utils.DateUtils; import com.rwk.system.service.IRwkFamilyMemberService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -62,14 +60,13 @@ public class RwkStaffInformationController extends BaseController public String receiveView(@PathVariable("id") Long id, ModelMap mmap) { RwkStaffInformation rwkStaffInformation = rwkStaffInformationService.selectRwkStaffInformationById(id); - List list = new ArrayList<>(); - if (StringUtils.isNotEmpty(rwkStaffInformation.getFamilyMemberCode())){ - RwkFamilyMember rwkFamilyMember = new RwkFamilyMember(); - rwkFamilyMember.setFamilyMemberCode(rwkStaffInformation.getFamilyMemberCode()); - list = rwkFamilyMemberService.selectRwkFamilyMemberList(rwkFamilyMember); - } + List> resumeLines = splitConversion(rwkStaffInformation.getResume()); + List> trainingLines = splitConversion(rwkStaffInformation.getTraining()); + List> achievementLines = splitConversion(rwkStaffInformation.getAchievement()); mmap.put("rwkStaffInformation",rwkStaffInformation); - mmap.put("familyList",list); + mmap.put("resumeLines",resumeLines); + mmap.put("trainingLines",trainingLines); + mmap.put("achievementLines",achievementLines); return prefix + "/informationView"; } @@ -118,6 +115,8 @@ public class RwkStaffInformationController extends BaseController @ResponseBody public AjaxResult addSave(RwkStaffInformation rwkStaffInformation) { + rwkStaffInformation.setCreateTime(DateUtils.getNowDate()); + rwkStaffInformation.setCreateBy(getSysUser().getLoginName()); return toAjax(rwkStaffInformationService.insertRwkStaffInformation(rwkStaffInformation)); } @@ -142,6 +141,8 @@ public class RwkStaffInformationController extends BaseController @ResponseBody public AjaxResult editSave(RwkStaffInformation rwkStaffInformation) { + rwkStaffInformation.setUpdateTime(DateUtils.getNowDate()); + rwkStaffInformation.setUpdateBy(getSysUser().getLoginName()); return toAjax(rwkStaffInformationService.updateRwkStaffInformation(rwkStaffInformation)); } @@ -156,4 +157,21 @@ public class RwkStaffInformationController extends BaseController { return toAjax(rwkStaffInformationService.deleteRwkStaffInformationByIds(ids)); } + + private List> splitConversion(String string){ + List> result = new ArrayList<>(); + String[] lines = string.split("\r\n"); + for (String line : lines) { + // 对每一行按空白字符分割,去除前后空格 + String[] parts = line.trim().split("\\s+"); + List lineParts = new ArrayList<>(); + for (String part : parts) { + lineParts.add(part.trim()); + } + if (!lineParts.isEmpty()) { + result.add(lineParts); + } + } + return result; + } } diff --git a/rwk-admin/src/main/resources/static/css/use/css1.css b/rwk-admin/src/main/resources/static/css/use/css1.css index 8550d49..0306323 100644 --- a/rwk-admin/src/main/resources/static/css/use/css1.css +++ b/rwk-admin/src/main/resources/static/css/use/css1.css @@ -224,4 +224,59 @@ dd,dl{ position: relative; min-width: 80px; word-break: break-all +} +/*-----表格样式-----*/ +.information table { + width: 100%; + border-collapse: collapse; /* 合并边框 */ +} +.information td { + border: 1px solid #000; /* 内部框线 */ + padding: 10px; + text-align: left; +} +.information input[type="text"] { + width: 100%; + border: none; + box-sizing: border-box; +} +.information .form-control:focus{ + border: none!important; + box-shadow:none!important; +} + +.multiLine-item { + padding: 10px; + text-align: left; + width: 100%; + box-sizing: border-box; + display: flex; +} +.left-content { + min-width: 145px; +} +.right-content { + margin-left: 20px; +} +.bg-color-1 { + background-color: #F9F9F9; +} +.bg-color-2 { + background-color: #ffffff; +} +.informationText table{ + width: 100%; +} +.informationText table tr:first-child{ + height: 45px; + background-color: #F3F3F3; + color: #6F6F6E; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); +} +.informationText table th, +.informationText table td{ + text-align: center; +} +.informationText table tr td:last-child{ + text-align: left; } \ No newline at end of file diff --git a/rwk-admin/src/main/resources/templates/main.html b/rwk-admin/src/main/resources/templates/main.html index 2413347..bbfad28 100644 --- a/rwk-admin/src/main/resources/templates/main.html +++ b/rwk-admin/src/main/resources/templates/main.html @@ -102,7 +102,6 @@ $('.cut').removeClass('active'); $(this).addClass('active'); }); - var array2 = [2,4,6,8,10]; var grid = {left: '10%', right: '6%', bottom: '3%', top:'6%'} //饼图1 pieChartMethod('pieChart1',array1,"职务层次情况",'60%',"",grid,"",true); @@ -245,7 +244,6 @@ function funnelPlot(id,data){ var myChart = echarts.init(document.getElementById(id)); var changeData = handleData(data); - console.log(changeData); var option = { // tooltip: { // trigger: 'item', @@ -314,7 +312,7 @@ return data.map((item,index) => { return { name: item.name+" "+item.value+" 人", - value: array2[index] + value: (index+1)*2 }; }); } diff --git a/rwk-admin/src/main/resources/templates/system/information/add.html b/rwk-admin/src/main/resources/templates/system/information/add.html index 70d901f..2540f60 100644 --- a/rwk-admin/src/main/resources/templates/system/information/add.html +++ b/rwk-admin/src/main/resources/templates/system/information/add.html @@ -11,405 +11,188 @@ -
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- - -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- - -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- - -
-
-
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
姓名性别民族国籍 +
+
+ +
+ + +
出生年月日出生地籍贯
是否取得境外长期居留资格取得国家证件号
参加工作时间身份证号码(☆必填)
党派党派职务加入时间
人才类别宗教信仰
现任社会职务(包括各级人大、政协等职务)知联会职务
全日制教育毕业院校及专业学历学位
在职教育毕业院校及专业学历学位
工作单位及职务技术职称专业特长
单位属性职务级别任现职时间
单位地址电话邮编
家庭地址电话邮编
电子信箱手机微信号
业余爱好
简历
培训情况
主要成就(工作成绩、成果、受奖励和荣誉称号等)
家庭成员称谓姓名出生年月政治面貌工作单位及职务
@@ -420,86 +203,34 @@ $("#form-information-add").validate({ focusCleanup: true }); - init(); - //初始化 - function init(){ - loadTable(); - } - - //加载表格 - function loadTable(){ - var options = { - data: [], - pagination: false, - showSearch: false, - showRefresh: false, - showToggle: false, - showColumns: false, - sidePagination: "client", - columns: [{ - checkbox: true - }, - { - field: 'index', - align: 'center', - title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - var columnId = $.common.sprintf("", index, row.id); - return columnIndex + $.table.serialNumber(index) + columnId; - } - }, - { - field: 'appellation', - align: 'center', - title: '称谓', - formatter: function(value, row, index) { - return $.common.sprintf("", index, value); - } - }, - { - field: 'name', - align: 'center', - title: '姓名', - formatter: function(value, row, index) { - return $.common.sprintf("", index, value); - } + //上传图片 + function getFileName(){ + var file = $("#fileUpload")[0].files[0]; + var filename = file.name; + var formData = new FormData(); + formData.append("file", file); + var allowedExtensions = /(\.jpg|\.png)$/i; + var fileExtension = filename.substring(filename.lastIndexOf('.')).toLowerCase(); + //判断文件是否符合规范 + if (allowedExtensions.test(fileExtension)) { + $.ajax({ + url: ctx + 'common/upload', + type: 'POST', + data: formData, + contentType: false, + processData: false, + success: function(response) { + $("input[name=photo]").val(response.url); + $("#photo").attr("src",response.url).show(); }, - { - field: 'birthday', - align: 'center', - title: '出生年月', - formatter: function(value, row, index) { - return $.common.sprintf("", index, value); - } - }, - { - field: 'politicalStatus', - align: 'center', - title: '政治面貌', - formatter: function(value, row, index) { - return $.common.sprintf("", index, value); - } - }, - { - field: 'unitJob', - align: 'left', - title: '工作单位及职务', - formatter: function(value, row, index) { - return $.common.sprintf("", index, value); - } - }, - { - title: '操作', - align: 'center', - formatter: function(value, row, index) { - var num = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); - return '删除'; - } - }] - }; - $.table.init(options); + error: function(xhr, status, error) { + console.error(error); + } + }); + } else { + $.modal.alertError("该文件类型不符合"); + } } function submitHandler() { @@ -508,28 +239,6 @@ } } - function addRow() { - var element = $("#" + table.options.id); - var count = element.bootstrapTable('getData').length; - var row = { - index: $.table.serialNumber(count), - appellation:"", - name: "", - birthday: "", - politicalStatus: "", - unitJob: "" - } - sub.addRow(row); - scrollToBottom(); - } - - // 滚动到页面底部的函数 - function scrollToBottom() { - $('html, body').animate({ - scrollTop: $(document).height() - }, 'slow'); - } - //随机生成连表code function generateCodeId() { const timestamp = Date.now(); diff --git a/rwk-admin/src/main/resources/templates/system/information/edit.html b/rwk-admin/src/main/resources/templates/system/information/edit.html index c134eb3..873a1b1 100644 --- a/rwk-admin/src/main/resources/templates/system/information/edit.html +++ b/rwk-admin/src/main/resources/templates/system/information/edit.html @@ -2,6 +2,7 @@ +
@@ -10,404 +11,189 @@
-
+ -
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- - -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- - -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- - -
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
姓名性别民族国籍 +
+
+ +
+ + +
出生年月日出生地籍贯
是否取得境外长期居留资格取得国家证件号
参加工作时间身份证号码(☆必填)
党派党派职务加入时间
人才类别宗教信仰
现任社会职务(包括各级人大、政协等职务)知联会职务
全日制教育毕业院校及专业学历学位
在职教育毕业院校及专业学历学位
工作单位及职务技术职称专业特长
单位属性职务级别任现职时间
单位地址电话邮编
家庭地址电话邮编
电子信箱手机微信号
业余爱好
简历
培训情况
主要成就(工作成绩、成果、受奖励和荣誉称号等)
家庭成员称谓姓名出生年月政治面貌工作单位及职务
@@ -417,12 +203,50 @@ $("#form-information-edit").validate({ focusCleanup: true }); + var photo = [[${rwkStaffInformation.photo}]]; + init(); function submitHandler() { if ($.validate.form()) { $.operate.saveTab(prefix + "/edit", $('#form-information-edit').serialize()); } } + + function init(){ + if (photo){ + $("input[name=photo]").val(photo); + $("#photo").attr("src",photo).show(); + } + } + + //上传图片 + function getFileName() { + var file = $("#fileUpload")[0].files[0]; + var filename = file.name; + var formData = new FormData(); + formData.append("file", file); + var allowedExtensions = /(\.jpg|\.png)$/i; + var fileExtension = filename.substring(filename.lastIndexOf('.')).toLowerCase(); + //判断文件是否符合规范 + if (allowedExtensions.test(fileExtension)) { + $.ajax({ + url: ctx + 'common/upload', + type: 'POST', + data: formData, + contentType: false, + processData: false, + success: function (response) { + $("input[name=photo]").val(response.url); + $("#photo").attr("src", response.url).show(); + }, + error: function (xhr, status, error) { + console.error(error); + } + }); + } else { + $.modal.alertError("该文件类型不符合"); + } + } \ No newline at end of file diff --git a/rwk-admin/src/main/resources/templates/system/information/information.html b/rwk-admin/src/main/resources/templates/system/information/information.html index a61fb31..4557035 100644 --- a/rwk-admin/src/main/resources/templates/system/information/information.html +++ b/rwk-admin/src/main/resources/templates/system/information/information.html @@ -99,6 +99,14 @@ field: 'mobilePhone', title: '手机号' }, + { + field: 'nation', + title: '民族' + }, + { + field: 'party', + title: '党派' + }, { title: '操作', align: 'center', diff --git a/rwk-admin/src/main/resources/templates/system/information/informationView.html b/rwk-admin/src/main/resources/templates/system/information/informationView.html index c87409e..3f41d57 100644 --- a/rwk-admin/src/main/resources/templates/system/information/informationView.html +++ b/rwk-admin/src/main/resources/templates/system/information/informationView.html @@ -27,13 +27,13 @@ background-color: #1a7bb9; } .piece .line{ - width: calc(64% - 20px); + flex: 0 0 calc(88% - 20px); margin-left: 20px; margin-top: 10px; border-top: 1px solid #E1E1E1; } .piece .content .informationText{ - padding-left: 20px; + padding: 20px; } .piece .content { width: 75%; @@ -86,6 +86,7 @@
+

姓名

@@ -98,7 +99,7 @@
性    别
- +
@@ -122,7 +123,7 @@
是否取得境外长期居留资格
- +
@@ -193,17 +194,14 @@
-
-
-
其他补充材料
-
+
-

学历  学位

+

学历  学位

-
+

全日制教育

@@ -220,7 +218,7 @@
-
+

在职教育

@@ -245,27 +243,58 @@

简历

-
+
+
+
+
+

培训情况

-
+
+
+
+
+

主要成就

-
+
+
+
+
+

家庭成员

- 这是内容。这里是一些示例文本,内容可以很长,测试内容测试内容测试内容
- 测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试。 + + + + + + + + + + + + + + + +
称谓姓名出生年月政治面貌工作单位及职称
@@ -283,15 +312,11 @@