web页面权限分配
This commit is contained in:
parent
373eb6b857
commit
a9bf47642a
@ -1,7 +1,13 @@
|
||||
package com.tenlion.twoduty.controller.api.indexaudit;
|
||||
|
||||
import com.tenlion.twoduty.pojo.dtos.indexlib.IndexLibDTO;
|
||||
import com.tenlion.twoduty.pojo.dtos.indextemplate.IndexTemplateDTO;
|
||||
import com.tenlion.twoduty.pojo.vos.indexaudit.AuditVO;
|
||||
import com.tenlion.twoduty.service.indexlib.IIndexLibService;
|
||||
import com.tenlion.twoduty.service.indextemplate.IIndexTemplateService;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
@ -12,6 +18,7 @@ import com.tenlion.twoduty.pojo.dtos.indexaudit.IndexAuditDTO;
|
||||
import com.tenlion.twoduty.pojo.vos.indexaudit.IndexAuditVO;
|
||||
import com.tenlion.twoduty.service.indexaudit.IIndexAuditService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -33,6 +40,68 @@ public class IndexAuditController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IIndexAuditService indexAuditService;
|
||||
@Autowired
|
||||
private IIndexLibService iIndexLibService;
|
||||
@Autowired
|
||||
private IIndexTemplateService iIndexTemplateService;
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "审核指标配置详情", notes = "审核指标配置详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "indexAuditId", value = "指标审核表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("getAuditIndexConfig/{indexAuditId}")
|
||||
public IndexTemplateDTO getAuditIndexConfig(@PathVariable("indexAuditId") String indexAuditId){
|
||||
IndexAuditDTO indexAuditDTO = indexAuditService.get(indexAuditId);
|
||||
if(indexAuditDTO == null){
|
||||
throw new SearchException("系统错误-1");
|
||||
}
|
||||
String indexLibId = indexAuditDTO.getIndexLibId();
|
||||
if(StringUtils.isBlank(indexLibId)){
|
||||
throw new SearchException("系统错误-2");
|
||||
}
|
||||
IndexLibDTO indexLibDTO = iIndexLibService.get(indexLibId);
|
||||
if(indexLibDTO == null){
|
||||
throw new SearchException("系统错误-3");
|
||||
}
|
||||
String indexTemplateId = indexLibDTO.getIndexTemplateId();
|
||||
if(StringUtils.isBlank(indexTemplateId)){
|
||||
throw new SearchException("该指标未绑定模板");
|
||||
}
|
||||
IndexTemplateDTO indexTemplateDTO = iIndexTemplateService.get(indexTemplateId);
|
||||
if(indexTemplateDTO == null){
|
||||
throw new SearchException("未获取到模板信息");
|
||||
}
|
||||
return indexTemplateDTO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "审核指标审核表", notes = "审核指标审核表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "indexAuditId", value = "指标审核表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("audit/{indexAuditId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult audit(@PathVariable("indexAuditId") String indexAuditId, @RequestBody AuditVO auditVO) {
|
||||
indexAuditService.audit(null,indexAuditId, auditVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "新增指标审核表", notes = "新增指标审核表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
|
@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -34,6 +35,24 @@ public class IndexAuditLogController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IIndexAuditLogService indexAuditLogService;
|
||||
|
||||
@ApiOperation(value = "指标审核日志表详情", notes = "指标审核日志表详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "indexAuditLogId", value = "指标审核日志表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list_by_indexauditid/{indexAuditId}")
|
||||
public List<IndexAuditLogDTO> listByIndexAuditId(@PathVariable("indexAuditId") String indexAuditId){
|
||||
Map<String,Object> params = new HashMap<>(1);
|
||||
params.put("indexAuditId",indexAuditId);
|
||||
return indexAuditLogService.list(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "新增指标审核日志表", notes = "新增指标审核日志表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
|
@ -34,6 +34,18 @@ public class IndexTemplateController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IIndexTemplateService indexTemplateService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "新增", notes = "新增接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
|
@ -5,6 +5,7 @@ import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.bos.UserInfoBO;
|
||||
import ink.wgink.pojo.pos.DepartmentPO;
|
||||
import ink.wgink.pojo.pos.RolePO;
|
||||
import ink.wgink.properties.ServerProperties;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -16,7 +17,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@ -48,12 +51,8 @@ public class indexWebController extends DefaultBaseController {
|
||||
@GetMapping("indexweb")
|
||||
public ModelAndView indexWeb(){
|
||||
ModelAndView mv = new ModelAndView("index");
|
||||
UserInfoBO currentUser = securityComponent.getCurrentUser();
|
||||
|
||||
|
||||
mv.addObject("userName",currentUser.getUserName());
|
||||
mv.addObject("userUserName",currentUser.getUserUsername());
|
||||
mv.addObject("systemTitle",serverProperties.getSystemTitle());
|
||||
mv.addObject("userParams",this.initUserParams());
|
||||
return mv;
|
||||
}
|
||||
|
||||
@ -81,6 +80,17 @@ public class indexWebController extends DefaultBaseController {
|
||||
}
|
||||
|
||||
|
||||
public Map<String,Object> initUserParams(){
|
||||
Map<String,Object> params = new HashMap<>(10);
|
||||
UserInfoBO currentUser = securityComponent.getCurrentUser();
|
||||
params.put("userName",currentUser.getUserName());
|
||||
params.put("userUserName",currentUser.getUserUsername());
|
||||
params.put("departmentId",this.initDepartmentId(currentUser));
|
||||
params.put("initButton",this.initWebButton(currentUser));
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<String> initWebButton(UserInfoBO currentUser){
|
||||
@ -90,16 +100,22 @@ public class indexWebController extends DefaultBaseController {
|
||||
return list;
|
||||
}
|
||||
for (RolePO role : roles) {
|
||||
if(ROLE_CODE_1.equals(role.getRoleCode())){
|
||||
if(ROLE_CODE_2.equals(role.getRoleCode())){
|
||||
list.add("1");
|
||||
list.add("2");
|
||||
}
|
||||
if(ROLE_CODE_2.equals(role.getRoleCode())){
|
||||
list.add("3");
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public String initDepartmentId(UserInfoBO currentUser){
|
||||
List<DepartmentPO> departments = currentUser.getDepartments();
|
||||
if(departments.size() == 0){
|
||||
return "0";
|
||||
}
|
||||
return departments.get(0).getDepartmentId();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ public class IndexAuditDTO {
|
||||
private String indexAuditId;
|
||||
@ApiModelProperty(name = "indexLibId", value = "指标ID")
|
||||
private String indexLibId;
|
||||
@ApiModelProperty(name = "indexLibName", value = "指标名称")
|
||||
private String indexLibName;
|
||||
@ApiModelProperty(name = "indexBId", value = "指标业务ID")
|
||||
private String indexBId;
|
||||
@ApiModelProperty(name = "indexBTitle", value = "上报标题")
|
||||
@ -26,6 +28,10 @@ public class IndexAuditDTO {
|
||||
private Integer indexAuditStatus;
|
||||
@ApiModelProperty(name = "indexAuditUserId", value = "审核人ID")
|
||||
private String indexAuditUserId;
|
||||
@ApiModelProperty(name = "creatorName", value = "上报人")
|
||||
private String creatorName;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "上报时间")
|
||||
private String gmtCreate;
|
||||
|
||||
public String getIndexAuditId() {
|
||||
return indexAuditId == null ? "" : indexAuditId.trim();
|
||||
@ -76,4 +82,27 @@ public class IndexAuditDTO {
|
||||
}
|
||||
|
||||
|
||||
public String getIndexLibName() {
|
||||
return indexLibName;
|
||||
}
|
||||
|
||||
public void setIndexLibName(String indexLibName) {
|
||||
this.indexLibName = indexLibName;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ public class IndexAuditLogDTO {
|
||||
private String indexAuditStates;
|
||||
@ApiModelProperty(name = "creator", value = "创建人")
|
||||
private String creator;
|
||||
@ApiModelProperty(name = "creatorName", value = "创建人中文")
|
||||
private String creatorName;
|
||||
@ApiModelProperty(name = "gmtModified", value = "创建时间")
|
||||
private String gmtModified;
|
||||
|
||||
@ -75,5 +77,11 @@ public class IndexAuditLogDTO {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,38 @@
|
||||
package com.tenlion.twoduty.pojo.vos.indexaudit;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AuditVO
|
||||
* @Description: 审核实体
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-06-16 17:31:45
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class AuditVO {
|
||||
@ApiModelProperty(name = "indexAuditStates", value = "审核状态")
|
||||
private String indexAuditStates;
|
||||
@ApiModelProperty(name = "indexAuditContent", value = "审核内容")
|
||||
private String indexAuditContent;
|
||||
|
||||
|
||||
public String getIndexAuditStates() {
|
||||
return indexAuditStates;
|
||||
}
|
||||
|
||||
public void setIndexAuditStates(String indexAuditStates) {
|
||||
this.indexAuditStates = indexAuditStates;
|
||||
}
|
||||
|
||||
public String getIndexAuditContent() {
|
||||
return indexAuditContent;
|
||||
}
|
||||
|
||||
public void setIndexAuditContent(String indexAuditContent) {
|
||||
this.indexAuditContent = indexAuditContent;
|
||||
}
|
||||
}
|
@ -22,9 +22,6 @@ public class IndexAuditVO {
|
||||
private String indexBId;
|
||||
@ApiModelProperty(name = "indexBTitle", value = "上报标题")
|
||||
private String indexBTitle;
|
||||
@ApiModelProperty(name = "indexAuditStatus", value = "审核状态:0 待审核 1审核通过 2已归档 -1审核不通过")
|
||||
@CheckNumberAnnotation(name = "审核状态:0 待审核 1审核通过 2已归档 -1审核不通过")
|
||||
private Integer indexAuditStatus;
|
||||
@ApiModelProperty(name = "indexAuditUserId", value = "审核人ID")
|
||||
private String indexAuditUserId;
|
||||
|
||||
@ -52,13 +49,6 @@ public class IndexAuditVO {
|
||||
this.indexBTitle = indexBTitle;
|
||||
}
|
||||
|
||||
public Integer getIndexAuditStatus() {
|
||||
return indexAuditStatus == null ? 0 : indexAuditStatus;
|
||||
}
|
||||
|
||||
public void setIndexAuditStatus(Integer indexAuditStatus) {
|
||||
this.indexAuditStatus = indexAuditStatus;
|
||||
}
|
||||
|
||||
public String getIndexAuditUserId() {
|
||||
return indexAuditUserId == null ? "" : indexAuditUserId.trim();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.tenlion.twoduty.service.indexaudit;
|
||||
|
||||
import com.tenlion.twoduty.pojo.vos.indexaudit.AuditVO;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import com.tenlion.twoduty.pojo.dtos.indexaudit.IndexAuditDTO;
|
||||
@ -19,6 +20,14 @@ import java.util.Map;
|
||||
**/
|
||||
public interface IIndexAuditService {
|
||||
|
||||
/**
|
||||
* 审核接口
|
||||
* @param token
|
||||
* @param indexAuditId
|
||||
* @param auditVO
|
||||
*/
|
||||
void audit(String token, String indexAuditId, AuditVO auditVO);
|
||||
|
||||
/**
|
||||
* 新增指标审核表
|
||||
*
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.tenlion.twoduty.service.indexaudit.impl;
|
||||
|
||||
import com.tenlion.twoduty.pojo.vos.indexaudit.AuditVO;
|
||||
import com.tenlion.twoduty.pojo.vos.indexauditlog.IndexAuditLogVO;
|
||||
import com.tenlion.twoduty.service.indexauditlog.IIndexAuditLogService;
|
||||
import com.tenlion.twoduty.utils.AuditStatusEnum;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
@ -40,6 +42,25 @@ public class IndexAuditServiceImpl extends DefaultBaseService implements IIndexA
|
||||
|
||||
|
||||
|
||||
public void audit(String token,String indexAuditId,AuditVO auditVO){
|
||||
Map<String,Object> params = new HashMap<>(5);
|
||||
params.put("indexAuditId",indexAuditId);
|
||||
params.put("indexAuditStatus",auditVO.getIndexAuditStates());
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setSaveInfo(params);
|
||||
} else {
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
indexAuditDao.update(params);
|
||||
//新增审核日志
|
||||
this.saveAuditLog(indexAuditId,auditVO.getIndexAuditStates(),auditVO.getIndexAuditContent());
|
||||
//修改业务表状态
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -67,6 +88,7 @@ public class IndexAuditServiceImpl extends DefaultBaseService implements IIndexA
|
||||
String indexAuditId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(indexAuditVO);
|
||||
params.put("indexAuditId", indexAuditId);
|
||||
params.put("indexAuditStatus", AuditStatusEnum.NORMAL.getAuditStatus());
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setSaveInfo(params);
|
||||
} else {
|
||||
@ -74,10 +96,7 @@ public class IndexAuditServiceImpl extends DefaultBaseService implements IIndexA
|
||||
}
|
||||
indexAuditDao.save(params);
|
||||
//新增上报日志
|
||||
IndexAuditLogVO indexAuditLogVO = new IndexAuditLogVO();
|
||||
indexAuditLogVO.setIndexAuditStates("0");
|
||||
indexAuditLogVO.setIndexAuditContent("上报指标");
|
||||
iIndexAuditLogService.save(indexAuditLogVO);
|
||||
this.saveAuditLog(indexAuditId,"00","上报指标");
|
||||
return indexAuditId;
|
||||
}
|
||||
|
||||
@ -187,4 +206,14 @@ public class IndexAuditServiceImpl extends DefaultBaseService implements IIndexA
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
|
||||
public void saveAuditLog(String auditId,String states,String content){
|
||||
IndexAuditLogVO indexAuditLogVO = new IndexAuditLogVO();
|
||||
indexAuditLogVO.setIndexAuditId(auditId);
|
||||
indexAuditLogVO.setIndexAuditStates(states);
|
||||
indexAuditLogVO.setIndexAuditContent(content);
|
||||
iIndexAuditLogService.save(indexAuditLogVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.tenlion.twoduty.service.indexgeneral.impl;
|
||||
|
||||
import com.tenlion.twoduty.pojo.vos.indexaudit.IndexAuditVO;
|
||||
import com.tenlion.twoduty.pojo.vos.indexauditlog.IndexAuditLogVO;
|
||||
import com.tenlion.twoduty.service.indexaudit.IIndexAuditService;
|
||||
import com.tenlion.twoduty.service.indexauditlog.IIndexAuditLogService;
|
||||
import com.tenlion.twoduty.utils.AuditStatusEnum;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
@ -37,7 +39,7 @@ public class IndexGeneralServiceImpl extends DefaultBaseService implements IInde
|
||||
@Autowired
|
||||
private IIndexGeneralDao indexGeneralDao;
|
||||
@Autowired
|
||||
private IIndexAuditLogService iIndexAuditLogService;
|
||||
private IIndexAuditService iIndexAuditService;
|
||||
|
||||
@Override
|
||||
public void save(IndexGeneralVO indexGeneralVO) {
|
||||
@ -66,9 +68,23 @@ public class IndexGeneralServiceImpl extends DefaultBaseService implements IInde
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
indexGeneralDao.save(params);
|
||||
this.saveAudit(indexGeneralId,indexGeneralVO.getIndexGeneralTitle(),indexGeneralVO.getDutyIndexLibId());
|
||||
return indexGeneralId;
|
||||
}
|
||||
|
||||
|
||||
public void saveAudit(String bId,String bTitle,String indexLibId){
|
||||
IndexAuditVO indexAuditVO = new IndexAuditVO();
|
||||
indexAuditVO.setIndexAuditUserId("");
|
||||
indexAuditVO.setIndexBId(bId);
|
||||
indexAuditVO.setIndexBTitle(bTitle);
|
||||
indexAuditVO.setIndexLibId(indexLibId);
|
||||
iIndexAuditService.save(indexAuditVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void remove(List<String> ids) {
|
||||
remove(null, ids);
|
||||
|
@ -9,7 +9,7 @@ package com.tenlion.twoduty.utils;
|
||||
*/
|
||||
public enum AuditStatusEnum {
|
||||
|
||||
NORMAL("0"),WAIT("1"), PASS("2"), UN_PASS("-1"),;
|
||||
NORMAL("0"),WAIT("1"), PASS("2"), UN_PASS("-1");
|
||||
|
||||
private final String auditStatus;
|
||||
|
||||
|
@ -5,10 +5,14 @@
|
||||
<resultMap id="indexAuditDTO" type="com.tenlion.twoduty.pojo.dtos.indexaudit.IndexAuditDTO">
|
||||
<result column="index_audit_id" property="indexAuditId"/>
|
||||
<result column="index_lib_id" property="indexLibId"/>
|
||||
<result column="index_lib_name" property="indexLibName"/>
|
||||
<result column="index_b_id" property="indexBId"/>
|
||||
<result column="index_b_title" property="indexBTitle"/>
|
||||
<result column="index_audit_status" property="indexAuditStatus"/>
|
||||
<result column="index_audit_user_id" property="indexAuditUserId"/>
|
||||
<result column="creator_name" property="creatorName"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="indexAuditBO" type="com.tenlion.twoduty.pojo.bos.indexaudit.IndexAuditBO">
|
||||
@ -99,24 +103,14 @@
|
||||
UPDATE
|
||||
duty_index_audit
|
||||
SET
|
||||
<if test="indexLibId != null and indexLibId != ''">
|
||||
index_lib_id = #{indexLibId},
|
||||
</if>
|
||||
<if test="indexBId != null and indexBId != ''">
|
||||
index_b_id = #{indexBId},
|
||||
</if>
|
||||
<if test="indexBTitle != null and indexBTitle != ''">
|
||||
index_b_title = #{indexBTitle},
|
||||
</if>
|
||||
<if test="indexAuditStatus != null">
|
||||
index_audit_status = #{indexAuditStatus},
|
||||
</if>
|
||||
<if test="indexAuditUserId != null and indexAuditUserId != ''">
|
||||
index_audit_user_id = #{indexAuditUserId},
|
||||
</if>
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
index_audit_id = index_audit_id
|
||||
modifier = #{modifier}
|
||||
WHERE
|
||||
index_audit_id = #{indexAuditId}
|
||||
</update>
|
||||
@ -196,9 +190,16 @@
|
||||
t1.index_b_id,
|
||||
t1.index_b_title,
|
||||
t1.index_audit_status,
|
||||
t1.index_audit_user_id
|
||||
t1.index_audit_user_id,
|
||||
t1.gmt_create,
|
||||
su.user_name AS creator_name,
|
||||
t2.index_lib_name
|
||||
FROM
|
||||
duty_index_audit t1
|
||||
LEFT JOIN sys_user su
|
||||
ON t1.creator = su.user_id
|
||||
LEFT JOIN duty_index_lib t2
|
||||
ON t1.index_lib_id = t2.index_lib_id
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
|
@ -8,6 +8,7 @@
|
||||
<result column="index_audit_content" property="indexAuditContent"/>
|
||||
<result column="index_audit_states" property="indexAuditStates"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="creator_name" property="creatorName"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
</resultMap>
|
||||
|
||||
@ -163,9 +164,11 @@
|
||||
t1.index_audit_states,
|
||||
t1.creator,
|
||||
t1.gmt_modified,
|
||||
1
|
||||
su.user_name AS creator_name
|
||||
FROM
|
||||
duty_index_audit_log t1
|
||||
LEFT JOIN sys_user su
|
||||
ON t1.creator = su.user_id
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
@ -174,13 +177,10 @@
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="indexAuditLogIds != null and indexAuditLogIds.size > 0">
|
||||
AND
|
||||
t1.index_audit_log_id IN
|
||||
<foreach collection="indexAuditLogIds" index="index" open="(" separator="," close=")">
|
||||
#{indexAuditLogIds[${index}]}
|
||||
</foreach>
|
||||
<if test="indexAuditId != null and indexAuditId != ''">
|
||||
AND t1.index_audit_id = #{indexAuditId}
|
||||
</if>
|
||||
ORDER BY t1.gmt_modified
|
||||
</select>
|
||||
|
||||
<!-- 指标审核日志表列表 -->
|
||||
|
137
src/main/resources/static/route/indexaudit/audit.html
Normal file
137
src/main/resources/static/route/indexaudit/audit.html
Normal file
@ -0,0 +1,137 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/twoduty/">
|
||||
<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">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">上报内容</label>
|
||||
<div class="layui-input-block">
|
||||
<iframe src="" style="height: 300px;width: 100%">
|
||||
|
||||
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">审核意见</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="indexAuditContent" placeholder="审核意见" class="layui-textarea" lay-verify="required"></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" value="1" class="layui-btn" lay-submit lay-filter="submitForm">通过</button>
|
||||
<button type="button" value="2" class="layui-btn layui-btn-normal" lay-submit lay-filter="submitForm">通过并归档</button>
|
||||
<button type="button" value="-1" class="layui-btn layui-btn-danger" lay-submit lay-filter="submitForm">不通过</button>
|
||||
<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 indexAuditId = top.restAjax.params(window.location.href).indexAuditId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexaudit/get/{indexAuditId}', [indexAuditId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
}, 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) {
|
||||
formData.field['indexAuditStates'] = this.value
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/indexaudit/audit/{indexAuditId}', [indexAuditId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg("审核成功!", {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
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);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -31,20 +31,6 @@
|
||||
</button>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -67,14 +53,7 @@
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/indexaudit/listpage';
|
||||
var indexAuditStatus = '0';
|
||||
|
||||
var departmentId = top.restAjax.params(window.location.href).departmentId;
|
||||
if(departmentId){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var indexLibIdParentId = top.restAjax.params(window.location.href).indexLibIdParentId;
|
||||
|
||||
|
||||
@ -104,7 +83,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'indexAuditId', width: 180, title: '主键', align:'center',
|
||||
{field: 'indexLibName', width: 300, title: '所属指标', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -113,7 +92,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexLibId', width: 180, title: '指标ID', align:'center',
|
||||
{field: 'indexBTitle', width: 500, title: '上报标题', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -122,7 +101,13 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBId', width: 180, title: '指标业务ID', align:'center',
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '待审核';
|
||||
}
|
||||
},
|
||||
{field: 'creatorName', width: 100, title: '上报人', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -131,7 +116,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBTitle', width: 180, title: '上报标题', align:'center',
|
||||
{field: 'gmtCreate', width: 180, title: '上报时间', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -140,24 +125,17 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态:0 待审核 1审核通过 2已归档 -1审核不通过', align:'center',
|
||||
{field: 'cz', width: 140, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditUserId', width: 180, title: '审核人ID', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="audit">审核</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="log">日志</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">详情</button>';
|
||||
rowData +='</div>';
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -237,11 +215,10 @@
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
var data = obj.data;
|
||||
if(layEvent === 'audit') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
@ -249,45 +226,59 @@
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/save.html', []),
|
||||
content: top.restAjax.path('route/indexaudit/audit.html?indexAuditId={indexAuditId}', [data.indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/update.html?indexAuditId={indexAuditId}', [checkDatas[0].indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['indexAuditId'];
|
||||
} else if(layEvent === 'log') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 1,
|
||||
area: ['80%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexauditlog/show.html?indexAuditId={indexAuditId}', [data.indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
});
|
||||
}else if(layEvent === 'show'){
|
||||
var indexBId = data.indexBId
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexaudit/getAuditIndexConfig/{indexAuditId}', [data.indexAuditId]), {}, null, function(code, data) {
|
||||
show(data.indexTemplateShowPath+indexBId);
|
||||
}, 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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function show(path){
|
||||
if(!path){
|
||||
top.dialog.msg("未查询到模板,请联系管理员");
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: path,
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -32,19 +32,7 @@
|
||||
</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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -76,7 +64,6 @@
|
||||
|
||||
|
||||
var indexLibIdParentId = top.restAjax.params(window.location.href).indexLibIdParentId;
|
||||
var indexAuditStatus = top.restAjax.params(window.location.href).indexAuditStatus;
|
||||
|
||||
|
||||
|
||||
@ -105,7 +92,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'indexAuditId', width: 180, title: '主键', align:'center',
|
||||
{field: 'indexLibName', width: 300, title: '所属指标', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -114,7 +101,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexLibId', width: 180, title: '指标ID', align:'center',
|
||||
{field: 'indexBTitle', width: 500, title: '上报标题', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -123,7 +110,14 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBId', width: 180, title: '指标业务ID', align:'center',
|
||||
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '审核通过';
|
||||
}
|
||||
},
|
||||
{field: 'creatorName', width: 100, title: '上报人', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -132,7 +126,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBTitle', width: 180, title: '上报标题', align:'center',
|
||||
{field: 'gmtCreate', width: 180, title: '上报时间', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -141,24 +135,16 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态:0 待审核 1审核通过 2已归档 -1审核不通过', align:'center',
|
||||
{field: 'cz', width: 120, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditUserId', width: 180, title: '审核人ID', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">查看</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="log">日志</button>';
|
||||
rowData +='</div>';
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -238,57 +224,56 @@
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
var data = obj.data;
|
||||
if(layEvent === 'show'){
|
||||
var indexBId = data.indexBId
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexaudit/getAuditIndexConfig/{indexAuditId}', [data.indexAuditId]), {}, null, function(code, data) {
|
||||
show(data.indexTemplateShowPath+indexBId);
|
||||
}, 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);
|
||||
});
|
||||
}else if(layEvent === 'log'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
closeBtn: 1,
|
||||
area: ['80%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/save.html', []),
|
||||
content: top.restAjax.path('route/indexauditlog/show.html?indexAuditId={indexAuditId}', [data.indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/update.html?indexAuditId={indexAuditId}', [checkDatas[0].indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['indexAuditId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
function show(path){
|
||||
if(!path){
|
||||
top.dialog.msg("未查询到模板,请联系管理员");
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: path,
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -32,19 +32,7 @@
|
||||
</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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -76,7 +64,6 @@
|
||||
|
||||
|
||||
var indexLibIdParentId = top.restAjax.params(window.location.href).indexLibIdParentId;
|
||||
var indexAuditStatus = top.restAjax.params(window.location.href).indexAuditStatus;
|
||||
|
||||
|
||||
|
||||
@ -105,7 +92,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'indexAuditId', width: 180, title: '主键', align:'center',
|
||||
{field: 'indexLibName', width: 300, title: '所属指标', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -114,7 +101,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexLibId', width: 180, title: '指标ID', align:'center',
|
||||
{field: 'indexBTitle', width: 500, title: '上报标题', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -123,7 +110,14 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBId', width: 180, title: '指标业务ID', align:'center',
|
||||
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '以归档';
|
||||
}
|
||||
},
|
||||
{field: 'creatorName', width: 100, title: '上报人', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -132,7 +126,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBTitle', width: 180, title: '上报标题', align:'center',
|
||||
{field: 'gmtCreate', width: 180, title: '上报时间', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -141,24 +135,16 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态:0 待审核 1审核通过 2已归档 -1审核不通过', align:'center',
|
||||
{field: 'cz', width: 120, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditUserId', width: 180, title: '审核人ID', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">查看</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="log">日志</button>';
|
||||
rowData +='</div>';
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -238,57 +224,55 @@
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
var data = obj.data;
|
||||
if(layEvent === 'show'){
|
||||
var indexBId = data.indexBId
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexaudit/getAuditIndexConfig/{indexAuditId}', [data.indexAuditId]), {}, null, function(code, data) {
|
||||
show(data.indexTemplateShowPath+indexBId);
|
||||
}, 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);
|
||||
});
|
||||
}else if(layEvent === 'log'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
closeBtn: 1,
|
||||
area: ['80%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/save.html', []),
|
||||
content: top.restAjax.path('route/indexauditlog/show.html?indexAuditId={indexAuditId}', [data.indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/update.html?indexAuditId={indexAuditId}', [checkDatas[0].indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['indexAuditId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function show(path){
|
||||
if(!path){
|
||||
top.dialog.msg("未查询到模板,请联系管理员");
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: path,
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -31,20 +31,6 @@
|
||||
</button>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -72,14 +58,7 @@
|
||||
if(departmentId){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var indexLibIdParentId = top.restAjax.params(window.location.href).indexLibIdParentId;
|
||||
var indexAuditStatus = top.restAjax.params(window.location.href).indexAuditStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
@ -105,7 +84,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'indexAuditId', width: 180, title: '主键', align:'center',
|
||||
{field: 'indexLibName', width: 300, title: '所属指标', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -114,7 +93,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexLibId', width: 180, title: '指标ID', align:'center',
|
||||
{field: 'indexBTitle', width: 500, title: '上报标题', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -123,7 +102,14 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBId', width: 180, title: '指标业务ID', align:'center',
|
||||
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return '审核不通过';
|
||||
}
|
||||
},
|
||||
{field: 'creatorName', width: 100, title: '上报人', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -132,7 +118,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexBTitle', width: 180, title: '上报标题', align:'center',
|
||||
{field: 'gmtCreate', width: 180, title: '上报时间', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -141,24 +127,16 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditStatus', width: 180, title: '审核状态:0 待审核 1审核通过 2已归档 -1审核不通过', align:'center',
|
||||
{field: 'cz', width: 120, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'indexAuditUserId', width: 180, title: '审核人ID', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">查看</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="log">日志</button>';
|
||||
rowData +='</div>';
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -238,57 +216,55 @@
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
var data = obj.data;
|
||||
if(layEvent === 'show'){
|
||||
var indexBId = data.indexBId
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexaudit/getAuditIndexConfig/{indexAuditId}', [data.indexAuditId]), {}, null, function(code, data) {
|
||||
show(data.indexTemplateShowPath+indexBId);
|
||||
}, 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);
|
||||
});
|
||||
}else if(layEvent === 'log'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
closeBtn: 1,
|
||||
area: ['80%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/save.html', []),
|
||||
content: top.restAjax.path('route/indexauditlog/show.html?indexAuditId={indexAuditId}', [data.indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/indexaudit/update.html?indexAuditId={indexAuditId}', [checkDatas[0].indexAuditId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['indexAuditId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function show(path){
|
||||
if(!path){
|
||||
top.dialog.msg("未查询到模板,请联系管理员");
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: path,
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
127
src/main/resources/static/route/indexauditlog/show.html
Normal file
127
src/main/resources/static/route/indexauditlog/show.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/twoduty/">
|
||||
<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>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<ul class="layui-timeline">
|
||||
<div id="li_view"></div>
|
||||
<script id="li_script" type="text/html">
|
||||
{{# layui.each(d, function(index, item){ }}
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h3 class="layui-timeline-title">{{ item.gmtModified }}</h3>
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="150">
|
||||
<col width="200">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>操作人</th>
|
||||
<th>操作结果</th>
|
||||
<th>操作说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ item.creatorName }}</td>
|
||||
<td>
|
||||
{{# if (item.indexAuditStates == '00') { }}
|
||||
上报指标
|
||||
{{# } else if(item.indexAuditStates == '1') { }}
|
||||
审核通过
|
||||
{{# } else if(item.indexAuditStates == '2') { }}
|
||||
通过+已归档
|
||||
{{# } else if(item.indexAuditStates == '-1') { }}
|
||||
审核不通过
|
||||
{{# } else { }}
|
||||
未定义
|
||||
{{# } }}
|
||||
</td>
|
||||
<td>{{ item.indexAuditContent }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
{{# }); }}
|
||||
</script>
|
||||
</ul>
|
||||
</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 indexAuditId = top.restAjax.params(window.location.href).indexAuditId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexauditlog/list_by_indexauditid/{indexAuditId}', [indexAuditId]), {}, null, function(code, data) {
|
||||
console.log(data)
|
||||
laytpl(document.getElementById('li_script').innerHTML).render(data, function(html) {
|
||||
document.getElementById('li_view').innerHTML = html;
|
||||
});
|
||||
}, 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();
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user