Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -225,4 +225,13 @@ public interface Roles {
|
|||||||
*/
|
*/
|
||||||
String JDH_DB2 = "05e7a279f4274a1eb3a81adb5f8c2454";
|
String JDH_DB2 = "05e7a279f4274a1eb3a81adb5f8c2454";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位书记
|
||||||
|
*/
|
||||||
|
String GH03 = "428969eb99ff4b76883d83f847ee96a5";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工会组组长
|
||||||
|
*/
|
||||||
|
String ghxzzz = "308dfe9096f44a64a67b4714f67dcd96";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package io.v.nutz.sys.models;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*
|
||||||
|
* @Author zhf
|
||||||
|
* @Date 2022/12/25 10:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Table
|
||||||
|
public class SysUnionGroup {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@Prev(els = {@EL("uuid()")})
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("小组名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("小组编码")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String groupCode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属工会")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
package io.v.nutz.sys.models;
|
package io.v.nutz.sys.models;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
@Table("sys_user_role")
|
@Table("sys_user_role")
|
||||||
public class Sys_user_role implements Serializable {
|
public class Sys_user_role implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -43,6 +45,21 @@ public class Sys_user_role implements Serializable {
|
|||||||
@Comment("工会id")
|
@Comment("工会id")
|
||||||
private String unionid;
|
private String unionid;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("工会小组id")
|
||||||
|
private String unionGroupId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("代表小组id")
|
||||||
|
private String groupId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("离退办小组id")
|
||||||
|
private String ltbGroupId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@Comment("承办单位id")
|
@Comment("承办单位id")
|
||||||
@@ -62,93 +79,5 @@ public class Sys_user_role implements Serializable {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@Comment("提案教代会机构id")
|
@Comment("提案教代会机构id")
|
||||||
private String jgid;
|
private String jgid;
|
||||||
|
|
||||||
public String getGdhid() {
|
|
||||||
return gdhid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGdhid(String gdhid) {
|
|
||||||
this.gdhid = gdhid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getJc() {
|
|
||||||
return jc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJc(String jc) {
|
|
||||||
this.jc = jc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStid() {
|
|
||||||
return stid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStid(String stid) {
|
|
||||||
this.stid = stid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCbdwid() {
|
|
||||||
return cbdwid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCbdwid(String cbdwid) {
|
|
||||||
this.cbdwid = cbdwid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnionid() {
|
|
||||||
return unionid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUnionid(String unionid) {
|
|
||||||
this.unionid = unionid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRoleId() {
|
|
||||||
return roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoleId(String roleId) {
|
|
||||||
this.roleId = roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getJdhid() {
|
|
||||||
return jdhid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJdhid(String jdhid) {
|
|
||||||
this.jdhid = jdhid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnitid() {
|
|
||||||
return unitid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUnitid(String unitid) {
|
|
||||||
this.unitid = unitid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbtid() {
|
|
||||||
return dbtid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbtid(String dbtid) {
|
|
||||||
this.dbtid = dbtid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getJgid() {
|
|
||||||
return jgid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJgid(String jgid) {
|
|
||||||
this.jgid = jgid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -74,15 +74,17 @@ public class TrainEduStatisticsVideoController {
|
|||||||
u.loginname,
|
u.loginname,
|
||||||
u.unitname,
|
u.unitname,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
|
tev.qualifiedNum,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
SUM(IF( cnt > 2, 2, cnt )) AS count
|
SUM(IF( cnt > tev.everyDayMaxWatchNum, tev.everyDayMaxWatchNum, cnt )) AS count
|
||||||
FROM
|
FROM
|
||||||
( SELECT watchTime, COUNT( 1 ) AS cnt FROM train_edu_video_watch_record where userId = tevwr.userId and albumId = tevwr.albumId GROUP BY watchTime ) AS subquery
|
( SELECT watchTime, COUNT( 1 ) AS cnt FROM train_edu_video_watch_record where userId = tevwr.userId and albumId = tevwr.albumId GROUP BY watchTime ) AS subquery
|
||||||
) as watchCount
|
) as watchCount
|
||||||
|
|
||||||
FROM
|
FROM
|
||||||
`train_edu_video_watch_record` tevwr
|
`train_edu_video_watch_record` tevwr
|
||||||
|
LEFT JOIN train_edu_video tev ON tev.id = tevwr.videoId
|
||||||
LEFT JOIN train_edu_album tea on tea.id = tevwr.albumId
|
LEFT JOIN train_edu_album tea on tea.id = tevwr.albumId
|
||||||
LEFT JOIN `user` u ON u.id = tevwr.userId
|
LEFT JOIN `user` u ON u.id = tevwr.userId
|
||||||
$condition
|
$condition
|
||||||
|
|||||||
@@ -65,4 +65,9 @@ public class TrainEduVideo extends BaseModel {
|
|||||||
@ColDefine(type = ColType.INT)
|
@ColDefine(type = ColType.INT)
|
||||||
private Integer everyDayMaxWatchNum;
|
private Integer everyDayMaxWatchNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("合格/达标次数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer qualifiedNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -6,6 +6,7 @@ import cn.wizzer.framework.page.Pagination;
|
|||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
import io.v.nutz.base.result.Result;
|
import io.v.nutz.base.result.Result;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.modules.models.PageForm;
|
import io.v.nutz.modules.models.PageForm;
|
||||||
import io.v.nutz.sys.models.Sys_file;
|
import io.v.nutz.sys.models.Sys_file;
|
||||||
import io.v.nutz.sys.models.Sys_user_role;
|
import io.v.nutz.sys.models.Sys_user_role;
|
||||||
@@ -92,11 +93,11 @@ public class WakesHomeDataRevelController {
|
|||||||
|
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
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<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());
|
List<String> unionIds = data.stream().map(Sys_user_role::getUnionid).distinct().collect(Collectors.toList());*/
|
||||||
cnd.and("un.id", "in", unionIds);
|
cnd.and("un.id", "=", Vi.getUnionId());
|
||||||
}
|
}
|
||||||
cnd.and("un.isEnable","=",true);
|
// cnd.and("un.isEnable","=",true);
|
||||||
cnd.asc("un.unioncode");
|
cnd.asc("un.unioncode");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
nutMap.setv("child", wakesHomeInfoService.listMap(sql));
|
nutMap.setv("child", wakesHomeInfoService.listMap(sql));
|
||||||
|
|||||||
+4
-1
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
import io.v.nutz.wakershome.model.WakesHomeApply;
|
import io.v.nutz.wakershome.model.WakesHomeApply;
|
||||||
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
import io.v.nutz.wakershome.service.IWakesHomeApplyService;
|
||||||
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -69,7 +70,9 @@ public class WakesHomeDeclarationApplyController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("wakeshome.declaration.apply")
|
@RequiresPermissions(value = {"wakeshome.declaration.apply","wakeshome.declaration.mine",
|
||||||
|
"wakeshome.declaration.organization", "wakeshome.declaration.school",
|
||||||
|
"wakeshome.declaration.statistics"},logical = Logical.OR)
|
||||||
public Object getInfoById(String id){
|
public Object getInfoById(String id){
|
||||||
return wakesHomeApplyService.findById(id);
|
return wakesHomeApplyService.findById(id);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -114,7 +114,7 @@ public class WakesHomeDeclarationMineController {
|
|||||||
.bind("basicInformation", htmlRenderPolicy)
|
.bind("basicInformation", htmlRenderPolicy)
|
||||||
.bind("constructionPlan", htmlRenderPolicy).build();
|
.bind("constructionPlan", htmlRenderPolicy).build();
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
String fileName = Globals.schoolName + "教工小家”建设计划书";
|
String fileName = Globals.schoolName + "“教工小家”建设计划书";
|
||||||
map.put("fileName", fileName);
|
map.put("fileName", fileName);
|
||||||
map.put("schoolName", Globals.schoolName);
|
map.put("schoolName", Globals.schoolName);
|
||||||
map.put("unionName", nutMap.getString("unionName"));
|
map.put("unionName", nutMap.getString("unionName"));
|
||||||
|
|||||||
+1
-1
@@ -92,7 +92,7 @@ public class WakesHomeDeclarationSchoolController {
|
|||||||
public Object doRollBack(String id){
|
public Object doRollBack(String id){
|
||||||
WakesHomeApply wakesHome = wakesHomeApplyService.fetch(id);
|
WakesHomeApply wakesHome = wakesHomeApplyService.fetch(id);
|
||||||
wakesHomeApplyService.dao().clear(Audit.class,Cnd.where("id","=",wakesHome.getSchoolAuditId()));
|
wakesHomeApplyService.dao().clear(Audit.class,Cnd.where("id","=",wakesHome.getSchoolAuditId()));
|
||||||
wakesHomeApplyService.update(Chain.make("state",10010).add("schoolAuditId",null),Cnd.where("id","=",id));
|
wakesHomeApplyService.update(Chain.make("state",10020).add("schoolAuditId",null),Cnd.where("id","=",id));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class AddZbController {
|
|||||||
CommentZb zb = commentZbService.insert(commentZb);
|
CommentZb zb = commentZbService.insert(commentZb);
|
||||||
for (CommentNr nr : commentZb.getNrs()) {
|
for (CommentNr nr : commentZb.getNrs()) {
|
||||||
nr.setZb_id(zb.getId());
|
nr.setZb_id(zb.getId());
|
||||||
|
nr.getBzs().forEach(v->v.setZb_id(zb.getId()));
|
||||||
commentZbService.insertWith(nr, "bzs");
|
commentZbService.insertWith(nr, "bzs");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.deepoove.poi.XWPFTemplate;
|
|||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.result.Result;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.modules.models.PageForm;
|
import io.v.nutz.modules.models.PageForm;
|
||||||
import io.v.nutz.sys.models.Sys_file;
|
import io.v.nutz.sys.models.Sys_file;
|
||||||
@@ -201,6 +202,7 @@ public class StatisticsZpController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 分工会下所有测评结果导出(多个)压缩包
|
* 分工会下所有测评结果导出(多个)压缩包
|
||||||
|
*
|
||||||
* @param zbId
|
* @param zbId
|
||||||
* @param unionId
|
* @param unionId
|
||||||
* @param response
|
* @param response
|
||||||
@@ -232,8 +234,41 @@ public class StatisticsZpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验是否有附件
|
||||||
|
*
|
||||||
|
* @param peoId 测评结果Id
|
||||||
|
* @param zbId 指标Id
|
||||||
|
* @param unionId 分工会Id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@RequiresPermissions("wakeshome.review.statistics")
|
||||||
|
public Object validateHasFiles(@Param(value = "peoId", required = false) String peoId,
|
||||||
|
@Param(value = "zbId", required = false) String zbId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("id", "=", peoId);
|
||||||
|
cnd.andEX("zbId", "=", zbId);
|
||||||
|
cnd.andEX("unionId", "=", unionId);
|
||||||
|
List<CommentPeo> peoList = commentPeoService.dao().query(CommentPeo.class, cnd);
|
||||||
|
List<Sys_file> files;
|
||||||
|
try {
|
||||||
|
files = peoList.stream().flatMap(v -> v.getFiles().stream()).collect(Collectors.toList());
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
return Result.error();
|
||||||
|
}
|
||||||
|
if (Lang.isEmpty(files)) {
|
||||||
|
return Result.error();
|
||||||
|
} else {
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分工会导出附件
|
* 分工会导出附件
|
||||||
|
*
|
||||||
* @param zbId
|
* @param zbId
|
||||||
* @param unionId
|
* @param unionId
|
||||||
* @param response
|
* @param response
|
||||||
@@ -261,7 +296,7 @@ public class StatisticsZpController {
|
|||||||
|
|
||||||
if (Lang.isNotEmpty(files)) {
|
if (Lang.isNotEmpty(files)) {
|
||||||
for (Sys_file file : files) {
|
for (Sys_file file : files) {
|
||||||
if(Lang.isNotEmpty(file)) {
|
if (Lang.isNotEmpty(file)) {
|
||||||
FileOutputStream outputStream = new FileOutputStream(tDir.getPath() + "/" + file.getFilename());
|
FileOutputStream outputStream = new FileOutputStream(tDir.getPath() + "/" + file.getFilename());
|
||||||
ftpService.download(file.getFilepath(), outputStream);
|
ftpService.download(file.getFilepath(), outputStream);
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class MWakesHomeReviewController {
|
|||||||
if (reviewMode && v.getInt("commentTarget") == 1) {
|
if (reviewMode && v.getInt("commentTarget") == 1) {
|
||||||
//校工会自评,判断有没有校工会管理员的权限
|
//校工会自评,判断有没有校工会管理员的权限
|
||||||
v.put("canJoin", ShiroUtil.hasRole("A06"));
|
v.put("canJoin", ShiroUtil.hasRole("A06"));
|
||||||
} else if (reviewMode && v.getInt("commentTarget") == 2){
|
} else if (reviewMode && v.getInt("commentTarget") == 2) {
|
||||||
//分工会自评,判断有没有分工会管理员
|
//分工会自评,判断有没有分工会管理员
|
||||||
v.put("canJoin", ShiroUtil.hasRole("H04"));
|
v.put("canJoin", ShiroUtil.hasRole("H04"));
|
||||||
}
|
}
|
||||||
@@ -146,10 +146,11 @@ public class MWakesHomeReviewController {
|
|||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
@ViReturn
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object doSubmit(WakesHomeVo wakesHomeVo) {
|
public Object doSubmit(WakesHomeVo wakesHomeVo) {
|
||||||
try {
|
try {
|
||||||
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUser()));
|
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||||
CommentPeo peo = new CommentPeo();
|
CommentPeo peo = new CommentPeo();
|
||||||
if (Strings.isNotBlank(wakesHomeVo.getEvaluatedPersonId())) {
|
if (Strings.isNotBlank(wakesHomeVo.getEvaluatedPersonId())) {
|
||||||
peo.setEvaluatedPersonId(wakesHomeVo.getEvaluatedPersonId());
|
peo.setEvaluatedPersonId(wakesHomeVo.getEvaluatedPersonId());
|
||||||
@@ -181,7 +182,7 @@ public class MWakesHomeReviewController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return Result.error();
|
throw new RuntimeException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,7 +220,7 @@ public class MWakesHomeReviewController {
|
|||||||
""").setParam("zbId", id).setParam("userId", ShiroUtil.getPrincipalProperty("id"));
|
""").setParam("zbId", id).setParam("userId", ShiroUtil.getPrincipalProperty("id"));
|
||||||
List<NutMap> list = baseService.listMap(sql);
|
List<NutMap> list = baseService.listMap(sql);
|
||||||
NutMap nutMap = list.stream().findFirst().orElse(null);
|
NutMap nutMap = list.stream().findFirst().orElse(null);
|
||||||
if (Strings.isNotBlank(nutMap.getString("commentTarget")) && "1".equals(nutMap.getString("assessmentMode"))) {
|
if (nutMap != null && Strings.isNotBlank(nutMap.getString("commentTarget")) && "1".equals(nutMap.getString("assessmentMode"))) {
|
||||||
return Result.success().addData(1);
|
return Result.success().addData(1);
|
||||||
} else {
|
} else {
|
||||||
return Result.success().addData(0);
|
return Result.success().addData(0);
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ public class CommentBz extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("排序字段")
|
@Comment("排序字段")
|
||||||
@Prev({
|
|
||||||
@SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_bz"),
|
|
||||||
})
|
|
||||||
private Integer location;
|
private Integer location;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
|||||||
@@ -49,9 +49,6 @@ public class CommentNr extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("排序字段")
|
@Comment("排序字段")
|
||||||
@Prev({
|
|
||||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_nr"),
|
|
||||||
})
|
|
||||||
private Integer location;
|
private Integer location;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
|||||||
@@ -66,9 +66,6 @@ public class CommentZb extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("排序字段")
|
@Comment("排序字段")
|
||||||
@Prev({
|
|
||||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_zb"),
|
|
||||||
})
|
|
||||||
private Integer location;
|
private Integer location;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.v.nutz.wakershome.service.impl.review;
|
|||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.service.impl.ViServiceImpl;
|
import io.v.nutz.service.impl.ViServiceImpl;
|
||||||
|
import io.v.nutz.wakershome.model.review.CommentBz;
|
||||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||||
import io.v.nutz.wakershome.service.review.CommentNrService;
|
import io.v.nutz.wakershome.service.review.CommentNrService;
|
||||||
@@ -29,19 +30,17 @@ public class CommentZbServiceImpl extends ViServiceImpl<CommentZb> implements Co
|
|||||||
private CommentNrService commentNrService;
|
private CommentNrService commentNrService;
|
||||||
|
|
||||||
|
|
||||||
private void setNrBz(List<CommentNr> nrs) {
|
|
||||||
for (CommentNr nr : nrs) {
|
|
||||||
nr = commentNrService.fetchLinks(nr, "bzs", Cnd.NEW().asc("location"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommentZb khzb(String zbid) {
|
public CommentZb khzb(String zbid) {
|
||||||
if (StrUtil.isBlank(zbid)) {
|
if (StrUtil.isBlank(zbid)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
CommentZb zb = fetchLinks(fetch(zbid), "nrs", Cnd.NEW().asc("location"));
|
|
||||||
setNrBz(zb.getNrs());
|
CommentZb zb = dao().fetchLinks(fetch(zbid), "nrs", Cnd.NEW().asc("contentNumber"));
|
||||||
|
for (CommentNr nr : zb.getNrs()) {
|
||||||
|
List<CommentBz> query = dao().query(CommentBz.class, Cnd.where("zb_id", "=", zbid).and("nr_id", "=", nr.getId()).asc("contentNumber"));
|
||||||
|
nr.setBzs(query);
|
||||||
|
}
|
||||||
return zb;
|
return zb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,13 @@ package io.v.nutz.web.controllers.platform.sys;
|
|||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.page.Pagination;
|
||||||
import io.v.nutz.base.utils.PageUtil;
|
import io.v.nutz.base.utils.PageUtil;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.lang.Lang;
|
import io.v.nutz.modules.models.PageForm;
|
||||||
import io.v.nutz.service.ViService;
|
import io.v.nutz.service.ViService;
|
||||||
import io.v.nutz.sys.models.*;
|
import io.v.nutz.sys.models.*;
|
||||||
import io.v.nutz.sys.services.*;
|
import io.v.nutz.sys.services.*;
|
||||||
@@ -26,14 +28,21 @@ import org.nutz.dao.util.cri.Static;
|
|||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.json.Json;
|
import org.nutz.json.Json;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
import org.nutz.log.Log;
|
import org.nutz.log.Log;
|
||||||
import org.nutz.log.Logs;
|
import org.nutz.log.Logs;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.trans.Trans;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: V
|
* @Author: V
|
||||||
@@ -78,7 +87,11 @@ public class SysUnionMangeCon {
|
|||||||
*/
|
*/
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
public Object changeSchoolUnionRole(String unionid, String roleId, String roleCode, String userId, int type) {
|
public Object changeSchoolUnionRole(@Param(value = "unionid", required = false) String unionid,
|
||||||
|
@Param(value = "roleId", required = false) String roleId,
|
||||||
|
@Param(value = "roleCode", required = false) String roleCode,
|
||||||
|
@Param(value = "userId", required = false) String userId,
|
||||||
|
@Param(value = "type", required = false) int type) {
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
Sys_user_role role = new Sys_user_role();
|
Sys_user_role role = new Sys_user_role();
|
||||||
role.setUserId(userId);
|
role.setUserId(userId);
|
||||||
@@ -109,7 +122,9 @@ public class SysUnionMangeCon {
|
|||||||
*/
|
*/
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
public Object schoolUnionRoles(String unionid, String searchName, String searchKeyword) {
|
public Object schoolUnionRoles(@Param(value = "unionid", required = false) String unionid,
|
||||||
|
@Param(value = "searchName", required = false) String searchName,
|
||||||
|
@Param(value = "searchKeyword", required = false) String searchKeyword) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
role.`name` rolename,
|
role.`name` rolename,
|
||||||
@@ -136,8 +151,8 @@ public class SysUnionMangeCon {
|
|||||||
cnd.and(new Static("dict.parentId = ( SELECT id FROM sys_dict WHERE `code` = 'SchoolRoles' LIMIT 1)"));
|
cnd.and(new Static("dict.parentId = ( SELECT id FROM sys_dict WHERE `code` = 'SchoolRoles' LIMIT 1)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Lang.notNull(searchName, searchKeyword)) {
|
if (StrUtil.isNotBlank(searchName) && StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.where().andLike(searchName, searchKeyword);
|
cnd.and(Cnd.likeEX(searchName, searchKeyword));
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
@@ -171,7 +186,10 @@ public class SysUnionMangeCon {
|
|||||||
@At("/unionPageData")
|
@At("/unionPageData")
|
||||||
@Ok("json:full")
|
@Ok("json:full")
|
||||||
@ViReturn
|
@ViReturn
|
||||||
public Object unionPageData(String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
public Object unionPageData(@Param(value = "searchName", required = false) String searchName,
|
||||||
|
@Param(value = "searchKeyword", required = false) String searchKeyword, int pageNumber, int pageSize,
|
||||||
|
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||||
|
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -348,7 +366,9 @@ public class SysUnionMangeCon {
|
|||||||
|
|
||||||
|
|
||||||
@At // 会员档案
|
@At // 会员档案
|
||||||
public Object hyPageData(String unitid, String unionid, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
public Object hyPageData(@Param(value = "unitid", required = false) String unitid,
|
||||||
|
@Param(value = "unionid", required = false) String unionid,
|
||||||
|
PageForm page) {
|
||||||
try {
|
try {
|
||||||
// Sql sql = Sqls.create("SELECT u.id,u.username,u.loginname,u.sex,un.`name` unitname,u.mobile from sys_user u left join sys_unit un on u.unitid = un.id $condition");
|
// Sql sql = Sqls.create("SELECT u.id,u.username,u.loginname,u.sex,un.`name` unitname,u.mobile from sys_user u left join sys_unit un on u.unitid = un.id $condition");
|
||||||
|
|
||||||
@@ -363,16 +383,16 @@ public class SysUnionMangeCon {
|
|||||||
if (Strings.isNotBlank(unitid)) {
|
if (Strings.isNotBlank(unitid)) {
|
||||||
cnd.and("u.unitid", "=", unitid);
|
cnd.and("u.unitid", "=", unitid);
|
||||||
}
|
}
|
||||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
if (Strings.isNotBlank(page.getSearchName()) && Strings.isNotBlank(page.getSearchKeyword())) {
|
||||||
cnd.and(searchName, "like", "%" + searchKeyword + "%");
|
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||||
}
|
}
|
||||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderBy)) {
|
if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) {
|
||||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||||
} else {
|
} else {
|
||||||
cnd.asc("u.unitid");
|
cnd.asc("u.unitid");
|
||||||
}
|
}
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return Result.success().addData(sysUnionService.listPage(pageNumber, pageSize, sql));
|
return Result.success().addData(sysUnionService.listPage(page.getPageNumber(), page.getPageSize(), sql));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e);
|
||||||
return Result.error();
|
return Result.error();
|
||||||
@@ -418,7 +438,9 @@ public class SysUnionMangeCon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
public Object spyPageData(String qxid, String unionid, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
public Object spyPageData(@Param(value = "qxid", required = false) String qxid,
|
||||||
|
@Param(value = "unionid", required = false) String unionid,
|
||||||
|
PageForm page) {
|
||||||
try {
|
try {
|
||||||
Sql sql = Sqls.create("SELECT\n" +
|
Sql sql = Sqls.create("SELECT\n" +
|
||||||
"\tsur.roleId,\n" +
|
"\tsur.roleId,\n" +
|
||||||
@@ -445,16 +467,16 @@ public class SysUnionMangeCon {
|
|||||||
cnd.and("sur.roleId in (SELECT role.id from sys_dict dict left join sys_role role on dict.`code` = role.`code` WHERE parentId = '" + ViCommonCon.DICT_SPYJS_ID + "') and 1", "=", 1);
|
cnd.and("sur.roleId in (SELECT role.id from sys_dict dict left join sys_role role on dict.`code` = role.`code` WHERE parentId = '" + ViCommonCon.DICT_SPYJS_ID + "') and 1", "=", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
if (Strings.isNotBlank(page.getSearchName()) && Strings.isNotBlank(page.getSearchKeyword())) {
|
||||||
cnd.where().andLike(searchName, searchKeyword);
|
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||||
}
|
}
|
||||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderBy)) {
|
if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) {
|
||||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
cnd.orderBy(page.getPageOrderName(), PageUtil.getOrder(page.getPageOrderBy()));
|
||||||
} else {
|
} else {
|
||||||
cnd.asc("sur.roleId");
|
cnd.asc("sur.roleId");
|
||||||
}
|
}
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return Result.success().addData(sysUnionService.listPage(pageNumber, pageSize, sql));
|
return Result.success().addData(sysUnionService.listPage(page.getPageNumber(), page.getPageSize(), sql));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e);
|
||||||
return Result.error();
|
return Result.error();
|
||||||
@@ -476,6 +498,233 @@ public class SysUnionMangeCon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件查询可选的三级单位,以及已选择了的单位
|
||||||
|
*
|
||||||
|
* @param unionId
|
||||||
|
* @param unionGroupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object getXzDw(String unionId, @Param(value = "unionGroupId", required = false) String unionGroupId) {
|
||||||
|
List<Sys_unit> value = new ArrayList<>();
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (Strings.isNotBlank(unionGroupId)) {
|
||||||
|
//根据工会小组id查出小组下的单位
|
||||||
|
value = sysUnitService.query(Cnd.where("unionGroupId", "=", unionGroupId));
|
||||||
|
} else {
|
||||||
|
cnd.and("unionGroupId", "is", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
//查出这个工会下的二级单位
|
||||||
|
List<Sys_unit> unit2 = sysUnitService.query(Cnd.where("unitlevel", "=", 2).and("unionid", "=", unionId));
|
||||||
|
List<String> unit2Id = unit2.stream().map(v -> v.getId()).collect(Collectors.toList());
|
||||||
|
//根据二级单位id查出下面的三级单位
|
||||||
|
cnd.and("parentId", "in", unit2Id);
|
||||||
|
List<Sys_unit> data = sysUnitService.query(cnd);
|
||||||
|
return Map.of("data", data, "value", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置工会小组
|
||||||
|
*
|
||||||
|
* @param sysUnionGroup
|
||||||
|
* @param xzValue
|
||||||
|
* @param oldGroupCode
|
||||||
|
* @param unionId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
public Object doSzXz(@Param("SysUnionGroup") SysUnionGroup sysUnionGroup,
|
||||||
|
@Param(value = "xzValue", required = false) String[] xzValue,
|
||||||
|
@Param(value = "oldGroupCode", required = false) String oldGroupCode, String unionId) {
|
||||||
|
if (oldGroupCode != null && !oldGroupCode.equals(sysUnionGroup.getGroupCode())) {
|
||||||
|
int groupCode = sysUnitService.dao().count(SysUnionGroup.class, Cnd.where("groupCode", "=", sysUnionGroup.getGroupCode()));
|
||||||
|
if (groupCode > 0) {
|
||||||
|
return Result.error("编码重复");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sysUnionGroup.setUnionId(unionId);
|
||||||
|
sysUnitService.insertOrUpdate(sysUnionGroup);
|
||||||
|
|
||||||
|
if (Strings.isNotBlank(sysUnionGroup.getId())) {
|
||||||
|
sysUnitService.update(Chain.make("unionGroupId", null), Cnd.where("unionGroupId", "=", sysUnionGroup.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Lang.isNotEmpty(xzValue)) {
|
||||||
|
sysUnitService.update(Chain.make("unionGroupId", sysUnionGroup.getId()), Cnd.where("id", "in", xzValue));
|
||||||
|
}
|
||||||
|
return Result.success("操作成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据工会查询他下面的工会小组分页
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param unionId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object xzPageData(PageForm page, String unionId) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
g.*,(
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT( us.username, '(', us.loginname, ')' )
|
||||||
|
FROM
|
||||||
|
sys_user_role ro
|
||||||
|
LEFT JOIN sys_user us ON us.id = ro.userId
|
||||||
|
WHERE
|
||||||
|
ro.unionGroupId = g.id
|
||||||
|
AND ro.roleId = @roleId
|
||||||
|
) groupLeader
|
||||||
|
FROM
|
||||||
|
`sys_union_group` g
|
||||||
|
$condition
|
||||||
|
""").setParam("roleId", Roles.ghxzzz);
|
||||||
|
if (StrUtil.isNotBlank(page.getSearchName()) && StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||||
|
cnd.and(Cnd.likeEX(page.getSearchName(), page.getSearchKeyword()));
|
||||||
|
}
|
||||||
|
cnd.and("g.unionId", "=", unionId);
|
||||||
|
cnd.asc("g.groupCode");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sysUnitService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工会小组下面的组长
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object selectSzXzzz(String id) {
|
||||||
|
return sysUserRoleService.query(Cnd.where("roleId", "=", Roles.ghxzzz).and("unionGroupId", "=", id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加工会小组组长
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @param unionId
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object doSzXzzz(@Param("userId") String[] userId, String unionId, String id) {
|
||||||
|
Trans.exec(() -> {
|
||||||
|
sysUserRoleService.clear(Cnd.where("unionGroupId", "=", id).and("roleId", "=", io.v.nutz.base.utils.Roles.ghxzzz));
|
||||||
|
List<String> idList = Arrays.asList(userId);
|
||||||
|
List<Sys_user_role> roles = new ArrayList<>();
|
||||||
|
idList.forEach(v->{
|
||||||
|
Sys_user_role user_role = new Sys_user_role();
|
||||||
|
user_role.setRoleId(io.v.nutz.base.utils.Roles.ghxzzz);
|
||||||
|
user_role.setUnionGroupId(id);
|
||||||
|
user_role.setUserId(v);
|
||||||
|
user_role.setUnionid(unionId);
|
||||||
|
roles.add(user_role);
|
||||||
|
});
|
||||||
|
sysUserRoleService.insert(roles);
|
||||||
|
sysUserService.clearCache();
|
||||||
|
});
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据工会小组id删除小组以及对应的角色
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object doDeleteXz(String id) {
|
||||||
|
Trans.exec(() -> {
|
||||||
|
sysUserRoleService.clear(Cnd.where("roleId", "=", Roles.ghxzzz).and("unionGroupId", "=", id));
|
||||||
|
sysUnitService.dao().delete(SysUnionGroup.class, id);
|
||||||
|
sysUnitService.update(Chain.make("unionGroupId", null), Cnd.where("unionGroupId", "=", id));
|
||||||
|
sysUserService.clearCache();
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工会小组会员
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param id
|
||||||
|
* @param threeUnitId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object selectXzcy(PageForm page, String id, @Param(value = "threeUnitId", required = false) String threeUnitId) {
|
||||||
|
//根据小组id查出这个小组对应的单位
|
||||||
|
List<Sys_unit> sysUnits = sysUnitService.query(Cnd.where("unionGroupId", "=", id));
|
||||||
|
//拿到单位id
|
||||||
|
List<String> unitIds = sysUnits.stream().map(v -> v.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
u.id,
|
||||||
|
u.loginname,
|
||||||
|
u.username,
|
||||||
|
u.sex,
|
||||||
|
un.`name` threeUnitName,
|
||||||
|
u.mobile
|
||||||
|
FROM
|
||||||
|
sys_user u
|
||||||
|
LEFT JOIN sys_unit un ON u.threeUnitId = un.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
if (StrUtil.isNotBlank(page.getSearchName()) && StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||||
|
cnd.and(Cnd.likeEX(page.getSearchName(), page.getSearchKeyword()));
|
||||||
|
}
|
||||||
|
if (Strings.isNotBlank(threeUnitId)) {
|
||||||
|
cnd.and("threeUnitId", "=", threeUnitId);
|
||||||
|
} else {
|
||||||
|
cnd.and("threeUnitId", "in", unitIds);
|
||||||
|
}
|
||||||
|
cnd.and("member", "=", 1);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sysUnitService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据小组id查询小组下面的三级单位
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object getThreeOptions(String id) {
|
||||||
|
return sysUnitService.query(Cnd.where("unionGroupId", "=", id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除工会小组组长
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
public Object cancelXzzz(String id) {
|
||||||
|
sysUserRoleService.clear(Cnd.where("roleId", "=", Roles.ghxzzz).and("unionGroupId", "=", id));
|
||||||
|
sysUserService.clearCache();
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改工会组成单位
|
* 修改工会组成单位
|
||||||
*
|
*
|
||||||
@@ -511,8 +760,29 @@ public class SysUnionMangeCon {
|
|||||||
@At
|
@At
|
||||||
public Object getUserByUnionId(String query, String unionid) {
|
public Object getUserByUnionId(String query, String unionid) {
|
||||||
try {
|
try {
|
||||||
return Result.success().addData(sysUserService.listPage(1, 50, Sqls.create("SELECT u.id,u.username,u.loginname,u.sex,u.mobile,u.zw,u.email\n" +
|
Sql sql = Sqls.create("""
|
||||||
"from sys_user u left join sys_unit un on u.unitid = un.id WHERE un.unionid = @unionid and (u.username LIKE @query or u.loginname like @query)").setParam("unionid", unionid).setParam("query", "%" + query + "%")));
|
SELECT
|
||||||
|
u.id,
|
||||||
|
u.username,
|
||||||
|
u.loginname,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
u.email
|
||||||
|
from
|
||||||
|
"user" u
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("u.unionid", "=", unionid);
|
||||||
|
if (StrUtil.isNotBlank(query)) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("u.username", query);
|
||||||
|
seg.orLike("u.loginname", query);
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = sysUserService.listPage(1, 10, sql);
|
||||||
|
return Result.success().addData(pagination);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return Result.error();
|
return Result.error();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,30 +7,40 @@ import io.v.nutz.data.constant.SourceData;
|
|||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
import io.v.nutz.dao.CndPlus;
|
import io.v.nutz.dao.CndPlus;
|
||||||
import io.v.nutz.modules.models.PageForm;
|
import io.v.nutz.modules.models.PageForm;
|
||||||
|
import io.v.nutz.proposal.models.ProposalConfig;
|
||||||
|
import io.v.nutz.proposal.models.ProposalUndertake;
|
||||||
import io.v.nutz.service.AsyncService;
|
import io.v.nutz.service.AsyncService;
|
||||||
import io.v.nutz.service.ViService;
|
import io.v.nutz.service.ViService;
|
||||||
import io.v.nutz.sys.models.Sys_unit;
|
import io.v.nutz.sys.models.Sys_unit;
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.sys.models.Sys_user_role;
|
||||||
import io.v.nutz.sys.services.SysDqService;
|
import io.v.nutz.sys.services.SysDqService;
|
||||||
import io.v.nutz.sys.services.SysGxService;
|
import io.v.nutz.sys.services.SysGxService;
|
||||||
import io.v.nutz.sys.services.SysUnitClassService;
|
import io.v.nutz.sys.services.SysUnitClassService;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.Daos;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.log.Log;
|
import org.nutz.log.Log;
|
||||||
import org.nutz.log.Logs;
|
import org.nutz.log.Logs;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -43,7 +53,6 @@ import java.util.stream.Collectors;
|
|||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
@Ok("json:full")
|
@Ok("json:full")
|
||||||
public class SysUnitMangeController {
|
public class SysUnitMangeController {
|
||||||
private static final Log log = Logs.get();
|
|
||||||
|
|
||||||
@Inject("Sys_unit")
|
@Inject("Sys_unit")
|
||||||
private ViService<Sys_unit> sysUnitService;
|
private ViService<Sys_unit> sysUnitService;
|
||||||
@@ -52,11 +61,10 @@ public class SysUnitMangeController {
|
|||||||
private SysUnitClassService sysUnitClassService;
|
private SysUnitClassService sysUnitClassService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysDqService sysDqService;
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysGxService sysGxService;
|
private Dao dao;
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/sys/unit/unitMange.html")
|
@Ok("beetl:/platform/sys/unit/unitMange.html")
|
||||||
@@ -68,6 +76,7 @@ public class SysUnitMangeController {
|
|||||||
// 单位数据更新
|
// 单位数据更新
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
public Object dataUpdate() {
|
public Object dataUpdate() {
|
||||||
// 从系统数据库中查询已有的单位
|
// 从系统数据库中查询已有的单位
|
||||||
List<Sys_unit> sys_units = sysUnitService.query();
|
List<Sys_unit> sys_units = sysUnitService.query();
|
||||||
@@ -75,7 +84,7 @@ public class SysUnitMangeController {
|
|||||||
// Map<String, String> map = sys_units.stream().collect(Collectors.toMap(sys_unit -> sys_unit.getId(), sys_unit -> sys_unit.getParentId()));
|
// Map<String, String> map = sys_units.stream().collect(Collectors.toMap(sys_unit -> sys_unit.getId(), sys_unit -> sys_unit.getParentId()));
|
||||||
List<String> list = sys_units.stream().map(v -> v.getId()).collect(Collectors.toList());
|
List<String> list = sys_units.stream().map(v -> v.getId()).collect(Collectors.toList());
|
||||||
// 从源数据中心拉取所有的单位
|
// 从源数据中心拉取所有的单位
|
||||||
List<Sys_unit> units = SourceData.units();
|
/* List<Sys_unit> units = SourceData.units();
|
||||||
for (Sys_unit unit : units) {
|
for (Sys_unit unit : units) {
|
||||||
if (list.contains(unit.getId())) { // 包含就修改
|
if (list.contains(unit.getId())) { // 包含就修改
|
||||||
sysUnitService.updateIgnoreNull(unit);
|
sysUnitService.updateIgnoreNull(unit);
|
||||||
@@ -84,7 +93,7 @@ public class SysUnitMangeController {
|
|||||||
beanMap.remove("child");
|
beanMap.remove("child");
|
||||||
sysUnitService.insert("sys_unit", Chain.from(beanMap));
|
sysUnitService.insert("sys_unit", Chain.from(beanMap));
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
List<Sys_unit> query = sysUnitService.query();
|
List<Sys_unit> query = sysUnitService.query();
|
||||||
query.forEach(v -> {
|
query.forEach(v -> {
|
||||||
@@ -98,8 +107,16 @@ public class SysUnitMangeController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位页面数据
|
||||||
|
*
|
||||||
|
* @param parentId 父id
|
||||||
|
* @param pageForm 页面形式
|
||||||
|
* @return {@link Object}
|
||||||
|
*/
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
public Object pageData(String parentId, PageForm pageForm) {
|
public Object pageData(String parentId, PageForm pageForm) {
|
||||||
CndPlus cnd = CndPlus.create();
|
CndPlus cnd = CndPlus.create();
|
||||||
cnd.andExcludeEmpty("parentId", "=", parentId);
|
cnd.andExcludeEmpty("parentId", "=", parentId);
|
||||||
@@ -108,39 +125,62 @@ public class SysUnitMangeController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
public Object findOne(String id) {
|
public Object findOne(String id) {
|
||||||
return sysUnitService.fetch(id);
|
return sysUnitService.fetch(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object doAdd(Sys_unit sys_unit) {
|
public Object doAdd(Sys_unit sys_unit) {
|
||||||
|
sys_unit.setId(sys_unit.getUnitcode());
|
||||||
if (sysUnitService.count(Cnd.where("unitcode", "=", sys_unit.getUnitcode())) > 0) {
|
if (sysUnitService.count(Cnd.where("unitcode", "=", sys_unit.getUnitcode())) > 0) {
|
||||||
return Result.error("单位代码已存在");
|
return Result.error("单位代码已存在");
|
||||||
}
|
}
|
||||||
sysUnitService.update(Chain.make("hasChildren", true), Cnd.where("id", "=", sys_unit.getParentId()));
|
sysUnitService.update(Chain.make("hasChildren", true), Cnd.where("id", "=", sys_unit.getParentId()));
|
||||||
sysUnitService.insert(sys_unit);
|
sysUnitService.insert(sys_unit);
|
||||||
|
|
||||||
|
//添加承办单位
|
||||||
|
ProposalUndertake proposalUndertake = new ProposalUndertake();
|
||||||
|
proposalUndertake.setIsEnable(true);
|
||||||
|
proposalUndertake.setUnitName(sys_unit.getName());
|
||||||
|
proposalUndertake.setUnitCode(sys_unit.getUnitcode());
|
||||||
|
dao.insert(proposalUndertake);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object doEdit(Sys_unit sys_unit) {
|
public Object doEdit(Sys_unit sys_unit) {
|
||||||
if (sysUnitService.count(Cnd.where("unitcode", "=", sys_unit.getUnitcode()).and("id", "!=", sys_unit.getId())) > 0) {
|
if (sysUnitService.count(Cnd.where("unitcode", "=", sys_unit.getUnitcode()).and("id", "!=", sys_unit.getId())) > 0) {
|
||||||
return Result.error("单位代码已存在");
|
return Result.error("单位代码已存在");
|
||||||
}
|
}
|
||||||
|
sys_unit.setOpAt(String.valueOf(System.currentTimeMillis()));
|
||||||
sysUnitService.update(sys_unit);
|
sysUnitService.update(sys_unit);
|
||||||
|
|
||||||
|
//更新承办单位
|
||||||
|
dao.update(ProposalUndertake.class, Chain.make("unitName", sys_unit.getName()), Cnd.where("unitCode", "=", sys_unit.getUnitcode()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object doDelete(String id) {
|
public Object doDelete(String id) {
|
||||||
Sys_unit unit = sysUnitService.fetch(id);
|
Sys_unit unit = sysUnitService.fetch(id);
|
||||||
int count = sysUnitService.count(Cnd.where("parentId", "=", unit.getParentId()).and("id", "!=", id));
|
int count = sysUnitService.count(Cnd.where("parentId", "=", unit.getParentId()).and("id", "!=", id));
|
||||||
sysUnitService.update(Chain.make("hasChildren", count > 0), Cnd.where("id", "=", unit.getParentId()));
|
sysUnitService.update(Chain.make("hasChildren", count > 0), Cnd.where("id", "=", unit.getParentId()));
|
||||||
delete(id);
|
delete(id);
|
||||||
|
|
||||||
|
//删除承办单位
|
||||||
|
dao.clear(ProposalUndertake.class, Cnd.where("unitCode", "=", unit.getUnitcode()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,11 +200,12 @@ public class SysUnitMangeController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@At
|
@At
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
public Object getUnitTreeData() {
|
public Object getUnitTreeData() {
|
||||||
try {
|
try {
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
|
|
||||||
Sys_unit school = sysUnitService.fetch(Cnd.NEW());
|
Sys_unit school = sysUnitService.fetch("00000");
|
||||||
school.setChild(child(school.getId()));
|
school.setChild(child(school.getId()));
|
||||||
|
|
||||||
list.add(school);
|
list.add(school);
|
||||||
@@ -182,7 +223,7 @@ public class SysUnitMangeController {
|
|||||||
private List<Sys_unit> child(String parentId) {
|
private List<Sys_unit> child(String parentId) {
|
||||||
List<Sys_unit> units = sysUnitService.query(Cnd.where("parentId", "=", parentId));
|
List<Sys_unit> units = sysUnitService.query(Cnd.where("parentId", "=", parentId));
|
||||||
|
|
||||||
asyncService.exe2(units, unit -> {
|
units.forEach(unit -> {
|
||||||
unit.setChild(child(unit.getId()));
|
unit.setChild(child(unit.getId()));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -192,6 +233,7 @@ public class SysUnitMangeController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
public Object getUnit2() {
|
public Object getUnit2() {
|
||||||
try {
|
try {
|
||||||
return Result.success().addData(sysUnitService.query(Cnd.where("unitlevel", "=", 2).asc("location")));
|
return Result.success().addData(sysUnitService.query(Cnd.where("unitlevel", "=", 2).asc("location")));
|
||||||
@@ -200,43 +242,307 @@ public class SysUnitMangeController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
/**
|
||||||
private SysUserService sysUserService;
|
* 查找单位下的用户
|
||||||
|
*
|
||||||
|
* @param pageForm 页面形式
|
||||||
|
* @param unitId 单位id
|
||||||
|
* @param threeUnitId 三个单元id
|
||||||
|
* @return {@link Object}
|
||||||
|
*/
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
public Object findPersonByUnitId(PageForm pageForm, String unitId) {
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object findPersonByUnitId(PageForm pageForm, @Param(value = "unitId", required = false) String unitId, @Param(value = "threeUnitId", required = false) String threeUnitId) {
|
||||||
NutMap map = new NutMap();
|
NutMap map = new NutMap();
|
||||||
|
|
||||||
CndPlus cndPlus = CndPlus.create();
|
Sql userSql = Sqls.create("""
|
||||||
cndPlus.andExcludeEmpty("unitid", "=", unitId);
|
select
|
||||||
|
u.id,
|
||||||
|
u.username,
|
||||||
|
u.loginname,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
u.member,
|
||||||
|
IFNULL( r.NAME, '普通用户' ) AS roleName,
|
||||||
|
r.code as roleCode
|
||||||
|
from `user` u
|
||||||
|
LEFT JOIN sys_user_role sur on sur.userId = u.id and sur.roleId = @roleId
|
||||||
|
LEFT JOIN sys_role r on r.id = sur.roleId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
userSql.setParam("roleId", Roles.UNIT_MANGER);
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.groupBy("u.id");
|
||||||
|
cnd.andEX("u.unitid", "=", unitId);
|
||||||
|
cnd.andEX("u.threeUnitId", "=", threeUnitId);
|
||||||
|
|
||||||
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
cndPlus.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
}
|
}
|
||||||
cndPlus.asc("member");
|
cnd.desc("r.code");
|
||||||
|
cnd.asc("member");
|
||||||
|
userSql.setCondition(cnd);
|
||||||
|
map.setv("userList", sysUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), userSql));
|
||||||
|
|
||||||
|
// Sql sql = Sqls.create("""
|
||||||
|
// SELECT
|
||||||
|
// su.*
|
||||||
|
// FROM
|
||||||
|
// sys_user su
|
||||||
|
// LEFT JOIN sys_user_role sur ON sur.userId = su.id
|
||||||
|
// $condition
|
||||||
|
// """);
|
||||||
|
//
|
||||||
|
// Cnd cnd2 = Cnd.NEW();
|
||||||
|
// cnd2.andEX("sur.roleId", "=", Roles.UNIT_MANGER);
|
||||||
|
// cnd2.andEX("su.unitid", "=", unitId);
|
||||||
|
// cnd.andEX("threeUnitId", "=", threeUnitId);
|
||||||
|
// if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
// cnd2.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
// }
|
||||||
|
// sql.setCondition(cnd2);
|
||||||
|
// map.setv("principal", sysUserService.listMap(sql));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 找到提议人由单位id
|
||||||
|
*
|
||||||
|
* @param pageForm 页面形式
|
||||||
|
* @param unitId 单位id
|
||||||
|
* @param type 类型 1.校领导 2.答复人
|
||||||
|
* @return {@link Object}
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object findProposalPersonByUnitId(PageForm pageForm, @Param(value = "unitId", required = false) String unitId, Integer type) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
su.*
|
u.username,
|
||||||
|
u.loginname,
|
||||||
|
u.sex,
|
||||||
|
u.mobile
|
||||||
|
FROM
|
||||||
|
sys_user_role sur
|
||||||
|
LEFT JOIN proposal_undertake pu ON pu.id = sur.cbdwid
|
||||||
|
AND sur.roleId = @roleId
|
||||||
|
left join sys_user u on u.id = sur.userId
|
||||||
|
where pu.unitCode = @unitId
|
||||||
|
""");
|
||||||
|
sql.setParam("roleId", type == 1 ? Roles.IN_CHARGE_LEADER : Roles.CONTRACTOR_PERSON);
|
||||||
|
sql.setParam("unitId", unitId);
|
||||||
|
return sysUnitService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询管理员和公众用户
|
||||||
|
*
|
||||||
|
* @param unitId 单位id
|
||||||
|
* @param type 类型 1.校领导 2.答复人
|
||||||
|
* @return {@link Object}
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object findProposalAdminAndPublicUser(@Param(value = "unitId", required = false) String unitId, Integer type) {
|
||||||
|
ProposalConfig config = sysUnitService.dao().fetch(ProposalConfig.class);
|
||||||
|
String schoolLeaderUnitCode = config.getSchoolLeaderUnitCode();
|
||||||
|
|
||||||
|
Sql publicUserSql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
su.id,
|
||||||
|
CONCAT( su.username, '(', su.loginname, ')', '- ', un.`name` ) `name`
|
||||||
|
FROM
|
||||||
|
sys_user su
|
||||||
|
LEFT JOIN sys_unit un ON un.id = su.unitid
|
||||||
|
WHERE
|
||||||
|
su.unitid = @unitId
|
||||||
|
""").setParam("unitId", type == 1 ? schoolLeaderUnitCode : unitId);
|
||||||
|
List<NutMap> publicUsers = sysUnitService.listMap(publicUserSql);
|
||||||
|
|
||||||
|
|
||||||
|
Sql adminUserSql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
su.id,
|
||||||
|
su.username
|
||||||
FROM
|
FROM
|
||||||
sys_user su
|
sys_user su
|
||||||
LEFT JOIN sys_user_role sur ON sur.userId = su.id
|
LEFT JOIN sys_user_role sur ON sur.userId = su.id
|
||||||
$condition
|
LEFT JOIN proposal_undertake pun ON pun.id = sur.cbdwid
|
||||||
|
$condition
|
||||||
""");
|
""");
|
||||||
|
Cnd adminCnd = Cnd.NEW();
|
||||||
|
// adminCnd.andEX("sur.cbdwid", "=", unitId);
|
||||||
|
adminCnd.andEX("pun.unitCode", "=", unitId);
|
||||||
|
adminCnd.andEX("sur.roleId", "=", type == 1 ? Roles.IN_CHARGE_LEADER : Roles.CONTRACTOR_PERSON);
|
||||||
|
adminUserSql.setCondition(adminCnd);
|
||||||
|
List<NutMap> adminUsers = sysUnitService.listMap(adminUserSql);
|
||||||
|
|
||||||
CndPlus cndPlus2 = CndPlus.create();
|
return Result.success(Map.of("publicUsers", publicUsers, "adminUsers", adminUsers));
|
||||||
cndPlus2.andExcludeEmpty("sur.roleId", "=", Roles.UNIT_MANGER);
|
}
|
||||||
cndPlus2.andExcludeEmpty("su.unitid", "=", unitId);
|
|
||||||
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
/**
|
||||||
cndPlus2.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
* 做管理用户设置建议
|
||||||
|
*
|
||||||
|
* @param userIds 用户id
|
||||||
|
* @param unitId 单位id
|
||||||
|
* @param type 类型 1.校领导 2.答复人
|
||||||
|
* @return {@link Object}
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object doSetProposalAdminUser(@Param(value = "userIds", required = false) String[] userIds, @Param(value = "unitId", required = false) String unitId, Integer type) {
|
||||||
|
String roleId = type == 1 ? Roles.IN_CHARGE_LEADER : Roles.CONTRACTOR_PERSON;
|
||||||
|
//清除此单位的角色
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.where("roleId", "=", roleId).and("unitId", "=", unitId));
|
||||||
|
ProposalUndertake proposalUndertake = dao.fetch(ProposalUndertake.class, Cnd.where("unitCode", "=", unitId));
|
||||||
|
if (Lang.isNotEmpty(proposalUndertake)) {
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.where("cbdwid", "=", proposalUndertake.getId()).and("roleId", "=", roleId));
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.setCondition(cndPlus2);
|
List<Sys_user_role> insertUserRoles = Arrays.stream(userIds).map(v -> {
|
||||||
|
Sys_user_role sysUserRole = new Sys_user_role();
|
||||||
|
sysUserRole.setUserId(v);
|
||||||
|
sysUserRole.setRoleId(roleId);
|
||||||
|
sysUserRole.setCbdwid(proposalUndertake.getId());
|
||||||
|
return sysUserRole;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
dao.insert(insertUserRoles);
|
||||||
|
|
||||||
map.setv("userList", sysUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cndPlus));
|
//增加负责人角色
|
||||||
map.setv("principal", sysUserService.listMap(sql));
|
if (type == 2) {
|
||||||
|
List<Sys_user_role> roles = Arrays.stream(userIds).map(v -> {
|
||||||
|
Sys_user_role sysUserRole = new Sys_user_role();
|
||||||
|
sysUserRole.setUserId(v);
|
||||||
|
sysUserRole.setRoleId(Roles.UNIT_MANGER);
|
||||||
|
sysUserRole.setUnitid(unitId);
|
||||||
|
return sysUserRole;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
dao.insert(roles);
|
||||||
|
}
|
||||||
|
|
||||||
return map;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object findChargeUnits(@Param(value = "unitId", required = false) String unitId, String userId) {
|
||||||
|
List<Sys_unit> units = dao.query(Sys_unit.class, Cnd.where("unitlevel", "=", 2));
|
||||||
|
|
||||||
|
Sql chargeUnitSql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
n.id
|
||||||
|
FROM
|
||||||
|
sys_user_role sur
|
||||||
|
LEFT JOIN proposal_undertake pu ON pu.id = sur.cbdwid
|
||||||
|
LEFT JOIN sys_unit n on n.id = pu.unitCode
|
||||||
|
WHERE
|
||||||
|
sur.roleId = @roleId
|
||||||
|
AND sur.userId = @userId
|
||||||
|
""");
|
||||||
|
chargeUnitSql.setParam("roleId", Roles.IN_CHARGE_LEADER);
|
||||||
|
chargeUnitSql.setParam("userId", userId);
|
||||||
|
String[] chargeUnits = (String[]) Daos.query(dao, chargeUnitSql.toString(), Sqls.callback.strs());
|
||||||
|
|
||||||
|
return Result.success(Map.of("allUnits", units, "chargeUnits", chargeUnits));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Object doSetChargeUnit(String userId, @Param("chargeUnits") String[] chargeUnits) {
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", userId).and("roleId", "=", Roles.IN_CHARGE_LEADER));
|
||||||
|
|
||||||
|
if (Lang.isNotEmpty(chargeUnits)) {
|
||||||
|
List<ProposalUndertake> undertakes = dao.query(ProposalUndertake.class, Cnd.where("unitCode", "in", chargeUnits));
|
||||||
|
List<Sys_user_role> userRoles = new ArrayList<>();
|
||||||
|
for (ProposalUndertake undertake : undertakes) {
|
||||||
|
Sys_user_role sysUserRole = new Sys_user_role();
|
||||||
|
sysUserRole.setUserId(userId);
|
||||||
|
sysUserRole.setRoleId(Roles.IN_CHARGE_LEADER);
|
||||||
|
sysUserRole.setCbdwid(undertake.getId());
|
||||||
|
userRoles.add(sysUserRole);
|
||||||
|
}
|
||||||
|
dao.insert(userRoles);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object findOtherRoleUsers(String unitId, String type) {
|
||||||
|
Sql leftSql = Sqls.create("select id,username,loginname from sys_user where unitId = @unitId");
|
||||||
|
leftSql.setParam("unitId", unitId);
|
||||||
|
List<NutMap> leftUsers = sysUnitService.listMap(leftSql);
|
||||||
|
|
||||||
|
Sql rightSql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
u.id
|
||||||
|
FROM
|
||||||
|
sys_user_role sur
|
||||||
|
LEFT JOIN sys_user u ON u.id = sur.userId
|
||||||
|
WHERE
|
||||||
|
u.unitId = @unitId
|
||||||
|
AND sur.roleId = @roleId
|
||||||
|
""");
|
||||||
|
rightSql.setParam("unitId", unitId);
|
||||||
|
rightSql.setParam("roleId", getOtherRoleByType(type));
|
||||||
|
String[] rightUsers = (String[]) Daos.query(dao, rightSql.toString(), Sqls.callback.strs());
|
||||||
|
return Result.success(Map.of("leftUsers", leftUsers, "rightUsers", rightUsers));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object otherRoleUserPageData(PageForm pageForm, String unitId, String type) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
u.username,
|
||||||
|
u.loginname,
|
||||||
|
u.sex,
|
||||||
|
u.mobile
|
||||||
|
FROM
|
||||||
|
sys_user_role sur
|
||||||
|
left join sys_user u on u.id = sur.userId
|
||||||
|
WHERE
|
||||||
|
u.unitId = @unitId
|
||||||
|
AND sur.roleId = @roleId
|
||||||
|
""");
|
||||||
|
sql.setParam("roleId", getOtherRoleByType(type));
|
||||||
|
sql.setParam("unitId", unitId);
|
||||||
|
return sysUnitService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("sys.manager.unit")
|
||||||
|
public Object doSetOtherRoleUser(String unitId, @Param(value = "users", required = false) String[] users, String type) {
|
||||||
|
String roleId = getOtherRoleByType(type);
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.where("unitId", "=", unitId).and("roleId", "=", roleId));
|
||||||
|
|
||||||
|
List<Sys_user_role> userRoles = new ArrayList<>();
|
||||||
|
for (String user : users) {
|
||||||
|
Sys_user_role userRole = new Sys_user_role();
|
||||||
|
userRole.setUserId(user);
|
||||||
|
userRole.setUnitid(unitId);
|
||||||
|
userRole.setRoleId(roleId);
|
||||||
|
userRoles.add(userRole);
|
||||||
|
}
|
||||||
|
dao.insert(userRoles);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getOtherRoleByType(String type) {
|
||||||
|
if (type.equals("unitDwsj")) {
|
||||||
|
return Roles.GH03;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
nutz.application.name=union_hhu
|
nutz.application.name=union_hhu
|
||||||
server.port=8080
|
server.port=8081
|
||||||
server.host=0.0.0.0
|
server.host=0.0.0.0
|
||||||
jetty.contextPath=/
|
jetty.contextPath=/
|
||||||
jetty.threadpool.idleTimeout=100000
|
jetty.threadpool.idleTimeout=100000
|
||||||
jetty.threadpool.minThreads=10
|
jetty.threadpool.minThreads=10
|
||||||
jetty.threadpool.maxThreads=20000
|
jetty.threadpool.maxThreads=20000
|
||||||
jetty.page.403=/error/403.htmla
|
jetty.page.403=/error/403.htmla
|
||||||
jetty.page.404=/error/404.html
|
jetty.page.404=/error/404.html
|
||||||
jetty.page.500=/error/500.html
|
jetty.page.500=/error/500.html
|
||||||
#结合ftp使用,或用nginx代理ftp路径
|
#结合ftp使用,或用nginx代理ftp路径
|
||||||
jetty.staticPath=D://files
|
jetty.staticPath=D://files
|
||||||
#开发模式静态资源
|
#开发模式静态资源
|
||||||
jetty.staticPathLocal=E:/project/UNION_HHU/src/main/resources/static
|
jetty.staticPathLocal=
|
||||||
nutz.mvc.ignore=^(.+[.])(jsp|png|gif|jpg|js|css|jpeg|html|mp3|mp4|ico|svg)$
|
nutz.mvc.ignore=^(.+[.])(jsp|png|gif|jpg|js|css|jpeg|html|mp3|mp4|ico|svg)$
|
||||||
nutz.mvc.exclusions=/favicon/*,/assets/*,/druid/*,/upload/*
|
nutz.mvc.exclusions=/favicon/*,/assets/*,/druid/*,/upload/*
|
||||||
ftp.enabled=true
|
ftp.enabled=true
|
||||||
@@ -86,7 +86,7 @@ shiro.url.login=/platform
|
|||||||
shiro.url.logout_redirect=/platform
|
shiro.url.logout_redirect=/platform
|
||||||
shiro.url.unauth=/platform
|
shiro.url.unauth=/platform
|
||||||
#开发时设置本地路径,便于调试
|
#开发时设置本地路径,便于调试
|
||||||
beetl.RESOURCE.rootLocal=E:/project/UNION_HHU/src/main/resources/views/
|
beetl.RESOURCE.rootLocal=
|
||||||
beetl.RESOURCE.root=views/
|
beetl.RESOURCE.root=views/
|
||||||
beetl.DELIMITER_STATEMENT_START=<!--#
|
beetl.DELIMITER_STATEMENT_START=<!--#
|
||||||
beetl.DELIMITER_STATEMENT_END=#-->
|
beetl.DELIMITER_STATEMENT_END=#-->
|
||||||
|
|||||||
@@ -26,6 +26,23 @@ const removeHTMLTag = (str) => {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function groupBy(array, key) {
|
||||||
|
return array.reduce((result, currentItem) => {
|
||||||
|
// 使用 key 函数获取分组的键
|
||||||
|
const groupKey = key(currentItem);
|
||||||
|
// 检查结果对象中是否已经有了这个键
|
||||||
|
const existingGroup = result.find(item => item.key === groupKey);
|
||||||
|
if (existingGroup) {
|
||||||
|
// 如果已存在,则将当前项添加到该组数组中
|
||||||
|
existingGroup.items.push(currentItem);
|
||||||
|
} else {
|
||||||
|
// 如果不存在,则创建新组并添加当前项
|
||||||
|
result.push({ key: groupKey, items: [currentItem] });
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
|
||||||
const CREATE_PREVIEW_URL = (val) => {
|
const CREATE_PREVIEW_URL = (val) => {
|
||||||
return FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
return FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -10,8 +10,8 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
||||||
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
||||||
<van-field readonly :value="viewData.unitname" label="单位"></van-field>
|
<van-field readonly :value="viewData.dwname" label="单位"></van-field>
|
||||||
<van-field readonly :value="viewData.unionname" label="工会"></van-field>
|
<van-field readonly :value="viewData.ghname" label="工会"></van-field>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div class="van-cell-group__title">
|
<div class="van-cell-group__title">
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
@@ -19,88 +19,143 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field readonly name="type" :value="viewData.hdsbzpzt" label="作品主题"></van-field>
|
<van-field readonly name="type" :value="viewData.hdname" label="作品主题"></van-field>
|
||||||
<van-field readonly name="type" :value="viewData.lname" label="活动类别"></van-field>
|
<van-field readonly name="type" :value="viewData.hdlbname" label="活动类别"></van-field>
|
||||||
<van-field readonly name="type" :value="viewData.step_count" label="健步走步数"
|
<van-field readonly name="type" :value="viewData.step_count" label="健步走步数"
|
||||||
v-if="viewData.step_count"></van-field>
|
v-if="viewData.step_count"></van-field>
|
||||||
<van-field readonly name="type" :value="viewData.zname" label="作品类别" v-if="viewData.zname"></van-field>
|
<van-field readonly name="type" :value="viewData.zname" label="作品类别"
|
||||||
<van-field readonly :value="viewData.hdsbzpms" label="简介"
|
v-if="viewData.zname"></van-field>
|
||||||
|
<van-field readonly :value="viewData.hdsbzpms" label="创作说明"
|
||||||
input-align="left"
|
input-align="left"
|
||||||
style="flex-flow: column"
|
style="flex-flow: column"
|
||||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
rows="2" type="textarea" show-word-limit autosize></van-field>
|
||||||
|
|
||||||
<van-field label="照片" style="flex-flow: column" input-align="left">
|
<van-field label="作品" style="flex-flow: column" input-align="left">
|
||||||
<template #label>
|
|
||||||
<div class="mb10">照  片</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
<template #input>
|
||||||
<vant-file-upload :files.sync="img2List" view :del="false"
|
<vant-file-upload :files.sync="img2List" view :del="false"
|
||||||
v-if="img2List&&img2List.length>0"></vant-file-upload>
|
v-if="img2List&&img2List.length>0"></vant-file-upload>
|
||||||
<div v-if="img2List.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
<div v-if="img2List.length===0"
|
||||||
|
style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||||
没有照片。
|
没有照片。
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
|
<!--
|
||||||
|
<van-field label="视频" style="flex-flow: column" input-align="left">
|
||||||
|
<template #label>
|
||||||
|
<div class="mb10">视  频</div>
|
||||||
|
</template>
|
||||||
|
<template #input>
|
||||||
|
<div v-if="videoList.length>0">
|
||||||
|
<div v-for="item in videoList" class="mt10">
|
||||||
|
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls
|
||||||
|
preload="auto"
|
||||||
|
width="640" height="264"
|
||||||
|
data-setup="{}" webkit-playsinline='true' playsinline='true'
|
||||||
|
x-webkit-airplay='true'
|
||||||
|
x5-video-player-type='h5' x5-video-player-fullscreen='true'
|
||||||
|
x5-video-ignore-metadata='true'>
|
||||||
|
<source :src="item.url" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="videoList.length===0"
|
||||||
|
style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||||
|
没有视频。
|
||||||
|
</div>
|
||||||
|
|
||||||
<van-field label="视频" style="flex-flow: column" input-align="left">
|
</template>
|
||||||
<template #label>
|
</van-field>
|
||||||
<div class="mb10">视  频</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<div v-if="videoList.length>0">
|
|
||||||
<div v-for="item in videoList" class="mt10">
|
|
||||||
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
|
|
||||||
width="640" height="264"
|
|
||||||
data-setup="{}" webkit-playsinline='true' playsinline='true' x-webkit-airplay='true'
|
|
||||||
x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true'>
|
|
||||||
<source :src="item.url" type="video/mp4">
|
|
||||||
</video>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="videoList.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有视频。
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
<van-field label="音频" style="flex-flow: column" input-align="left">
|
||||||
</van-field>
|
<template #label>
|
||||||
|
<div class="mb10">音  频</div>
|
||||||
|
</template>
|
||||||
|
<template #input>
|
||||||
|
<div v-if="audioList&&audioList.length>0">
|
||||||
|
<div v-for="audio in audioList" class="mt10">
|
||||||
|
<audio id="amusic" preload="auto" controls>
|
||||||
|
<source :src="FILE_DOMAIN+audio.url"/>
|
||||||
|
</audio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center;color: #c2bbbb;font-size: 10px;"
|
||||||
|
v-if="audioList.length===0">
|
||||||
|
没有音频。
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
|
||||||
<van-field label="音频" style="flex-flow: column" input-align="left">
|
<van-field label="文档" style="flex-flow: column" input-align="left">
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="mb10">音  频</div>
|
<div class="mb10">文  档</div>
|
||||||
</template>
|
</template>
|
||||||
<template #input>
|
<template #input>
|
||||||
<div v-if="audioList&&audioList.length>0">
|
<div v-for="(item,index) in docList" v-if="docList&&docList.length>0">
|
||||||
<div v-for="audio in audioList" class="mt10">
|
<div class="text-nowrap color-puple"
|
||||||
<audio id="amusic" preload="auto" controls>
|
@click="viewFile(docList)">
|
||||||
<source :src="FILE_DOMAIN+audio.url"/>
|
{{ item.filename }}
|
||||||
</audio>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-if="docList.length===0"
|
||||||
<div style="text-align: center;color: #c2bbbb;font-size: 10px;" v-if="audioList.length===0">
|
style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||||
没有音频。
|
没有文档。
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>-->
|
||||||
|
|
||||||
<van-field label="文档" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">文  档</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<div v-for="(item,index) in docList" v-if="docList&&docList.length>0">
|
|
||||||
<div class="text-nowrap color-puple"
|
|
||||||
@click="previewFile(item.filepath,item.filename,docList,index,item.id)">
|
|
||||||
{{ item.filename }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="docList.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有文档。
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
|
||||||
|
<template v-if="viewData.union">
|
||||||
|
<div class="van-cell-group__title">
|
||||||
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
|
分工会审核信息
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<van-cell-group>
|
||||||
|
<van-field readonly name="type" :value="viewData.union.username" label="审核人"></van-field>
|
||||||
|
<van-field label="审核时间" :value="viewData.union.auditTime" left-icon="clock-o"
|
||||||
|
readonly></van-field>
|
||||||
|
<van-field label="审核意见" left-icon="chat-o"
|
||||||
|
:value="viewData.union.auditOpinion ? viewData.union.auditOpinion : '暂无'"
|
||||||
|
readonly></van-field>
|
||||||
|
<van-field name="sign" label="签字">
|
||||||
|
<template #input>
|
||||||
|
<van-image width="200" height="100" :src="viewData.union.auditSign"
|
||||||
|
v-if="viewData.union.auditSign"></van-image>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-cell-group>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-if="viewData.school">
|
||||||
|
<div class="van-cell-group__title">
|
||||||
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
|
校工会审核信息
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<van-cell-group>
|
||||||
|
<van-field readonly name="type" :value="viewData.school.username" label="审核人"></van-field>
|
||||||
|
<van-field label="审核时间" :value="viewData.school.auditTime" left-icon="clock-o"
|
||||||
|
readonly></van-field>
|
||||||
|
<van-field label="审核意见" left-icon="chat-o"
|
||||||
|
:value="viewData.school.auditOpinion ? viewData.school.auditOpinion : '暂无'"
|
||||||
|
readonly></van-field>
|
||||||
|
<van-field name="sign" label="签字">
|
||||||
|
<template #input>
|
||||||
|
<van-image width="200" height="100" :src="viewData.school.auditSign"
|
||||||
|
v-if="viewData.school.auditSign"></van-image>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-cell-group>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</van-form>
|
</van-form>
|
||||||
|
|
||||||
|
|
||||||
@@ -145,12 +200,30 @@ module.exports = {
|
|||||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
viewFile(docList) {
|
||||||
|
if (docList && docList.length > 0) {
|
||||||
|
let pdfStreamUrl = encodeURIComponent(FILE_STREAM_PREVIEW_ADDRESS + '?id=' + docList[0].id) //将路径转码
|
||||||
|
window.open('/assets/platform/plugins/pdfJs/web/viewer.html?file=' + pdfStreamUrl, docList[0].filename)
|
||||||
|
} else {
|
||||||
|
this.$modal.msg('没有可查阅的文件')
|
||||||
|
}
|
||||||
|
},
|
||||||
async getInfo(id) {
|
async getInfo(id) {
|
||||||
|
const toast = vant.Toast.loading({
|
||||||
|
duration: 0,
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
message: '数据查询中...',
|
||||||
|
})
|
||||||
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
|
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
|
||||||
const refs = await $.get("/mobile/wmhd/list/findOne", {id})
|
const refs = await $.get("/platform/hd/wmhd/findxxById", {id})
|
||||||
|
|
||||||
if (refs) {
|
if (refs) {
|
||||||
this.viewData = refs[0]
|
this.viewData = refs.data
|
||||||
|
this.videoList = []
|
||||||
|
this.img2List = []
|
||||||
|
this.docList = []
|
||||||
|
this.audioList = []
|
||||||
data.forEach(val => {
|
data.forEach(val => {
|
||||||
val.fjname = val.filename
|
val.fjname = val.filename
|
||||||
val.fjurl = val.filepath
|
val.fjurl = val.filepath
|
||||||
@@ -172,6 +245,7 @@ module.exports = {
|
|||||||
this.viewData = {}
|
this.viewData = {}
|
||||||
this.$toast.fail('获取信息失败');
|
this.$toast.fail('获取信息失败');
|
||||||
}
|
}
|
||||||
|
toast.clear()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
@@ -193,4 +267,4 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -123,6 +123,10 @@ module.exports = {
|
|||||||
this.viewData = resp.data
|
this.viewData = resp.data
|
||||||
this.organizationAudit = resp.data.organizationAudit
|
this.organizationAudit = resp.data.organizationAudit
|
||||||
this.schoolAudit = resp.data.schoolAudit
|
this.schoolAudit = resp.data.schoolAudit
|
||||||
|
} else {
|
||||||
|
this.viewData = {}
|
||||||
|
this.organizationAudit = {}
|
||||||
|
this.schoolAudit = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
|
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<!-- <tr>
|
||||||
<th>签字</th>
|
<th>签字</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<div>
|
<div>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
<span v-else>暂无</span>
|
<span v-else>暂无</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>-->
|
||||||
</table>
|
</table>
|
||||||
</border-table>
|
</border-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|||||||
@@ -81,7 +81,8 @@
|
|||||||
|
|
||||||
<template v-if="viewInfo.zbxx.scoringMode === 1 && viewInfo.zbxx.reviewMode === 1">
|
<template v-if="viewInfo.zbxx.scoringMode === 1 && viewInfo.zbxx.reviewMode === 1">
|
||||||
<vi-title title="职工评家总结"></vi-title>
|
<vi-title title="职工评家总结"></vi-title>
|
||||||
<file-upload :files.sync="viewInfo.commentPeo.files" view></file-upload>
|
<file-upload v-if="viewInfo.commentPeo.files && viewInfo.commentPeo.files.length > 0" :files.sync="viewInfo.commentPeo.files" view></file-upload>
|
||||||
|
<el-empty v-else :image-size="100" description="未上传总结"></el-empty>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|||||||
@@ -159,139 +159,106 @@
|
|||||||
|
|
||||||
<vi-title2 title="测评内容"></vi-title2>
|
<vi-title2 title="测评内容"></vi-title2>
|
||||||
|
|
||||||
<el-form-item label="" label-width="0" v-for="(nr,idx) in data.nrs">
|
<el-form-item label="" label-width="0" v-for="(nr,idx) in data.nrs">
|
||||||
|
|
||||||
<el-row type="flex" align="middle" justify="space-between">
|
<el-row type="flex" align="middle" justify="space-between">
|
||||||
<el-input v-model="nr.content" :disabled="is_view" maxlength="30" style="width: 50%"
|
<el-input v-model="nr.content" :disabled="is_view" maxlength="30" style="width: 50%"
|
||||||
placeholder="请填写测评内容">
|
placeholder="请填写测评内容">
|
||||||
<template slot="prepend"><span>
|
<template slot="prepend"><span>
|
||||||
{{ nr.contentNumber = idx + 1 }}</span></template>
|
{{ nr.contentNumber = idx + 1 }}</span></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button v-if="!is_view" size="medium" :disabled="data.nrs.length<=1" type="danger"
|
<el-button v-if="!is_view" size="medium" :disabled="data.nrs.length<=1" type="danger"
|
||||||
@click="data.nrs.splice(idx,1)"
|
@click="data.nrs.splice(idx,1)"
|
||||||
icon="el-icon-delete"></el-button>
|
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">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写测评标准" type="textarea"
|
||||||
|
rows="2"></el-input>
|
||||||
|
<div v-else style="white-space:break-spaces">{{ row.inspection }}</div>
|
||||||
|
</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 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>
|
</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>
|
<div>
|
||||||
|
|
||||||
<drawer-user-scope
|
<drawer-user-scope
|
||||||
@@ -303,10 +270,8 @@
|
|||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const METHOD_NAME = "change"
|
const METHOD_NAME = "change"
|
||||||
|
|||||||
@@ -9,15 +9,15 @@
|
|||||||
/>
|
/>
|
||||||
<van-number-keyboard safe-area-inset-bottom/>
|
<van-number-keyboard safe-area-inset-bottom/>
|
||||||
<title></title>
|
<title></title>
|
||||||
<link rel="stylesheet" href="https://cdn.staticfile.org/vant/2.12.5/index.min.css"/>
|
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/index.min.css"/>
|
||||||
|
|
||||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
|
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
|
||||||
|
|
||||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||||
<script src="https://cdn.staticfile.org/vant/2.12.5/vant.min.js"></script>
|
<script src="${base!}/assets/platform/plugins/vant/vant.min.js"></script>
|
||||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||||
<script src="${base!}/assets/mobile/js/basic.js"></script>
|
<script src="${base!}/assets/mobile/js/basic.js?v=0.0.1"></script>
|
||||||
|
|
||||||
|
|
||||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||||
@@ -48,6 +48,13 @@
|
|||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||||
|
|
||||||
|
<script src="https://cdn-go.cn/cdn/vod-js-sdk-v6/latest/vod-js-sdk-v6.js"></script>
|
||||||
|
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.min.css" rel="stylesheet"/>
|
||||||
|
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 HLS 格式的视频,需要在 tcplayer.vx.x.x.min.js 之前引入 hls.min.x.xx.xm.js。-->
|
||||||
|
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/hls.min.0.13.2m.js"></script>
|
||||||
|
<!--播放器脚本文件-->
|
||||||
|
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.3.0.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="https://cdn-go.cn/cdn/vod-js-sdk-v6/latest/vod-js-sdk-v6.js"></script>
|
|
||||||
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/tcplayer.min.css" rel="stylesheet"/>
|
<!--<script src="/assets/platform/plugins/vod/vod-js-sdk-v6.js"></script>-->
|
||||||
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 HLS 格式的视频,需要在 tcplayer.vx.x.x.min.js 之前引入 hls.min.x.xx.xm.js。-->
|
<!--<link href="/assets/platform/plugins/vod/tcplayer.min.css"/>-->
|
||||||
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/libs/hls.min.0.13.2m.js"></script>
|
<!--<script src="/assets/platform/plugins/vod/hls.min.0.13.2m.js"></script>-->
|
||||||
<!--播放器脚本文件-->
|
<!--<script src="/assets/platform/plugins/vod/tcplayer.v4.3.0.min.js"></script>-->
|
||||||
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/tcplayer.v4.3.0.min.js"></script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#app {
|
#app {
|
||||||
@@ -33,6 +33,7 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
.video-container {
|
.video-container {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#player-container-id {
|
#player-container-id {
|
||||||
@@ -75,7 +76,7 @@ layout("/mobile/platform.html"){
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.myWatchRecord{
|
.myWatchRecord {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,19 +93,66 @@ layout("/mobile/platform.html"){
|
|||||||
></van-nav-bar>
|
></van-nav-bar>
|
||||||
|
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
<video v-if="isPlay" id="player-container-id" preload="auto" playsinline
|
<video id="player-container-id" preload="auto"
|
||||||
|
autoplay
|
||||||
|
playsinline
|
||||||
webkit-playsinline>
|
webkit-playsinline>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<van-image
|
<!-- <div v-if="!isPlay" style=" height: 100%;-->
|
||||||
v-else
|
<!-- background: #000;-->
|
||||||
style="width: 100%;height: 100%"
|
<!-- position: absolute;-->
|
||||||
:src="FILE_DOMAIN+'/fileStreamPreview?id='+albumInfo.cover"
|
<!-- top: 0;-->
|
||||||
></van-image>
|
<!-- left: 0;-->
|
||||||
|
<!-- right: 0;-->
|
||||||
|
<!-- bottom: 0;">-->
|
||||||
|
<!-- <van-image-->
|
||||||
|
<!-- style="width: 90%;-->
|
||||||
|
<!-- height: 100%;-->
|
||||||
|
<!-- z-index: 999;"-->
|
||||||
|
<!-- fit="contain"-->
|
||||||
|
<!-- :src="FILE_DOMAIN+'/fileStreamPreview?id='+albumInfo.cover"-->
|
||||||
|
<!-- ></van-image>-->
|
||||||
|
<!-- <div class="tcp-skin">-->
|
||||||
|
<!-- <div class="vjs-big-play-button">-->
|
||||||
|
<!-- <div class="vjs-button-icon">-->
|
||||||
|
<!-- <svg height="100%" width="100%" viewBox="0 0 484 348">-->
|
||||||
|
<!-- <path class="draw-fill" transform="translate(4 4)"-->
|
||||||
|
<!-- d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"></path>-->
|
||||||
|
<!-- <path transform="translate(4 4)"-->
|
||||||
|
<!-- d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z"-->
|
||||||
|
<!-- style="fill:#fff ;"></path>-->
|
||||||
|
<!-- </svg>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<van-tabs v-model="tabIndex" sticky>
|
<van-tabs v-model="tabIndex" sticky>
|
||||||
|
<!-- <van-tab title="目录">-->
|
||||||
|
<!-- <div style="height: 5px;background-color: #f6f7f9"></div>-->
|
||||||
|
|
||||||
|
<!-- <van-cell-group class="video-list">-->
|
||||||
|
<!-- <van-cell v-for="(o,i) in videoList" :key="o.id" @click="playVideo(o)">-->
|
||||||
|
<!-- <template #title>-->
|
||||||
|
<!-- <van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>-->
|
||||||
|
<!-- <span style="margin-right: 10px">-->
|
||||||
|
<!-- {{i+1}}.-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<!-- <span>-->
|
||||||
|
<!-- {{o.title}}-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template #label>-->
|
||||||
|
<!-- <!– {{getWatchStatus(o)}}–>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template>-->
|
||||||
|
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </van-cell>-->
|
||||||
|
<!-- </van-cell-group>-->
|
||||||
|
<!-- </van-tab>-->
|
||||||
<van-tab title="介绍">
|
<van-tab title="介绍">
|
||||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||||
|
|
||||||
@@ -124,33 +172,10 @@ layout("/mobile/platform.html"){
|
|||||||
</van-cell>
|
</van-cell>
|
||||||
|
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="目录">
|
|
||||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
|
||||||
|
|
||||||
<van-cell-group class="video-list">
|
|
||||||
<van-cell v-for="(o,i) in videoList" :key="o.id" @click="playVideo(o)">
|
|
||||||
<template #title>
|
|
||||||
<van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>
|
|
||||||
<span style="margin-right: 10px">
|
|
||||||
{{i+1}}.
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{{o.title}}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<template #label>
|
|
||||||
<!-- {{getWatchStatus(o)}}-->
|
|
||||||
</template>
|
|
||||||
<template>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</van-cell>
|
|
||||||
</van-cell-group>
|
|
||||||
</van-tab>
|
|
||||||
<van-tab title="学习记录">
|
<van-tab title="学习记录">
|
||||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||||
<van-cell-group class="video-list">
|
<van-cell-group class="video-list">
|
||||||
<van-cell v-for="(o,i) in videoList" :key="o.id" @click="playVideo(o)">
|
<van-cell v-for="(o,i) in videoList" :key="o.id">
|
||||||
<template #title>
|
<template #title>
|
||||||
<van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>
|
<van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>
|
||||||
<span style="margin-right: 10px">
|
<span style="margin-right: 10px">
|
||||||
@@ -161,19 +186,21 @@ layout("/mobile/platform.html"){
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div v-if="o.everyDayMaxWatchNum && o.everyDayMaxWatchNum>0" style="padding: 10px 0;color: #0a84ff;white-space: normal">
|
<div v-if="o.everyDayMaxWatchNum && o.everyDayMaxWatchNum>0"
|
||||||
|
style="padding: 10px 0;color: #0a84ff;white-space: normal">
|
||||||
本视频在活动结束时每天最多只会统计
|
本视频在活动结束时每天最多只会统计
|
||||||
<span style="color: #0a84ff;font-weight: bold">{{o.everyDayMaxWatchNum}}</span>
|
<span style="color: #0a84ff;font-weight: bold">{{o.everyDayMaxWatchNum}}</span>
|
||||||
次完整观看记录,您可以无限制的观看。
|
次完整观看记录,您可以无限制的观看。
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(v,k) in Object.groupBy(watchRecordList,v=>v.watchTime)" :key="k" class="myWatchRecord">
|
<div v-for="(v,index) in groupBy(watchRecordList,v=>v.watchTime)" :key="index"
|
||||||
|
class="myWatchRecord">
|
||||||
<div style="display: flex;justify-content: space-between">
|
<div style="display: flex;justify-content: space-between">
|
||||||
<div>
|
<div>
|
||||||
{{moment(k).format('YYYY年MM月DD日')}}
|
{{moment(v.key).format('YYYY年MM月DD日')}}
|
||||||
</div>
|
</div>
|
||||||
<div style="color: #000000;">
|
<div style="color: #000000;">
|
||||||
观看次数
|
观看次数
|
||||||
<span style="font-weight: bold">{{v.length}}</span>
|
<span style="font-weight: bold">{{v.items && v.items.filter(v=>v.finish).length}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -184,9 +211,9 @@ layout("/mobile/platform.html"){
|
|||||||
</van-tab>
|
</van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
|
|
||||||
<div class="bottom-wrap" v-show="isPlay">
|
<!-- <div class="bottom-wrap" v-show="isPlay">-->
|
||||||
<van-button type="info" block @click="endLearn">上传学习记录</van-button>
|
<!-- <van-button type="info" block @click="endLearn">上传学习记录</van-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -213,6 +240,8 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
player: null,
|
player: null,
|
||||||
|
|
||||||
|
vvv: []
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -221,8 +250,8 @@ layout("/mobile/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
async getVideoInfo() {
|
async getVideoInfo() {
|
||||||
const {data} = await $.get('/mobile/trainEducation/getVideoList', {albumId: this.albumId})
|
const {data} = await $.get('/mobile/trainEducation/getVideoList', {albumId: this.albumId})
|
||||||
|
this.vvv = data
|
||||||
this.videoList = data
|
this.videoList = data
|
||||||
|
|
||||||
},
|
},
|
||||||
async getAlbumInfo() {
|
async getAlbumInfo() {
|
||||||
const {data} = await $.get('/mobile/trainEducation/getAlbumInfo', {id: this.albumId})
|
const {data} = await $.get('/mobile/trainEducation/getAlbumInfo', {id: this.albumId})
|
||||||
@@ -364,7 +393,7 @@ layout("/mobile/platform.html"){
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$modal.msgSuccess('上传成功')
|
this.$modal.msgSuccess('上传成功')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError('上传成功')
|
this.$modal.msgError('上传失败')
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
@@ -373,14 +402,19 @@ layout("/mobile/platform.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
async created() {
|
||||||
// this.watchPage()
|
// this.watchPage()
|
||||||
const id = this.GetQueryString("id")
|
const id = GetQueryString("id")
|
||||||
if (id) {
|
if (id) {
|
||||||
this.albumId = id
|
this.albumId = id
|
||||||
this.getAlbumInfo()
|
await this.getAlbumInfo()
|
||||||
this.getVideoInfo()
|
await this.getVideoInfo()
|
||||||
this.getMyWatchRecord()
|
await this.getMyWatchRecord()
|
||||||
|
if (this.videoList && this.videoList.length > 0) {
|
||||||
|
this.playVideo(this.videoList[0])
|
||||||
|
} else {
|
||||||
|
this.$toast('暂无视频学习')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -140,6 +140,14 @@ layout("/mobile/platform.html"){
|
|||||||
this.pageData()
|
this.pageData()
|
||||||
},
|
},
|
||||||
async toCommentator(o){
|
async toCommentator(o){
|
||||||
|
|
||||||
|
const start = new Date(o.startTime);
|
||||||
|
const end = new Date(o.endTime);
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
// 检查当前时间是否在 startTime 和 endTime 之间
|
||||||
|
return now >= start && now <= end;
|
||||||
|
|
||||||
//自评模式
|
//自评模式
|
||||||
if (o.reviewMode == 1 && !o.canJoin) {
|
if (o.reviewMode == 1 && !o.canJoin) {
|
||||||
vant.Dialog.alert({
|
vant.Dialog.alert({
|
||||||
@@ -158,7 +166,7 @@ layout("/mobile/platform.html"){
|
|||||||
confirmButtonColor: '#1867b0'
|
confirmButtonColor: '#1867b0'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}``
|
||||||
|
|
||||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
||||||
if (resp.data > 0){
|
if (resp.data > 0){
|
||||||
|
|||||||
@@ -265,12 +265,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column align="center" header-align="center" label="上传时间" prop="hdsbsj"
|
<el-table-column align="center" header-align="center" label="上传时间" prop="hdsbsj"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="申请状态"
|
<!--<el-table-column align="center" header-align="center" label="申请状态"
|
||||||
prop="auditState" sortable>
|
prop="auditState" sortable>
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<span :style="'color:'+scope.row.statecolor">{{scope.row.statename}}</span>
|
<span :style="'color:'+scope.row.statecolor">{{scope.row.statename}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>-->
|
||||||
<!-- <el-table-column align="center" header-align="center" label="总点赞数"
|
<!-- <el-table-column align="center" header-align="center" label="总点赞数"
|
||||||
prop="dz_znum" sortable>
|
prop="dz_znum" sortable>
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
|
|||||||
@@ -721,9 +721,9 @@ layout("/layouts/platform.html"){
|
|||||||
// this.getActivitybxAgenda();
|
// this.getActivitybxAgenda();
|
||||||
this.getDifficultAgenda();
|
this.getDifficultAgenda();
|
||||||
this.getCondolenceAgenda();
|
this.getCondolenceAgenda();
|
||||||
this.getTaAgenda();
|
// this.getTaAgenda();
|
||||||
this.getRxdjAgenda();
|
this.getRxdjAgenda();
|
||||||
this.getMemberAgenda();
|
// this.getMemberAgenda();
|
||||||
this.getSyrAgenda();
|
this.getSyrAgenda();
|
||||||
this.getOfferAdviceAgenda()
|
this.getOfferAdviceAgenda()
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -46,8 +46,16 @@ layout("/layouts/platform.html"){
|
|||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
>
|
>
|
||||||
<template v-if="column.prop==='sumDuration'" scope="{row}">
|
<!-- <template v-if="column.prop==='sumDuration'" scope="{row}">-->
|
||||||
{{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}
|
<!-- {{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<template v-if="column.prop==='isQualified'" scope="{row}">
|
||||||
|
<span v-if="row.watchCount>=row.qualifiedNum" class="text-success">
|
||||||
|
是
|
||||||
|
</span>
|
||||||
|
<span v-else class="text-danger">
|
||||||
|
否
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column align="center" header-align="center" label="操作" width="200">-->
|
<!-- <el-table-column align="center" header-align="center" label="操作" width="200">-->
|
||||||
@@ -110,7 +118,8 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'unitname', label: '单位'},
|
{prop: 'unitname', label: '单位'},
|
||||||
{prop: 'unionname', label: '分工会'},
|
{prop: 'unionname', label: '分工会'},
|
||||||
// {prop: 'studyDuration', label: '观看总时长'},
|
// {prop: 'studyDuration', label: '观看总时长'},
|
||||||
{prop: 'watchCount', label: '学习总次数'}
|
{prop: 'watchCount', label: '学习总次数'},
|
||||||
|
{prop: 'isQualified', label: '是否达标'},
|
||||||
],
|
],
|
||||||
viewTableColumns: [
|
viewTableColumns: [
|
||||||
{prop: 'username', label: '姓名'},
|
{prop: 'username', label: '姓名'},
|
||||||
@@ -118,7 +127,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'unitname', label: '单位'},
|
{prop: 'unitname', label: '单位'},
|
||||||
{prop: 'unionname', label: '分工会'},
|
{prop: 'unionname', label: '分工会'},
|
||||||
// {prop: 'studyDuration', label: '观看总时长'},
|
// {prop: 'studyDuration', label: '观看总时长'},
|
||||||
{prop: 'watchCount', label: '学习总次数'}
|
{prop: 'watchCount', label: '学习总次数'},
|
||||||
],
|
],
|
||||||
viewPageForm: {
|
viewPageForm: {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
|
|||||||
@@ -140,6 +140,10 @@ layout("/layouts/platform.html"){
|
|||||||
<el-input-number :min="1" :max="100" v-model="formData.everyDayMaxWatchNum"></el-input-number>
|
<el-input-number :min="1" :max="100" v-model="formData.everyDayMaxWatchNum"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="合格/达标次数" prop="qualifiedNum">
|
||||||
|
<el-input-number :min="1" :max="1000" v-model="formData.qualifiedNum"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否启用" prop="disabled">
|
<el-form-item label="是否启用" prop="disabled">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="formData.disabled"
|
v-model="formData.disabled"
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ layout("/layouts/platform.html"){
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="资料阅览" :visible.sync="viewDialogVisible">
|
<el-dialog title="资料阅览" :visible.sync="viewDialogVisible" :modal-append-to-body="false">
|
||||||
<el-descriptions class="margin-top" title="" :column="2" border>
|
<el-descriptions class="margin-top" title="" :column="2" border>
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item span="2">
|
||||||
<template slot="label">资料名称</template>
|
<template slot="label">资料名称</template>
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item class="is-required" label="基层工会简况"
|
<el-form-item class="is-required" label="基层工会简况"
|
||||||
prop="basicInformation">
|
prop="basicInformation">
|
||||||
<text-editor v-model="formData.basicInformation"></text-editor>
|
<text-editor v-model="formData.basicInformation"></text-editor>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<span style="color: #0a84ff">当前字数:{{ formData.basicInformation ? (dd3s.html2txt(formData.basicInformation).length) : 0 }}</span>
|
||||||
|
<span>{{ ';最多500字' }}</span>
|
||||||
|
</div>
|
||||||
<!-- <el-input type="textarea" v-model="formData.basicInformation" maxlength="500" show-word-limit :rows="10"></el-input>-->
|
<!-- <el-input type="textarea" v-model="formData.basicInformation" maxlength="500" show-word-limit :rows="10"></el-input>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -193,11 +193,11 @@ layout("/layouts/platform.html"){
|
|||||||
<el-col :lg="24" :sm="24">
|
<el-col :lg="24" :sm="24">
|
||||||
<el-form-item required label="附件上传" prop="files">
|
<el-form-item required label="附件上传" prop="files">
|
||||||
<file-upload :files.sync="formData.files" card :max="10"
|
<file-upload :files.sync="formData.files" card :max="10"
|
||||||
:type="['doc','docx','xls','xlsx','pdf','ppt','mp4', 'jpg', 'png', 'jpeg']">
|
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']">
|
||||||
<template #el-upload__tip>
|
<template #el-upload__tip>
|
||||||
</template>
|
</template>
|
||||||
</file-upload>
|
</file-upload>
|
||||||
<div class="el-upload__tip">可上传照片、视频、文档等资料,视频只能上传MP4格式</div>
|
<div class="el-upload__tip">可上传照片、文档等资料</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -248,7 +248,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
sublime.jumpPagePjax('/platform/wakeshome/info/mine')
|
||||||
}, 500)
|
}, 500)
|
||||||
} else {
|
} else {
|
||||||
this.notifyWarning(resp.msg)
|
this.notifyWarning(resp.msg)
|
||||||
@@ -270,7 +270,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
sublime.jumpPagePjax('/platform/wakeshome/info/mine')
|
||||||
}, 500)
|
}, 500)
|
||||||
} else {
|
} else {
|
||||||
this.notifyWarning(resp.msg)
|
this.notifyWarning(resp.msg)
|
||||||
@@ -296,7 +296,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||||
} else {
|
} else {
|
||||||
const resp = await $.get('/platform/wakeshome/declaration/mine/getInfoById',{id:this.id})
|
const resp = await $.get('/platform/wakeshome/info/mine/getInfoById',{id:this.id})
|
||||||
if (resp.code === 0){
|
if (resp.code === 0){
|
||||||
this.formData = {...resp.data}
|
this.formData = {...resp.data}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="openEdit(row)"
|
<el-button @click="openEdit(row)"
|
||||||
size="mini" type="primary"
|
size="mini" type="primary"
|
||||||
v-if="[8100].includes(row.state) || !row.state">编辑
|
v-if="[8100,8125].includes(row.state) || !row.state">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="doDelete(row)"
|
<el-button @click="doDelete(row)"
|
||||||
size="mini" type="danger"
|
size="mini" type="danger"
|
||||||
@@ -143,7 +143,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
openEdit(row) {
|
||||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply?id=' + row.id)
|
sublime.jumpPagePjax('/platform/wakeshome/info/apply?id=' + row.id)
|
||||||
},
|
},
|
||||||
async flushUnits() {
|
async flushUnits() {
|
||||||
this.$set(this.pageForm, "unitId", null)
|
this.$set(this.pageForm, "unitId", null)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||||
<template scope="{row}">
|
<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="openView(row)" 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="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>
|
<el-button @click="doRollBack(row.id)" v-if="[8125,8130].includes(row.state) || !row.state" size="mini" type="danger">撤回</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ layout("/layouts/platform.html"){
|
|||||||
align="center">
|
align="center">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-input v-model="row.inspection"
|
<el-input v-model="row.inspection"
|
||||||
readonly></el-input>
|
readonly type="textarea" rows="2"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -396,12 +396,15 @@ layout("/layouts/platform.html"){
|
|||||||
if (!this.formData.reviewResult) {
|
if (!this.formData.reviewResult) {
|
||||||
await this.createdReviewResult()
|
await this.createdReviewResult()
|
||||||
}
|
}
|
||||||
|
this.formData.bzList = JSON.stringify(this.formData.bzList)
|
||||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit',this.formData)
|
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit',this.formData)
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success('提交成功')
|
this.$message.success('提交成功')
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.formData = {}
|
this.formData = {}
|
||||||
this.pageData()
|
this.pageData()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -437,8 +440,6 @@ layout("/layouts/platform.html"){
|
|||||||
this.formData.evaluatedPersonName = user.username
|
this.formData.evaluatedPersonName = user.username
|
||||||
this.formData.evaluatedPersonType = user.evaluatedPersonType
|
this.formData.evaluatedPersonType = user.evaluatedPersonType
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formData.bzList = JSON.stringify(this.formData.bzList)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #view>
|
<template #view>
|
||||||
|
|
||||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|||||||
@@ -81,8 +81,12 @@ layout("/layouts/platform.html"){
|
|||||||
width="240px" fixed="right">
|
width="240px" fixed="right">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button size="mini" @click="openView(row)">查看</el-button>
|
<el-button size="mini" @click="openView(row)">查看</el-button>
|
||||||
<el-tooltip :content="canDownload ? ('导出【'+ row.unionName +'】管理员自我评议的评议结果') : ('导出【'+ row.unionName +'】下所有评议结果的压缩包') " placement="top">
|
<el-tooltip
|
||||||
<el-button v-if="canDownload" size="mini" type="primary" @click="doDownLoad(row,canDownload)">导出</el-button>
|
:content="canDownload ? ('导出【'+ row.unionName +'】管理员自我评议的评议结果') : ('导出【'+ row.unionName +'】下所有评议结果的压缩包') "
|
||||||
|
placement="top">
|
||||||
|
<el-button v-if="canDownload" size="mini" type="primary"
|
||||||
|
@click="doDownLoad(row,canDownload)">导出
|
||||||
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button size="mini" type="primary" @click="downloadFilesByUnion(row)">导出附件</el-button>
|
<el-button size="mini" type="primary" @click="downloadFilesByUnion(row)">导出附件</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -155,9 +159,10 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||||
label="操作" width="240px" fixed="right">
|
label="操作" width="240px" fixed="right">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button plain size="mini" @click="openUserView(row)">查看</el-button>
|
<el-button size="mini" @click="openUserView(row)">查看</el-button>
|
||||||
<el-button plain size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
|
<el-button size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
|
||||||
<el-button plain size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件</el-button>
|
<el-button size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -237,7 +242,7 @@ layout("/layouts/platform.html"){
|
|||||||
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
|
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doDownLoad(row,flag){
|
doDownLoad(row, flag) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
// 为true,自我评议
|
// 为true,自我评议
|
||||||
window.open(loc() + '/doDownLoadSingleByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
window.open(loc() + '/doDownLoadSingleByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||||
@@ -246,15 +251,37 @@ layout("/layouts/platform.html"){
|
|||||||
window.open(loc() + '/doDownLoadZipByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
window.open(loc() + '/doDownLoadZipByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
downloadFilesByUnion(row){
|
downloadFilesByUnion(row) {
|
||||||
|
const result = this.validateHasFiles({unionId: row.id, zbId: this.pageForm.zbId})
|
||||||
|
if (!result) {
|
||||||
|
return
|
||||||
|
}
|
||||||
window.open(loc() + '/exportFilesByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
window.open(loc() + '/exportFilesByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||||
},
|
},
|
||||||
downloadByPeoId(row){
|
downloadByPeoId(row) {
|
||||||
window.open(loc() + '/exportByPeoId?peoId=' + row.id)
|
window.open(loc() + '/exportByPeoId?peoId=' + row.id)
|
||||||
},
|
},
|
||||||
downloadFilesByPeoId(){
|
downloadFilesByPeoId(row) {
|
||||||
|
const result = this.validateHasFiles({peoId: row.id})
|
||||||
|
if (!result) {
|
||||||
|
return
|
||||||
|
}
|
||||||
window.open(loc() + '/exportFilesByPeoId?peoId=' + row.id)
|
window.open(loc() + '/exportFilesByPeoId?peoId=' + row.id)
|
||||||
},
|
},
|
||||||
|
validateHasFiles(data) {
|
||||||
|
$.post('/platform/wakeshome/review/statistics/validateHasFiles', {
|
||||||
|
peoId: data.peoId ? data.peoId : '',
|
||||||
|
zbId: data.zbId ? data.zbId : '',
|
||||||
|
unionId: data.unionId ? data.unionId : ''
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
this.$message.warning("未上传附件,无法导出")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
async getReviewResultNum(row) {
|
async getReviewResultNum(row) {
|
||||||
const res = await $.post(loc() + "/getReviewResultNum", {
|
const res = await $.post(loc() + "/getReviewResultNum", {
|
||||||
zbId: this.userPageForm.zbId,
|
zbId: this.userPageForm.zbId,
|
||||||
@@ -318,8 +345,8 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
canDownload() {
|
canDownload() {
|
||||||
const data = this.zbList.find(v=> v.id === this.pageForm.zbId)
|
const data = this.zbList.find(v => v.id === this.pageForm.zbId)
|
||||||
return data.commentTarget===3 && data.unionIds && data.unionIds.length > 0
|
return data.commentTarget === 3 && data.unionIds && data.unionIds.length > 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import io.v.nutz.sys.models.User;
|
|||||||
import io.v.nutz.sys.services.SysConfigService;
|
import io.v.nutz.sys.services.SysConfigService;
|
||||||
import io.v.nutz.sys.services.SysUserRoleService;
|
import io.v.nutz.sys.services.SysUserRoleService;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import org.apache.commons.validator.GenericValidator;
|
|
||||||
import org.apache.shiro.crypto.hash.Sha256Hash;
|
import org.apache.shiro.crypto.hash.Sha256Hash;
|
||||||
import org.apache.shiro.util.ByteSource;
|
import org.apache.shiro.util.ByteSource;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
|||||||
Reference in New Issue
Block a user