commit
This commit is contained in:
@@ -0,0 +1,185 @@
|
||||
package io.v.nutz.wakershome.controller.data;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.result.Result;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.wakershome.model.WakesHomeDataRevel;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Criteria;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDataRevelController
|
||||
* @Date 2024/7/30 15:48
|
||||
* @注释 职工建家资料管理
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/data/revel")
|
||||
public class WakesHomeDataRevelController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private WakesHomeInfoService wakesHomeInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/data/revel.html")
|
||||
@RequiresPermissions("wakeshome.data.revel")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.data.revel")
|
||||
public Object getTreeData(@Param(value = "year", required = false) String year,
|
||||
@Param(value = "revelName", required = false) String revelName,
|
||||
@Param(value = "typeId", required = false) String typeId) {
|
||||
NutMap nutMap = NutMap.NEW();
|
||||
nutMap.setv("unionname", "工会委员会");
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
un.*,
|
||||
(select count(*) from wakes_home_data_revel whdr where whdr.unionId = un.id $revelCount) as revelCount
|
||||
from
|
||||
sys_union un
|
||||
$condition
|
||||
""");
|
||||
Criteria criteria = Cnd.cri();
|
||||
criteria.where().setTop(false);
|
||||
if (StringUtils.isNotBlank(year)) {
|
||||
criteria.where().and("year(whdr.time)", "=", year);
|
||||
}
|
||||
if (StringUtils.isNotBlank(revelName)) {
|
||||
criteria.where().and(Cnd.likeEX("whdr.revelName", revelName));
|
||||
}
|
||||
if (StringUtils.isNotBlank(typeId)) {
|
||||
criteria.where().and("whdr.typeId", "=", typeId);
|
||||
}
|
||||
if (!criteria.where().isEmpty()) {
|
||||
sql.vars().set("revelCount", "and " + criteria.toSql(null));
|
||||
}
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
List<Sys_user_role> data = dao.query(Sys_user_role.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("roleId", "=", Roles.UNION_MANGER));
|
||||
List<String> unionIds = data.stream().map(Sys_user_role::getUnionid).distinct().collect(Collectors.toList());
|
||||
cnd.and("un.id", "in", unionIds);
|
||||
}
|
||||
cnd.and("un.isEnable","=",true);
|
||||
cnd.asc("un.unioncode");
|
||||
sql.setCondition(cnd);
|
||||
nutMap.setv("child", wakesHomeInfoService.listMap(sql));
|
||||
return List.of(nutMap);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("wakeshome.data.revel")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) String year,
|
||||
@Param(value = "revelName", required = false) String revelName,
|
||||
@Param(value = "typeId", required = false) String typeId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
try {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
whdr.*,
|
||||
whdt.typeName
|
||||
FROM
|
||||
wakes_home_data_revel whdr
|
||||
LEFT JOIN wakes_home_data_type whdt ON whdr.typeId = whdt.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year(whdr.time)", "=", year);
|
||||
if (StrUtil.isNotBlank(revelName)) {
|
||||
cnd.and(Cnd.likeEX("whdr.revelName", revelName));
|
||||
}
|
||||
cnd.andEX("whdr.typeId", "=", typeId);
|
||||
cnd.andEX("whdr.unionId", "=", unionId);
|
||||
cnd.desc("whdr.time");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = wakesHomeInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
// @RequiresPermissions("wakeshome.data.revel")
|
||||
public Object doAdd(WakesHomeDataRevel wakesHomeDataRevel) {
|
||||
User user = dao.fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
wakesHomeDataRevel.setId(R.UU32());
|
||||
wakesHomeDataRevel.setUserId(user.getId());
|
||||
wakesHomeDataRevel.setUsername(user.getUsername());
|
||||
wakesHomeDataRevel.setLoginName(user.getLoginname());
|
||||
wakesHomeDataRevel.setUnitId(user.getUnitid());
|
||||
wakesHomeDataRevel.setUnitName(user.getUnitname());
|
||||
wakesHomeDataRevel.setUnionId(user.getUnionid());
|
||||
wakesHomeDataRevel.setUnionName(user.getUnionname());
|
||||
wakesHomeDataRevel.setTime(DateUtil.now());
|
||||
dao.fastInsert(wakesHomeDataRevel);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
// @RequiresPermissions("wakeshome.data.revel")
|
||||
public Object doEdit(WakesHomeDataRevel wakesHomeDataRevel) {
|
||||
dao.update(wakesHomeDataRevel);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
// @RequiresPermissions("wakeshome.data.revel")
|
||||
public Object doDelete(String id) {
|
||||
WakesHomeDataRevel revel = dao.fetch(WakesHomeDataRevel.class, id);
|
||||
if (revel != null) {
|
||||
if (revel.getFiles() != null && !revel.getFiles().isEmpty()) {
|
||||
Set<String> fileIds = revel.getFiles().stream().map(Sys_file::getId).collect(Collectors.toSet());
|
||||
dao.clear(Sys_file.class, Cnd.where("id", "in", fileIds));
|
||||
}
|
||||
dao.clear(WakesHomeDataRevel.class, Cnd.where("id", "=", id));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package io.v.nutz.wakershome.controller.data;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.wakershome.model.WakesHomeDataType;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDataTypeController
|
||||
* @Date 2024/7/30 15:48
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/data/type")
|
||||
public class WakesHomeDataTypeController {
|
||||
|
||||
@Inject
|
||||
private WakesHomeInfoService wakesHomeInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/data/type.html")
|
||||
@RequiresPermissions("wakeshome.data.type")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.data.type")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "typeName", required = false) String typeName) {
|
||||
Sql sql = Sqls.create("select * from wakes_home_data_type $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(typeName)) {
|
||||
cnd.and(Cnd.likeEX("typeName", typeName));
|
||||
}
|
||||
cnd.asc("serialNum");
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("wakeshome.data.type")
|
||||
public Object doAdd(WakesHomeDataType wakesHomeDataType) {
|
||||
try {
|
||||
int count = wakesHomeInfoService.dao().count("wakes_home_data_type", Cnd.where("code", "=", wakesHomeDataType.getCode()));
|
||||
if (count > 0) {
|
||||
return Result.error("编码重复");
|
||||
}
|
||||
wakesHomeDataType.setId(R.UU32());
|
||||
int totalCount = wakesHomeInfoService.count("wakes_home_data_type");
|
||||
wakesHomeDataType.setSerialNum(totalCount + 1);
|
||||
wakesHomeInfoService.insert("wakes_home_data_type", Chain.from(wakesHomeDataType));
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("wakeshome.data.type")
|
||||
public Object doEdit(WakesHomeDataType wakesHomeDataType) {
|
||||
try {
|
||||
int count = wakesHomeInfoService.count("wakes_home_data_type", Cnd.where("code", "=", wakesHomeDataType.getCode()).and("id", "!=", wakesHomeDataType.getId()));
|
||||
if (count > 0) {
|
||||
return Result.error("编码重复");
|
||||
}
|
||||
wakesHomeInfoService.update("wakes_home_data_type", Chain.from(wakesHomeDataType), Cnd.where("id", "=", wakesHomeDataType.getId()));
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresPermissions("wakeshome.data.type")
|
||||
public Object doDelete(String id) {
|
||||
try {
|
||||
wakesHomeInfoService.clear("wakes_home_data_type", Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getAllWakesHomeDataType() {
|
||||
return wakesHomeInfoService.dao().query(WakesHomeDataType.class, Cnd.NEW().asc("serialNum"));
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("sys.jdh2.gzzl.lx")
|
||||
public Object serialNumChange(String id, Integer serialNum, boolean toDown) {
|
||||
if (toDown) {
|
||||
WakesHomeDataType next = wakesHomeInfoService.dao().fetch(WakesHomeDataType.class, Cnd.where("serialNum", "=", serialNum + 1));
|
||||
next.setSerialNum(serialNum - 1);
|
||||
wakesHomeInfoService.dao().update(next);
|
||||
wakesHomeInfoService.dao().update(WakesHomeDataType.class, Chain.make("serialNum", serialNum + 1), Cnd.where("id", "=", id));
|
||||
} else {
|
||||
WakesHomeDataType pre = wakesHomeInfoService.dao().fetch(WakesHomeDataType.class, Cnd.where("serialNum", "=", serialNum - 1));
|
||||
pre.setSerialNum(serialNum + 1);
|
||||
wakesHomeInfoService.dao().update(pre);
|
||||
wakesHomeInfoService.dao().update(WakesHomeDataType.class, Chain.make("serialNum", serialNum - 1), Cnd.where("id", "=", id));
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package io.v.nutz.wakershome.controller.declaration;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDeclarationApply
|
||||
* @Date 2024/7/30 14:06
|
||||
* @注释 职工建家申报
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/declaration/apply")
|
||||
public class WakesHomeDeclarationApplyController {
|
||||
|
||||
@Inject
|
||||
private IWakesHomeApplyService wakesHomeApplyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/declaration/apply.html")
|
||||
@RequiresPermissions("wakeshome.declaration.apply")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.declaration.apply")
|
||||
public Object doSave(WakesHomeApply wakesHomeApply) {
|
||||
wakesHomeApply.setState("10000");
|
||||
if (wakesHomeApply != null) {
|
||||
if (StrUtil.isNotBlank(wakesHomeApply.getId())) {
|
||||
wakesHomeApplyService.update(wakesHomeApply);
|
||||
} else {
|
||||
wakesHomeApplyService.setParams(wakesHomeApply);
|
||||
wakesHomeApplyService.fastInsert(wakesHomeApply);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.declaration.apply")
|
||||
public Object doSubmit(WakesHomeApply wakesHomeApply) {
|
||||
wakesHomeApply.setState("10010");
|
||||
if (wakesHomeApply != null) {
|
||||
if (StrUtil.isNotBlank(wakesHomeApply.getId())) {
|
||||
wakesHomeApplyService.update(wakesHomeApply);
|
||||
} else {
|
||||
wakesHomeApply.setId(R.UU32());
|
||||
wakesHomeApplyService.setParams(wakesHomeApply);
|
||||
wakesHomeApplyService.fastInsert(wakesHomeApply);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.declaration.apply")
|
||||
public Object getInfoById(String id){
|
||||
return wakesHomeApplyService.findById(id);
|
||||
}
|
||||
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package io.v.nutz.wakershome.controller.declaration;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.modules.models.Audit;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDeclarationMine
|
||||
* @Date 2024/7/30 14:06
|
||||
* @注释 我的建家申报
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/declaration/mine")
|
||||
public class WakesHomeDeclarationMineController {
|
||||
|
||||
@Inject
|
||||
private IWakesHomeApplyService wakesHomeApplyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/declaration/mine.html")
|
||||
@RequiresPermissions("wakeshome.declaration.mine")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.declaration.mine")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year",required = false) Integer year,
|
||||
@Param(value = "unionId",required = false) String unionId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wh.*,
|
||||
audit.stateName
|
||||
FROM
|
||||
`wakes_home_apply` wh
|
||||
LEFT JOIN audit_state audit ON wh.state = audit.stateId
|
||||
AND audit.module = 'WakesHome'
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(wh.applyDate)","=",year);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")){
|
||||
cnd.and("unionId","=", Vi.getUnionId());
|
||||
} else {
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions(value = {"wakeshome.declaration.apply","wakeshome.declaration.mine"},logical = Logical.OR)
|
||||
public Object doDelete(String id) {
|
||||
WakesHomeApply apply = wakesHomeApplyService.fetch(id);
|
||||
if (StrUtil.isNotBlank(apply.getOrganizationAuditId())) {
|
||||
wakesHomeApplyService.dao().delete(Audit.class,apply.getOrganizationAuditId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(apply.getSchoolAuditId())) {
|
||||
wakesHomeApplyService.dao().delete(Audit.class,apply.getSchoolAuditId());
|
||||
}
|
||||
wakesHomeApplyService.delete(id);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package io.v.nutz.wakershome.controller.declaration;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.Audit;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDeclarationOrganization
|
||||
* @Date 2024/7/30 14:07
|
||||
* @注释 建家申报党组织审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/declaration/organization")
|
||||
public class WakesHomeDeclarationOrganizationController {
|
||||
|
||||
@Inject
|
||||
private IWakesHomeApplyService wakesHomeApplyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/declaration/organizationAudit.html")
|
||||
@RequiresPermissions("wakeshome.declaration.organization")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.declaration.organization")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "isAudit", required = false) String isAudit) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wh.*,
|
||||
audit.stateName
|
||||
FROM
|
||||
`wakes_home_apply` wh
|
||||
LEFT JOIN audit_state audit ON wh.state = audit.stateId
|
||||
AND audit.module = 'WakesHome'
|
||||
$condition
|
||||
""");
|
||||
CndPlus cnd = CndPlus.create();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
cnd.and("wh.unionId", "=", Vi.getUnionId());
|
||||
} else {
|
||||
cnd.andEX("wh.unionId", "=", unionId);
|
||||
}
|
||||
cnd.andEX("YEAR(wh.applyDate)", "=", year);
|
||||
cnd.and("wh.state", "true".equals(isAudit) ? ">" : "false".equals(isAudit) ? "=" : ">=", 10010);
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("wakeshome.declaration.organization")
|
||||
public Object doAudit(@Param("audit") Audit audit, String id) {
|
||||
Boolean auditPass = audit.getAuditPass();
|
||||
wakesHomeApplyService.dao().insert(audit);
|
||||
wakesHomeApplyService.update(Chain.make("state", auditPass ? 10020 : 10015)
|
||||
.add("organizationAuditId", audit.getId()), Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("wakeshome.declaration.organization")
|
||||
public Object doRollBack(String id){
|
||||
WakesHomeApply wakesHome = wakesHomeApplyService.fetch(id);
|
||||
wakesHomeApplyService.dao().clear(Audit.class,Cnd.where("id","=",wakesHome.getOrganizationAuditId()));
|
||||
wakesHomeApplyService.update(Chain.make("state",10010).add("organizationAuditId",null),Cnd.where("id","=",id));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package io.v.nutz.wakershome.controller.declaration;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.Audit;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDeclarationSchool
|
||||
* @Date 2024/7/30 14:07
|
||||
* @注释 建家申报校工会审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/declaration/school")
|
||||
public class WakesHomeDeclarationSchoolController {
|
||||
|
||||
@Inject
|
||||
private IWakesHomeApplyService wakesHomeApplyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/declaration/schoolAudit.html")
|
||||
@RequiresPermissions("wakeshome.declaration.school")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.declaration.school")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "isAudit", required = false) String isAudit){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wh.*,
|
||||
audit.stateName
|
||||
FROM
|
||||
`wakes_home_apply` wh
|
||||
LEFT JOIN audit_state audit ON wh.state = audit.stateId
|
||||
AND audit.module = 'WakesHome'
|
||||
$condition
|
||||
""");
|
||||
CndPlus cnd = CndPlus.create();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
cnd.and("wh.unionId", "=", Vi.getUnionId());
|
||||
} else {
|
||||
cnd.andEX("wh.unionId", "=", unionId);
|
||||
}
|
||||
cnd.andEX("YEAR(wh.applyDate)", "=", year);
|
||||
cnd.and("wh.state", "true".equals(isAudit) ? ">" : "false".equals(isAudit) ? "=" : ">=", 10020);
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("wakeshome.declaration.school")
|
||||
public Object doAudit(@Param("audit") Audit audit, String id) {
|
||||
Boolean auditPass = audit.getAuditPass();
|
||||
wakesHomeApplyService.dao().insert(audit);
|
||||
wakesHomeApplyService.update(Chain.make("state", auditPass ? 10030 : 10025)
|
||||
.add("schoolAuditId", audit.getId()), Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("wakeshome.declaration.school")
|
||||
public Object doRollBack(String id){
|
||||
WakesHomeApply wakesHome = wakesHomeApplyService.fetch(id);
|
||||
wakesHomeApplyService.dao().clear(Audit.class,Cnd.where("id","=",wakesHome.getSchoolAuditId()));
|
||||
wakesHomeApplyService.update(Chain.make("state",10010).add("schoolAuditId",null),Cnd.where("id","=",id));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package io.v.nutz.wakershome.controller.info;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.result.Result;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.wakershome.model.WakesHome;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@At("/platform/wakeshome/info/apply")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class WakesHomeApplyController {
|
||||
|
||||
|
||||
@Inject
|
||||
private WakesHomeInfoService wakesHomeInfoService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/info/apply.html")
|
||||
@RequiresPermissions("wakeshome.info.apply")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.apply")
|
||||
public Object doAdd(WakesHome wakesHome, Boolean isSubmit){
|
||||
if (isSubmit){
|
||||
// wakesHome.setApplyTime(new Date());
|
||||
wakesHome.setState(8120);
|
||||
} else {
|
||||
wakesHome.setState(8100);
|
||||
}
|
||||
|
||||
if (!"校工会".equals(wakesHome.getCategory())){
|
||||
wakesHome.setUnionId(Vi.getUnionId());
|
||||
}
|
||||
|
||||
wakesHomeInfoService.insert(wakesHome);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.apply")
|
||||
public Object doEdit(WakesHome wakesHome,Boolean isSubmit){
|
||||
if (isSubmit){
|
||||
wakesHome.setState(8120);
|
||||
}
|
||||
wakesHomeInfoService.updateIgnoreNull(wakesHome);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("wakeshome.info.apply")
|
||||
public Object validateApply(){
|
||||
int count = wakesHomeInfoService.dao().count(WakesHomeApply.class, Cnd.where("state", "=", "10030").and("unionId", "=", Vi.getUnionId()));
|
||||
return (count > 0) ? Result.error() : Result.success();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package io.v.nutz.wakershome.controller.info;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
|
||||
@At("/platform/wakeshome/info/info")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class WakesHomeInfoController {
|
||||
|
||||
|
||||
@Inject
|
||||
private WakesHomeInfoService wakesHomeInfoService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/info/info.html")
|
||||
@RequiresPermissions("wakeshome.info.info")
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.info")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year",required = false) Integer year,
|
||||
@Param(value = "unionId",required = false) String unionId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wh.*
|
||||
FROM
|
||||
`wakes_home` wh
|
||||
LEFT JOIN sys_union su ON su.id = wh.unionId
|
||||
$condition
|
||||
""");
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.andEX("YEAR(applyTime)","=",year);
|
||||
if ("校工会".equals(unionId)){
|
||||
cnd.and("wh.category","=","校工会");
|
||||
} else {
|
||||
cnd.andEX("wh.unionId","=",unionId);
|
||||
}
|
||||
cnd.and("wh.state","=",8130);
|
||||
cnd.asc("su.unioncode");
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeInfoService.listMap(sql);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package io.v.nutz.wakershome.controller.info;
|
||||
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.Audit;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.wakershome.model.WakesHome;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@At("/platform/wakeshome/info/mine")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class WakesHomeMineController {
|
||||
|
||||
@Inject
|
||||
private WakesHomeInfoService wakesHomeInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/info/mine.html")
|
||||
@RequiresPermissions("wakeshome.info.mine")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.mine")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year",required = false) Integer year,
|
||||
@Param(value = "unionId",required = false)String unionId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wh.*,
|
||||
audit.stateName
|
||||
FROM
|
||||
`wakes_home` wh
|
||||
LEFT JOIN audit_state audit ON wh.state = audit.stateId
|
||||
AND audit.module = 'WakesHome'
|
||||
$condition
|
||||
""");
|
||||
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.andEX("YEAR(applyTime)","=",year);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")){
|
||||
cnd.and("unionId","=", Vi.getUnionId());
|
||||
} else {
|
||||
if ("校工会".equals(unionId)){
|
||||
cnd.and("wh.category","=","校工会");
|
||||
} else {
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
}
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeInfoService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"wakeshome.info.mine","wakeshome.info.apply"},logical = Logical.OR)
|
||||
public Object getInfoById(String id){
|
||||
WakesHome wakesHome = wakesHomeInfoService.fetch(id);
|
||||
NutMap nutMap = Lang.obj2nutmap(wakesHome);
|
||||
Audit audit = wakesHomeInfoService.dao().fetch(Audit.class, Cnd.where("id", "=", wakesHome.getSchoolAuditId()));
|
||||
if (Lang.isNotEmpty(audit)){
|
||||
nutMap.setv("schoolAudit",audit);
|
||||
}
|
||||
return nutMap;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.mine")
|
||||
public Object doRemove(String id){
|
||||
wakesHomeInfoService.delete(id);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package io.v.nutz.wakershome.controller.info;
|
||||
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.Audit;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.wakershome.model.WakesHome;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@At("/platform/wakeshome/info/schoolaudit")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class WakesHomeSchoolAuditController {
|
||||
|
||||
@Inject
|
||||
private WakesHomeInfoService wakesHomeInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/info/schoolAudit.html")
|
||||
@RequiresPermissions("wakeshome.info.schoolaudit")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.schoolaudit")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year",required = false) Integer year,
|
||||
@Param(value = "unionId",required = false)String unionId,
|
||||
@Param(value = "isAudit", required = false) String isAudit){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wh.*,
|
||||
audit.stateName
|
||||
FROM
|
||||
`wakes_home` wh
|
||||
LEFT JOIN audit_state audit ON wh.state = audit.stateId
|
||||
AND audit.module = 'WakesHome'
|
||||
$condition
|
||||
""");
|
||||
|
||||
CndPlus cnd = CndPlus.create();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")){
|
||||
cnd.and("unionId","=", Vi.getUnionId());
|
||||
} else {
|
||||
if ("校工会".equals(unionId)){
|
||||
cnd.and("wh.category","=","校工会");
|
||||
} else {
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
}
|
||||
}
|
||||
cnd.andEX("YEAR(applyTime)","=",year);
|
||||
cnd.and("wh.state", "true".equals(isAudit) ? ">" : "false".equals(isAudit) ? "=" : ">=", 8120);
|
||||
sql.setCondition(cnd);
|
||||
return wakesHomeInfoService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.schoolaudit")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doAudit(@Param("audit") Audit audit, String id, String isPass){
|
||||
wakesHomeInfoService.dao().insert(audit);
|
||||
wakesHomeInfoService.update(Chain.make("state","1".equals(isPass) ? 8130 : 8125)
|
||||
.add("schoolAuditId",audit.getId()), Cnd.where("id","=",id));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.info.schoolaudit")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doRollBack(String id){
|
||||
WakesHome wakesHome = wakesHomeInfoService.fetch(id);
|
||||
wakesHomeInfoService.dao().clear(Audit.class,Cnd.where("id","=",wakesHome.getSchoolAuditId()));
|
||||
wakesHomeInfoService.update(Chain.make("state",8120).add("schoolAuditId",null),Cnd.where("id","=",id));
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package io.v.nutz.wakershome.controller.review;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
/**
|
||||
* @ClassName addZbController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 15:42
|
||||
*/
|
||||
@At("/platform/wakeshome/review/Xjkhzb")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class AddZbController {
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/review/xjkhzb.html")
|
||||
@RequiresPermissions("wakeshome.review.xjkhzb")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private CommentZbService commentZbService;
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.review.Xjkhzb")
|
||||
public Object doAdd(@Param(value = "kh_zb") CommentZb commentZb) {
|
||||
Trans.exec(() -> {
|
||||
CommentZb zb = commentZbService.insert(commentZb);
|
||||
for (CommentNr nr : commentZb.getNrs()) {
|
||||
nr.setZb_id(zb.getId());
|
||||
commentZbService.insertWith(nr, "bzs");
|
||||
}
|
||||
});
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getZbList(Integer year) {
|
||||
return commentZbService.query(Cnd.NEW().andEX("annual", "=", year));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,259 @@
|
||||
package io.v.nutz.wakershome.controller.review;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.wakershome.model.review.CommentExport;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName exportZpController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/6 17:09
|
||||
*/
|
||||
@At("/platform/unionComment/exportZp")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class ExportZpController {
|
||||
|
||||
|
||||
// @Inject
|
||||
// private OfficeTemplateUtil officeTemplateUtil;
|
||||
|
||||
@Inject
|
||||
private CommentZbService zbService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/unionComment/exportZp.html")
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public Object pageData(@Param(value = "annual", required = false) Integer annual,
|
||||
int pageNumber, int pageSize) {
|
||||
Sql sql = Sqls.create("SELECT YEAR(e.createTime) annual,e.* FROM `comment_export` e $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(e.createTime)", "=", annual);
|
||||
sql.setCondition(cnd);
|
||||
return zbService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public Object getZbData(@Param(value = "annual", required = false) String annual,
|
||||
@Param(value = "assessment", required = false) String assessment) {
|
||||
Sql sql = Sqls.create("SELECT * FROM `comment_zb` $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) {
|
||||
cnd.and("annual", "=", annual);
|
||||
}
|
||||
if (Strings.isNotBlank(assessment) && Strings.isNotBlank(assessment)) {
|
||||
cnd.where().andLike("assessment", assessment);
|
||||
} else {
|
||||
cnd.desc("annual");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return zbService.listMap(sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public Object doAddExport(@Param("export") CommentExport export) {
|
||||
export.setCreateTime(DateUtil.now());
|
||||
if (StrUtil.isNotBlank(export.getId())) {
|
||||
zbService.updateIgnoreNull(export);
|
||||
} else {
|
||||
zbService.insert(export);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public Object doDelete(String id) {
|
||||
zbService.dao().delete(CommentExport.class, id);
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public Object findOne(String id) {
|
||||
CommentExport export = zbService.dao().fetch(CommentExport.class, id);
|
||||
List<CommentZb> zbList = zbService.query(Cnd.NEW().and("id", "in", export.getZbIds()).asc("assessmentMode"));
|
||||
return Map.of("export", export, "zbList", zbList);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("unionComment.exportZp")
|
||||
public void doExport(String id, HttpServletResponse response) throws Exception {
|
||||
CommentExport export = zbService.dao().fetch(CommentExport.class, id);
|
||||
//查询测评有那几个工会测评过
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
un.id,
|
||||
un.unionname unionName,
|
||||
count( peo.id ) num
|
||||
FROM
|
||||
sys_union un
|
||||
LEFT JOIN `user` u ON u.unionId = un.id
|
||||
LEFT JOIN comment_peo peo ON peo.userId = u.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("peo.zbId", "in", export.getZbIds());
|
||||
cnd.groupBy("un.id");
|
||||
cnd.desc("count( peo.id )");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> unionMap = zbService.listMap(sql);
|
||||
|
||||
|
||||
List<CommentZb> zbs = zbService.query(Cnd.NEW().and("id", "in", export.getZbIds()).asc("assessmentMode"));
|
||||
|
||||
//创建临时文件夹
|
||||
Path templateDir = Files.createTempDirectory("评测结果文件夹");
|
||||
|
||||
//循环分工会
|
||||
for (NutMap un : unionMap) {
|
||||
List<User> users = zbService.dao().query(User.class, Cnd.where("unionId", "=", un.getString("id")));
|
||||
|
||||
FileOutputStream outputStream = new FileOutputStream(templateDir.toString() + "/" + un.getString("unionName") + "基层工会会员评家民主测评结果报告表.docx");
|
||||
|
||||
List<NutMap> zpxxList = new ArrayList<>();
|
||||
for (CommentZb zb : zbs) {
|
||||
|
||||
Sql sqlps = Sqls.create("""
|
||||
SELECT
|
||||
SUM( CASE WHEN cp.reviewResult = '不满意' THEN 1 ELSE 0 END ) AS bmy,
|
||||
SUM( CASE WHEN cp.reviewResult = '基本满意' THEN 1 ELSE 0 END ) AS jbmy,
|
||||
SUM( CASE WHEN cp.reviewResult = '满意' THEN 1 ELSE 0 END ) AS my
|
||||
FROM
|
||||
comment_peo cp
|
||||
LEFT JOIN `user` u ON u.id = cp.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cndPs = Cnd.NEW();
|
||||
cndPs.and("u.unionId", "=", un.getString("id"));
|
||||
cndPs.and("cp.zbId", "=", zb.getId());
|
||||
|
||||
sqlps.setCondition(cndPs);
|
||||
if (zb.getAssessmentMode() == 1) {
|
||||
NutMap zpxx = new NutMap();
|
||||
NutMap psMap = zbService.fetch(sqlps);
|
||||
zpxx.setv("pcdx", "工会工作及职工之家建设情况测评");
|
||||
zpxx.setv("my", psMap.getInt("my"));
|
||||
zpxx.setv("jbmy", psMap.getInt("jbmy"));
|
||||
zpxx.setv("bmy", psMap.getInt("bmy"));
|
||||
zpxxList.add(zpxx);
|
||||
} else {
|
||||
NutMap zpxxZx = new NutMap();
|
||||
Cnd clone = cndPs.clone();
|
||||
sqlps.setCondition(clone);
|
||||
clone.and("cp.evaluatedPersonType", "=", "分工会主席");
|
||||
NutMap psMap = zbService.fetch(sqlps);
|
||||
zpxxZx.setv("pcdx", "工会主席履职情况测评");
|
||||
zpxxZx.setv("my", psMap.getInt("my"));
|
||||
zpxxZx.setv("jbmy", psMap.getInt("jbmy"));
|
||||
zpxxZx.setv("bmy", psMap.getInt("bmy"));
|
||||
zpxxList.add(zpxxZx);
|
||||
|
||||
|
||||
NutMap zpxxFzx = new NutMap();
|
||||
Cnd clone2 = cndPs.clone();
|
||||
clone2.and("cp.evaluatedPersonType", "=", "分工会副主席");
|
||||
sqlps.setCondition(clone2);
|
||||
NutMap psMap2 = zbService.fetch(sqlps);
|
||||
zpxxFzx.setv("pcdx", "工会副主席履职情况测评");
|
||||
zpxxFzx.setv("my", psMap2.getInt("my"));
|
||||
zpxxFzx.setv("jbmy", psMap2.getInt("jbmy"));
|
||||
zpxxFzx.setv("bmy", psMap2.getInt("bmy"));
|
||||
zpxxList.add(zpxxFzx);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
|
||||
|
||||
Configure config = Configure.newBuilder().bind("zpxxList", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
|
||||
map.put("zpxxList", zpxxList);
|
||||
map.put("unionName", un.getString("unionName"));
|
||||
map.put("num", users.size());
|
||||
map.put("memberNum", users.stream().filter(v -> v.getMember() == 1).collect(Collectors.toList()).size());
|
||||
// XWPFTemplate.compile(officeTemplateUtil.getPath("unionComment"), config).render(map).writeAndClose(outputStream);
|
||||
|
||||
outputStream.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//压缩
|
||||
File zipFile = ZipUtil.zip(templateDir.toString());
|
||||
response.setHeader("content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode(zipFile.getName(), "UTF-8"));
|
||||
try (ServletOutputStream outputStream = response.getOutputStream();
|
||||
FileInputStream zipFis = new FileInputStream(zipFile);) {
|
||||
IOUtils.copy(zipFis, outputStream);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
FileUtil.del(templateDir);
|
||||
FileUtil.del(zipFile);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package io.v.nutz.wakershome.controller.review;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.wakershome.service.review.CommentPeoService;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @ClassName statisticsController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/5 15:58
|
||||
*/
|
||||
@At("/platform/wakeshome/review/statistics")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class StatisticsZpController {
|
||||
|
||||
@Inject
|
||||
private CommentZbService commentZbService;
|
||||
|
||||
@Inject
|
||||
private CommentPeoService commentPeoService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/review/statistics.html")
|
||||
@RequiresPermissions("wakeshome.review.statistics")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.review.statistics")
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "zbId", required = false) String zbId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
un.id,
|
||||
un.unionname unionName,
|
||||
count( peo.id ) num
|
||||
FROM
|
||||
sys_union un
|
||||
LEFT JOIN `user` u ON u.unionId = un.id
|
||||
LEFT JOIN comment_peo peo ON peo.userId = u.id AND peo.zbId = @zbId
|
||||
$condition
|
||||
""").setParam("zbId", zbId);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("un.id", "=", unionId);
|
||||
|
||||
cnd.groupBy("un.id");
|
||||
cnd.desc("count( peo.id )");
|
||||
sql.setCondition(cnd);
|
||||
return commentZbService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getUserPeoByZbIdOrUnionId(PageForm page,
|
||||
@Param(value = "zbId", required = false) String zbId,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "reviewResult", required = false) String reviewResult) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
peo.*,
|
||||
u.username userName,
|
||||
u.loginname loginName,
|
||||
unitname unitName
|
||||
FROM
|
||||
comment_peo peo
|
||||
LEFT JOIN `user` u ON u.id = peo.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("peo.zbId", "=", zbId);
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
cnd.andEX("peo.reviewResult", "=", reviewResult);
|
||||
if (StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||
SqlExpressionGroup sqlExpressionGroup = new SqlExpressionGroup();
|
||||
sqlExpressionGroup.orLike("u.loginname", page.getSearchKeyword());
|
||||
sqlExpressionGroup.orLike("u.username", page.getSearchKeyword());
|
||||
cnd.and(sqlExpressionGroup);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return commentZbService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getBzById(String peoId) {
|
||||
return commentPeoService.getBzById(peoId);
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getReviewResultNum(@Param(value = "zbId", required = false) String zbId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
NutMap mapList = commentPeoService.fetch(Sqls.create("""
|
||||
SELECT
|
||||
SUM( CASE WHEN cp.reviewResult = '不满意' THEN 1 ELSE 0 END ) AS bmy,
|
||||
SUM( CASE WHEN cp.reviewResult = '基本满意' THEN 1 ELSE 0 END ) AS jbmy,
|
||||
SUM( CASE WHEN cp.reviewResult = '满意' THEN 1 ELSE 0 END ) AS my
|
||||
FROM
|
||||
comment_peo cp
|
||||
LEFT JOIN `user` u ON u.id = cp.userId
|
||||
WHERE
|
||||
cp.zbId = @zbId
|
||||
AND u.unionId = @unionId
|
||||
""").setParam("zbId", zbId).setParam("unionId", unionId));
|
||||
|
||||
return mapList;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package io.v.nutz.wakershome.controller.review;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
import io.v.nutz.wakershome.service.review.CommentBzService;
|
||||
import io.v.nutz.wakershome.service.review.CommentNrService;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName viewZbController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 16:00
|
||||
*/
|
||||
@At("/platform/wakeshome/review/khzb")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class ViewZbController {
|
||||
|
||||
|
||||
@Inject
|
||||
private CommentZbService commentZbService;
|
||||
|
||||
@Inject
|
||||
private CommentNrService commentNrService;
|
||||
|
||||
@Inject
|
||||
private CommentBzService commentBzService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/review/khzb.html")
|
||||
@RequiresPermissions("wakeshome.review.khzb")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.review.khzb")
|
||||
public Object pageData(@Param(value = "annual", required = false) String annual,
|
||||
@Param(value = "assessment", required = false) String assessment,
|
||||
int pageNumber, int pageSize) {
|
||||
Sql sql = Sqls.create("SELECT * FROM `comment_zb` $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) {
|
||||
cnd.and("annual", "=", annual);
|
||||
}
|
||||
if (Strings.isNotBlank(assessment) && Strings.isNotBlank(assessment)) {
|
||||
cnd.where().andLike("assessment", assessment);
|
||||
} else {
|
||||
cnd.desc("annual");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return commentZbService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("wakeshome.review.khzb")
|
||||
public Object delete(String id) {
|
||||
|
||||
commentZbService.delete(id);
|
||||
|
||||
List<CommentNr> query = commentNrService.query(Cnd.where("zb_id", "=", id));
|
||||
|
||||
for (CommentNr kh_nr : query) {
|
||||
commentBzService.clear(Cnd.where("nr_id", "=", kh_nr.getId()));
|
||||
}
|
||||
|
||||
commentNrService.clear(Cnd.where("zb_id", "=", id));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object edit(String id) {
|
||||
return commentZbService.khzb(id);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("wakeshome.review.khzb")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doEdit(@Param(value = "kh_zb") CommentZb commentZb) {
|
||||
commentZbService.updateIgnoreNull(commentZb);
|
||||
|
||||
List<CommentNr> query = commentNrService.query(Cnd.where("zb_id", "=", commentZb.getId()));
|
||||
|
||||
for (CommentNr kh_nr : query) {
|
||||
commentBzService.clear(Cnd.where("nr_id", "=", kh_nr.getId()));
|
||||
}
|
||||
|
||||
commentNrService.clear(Cnd.where("zb_id", "=", commentZb.getId()));
|
||||
|
||||
for (CommentNr nr : commentZb.getNrs()) {
|
||||
nr.setZb_id(commentZb.getId());
|
||||
commentNrService.insertWith(nr, "bzs");
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package io.v.nutz.wakershome.controller.review;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeReviewController
|
||||
* @Date 2024/8/1 16:47
|
||||
* @注释 pc端职工评议
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/wakeshome/review/doReview")
|
||||
public class WakesHomeReviewController {
|
||||
|
||||
@Inject
|
||||
private CommentZbService commentZbService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/wakeshome/review/doReview.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "annual", required = false) String annual,
|
||||
@Param(value = "assessment", required = false) String assessment){
|
||||
Sql sql = Sqls.create("SELECT * FROM `comment_zb` $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) {
|
||||
cnd.and("annual", "=", annual);
|
||||
}
|
||||
if (Strings.isNotBlank(assessment) && Strings.isNotBlank(assessment)) {
|
||||
cnd.where().andLike("assessment", assessment);
|
||||
} else {
|
||||
cnd.desc("annual");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return commentZbService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
package io.v.nutz.wakershome.mobile;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.result.Result;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.wakershome.model.review.CommentBz;
|
||||
import io.v.nutz.wakershome.model.review.CommentPeo;
|
||||
import io.v.nutz.wakershome.model.review.CommentResult;
|
||||
import io.v.nutz.wakershome.service.review.CommentPeoService;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import io.v.nutz.wakershome.vo.WakesHomeVo;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/mobile/wakeshome/review/appraisal")
|
||||
@Ok("json:full")
|
||||
public class MWakesHomeReviewController {
|
||||
|
||||
@Inject
|
||||
private CommentZbService commentZbService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private CommentPeoService commentPeoService;
|
||||
|
||||
@At
|
||||
@Ok("beetl:/mobile/wakeshome/review/appraisal.html")
|
||||
@RequiresAuthentication
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/mobile/wakeshome/review/commentator.html")
|
||||
@RequiresAuthentication
|
||||
public void commentator() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("beetl:/mobile/wakeshome/review/mine.html")
|
||||
@RequiresAuthentication
|
||||
public void mine() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 民主测评首页展示
|
||||
*
|
||||
* @param pageForm
|
||||
* @param annual
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "annual", required = false) String annual,
|
||||
@Param(value = "type", required = false) Integer type) {
|
||||
Sql sql = Sqls.create("SELECT * FROM `comment_zb` $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) {
|
||||
cnd.and("annual", "=", annual);
|
||||
}
|
||||
switch (type) {
|
||||
//进行中
|
||||
case 2 -> cnd.and(new Static("now() >= startTime and now() <= endTime"));
|
||||
//已结束
|
||||
case 3 -> cnd.and(new Static("now() > endTime"));
|
||||
//未开始
|
||||
case 4 -> cnd.and(new Static("now() < startTime"));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = commentZbService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
List<NutMap> list = pagination.getList();
|
||||
List<Sys_union> unionList = commentZbService.dao().query(Sys_union.class, Cnd.NEW());
|
||||
list.forEach(v -> {
|
||||
//自评模式
|
||||
boolean reviewMode = v.getInt("reviewMode") == 1;
|
||||
if (reviewMode && v.getInt("commentTarget") == 1) {
|
||||
//校工会自评,判断有没有校工会管理员的权限
|
||||
v.put("canJoin", ShiroUtil.hasRole("A06"));
|
||||
} else if (reviewMode && v.getInt("commentTarget") == 2){
|
||||
//分工会自评,判断有没有分工会管理员
|
||||
v.put("canJoin", ShiroUtil.hasRole("H04"));
|
||||
}
|
||||
|
||||
//自选分工会的模式
|
||||
if (StrUtil.isNotBlank(v.getString("unionIds"))) {
|
||||
List<String> unionIdList = JSONUtil.parseArray(v.getString("unionIds")).toList(String.class);
|
||||
String string = unionList.stream().filter(item -> unionIdList.contains(item.getId()))
|
||||
.map(Sys_union::getUnionname).collect(Collectors.joining(","));
|
||||
v.put("unionNames", string);
|
||||
//如果是自评,只有分工会主席才能自评
|
||||
if (reviewMode) {
|
||||
v.put("canJoin", (unionIdList.contains(Vi.getUnionId()) && ShiroUtil.hasRole("H04")));
|
||||
} else {
|
||||
v.put("canJoin", unionIdList.contains(Vi.getUnionId()));
|
||||
}
|
||||
}
|
||||
});
|
||||
return pagination;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据id获取测评内容
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getById(String id) {
|
||||
return commentZbService.khzb(id);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doSubmit(WakesHomeVo wakesHomeVo) {
|
||||
try {
|
||||
System.out.println(wakesHomeVo);
|
||||
CommentPeo peo = new CommentPeo();
|
||||
if (Strings.isNotBlank(wakesHomeVo.getEvaluatedPersonId())) {
|
||||
peo.setEvaluatedPersonId(wakesHomeVo.getEvaluatedPersonId());
|
||||
peo.setEvaluatedPersonName(wakesHomeVo.getEvaluatedPersonName());
|
||||
peo.setEvaluatedPersonType(wakesHomeVo.getEvaluatedPersonType());
|
||||
}
|
||||
peo.setReviewResult(wakesHomeVo.getReviewResult());
|
||||
peo.setZbId(wakesHomeVo.getId());
|
||||
peo.setReviewTime(DateUtil.now());
|
||||
peo.setFiles(wakesHomeVo.getFiles());
|
||||
peo.setUserId((String) ShiroUtil.getPrincipalProperty("id"));
|
||||
if (Strings.isNotBlank(wakesHomeVo.getPresidentOpinions())) {
|
||||
peo.setPresidentOpinions(wakesHomeVo.getPresidentOpinions());
|
||||
}
|
||||
baseService.dao().insert(peo);
|
||||
List<CommentResult> commentResults = new ArrayList<>();
|
||||
for (CommentBz v : wakesHomeVo.getBzList()) {
|
||||
CommentResult result = new CommentResult();
|
||||
result.setBz_id(v.getId());
|
||||
result.setAssessResult(v.getResultScore());
|
||||
result.setRecommendation(v.getOptions() != null ? v.getOptions() : null);
|
||||
result.setPeo_id(peo.getId());
|
||||
commentResults.add(result);
|
||||
}
|
||||
baseService.dao().insert(commentResults);
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断是否测评过
|
||||
*
|
||||
* @param id 指标id
|
||||
* @param evaluatedPersonId 被测评人id
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
public Object isAssess(@Param("id") String id,
|
||||
@Param(value = "evaluatedPersonId", required = false) String evaluatedPersonId) {
|
||||
//主席测评
|
||||
if (Strings.isNotBlank(evaluatedPersonId)) {
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.and("evaluatedPersonId", "=", evaluatedPersonId);
|
||||
cnd.and("userId", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
cnd.and("zbId", "=", id);
|
||||
return Result.success().addData(baseService.dao().count(CommentPeo.class, cnd));
|
||||
} else {//会员评家测评
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
cp.*,
|
||||
cz.annual,
|
||||
cz.assessment,
|
||||
cz.assessmentMode,
|
||||
cz.scoringMode,
|
||||
cz.commentTarget
|
||||
FROM
|
||||
`comment_peo` cp
|
||||
LEFT JOIN `comment_zb` cz ON cz.id = cp.zbId
|
||||
where cp.zbId=@zbId and cp.userId=@userId
|
||||
""").setParam("zbId", id).setParam("userId", ShiroUtil.getPrincipalProperty("id"));
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
NutMap nutMap = list.stream().findFirst().orElse(null);
|
||||
if (Strings.isNotBlank(nutMap.getString("commentTarget")) && "1".equals(nutMap.getString("assessmentMode"))) {
|
||||
return Result.success().addData(1);
|
||||
} else {
|
||||
return Result.success().addData(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我的测评页面展示
|
||||
*
|
||||
* @param pageForm
|
||||
* @param annual
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
public Object onLoad(PageForm pageForm,
|
||||
@Param(value = "annual", required = false) String annual) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
cp.*,
|
||||
cz.annual,
|
||||
cz.assessment,
|
||||
cz.assessmentMode,
|
||||
cz.scoringMode,
|
||||
cz.commentTarget
|
||||
FROM
|
||||
`comment_peo` cp
|
||||
LEFT JOIN `comment_zb` cz ON cz.id = cp.zbId
|
||||
$condition
|
||||
""");
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.andEX("cz.annual", "=", annual);
|
||||
cnd.and("cp.userId", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
cnd.desc("cp.reviewTime");
|
||||
sql.setCondition(cnd);
|
||||
return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取测评结果信息
|
||||
*
|
||||
* @param peoId
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getBzById(@Param("peoId") String peoId) {
|
||||
return commentPeoService.getBzById(peoId);
|
||||
}
|
||||
|
||||
private static final String GH01 = "9c1f19e385914fef82bc35da7c9ded36";
|
||||
private static final String GH02 = "672b47cfc79c4a77878c0f2cfd5734be";
|
||||
|
||||
/**
|
||||
* 获取分工会主席和副主席
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getPresidents() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.loginname,
|
||||
u.username,
|
||||
sr.`name` evaluatedPersonType,
|
||||
GROUP_CONCAT( DISTINCT u.username, '(', sr.`name`, ')' ) presidents
|
||||
FROM
|
||||
`user` u
|
||||
LEFT JOIN `sys_user_role` sur ON u.id = sur.userId
|
||||
LEFT JOIN `sys_role` sr ON sur.roleId = sr.id
|
||||
$condition
|
||||
""");
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.and("sr.`id`", "in", Lang.array(GH01, GH02));
|
||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||
cnd.groupBy("u.id");
|
||||
cnd.asc("u.loginname");
|
||||
sql.setCondition(cnd);
|
||||
return baseService.listMap(sql);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package io.v.nutz.wakershome.model;
|
||||
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class WakesHome {
|
||||
|
||||
@Name
|
||||
@Column
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("填报人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String username;
|
||||
|
||||
@Column
|
||||
@Comment("联系方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("填报时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String applyTime;
|
||||
|
||||
@Column
|
||||
@Comment("填报类别(校工会/分工会)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String category;
|
||||
|
||||
@Column
|
||||
@Comment("创办时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String foundTime;
|
||||
|
||||
@Column
|
||||
@Comment("单位位置")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String position;
|
||||
|
||||
@Column
|
||||
@Comment("单位面积")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String area;
|
||||
|
||||
@Column
|
||||
@Comment("单位信息")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String details;
|
||||
|
||||
@Column
|
||||
@Comment("获奖情况")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<awardInfo> awardInfo;
|
||||
|
||||
@Column
|
||||
@Comment("图片文件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> picFiles;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
|
||||
@Column
|
||||
@Comment("分工会审核id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("校工会审核id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String schoolAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("状态")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer state;
|
||||
|
||||
|
||||
@Data
|
||||
public static class awardInfo implements Serializable {
|
||||
/**
|
||||
* 获奖日期
|
||||
*/
|
||||
private String awardTime;
|
||||
/**
|
||||
* 获奖单位
|
||||
*/
|
||||
private String awardUnit;
|
||||
/**
|
||||
* 奖项名称
|
||||
*/
|
||||
private String awardName;
|
||||
/**
|
||||
* 奖项照片
|
||||
*/
|
||||
private String awardPic;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package io.v.nutz.wakershome.model;
|
||||
|
||||
import io.v.nutz.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeApply
|
||||
* @Date 2024/7/31 10:47
|
||||
* @注释 职工之家申报
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@Comment("职工之家申报")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WakesHomeApply extends BaseModel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("申报人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("申报人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("申报人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String username;
|
||||
|
||||
@Column
|
||||
@Comment("申报人单位id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("申报人单位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("申报人工会Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("申报人工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("联系电话")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("基本情况简介(500字内)")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String basicInformation;
|
||||
|
||||
@Column
|
||||
@Comment("建设方案")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String constructionPlan;
|
||||
|
||||
@Column
|
||||
@Comment("基层党组织审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String organizationAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("校工会审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String schoolAuditId;
|
||||
|
||||
//10000待提交;10010待基层党组织审核;10020待校工会审核;10030审核通过
|
||||
@Column
|
||||
@Comment("当前状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String state;
|
||||
|
||||
@Column
|
||||
@Comment("申报时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private String applyDate;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package io.v.nutz.wakershome.model;
|
||||
|
||||
import io.v.nutz.base.model.BaseModel;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDataRevel
|
||||
* @Date 2024/7/30 15:29
|
||||
* @注释 职工建家资料管理
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@Comment("职工建家资料管理")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WakesHomeDataRevel extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("资料名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String revelName;
|
||||
|
||||
@Column
|
||||
@Comment("上传人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("上传人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("上传人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String username;
|
||||
|
||||
@Column
|
||||
@Comment("上传人单位id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("上传人单位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("上传人工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("上传人工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("上传时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String time;
|
||||
|
||||
@Column
|
||||
@Comment("类型Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String typeId;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package io.v.nutz.wakershome.model;
|
||||
|
||||
import io.v.nutz.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeDataType
|
||||
* @Date 2024/7/30 15:29
|
||||
* @注释 职工建家资料类型管理
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@Comment("职工建家资料类型管理")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WakesHomeDataType extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("类型编码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String code;
|
||||
|
||||
@Column
|
||||
@Comment("工作资料类型名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 80)
|
||||
private String typeName;
|
||||
|
||||
@Column
|
||||
@Comment("序号")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer serialNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package io.v.nutz.wakershome.model.review;
|
||||
|
||||
import cn.wizzer.framework.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
/**
|
||||
* @ClassName CommentBz
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 16:24
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class CommentBz extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("CommentNr表的id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String nr_id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("考核标准")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String inspection;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("是否启用佐证材料")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean isEvidence;
|
||||
|
||||
@Column
|
||||
@Comment("标准分")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String score;
|
||||
|
||||
@Column
|
||||
@Comment("单项得分")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String single_score;
|
||||
|
||||
@Column
|
||||
@Comment("自评能否超过最高分")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean beyondHighestScore;
|
||||
|
||||
@Column
|
||||
@Comment("关联模块")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
private String associatedModule;
|
||||
|
||||
@Column
|
||||
@Comment("标准标识")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
private String bz_relation_id;
|
||||
|
||||
@Column
|
||||
@Comment("CommentZb表的id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zb_id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("题号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String contentNumber;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_bz"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
@Column
|
||||
@Comment("能否删除该项")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean canDelete;
|
||||
|
||||
@One(field = "nr_id",key = "id")
|
||||
private CommentNr nr;
|
||||
|
||||
private String resultScore;
|
||||
|
||||
private String options;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package io.v.nutz.wakershome.model.review;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName CommentExport
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/7 15:19
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class CommentExport {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("导出的名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String exportName;
|
||||
|
||||
@Column
|
||||
@Comment("zbids")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<String> zbIds;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package io.v.nutz.wakershome.model.review;
|
||||
|
||||
import cn.wizzer.framework.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName CommentNr
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 16:13
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class CommentNr extends BaseModel {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("考核内容")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
@Comment("题号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String contentNumber;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("CommentZb表的id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zb_id;
|
||||
|
||||
@One(field = "zb_id",key = "id")
|
||||
private CommentZb zb;
|
||||
|
||||
@Many(field = "nr_id")
|
||||
private List<CommentBz> bzs;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_nr"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package io.v.nutz.wakershome.model.review;
|
||||
|
||||
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class CommentPeo {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("测评人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("被测评人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String evaluatedPersonId;
|
||||
|
||||
@Column
|
||||
@Comment("被测评人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String evaluatedPersonName;
|
||||
|
||||
@Column
|
||||
@Comment("被测评人职务(主席/副主席)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String evaluatedPersonType;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("指标id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zbId;
|
||||
|
||||
@Column
|
||||
@Comment("主席测评意见")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String presidentOpinions;
|
||||
|
||||
@Column
|
||||
@Comment("评测结果")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 10)
|
||||
private String reviewResult;
|
||||
|
||||
@Column
|
||||
@Comment("测评时间")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 20)
|
||||
private String reviewTime;
|
||||
|
||||
|
||||
@Many(field = "peo_id")
|
||||
private List<CommentResult> resultList;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("自我测评的附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package io.v.nutz.wakershome.model.review;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class CommentResult {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("CommentPeo表的id(测评人表id)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String peo_id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("CommentBz表的id(测评标准id)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String bz_id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("测评分数/满意度")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String assessResult;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("会员评家意见或建议")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String recommendation;
|
||||
|
||||
|
||||
@One(field = "peo_id",key = "id")
|
||||
private CommentPeo peo;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package io.v.nutz.wakershome.model.review;
|
||||
|
||||
import cn.wizzer.framework.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName CommentZb
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 15:39
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class CommentZb extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String annual;
|
||||
|
||||
@Column
|
||||
@Comment("考核名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String assessment;
|
||||
|
||||
@Column
|
||||
@Comment("添加时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String addTime;
|
||||
|
||||
@Column
|
||||
@Comment("评议选项(1.工会评家2.主席评家)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer assessmentMode;
|
||||
|
||||
@Column
|
||||
@Comment("可报名范围组别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private Integer activityGroupId;
|
||||
|
||||
@Column
|
||||
@Comment("评议范围(1.校工会 2.全部分工会 3.自选分工会)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer commentTarget;
|
||||
|
||||
@Column
|
||||
@Comment("打分模式(1.评分模式2.选择满意不满意模式)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer scoringMode;
|
||||
|
||||
|
||||
@Many(field = "zb_id")
|
||||
private List<CommentNr> nrs;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_zb"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("自选分工会Id")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<String> unionIds;
|
||||
|
||||
@Column
|
||||
@Comment("评议开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date startTime;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("评议结束时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date endTime;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("评议模式(1.自评模式 2.教职工评议)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer reviewMode;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package io.v.nutz.wakershome.service;
|
||||
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:IWakesHomeApplyService
|
||||
* @Date 2024/7/31 11:09
|
||||
* @注释
|
||||
*/
|
||||
public interface IWakesHomeApplyService extends BaseService<WakesHomeApply> {
|
||||
|
||||
NutMap findById(String id);
|
||||
|
||||
void setParams(WakesHomeApply wakesHomeApply);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.v.nutz.wakershome.service;
|
||||
|
||||
import io.v.nutz.service.ViService;
|
||||
import io.v.nutz.wakershome.model.WakesHome;
|
||||
|
||||
public interface WakesHomeInfoService extends ViService<WakesHome> {
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package io.v.nutz.wakershome.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.service.impl.BaseServiceImpl;
|
||||
import io.v.nutz.modules.models.Audit;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeApplyServiceImpl
|
||||
* @Date 2024/7/31 11:10
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class WakesHomeApplyServiceImpl extends BaseServiceImpl<WakesHomeApply> implements IWakesHomeApplyService {
|
||||
public WakesHomeApplyServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NutMap findById(String id) {
|
||||
WakesHomeApply apply = fetch(id);
|
||||
NutMap nutMap = Lang.obj2nutmap(apply);
|
||||
if (StrUtil.isNotBlank(apply.getOrganizationAuditId())) {
|
||||
Audit audit = dao().fetch(Audit.class, Cnd.where("id", "=", apply.getOrganizationAuditId()));
|
||||
nutMap.put("organizationAudit", Lang.obj2nutmap(audit));
|
||||
}
|
||||
if (StrUtil.isNotBlank(apply.getSchoolAuditId())) {
|
||||
Audit audit = dao().fetch(Audit.class, Cnd.where("id", "=", apply.getSchoolAuditId()));
|
||||
nutMap.put("schoolAudit", Lang.obj2nutmap(audit));
|
||||
}
|
||||
return nutMap;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setParams(WakesHomeApply wakesHomeApply) {
|
||||
User user = dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
wakesHomeApply.setId(R.UU32());
|
||||
wakesHomeApply.setApplyDate(DateUtil.today());
|
||||
wakesHomeApply.setUnitId(user.getUnitid());
|
||||
wakesHomeApply.setUnitName(user.getUnitname());
|
||||
wakesHomeApply.setUnionId(user.getUnionid());
|
||||
wakesHomeApply.setUnionName(user.getUnionname());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package io.v.nutz.wakershome.service.impl;
|
||||
|
||||
import io.v.nutz.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.wakershome.model.WakesHome;
|
||||
import io.v.nutz.wakershome.service.WakesHomeInfoService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class WakesHomeInfoServiceImpl extends ViServiceImpl<WakesHome> implements WakesHomeInfoService {
|
||||
public WakesHomeInfoServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.v.nutz.wakershome.service.impl.review;
|
||||
|
||||
import io.v.nutz.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.wakershome.model.review.CommentBz;
|
||||
import io.v.nutz.wakershome.service.review.CommentBzService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @ClassName CommentBzServiceImpl
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 16:30
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class CommentBzServiceImpl extends ViServiceImpl<CommentBz> implements CommentBzService {
|
||||
public CommentBzServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.v.nutz.wakershome.service.impl.review;
|
||||
|
||||
import io.v.nutz.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
import io.v.nutz.wakershome.service.review.CommentNrService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @ClassName CommentNrServiceImpl
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 16:28
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class CommentNrServiceImpl extends ViServiceImpl<CommentNr> implements CommentNrService {
|
||||
public CommentNrServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package io.v.nutz.wakershome.service.impl.review;
|
||||
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
import io.v.nutz.wakershome.model.review.CommentPeo;
|
||||
import io.v.nutz.wakershome.model.review.CommentResult;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
import io.v.nutz.wakershome.service.review.CommentPeoService;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class CommentPeoServiceImpl extends ViServiceImpl<CommentPeo> implements CommentPeoService {
|
||||
|
||||
public CommentPeoServiceImpl(Dao dao) {super(dao);}
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private CommentZbService commentZbService;
|
||||
|
||||
/**
|
||||
* 获取测评结果信息
|
||||
* @param peoId 指标id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public NutMap getBzById(String peoId) {
|
||||
CommentPeo commentPeo = fetch(peoId);
|
||||
List<CommentResult> query = baseService.dao().query(CommentResult.class, Cnd.where("peo_id","=",peoId));
|
||||
//对测评标准分组
|
||||
Map<String, CommentResult> commentResultMap = query.stream().collect(Collectors.toMap(v -> v.getBz_id(), v -> v));
|
||||
//获取指标
|
||||
CommentZb khzb = commentZbService.khzb(commentPeo.getZbId());
|
||||
List<CommentNr> nrs = khzb.getNrs();
|
||||
nrs.forEach(v->{
|
||||
v.getBzs().forEach(o->{
|
||||
//赋值测评结果
|
||||
CommentResult result = commentResultMap.get(o.getId());
|
||||
o.setOptions(result.getRecommendation());
|
||||
o.setResultScore(result.getAssessResult());
|
||||
});
|
||||
});
|
||||
NutMap nutMap = new NutMap();
|
||||
nutMap.setv("zbxx",khzb);
|
||||
nutMap.setv("commentPeo",commentPeo);
|
||||
return nutMap;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.v.nutz.wakershome.service.impl.review;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
import io.v.nutz.wakershome.service.review.CommentNrService;
|
||||
import io.v.nutz.wakershome.service.review.CommentZbService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName CommentZbServiceImpl
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2023/9/4 15:54
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class CommentZbServiceImpl extends ViServiceImpl<CommentZb> implements CommentZbService {
|
||||
public CommentZbServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private CommentNrService commentNrService;
|
||||
|
||||
|
||||
private void setNrBz(List<CommentNr> nrs) {
|
||||
for (CommentNr nr : nrs) {
|
||||
nr = commentNrService.fetchLinks(nr, "bzs", Cnd.NEW().asc("location"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommentZb khzb(String zbid) {
|
||||
if (StrUtil.isBlank(zbid)) {
|
||||
return null;
|
||||
}
|
||||
CommentZb zb = fetchLinks(fetch(zbid), "nrs", Cnd.NEW().asc("location"));
|
||||
setNrBz(zb.getNrs());
|
||||
return zb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.v.nutz.wakershome.service.review;
|
||||
|
||||
import io.v.nutz.service.ViService;
|
||||
import io.v.nutz.wakershome.model.review.CommentBz;
|
||||
|
||||
public interface CommentBzService extends ViService<CommentBz> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.v.nutz.wakershome.service.review;
|
||||
|
||||
import io.v.nutz.service.ViService;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
|
||||
public interface CommentNrService extends ViService<CommentNr> {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package io.v.nutz.wakershome.service.review;
|
||||
|
||||
import io.v.nutz.service.ViService;
|
||||
import io.v.nutz.wakershome.model.review.CommentPeo;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
public interface CommentPeoService extends ViService<CommentPeo> {
|
||||
|
||||
/**
|
||||
* 根据指标id和被测评人id查测评结果
|
||||
* @param peoId 指标id
|
||||
* @return
|
||||
*/
|
||||
NutMap getBzById(String peoId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package io.v.nutz.wakershome.service.review;
|
||||
|
||||
import io.v.nutz.service.ViService;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
|
||||
public interface CommentZbService extends ViService<CommentZb> {
|
||||
|
||||
|
||||
CommentZb khzb(String zbid);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.v.nutz.wakershome.vo;
|
||||
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.wakershome.model.review.CommentBz;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:WakesHomeVo
|
||||
* @Date 2024/8/1 16:06
|
||||
* @注释 职工建家vo
|
||||
*/
|
||||
@Data
|
||||
public class WakesHomeVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private List<CommentBz> bzList;
|
||||
|
||||
private String reviewResult;
|
||||
|
||||
private String evaluatedPersonId;
|
||||
|
||||
private String evaluatedPersonName;
|
||||
|
||||
private String evaluatedPersonType;
|
||||
|
||||
private String presidentOpinions;
|
||||
|
||||
private List<Sys_file> files;
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -284,9 +285,14 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
public Object unions(String delegationId) {
|
||||
public Object unions(@Param(value = "delegationId", required = false) String delegationId, boolean isPermission) {
|
||||
if (Strings.isBlank(delegationId)) {
|
||||
return sysUnionService.query(Cnd.where("isEnable", "=", true).orderBy().asc("unioncode"));
|
||||
Cnd cndX = Cnd.NEW();
|
||||
if (isPermission) {
|
||||
cndX.and("id", "=", Vi.getUnionId());
|
||||
}
|
||||
cndX.asc("unioncode");
|
||||
return sysUnionService.query(cndX);
|
||||
}
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -300,7 +306,7 @@ public class ViCommonCon {
|
||||
LEFT JOIN jdh_dbt dbt ON zc.dbtid = dbt.id $condition
|
||||
""");
|
||||
|
||||
cnd.and("zc.dbtid", "=", delegationId).and("uni.isEnable", "=", true)
|
||||
cnd.and("zc.dbtid", "=", delegationId)
|
||||
.groupBy("uni.id")
|
||||
.asc("uni.unioncode");
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ const getDbt = async (jdhId) => {
|
||||
* 获取院级工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnions = async (delegationId) => {
|
||||
const {data} = await $.get("/platform/vi/common/unions", {delegationId})
|
||||
const getUnions = async (delegationId = null, isPermission = false) => {
|
||||
const {data} = await $.get("/platform/vi/common/unions", {delegationId, isPermission})
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2023/11/10/11:07
|
||||
*/
|
||||
<template>
|
||||
<div class="el-descriptions">
|
||||
<div class="el-descriptions__body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions table {
|
||||
table-layout: auto;
|
||||
}
|
||||
|
||||
.el-descriptions__body table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.el-descriptions :not(.is-bordered) th, td {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.el-descriptions .is-bordered th, td {
|
||||
border: 1px solid #ebeef5;
|
||||
padding: 12px 10px;
|
||||
}
|
||||
|
||||
.el-descriptions__body table th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.el-descriptions__body table th {
|
||||
font-weight: 400;
|
||||
color: #909399;
|
||||
background: #fafafa;
|
||||
border: 1px solid #ebeef5;
|
||||
padding: 12px 10px;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.el-descriptions__body table td .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.el-descriptions__body table td .is-required .el-form-item__error {
|
||||
background: #303133;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
z-index: 2000;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
min-width: 10px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.el-descriptions .el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" tab-position="top">
|
||||
<el-tab-pane label="基本信息" name="1">
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>填报人</th>
|
||||
<td>{{ viewData.username }}</td>
|
||||
|
||||
<th>填报工号</th>
|
||||
<td>{{ viewData.loginName }}</td>
|
||||
|
||||
<th>联系方式</th>
|
||||
<td>{{ viewData.mobile }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>填报单位</th>
|
||||
<td>{{ viewData.unionName }}</td>
|
||||
<th>填报时间</th>
|
||||
<td colspan="3">{{ moment(viewData.applyDate).format('YYYY年MM月DD日') }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>基本情况简介</th>
|
||||
<td colspan="5">{{ viewData.basicInformation }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>建设方案</th>
|
||||
<td colspan="5">
|
||||
<div class="text-left" v-html="viewData.constructionPlan"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="基层党组织审核信息" v-if="organizationAudit" name="2">
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>审核人</th>
|
||||
<td>{{ organizationAudit.username }}--{{ organizationAudit.loginname }}</td>
|
||||
<th>审核时间</th>
|
||||
<td>{{ organizationAudit.auditTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审核意见</th>
|
||||
<td colspan="3">{{ organizationAudit.auditOpinion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="3">
|
||||
<div>
|
||||
<el-image :src="organizationAudit.auditSign" style="width: 200px;height:auto"
|
||||
v-if="organizationAudit.auditSign"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核信息" v-if="schoolAudit" name="3">
|
||||
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>审核人</th>
|
||||
<td>{{ schoolAudit.username }}--{{ schoolAudit.loginname }}</td>
|
||||
<th>审核时间</th>
|
||||
<td>{{ schoolAudit.auditTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审核意见</th>
|
||||
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="3">
|
||||
<div>
|
||||
<el-image :src="schoolAudit.auditSign" style="width: 200px;height:auto"
|
||||
v-if="schoolAudit.auditSign"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
activeName: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '1',
|
||||
viewData: {},
|
||||
organizationAudit: {},
|
||||
schoolAudit: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openView(id) {
|
||||
const resp = await $.get('/platform/wakeshome/declaration/apply/getInfoById', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.organizationAudit = resp.data.organizationAudit
|
||||
this.schoolAudit = resp.data.schoolAudit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" tab-position="top">
|
||||
<el-tab-pane label="基本信息" name="1">
|
||||
|
||||
<border-table>
|
||||
<vi-title title="职工之家申请信息"></vi-title>
|
||||
<table>
|
||||
<tr>
|
||||
<th>填报人</th>
|
||||
<td>{{ viewData.username }}</td>
|
||||
|
||||
<th>联系方式</th>
|
||||
<td>{{ viewData.mobile }}</td>
|
||||
|
||||
<th>填报人</th>
|
||||
<td>{{ viewData.applyTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>填报单位</th>
|
||||
<td colspan="5">{{ viewData.unionName }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<vi-title style="margin-top: 25px" title="职工之家详细信息"></vi-title>
|
||||
<table>
|
||||
<tr>
|
||||
<th>单位位置</th>
|
||||
<td>{{ viewData.position }}</td>
|
||||
|
||||
<th>单位面积</th>
|
||||
<td>{{ viewData.area }}</td>
|
||||
|
||||
<th>创办时间</th>
|
||||
<td>{{ viewData.foundTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位信息</th>
|
||||
<td colspan="5">{{ viewData.details }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
|
||||
<vi-title style="margin-top: 25px" title="职工之家荣誉信息"></vi-title>
|
||||
<el-table :data="viewData.awardInfo" style="width: 100%">
|
||||
<el-table-column prop="awardTime" label="获奖日期"></el-table-column>
|
||||
<el-table-column prop="awardUnit" label="获奖单位"></el-table-column>
|
||||
<el-table-column prop="awardName" label="奖项名称"></el-table-column>
|
||||
<el-table-column prop="awardPic" label="获奖图片">
|
||||
<template scope="{row,$index}">
|
||||
<div v-if="row.awardPic != null && row.awardPic !== ''">
|
||||
<image-upload :view="true" :limit="1" v-model="row.awardPic"></image-upload>
|
||||
</div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<vi-title style="margin-top: 25px" title="职工之家材料上传"></vi-title>
|
||||
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>图片</th>
|
||||
<td colspan="6">
|
||||
<file-upload v-if="viewData.picFiles && viewData.picFiles.length > 0"
|
||||
:files="viewData.picFiles"
|
||||
:view="true"></file-upload>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>附件</th>
|
||||
<td colspan="6">
|
||||
<file-upload v-if="viewData.files && viewData.files.length > 0"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核信息" v-if="schoolAudit" name="2">
|
||||
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>审核人</th>
|
||||
<td>{{ schoolAudit.username }}--{{ schoolAudit.loginname }}</td>
|
||||
<th>审核时间</th>
|
||||
<td>{{ schoolAudit.auditTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审核意见</th>
|
||||
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="3">
|
||||
<div>
|
||||
<el-image :src="schoolAudit.auditSign" style="width: 200px;height:auto"
|
||||
v-if="schoolAudit.auditSign"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
activeName: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '1',
|
||||
viewData: {},
|
||||
schoolAudit: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openView(id) {
|
||||
console.log(id)
|
||||
const resp = await $.get('/platform/wakeshome/mine/getInfoById', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.schoolAudit = resp.data.schoolAudit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-upload__tip {
|
||||
display: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,506 @@
|
||||
<template>
|
||||
<el-form class="el_form" :model="data" ref="addForm" :rules="formRules" label-width="120px">
|
||||
<vi-title title="指标信息"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="annual" label="年  度" class="is-required">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
:disabled="is_view"
|
||||
:picker-options="pickerOptions"
|
||||
v-model="data.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="assessment" label="评测名称" class="is-required">
|
||||
<el-input maxlength="30" :disabled="is_view" v-model="data.assessment"
|
||||
placeholder="请填写评测名称"
|
||||
type="text">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="assessment" label="">
|
||||
<el-checkbox v-model="data.isEvaluationIndex" :disabled="is_view">是否采用以往评议指标</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="zbId" label="以往评议指标" v-if="data.isEvaluationIndex">
|
||||
<el-select v-model="data.zbId" placeholder="请选择" filterable clearable
|
||||
style="width: 100%" @change="getByZbData">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="assessmentMode" label="评议选项" class="is-required">
|
||||
<el-radio-group v-model="data.assessmentMode" :disabled="is_view">
|
||||
<el-radio-button :label="1">工会评议</el-radio-button>
|
||||
<el-radio-button :label="2">主席/副主席评议</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="reviewMode" label="评议模式" class="is-required">
|
||||
<el-radio-group v-model="data.reviewMode" :disabled="is_view">
|
||||
<el-tooltip content="由校工会/分工会管理员自我测评"
|
||||
placement="top">
|
||||
<el-radio-button :label="1">自我评议</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="由教职工对选择的工会/主席进行评议"
|
||||
placement="top">
|
||||
<el-radio-button :label="2">教工评议</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="scoringMode" label="打分模式" class="is-required">
|
||||
<el-radio-group v-model="data.scoringMode" :disabled="is_view">
|
||||
<el-radio-button :label="1">评分模式</el-radio-button>
|
||||
<el-radio-button :label="2">满意度模式</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8" v-if="data.assessmentMode">
|
||||
<el-form-item prop="scoringMode" label="评议范围" class="is-required">
|
||||
<el-radio-group v-model="data.commentTarget" :disabled="is_view">
|
||||
<el-tooltip :content="schoolContent" placement="top">
|
||||
<el-radio-button :disabled="!(A06 || sysadmin)" :label="1">校工会</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="allUnionContent" placement="top">
|
||||
<el-radio-button :disabled="!(A06 || sysadmin)" :label="2">全部分工会</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="selectUnionContent" placement="top">
|
||||
<el-radio-button :label="3">自选分工会</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<template v-if="data.commentTarget && data.reviewMode == 2 && data.commentTarget == 1">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="activityGroupId" label="可评议人员" class="is-required">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select clearable filterable placeholder="请选择可评议人员"
|
||||
style="width: 99%" v-model="data.activityGroupId" :disabled="is_view">
|
||||
<el-option :key="item.groupId"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
v-for="item in activityGroupList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
:disabled="is_view"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<template v-if="data.commentTarget && data.commentTarget == 3">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="unionIds" label="自选分工会" class="is-required">
|
||||
<el-select v-model="data.unionIds" style="width: 100%"
|
||||
multiple clearable filterable
|
||||
placeholder="请选择分工会">
|
||||
<el-option
|
||||
v-for="item in reviewUnions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="applyTime" label="评议时间" class="is-required">
|
||||
<el-date-picker
|
||||
end-placeholder="结束时间"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="data.applyTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<vi-title2 title="测评内容"></vi-title2>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="(nr,idx) in data.nrs">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" :disabled="is_view" maxlength="30" style="width: 50%"
|
||||
placeholder="请填写测评内容">
|
||||
<template slot="prepend"><span v-model="nr.contentNumber">
|
||||
{{ nr.contentNumber = idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
<el-button v-if="!is_view" size="medium" :disabled="data.nrs.length<=1" type="danger"
|
||||
@click="data.nrs.splice(idx,1)"
|
||||
icon="el-icon-delete"></el-button>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary
|
||||
:summary-method="getSummaries" size="small">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="100px">
|
||||
<template scope="{$index,row}">
|
||||
{{ row.contentNumber = $index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="测评标准" prop="inspection" header-align="center" align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写测评标准"></el-input>
|
||||
<span v-else>{{ row.inspection }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="单项分" prop="single_score" header-align="center" align="center" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.single_score" placeholder="请填写单项分"></el-input>
|
||||
<span v-else>{{ row.single_score }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="100px" v-if="data.scoringMode===1">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model.number="row.score" maxlength="4"
|
||||
placeholder="请填写标准分"></el-input>
|
||||
<span v-else>{{ row.score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="能否超过标准分" prop="beyond_highestscore" header-align="center" align="center" width="120px">
|
||||
<template scope="{row}">
|
||||
<el-switch
|
||||
v-if="!is_view"
|
||||
v-model="row.beyond_highestscore"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<el-switch
|
||||
v-else
|
||||
disabled
|
||||
v-model="row.beyond_highestscore">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="是否填写意见" prop="isEvidence" header-align="center" align="center"
|
||||
width="120px" v-if="data.scoringMode===1">
|
||||
<template scope="{row}">
|
||||
<el-switch
|
||||
:disabled="is_view"
|
||||
v-model="row.isEvidence"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--
|
||||
<el-table-column label="关联模块" prop="associatedmodule" header-align="center" align="center" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.associatedmodule" maxlength="10" placeholder="请填写关联模块"></el-input>
|
||||
<span v-else>{{ row.associatedmodule }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="关联标识" prop="bz_relation_id" header-align="center" align="center" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.bz_relation_id" maxlength="20" placeholder="请填写关联标识,该标识唯一"></el-input>
|
||||
<span v-else>{{ row.bz_relation_id }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<!-- <el-table-column label="能否删除" prop="canDelete" header-align="center" align="center" width="100px">-->
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-if="!is_view"-->
|
||||
<!-- :disabled="row.canDelete==false"-->
|
||||
<!-- v-model="row.canDelete"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- inactive-color="#ff4949">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-else-->
|
||||
<!-- :disabled="!row.canDelete && row.id"-->
|
||||
<!-- v-model="row.canDelete">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column v-if="!is_view" label="操作" header-align="center" align="center"
|
||||
width="200px">
|
||||
<template scope="{row,$index}">
|
||||
<el-button size="mini" :disabled="nr.bzs.length<=1 || (!row.canDelete && row.id)"
|
||||
type="danger" icon="el-icon-delete"
|
||||
@click="nr.bzs.splice($index,1)"></el-button>
|
||||
<el-button size="mini"
|
||||
type="primary" icon="el-icon-plus"
|
||||
@click="nr.bzs.splice($index+1,0,{inspection:null,score:null,isEvidence:true})"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt10 mb10" style="border-top: 1px dashed rgb(229, 225, 225)"></el-row>
|
||||
</el-form-item>
|
||||
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button v-if="!is_view"
|
||||
type="primary"
|
||||
@click="data.nrs.push({bzs:[{inspection:null,score:null,isEvidence:true}]})">
|
||||
添加测评内容
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="data.activityGroupId"
|
||||
></drawer-user-scope>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const METHOD_NAME = "change"
|
||||
|
||||
module.exports = {
|
||||
props: {
|
||||
is_view: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
unionIds: []
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
data: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.$emit(METHOD_NAME, val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
isEvaluationIndex: false,
|
||||
zbList: [],
|
||||
formRules: {
|
||||
xxx: [{required: true, message: '请填写年度', trigger: ['blur', 'change']}],
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
relationData: [
|
||||
{moduleName: '提案系统模块', id: 'proposal'},
|
||||
{moduleName: '二级教代会', id: 'secteameet'},
|
||||
{moduleName: '慰问/补助', id: 'ConandDif'},
|
||||
],
|
||||
roleDataReview: {},
|
||||
reviewUnions: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
||||
},
|
||||
methods: {
|
||||
async getActivityGroup() {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = data
|
||||
},
|
||||
async getByZbData() {
|
||||
const {
|
||||
code,
|
||||
data,
|
||||
msg
|
||||
} = await $.get('/platform/wakeshome/review/viewZb/edit', {id: this.data.zbId})
|
||||
if (data) {
|
||||
this.$set(this.data, "nrs", data.nrs)
|
||||
} else {
|
||||
this.$set(this.data, "nrs", [{bzs: [{}]}])
|
||||
}
|
||||
},
|
||||
async getZbList() {
|
||||
const res = await $.get("/platform/wakeshome/review/Xjkhzb/getZbList")
|
||||
this.zbList = res.data
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0 && this.data.scoringMode === 1) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if ([1, 3, 4].includes(index) && this.data.scoringMode === 1) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
} else if ([1, 2, 3].includes(index) && this.data.scoringMode === 2) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 分';
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleDataReview = data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getRolesAndUnion()
|
||||
await this.getActivityGroup()
|
||||
await this.getZbList()
|
||||
if (!this.data || !Object.keys(this.data).length) {
|
||||
this.data = {
|
||||
nrs: [{
|
||||
bzs: [{inspection: null, score: null, isEvidence: true}]
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
if (((this.is_sysadmin || this.is_A06 || this.is_H02) === false) && this.is_H04 === true) {
|
||||
this.reviewUnions = await getUnionList(this.unionId)
|
||||
this.$set(this.data, "unionIds", this.reviewUnions[0].id)
|
||||
} else {
|
||||
this.reviewUnions = await getUnions(null)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
H10() {
|
||||
return this.roleDataReview.is_H10
|
||||
},
|
||||
A06() {
|
||||
return this.roleDataReview.is_A06
|
||||
},
|
||||
H04() {
|
||||
return this.roleDataReview.is_H04
|
||||
},
|
||||
H02() {
|
||||
return this.roleDataReview.is_H02
|
||||
},
|
||||
sysadmin() {
|
||||
return this.roleDataReview.is_sysadmin
|
||||
},
|
||||
unionId() {
|
||||
return this.roleDataReview.unionid
|
||||
},
|
||||
schoolContent() {
|
||||
if (this.data.reviewMode == 1) {
|
||||
return '勾选后,仅校工会管理员可参加测评'
|
||||
} else if (this.data.reviewMode == 2) {
|
||||
return '勾选后,全校所有人员可评议校工会,也可根据右侧选框【可评议人员】指定评议人员范围'
|
||||
} else {
|
||||
return '请选择评议模式'
|
||||
}
|
||||
},
|
||||
allUnionContent() {
|
||||
if (this.data.reviewMode == 1) {
|
||||
return '勾选后,仅各工会管理员可对本分工会进行自我评议'
|
||||
} else if (this.data.reviewMode == 2) {
|
||||
return '勾选后,所有分工会人员对本分工会进行评议,不可跨工会评议'
|
||||
} else {
|
||||
return '请选择评议模式'
|
||||
}
|
||||
},
|
||||
selectUnionContent() {
|
||||
if (this.data.reviewMode == 1) {
|
||||
return '勾选后,仅右侧选择的分工会管理员可对本分工会进行自我评议'
|
||||
} else if (this.data.reviewMode == 2) {
|
||||
return '勾选后,可根据右侧选框【自选分工会】指定分工会评议范围'
|
||||
} else {
|
||||
return '请选择评议模式'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fixedBox {
|
||||
position: fixed;
|
||||
top: 200px;
|
||||
right: 10px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.el_form {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-input-group__prepend {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -131,6 +131,7 @@
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=2.0.0'))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue'))
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/textEditor.vue'))
|
||||
Vue.component('border-table', httpVueLoader('/components/plugins/BorderTable.vue'))
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -337,6 +337,22 @@ layout("/mobile/platform.html"){
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工评议
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/wakeshome/review/appraisal/index">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 职工评议</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/wakeshome/review/appraisal/mine">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 我的评议</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '培训教育'">
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.d_card {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
width: 90%;
|
||||
margin: 10px;
|
||||
}
|
||||
.van-tag--primary {
|
||||
height: 23px !important;
|
||||
background-color: #1989fa;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
overflow:visible;
|
||||
word-break:keep-all;
|
||||
white-space:nowrap;
|
||||
text-overflow:inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="评议列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.annual" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="activityList" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 60px auto">
|
||||
|
||||
<template>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" :key="o.id" class="van-doc-card">
|
||||
<div @click="toCommentator(o)" style="padding: 10px">
|
||||
<div>
|
||||
<div style="display: flex;font-size: 18px">{{ o.assessment }}</div>
|
||||
<div style="align-items: center">
|
||||
<van-tag type="primary">{{ o.assessmentMode==1 ? '工会评议' : '工会主席评议' }}</van-tag>
|
||||
<!--<van-tag type="primary">{{ o.commentTarget==1 ? '校工会' : '分工会' }}</van-tag>-->
|
||||
<van-tag type="primary" v-if="o.commentTarget==1">{{ '校工会' }}</van-tag>
|
||||
<van-tag type="primary" v-if="o.commentTarget==2">{{ unionName }}</van-tag>
|
||||
<van-tag class="ellipsis" type="primary" v-if="o.commentTarget==3">{{ o.unionNames.length>25 ? o.unionNames.substring(0,25) + '...' : o.unionNames }}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-row gutter="20">
|
||||
<van-col span="12">
|
||||
<span>年度:{{ o.annual }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>测评模式:{{ o.scoringMode==1 ? '评分' : '满意度' }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wakeshome/review/appraisal/index">职工评议</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wakeshome/review/appraisal/mine">我的评议</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
tarBarActive: 0,
|
||||
pageForm:{
|
||||
annual:'',
|
||||
type: 2,
|
||||
},
|
||||
activityList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开始', value: 4},
|
||||
{text: '进行中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
yearOption:[],
|
||||
unionName: '${@shiro.getPrincipalProperty("union").getUnionname()}'
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async toCommentator(o){
|
||||
//自评模式
|
||||
if (o.reviewMode == 1 && !o.canJoin) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您不在评议人员范围中',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const isExist = await getScopeUser(o.activityGroupId)
|
||||
if ((o.commentTarget == 1 && !isExist) || (o.commentTarget == 3 && !o.canJoin)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您不在评议人员范围中',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
||||
if (resp.data > 0){
|
||||
vant.Toast('您已经填写过,请前往我的测评中查看测评结果')
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/wakeshome/review/appraisal/commentator?id=' + o.id
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "annual", this.yearOption[0].value)
|
||||
this.pageData();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,373 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.search-fixed {
|
||||
position: fixed;
|
||||
top: 46px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.van-collapse-item .van-cell__title :before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 15px;
|
||||
background-color: #0e5996;
|
||||
width: 4px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
margin-right: 2px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.van-collapse-item__content .van-cell__title :before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content_div {
|
||||
margin-top: 10px;
|
||||
background-color: white;
|
||||
padding: 6px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-collapse-item__content {
|
||||
padding: 0px 6px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.van-button {
|
||||
height: 40px;
|
||||
margin: 6px 20px
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="民主测评" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<van-form ref="addForm" :show-error-message="false" style="margin-bottom: 60px">
|
||||
<!-- v-for测评内容 -->
|
||||
<van-collapse v-model="activeNames" accordion>
|
||||
<div v-if="commentatorData.scoringMode==1">
|
||||
<div v-for="o in commentatorData.nrs">
|
||||
<van-collapse-item :title="o.content" :name="o.id" style="margin: 5px">
|
||||
<!-- v-for测评指标 -->
|
||||
<div v-for="item in o.bzs" style="margin-top: 10px" class="content_div">
|
||||
<div>
|
||||
<div style="font-size: 15px;color: black">
|
||||
{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-row>
|
||||
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">标准分:{{item.score}}</div>
|
||||
</van-row>
|
||||
<van-field
|
||||
v-model="item.resultScore"
|
||||
name="评议分"
|
||||
label="评议分"
|
||||
type="digit"
|
||||
required
|
||||
maxlength="4"
|
||||
:readonly="isReadOnly"
|
||||
placeholder="请填写评议分"
|
||||
@change="changeScore(item)"
|
||||
:rules="[{ required: true, message: '请填写评议分' }]"
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_div" style="margin: 10px 0">
|
||||
<van-field v-model="o.remark"
|
||||
name="备注" label="备注"
|
||||
required rows="3" type="textarea"
|
||||
autosize show-word-limit
|
||||
maxlength="300"
|
||||
placeholder="请填写备注"
|
||||
:readonly="isReadOnly"
|
||||
></van-field>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</div>
|
||||
<div v-if="commentatorData.reviewMode == 1" class="content_div">
|
||||
<van-field name="files" label="职工评家总结" required style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">职工评家总结</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="commentatorData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="commentatorData.scoringMode==2">
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="president" :options="presidentList"
|
||||
@change="presidentChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div v-for="o in commentatorData.nrs" style="margin: 60px auto 0 auto">
|
||||
<div v-for="item in o.bzs">
|
||||
<div class="van-doc-card">
|
||||
<div style="font-size: 15px;color: black">{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-field name="radio" label="满意度" style="padding: 12px 2px;margin: 5px">
|
||||
<template #input>
|
||||
<van-radio-group style="margin-left: -20px" v-model="item.resultScore" :disabled="isReadOnly" direction="horizontal">
|
||||
<van-radio name="满意">满意</van-radio>
|
||||
<van-radio name="基本满意">基本满意</van-radio>
|
||||
<van-radio name="不满意">不满意</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-doc-card">
|
||||
<van-field
|
||||
v-model="presidentOpinions"
|
||||
:readonly="isReadOnly"
|
||||
rows="2" type="textarea"
|
||||
autosize show-word-limit
|
||||
name="备注" label="备注" maxlength="200"
|
||||
placeholder="请填写备注"
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar>
|
||||
<van-button id="buttonAss" :disabled="isShowSubmit" round block type="info" @click="showAssess">查看测评结果</van-button>
|
||||
<van-button id="buttonSub" :disabled="isShowSubmit" round block type="info" @click="onSubmit">提交</van-button>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
activeNames: '',
|
||||
commentatorData: {},
|
||||
reviewResult: null,
|
||||
presidentOpinions: '',
|
||||
bzList: [],
|
||||
president: '',
|
||||
presidentList: [],
|
||||
userList:[],
|
||||
isShowSubmit: false,
|
||||
isReadOnly:false,
|
||||
formData:{
|
||||
id: '',
|
||||
reviewResult: '',
|
||||
presidentOpinions: '',
|
||||
president: '',
|
||||
files: [],
|
||||
nrs: [],
|
||||
reviewMode: '',
|
||||
scoringMode: '',
|
||||
assessmentMode: '',
|
||||
assessmentResult: '',
|
||||
assessmentOpinions: '',
|
||||
assessmentFiles: [],
|
||||
assessmentNrs: [],
|
||||
assessmentReviewMode: '',
|
||||
assessmentScoringMode:'',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCommentById() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getById', {id: this.id})
|
||||
if (resp.code === 0) {
|
||||
this.commentatorData = resp.data
|
||||
if (this.commentatorData.assessmentMode === 2) {
|
||||
this.commentatorData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
o.resultScore = '满意'
|
||||
})
|
||||
})
|
||||
await this.getPresidents();
|
||||
}
|
||||
this.activeNames = this.commentatorData.nrs[0].id
|
||||
}
|
||||
},
|
||||
async assignment() {
|
||||
const self = this;
|
||||
this.bzList = [];
|
||||
this.commentatorData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
if (v.remark){
|
||||
o.options = v.remark
|
||||
}
|
||||
self.bzList.push(o)
|
||||
})
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
await this.$dialog.confirm({
|
||||
title: '确定要提交该测评结果吗?',
|
||||
message: '提交后不可修改,请仔细检查后提交'
|
||||
})
|
||||
await this.assignment();
|
||||
|
||||
let evaluatedPersonName=null;
|
||||
let evaluatedPersonType=null;
|
||||
|
||||
if (this.commentatorData.assessmentMode === 1) {
|
||||
let score = 0;
|
||||
this.bzList.forEach(v => {
|
||||
score += Number(v.resultScore)
|
||||
})
|
||||
if (score >= Number(80)) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (score >= Number(60) && score <= Number(79)) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
} else if (this.commentatorData.assessmentMode === 2) {
|
||||
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||
if (result.length >= 8) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (result.length >= 6 && result.length <= 7) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
const user = this.userList.find(v=> v.id === this.president)
|
||||
evaluatedPersonName = user.username
|
||||
evaluatedPersonType = user.evaluatedPersonType
|
||||
}
|
||||
|
||||
const formData = this.formData
|
||||
// this.$set(formData,"bzList",this.bzList)
|
||||
formData.bzList = JSON.stringify(this.bzList)
|
||||
formData.id = this.id
|
||||
formData.president = this.president
|
||||
formData.reviewResult = this.reviewResult
|
||||
formData.evaluatedPersonName = evaluatedPersonName
|
||||
formData.evaluatedPersonType = evaluatedPersonType
|
||||
formData.files = JSON.stringify(this.commentatorData.files)
|
||||
|
||||
console.log(formData)
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData)
|
||||
if (resp.code === 0) {
|
||||
// await this.getCommentById();
|
||||
// window.location.href = '/mobile/wakeshome/review/appraisal/mine'
|
||||
}
|
||||
})
|
||||
},
|
||||
async showAssess() {
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
let score = 0;
|
||||
await this.assignment();
|
||||
if (this.commentatorData.assessmentMode === 1) {
|
||||
this.bzList.forEach(v => {
|
||||
score += Number(v.resultScore)
|
||||
})
|
||||
if (score >= Number(80)) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (score >= Number(60) && score <= Number(79)) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
console.log(score)
|
||||
console.log(this.reviewResult)
|
||||
vant.Dialog.alert({
|
||||
title: '测评结果',
|
||||
message: '您的测评分数为【' + score + "】分,测评结果为【" + this.reviewResult + "】",
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
} else if (this.commentatorData.assessmentMode === 2) {
|
||||
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||
if (result.length >= 8) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (result.length >= 6 && result.length <= 7) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
console.log(result)
|
||||
console.log(this.reviewResult)
|
||||
vant.Dialog.alert({
|
||||
title: '测评结果',
|
||||
message: '您的满意或基本满意个数为【' + result.length + "】个,测评结果为【" + this.reviewResult + "】",
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeScore(item) {
|
||||
if (Number(item.score) < Number(item.resultScore)) {
|
||||
item.resultScore = null;
|
||||
vant.Toast('评议分不能超过标准分!')
|
||||
}
|
||||
},
|
||||
async getPresidents() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getPresidents')
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.forEach(v => {
|
||||
this.presidentList.push({value: v.id, text: v.presidents})
|
||||
})
|
||||
}
|
||||
this.president = this.presidentList[0].value
|
||||
await this.presidentChange();
|
||||
},
|
||||
async presidentChange() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess', {
|
||||
id: this.id,
|
||||
evaluatedPersonId: this.president,
|
||||
})
|
||||
if (resp.data > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您已经评测过该主席(副主席),请在【我的评议】中查看结果,或更换主席(副主席)进行测评',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
this.isShowSubmit = true;
|
||||
this.isReadOnly = true
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
await this.getCommentById();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,271 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-collapse-item .van-cell__title :before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 15px;
|
||||
background-color: #0e5996;
|
||||
width: 4px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
margin-right: 2px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.van-collapse-item__content .van-cell__title :before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content_div {
|
||||
margin-top: 10px;
|
||||
background-color: white;
|
||||
padding: 6px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-collapse-item__content {
|
||||
padding: 0px 6px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="我的测评" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.annual" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto">
|
||||
<template>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" :key="o.id" class="van-doc-card">
|
||||
<div @click="toCommentator(o)" style="padding: 10px">
|
||||
<div>
|
||||
<div style="display: flex;font-size: 18px">{{ o.assessment }}</div>
|
||||
<div style="align-items: center">
|
||||
<van-tag type="primary">{{ o.assessmentMode==1 ? '会员评家考核' : '工会主席考核' }}</van-tag>
|
||||
<!--<van-tag type="primary">{{ o.commentTarget==1 ? '校工会' : '分工会' }}</van-tag>-->
|
||||
<van-tag type="primary" v-if="o.commentTarget==1">{{ '校工会' }}</van-tag>
|
||||
<van-tag type="primary" v-if="o.commentTarget==2">{{ unionName }}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-row gutter="20">
|
||||
<van-col span="10">
|
||||
<span>年度:{{ o.annual }}</span>
|
||||
</van-col>
|
||||
<van-col span="14" v-if="o.assessmentMode==2">
|
||||
<span>测评对象:{{ o.evaluatedPersonName }}({{o.evaluatedPersonType}})</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row gutter="20">
|
||||
<van-col span="10">
|
||||
<span>测评模式:{{ o.scoringMode==1 ? '评分' : '满意度' }}</span>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<span>测评结果:{{ o.reviewResult ? o.reviewResult : '暂无' }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!--<div>年度:{{ o.annual }}</div>
|
||||
<div>测评结果:{{ o.reviewResult ? o.reviewResult : '暂无' }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="descPopup" position="right" style="height: 100%;width: 100%;background-color: #f9f9f9"
|
||||
safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="descPopup=false" left-arrow
|
||||
title="测评详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div>
|
||||
<van-form :show-error-message="false" style="margin-bottom: 60px">
|
||||
<!-- v-for测评内容 -->
|
||||
<van-collapse v-model="activeNames" accordion>
|
||||
<div v-if="zbxx.scoringMode==1">
|
||||
<div v-for="o in zbxx.nrs">
|
||||
<van-collapse-item :title="o.content" :name="o.id" style="margin: 5px">
|
||||
<!-- v-for测评指标 -->
|
||||
<div v-for="item in o.bzs" style="margin-top: 10px" class="content_div">
|
||||
<div>
|
||||
<div style="font-size: 15px;color: black">
|
||||
{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-row>
|
||||
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">标准分:{{item.score}}</div>
|
||||
</van-row>
|
||||
<van-field
|
||||
v-model="item.resultScore"
|
||||
name="测评分"
|
||||
label="测评分"
|
||||
readonly
|
||||
></van-field>
|
||||
|
||||
<van-field v-if="item.isEvidence"
|
||||
v-model="item.options"
|
||||
name="意见或建议"
|
||||
label="意见或建议"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</div>
|
||||
<div >
|
||||
<van-field
|
||||
v-model="commentPeo.reviewResult"
|
||||
name="测评结果"
|
||||
label="测评结果"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="zbxx.scoringMode==2">
|
||||
<div v-for="o in zbxx.nrs">
|
||||
<div v-for="item in o.bzs">
|
||||
<div class="van-doc-card">
|
||||
<div style="font-size: 15px;color: black">
|
||||
{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-field name="radio" label="满意度" style="padding: 12px 2px;margin: 5px">
|
||||
<template #input>
|
||||
<van-radio-group style="margin-left: -20px" v-model="item.resultScore" disabled direction="horizontal">
|
||||
<van-radio name="满意">满意</van-radio>
|
||||
<van-radio name="基本满意">基本满意</van-radio>
|
||||
<van-radio name="不满意">不满意</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-doc-card">
|
||||
<van-field
|
||||
v-model="commentPeo.presidentOpinions"
|
||||
rows="2"
|
||||
readonly
|
||||
name="意见或建议"
|
||||
label="意见或建议"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="commentPeo.reviewResult"
|
||||
name="测评结果"
|
||||
label="测评结果"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wakeshome/review/appraisal/index">民主测评</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wakeshome/review/appraisal/mine">我的测评</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
pageForm: {
|
||||
annual:'',
|
||||
},
|
||||
descPopup: false,
|
||||
commentPeo: {},
|
||||
zbxx: {},
|
||||
activeNames: '',
|
||||
unionName: '${@shiro.getPrincipalProperty("union").getUnionname()}',
|
||||
yearOption:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/onLoad', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
async toCommentator(o) {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getBzById', {
|
||||
peoId: o.id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.commentPeo = resp.data.commentPeo;
|
||||
this.zbxx = resp.data.zbxx
|
||||
this.activeNames = this.zbxx.nrs[0].id
|
||||
this.descPopup = true
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "annual", this.yearOption[0].value)
|
||||
this.pageData()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -35,6 +35,9 @@ layout("/layouts/platform.html"){
|
||||
:highlight-current-row="true"
|
||||
:key="tableKey"
|
||||
:load="loadChild"
|
||||
:expand-row-keys="expandedRowKeysRenew"
|
||||
@expand-change="handleExpandChange"
|
||||
ref="tableData"
|
||||
lazy
|
||||
row-key="id"
|
||||
style="width: 100%">
|
||||
@@ -159,10 +162,10 @@ layout("/layouts/platform.html"){
|
||||
tabindex="7" type="text" v-model="formData.icon"></el-input>
|
||||
<span :class="formData.icon"></span>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作指南" prop="description">
|
||||
<!--<el-form-item label="操作指南" prop="description">
|
||||
<file-upload :files.sync="formData.description" :max="1" :type="['doc','docx','pdf']">
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="启用状态" prop="disabled">
|
||||
<el-switch
|
||||
active-color="#ff4949"
|
||||
@@ -402,7 +405,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存展开状态的数组
|
||||
expandedRowKeysRenew: [],
|
||||
tableTreeRefreshTool:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -543,7 +549,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'success'
|
||||
});
|
||||
self.addDialogVisible = false;
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -569,7 +575,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'success'
|
||||
});
|
||||
self.editMenuDialogVisible = false;
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -592,7 +598,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'success'
|
||||
});
|
||||
self.editDataDialogVisible = false;
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -606,15 +612,23 @@ layout("/layouts/platform.html"){
|
||||
initTreeTable: function () {
|
||||
var self = this;
|
||||
var url = base + "/platform/sys/menu/child";
|
||||
// 在更新数据前保存当前的展开状态
|
||||
$.post(url, {pid: "",menuName:this.menuName}, function (data) {
|
||||
if (data.code == 0) {
|
||||
if (data.code === 0) {
|
||||
self.tableData = data.data;
|
||||
self.tableKey = +new Date();
|
||||
// 恢复展开状态
|
||||
}
|
||||
}, "json");
|
||||
|
||||
},
|
||||
loadChild: function (tree, treeNode, resolve) {
|
||||
// 在之前声明的全局变量中,增加一个key为 本条数据的id,id可替换为你数据中的任意唯一值
|
||||
this.tableTreeRefreshTool[tree.id] = {}
|
||||
// 重要!保存resolve方法,以便后续使用
|
||||
this.tableTreeRefreshTool[tree.id].resolve = resolve
|
||||
// 记录展开次数,具体作用后续介绍
|
||||
this.tableTreeRefreshTool[tree.id].expandCount = 0
|
||||
var url = base + "/platform/sys/menu/child";
|
||||
$.post(url, {pid: tree.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
@@ -690,7 +704,7 @@ layout("/layouts/platform.html"){
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
// self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -702,8 +716,32 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleExpandChange(row, expanded) {
|
||||
if ((row.parentId === '' || row.parentId == null) && !expanded) {
|
||||
this.expandedRowKeysRenew = []
|
||||
return
|
||||
}
|
||||
if (expanded) {
|
||||
this.expandedRowKeysRenew.push(row.id)
|
||||
} else {
|
||||
const index = this.expandedRowKeysRenew.findIndex(v => v === row.id)
|
||||
this.expandedRowKeysRenew.splice(index, 1)
|
||||
}
|
||||
},
|
||||
loadChildByExpandedKeys() {
|
||||
if (this.expandedRowKeysRenew && this.expandedRowKeysRenew.length > 0) {
|
||||
this.expandedRowKeysRenew.forEach((v) => {
|
||||
const curr = this.tableTreeRefreshTool[v]
|
||||
// api请求
|
||||
$.get('/platform/sys/menu/child', {pid: v}).then(res => {
|
||||
curr.resolve(res.data)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.initTreeTable()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created: function () {
|
||||
this.initTreeTable();
|
||||
|
||||
@@ -0,0 +1,432 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<tree-layout style="height: calc(100vh - 70px)">
|
||||
<template #tree>
|
||||
|
||||
<div style="padding: 20px;">
|
||||
<el-input
|
||||
placeholder="输入关键字进行查找"
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<el-tree ref="tree" :data="treeData" class="v-tree" node-key="id"
|
||||
:props="defaultProps"
|
||||
default-expand-all :expand-on-click-node="false"
|
||||
@node-click="handleNodeClick" accordion
|
||||
highlight-current :filter-node-method="filterNode">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
|
||||
<div v-if="node.level==1" style="font-size: 16px;" class="v-node"><i
|
||||
class="el-icon-s-home"></i>
|
||||
{{ data.unionname }}
|
||||
</div>
|
||||
|
||||
<div v-if="node.level==2"
|
||||
style="font-size: 15px" :title="data.name" class="v-node">
|
||||
<i class="el-icon-star-on" v-if="checkData.name==data.name"></i>
|
||||
<i class="el-icon-star-off" v-else></i>
|
||||
{{ data.unionname }}
|
||||
<span style="color: #f76c6c">{{ '(' + data.revelCount + ')'}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tree>
|
||||
</template>
|
||||
<template>
|
||||
<el-card shadow="never" style="margin: 0 10px">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
placeholder="选择年度" style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-input style="width: 250px;" placeholder="请输入类型名称查询" v-model="pageForm.revelName"></el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable v-model="pageForm.typeId" filterable placeholder="请选择资料类型">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-button type="primary" @click="doSearch" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button type="primary" size="medium" @click="openAdd"><i
|
||||
class="ti-plus"></i> 添加资料
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" style="margin:10px 10px 0 10px">
|
||||
<vi-title2 title="资料列表"></vi-title2>
|
||||
<el-table :data="tableData" @sort-change='pageOrder' height="626">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="revelName" label="资料名称"></el-table-column>
|
||||
<el-table-column sortable prop="typeName" label="资料类型"></el-table-column>
|
||||
<el-table-column sortable prop="username" label="上传人"></el-table-column>
|
||||
<el-table-column sortable prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column sortable prop="time" label="上传时间"></el-table-column>
|
||||
<el-table-column prop="userOnline" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span
|
||||
class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
预览
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="(${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})"
|
||||
:command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="(${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})"
|
||||
:command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</tree-layout>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新建资料" :visible.sync="addDialogVisible">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="上传人">
|
||||
<el-input readonly value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="revelName" label="资料名称">
|
||||
<el-input placeholder="请填写工作资料名称" v-model="formData.revelName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId" label="资料类型">
|
||||
<el-select v-model="formData.typeId" placeholder="选择资料类型" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="附件上传">
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="编辑资料" :visible.sync="editDialogVisible">
|
||||
<el-form :model="formData" ref="editForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="上传人">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="revelName" label="资料名称">
|
||||
<el-input placeholder="请填写工作资料名称" v-model="formData.revelName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId" label="资料类型">
|
||||
<el-select v-model="formData.typeId" placeholder="选择资料类型" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="附件上传">
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="资料阅览" :visible.sync="viewDialogVisible">
|
||||
<el-descriptions class="margin-top" title="" :column="2" border>
|
||||
<el-descriptions-item span="2">
|
||||
<template slot="label">资料名称</template>
|
||||
<div v-html="formData.revelName"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">上传人</template>
|
||||
<div v-html="formData.username"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">上传时间</template>
|
||||
<div v-html="formData.time"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">所属工会</template>
|
||||
<div v-html="formData.unionName"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">资料类型</template>
|
||||
<div v-html="formData.typeName"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2">
|
||||
<template slot="label">附件</template>
|
||||
<div>
|
||||
<file-upload :files.sync="formData.files" view></file-upload>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="viewDialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: "#app",
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'tree-layout': httpVueLoader('/components/plugins/TreeLayout.vue'),
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
filterText: '',
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
label: 'unionname',
|
||||
},
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
viewDialogVisible: false,
|
||||
tableData: [],
|
||||
jdhList: [],
|
||||
typeList: [],
|
||||
fileList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
},
|
||||
formData: {},
|
||||
rules: {
|
||||
revelName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
typeId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
delFiles: [],
|
||||
unionOptions: [],
|
||||
checkData: {},
|
||||
checkNode: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async handleNodeClick(data, node) {
|
||||
this.checkData = data
|
||||
this.checkNode = node
|
||||
await this.pageData()
|
||||
},
|
||||
filterNode(value, data, node) {
|
||||
if (!value) return true;
|
||||
return data.unionname.indexOf(value) !== -1
|
||||
},
|
||||
openView(row) {
|
||||
const formData = clone(row)
|
||||
formData.files = JSON.parse(formData.files || "[]")
|
||||
this.formData = formData
|
||||
this.viewDialogVisible = true
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'audit') {
|
||||
this.doAudit(data.id)
|
||||
}
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
const resp = await $.get(loc() + '/doDelete', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs.editForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post('/platform/wakeshome/data/revel/doEdit', formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.loadTree()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop
|
||||
this.pageForm.pageOrderBy = column.order
|
||||
this.pageData()
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
this.pageForm.unionId = this.checkData.id
|
||||
const resp = await $.post('/platform/wakeshome/data/revel/pageData', this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
},
|
||||
openEdit(obj) {
|
||||
if (this.$refs["editForm"])
|
||||
this.$refs["editForm"].resetFields()
|
||||
const formData = clone(obj)
|
||||
formData.files = JSON.parse(formData.files || "[]")
|
||||
formData.ispass = formData.ispass === 1
|
||||
this.formData = formData
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
openAdd() {
|
||||
if (this.$refs["addForm"])
|
||||
this.$refs["addForm"].resetFields()
|
||||
this.formData = {files: []}
|
||||
this.addDialogVisible = true
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs.addForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post('/platform/wakeshome/data/revel/doAdd', formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.addDialogVisible = false
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async loadTree() {
|
||||
const res = await $.post('/platform/wakeshome/data/revel/getTreeData', this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.treeData = res.data
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (isAdmin) {
|
||||
const data = res.data[0].children && res.data[0].children.length > 0 ? {id: res.data[0].children[0].id} : {id: ''}
|
||||
await this.handleNodeClick({data}, {level: 2})
|
||||
} else {
|
||||
const data = res.data[0].children && res.data[0].children.length > 0 ? {id: res.data[0].children[0].id} : {id: ''}
|
||||
await this.handleNodeClick(data, {level: 2})
|
||||
}
|
||||
}
|
||||
},
|
||||
async getAllWakesHomeDataType() {
|
||||
const resp = await $.post('/platform/wakeshome/data/type/getAllWakesHomeDataType')
|
||||
if (resp.code === 0) {
|
||||
this.typeList = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getAllWakesHomeDataType()
|
||||
this.loadTree()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,217 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">类型名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.typeName" placeholder="请输入类型名称" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="类型列表" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" size="small" @click="openAdd"><i class="ti-plus"></i> 新增工作资料类型
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading"
|
||||
:size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="资料类型编码" prop="code"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="资料类型名称" prop="typeName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span
|
||||
class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'top',data:scope.row}"
|
||||
v-if="scope.row.serialNum!==1">
|
||||
上移
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'bottom',data:scope.row}"
|
||||
v-if="scope.row.serialNum!==pageForm.totalCount">
|
||||
下移
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新增工作资料类型" :visible.sync="addDialogVisible" width="40%">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules">
|
||||
<el-form-item prop="code" label="类型编码">
|
||||
<el-input v-model="formData.code" placeholder="请输入工作资料类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeName" label="类型名称">
|
||||
<el-input v-model="formData.typeName" placeholder="请输入工作资料类型名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="编辑工作资料类型" :visible.sync="editDialogVisible" width="40%">
|
||||
<el-form :model="formData" ref="editForm" :rules="rules">
|
||||
<el-form-item prop="code" label="类型编码">
|
||||
<el-input v-model="formData.code" placeholder="请输入工作资料类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeName" label="类型名称">
|
||||
<el-input v-model="formData.typeName" placeholder="请输入工作资料类型名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
typeName: ''
|
||||
},
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
formData: {},
|
||||
rules: {
|
||||
typeName: [{required: true, message: '请输入工作资料类型名称', trigger: ['change', 'blur']}],
|
||||
code: [{required: true, message: '请输入工作资料类型编码', trigger: ['change', 'blur']}]
|
||||
},
|
||||
tableData: []
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'top') {
|
||||
this.rowChange(data, false)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'bottom') {
|
||||
this.rowChange(data, true)
|
||||
}
|
||||
},
|
||||
async rowChange(row, toDown) {
|
||||
const resp = await $.post('/platform/wakeshome/data/type/serialNumChange', {
|
||||
id: row.id,
|
||||
serialNum: row.serialNum,
|
||||
toDown
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.formData = {}
|
||||
this.addDialogVisible = true
|
||||
if (this.$refs["addForm"])
|
||||
this.$refs["addForm"].resetFields()
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs['addForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const resp = await $.post('/platform/wakeshome/data/type/doAdd', this.formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.addDialogVisible = false
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(obj) {
|
||||
this.formData = JSON.parse(JSON.stringify(obj))
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs['editForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post('/platform/wakeshome/data/type/doEdit', this.formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('此操作将删除工作资料类型,确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/wakeshome/data/type/doDelete', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,156 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-form .el-select, .el-form .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{id?'信息编辑':'信息填写'}}
|
||||
</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
<vi-title title="职工建家申报信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报人" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报人工号" prop="loginName">
|
||||
<el-input readonly v-model="formData.loginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报单位" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报时间" prop="applyTime">
|
||||
<el-input readonly v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基层工会简况" prop="basicInformation">
|
||||
<el-input type="textarea" v-model="formData.basicInformation" maxlength="500" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="职工建家建设方案"></vi-title>
|
||||
<el-form-item prop="constructionPlan">
|
||||
<text-editor v-model="formData.constructionPlan"></text-editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" justify="center" type="flex">
|
||||
<el-button @click="doSave()" style="width: 200px" type="primary">保 存</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 200px" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data:{
|
||||
id: '',
|
||||
formData: {},
|
||||
formRules: {
|
||||
mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur' }],
|
||||
basicInformation: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
constructionPlan: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
async doSave(){
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSave',this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
},
|
||||
async doSubmit(){
|
||||
try {
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (valid) {
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSubmit',this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
},
|
||||
async initFormData() {
|
||||
if (!this.id) {
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'loginName', "${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
} else {
|
||||
const resp = await $.get('/platform/wakeshome/mine/getInfoById',{id:this.id})
|
||||
if (resp.code === 0){
|
||||
this.formData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
this.id = GetQueryString("id")
|
||||
this.initFormData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,170 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报列表" :app="this">
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="280px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" v-if="!['10000'].includes(row.state) && row.state"
|
||||
size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<el-button @click="openView(row)" v-if="['10030'].includes(row.state) && row.state"
|
||||
size="mini" type="primary">申报表导出
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" v-if="['10000'].includes(row.state) || !row.state"
|
||||
size="mini" type="primary">编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)" v-if="['10000'].includes(row.state) || !row.state"
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
v-if="!['10000'].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})"
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
async doDelete(row) {
|
||||
this.$confirm('确定删除该申报记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.get(loc() + '/doDelete', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
window.location.href = '/platform/wakeshome/declaration/apply?id=' + row.id;
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,241 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="['10010'].includes(row.state) || !row.state"
|
||||
size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button @click="doRollBack(row.id)"
|
||||
v-if="['10015','10020'].includes(row.state) || !row.state" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info-apply ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="基层党组织审核" name="organizationAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="审核签字">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = row
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'organizationAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.$message.success(resp.msg)
|
||||
}else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="['10020'].includes(row.state) || !row.state"
|
||||
size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button @click="doRollBack(row.id)"
|
||||
v-if="['10025','10030'].includes(row.state) || !row.state" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info-apply ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="审核签字">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = row
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'schoolAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.$message.success(resp.msg)
|
||||
}else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,340 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-form .el-select, .el-form .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{id?'信息编辑':'信息填写'}}
|
||||
</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="100px" ref="AddForm">
|
||||
<!-- <el-divider content-position="left">职工之家申请信息</el-divider>-->
|
||||
<vi-title title="职工之家申请信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报人" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报时间" prop="applyTime">
|
||||
<el-input readonly v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报类别" prop="category">
|
||||
<el-radio-group v-model="formData.category" size="small" @change="doChangeCategory">
|
||||
<el-radio label="校工会" border></el-radio>
|
||||
<el-radio label="分工会" border></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报单位" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家详细信息</el-divider>-->
|
||||
<vi-title title="职工之家详细信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="创办时间" prop="foundTime">
|
||||
<el-date-picker
|
||||
v-model="formData.foundTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创办日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="单位位置" prop="position">
|
||||
<el-input placeholder="请填写单位位置" v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="单位面积" prop="area">
|
||||
<el-input placeholder="请填写单位面积" v-model="formData.area"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item label="单位信息" prop="details">
|
||||
<el-input type="textarea" :rows="4"
|
||||
placeholder="请填写单位信息"
|
||||
v-model="formData.details"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家荣誉信息</el-divider>-->
|
||||
<vi-title title="职工之家荣誉信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item class="is-required" label="获奖情况" prop="payStandard">
|
||||
<el-button
|
||||
@click="formData.awardInfo.push({awardTime:'',awardUnit:'',awardName:'',awardPic:''})"
|
||||
icon="el-icon-plus" size="mini"
|
||||
style="float: right;margin-bottom: 10px">
|
||||
添加
|
||||
</el-button>
|
||||
<span style="color: red">说明:各奖项图片只能上传一张。</span>
|
||||
<el-table
|
||||
:data="formData.awardInfo"
|
||||
border
|
||||
v-fit-columns
|
||||
size="mini"
|
||||
style="width: 100%">
|
||||
<el-table-column label="获奖日期" prop="awardTime">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'awardInfo.'+$index+'.awardTime'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-date-picker
|
||||
v-model="row.awardTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择获奖日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖单位" prop="awardUnit">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'awardInfo.'+$index+'.awardUnit'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="100" placeholder="请输入获奖单位"
|
||||
v-model="row.awardUnit"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项名称" prop="awardName">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-input clearable maxlength="100" placeholder="请输入奖项名称"
|
||||
v-model="row.awardName"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项照片" prop="awardPic">
|
||||
<template scope="{row,$index}">
|
||||
<image-upload :limit="1" v-model="row.awardPic"></image-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.awardInfo.length<=1"
|
||||
@click="formData.awardInfo.splice(scope.$index,1)" circle
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家材料上传</el-divider>-->
|
||||
<vi-title title="职工之家材料上传"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item required label="图片上传" prop="picFiles">
|
||||
<file-upload :files.sync="formData.picFiles" card :max="10"
|
||||
:type="['jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">请上传jpg、png、jpeg格式的图片,最多不超过10张</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item required label="附件上传" prop="files">
|
||||
<file-upload :files.sync="formData.files" card :max="10"
|
||||
:type="['doc','docx','xls','xlsx','pdf','ppt','mp4', 'jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">可上传照片、视频、文档等资料,视频只能上传MP4格式</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" v-if="disabled" justify="center" type="flex">
|
||||
<el-button @click="doSave()" style="width: 300px" type="primary">保 存
|
||||
</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 300px" type="primary">提 交
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
formRules: {
|
||||
position: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
picFiles: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
formData: {
|
||||
category: '分工会',
|
||||
awardInfo: [{awardTime: '', awardUnit: '', awardName: '', awardPic: ''}]
|
||||
},
|
||||
disabled: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSave() {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = '/platform/wakeshome/apply/doEdit'
|
||||
} else {
|
||||
postUrl = '/platform/wakeshome/apply/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = false;
|
||||
const resp = await $.post(postUrl, formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
const valid = await this.$refs['AddForm'].validate()
|
||||
if (valid) {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = '/platform/wakeshome/apply/doEdit'
|
||||
} else {
|
||||
postUrl = '/platform/wakeshome/apply/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = true
|
||||
const resp = await $.post(postUrl, formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
doChangeCategory() {
|
||||
if (this.formData.category === '校工会') {
|
||||
this.formData.unionName = '校工会'
|
||||
this.formData.unionId = null
|
||||
} else {
|
||||
this.formData.unionName = "${@shiro.getPrincipalProperty('union').getUnionname()}"
|
||||
this.formData.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
},
|
||||
async initFormData() {
|
||||
if (!this.id) {
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
} else {
|
||||
const resp = await $.get('/platform/wakeshome/mine/getInfoById',{id:this.id})
|
||||
if (resp.code === 0){
|
||||
this.formData = {...resp.data}
|
||||
}
|
||||
}
|
||||
},
|
||||
doJsonStr(data) {
|
||||
const formData = clone(data)
|
||||
formData.awardInfo = JSON.stringify(this.formData.awardInfo)
|
||||
formData.picFiles = JSON.stringify(this.formData.picFiles)
|
||||
formData.files = JSON.stringify(this.formData.files)
|
||||
return formData;
|
||||
},
|
||||
async validateApply(){
|
||||
const resp = await $.get(loc() + '/validateApply')
|
||||
if (resp.code === 0) {
|
||||
this.disabled = true
|
||||
} else {
|
||||
this.disabled = false
|
||||
this.$confirm('未获取到单位的建家申报记录,是否前往申报?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply')
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.initFormData()
|
||||
await this.validateApply()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,235 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-row .el-card {
|
||||
min-width: 100%;
|
||||
height: 100%;
|
||||
margin-right: 20px;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: -3px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
.header {
|
||||
min-height: 20px;
|
||||
position: relative;
|
||||
|
||||
.label {
|
||||
padding: 1px 6px;
|
||||
background-color: #fdf0da;
|
||||
font-size: 15px;
|
||||
color: #f19901;
|
||||
}
|
||||
|
||||
.header-label {
|
||||
padding: 1px 6px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.card-header-tag-blue {
|
||||
position: absolute;
|
||||
width: 68px;
|
||||
height: 30px;
|
||||
top: -14px;
|
||||
right: -15px;
|
||||
/*background-image: url("~@/assets/images/img_dpj_t.png");*/
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.card-header-tag-green {
|
||||
position: absolute;
|
||||
width: 68px;
|
||||
height: 30px;
|
||||
top: -14px;
|
||||
right: -15px;
|
||||
/*background-image: url("~@/assets/images/img_ypj_t.png");*/
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 18px !important;
|
||||
background-color: rgb(245, 247, 251);
|
||||
display: flex;
|
||||
height: 50px;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.card-label {
|
||||
color: rgb(197, 197, 197);
|
||||
margin-right: 8px;
|
||||
width: 70px;
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="展示列表" :app="this">
|
||||
<template #func>
|
||||
<!--<el-button type="primary" size="small">添加信息</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-row :gutter="20" style="margin-right: 15px;margin-left: -5px" type="flex" v-loading="loading">
|
||||
<el-col v-for="(item, index) in tableData" :key="index" :span="6" style="margin-top: 10px">
|
||||
<el-card class="box-card" shadow="always" :body-style="{ padding: '0px' }">
|
||||
<div slot="header" class="header">
|
||||
<span class="label">{{item.unionName}}</span>
|
||||
<div style="display:flex; align-items: center;color: #cccccc;margin-left: 20px">|</div>
|
||||
<el-tooltip class="item" effect="dark" :content="item.position" placement="top-start">
|
||||
<span class="header-label">位置:{{item.position}}</span>
|
||||
</el-tooltip>
|
||||
<!--<span class="header-label"></span>-->
|
||||
</div>
|
||||
<div style="margin: 15px">
|
||||
<div>
|
||||
<el-carousel height="150px">
|
||||
<el-carousel-item v-for="o in item.picFiles" :key="item">
|
||||
<el-image @click="PREVIEW_IMAGE(o.filepath)"
|
||||
:src="CREATE_PREVIEW_URL(o.filepath)"
|
||||
style="width: 100%;height: 100%"></el-image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span style="color: #18c8bd;font-size: 14px">面积:{{item.area}}(㎡)</span>
|
||||
<div style="display:flex; align-items: center;color: #cccccc;margin: 0 10px">|</div>
|
||||
<span style="color: #18c8bd;font-size: 14px">申报日期:{{item.applyTime}}</span>
|
||||
</div>
|
||||
<div style="display:flex; align-items: center;color: #cccccc">|</div>
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-button type="text"
|
||||
:style="item.status === '2' ? 'color: #18c8bd' : 'color: rgb(34, 125, 251)'"
|
||||
style="color: #18c8bd"></el-button>
|
||||
<el-button type="text" style="color: #18c8bd;" @click="openView(item.id)">查看
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
unions: [],
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.tableData.forEach(item => {
|
||||
item.picFiles = JSON.parse(item.picFiles)
|
||||
})
|
||||
}
|
||||
},
|
||||
flushUnits() {
|
||||
},
|
||||
|
||||
},
|
||||
components: {
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.unions.unshift({id: '校工会', unionname: '校工会'})
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,151 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报列表" :app="this">
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" v-if="![8100].includes(row.state) && row.state" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row)" v-if="[8100].includes(row.state) || !row.state" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row)" v-if="[8100].includes(row.state) || !row.state" size="mini" type="danger">删除</el-button>
|
||||
<el-button @click="doDelete(row)" v-if="![8100].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins:[initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'position', label: '地址', sortable: true},
|
||||
{prop: 'area', label: '面积', sortable: true},
|
||||
{prop: 'foundTime', label: '创立时间', sortable: true},
|
||||
{prop: 'applyTime', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '状态', sortable: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
methods:{
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
async doDelete(row){
|
||||
const resp = await $.get(loc() + '/doRemove',{id:row.id})
|
||||
if (resp.code === 0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
openEdit(row){
|
||||
window.location.href = '/platform/wakeshome/apply?id=' + row.id;
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
this.unions.unshift({id:'校工会',unionname:'校工会'})
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,242 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" v-if="![8120].includes(row.state) && row.state" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="[8120].includes(row.state) || !row.state" size="mini" type="primary">审核</el-button>
|
||||
<el-button @click="doRollBack(row.id)" v-if="[8125,8130].includes(row.state) || !row.state" size="mini" type="danger">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="auditSign" label="审核签字">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(0)">
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(1)">
|
||||
通过
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins:[initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'position', label: '地址', sortable: true},
|
||||
{prop: 'area', label: '面积', sortable: true},
|
||||
{prop: 'foundTime', label: '创立时间', sortable: true},
|
||||
{prop: 'applyTime', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
methods:{
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'schoolAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.notifySuccess(resp.msg)
|
||||
}else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.unions.unshift({id:'校工会',unionname:'校工会'})
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,318 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
height: calc(100vh - 100px) !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">评议名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.assessment" placeholder="根据测评名称查询"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="项目列表" :app="this">
|
||||
<template #func>
|
||||
<!--<el-button type="primary" size="small">添加信息</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center" width="300px"
|
||||
sortable align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center"
|
||||
show-overflow-tooltipalign="center"></el-table-column>
|
||||
|
||||
<el-table-column label="评测模式" prop="assessmentMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.assessmentMode===1?'工会评家':'主席/副主席评家'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打分模式" prop="scoringMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.scoringMode===1?'评分模式':'选择模式'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openView(scope.row.id)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="doReview(scope.row)">
|
||||
去评测
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" style="float: right;margin-top: 5px;margin-left: 10px;" @click="doSaveOrSubmit('submit')">提交</el-button>
|
||||
<!-- <el-button type="primary" plain style="float: right;margin-top: 5px" @click="doSaveOrSubmit('save')">保存</el-button>-->
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" ref="form" label-width="100px"
|
||||
style="height: calc(100vh - 50px);overflow-y: scroll;padding: 10px 15px">
|
||||
|
||||
<vi-title title="评议内容"></vi-title>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="o,idx in formData.nrs" :key="nr.id">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="o.content" readonly maxlength="30" style="width: 50%">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="o.bzs" style="width: 100%" border show-summary
|
||||
:summary-method="getSummaries">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核标准" disabled prop="inspection" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.inspection"
|
||||
readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template v-if="formData.scoringMode===1">
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="250px">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.resultScore" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评议分" prop="resultScore" header-align="center"
|
||||
align="center" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.resultScore" maxlength="4" @blur="changeScore(row)"
|
||||
placeholder="请填写评议分"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.scoringMode===2">
|
||||
<el-table-column label="满意度" prop="resultScore" header-align="center"
|
||||
align="center" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-radio-group v-model="row.resultScore" size="small">
|
||||
<el-radio label="满意">满意</el-radio>
|
||||
<el-radio label="基本满意">基本满意</el-radio>
|
||||
<el-radio label="不满意">不满意</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
|
||||
v-model="o.remark" placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="formData.scoringMode===2">
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
|
||||
v-model="presidentOpinions" placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.reviewMode===1">
|
||||
<el-form-item label="职工评家总结" prop="files">
|
||||
<file-upload :files.sync="formData.files" card :max="3"
|
||||
:type="['doc','docx','xls','xlsx','pdf', 'jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式,最多上传3个文件
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabLoading: false,
|
||||
loading: true,
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
formData: {},
|
||||
viewData: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
presidentOpinions:'',
|
||||
isShowSubmit: true,
|
||||
isReadOnly: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
changeScore(row) {
|
||||
if (Number(row.score) < Number(row.resultScore)) {
|
||||
row.resultScore = null;
|
||||
this.$message.warning('评议分不能超过标准分');
|
||||
}
|
||||
},
|
||||
async doReview(o){
|
||||
//自评模式
|
||||
if (o.reviewMode == 1 && !o.canJoin) {
|
||||
this.$message.warning('您不在自评人员范围中');
|
||||
return
|
||||
}
|
||||
|
||||
const isExist = await getScopeUser(o.activityGroupId)
|
||||
if ((o.commentTarget == 1 && !isExist) || (o.commentTarget == 3 && !o.canJoin)) {
|
||||
this.$message.warning('您不在自评人员范围中');
|
||||
return
|
||||
}
|
||||
|
||||
const res = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
||||
if (res.data > 0){
|
||||
this.$message.warning('您已经填写过该评议,请点击评议结果可查看评议详情')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getById',{id:o.id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
if (this.formData.assessmentMode === 2) {
|
||||
this.formData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
o.resultScore = '满意'
|
||||
})
|
||||
})
|
||||
await this.getPresidents()
|
||||
}
|
||||
}
|
||||
},
|
||||
async getPresidents(){
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getPresidents')
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.forEach(v => {
|
||||
this.presidentList.push({value: v.id, text: v.presidents})
|
||||
})
|
||||
}
|
||||
this.president = this.presidentList[0].value
|
||||
await this.presidentChange();
|
||||
},
|
||||
async presidentChange() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess', {
|
||||
id: this.id,
|
||||
evaluatedPersonId: this.president,
|
||||
})
|
||||
if (resp.data > 0) {
|
||||
this.$message.warning('您已经评测过该主席(副主席),请在点击评议结果可查看评议信息,或更换主席(副主席)进行测评')
|
||||
this.isShowSubmit = true;
|
||||
this.isReadOnly = true
|
||||
}
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.loading = true;
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code === 0) {
|
||||
this.viewData = data
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,202 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input v-model="pageForm.assessment" placeholder="根据测评名称查询"></el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center" width="300px"
|
||||
sortable align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center"
|
||||
show-overflow-tooltipalign="center"></el-table-column>
|
||||
|
||||
<el-table-column label="评测模式" prop="assessmentMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.assessmentMode===1?'工会评家':'主席/副主席评家'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打分模式" prop="scoringMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.scoringMode===1?'评分模式':'选择模式'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openView(scope.row.id)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="openEdit(scope.row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(scope.row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
<template #edit_func>
|
||||
<el-button type="primary" style="float: right;margin-top: 5px"
|
||||
@click="doEdit()">提交
|
||||
</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<union-comment-zb :data="formData" @change="v=>{this.formData=v}"></union-comment-zb>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
|
||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabLoading: false,
|
||||
loading: true,
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
formData: {},
|
||||
viewData: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async openEdit(id) {
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code === 0) {
|
||||
this.formData = data
|
||||
if (this.formData.startTime && this.formData.endTime) {
|
||||
this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
},
|
||||
doEdit() {
|
||||
$.post(loc() + "/doEdit", {kh_zb: JSON.stringify(this.formData)}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
},
|
||||
)
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('您确定要删除吗!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
$.post(loc() + "/delete", {id: id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.loading = true;
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code == 0) {
|
||||
this.viewData = data
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,413 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
@change="getZbList"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">评测名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.zbId" placeholder="请选择评测名称" filterable
|
||||
clearable
|
||||
@change="doSearch();zbData = zbList.find(v => v.id === pageForm.zbId)"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
||||
@change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="工会列表" :app="this">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading" ref="table" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:label="column.label"
|
||||
:prop="column.prop" :width="column.width" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
|
||||
width="100px"
|
||||
fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button plain size="mini" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工号/姓名:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入工号/姓名" v-model="userPageForm.searchKeyword">
|
||||
<template slot="prepend">姓名/工号</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-option">
|
||||
<el-radio-group v-model="userPageForm.reviewResult"
|
||||
@change="doUserSearch">
|
||||
<el-radio-button label="">
|
||||
全部
|
||||
<span class="ml2">
|
||||
{{reviewResultData.bmy+reviewResultData.jbmy+reviewResultData.my}}
|
||||
</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="满意">满意
|
||||
<span class="ml2">{{reviewResultData.my}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="基本满意">基本满意
|
||||
<span class="ml2">{{reviewResultData.jbmy}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="不满意">不满意
|
||||
<span class="ml2">{{reviewResultData.bmy}}</span>
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doUserSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
|
||||
|
||||
<el-table :data="userTableData" style="width: 100%" row-key="id"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading" ref="table" class="vi-table">
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in userTableColumns"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:label="column.label"
|
||||
:prop="column.prop" :width="column.width" min-width="100px">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="evaluatedPersonName" align="center" show-overflow-tooltip
|
||||
label="被测评人" v-if="zbData.assessmentMode==2"></el-table-column>
|
||||
<el-table-column prop="presidentOpinions" align="center" show-overflow-tooltip
|
||||
label="意见建议" v-if="zbData.assessmentMode==2"></el-table-column>
|
||||
<el-table-column prop="reviewTime" align="center"
|
||||
label="测评时间"></el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="100px"
|
||||
fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button plain size="mini" @click="openUserView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userPageForm.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="userPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="userPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
<el-drawer
|
||||
title=""
|
||||
size="60%"
|
||||
:visible.sync="userDrawer"
|
||||
direction="rtl">
|
||||
|
||||
<el-form class="el_form" label-width="120px">
|
||||
|
||||
|
||||
<el-row gutter="20">
|
||||
|
||||
<el-col :span="12" v-if="zpxx.zbxx.assessmentMode===2">
|
||||
<el-form-item prop="evaluatedPersonName" label="被测评人姓名">
|
||||
{{zpxx.commentPeo.evaluatedPersonName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="zpxx.zbxx.assessmentMode===2">
|
||||
<el-form-item prop="evaluatedPersonName" label="现任职务">
|
||||
{{zpxx.commentPeo.evaluatedPersonName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="evaluatedPersonName" label="测评结果">
|
||||
{{zpxx.commentPeo.reviewResult}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="zpxx.zbxx.assessmentMode===2">
|
||||
<el-form-item prop="presidentOpinions" label="意见建议">
|
||||
{{zpxx.commentPeo.presidentOpinions}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
<vi-title2 title="测评内容"></vi-title2>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="(nr,idx) in zpxx.zbxx.nrs">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" disabled maxlength="30"
|
||||
style="width: 50%"
|
||||
placeholder="请填写测评内容">
|
||||
<template slot="prepend">
|
||||
<span v-model="nr.contentNumber">{{ nr.contentNumber = idx + 1 }}</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border
|
||||
size="small">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="100px">
|
||||
<template scope="{$index,row}">
|
||||
{{ row.contentNumber = $index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="测评标准" prop="inspection" header-align="center"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准分" prop="score" header-align="center"
|
||||
align="center"
|
||||
width="100px" v-if="zpxx.zbxx.scoringMode===1">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="评分" prop="resultScore" header-align="center"
|
||||
align="center"
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="意见建议" prop="options" header-align="center"
|
||||
align="center"
|
||||
width="100px" v-if="zpxx.zbxx.scoringMode===1">
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt10 mb10"
|
||||
style="border-top: 1px dashed rgb(229, 225, 225)"></el-row>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
</el-drawer>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
userDrawer: false,
|
||||
zbData: {},
|
||||
zpxx: {
|
||||
commentPeo: {},
|
||||
zbxx: []
|
||||
},
|
||||
unions: [],
|
||||
zbList: [],
|
||||
pageForm: {
|
||||
annual: new Date().getFullYear() + ''
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '分工会名称'},
|
||||
{prop: 'num', label: '测评人数'},
|
||||
],
|
||||
tableData: [],
|
||||
userTableData: [],
|
||||
userTableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'reviewResult', label: '测评结果'},
|
||||
],
|
||||
userPageForm: {
|
||||
reviewResult: "",
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
reviewResultData: {}
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
async getReviewResultNum(row) {
|
||||
const res = await $.post(loc() + "/getReviewResultNum", {
|
||||
zbId: this.userPageForm.zbId,
|
||||
unionId: row.id
|
||||
})
|
||||
this.reviewResultData = res.data
|
||||
},
|
||||
async openUserView(row) {
|
||||
const res = await $.post(loc() + "/getBzById", {peoId: row.id})
|
||||
this.zpxx = res.data
|
||||
this.userDrawer = true
|
||||
},
|
||||
doUserSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.userPageForm.pageNumber = 1
|
||||
this.userPageData()
|
||||
},
|
||||
userPageNumberChange(val) {
|
||||
this.userPageForm.pageNumber = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageSizeChange(val) {
|
||||
this.userPageForm.pageSize = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(loc() + "/getUserPeoByZbIdOrUnionId", this.userPageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code == 0) {
|
||||
this.userTableData = data.data.list;
|
||||
this.userPageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async openView(row) {
|
||||
this.userPageForm.searchKeyword = ''
|
||||
this.userPageForm.unionId = row.id
|
||||
this.userPageForm.zbId = this.pageForm.zbId
|
||||
this.userPageData()
|
||||
await this.getReviewResultNum(row)
|
||||
this.$refs.guava.view()
|
||||
|
||||
},
|
||||
async getZbList() {
|
||||
const res = await $.get("/platform/unionComment/Xjkhzb/getZbList", {year: this.pageForm.annual})
|
||||
this.zbList = res.data
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "zbId", res.data[0].id)
|
||||
|
||||
} else {
|
||||
this.$set(this.pageForm, "zbId", null)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
await this.getZbList()
|
||||
this.unions = await getUnions(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.el-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<div>
|
||||
<h3 style="color: #1867b0">新建考核指标</h3>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="doAdd()">
|
||||
提交
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template>
|
||||
<union-comment-zb ref="unionZb" :data="formData" @change="v=>{this.formData=v}"></union-comment-zb>
|
||||
</template>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
v: 'index',
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async doAdd() {
|
||||
const {
|
||||
annual,
|
||||
assessment,
|
||||
assessmentMode,
|
||||
scoringMode,
|
||||
commentTarget,
|
||||
activityGroupId
|
||||
} = this.formData
|
||||
let flag = true
|
||||
if (!annual) {
|
||||
this.$message.warning("年度不能为空")
|
||||
return
|
||||
}
|
||||
if (!assessment) {
|
||||
this.$message.warning("测评名称不能为空")
|
||||
return
|
||||
}
|
||||
if (!scoringMode) {
|
||||
this.$message.warning("打分模式不能为空")
|
||||
return
|
||||
}
|
||||
if (!assessmentMode) {
|
||||
this.$message.warning("评测模式不能为空")
|
||||
return
|
||||
}
|
||||
if (!commentTarget) {
|
||||
this.$message.warning("测评对象不能为空")
|
||||
return
|
||||
}
|
||||
if (commentTarget == 1 && !activityGroupId) {
|
||||
this.$message.warning("发送人员范围不能为空")
|
||||
return
|
||||
}
|
||||
this.formData.nrs.forEach(nr => {
|
||||
nr.bzs.forEach(bz => {
|
||||
if (!nr.content) {
|
||||
this.$message.error("测评内容不能为空")
|
||||
flag = false;
|
||||
throw Error()
|
||||
} else if (!bz.inspection) {
|
||||
this.$message.error("测评标准不能为空")
|
||||
flag = false;
|
||||
throw Error()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (!(this.formData.applyTime && this.formData.applyTime.length > 0)) {
|
||||
this.$message.warning('评议时间不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.commentTarget == 3 && !(this.formData.unionIds && this.formData.unionIds.length > 0)) {
|
||||
this.$message.warning('请选择评议分工会')
|
||||
return
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
if (this.formData.applyTime && this.formData.applyTime.length > 0) {
|
||||
this.formData.startTime = this.formData.applyTime[0]
|
||||
this.formData.endTime = this.formData.applyTime[1]
|
||||
}
|
||||
|
||||
const res = await $.post(loc() + "/doAdd", {kh_zb: JSON.stringify(this.formData)})
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "nrs", [{bzs: [{}]}])
|
||||
this.$set(this.formData, "annual", null)
|
||||
this.$set(this.formData, "assessment", null)
|
||||
this.$set(this.formData, "assessmentMode", null)
|
||||
this.$set(this.formData, "workersNum", null)
|
||||
this.$set(this.formData, "scoringMode", null)
|
||||
this.$set(this.formData, "activityGroupId", null)
|
||||
this.$set(this.formData, "commentTarget", null)
|
||||
this.$set(this.formData, "zbId", null)
|
||||
this.$set(this.formData, "applyTime", undefined)
|
||||
this.$message.success(res.msg);
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user