修改大屏接口

This commit is contained in:
liuwu 2023-08-25 11:09:37 +08:00
parent d30a679941
commit 8fd74f4f0e
21 changed files with 442 additions and 112 deletions

View File

@ -6,6 +6,7 @@ import java.util.Map;
import com.cyx.common.annotation.Log; import com.cyx.common.annotation.Log;
import com.cyx.common.core.controller.BaseController; import com.cyx.common.core.controller.BaseController;
import com.cyx.common.core.domain.AjaxResult; import com.cyx.common.core.domain.AjaxResult;
import com.cyx.common.core.domain.entity.SysDept;
import com.cyx.common.core.page.TableDataInfo; import com.cyx.common.core.page.TableDataInfo;
import com.cyx.common.enums.BusinessType; import com.cyx.common.enums.BusinessType;
import com.cyx.common.utils.poi.ExcelUtil; import com.cyx.common.utils.poi.ExcelUtil;
@ -110,7 +111,7 @@ public class TAmentPartyAffairsController extends BaseController
public TableDataInfo list(TAmentPartyAffairs tAmentPartyAffairs) public TableDataInfo list(TAmentPartyAffairs tAmentPartyAffairs)
{ {
startPage(); startPage();
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.selectTAmentPartyAffairsList(tAmentPartyAffairs); List<TAmentPartyAffairs> list = tAmentPartyAffairsService.selectTAmentPartyAffairsListAll(tAmentPartyAffairs);
return getDataTable(list); return getDataTable(list);
} }
@ -123,7 +124,7 @@ public class TAmentPartyAffairsController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult export(TAmentPartyAffairs tAmentPartyAffairs) public AjaxResult export(TAmentPartyAffairs tAmentPartyAffairs)
{ {
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.selectTAmentPartyAffairsList(tAmentPartyAffairs); List<TAmentPartyAffairs> list = tAmentPartyAffairsService.selectTAmentPartyAffairsListAll(tAmentPartyAffairs);
ExcelUtil<TAmentPartyAffairs> util = new ExcelUtil<TAmentPartyAffairs>(TAmentPartyAffairs.class); ExcelUtil<TAmentPartyAffairs> util = new ExcelUtil<TAmentPartyAffairs>(TAmentPartyAffairs.class);
return util.exportExcel(list, "党务数据"); return util.exportExcel(list, "党务数据");
} }
@ -146,6 +147,7 @@ public class TAmentPartyAffairsController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TAmentPartyAffairs tAmentPartyAffairs) public AjaxResult addSave(TAmentPartyAffairs tAmentPartyAffairs)
{ {
tAmentPartyAffairs.setUnit(getSysUser().getDept().getDeptName());
return toAjax(tAmentPartyAffairsService.insertTAmentPartyAffairs(tAmentPartyAffairs)); return toAjax(tAmentPartyAffairsService.insertTAmentPartyAffairs(tAmentPartyAffairs));
} }

View File

@ -5,9 +5,13 @@ import java.util.List;
import com.cyx.common.annotation.Log; import com.cyx.common.annotation.Log;
import com.cyx.common.core.controller.BaseController; import com.cyx.common.core.controller.BaseController;
import com.cyx.common.core.domain.AjaxResult; import com.cyx.common.core.domain.AjaxResult;
import com.cyx.common.core.domain.entity.SysDept;
import com.cyx.common.core.page.TableDataInfo; import com.cyx.common.core.page.TableDataInfo;
import com.cyx.common.enums.BusinessType; import com.cyx.common.enums.BusinessType;
import com.cyx.common.utils.poi.ExcelUtil; import com.cyx.common.utils.poi.ExcelUtil;
import com.cyx.system.service.ISysDeptService;
import com.cyx.web.base.domain.TAmentBranch;
import com.cyx.web.base.service.ITAmentBranchService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -55,6 +59,52 @@ public class TAmentPersonnelController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 人员接口
* @param tAmentPersonnel
* @return
*/
@RequiresPermissions("base:personnel:list")
@PostMapping("/personnelList")
@ResponseBody
public AjaxResult personnelList(TAmentPersonnel tAmentPersonnel)
{
return AjaxResult.success(tAmentPersonnelService.selectTAmentPersonnelList(tAmentPersonnel));
}
@Autowired
private ISysDeptService deptService;
/**
* 部门接口
* @param dept
* @return
*/
@RequiresPermissions("base:personnel:list")
@PostMapping("/deptList")
@ResponseBody
public AjaxResult deptList(SysDept dept)
{
return AjaxResult.success(deptService.selectDeptList(dept));
}
@Autowired
private ITAmentBranchService branchService;
/**
* 支部接口
* @param branch
* @return
*/
@RequiresPermissions("base:personnel:list")
@PostMapping("/branchList")
@ResponseBody
public AjaxResult branchList(TAmentBranch branch)
{
return AjaxResult.success(branchService.selectTAmentBranchList(branch));
}
/** /**
* 导出人员列表 * 导出人员列表
*/ */

