Merge branch 'master' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup
This commit is contained in:
commit
9e405052a8
@ -1,6 +1,8 @@
|
||||
package cn.com.tenlion.controller.api.examination.distribution;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldCountDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldProportionDTO;
|
||||
import cn.com.tenlion.pojo.vos.distribution.DistributionSaveVO;
|
||||
import cn.com.tenlion.pojo.vos.distribution.DistributionVO;
|
||||
import cn.com.tenlion.service.examination.distribution.IDistributionService;
|
||||
@ -108,4 +110,29 @@ public class DistributionController extends DefaultBaseController {
|
||||
return new SuccessResultData<>(distributionService.count(params));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "本周考试数量", notes = "本周考试数量接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("week-count")
|
||||
SuccessResultData<List<DistributionFieldCountDTO>> weekCount() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<List<DistributionFieldCountDTO>>(distributionService.weekCount(params));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "考场数量", notes = "考场数量接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("field-count")
|
||||
SuccessResultData<Integer> fieldCount() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(distributionService.fieldCount(params));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "考场使用频次", notes = "考场使用频次占比接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("use-count")
|
||||
SuccessResultData<List<DistributionFieldProportionDTO>> useCount() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<List<DistributionFieldProportionDTO>>(distributionService.useCount(params));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
@ -32,6 +33,8 @@ import java.util.Map;
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/stationuser")
|
||||
public class StationUserController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
protected SecurityComponent securityComponent;
|
||||
@Autowired
|
||||
private IStationUserService stationUserService;
|
||||
|
||||
@ -78,6 +81,14 @@ public class StationUserController extends DefaultBaseController {
|
||||
return stationUserService.get(stationUserId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "列表", notes = "列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list-user")
|
||||
public List<String> listByUser() {
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
return stationUserService.getStationByUserId(userId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "列表", notes = "列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
|
@ -118,4 +118,6 @@ public interface IDistributionDao {
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
List<DistributionDTO> getListByFieldId(Map<String, Object> params) throws SearchException;
|
||||
|
||||
void updateStatus(Map<String, Object> params) throws UpdateException;
|
||||
}
|
@ -116,4 +116,7 @@ public interface IDistributionFieldDao {
|
||||
*/
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
List<Map<String, Object>> queryWeekCount(Map<String, Object> queryParams);
|
||||
|
||||
Integer queryCount(Map<String, Object> params);
|
||||
}
|
@ -54,6 +54,16 @@ public class DistributionDTO {
|
||||
private String distributionEndTime;
|
||||
@ApiModelProperty(name = "distributionAllotEndTime", value = "分配结束时间")
|
||||
private String distributionAllotEndTime;
|
||||
@ApiModelProperty(name = "examType", value = "考试类型。1:理论,2:实操")
|
||||
private Integer examType;
|
||||
|
||||
public Integer getExamType() {
|
||||
return examType;
|
||||
}
|
||||
|
||||
public void setExamType(Integer examType) {
|
||||
this.examType = examType;
|
||||
}
|
||||
|
||||
public String getDistributionEndTime() {
|
||||
return distributionEndTime == null ? "" : distributionEndTime;
|
||||
|
@ -0,0 +1,30 @@
|
||||
package cn.com.tenlion.pojo.dtos.distributionfield;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DistributionFieldCountDTO {
|
||||
|
||||
private String fieldName;
|
||||
|
||||
private List<Integer> weekList = new ArrayList<Integer>();
|
||||
|
||||
public String getFieldName() {
|
||||
return fieldName == null ? "" : fieldName;
|
||||
}
|
||||
|
||||
public void setFieldName(String fieldName) {
|
||||
this.fieldName = fieldName;
|
||||
}
|
||||
|
||||
public List<Integer> getWeekList() {
|
||||
if (weekList == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return weekList;
|
||||
}
|
||||
|
||||
public void setWeekList(List<Integer> weekList) {
|
||||
this.weekList = weekList;
|
||||
}
|
||||
}
|
@ -39,6 +39,16 @@ public class DistributionFieldDTO {
|
||||
private Integer isDelete;
|
||||
@ApiModelProperty(name = "invigilatorId", value = "监考老师ID")
|
||||
private String invigilatorId;
|
||||
@ApiModelProperty(name = "invigilatorName", value = "监考老师姓名")
|
||||
private String invigilatorName;
|
||||
|
||||
public String getInvigilatorName() {
|
||||
return invigilatorName == null ? "" : invigilatorName;
|
||||
}
|
||||
|
||||
public void setInvigilatorName(String invigilatorName) {
|
||||
this.invigilatorName = invigilatorName;
|
||||
}
|
||||
|
||||
public String getInvigilatorId() {
|
||||
return invigilatorId == null ? "" : invigilatorId;
|
||||
|
@ -0,0 +1,24 @@
|
||||
package cn.com.tenlion.pojo.dtos.distributionfield;
|
||||
|
||||
public class DistributionFieldProportionDTO {
|
||||
|
||||
private String fieldName;
|
||||
|
||||
private Integer count;
|
||||
|
||||
public String getFieldName() {
|
||||
return fieldName == null ? "" : fieldName;
|
||||
}
|
||||
|
||||
public void setFieldName(String fieldName) {
|
||||
this.fieldName = fieldName;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(Integer count) {
|
||||
this.count = count;
|
||||
}
|
||||
}
|
@ -2,6 +2,8 @@ package cn.com.tenlion.service.examination.distribution;
|
||||
|
||||
import cn.com.tenlion.pojo.bos.distribution.DistributionBO;
|
||||
import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldCountDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldProportionDTO;
|
||||
import cn.com.tenlion.pojo.pos.distribution.DistributionPO;
|
||||
import cn.com.tenlion.pojo.vos.distribution.DistributionSaveVO;
|
||||
import cn.com.tenlion.pojo.vos.distribution.DistributionVO;
|
||||
@ -185,4 +187,11 @@ public interface IDistributionService {
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
List<DistributionFieldCountDTO> weekCount(Map<String, Object> params);
|
||||
|
||||
Integer fieldCount(Map<String, Object> params);
|
||||
|
||||
List<DistributionFieldProportionDTO> useCount(Map<String, Object> params);
|
||||
|
||||
void updateStatus(String planId, String status);
|
||||
}
|
@ -4,8 +4,12 @@ import cn.com.tenlion.dao.examination.distribution.IDistributionDao;
|
||||
import cn.com.tenlion.organizationmanagement.pojo.dtos.organization.OrganizationDTO;
|
||||
import cn.com.tenlion.organizationmanagement.service.organization.IOrganizationService;
|
||||
import cn.com.tenlion.pojo.bos.distribution.DistributionBO;
|
||||
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldCountDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distributionfield.DistributionFieldProportionDTO;
|
||||
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
|
||||
import cn.com.tenlion.pojo.pos.distribution.DistributionPO;
|
||||
import cn.com.tenlion.pojo.vos.distribution.DistributionSaveVO;
|
||||
import cn.com.tenlion.pojo.vos.distribution.DistributionVO;
|
||||
@ -244,7 +248,15 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
|
||||
@Override
|
||||
public DistributionDTO get(Map<String, Object> params) {
|
||||
return distributionDao.get(params);
|
||||
DistributionDTO dto = distributionDao.get(params);
|
||||
if(dto == null) {
|
||||
return null;
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
query.put("examId", dto.getDistributionId());
|
||||
ExamApplyDTO examApplyDTO = iExamApplyService.get(query);
|
||||
dto.setExamType(examApplyDTO.getExamType());
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -305,7 +317,6 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<DistributionDTO>> listPage(ListPage page) {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
/**
|
||||
* 查出当前人员绑定的考点人员配置
|
||||
* 只显示已经绑定考点的信息
|
||||
@ -321,6 +332,8 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
return new SuccessResultList<>(distributionDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
page.getParams().put("stationIdList", stationIdList);
|
||||
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<DistributionDTO> distributionDTOs = list(page.getParams());
|
||||
/**
|
||||
* 回显考场
|
||||
@ -332,13 +345,119 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
dto.setDistributionFieldList(dtoList);
|
||||
}
|
||||
PageInfo<DistributionDTO> pageInfo = new PageInfo<>(distributionDTOs);
|
||||
return new SuccessResultList<>(distributionDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
SuccessResultList<List<DistributionDTO>> result = new SuccessResultList<>(distributionDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
/**
|
||||
* 查出当前人员绑定的考点人员配置
|
||||
* 只显示已经绑定考点的信息
|
||||
*/
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
List<String> stationIdList = iStationUserService.getStationByUserId(userId);
|
||||
if(stationIdList == null || stationIdList.size() < 1) {
|
||||
return 0;
|
||||
}
|
||||
params.put("stationIdList", stationIdList);
|
||||
Integer count = distributionDao.count(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DistributionFieldCountDTO> weekCount(Map<String, Object> params) {
|
||||
/**
|
||||
* 查出当前人员绑定的考点人员配置
|
||||
* 只显示已经绑定考点的信息
|
||||
*/
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
List<String> stationIdList = iStationUserService.getStationByUserId(userId);
|
||||
/**
|
||||
* 防止无权限的人员进行查看
|
||||
*/
|
||||
List<DistributionFieldCountDTO> resultList = new ArrayList<DistributionFieldCountDTO>();
|
||||
if(stationIdList == null || stationIdList.size() < 1 && !"1".equals(userId)) {
|
||||
return resultList;
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
for (String stationId: stationIdList) {
|
||||
query.put("organizationType", stationId);
|
||||
List<OrganizationDTO> organizationDTOList = iOrganizationService.list(query);
|
||||
for(OrganizationDTO organizationDTO : organizationDTOList) {
|
||||
queryParams.put("fieldId", organizationDTO.getOrganizationId());
|
||||
List<Integer> weekList = iDistributionFieldService.queryWeekCount(queryParams);
|
||||
|
||||
DistributionFieldCountDTO countDTO = new DistributionFieldCountDTO();
|
||||
countDTO.setFieldName(organizationDTO.getOrganizationName());
|
||||
countDTO.setWeekList(weekList);
|
||||
resultList.add(countDTO);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer fieldCount(Map<String, Object> params) {
|
||||
/**
|
||||
* 查出当前人员绑定的考点人员配置
|
||||
* 只显示已经绑定考点的信息
|
||||
*/
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
List<String> stationIdList = iStationUserService.getStationByUserId(userId);
|
||||
if(stationIdList == null || stationIdList.size() < 1) {
|
||||
return 0;
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
int total = 0;
|
||||
for (String stationId: stationIdList) {
|
||||
query.put("organizationType", stationId);
|
||||
List<OrganizationDTO> organizationDTOList = iOrganizationService.list(query);
|
||||
total = total + organizationDTOList.size();
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DistributionFieldProportionDTO> useCount(Map<String, Object> params) {
|
||||
/**
|
||||
* 查出当前人员绑定的考点人员配置
|
||||
* 只显示已经绑定考点的信息
|
||||
*/
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
List<String> stationIdList = iStationUserService.getStationByUserId(userId);
|
||||
/**
|
||||
* 防止无权限的人员进行查看
|
||||
*/
|
||||
List<DistributionFieldProportionDTO> resultList = new ArrayList<DistributionFieldProportionDTO>();
|
||||
if(stationIdList == null || stationIdList.size() < 1 && !"1".equals(userId)) {
|
||||
return resultList;
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
for (String stationId: stationIdList) {
|
||||
query.put("organizationType", stationId);
|
||||
List<OrganizationDTO> organizationDTOList = iOrganizationService.list(query);
|
||||
for(OrganizationDTO organizationDTO : organizationDTOList) {
|
||||
queryParams.put("fieldId", organizationDTO.getOrganizationId());
|
||||
Integer count = iDistributionFieldService.queryCount(queryParams);
|
||||
|
||||
DistributionFieldProportionDTO countDTO = new DistributionFieldProportionDTO();
|
||||
countDTO.setFieldName(organizationDTO.getOrganizationName());
|
||||
countDTO.setCount(count);
|
||||
resultList.add(countDTO);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(String planId, String status) {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("distributionId", planId);
|
||||
params.put("distributionStatus", status);
|
||||
distributionDao.updateStatus(params);
|
||||
}
|
||||
|
||||
}
|
@ -152,6 +152,10 @@ public class DistributionCardServiceImpl extends DefaultBaseService implements I
|
||||
j++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 状态改为已分配监考考试
|
||||
*/
|
||||
distributionService.updateStatus(planId, "2");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -195,4 +195,7 @@ public interface IDistributionFieldService {
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
List<Integer> queryWeekCount(Map<String, Object> queryParams);
|
||||
|
||||
Integer queryCount(Map<String, Object> queryParams);
|
||||
}
|
@ -1,9 +1,12 @@
|
||||
package cn.com.tenlion.service.examination.distributionfield.impl;
|
||||
|
||||
import cn.com.tenlion.dao.examination.distributionfield.IDistributionFieldDao;
|
||||
import cn.com.tenlion.organizationmanagement.pojo.dtos.organization.OrganizationDTO;
|
||||
import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO;
|
||||
import cn.com.tenlion.pojo.dtos.examinationuser.ExaminationDTO;
|
||||
import cn.com.tenlion.pojo.vos.distributionfield.DistributionFieldSaveVO;
|
||||
import cn.com.tenlion.service.examination.distributionfield.IDistributionFieldService;
|
||||
import cn.com.tenlion.service.examinationuser.IExaminationService;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
@ -33,6 +36,8 @@ public class DistributionFieldServiceImpl extends DefaultBaseService implements
|
||||
|
||||
@Autowired
|
||||
private IDistributionFieldDao distributionFieldDao;
|
||||
@Autowired
|
||||
private IExaminationService iExaminationService;
|
||||
|
||||
@Override
|
||||
public void save(DistributionFieldVO distributionFieldVO) {
|
||||
@ -149,7 +154,16 @@ public class DistributionFieldServiceImpl extends DefaultBaseService implements
|
||||
|
||||
@Override
|
||||
public List<DistributionFieldDTO> list(Map<String, Object> params) {
|
||||
return distributionFieldDao.list(params);
|
||||
List<DistributionFieldDTO> list = distributionFieldDao.list(params);
|
||||
for(DistributionFieldDTO fieldDTO : list) {
|
||||
if(!StringUtils.isEmpty(fieldDTO.getInvigilatorId())){
|
||||
ExaminationDTO examinationDTO = iExaminationService.get(fieldDTO.getInvigilatorId());
|
||||
if(examinationDTO != null) {
|
||||
fieldDTO.setInvigilatorName(examinationDTO.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -176,4 +190,32 @@ public class DistributionFieldServiceImpl extends DefaultBaseService implements
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> queryWeekCount(Map<String, Object> queryParams) {
|
||||
List<Map<String, Object>> distributionFieldDTOs = distributionFieldDao.queryWeekCount(queryParams);
|
||||
List<Integer> weekList = new ArrayList<Integer>();
|
||||
for (int i = 1 ; i <= 7 ; i++) {
|
||||
int count = 0;
|
||||
b:for(Map<String, Object> weekMap : distributionFieldDTOs) {
|
||||
if (i == 7) {
|
||||
if(0 == (Integer.valueOf(weekMap.get("weekWeek").toString())) ){
|
||||
count = Integer.valueOf(weekMap.get("weekCount").toString());
|
||||
break b;
|
||||
}
|
||||
}else if(i == (Integer.valueOf(weekMap.get("weekWeek").toString())) ){
|
||||
count = Integer.valueOf(weekMap.get("weekCount").toString());
|
||||
break b;
|
||||
}
|
||||
}
|
||||
weekList.add(count);
|
||||
}
|
||||
return weekList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer queryCount(Map<String, Object> params) {
|
||||
Integer count = distributionFieldDao.queryCount(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
}
|
@ -154,6 +154,18 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateStatus" parameterType="map">
|
||||
UPDATE
|
||||
e_distribution
|
||||
SET
|
||||
<if test="distributionStatus != null and distributionStatus != ''">
|
||||
distribution_status = #{distributionStatus},
|
||||
</if>
|
||||
distribution_id = distribution_id
|
||||
WHERE
|
||||
distribution_id = #{distributionId}
|
||||
</update>
|
||||
|
||||
<!-- 修改考场分配 -->
|
||||
<update id="update" parameterType="map">
|
||||
UPDATE
|
||||
@ -341,7 +353,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.distribution_allot_time DESC
|
||||
t1.distribution_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 考场分配列表 -->
|
||||
@ -446,6 +458,16 @@
|
||||
e_distribution t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="distributionStatus != null and distributionStatus != ''">
|
||||
AND t1.distribution_status = #{distributionStatus}
|
||||
</if>
|
||||
<if test="stationIdList != null and stationIdList.size > 0">
|
||||
AND
|
||||
t1.station_id IN
|
||||
<foreach collection="stationIdList" index="index" open="(" separator="," close=")">
|
||||
#{stationIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -270,6 +270,11 @@
|
||||
1
|
||||
FROM
|
||||
e_distribution_card t1
|
||||
|
||||
LEFT JOIN
|
||||
e_distribution t2
|
||||
ON
|
||||
t1.distribution_id = t2.distribution_id
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="distributionId != null and distributionId != ''">
|
||||
@ -303,7 +308,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY
|
||||
(t1.distribution_card_number + 0)
|
||||
t2.distribution_allot_time DESC , (t1.distribution_card_number + 0)
|
||||
</select>
|
||||
|
||||
<!-- 考场分配准考证列表 -->
|
||||
|
@ -47,6 +47,37 @@
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 考场分配详情统计 -->
|
||||
<select id="queryCount" parameterType="map" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
e_distribution_field t1
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t1.field_id = #{fieldId}
|
||||
</select>
|
||||
|
||||
<!-- 考场分配详情详情 -->
|
||||
<select id="queryWeekCount" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
COUNT(1) AS weekCount,
|
||||
weekTable.weekTime AS weekWeek
|
||||
FROM (
|
||||
SELECT
|
||||
(DAYOFWEEK(DATE_FORMAT(t2.distribution_allot_time ,'%Y-%m-%d' )) - 1) AS weekTime
|
||||
FROM
|
||||
e_distribution_field t1
|
||||
LEFT JOIN
|
||||
e_distribution t2
|
||||
ON
|
||||
t1.distribution_id = t2.distribution_id
|
||||
WHERE
|
||||
t1.field_id = #{fieldId} AND YEARWEEK(DATE_FORMAT(t2.distribution_allot_time ,'%Y-%m-%d' ) , 1) = YEARWEEK( NOW() , 1)
|
||||
) weekTable
|
||||
GROUP BY weekTable.weekTime
|
||||
ORDER BY weekTable.weekTime
|
||||
</select>
|
||||
|
||||
<!-- 新增考场分配详情 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO e_distribution_field(
|
||||
|
@ -238,6 +238,9 @@
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="stationUserUserId != null and stationUserUserId != ''">
|
||||
AND t1.station_user_user_id = #{stationUserUserId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
|
@ -0,0 +1,479 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<base href="/signup/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<style>
|
||||
.A0006{
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
.A0006_data{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
.A0006_time{
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
}
|
||||
.A0006_weather {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.A0006_weather>div>p {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.A0006_weather>div>p.active {
|
||||
font-weight: 700;
|
||||
}
|
||||
.A0002{
|
||||
background: #F6A645;
|
||||
text-align: center;
|
||||
height:80px;
|
||||
width:100%;
|
||||
}
|
||||
.A0002_1{
|
||||
float: left;
|
||||
height:80px;
|
||||
line-height: 80px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.A0002_2{
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.A0002_2 div {
|
||||
line-height:32px;
|
||||
color:rgba(255, 255, 255, 1);
|
||||
}
|
||||
.A0002_1 i{
|
||||
font-weight: 700;
|
||||
font-size: 50px;
|
||||
transform:translate(-50%,-50%);
|
||||
/*display: inline-block;*/
|
||||
/*position: absolute;*/
|
||||
/*top: 80%;*/
|
||||
/*left: 10%;*/
|
||||
/*transform: translate(0, -50%)*/
|
||||
}
|
||||
/*.A0002 h2{*/
|
||||
/* position: absolute;*/
|
||||
/* font-weight: 700;*/
|
||||
/* top: 50%;*/
|
||||
/* left: 50%;*/
|
||||
/*}*/
|
||||
/*.A0002 span{*/
|
||||
/* position: absolute;*/
|
||||
/* top: 24%;*/
|
||||
/* left: 48%;*/
|
||||
/*}*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="LAY-app" class="layui-fluid">
|
||||
|
||||
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-carousel layadmin-carousel layadmin-shortcut" style="width: 100%; height: 90px !important" lay-anim="" > <!--lay-arrow="none" lay-indicator="inside"-->
|
||||
<div carousel-item="">
|
||||
<ul class="layui-row layui-col-space10 layui-this">
|
||||
<li class="layui-col-md3">
|
||||
<div class="A0006" style="width: 100%; height: 100%; border: 2px solid rgb(255, 255, 255); background-color: rgba(31, 147, 255, 0.73);">
|
||||
<div class="A0006_data" style="height:50px; padding-top:26px;padding-bottom:26px;border-right: 2px solid #fff">
|
||||
<p id="A0006_time" class="A0006_time" style="font-size:30px;color:#fff;"></p>
|
||||
<p id="A0006_date" style="font-size:17px;margin-top:4px;color:#fff;"></p>
|
||||
</div>
|
||||
<div class="A0006_weather" style="height:50px; padding-bottom:26px;">
|
||||
<img id="weatherImg" style="margin-top:2px;padding-top:26px;height:40px;width:40px;" src="" alt="">
|
||||
<div style="margin-left:30px;padding-top:6px;">
|
||||
<p class="active" id="weatherText" style="font-size:20px;color:#fff;"></p>
|
||||
<p id="weatherTemperature" style="font-size:16px;color:#fff;"></p>
|
||||
<p id="weatherCity" style="font-size:16px;color:#fff;"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- <li class="layui-col-md3">-->
|
||||
<!-- <a href="javascript:void(0);" :lay-href="lianXi" lay-open-type="1">-->
|
||||
<!-- <i class="layui-icon layui-icon-template" style="color: #FFB800;"></i>-->
|
||||
<!-- <cite>考点信息</cite>-->
|
||||
<!-- </a>-->
|
||||
<!-- </li>-->
|
||||
<li class="layui-col-md3" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/field/listpage.html" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-tabs" style="color: #1E9FFF;"></i>
|
||||
<cite>考场信息</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-md3" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/distribution/list.html?distributionStatus=0" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-star" style="color: #aa1111;"></i>
|
||||
<cite>待分配考场</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-md3" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/distribution/list.html?distributionStatus=1" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-star-fill" style="color: #00B83F;"></i>
|
||||
<cite>已分配考场</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row layui-col-space10 layui-this">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card" id="distributionCount" style="height:240px;width:100%">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="A0002" style="background-color: rgba(249, 8, 8, 0.8)">
|
||||
<div class="A0002_1">
|
||||
<i class="layui-icon layui-icon-edit" style="color:rgba(251, 250, 241, 1);"></i>
|
||||
</div>
|
||||
<div class="A0002_2">
|
||||
<div style="font-size:22px; ">待分配申请</div>
|
||||
<div style="font-size:35px; font-weight: bold; " id="shenQingNumber">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="A0002" style="background-color: rgba(0, 206, 209, 0.8)">
|
||||
<div class="A0002_1">
|
||||
<i class="layui-icon layui-icon-tabs" style="color:rgba(251, 250, 241, 1);"></i>
|
||||
</div>
|
||||
<div class="A0002_2" >
|
||||
<div style="font-size:22px; ">考场数量</div>
|
||||
<div style="font-size:35px; font-weight: bold; " id="kaoChangNumber">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="A0002" style="background-color: rgba(31, 147, 255, 0.8)">
|
||||
<div class="A0002_1">
|
||||
<i class="layui-icon layui-icon-date" style="color:rgba(251, 250, 241, 1);"></i>
|
||||
</div>
|
||||
<div class="A0002_2" >
|
||||
<div style="font-size:22px; ">考试总数</div>
|
||||
<div style="font-size:35px; font-weight: bold;" id="kaoShiNumber">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row layui-col-space10 layui-this">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card" style="height:350px;width:100%">
|
||||
<div class="layui-card-header">
|
||||
<b>最近待分配申请</b>
|
||||
</div>
|
||||
<div class="layui-card-body layuiadmin-card-list">
|
||||
<table style="background-color: green" lay-skin="nob" class="layui-hide" id="distributionTable" lay-filter="distributionTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card" id="distributionFieldCount" style="height:350px;width:100%">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="assets/js/vue.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vendor/safety/jutils.min.js"></script>
|
||||
<script src="assets/js/vendor/safety/echarts.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'animate-numbers', 'table'], function() {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
new Vue({
|
||||
el: '#LAY-app',
|
||||
data: {},
|
||||
methods: {
|
||||
distributionCount: function(data) {
|
||||
var seriesArray = new Array();
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
seriesArray.push({
|
||||
name: data[i].fieldName,
|
||||
data: data[i].weekList,
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: 'default'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var option = {
|
||||
title: {
|
||||
top: 5,
|
||||
text: "本周考场分配情况",
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type: 'scroll', // 分为plain和scroll(带分页)
|
||||
left: 'center',
|
||||
top: '10%',
|
||||
show: true
|
||||
},
|
||||
grid: {
|
||||
top: '15%',
|
||||
left: '4%',
|
||||
right: '4%',
|
||||
bottom: '2%',
|
||||
containLabel: true
|
||||
},
|
||||
calculable: true,
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#87cefa'
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 40
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#87cefa'
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
"show": false
|
||||
}
|
||||
}],
|
||||
series: seriesArray
|
||||
};
|
||||
var elem = echarts.init(document.getElementById('distributionCount'));
|
||||
elem.setOption(option);
|
||||
},
|
||||
distributionTable: function() {
|
||||
var self = this;
|
||||
table.render({
|
||||
elem: '#distributionTable',
|
||||
id: 'distributionTable',
|
||||
url: top.restAjax.path('api/distribution/listpage?distributionStatus=0&rows=6&page=1', []),
|
||||
limit: 6,
|
||||
cols: [
|
||||
[
|
||||
{field:'rowNum', width:'10%', title: '序号', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field:'planName', width:'45%', title: '考试申请', align:'left',
|
||||
templet: function(item) {
|
||||
return item.planName;
|
||||
}
|
||||
},
|
||||
{field:'distributionNumber', width:'10%', title: '考试人数', align:'left',
|
||||
templet: function(item) {
|
||||
return item.distributionNumber + '<b>人</b>';
|
||||
}
|
||||
},
|
||||
{field: 'distributionTime', width: '20%', title: '预定开始时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field:'distributionButton',fixed: 'right', width:'15%', title: '考场分配', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="distributionButton">快速分配考场</a>';
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: false,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// 表格行中按钮事件
|
||||
table.on('tool(distributionTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var data = obj.data;
|
||||
console.log(data);
|
||||
if(layEvent === 'distributionButton') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/examination/distribution/update.html?distributionId={distributionId}', [data.distributionId]),
|
||||
title: "快速分配考场",
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
self.distributionTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
distributionFieldCount:function(data) {
|
||||
var titleArray = new Array();
|
||||
var dataArray = new Array();
|
||||
for(var i = 0 ; i < data.length; i++) {
|
||||
titleArray.push(data[i].fieldName);
|
||||
dataArray.push({
|
||||
value:data[i].count,
|
||||
name:data[i].fieldName
|
||||
})
|
||||
}
|
||||
var option = {
|
||||
title: {
|
||||
top: 5,
|
||||
text: "考场使用频次",
|
||||
x: 'center'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{b} : {c}" + "次"
|
||||
},
|
||||
legend: {
|
||||
orient : 'vertical',
|
||||
type:'scroll',
|
||||
x : 'right',
|
||||
padding:[20,20,0,0],
|
||||
itemWidth:15,
|
||||
itemHeight:15,
|
||||
formatter: '{name}',
|
||||
data: titleArray
|
||||
},
|
||||
calculable : true,
|
||||
series : [
|
||||
{
|
||||
type:'pie',
|
||||
radius : '60%',//饼图的半径大小
|
||||
center: ['50%', '58%'],//饼图的位置
|
||||
label:{ //饼图图形上的文本标签
|
||||
normal:{
|
||||
show:true,
|
||||
position:'inner', //标签的位置
|
||||
textStyle : {
|
||||
//fontWeight : 300 ,
|
||||
//fontSize : 16 //文字的字体大小
|
||||
},
|
||||
formatter:'{d}%'
|
||||
}
|
||||
},
|
||||
data:dataArray
|
||||
}
|
||||
]
|
||||
};
|
||||
var elem = echarts.init(document.getElementById('distributionFieldCount'));
|
||||
elem.setOption(option);
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
var self = this;
|
||||
setInterval(function() {
|
||||
var day = jutils.formatDate(new Date(),"HH:ii:ss");
|
||||
$("#A0006_time").html(day);
|
||||
var zhou = jutils.formatDate(new Date(),"YYYY/ MM/ DD/ 周W");
|
||||
$("#A0006_date").html(zhou);
|
||||
}, 1000);
|
||||
$.ajax({
|
||||
url: "http://117.161.31.148:8098/dataview/app/bigdatatemplate/queryweatherrelease",
|
||||
data: {id:'包头市', time:new Date()},
|
||||
success: function(params) {
|
||||
var city = params.data.city;
|
||||
$("#weatherCity").html(city);
|
||||
var code = params.data.code;
|
||||
var image = 'http://117.161.31.148:8098/dataview/assets/js/vendor/safety/weather/white/' + code + '@1x.png';
|
||||
$("#weatherImg").attr("src", image);
|
||||
var temperature = params.data.temperature + '℃';
|
||||
$("#weatherTemperature").html(temperature);
|
||||
var text = params.data.text;
|
||||
$("#weatherText").html(text);
|
||||
},error: function(params) {
|
||||
console.log("天气预报获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/week-count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
self.distributionCount(params.data);
|
||||
},error: function(params) {
|
||||
console.log("本周考场分配情况获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/count?distributionStatus=0",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
$("#shenQingNumber").html(params.data);
|
||||
},error: function(params) {
|
||||
console.log("待分配申请获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/field-count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
$("#kaoChangNumber").html(params.data);
|
||||
},error: function(params) {
|
||||
console.log("考场数量获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
$("#kaoShiNumber").html(params.data);
|
||||
},error: function(params) {
|
||||
console.log("分配总数获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/use-count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
self.distributionFieldCount(params.data);
|
||||
},error: function(params) {
|
||||
console.log("考场使用频次获取失败");
|
||||
}
|
||||
})
|
||||
this.distributionTable();
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -9,6 +9,11 @@
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<style type="text/css">
|
||||
.layui-select-title .layui-input {
|
||||
width:150px!important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -29,8 +34,9 @@
|
||||
<div class="layui-inline layui-form search-item" >
|
||||
<select id="distributionStatus" name="distributionStatus" lay-search>
|
||||
<option value="">查看全部</option>
|
||||
<option value="0">待分配</option>
|
||||
<option value="1">已分配</option>
|
||||
<option value="0">待分配考场</option>
|
||||
<option value="1">已分配考场</option>
|
||||
<option value="2">已生成准考证</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
@ -39,19 +45,23 @@
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<!-- <script type="text/html" id="headerToolBar">-->
|
||||
<!-- <div class="layui-btn-group">-->
|
||||
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
|
||||
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
|
||||
<!-- </button>-->
|
||||
<!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">-->
|
||||
<!-- <i class="fa fa-lg fa-edit"></i> 编辑-->
|
||||
<!-- </button>-->
|
||||
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
|
||||
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
|
||||
<!-- </button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </script>-->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="distributionButton">
|
||||
<i class="fa fa-lg fa-save"></i> 分配考场与时间
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 查看分配记录详情
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="distributionCardButton">
|
||||
<i class="fa fa-lg fa-eyedropper"></i> 查看准考证信息
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -73,6 +83,12 @@
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/distribution/listpage';
|
||||
var distributionStatus = top.restAjax.params(window.location.href).distributionStatus;
|
||||
if(distributionStatus) {
|
||||
var select = 'dd[lay-value=' + distributionStatus+ ']';
|
||||
$('#distributionStatus').siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
tableUrl = tableUrl + "?distributionStatus=" + distributionStatus;
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
@ -93,7 +109,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'planName', width: 180, title: '计划名称', align:'center',
|
||||
{field: 'planName', width: 250, title: '考试申请', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -108,10 +124,10 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData + '人';
|
||||
return rowData + '<b>人</b>';
|
||||
}
|
||||
},
|
||||
{field: 'distributionTime', width: 180, title: '预定考试时间', align:'center',
|
||||
{field: 'distributionTime', width: 180, title: '预定开始时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -120,7 +136,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'distributionAllotTime', width: 180, title: '最终分配时间', align:'center',
|
||||
{field: 'distributionAllotTime', width: 180, title: '最终开始时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -129,7 +145,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'distributionFields', width: 350, title: '分配考场', align:'center',
|
||||
{field: 'distributionFields', width: 450, title: '最终分配考场', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -139,27 +155,23 @@
|
||||
var showData = "";
|
||||
if(rowDataArray && rowDataArray.length > 0) {
|
||||
for(var i = 0 ; i < rowDataArray.length; i++) {
|
||||
showData = (showData ? showData + " . " : "") + rowDataArray[i].fieldName + "(" + rowDataArray[i].fieldNumber + "人)";
|
||||
showData = (showData ? showData + " . " : "") + rowDataArray[i].fieldName + "(" + rowDataArray[i].fieldNumber + "<b>人</b>)";
|
||||
}
|
||||
}
|
||||
return showData;
|
||||
}
|
||||
},
|
||||
{field:'distributionButton',fixed: 'right', width:150, title: '考场分配', align:'center',
|
||||
{field:'distributionButton',fixed: 'right', width:150, title: '当前状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(row.distributionStatus == '1') {
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-danger layui-btn-radius">已分配</a>';
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-normal ">已分配考场</a>';
|
||||
}else if(row.distributionStatus == '0') {
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs " > <!--lay-event="distributionButton"--> 待分配考场</a>';
|
||||
}else {
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="distributionButton">考场分配</a>';
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-danger ">已生成准考证</a>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{field:'distributionCardButton',fixed: 'right', width:150, title: '准考证信息', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="distributionCardButton">准考证信息</a>';
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
@ -228,32 +240,32 @@
|
||||
initDate();
|
||||
|
||||
// 表格行中按钮事件
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var data = obj.data;
|
||||
if(layEvent === 'distributionButton') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/examination/distribution/update.html?distributionId={distributionId}', [data.distributionId]),
|
||||
title: "分配考场 与 确认考试时间",
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
if(layEvent === 'distributionCardButton') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/examination/distributioncard/list.html?distributionId={distributionId}', [data.distributionId]),
|
||||
title: "准考证信息",
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// table.on('tool(dataTable)', function(obj) {
|
||||
// var layEvent = obj.event;
|
||||
// var data = obj.data;
|
||||
// if(layEvent === 'distributionButton') {
|
||||
// top.dialog.open({
|
||||
// url: top.restAjax.path('route/examination/distribution/update.html?distributionId={distributionId}', [data.distributionId]),
|
||||
// title: "分配考场 与 确认考试时间",
|
||||
// width: '80%',
|
||||
// height: '80%',
|
||||
// onClose: function() {
|
||||
// reloadTable();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if(layEvent === 'distributionCardButton') {
|
||||
// top.dialog.open({
|
||||
// url: top.restAjax.path('route/examination/distributioncard/list.html?distributionId={distributionId}', [data.distributionId]),
|
||||
// title: "准考证信息",
|
||||
// width: '80%',
|
||||
// height: '80%',
|
||||
// onClose: function() {
|
||||
// reloadTable();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
@ -284,11 +296,15 @@
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
} else if(layEvent === 'showEvent') {
|
||||
// if(checkDatas[0].distributionStatus == 0) {
|
||||
// top.dialog.msg('该数据尚未进行考场分配');
|
||||
// return;
|
||||
// }
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
top.dialog.msg('请选择要查看的记录');
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
top.dialog.msg('同时只能查看一条记录');
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
@ -297,7 +313,7 @@
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/distribution/update?distributionId={distributionId}', [checkDatas[0].distributionId]),
|
||||
content: top.restAjax.path('route/examination/distribution/show.html?distributionId={distributionId}', [checkDatas[0].distributionId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
@ -316,6 +332,52 @@
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
} else if(layEvent === 'distributionButton') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg('请选择要分配的记录');
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg('同时只能分配一条记录');
|
||||
} else {
|
||||
if(checkDatas[0].distributionStatus != 0) {
|
||||
top.layer.msg("该记录已分配了考场");
|
||||
return;
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/examination/distribution/update.html?distributionId={distributionId}', [checkDatas[0].distributionId]),
|
||||
end: function () {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'distributionCardButton') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg('请选择要查看的记录');
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg('同时只能查看一条记录');
|
||||
} else {
|
||||
if(checkDatas[0].distributionStatus != 2) {
|
||||
top.layer.msg("该记录尚未生成准考证");
|
||||
return;
|
||||
}
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: "准考证信息",
|
||||
closeBtn: 1,
|
||||
area: ['90%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/examination/distributioncard/list.html?distributionId={distributionId}', [checkDatas[0].distributionId]),
|
||||
end: function () {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -0,0 +1,273 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/signup/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>查看考场分配记录详情</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<input type="hidden" readonly id="stationId" name="stationId" class="layui-input" value="" maxlength="36">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">计划名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="planName" name="planName" class="layui-input" value="" maxlength="36">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">考试人数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="distributionNumber" name="distributionNumber" class="layui-input" value="" placeholder="请输入考试人数" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">考试类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="examTypeName" name="examTypeName" class="layui-input" value="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">预计开始</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="distributionTime" name="distributionTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入预计开始" maxlength="25">
|
||||
</div>
|
||||
</div> <div class="layui-form-item">
|
||||
<label class="layui-form-label">预计结束</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="distributionEndTime" name="distributionEndTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入预计结束" maxlength="25">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">最终开始<span style="color:red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="distributionAllotTime" name="distributionAllotTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入最终分配开始时间" maxlength="25" lay-verify="required">
|
||||
</div>
|
||||
</div> <div class="layui-form-item">
|
||||
<label class="layui-form-label">最终结束<span style="color:red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="distributionAllotEndTime" name="distributionAllotEndTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入最终分配结束时间" maxlength="25" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">分配考场<span style="color:red">*</span></label>
|
||||
<div class="layui-input-block layui-form" id="distributionFieldsBox" lay-filter="distributionFieldsBox" pane=""></div>
|
||||
<script id="distributionFieldsBoxTemplate" type="text/html">
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<input type="checkbox" name="distributionFields[{{item.organizationId}}]" {{item.checked}} value="{{item.organizationId}}" title="{{item.organizationName}}【 {{item.organizationDesc == 1 ? '理论考场' : item.organizationDesc == 2 ? '实操考场' : '混合考场'}}】(可容纳{{item.organizationUserNum}}人.{{item.invigilatorName}})" lay-verify="required">
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">备注信息</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="distributionRemark" name="distributionRemark" class="layui-textarea" placeholder="请输入备注信息"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var distributionId = top.restAjax.params(window.location.href).distributionId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 初始化考场
|
||||
function initDistributionFields(dataForm) {
|
||||
top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [dataForm.stationId]), {}, null, function(code, data, args) {
|
||||
for(var i = 0 ; i < data.length; i++) {
|
||||
for(var j = 0 ; j < dataForm.distributionFieldList.length; j++) {
|
||||
data[i].invigilatorName = "";
|
||||
if(data[i].organizationId == dataForm.distributionFieldList[j].fieldId) {
|
||||
data[i].checked = 'checked="checked"';
|
||||
data[i].invigilatorName = dataForm.distributionFieldList[j].invigilatorName;
|
||||
}
|
||||
}
|
||||
}
|
||||
laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('distributionFieldsBox').innerHTML = html;
|
||||
});
|
||||
form.render('checkbox', 'distributionFieldsBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化成立日期时间戳
|
||||
function initDistributionAllotTime() {
|
||||
// laydate.render({
|
||||
// elem: '#distributionAllotTime',
|
||||
// type: 'datetime',
|
||||
// trigger: 'click'
|
||||
// });
|
||||
}
|
||||
// 初始化成立日期时间戳
|
||||
function initDistributionAllotEndTime() {
|
||||
// laydate.render({
|
||||
// elem: '#distributionAllotEndTime',
|
||||
// type: 'datetime',
|
||||
// trigger: 'click'
|
||||
// });
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/distribution/get/{distributionId}', [distributionId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
|
||||
if(data.examType == 1) {
|
||||
dataFormData["examTypeName"] = "理论考试";
|
||||
}else if(data.examType == 2) {
|
||||
dataFormData["examTypeName"] = "实操考试";
|
||||
}else{
|
||||
dataFormData["examTypeName"] = "理论 + 实操考试";
|
||||
}
|
||||
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initDistributionAllotTime();
|
||||
initDistributionFields(data);
|
||||
initDistributionAllotEndTime();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.layer.msg("分配后不可修改,是否确定提交", {
|
||||
time: 0,
|
||||
btnAlign: 'c',
|
||||
btn: ['确定', '取消'],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field['distributionFields'] = top.restAjax.checkBoxToString(formData.field, 'distributionFields');
|
||||
formData.field.distributionStatus = "1";
|
||||
top.restAjax.put(top.restAjax.path('api/distribution/update/{distributionId}', [distributionId]), formData.field, null, function(code, data) {
|
||||
closeBox();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
},
|
||||
btn1: function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -35,26 +35,32 @@
|
||||
<input type="text" readonly id="distributionNumber" name="distributionNumber" class="layui-input" value="" placeholder="请输入考试人数" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">考试类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="examTypeName" name="examTypeName" class="layui-input" value="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">预计开始</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="distributionTime" name="distributionTime" class="layui-input" value="" placeholder="请输入预计开始" maxlength="25">
|
||||
<input type="text" readonly id="distributionTime" name="distributionTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入预计开始" maxlength="25">
|
||||
</div>
|
||||
</div> <div class="layui-form-item">
|
||||
<label class="layui-form-label">预计结束</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="distributionEndTime" name="distributionEndTime" class="layui-input" value="" placeholder="请输入预计结束" maxlength="25">
|
||||
<input type="text" readonly id="distributionEndTime" name="distributionEndTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入预计结束" maxlength="25">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">最终开始<span style="color:red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="distributionAllotTime" name="distributionAllotTime" class="layui-input" value="" placeholder="请输入最终分配开始时间" maxlength="25" lay-verify="required">
|
||||
<input type="text" id="distributionAllotTime" name="distributionAllotTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入最终分配开始时间" maxlength="25" lay-verify="required">
|
||||
</div>
|
||||
</div> <div class="layui-form-item">
|
||||
<label class="layui-form-label">最终结束<span style="color:red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="distributionAllotEndTime" name="distributionAllotEndTime" class="layui-input" value="" placeholder="请输入最终分配结束时间" maxlength="25" lay-verify="required">
|
||||
<input type="text" id="distributionAllotEndTime" name="distributionAllotEndTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入最终分配结束时间" maxlength="25" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane="">
|
||||
@ -62,7 +68,7 @@
|
||||
<div class="layui-input-block layui-form" id="distributionFieldsBox" lay-filter="distributionFieldsBox" pane=""></div>
|
||||
<script id="distributionFieldsBoxTemplate" type="text/html">
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<input type="checkbox" name="distributionFields[{{item.organizationId}}]" value="{{item.organizationId}}" title="{{item.organizationName}}(可容纳{{item.organizationUserNum}}人)" lay-verify="required">
|
||||
<input type="checkbox" name="distributionFields[{{item.organizationId}}]" value="{{item.organizationId}}" title="{{item.organizationName}}【 {{item.organizationDesc == 1 ? '理论考场' : item.organizationDesc == 2 ? '实操考场' : '混合考场'}}】(可容纳{{item.organizationUserNum}}人)" lay-verify="required">
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
@ -125,6 +131,7 @@
|
||||
laydate.render({
|
||||
elem: '#distributionAllotTime',
|
||||
type: 'datetime',
|
||||
min:1,
|
||||
trigger: 'click'
|
||||
});
|
||||
}
|
||||
@ -133,6 +140,7 @@
|
||||
laydate.render({
|
||||
elem: '#distributionAllotEndTime',
|
||||
type: 'datetime',
|
||||
min:1,
|
||||
trigger: 'click'
|
||||
});
|
||||
}
|
||||
@ -195,6 +203,15 @@
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
|
||||
if(data.examType == 1) {
|
||||
dataFormData["examTypeName"] = "理论考试";
|
||||
}else if(data.examType == 2) {
|
||||
dataFormData["examTypeName"] = "实操考试";
|
||||
}else{
|
||||
dataFormData["examTypeName"] = "理论 + 实操考试";
|
||||
}
|
||||
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initDistributionAllotTime();
|
||||
|
@ -38,9 +38,13 @@
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
@ -88,7 +92,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'organizationImage', width: 180, title: '考场图片', align:'center',
|
||||
{field: 'organizationImage', width: 100, title: '考场图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -97,7 +101,7 @@
|
||||
var value='<ul >';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
value += '<li><img style="height: 80px;width: 80px;" src="route/file/download/false/'+ item +'" alt="'+ row["organizationName"] + '"></li>';
|
||||
value += '<li><img style="height: 50px;width: 50px;" src="route/file/download/false/'+ item +'" alt="'+ row["organizationName"] + '"></li>';
|
||||
}
|
||||
value += '</ul>';
|
||||
setTimeout(function() {
|
||||
@ -135,13 +139,19 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'organizationDesc', width: 180, title: '考场描述', align:'center',
|
||||
{field: 'organizationDesc', width: 180, title: '考场类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
if(rowData == 1 ) {
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs " >理论考场</a>';
|
||||
}else if(rowData == 2 ){
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-danger" >实操考场</a>';
|
||||
}else{
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-normal" >混合考场</a>';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -34,17 +34,23 @@
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
@ -97,7 +103,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'organizationImage', width: 180, title: '考场图片', align:'center',
|
||||
{field: 'organizationImage', width: 100, title: '考场图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -106,7 +112,7 @@
|
||||
var value='<ul >';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
value += '<li><img style="height: 80px;width: 80px;" src="route/file/download/false/'+ item +'" alt="' + row["organizationName"] + '"></li>';
|
||||
value += '<li><img style="height: 50px;width: 50px;" src="route/file/download/false/'+ item +'" alt="' + row["organizationName"] + '"></li>';
|
||||
}
|
||||
value += '</ul>';
|
||||
setTimeout(function() {
|
||||
@ -144,13 +150,19 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'organizationDesc', width: 180, title: '考场描述', align:'center',
|
||||
{field: 'organizationDesc', width: 180, title: '考场类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
if(rowData == 1 ) {
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs " >理论考场</a>';
|
||||
}else if(rowData == 2 ){
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-danger" >实操考场</a>';
|
||||
}else{
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-normal" >混合考场</a>';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -216,8 +228,27 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
initDate();
|
||||
var stationArray = new Array();
|
||||
function initUser() {
|
||||
top.restAjax.get(top.restAjax.path('api/stationuser/list-user', []), {}, null, function(code, data) {
|
||||
if(data.length > 0) {
|
||||
stationArray = data;
|
||||
initTable();
|
||||
}else{
|
||||
top.layer.msg("您不在考场机构的人员信息中");
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initUser();
|
||||
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
@ -255,11 +286,7 @@
|
||||
}
|
||||
});
|
||||
}else{
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg("选择要新增的考试机构");
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg("只能同时新增一个考场");
|
||||
} else {
|
||||
if(stationArray.length > 0 && checkDatas.length === 0) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
@ -267,12 +294,32 @@
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/examination/field/save.html?institutionId={institutionId}', [checkDatas[0].organizationType]),
|
||||
content: top.restAjax.path('route/examination/field/save.html?institutionId={institutionId}', [stationArray[0]]),
|
||||
end: function () {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
// }else{
|
||||
// if(checkDatas.length === 0) {
|
||||
// top.dialog.msg("选择要新增到哪个考试机构");
|
||||
// } else if(checkDatas.length > 1) {
|
||||
// top.dialog.msg("只能同时新增一个考场");
|
||||
// } else {
|
||||
// layer.open({
|
||||
// type: 2,
|
||||
// title: false,
|
||||
// closeBtn: 0,
|
||||
// area: ['100%', '100%'],
|
||||
// shadeClose: true,
|
||||
// anim: 2,
|
||||
// content: top.restAjax.path('route/examination/field/save.html?institutionId={institutionId}', [checkDatas[0].organizationType]),
|
||||
// end: function() {
|
||||
// reloadTable();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
}
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
|
@ -84,10 +84,12 @@
|
||||
<input type="text" id="organizationPrincipal" name="organizationPrincipal" class="layui-input" value="" placeholder="请输入考场负责人" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">考场描述</label>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">考场类型<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<textarea id="organizationDesc" name="organizationDesc" class="layui-textarea" placeholder="请输入考场描述"></textarea>
|
||||
<input type="radio" lay-verify="required" name="organizationDesc" value="1" lay-filter="picturesTemplateBackFilter" title="理论考场">
|
||||
<input type="radio" lay-verify="required" name="organizationDesc" value="2" lay-filter="picturesTemplateBackFilter" title="实操考场">
|
||||
<input type="radio" lay-verify="required" name="organizationDesc" value="3" lay-filter="picturesTemplateBackFilter" title="混合考场">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
|
@ -84,10 +84,18 @@
|
||||
<input type="text" id="organizationPrincipal" name="organizationPrincipal" class="layui-input" value="" placeholder="请输入考场负责人" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">考场描述</label>
|
||||
<!-- <div class="layui-form-item layui-form-text">-->
|
||||
<!-- <label class="layui-form-label">考场描述</label>-->
|
||||
<!-- <div class="layui-input-block">-->
|
||||
<!-- <textarea id="organizationDesc" name="organizationDesc" class="layui-textarea" placeholder="请输入考场描述"></textarea>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">考场类型<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<textarea id="organizationDesc" name="organizationDesc" class="layui-textarea" placeholder="请输入考场描述"></textarea>
|
||||
<input type="radio" lay-verify="required" name="organizationDesc" value="1" lay-filter="picturesTemplateBackFilter" title="理论考场">
|
||||
<input type="radio" lay-verify="required" name="organizationDesc" value="2" lay-filter="picturesTemplateBackFilter" title="实操考场">
|
||||
<input type="radio" lay-verify="required" name="organizationDesc" value="3" lay-filter="picturesTemplateBackFilter" title="混合考场">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
|
@ -35,16 +35,30 @@
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="institutionButton">
|
||||
<i class="fa fa-lg fa-home"></i> 考场管理
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="institutionUserButton">
|
||||
<i class="fa fa-lg fa-user"></i> 考试机构人员管理
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
@ -87,7 +101,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'institutionImage', width: 180, title: '机构图片', align:'center',
|
||||
{field: 'institutionImage', width: 100, title: '机构图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -96,7 +110,7 @@
|
||||
var value='<ul >';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
value += '<li><img style="height: 80px;width: 80px;" src="route/file/download/false/'+ item +'" alt="' + row["institutionName"] + '"></li>';
|
||||
value += '<li><img style="height: 50px;width: 50px;" src="route/file/download/false/'+ item +'" alt="' + row["institutionName"] + '"></li>';
|
||||
}
|
||||
value += '</ul>';
|
||||
setTimeout(function() {
|
||||
@ -107,7 +121,7 @@
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{field: 'institutionName', width: 180, title: '机构名称', align:'center',
|
||||
{field: 'institutionName', width: 230, title: '机构名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -116,7 +130,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionFoundingTime', width: 180, title: '机构成立时间', align:'center',
|
||||
{field: 'institutionFoundingTime', width: 150, title: '机构成立时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -125,7 +139,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionPrincipal', width: 180, title: '机构负责人', align:'center',
|
||||
{field: 'institutionPrincipal', width: 150, title: '机构负责人', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -142,19 +156,19 @@
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field:'institutionButton',fixed: 'right', width:150, title: '考场管理', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="institutionButton">考场管理</a>';
|
||||
}
|
||||
},
|
||||
{field:'institutionUserButton',fixed: 'right', width:150, title: '机构人员管理', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="institutionUserButton">机构人员管理</a>';
|
||||
}
|
||||
}
|
||||
}// },
|
||||
// {field:'institutionButton',fixed: 'right', width:150, title: '考场管理', align:'center',
|
||||
// templet: function(row) {
|
||||
// var rowData = row[this.field];
|
||||
// return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="institutionButton">考场管理</a>';
|
||||
// }
|
||||
// },
|
||||
// {field:'institutionUserButton',fixed: 'right', width:150, title: '机构管理人员', align:'center',
|
||||
// templet: function(row) {
|
||||
// var rowData = row[this.field];
|
||||
// return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="institutionUserButton">机构管理人员</a>';
|
||||
// }
|
||||
// }
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -201,7 +215,7 @@
|
||||
if(layEvent === 'institutionUserButton') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/examination/stationuser/list.html?stationId={stationId}', [data.institutionId]),
|
||||
title: data.institutionName + "[人员信息]",
|
||||
title: data.institutionName + "[管理人员]",
|
||||
width: '500px',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
@ -307,6 +321,44 @@
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}else if(layEvent === 'institutionButton') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: checkDatas[0].institutionName + " . 考场管理",
|
||||
closeBtn: 1,
|
||||
area: ['90%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/examination/field/list.html?institutionId={institutionId}', [checkDatas[0].institutionId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if(layEvent === 'institutionUserButton') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: checkDatas[0].institutionName + " . 人员管理",
|
||||
closeBtn: 1,
|
||||
area: ['500px', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/examination/stationuser/list.html?stationId={stationId}', [checkDatas[0].institutionId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -88,7 +88,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'stationUserUserName', width: 308, title: '考点人员姓名', align:'center',
|
||||
{field: 'stationUserUserName', width: 308, title: '管理人员姓名', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
|
486
src/main/resources/templates/index3.html
Normal file
486
src/main/resources/templates/index3.html
Normal file
@ -0,0 +1,486 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<style>
|
||||
.A0006{
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
.A0006_data{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
.A0006_time{
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
}
|
||||
.A0006_weather {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.A0006_weather>div>p {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.A0006_weather>div>p.active {
|
||||
font-weight: 700;
|
||||
}
|
||||
.A0002{
|
||||
background: #F6A645;
|
||||
text-align: center;
|
||||
height:120px;
|
||||
width:100%;
|
||||
}
|
||||
.A0002_1{
|
||||
float: left;
|
||||
height:120px;
|
||||
line-height: 120px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.A0002_2{
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
padding-top: 35px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.A0002_2 div {
|
||||
line-height:32px;
|
||||
margin-left: 30px;
|
||||
color:rgba(255, 255, 255, 1);
|
||||
}
|
||||
.A0002_1 i{
|
||||
font-weight: 700;
|
||||
font-size: 80px;
|
||||
transform:translate(-50%,-50%);
|
||||
/*display: inline-block;*/
|
||||
/*position: absolute;*/
|
||||
/*top: 80%;*/
|
||||
/*left: 10%;*/
|
||||
/*transform: translate(0, -50%)*/
|
||||
}
|
||||
/*.A0002 h2{*/
|
||||
/* position: absolute;*/
|
||||
/* font-weight: 700;*/
|
||||
/* top: 50%;*/
|
||||
/* left: 50%;*/
|
||||
/*}*/
|
||||
/*.A0002 span{*/
|
||||
/* position: absolute;*/
|
||||
/* top: 24%;*/
|
||||
/* left: 48%;*/
|
||||
/*}*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="LAY-app" class="layui-fluid">
|
||||
|
||||
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-carousel layadmin-carousel layadmin-shortcut" style="width: 100%; height: 90px !important" lay-anim="" > <!--lay-arrow="none" lay-indicator="inside"-->
|
||||
<div carousel-item="">
|
||||
<ul class="layui-row layui-col-space10 layui-this">
|
||||
<li class="layui-col-md4">
|
||||
<div class="A0006" style="width: 100%; height: 100%; border: 2px solid rgb(255, 255, 255); background-color: rgba(31, 147, 255, 0.73);">
|
||||
<div class="A0006_data" style="height:50px; padding-top:26px;padding-bottom:26px;border-right: 2px solid #fff">
|
||||
<p id="A0006_time" class="A0006_time" style="font-size:30px;color:#fff;"></p>
|
||||
<p id="A0006_date" style="font-size:17px;margin-top:4px;color:#fff;"></p>
|
||||
</div>
|
||||
<div class="A0006_weather" style="height:50px; padding-bottom:26px;">
|
||||
<img id="weatherImg" style="margin-top:2px;padding-top:26px;height:40px;width:40px;" src="" alt="">
|
||||
<div style="margin-left:30px;padding-top:6px;">
|
||||
<p class="active" id="weatherText" style="font-size:20px;color:#fff;"></p>
|
||||
<p id="weatherTemperature" style="font-size:16px;color:#fff;"></p>
|
||||
<p id="weatherCity" style="font-size:16px;color:#fff;"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- <li class="layui-col-md3">-->
|
||||
<!-- <a href="javascript:void(0);" :lay-href="lianXi" lay-open-type="1">-->
|
||||
<!-- <i class="layui-icon layui-icon-template" style="color: #FFB800;"></i>-->
|
||||
<!-- <cite>考点信息</cite>-->
|
||||
<!-- </a>-->
|
||||
<!-- </li>-->
|
||||
<li class="layui-col-md2" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/field/listpage.html" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-tabs" style="color: #1E9FFF;"></i>
|
||||
<cite>考场信息</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-md2" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/distribution/list.html?distributionStatus=0" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-star" style="color: #f4b30b;"></i>
|
||||
<cite>待分配考场</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-md2" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/distribution/list.html?distributionStatus=1" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-star-fill" style="color: #00B83F;"></i>
|
||||
<cite>已分配考场</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-md2" style="font-weight: 700;">
|
||||
<a href="javascript:void(0);" lay-href="/route/examination/distribution/list.html?distributionStatus=2" lay-open-type="1">
|
||||
<i class="layui-icon layui-icon-user" style="color: #dc2525;"></i>
|
||||
<cite>已生成准考证</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row layui-col-space10 layui-this">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card" id="distributionCount" style="height:360px;width:100%">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="A0002" style="background-color: rgba(249, 8, 8, 0.8)">
|
||||
<div class="A0002_1">
|
||||
<i class="layui-icon layui-icon-edit" style="color:rgba(251, 250, 241, 1);"></i>
|
||||
</div>
|
||||
<div class="A0002_2">
|
||||
<div style="font-size:22px; ">待分配申请</div>
|
||||
<div style="font-size:35px; font-weight: bold; " id="shenQingNumber">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="A0002" style="background-color: rgba(0, 206, 209, 0.8)">
|
||||
<div class="A0002_1">
|
||||
<i class="layui-icon layui-icon-tabs" style="color:rgba(251, 250, 241, 1);"></i>
|
||||
</div>
|
||||
<div class="A0002_2" >
|
||||
<div style="font-size:22px; ">考场数量</div>
|
||||
<div style="font-size:35px; font-weight: bold; " id="kaoChangNumber">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="A0002" style="background-color: rgba(31, 147, 255, 0.8)">
|
||||
<div class="A0002_1">
|
||||
<i class="layui-icon layui-icon-date" style="color:rgba(251, 250, 241, 1);"></i>
|
||||
</div>
|
||||
<div class="A0002_2" >
|
||||
<div style="font-size:22px; ">考试分配总数</div>
|
||||
<div style="font-size:35px; font-weight: bold;" id="kaoShiNumber">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row layui-col-space10 layui-this">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card" style="height:350px;width:100%">
|
||||
<div class="layui-card-header">
|
||||
<b>最近待分配申请</b>
|
||||
</div>
|
||||
<div class="layui-card-body layuiadmin-card-list">
|
||||
<table style="background-color: green" lay-skin="nob" class="layui-hide" id="distributionTable" lay-filter="distributionTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card" id="distributionFieldCount" style="height:350px;width:100%">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="assets/js/vue.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vendor/safety/jutils.min.js"></script>
|
||||
<script src="assets/js/vendor/safety/echarts.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'animate-numbers', 'table'], function() {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
new Vue({
|
||||
el: '#LAY-app',
|
||||
data: {},
|
||||
methods: {
|
||||
distributionCount: function(data) {
|
||||
var seriesArray = new Array();
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
seriesArray.push({
|
||||
name: data[i].fieldName,
|
||||
data: data[i].weekList,
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: 'default'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var option = {
|
||||
title: {
|
||||
top: 5,
|
||||
text: "本周考场分配情况",
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type: 'scroll', // 分为plain和scroll(带分页)
|
||||
left: 'center',
|
||||
top: '10%',
|
||||
show: true
|
||||
},
|
||||
grid: {
|
||||
top: '15%',
|
||||
left: '4%',
|
||||
right: '4%',
|
||||
bottom: '2%',
|
||||
containLabel: true
|
||||
},
|
||||
calculable: true,
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#87cefa'
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 40
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#87cefa'
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
"show": false
|
||||
}
|
||||
}],
|
||||
series: seriesArray
|
||||
};
|
||||
var elem = echarts.init(document.getElementById('distributionCount'));
|
||||
elem.setOption(option);
|
||||
},
|
||||
distributionTable: function() {
|
||||
var self = this;
|
||||
table.render({
|
||||
elem: '#distributionTable',
|
||||
id: 'distributionTable',
|
||||
url: top.restAjax.path('api/distribution/listpage?distributionStatus=0&rows=6&page=1', []),
|
||||
limit: 6,
|
||||
cols: [
|
||||
[
|
||||
{field:'rowNum', width:'10%', title: '序号', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field:'planName', width:'45%', title: '考试申请', align:'left',
|
||||
templet: function(item) {
|
||||
return item.planName;
|
||||
}
|
||||
},
|
||||
{field:'distributionNumber', width:'10%', title: '考试人数', align:'left',
|
||||
templet: function(item) {
|
||||
return item.distributionNumber + '<b>人</b>';
|
||||
}
|
||||
},
|
||||
{field: 'distributionTime', width: '20%', title: '预定开始时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field:'distributionButton',fixed: 'right', width:'15%', title: '考场分配', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '<a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-radius" lay-event="distributionButton">快速分配考场</a>';
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: false,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// 表格行中按钮事件
|
||||
table.on('tool(distributionTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var data = obj.data;
|
||||
console.log(data);
|
||||
if(layEvent === 'distributionButton') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/examination/distribution/update.html?distributionId={distributionId}', [data.distributionId]),
|
||||
title: "快速分配考场",
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
self.distributionTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
distributionFieldCount:function(data) {
|
||||
var titleArray = new Array();
|
||||
var dataArray = new Array();
|
||||
for(var i = 0 ; i < data.length; i++) {
|
||||
titleArray.push(data[i].fieldName);
|
||||
dataArray.push({
|
||||
value:data[i].count,
|
||||
name:data[i].fieldName
|
||||
})
|
||||
}
|
||||
var option = {
|
||||
title: {
|
||||
top: 5,
|
||||
text: "考场使用频次",
|
||||
x: 'center'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{b} : {c}" + "次"
|
||||
},
|
||||
legend: {
|
||||
orient : 'vertical',
|
||||
type:'scroll',
|
||||
x : 'right',
|
||||
padding:[20,20,0,0],
|
||||
itemWidth:15,
|
||||
itemHeight:15,
|
||||
formatter: '{name}',
|
||||
data: titleArray
|
||||
},
|
||||
calculable : true,
|
||||
series : [
|
||||
{
|
||||
type:'pie',
|
||||
radius : '60%',//饼图的半径大小
|
||||
center: ['50%', '58%'],//饼图的位置
|
||||
label:{ //饼图图形上的文本标签
|
||||
normal:{
|
||||
show:true,
|
||||
position:'inner', //标签的位置
|
||||
textStyle : {
|
||||
//fontWeight : 300 ,
|
||||
//fontSize : 16 //文字的字体大小
|
||||
},
|
||||
formatter:'{d}%'
|
||||
}
|
||||
},
|
||||
data:dataArray
|
||||
}
|
||||
]
|
||||
};
|
||||
var elem = echarts.init(document.getElementById('distributionFieldCount'));
|
||||
elem.setOption(option);
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
var self = this;
|
||||
setInterval(function() {
|
||||
var day = jutils.formatDate(new Date(),"HH:ii:ss");
|
||||
$("#A0006_time").html(day);
|
||||
var zhou = jutils.formatDate(new Date(),"YYYY/ MM/ DD/ 周W");
|
||||
$("#A0006_date").html(zhou);
|
||||
}, 1000);
|
||||
$.ajax({
|
||||
url: "http://117.161.31.148:8098/dataview/app/bigdatatemplate/queryweatherrelease",
|
||||
data: {id:'包头市', time:new Date()},
|
||||
success: function(params) {
|
||||
var city = params.data.city;
|
||||
$("#weatherCity").html(city);
|
||||
var code = params.data.code;
|
||||
var image = 'http://117.161.31.148:8098/dataview/assets/js/vendor/safety/weather/white/' + code + '@1x.png';
|
||||
$("#weatherImg").attr("src", image);
|
||||
var temperature = params.data.temperature + '℃';
|
||||
$("#weatherTemperature").html(temperature);
|
||||
var text = params.data.text;
|
||||
$("#weatherText").html(text);
|
||||
},error: function(params) {
|
||||
console.log("天气预报获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/week-count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
self.distributionCount(params.data);
|
||||
},error: function(params) {
|
||||
console.log("本周考场分配情况获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/count?distributionStatus=0",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
$("#shenQingNumber").html(params.data);
|
||||
},error: function(params) {
|
||||
console.log("待分配申请获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/field-count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
$("#kaoChangNumber").html(params.data);
|
||||
},error: function(params) {
|
||||
console.log("考场数量获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
$("#kaoShiNumber").html(params.data);
|
||||
},error: function(params) {
|
||||
console.log("分配总数获取失败");
|
||||
}
|
||||
})
|
||||
$.ajax({
|
||||
url: "api/distribution/use-count",
|
||||
data: {time:new Date()},
|
||||
success: function(params) {
|
||||
self.distributionFieldCount(params.data);
|
||||
},error: function(params) {
|
||||
console.log("考场使用频次获取失败");
|
||||
}
|
||||
})
|
||||
this.distributionTable();
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user