View File

@ -26,7 +26,7 @@ public class TAmentPartyAffairs extends BaseEntity
private String type; private String type;
/** 单位名称 */ /** 单位名称 */
@Excel(name = "单位名称") // @Excel(name = "单位名称")
private String unit; private String unit;
/** 目标项及分值 */ /** 目标项及分值 */
@ -50,8 +50,58 @@ public class TAmentPartyAffairs extends BaseEntity
private String method; private String method;
/** 负责人 */ /** 负责人 */
@Excel(name = "负责人")
private String head; private String head;
@Excel(name = "负责人")
private String header;
@Excel(name = "审核人")
private String reviewer;
@Excel(name = "操作人")
private String oprator;
@Excel(name = "支部")
private String branch;
@Excel(name = "部门")
private String deptName;
public String getHeader() {
return header;
}
public void setHeader(String header) {
this.header = header;
}
public String getReviewer() {
return reviewer;
}
public void setReviewer(String reviewer) {
this.reviewer = reviewer;
}
public String getOprator() {
return oprator;
}
public void setOprator(String oprator) {
this.oprator = oprator;
}
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
/** 审核人 */ /** 审核人 */
@Excel(name = "审核人") @Excel(name = "审核人")

View File

@ -74,4 +74,6 @@ public interface TAmentPartyAffairsMapper
List<Map<String, Object>> groupAll(TAmentPartyAffairs am); List<Map<String, Object>> groupAll(TAmentPartyAffairs am);
List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> selectTAmentPartyAffairsListAll(TAmentPartyAffairs tAmentPartyAffairs);
} }

View File

@ -74,4 +74,6 @@ public interface ITAmentPartyAffairsService
List<Map<String, Object>> groupAll(TAmentPartyAffairs am); List<Map<String, Object>> groupAll(TAmentPartyAffairs am);
List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> selectTAmentPartyAffairsListAll(TAmentPartyAffairs tAmentPartyAffairs);
} }

View File

@ -47,6 +47,11 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService
return tAmentPartyAffairsMapper.selectTAmentPartyAffairsList(tAmentPartyAffairs); return tAmentPartyAffairsMapper.selectTAmentPartyAffairsList(tAmentPartyAffairs);
} }
@Override
public List<TAmentPartyAffairs> selectTAmentPartyAffairsListAll(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.selectTAmentPartyAffairsListAll(tAmentPartyAffairs);
}
/** /**
* 新增党务 * 新增党务
* *

View File

@ -7,7 +7,7 @@ ruoyi:
# 版权年份 # 版权年份
copyrightYear: 2023 copyrightYear: 2023
# 实例演示开关 # 实例演示开关
demoEnabled: false demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: D:/ruoyi/uploadPath profile: D:/ruoyi/uploadPath
# 获取ip地址开关 # 获取ip地址开关

View File

@ -16,13 +16,18 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">部门:</label> <label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input required name="dept" class="form-control" type="text"> <select name="dept" id="dept" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">评选人:</label> <label class="col-sm-3 control-label">评选人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input required name="commit" class="form-control" type="text"> <select name="commit" id="commit" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input required name="commit" class="form-control" type="text">-->
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -37,7 +42,10 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">审核人:</label> <label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="confirm" class="form-control" type="text"> <select name="confirm" id="confirm" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input name="confirm" class="form-control" type="text">-->
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -87,6 +95,36 @@
focusCleanup: true focusCleanup: true
}); });
$.ajax({
type: "post",
url: ctx + "base/personnel/personnelList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.id+'">'+d.name+'</option>';
})
$("#commit")[0].innerHTML=opt;
$("#confirm")[0].innerHTML=opt;
}
});
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#dept")[0].innerHTML=opt;
}
});
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-advanceddept-add').serialize()); $.operate.save(prefix + "/add", $('#form-advanceddept-add').serialize());

View File

@ -121,8 +121,9 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]

View File

@ -44,7 +44,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">是否显示:</label> <label class="col-sm-3 control-label">是否显示:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="show" th:field="*{show}" class="form-control" type="text"> <input name="status" th:field="*{status}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -16,13 +16,19 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">姓名:</label> <label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input required name="name" class="form-control" type="text"> <select name="name" id="name" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input required name="name" class="form-control" type="text">-->
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">提交人:</label> <label class="col-sm-3 control-label">提交人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="commit" class="form-control" type="text"> <select name="commit" id="commit" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input name="commit" class="form-control" type="text">-->
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -37,7 +43,9 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">审批人:</label> <label class="col-sm-3 control-label">审批人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="confirm" class="form-control" type="text"> <select name="confirm" id="confirm" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -69,6 +77,22 @@
focusCleanup: true focusCleanup: true
}); });
$.ajax({
type: "post",
url: ctx + "base/personnel/personnelList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.id+'">'+d.name+'</option>';
})
$("#name")[0].innerHTML=opt;
$("#commit")[0].innerHTML=opt;
$("#confirm")[0].innerHTML=opt;
}
});
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-advancedparty-add').serialize()); $.operate.save(prefix + "/add", $('#form-advancedparty-add').serialize());

View File

@ -105,8 +105,11 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]

View File

@ -44,7 +44,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">是否显示:</label> <label class="col-sm-3 control-label">是否显示:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="show" th:field="*{show}" class="form-control" type="text"> <input name="status" th:field="*{status}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -58,13 +58,17 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">负责人:</label> <label class="col-sm-3 control-label">负责人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="head" class="form-control" type="text"> <select name="head" id="head" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">审核人:</label> <label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="reviewed" class="form-control" type="text"> <select name="reviewed" id="reviewed" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -79,19 +83,25 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">操作人员ID</label> <label class="col-sm-3 control-label">操作人员ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="perId" class="form-control" type="text"> <select name="perId" id="perId" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">部门ID</label> <label class="col-sm-3 control-label">部门ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deptId" class="form-control" type="text"> <select name="deptId" id="deptId" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">支部ID</label> <label class="col-sm-3 control-label">支部ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="branchId" class="form-control" type="text"> <select name="branchId" id="branchId" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -110,6 +120,52 @@
onkeyup: false, onkeyup: false,
focusCleanup: true focusCleanup: true
}); });
refresh()
function refresh(){
$.ajax({
type: "post",
url: ctx + "base/personnel/personnelList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.id+'">'+d.name+'</option>';
})
$("#head")[0].innerHTML=opt;
$("#reviewed")[0].innerHTML=opt;
$("#perId")[0].innerHTML=opt;
}
});
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#deptId")[0].innerHTML=opt;
}
});
$.ajax({
type: "post",
url: ctx + "base/personnel/branchList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.branchId+'">'+d.branchName+'</option>';
})
$("#branchId")[0].innerHTML=opt;
}
});
}
$("#type-selector").on("change", function() { $("#type-selector").on("change", function() {
var type = $(this).val(); var type = $(this).val();

View File

@ -101,10 +101,10 @@
// field: 'type', // field: 'type',
// title: '作用于附件' // title: '作用于附件'
// }, // },
{ // {
field: 'unit', // field: 'unit',
title: '单位名称' // title: '单位名称'
}, // },
{ {
field: 'type', field: 'type',
title: '类型' title: '类型'
@ -145,11 +145,11 @@
} }
}, },
{ {
field: 'head', field: 'header',
title: '负责人' title: '负责人'
}, },
{ {
field: 'reviewed', field: 'reviewer',
title: '审核人' title: '审核人'
}, },
{ {
@ -157,16 +157,16 @@
title: '完成截止时间' title: '完成截止时间'
}, },
{ {
field: 'perId', field: 'oprator',
title: '操作人员ID' title: '操作人员'
}, },
{ {
field: 'deptId', field: 'deptName',
title: '部门ID' title: '部门'
}, },
{ {
field: 'branchId', field: 'branch',
title: '支部ID' title: '支部'
}, },
{ {
field: 'remark', field: 'remark',
@ -177,8 +177,11 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]

View File

@ -101,10 +101,10 @@
// field: 'type', // field: 'type',
// title: '作用于附件' // title: '作用于附件'
// }, // },
{ // {
field: 'unit', // field: 'unit',
title: '单位名称' // title: '单位名称'
}, // },
{ {
field: 'type', field: 'type',
title: '类型' title: '类型'
@ -153,11 +153,11 @@
title: '督办科室' title: '督办科室'
}, },
{ {
field: 'head', field: 'header',
title: '负责人' title: '负责人'
}, },
{ {
field: 'reviewed', field: 'reviewer',
title: '审核人' title: '审核人'
}, },
{ {
@ -165,16 +165,16 @@
title: '完成截止时间' title: '完成截止时间'
}, },
{ {
field: 'perId', field: 'oprator',
title: '操作人员ID' title: '操作人员'
}, },
{ {
field: 'deptId', field: 'deptName',
title: '部门ID' title: '部门'
}, },
{ {
field: 'branchId', field: 'branch',
title: '支部ID' title: '支部'
}, },
{ {
field: 'remark', field: 'remark',
@ -185,8 +185,11 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]

View File

@ -8,14 +8,14 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-affairs-edit" th:object="${tAmentPartyAffairs}"> <form class="form-horizontal m" id="form-affairs-edit" th:object="${tAmentPartyAffairs}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">单位名称:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="unit" th:field="*{unit}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">单位名称:</label> <label class="col-sm-3 control-label">目标项:</label>
<div class="col-sm-8">
<input name="unit" th:field="*{unit}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">目标项及分值:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="target" th:field="*{target}" class="form-control" type="text"> <input name="target" th:field="*{target}" class="form-control" type="text">
</div> </div>
@ -35,25 +35,30 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">达标分:</label> <label class="col-sm-3 control-label">达标分:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="score" class="form-control">[[*{score}]]</textarea> <input name="score" th:field="*{score}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">考核方式:</label> <label class="col-sm-3 control-label">考核方式:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="method" th:field="*{method}" class="form-control" type="text"> <textarea name="method" class="form-control">[[*{method}]]</textarea>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">负责人:</label> <label class="col-sm-3 control-label">负责人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="head" th:field="*{head}" class="form-control" type="text"> <select name="head" th:field="*{head}" id="head" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">审核人:</label> <label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="reviewed" th:field="*{reviewed}" class="form-control" type="text"> <select name="reviewed" th:field="*{reviewed}" id="reviewed" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input name="reviewed" th:field="*{reviewed}" class="form-control" type="text">-->
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -68,19 +73,26 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">操作人员ID</label> <label class="col-sm-3 control-label">操作人员ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="perId" th:field="*{perId}" class="form-control" type="text"> <select name="perId" th:field="*{perId}" id="perId" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input name="perId" th:field="*{perId}" class="form-control" type="text">-->
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">部门ID</label> <label class="col-sm-3 control-label">部门ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deptId" th:field="*{deptId}" class="form-control" type="text"> <select name="deptId" th:field="*{deptId}" id="deptId" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">支部ID</label> <label class="col-sm-3 control-label">支部ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="branchId" th:field="*{branchId}" class="form-control" type="text"> <select name="branchId" th:field="*{branchId}" id="branchId" class="form-control m-b">
<option value="">请选择</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -99,6 +111,53 @@
focusCleanup: true focusCleanup: true
}); });
refresh()
function refresh(){
$.ajax({
type: "post",
url: ctx + "base/personnel/personnelList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.id+'">'+d.name+'</option>';
})
$("#head")[0].innerHTML=opt;
$("#reviewed")[0].innerHTML=opt;
$("#perId")[0].innerHTML=opt;
}
});
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#deptId")[0].innerHTML=opt;
}
});
$.ajax({
type: "post",
url: ctx + "base/personnel/branchList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.branchId+'">'+d.branchName+'</option>';
})
$("#branchId")[0].innerHTML=opt;
}
});
}
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-affairs-edit').serialize()); $.operate.save(prefix + "/edit", $('#form-affairs-edit').serialize());

View File

@ -98,8 +98,8 @@
visible: false visible: false
}, },
{ {
field: 'unit', field: 'branch',
title: '单位名称' title: '支部'
}, },
{ {
field: 'deptName', field: 'deptName',
@ -114,7 +114,7 @@
title: '指标' title: '指标'
}, },
{ {
field: 'finishDate', field: 'finish_date',
title: '截止时间' title: '截止时间'
}, },
{ {
@ -127,10 +127,10 @@
}, },
{ {
field: 'percent', field: 'percent',
title: '完成度' title: '完成度(%)'
}, },
{ {
field: 'per_id', field: 'header',
title: '负责人' title: '负责人'
}, },
{ {
@ -138,23 +138,24 @@
title: '联系方式' title: '联系方式'
}, },
{ {
field: 'reviewed', field: 'reviewer',
title: '审核人' title: '审核人'
}, },
{ {
field: 'reviewedTime', field: 'reviewedTime',
title: '审核时间' title: '审核时间'
}, },
{ // {
title: '操作', // title: '操作',
align: 'center', // align: 'center',
formatter: function(value, row, index) { // formatter: function(value, row, index) {
var actions = []; // var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); // return actions.join('');
} // }
}] // }
]
}; };
$.table.init(options); $.table.init(options);
}); });

View File

@ -101,10 +101,10 @@
// field: 'type', // field: 'type',
// title: '作用于附件' // title: '作用于附件'
// }, // },
{ // {
field: 'unit', // field: 'unit',
title: '单位名称' // title: '单位名称'
}, // },
{ {
field: 'type', field: 'type',
title: '类型' title: '类型'
@ -145,11 +145,11 @@
} }
}, },
{ {
field: 'head', field: 'header',
title: '负责人' title: '负责人'
}, },
{ {
field: 'reviewed', field: 'reviewer',
title: '审核人' title: '审核人'
}, },
{ {
@ -157,16 +157,16 @@
title: '完成截止时间' title: '完成截止时间'
}, },
{ {
field: 'perId', field: 'oprator',
title: '操作人员ID' title: '操作人员'
}, },
{ {
field: 'deptId', field: 'deptName',
title: '部门ID' title: '部门'
}, },
{ {
field: 'branchId', field: 'branch',
title: '支部ID' title: '支部'
}, },
{ {
field: 'remark', field: 'remark',
@ -177,8 +177,11 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]

View File

@ -77,10 +77,10 @@
// field: 'type', // field: 'type',
// title: '作用于附件' // title: '作用于附件'
// }, // },
{ // {
field: 'unit', // field: 'unit',
title: '单位名称' // title: '单位名称'
}, // },
{ {
field: 'type', field: 'type',
title: '类型' title: '类型'
@ -129,11 +129,11 @@
title: '督办科室' title: '督办科室'
}, },
{ {
field: 'head', field: 'header',
title: '负责人' title: '负责人'
}, },
{ {
field: 'reviewed', field: 'reviewer',
title: '审核人' title: '审核人'
}, },
{ {
@ -141,16 +141,16 @@
title: '完成截止时间' title: '完成截止时间'
}, },
{ {
field: 'perId', field: 'oprator',
title: '操作人员ID' title: '操作人员'
}, },
{ {
field: 'deptId', field: 'deptName',
title: '部门ID' title: '部门'
}, },
{ {
field: 'branchId', field: 'branch',
title: '支部ID' title: '支部'
}, },
{ {
field: 'remark', field: 'remark',
@ -161,8 +161,11 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]

View File

@ -48,6 +48,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="branchId != null "> and branch_id = #{branchId}</if> <if test="branchId != null "> and branch_id = #{branchId}</if>
</where> </where>
</select> </select>
<select id="selectTAmentPartyAffairsListAll" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
select
a.*,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM
t_ament_party_affairs a
LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
LEFT JOIN t_ament_personnel d ON a.head = d.id
LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
</select>
<select id="selectTAmentPartyAffairsById" parameterType="Long" resultMap="TAmentPartyAffairsResult"> <select id="selectTAmentPartyAffairsById" parameterType="Long" resultMap="TAmentPartyAffairsResult">
<include refid="selectTAmentPartyAffairsVo"/> <include refid="selectTAmentPartyAffairsVo"/>
@ -135,13 +152,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="finishedstaticList" resultType="map"> <select id="finishedstaticList" resultType="map">
SELECT SELECT
a.*, a.*,
ROUND( a.now_score / a.score ) percent, ROUND( a.now_score / a.score *100) percent,
d.dept_name deptName,
a.shot_name shotName, a.shot_name shotName,
a.now_score nowScore a.now_score nowScore,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM FROM
t_ament_party_affairs a t_ament_party_affairs a
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
LEFT JOIN t_ament_personnel d ON a.head = d.id
LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
GROUP BY GROUP BY
a.type, a.type,
a.shot_name a.shot_name