....
This commit is contained in:
parent
5d12a2b284
commit
134a3c0583
@ -9,12 +9,14 @@ import javax.servlet.http.Cookie;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.nbclass.activity.model.*;
|
import com.nbclass.activity.model.*;
|
||||||
|
import com.nbclass.activity.service.CommentService;
|
||||||
import com.nbclass.activity.service.DataDictService;
|
import com.nbclass.activity.service.DataDictService;
|
||||||
import com.nbclass.exception.ParameterException;
|
import com.nbclass.exception.ParameterException;
|
||||||
import com.nbclass.system.service.UserService;
|
import com.nbclass.system.service.UserService;
|
||||||
import com.nbclass.util.JWTUtils;
|
import com.nbclass.util.JWTUtils;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -61,6 +63,9 @@ public class ContentController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DataDictService dataDictService;
|
private DataDictService dataDictService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CommentService commentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案例页面
|
* 案例页面
|
||||||
* @param model
|
* @param model
|
||||||
@ -543,4 +548,31 @@ public class ContentController extends BaseController {
|
|||||||
return Result.success(map);
|
return Result.success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签、索引反馈日志列表
|
||||||
|
* @param page
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/getLabelLogger")
|
||||||
|
@ResponseBody
|
||||||
|
public PageResultVo getLabelLogger(Integer page,Integer pageSize,Integer id){
|
||||||
|
PageHelper.startPage(page,pageSize);
|
||||||
|
List<LabelLogger> list = commentService.getLabelLogger(id);
|
||||||
|
PageInfo<LabelLogger> pageInfo = new PageInfo<>(list);
|
||||||
|
return ResultUtil.table(list,pageInfo.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签、索引反馈日志状态更新
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateLogger")
|
||||||
|
@ResponseBody
|
||||||
|
public Result updateLogger(Integer id,Integer status){
|
||||||
|
commentService.updateLogger(id,status);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -184,21 +184,6 @@ public class CommentController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 标签、索引反馈日志列表
|
|
||||||
* @param request
|
|
||||||
* @param page
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/getLabelLogger")
|
|
||||||
public Result getLabelLogger(HttpServletRequest request,Integer page,Integer pageSize){
|
|
||||||
String token = request.getHeader("token");
|
|
||||||
String userId = JWTUtils.getUserId(token);
|
|
||||||
PageInfo<LabelLogger> list = commentService.getLabelLogger(page,pageSize,Long.parseLong(userId));
|
|
||||||
return Result.success(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新建文件夹
|
* 新建文件夹
|
||||||
* @param favoritesFolder
|
* @param favoritesFolder
|
||||||
|
|||||||
@ -198,10 +198,9 @@ public interface CommentMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签、索引反馈日志列表
|
* 标签、索引反馈日志列表
|
||||||
* @param userId
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LabelLogger> getLabelLogger(Long userId);
|
List<LabelLogger> getLabelLogger(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案例打分
|
* 案例打分
|
||||||
@ -209,4 +208,11 @@ public interface CommentMapper {
|
|||||||
*/
|
*/
|
||||||
void saveScoring(Scoring scoring);
|
void saveScoring(Scoring scoring);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签、索引反馈日志状态更新
|
||||||
|
* @param id
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
void updateLogger(@Param("id") Integer id,
|
||||||
|
@Param("status") Integer status);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,27 +8,27 @@ import com.nbclass.activity.model.WxUser;
|
|||||||
import com.nbclass.util.MyMapper;
|
import com.nbclass.util.MyMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Leon
|
* @author Leon
|
||||||
* @datetime 2020年6月2日 下午4:42:57
|
* @datetime 2020年6月2日 下午4:42:57
|
||||||
*/
|
*/
|
||||||
public interface WxUserMapper extends MyMapper<WxUser> {
|
public interface WxUserMapper extends MyMapper<WxUser> {
|
||||||
|
|
||||||
// 这个没用,使用insertSelective方法。
|
// 这个没用,使用insertSelective方法。
|
||||||
public void insertCustom(WxUser entity);
|
public void insertCustom(WxUser entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据userid修改记录
|
* 根据userid修改记录
|
||||||
* @param entity
|
* @param entity
|
||||||
*/
|
*/
|
||||||
public void updateByUserId(WxUser entity);
|
public void updateByUserId(WxUser entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取成员UserID列表
|
* 获取成员UserID列表
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<String> getUserIds();
|
public List<String> getUserIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过部门ID列表获取用户信息列表
|
* 通过部门ID列表获取用户信息列表
|
||||||
* @param deptids
|
* @param deptids
|
||||||
@ -42,12 +42,18 @@ public interface WxUserMapper extends MyMapper<WxUser> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<WxUser> getUsersByUserIds(@Param("userids")String[] userids);
|
public List<WxUser> getUsersByUserIds(@Param("userids")String[] userids);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除此userids之外的用户
|
* 删除此userids之外的用户
|
||||||
* @param userIds
|
* @param userIds
|
||||||
*/
|
*/
|
||||||
public void delOtherUsers(@Param("userids")List<String> userids);
|
public void delOtherUsers(@Param("userids")List<String> userids);
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* 获取企业微信头像
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getNickname(String username);
|
||||||
|
}
|
||||||
|
|||||||
@ -45,10 +45,5 @@ public class LabelLogger implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
|
||||||
* 案例名称
|
|
||||||
*/
|
|
||||||
private String contentName;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,8 @@ package com.nbclass.activity.service;
|
|||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.nbclass.activity.model.*;
|
import com.nbclass.activity.model.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface CommentService {
|
public interface CommentService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -193,11 +195,9 @@ public interface CommentService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签、索引反馈日志列表
|
* 标签、索引反馈日志列表
|
||||||
* @param page
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
PageInfo<LabelLogger> getLabelLogger(Integer page, Integer pageSize, Long userId);
|
List<LabelLogger> getLabelLogger(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案例打分
|
* 案例打分
|
||||||
@ -205,4 +205,9 @@ public interface CommentService {
|
|||||||
*/
|
*/
|
||||||
void saveScoring(Scoring scoring);
|
void saveScoring(Scoring scoring);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签、索引反馈日志状态更新
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void updateLogger(Integer id,Integer status);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,26 +5,32 @@ import java.util.List;
|
|||||||
import com.nbclass.activity.model.WxUser;
|
import com.nbclass.activity.model.WxUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Leon
|
* @author Leon
|
||||||
* @datetime 2020年6月2日 下午4:50:28
|
* @datetime 2020年6月2日 下午4:50:28
|
||||||
*/
|
*/
|
||||||
public interface WxUserService{
|
public interface WxUserService{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量保存用户
|
* 批量保存用户
|
||||||
* @param userList
|
* @param userList
|
||||||
*/
|
*/
|
||||||
public void merge(List<WxUser> userList);
|
public void merge(List<WxUser> userList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步企业微信成员
|
* 同步企业微信成员
|
||||||
*/
|
*/
|
||||||
public void syncWxUser();
|
public void syncWxUser();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步企业微信部门
|
* 同步企业微信部门
|
||||||
*/
|
*/
|
||||||
public void syncWxDepartment();
|
public void syncWxDepartment();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取企业微信头像
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getNickname(String username);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,10 +164,8 @@ public class CommentServiceImpl implements CommentService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<LabelLogger> getLabelLogger(Integer page, Integer pageSize, Long userId) {
|
public List<LabelLogger> getLabelLogger(Integer id) {
|
||||||
PageHelper.startPage(page,pageSize);
|
return commentMapper.getLabelLogger(id);
|
||||||
List<LabelLogger> list = commentMapper.getLabelLogger(userId);
|
|
||||||
return new PageInfo<>(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -175,4 +173,9 @@ public class CommentServiceImpl implements CommentService {
|
|||||||
commentMapper.saveScoring(scoring);
|
commentMapper.saveScoring(scoring);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateLogger(Integer id, Integer status) {
|
||||||
|
commentMapper.updateLogger(id,status);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,22 +28,22 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class WxUserServiceImpl implements WxUserService {
|
public class WxUserServiceImpl implements WxUserService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private WxUserMapper wxUserMapper;
|
private WxUserMapper wxUserMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private WxDepartmentMapper deptMapper;
|
private WxDepartmentMapper deptMapper;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void merge(List<WxUser> userList){
|
public void merge(List<WxUser> userList){
|
||||||
if(userList == null || userList.size() == 0)return;
|
if(userList == null || userList.size() == 0)return;
|
||||||
|
|
||||||
List<String> dbUserIds = wxUserMapper.getUserIds(); // 查询数据库已有的数据
|
List<String> dbUserIds = wxUserMapper.getUserIds(); // 查询数据库已有的数据
|
||||||
List<String> existIds = new ArrayList<String>();
|
List<String> existIds = new ArrayList<String>();
|
||||||
for (WxUser wxUser : userList) {
|
for (WxUser wxUser : userList) {
|
||||||
@ -57,7 +57,7 @@ public class WxUserServiceImpl implements WxUserService {
|
|||||||
account.setStatus(1);
|
account.setStatus(1);
|
||||||
account.setPassword("szxgl.cn"); // 默认登录密码
|
account.setPassword("szxgl.cn"); // 默认登录密码
|
||||||
PasswordHelper.encryptPassword(account);
|
PasswordHelper.encryptPassword(account);
|
||||||
|
|
||||||
existIds.add(wxUser.getUserid());
|
existIds.add(wxUser.getUserid());
|
||||||
if(dbUserIds.contains(wxUser.getUserid())){
|
if(dbUserIds.contains(wxUser.getUserid())){
|
||||||
wxUserMapper.updateByUserId(wxUser);
|
wxUserMapper.updateByUserId(wxUser);
|
||||||
@ -69,7 +69,7 @@ public class WxUserServiceImpl implements WxUserService {
|
|||||||
// 删除当前企业微信不存在的用户
|
// 删除当前企业微信不存在的用户
|
||||||
if(existIds.size()>0)wxUserMapper.delOtherUsers(existIds);
|
if(existIds.size()>0)wxUserMapper.delOtherUsers(existIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void syncWxUser() {
|
public void syncWxUser() {
|
||||||
try {
|
try {
|
||||||
@ -135,11 +135,16 @@ public class WxUserServiceImpl implements WxUserService {
|
|||||||
log.error("同步企业部门异常", e);
|
log.error("同步企业部门异常", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNickname(String username) {
|
||||||
|
return wxUserMapper.getNickname(username);
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String jsonstr = "{\"id\":1,\"Name\":\"信广龙\",\"Order\":100000000,\"parentId\":5}";
|
String jsonstr = "{\"id\":1,\"Name\":\"信广龙\",\"Order\":100000000,\"parentId\":5}";
|
||||||
WxDepartment wxUser = JSON.toJavaObject(JSONObject.parseObject(jsonstr), WxDepartment.class);
|
WxDepartment wxUser = JSON.toJavaObject(JSONObject.parseObject(jsonstr), WxDepartment.class);
|
||||||
System.out.println(JSON.toJSON(wxUser));
|
System.out.println(JSON.toJSON(wxUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import java.net.URLEncoder;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.nbclass.activity.service.WxUserService;
|
||||||
|
import com.nbclass.vo.base.Result;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
@ -14,6 +16,7 @@ import org.apache.shiro.authc.LockedAccountException;
|
|||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -24,6 +27,7 @@ import com.nbclass.util.CommonUtils;
|
|||||||
import com.nbclass.util.HttpUtils;
|
import com.nbclass.util.HttpUtils;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业微信扫码登录
|
* 企业微信扫码登录
|
||||||
@ -33,12 +37,15 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/qywx")
|
@RequestMapping("/qywx")
|
||||||
public class QyWxLoginController {
|
public class QyWxLoginController extends BaseController {
|
||||||
|
|
||||||
private static final int AgentId = 1000016; // 企业微信登录应用ID(信广龙广告)
|
private static final int AgentId = 1000016; // 企业微信登录应用ID(信广龙广告)
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WxUserService wxUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PC端网页授权(企业微信授权登录)
|
* PC端网页授权(企业微信授权登录)
|
||||||
@ -56,7 +63,7 @@ public class QyWxLoginController {
|
|||||||
response.sendRedirect(redirectUrl);
|
response.sendRedirect(redirectUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String url = "http://show.szxgl.cn/qywx/api/sso/getUserInfo?agentid="+AgentId+"&code="+code;
|
String url = "http://show.szxgl.cn/qywx/api/sso/getUserInfo?agentid="+AgentId+"&code="+code;
|
||||||
try {
|
try {
|
||||||
JSONObject json = HttpUtils.httpPost(url);
|
JSONObject json = HttpUtils.httpPost(url);
|
||||||
@ -72,7 +79,7 @@ public class QyWxLoginController {
|
|||||||
outPrintError(response, "该账号未经授权,请联系管理员授权后再试!");
|
outPrintError(response, "该账号未经授权,请联系管理员授权后再试!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 企业微信登录成功,下一步进行系统shiro身份验证
|
// 企业微信登录成功,下一步进行系统shiro身份验证
|
||||||
String username = userid;
|
String username = userid;
|
||||||
MyUsernamePasswordToken token = new MyUsernamePasswordToken(username); // 免密登录,用于扫码登录手机验证码登录等场景
|
MyUsernamePasswordToken token = new MyUsernamePasswordToken(username); // 免密登录,用于扫码登录手机验证码登录等场景
|
||||||
@ -90,14 +97,14 @@ public class QyWxLoginController {
|
|||||||
}
|
}
|
||||||
//更新最后登录时间
|
//更新最后登录时间
|
||||||
userService.updateLastLoginTime((User) SecurityUtils.getSubject().getPrincipal());
|
userService.updateLastLoginTime((User) SecurityUtils.getSubject().getPrincipal());
|
||||||
|
|
||||||
response.sendRedirect(request.getContextPath()+"/admin");
|
response.sendRedirect(request.getContextPath()+"/admin");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("企业微信登录授权失败", e);
|
log.error("企业微信登录授权失败", e);
|
||||||
outPrintError(response, "企业微信授权失败,请稍候再试!");
|
outPrintError(response, "企业微信授权失败,请稍候再试!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 输出错误信息到页面
|
* 输出错误信息到页面
|
||||||
* @param response
|
* @param response
|
||||||
@ -127,12 +134,24 @@ public class QyWxLoginController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getBaseUrl(HttpServletRequest request){
|
private static String getBaseUrl(HttpServletRequest request){
|
||||||
String result = null;
|
String result = null;
|
||||||
int port = request.getServerPort();
|
int port = request.getServerPort();
|
||||||
result = request.getScheme()+"://"+request.getServerName()+(port==80||port==443 ? "" : ":"+port)+request.getContextPath()+"/";
|
result = request.getScheme()+"://"+request.getServerName()+(port==80||port==443 ? "" : ":"+port)+request.getContextPath()+"/";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取企业微信头像
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getAvatar")
|
||||||
|
@ResponseBody
|
||||||
|
public Result getNickname(){
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
String avatar = wxUserService.getNickname(loginUser.getUsername());
|
||||||
|
return Result.success(avatar);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -571,16 +571,20 @@
|
|||||||
|
|
||||||
<select id="getLabelLogger" resultType="com.nbclass.activity.model.LabelLogger">
|
<select id="getLabelLogger" resultType="com.nbclass.activity.model.LabelLogger">
|
||||||
SELECT
|
SELECT
|
||||||
|
l.id,
|
||||||
l.logger,
|
l.logger,
|
||||||
|
l.content_id as contentId,
|
||||||
l.create_time as createTime,
|
l.create_time as createTime,
|
||||||
l.`status`,
|
l.`status`,
|
||||||
c.title as contentName,
|
|
||||||
u.nickname as name
|
u.nickname as name
|
||||||
FROM
|
FROM
|
||||||
label_logger l
|
label_logger l
|
||||||
LEFT JOIN content c ON l.content_id = c.id
|
LEFT JOIN content c ON l.content_id = c.id
|
||||||
LEFT JOIN weixi_user u ON l.user_id = u.id
|
LEFT JOIN weixi_user u ON l.user_id = u.id
|
||||||
where u.id = #{userId}
|
where 1=1
|
||||||
|
<if test="id!=null">
|
||||||
|
and l.content_id = #{id}
|
||||||
|
</if>
|
||||||
order by l.create_time desc
|
order by l.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -601,4 +605,12 @@
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateLogger">
|
||||||
|
update label_logger set
|
||||||
|
<if test="status!=null">
|
||||||
|
status = #{status}
|
||||||
|
</if>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -400,6 +400,24 @@
|
|||||||
<if test="quantity!=null and quantity == 1">
|
<if test="quantity!=null and quantity == 1">
|
||||||
and c.label_feedback > 0
|
and c.label_feedback > 0
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createtime!=null">
|
||||||
|
and DATE_FORMAT(c.createtime, '%Y-%m-%d')>= DATE_FORMAT(#{createtime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="createtimeSection!=null">
|
||||||
|
and DATE_FORMAT(c.createtime, '%Y-%m-%d') <= DATE_FORMAT(#{createtimeSection}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="updatetime!=null">
|
||||||
|
and DATE_FORMAT(c.updatetime, '%Y-%m-%d')>= DATE_FORMAT(#{updatetime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="updatetimeSection!=null">
|
||||||
|
and DATE_FORMAT(c.updatetime, '%Y-%m-%d') <= DATE_FORMAT(#{updatetimeSection}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="onlineTime!=null">
|
||||||
|
and DATE_FORMAT(c.online_time, '%Y-%m-%d')>= DATE_FORMAT(#{onlineTime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="onlineTimeSection!=null">
|
||||||
|
and DATE_FORMAT(c.online_time, '%Y-%m-%d') <= DATE_FORMAT(#{onlineTimeSection}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
<if test="tagLists!=null and tagLists!=''">
|
<if test="tagLists!=null and tagLists!=''">
|
||||||
and item.id in
|
and item.id in
|
||||||
<foreach collection="tagLists" open="(" separator="," item="id" close=")">
|
<foreach collection="tagLists" open="(" separator="," item="id" close=")">
|
||||||
@ -469,13 +487,13 @@
|
|||||||
data_dict_item item
|
data_dict_item item
|
||||||
LEFT JOIN content_tags tags ON item.id = tags.tid
|
LEFT JOIN content_tags tags ON item.id = tags.tid
|
||||||
LEFT JOIN content c ON c.id = tags.cid and c.online_time is not null
|
LEFT JOIN content c ON c.id = tags.cid and c.online_time is not null
|
||||||
|
<if test="type!=null and type==1">
|
||||||
|
and YEARWEEK( date_format(c.online_time, '%Y-%m-%d' ), 1 ) = YEARWEEK(now())
|
||||||
|
</if>
|
||||||
WHERE
|
WHERE
|
||||||
item.dictid = 26
|
item.dictid = 26
|
||||||
GROUP BY
|
GROUP BY
|
||||||
item.id,c.id
|
item.id,c.id
|
||||||
<if test="type!=null and type==1">
|
|
||||||
and YEARWEEK( date_format(c.online_time, '%Y-%m-%d' ), 1 ) = YEARWEEK(now())
|
|
||||||
</if>
|
|
||||||
<if test="type!=null and type==2">
|
<if test="type!=null and type==2">
|
||||||
AND DATE_FORMAT( c.online_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ), '%Y%m' )
|
AND DATE_FORMAT( c.online_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ), '%Y%m' )
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -1,66 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nbclass.activity.mapper.WxUserMapper">
|
<mapper namespace="com.nbclass.activity.mapper.WxUserMapper">
|
||||||
|
|
||||||
<insert id="insertCustom" parameterType="com.nbclass.activity.model.WxUser" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertCustom" parameterType="com.nbclass.activity.model.WxUser" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into wx_user (userid, name, mobile, department, position, gender, email, weixinid,
|
insert into wx_user (userid, name, mobile, department, position, gender, email, weixinid,
|
||||||
isleader, avatar, english_name, status)
|
isleader, avatar, english_name, status)
|
||||||
values (#{userid}, #{name}, #{mobile}, #{department}, #{position}, #{gender}, #{email}, #{weixinid},
|
values (#{userid}, #{name}, #{mobile}, #{department}, #{position}, #{gender}, #{email}, #{weixinid},
|
||||||
#{isleader}, #{avatar}, #{english_name}, #{status})
|
#{isleader}, #{avatar}, #{english_name}, #{status})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateByUserId" parameterType="com.nbclass.activity.model.WxUser">
|
<update id="updateByUserId" parameterType="com.nbclass.activity.model.WxUser">
|
||||||
update wx_user set name = #{name}, mobile = #{mobile}, department = #{department}
|
update wx_user set name = #{name}, mobile = #{mobile}, department = #{department}
|
||||||
<if test="position != null and position != ''">
|
<if test="position != null and position != ''">
|
||||||
, position = #{position}
|
, position = #{position}
|
||||||
</if>
|
</if>
|
||||||
<if test="gender != null and gender != ''">
|
<if test="gender != null and gender != ''">
|
||||||
, gender = #{gender}
|
, gender = #{gender}
|
||||||
</if>
|
</if>
|
||||||
<if test="email != null and email != ''">
|
<if test="email != null and email != ''">
|
||||||
, email = #{email}
|
, email = #{email}
|
||||||
</if>
|
</if>
|
||||||
<if test="weixinid != null and weixinid != ''">
|
<if test="weixinid != null and weixinid != ''">
|
||||||
, weixinid = #{weixinid}
|
, weixinid = #{weixinid}
|
||||||
</if>
|
</if>
|
||||||
<if test="isleader != null and isleader != ''">
|
<if test="isleader != null and isleader != ''">
|
||||||
, isleader = #{isleader}
|
, isleader = #{isleader}
|
||||||
</if>
|
</if>
|
||||||
<if test="avatar != null and avatar != ''">
|
<if test="avatar != null and avatar != ''">
|
||||||
, avatar = #{avatar}
|
, avatar = #{avatar}
|
||||||
</if>
|
</if>
|
||||||
<if test="english_name != null and english_name != ''">
|
<if test="english_name != null and english_name != ''">
|
||||||
, english_name = #{english_name}
|
, english_name = #{english_name}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status > 0">
|
<if test="status != null and status > 0">
|
||||||
, `status` = #{status}
|
, `status` = #{status}
|
||||||
</if>
|
</if>
|
||||||
where userid = #{userid}
|
where userid = #{userid}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getUserIds" resultType="java.lang.String">
|
<select id="getUserIds" resultType="java.lang.String">
|
||||||
select userid from wx_user
|
select userid from wx_user
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUsersByDeptIds" parameterType="java.util.List" resultType="com.nbclass.activity.model.WxUser">
|
<select id="getUsersByDeptIds" parameterType="java.util.List" resultType="com.nbclass.activity.model.WxUser">
|
||||||
select userid, name, avatar from wx_user where
|
select userid, name, avatar from wx_user where
|
||||||
<foreach item="deptid" collection="deptids" open="(" separator="or" close=")">
|
<foreach item="deptid" collection="deptids" open="(" separator="or" close=")">
|
||||||
FIND_IN_SET(#{deptid}, department)
|
FIND_IN_SET(#{deptid}, department)
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUsersByUserIds" parameterType="java.util.List" resultType="com.nbclass.activity.model.WxUser">
|
<select id="getUsersByUserIds" parameterType="java.util.List" resultType="com.nbclass.activity.model.WxUser">
|
||||||
select userid, name, avatar from wx_user where userid in
|
select userid, name, avatar from wx_user where userid in
|
||||||
<foreach item="userid" collection="userids" open="(" separator="," close=")">
|
<foreach item="userid" collection="userids" open="(" separator="," close=")">
|
||||||
#{userid}
|
#{userid}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="delOtherUsers" parameterType="java.util.List">
|
<delete id="delOtherUsers" parameterType="java.util.List">
|
||||||
delete from wx_user where userid not in
|
delete from wx_user where userid not in
|
||||||
<foreach item="userid" collection="userids" open="(" separator="," close=")">
|
<foreach item="userid" collection="userids" open="(" separator="," close=")">
|
||||||
#{userid}
|
#{userid}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
<select id="getNickname" resultType="java.lang.String">
|
||||||
|
select avatar from wx_user where userid = #{username}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|||||||
BIN
src/main/resources/static/img/admin.png
Normal file
BIN
src/main/resources/static/img/admin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
121
src/main/resources/templates/content-logger/list.html
Normal file
121
src/main/resources/templates/content-logger/list.html
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
<section class="content-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||||
|
<li class="active">标签、索引反馈日志</li>
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
<section class="content">
|
||||||
|
<div class="jax-box">
|
||||||
|
<form id="formSearch" class="form-inline form-search">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>案例编号: </label>
|
||||||
|
<input type="text" id="contentId" class="form-control" oninput = "value=value.replace(/[^\d]/g,'')">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
||||||
|
<button type="button" id="btn_query" class="btn btn-info">查 询</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
||||||
|
<button type="button" id="reset_query" class="btn btn-info">重置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="jax-box jax-box-table">
|
||||||
|
<table id="table" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var columns = [
|
||||||
|
{field: 'contentId', title: '案例编号', align : "center"},
|
||||||
|
{field: 'logger', title: '日志', align : "center",formatter:function(value,row, index){
|
||||||
|
console.log(row)
|
||||||
|
return "用户["+row.name+"]反馈案例标签["+row.logger+"]不准确";
|
||||||
|
}},
|
||||||
|
{field: 'createTime', title: '创建时间', align : "center"},
|
||||||
|
{field: 'status', title: '状态', align : "center",formatter: function(value, row, index) {
|
||||||
|
return row.status === 1 ? '已解决' : '未解决';
|
||||||
|
}},
|
||||||
|
{field : 'operation', title : '操作', align : "center", formatter: function(value, row, index) {
|
||||||
|
var submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+',0)">暂不解决</a>';
|
||||||
|
var editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+',1)">已解决</a>';
|
||||||
|
return submitHtml+editHtml;
|
||||||
|
}}
|
||||||
|
];
|
||||||
|
var options={
|
||||||
|
id:"#table",
|
||||||
|
url: '[[@{/console/content/getLabelLogger}]]',
|
||||||
|
columns:columns,
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
showRefresh: true,
|
||||||
|
queryParams : queryParams
|
||||||
|
}
|
||||||
|
Core.initTable(options);
|
||||||
|
|
||||||
|
//查询参数
|
||||||
|
function queryParams(params) {
|
||||||
|
var temp = {
|
||||||
|
page : params.limit, //页面大小
|
||||||
|
pageSize : params.offset, //页码
|
||||||
|
id: $("#contentId").val()
|
||||||
|
};
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 预览
|
||||||
|
function previewNews(url) {
|
||||||
|
window.open(url, "_blank");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
function editPage(id,status) {
|
||||||
|
var msg = "确定更新改状态?";
|
||||||
|
Core.confirm(msg, function () {
|
||||||
|
Core.postAjax("[[@{/console/content/updateLogger}]]",{"id":id,"status":status},function (data) {
|
||||||
|
if(data.ret==0){
|
||||||
|
layer.msg('更新成功!');
|
||||||
|
Core.refreshTable("#table");
|
||||||
|
}else{
|
||||||
|
layer.msg(data.msg);
|
||||||
|
}
|
||||||
|
},"POST");
|
||||||
|
})
|
||||||
|
// openWindow("[[@{/console/content/edit}]]?id="+id, "编辑新闻", 1200, 600);
|
||||||
|
}
|
||||||
|
|
||||||
|
function openWindow(url, name, iWidth, iHeight){
|
||||||
|
var iWidth; // 弹出窗口的宽度;
|
||||||
|
var iHeight; // 弹出窗口的高度;
|
||||||
|
var iTop = (window.screen.availHeight-30-iHeight)/2; // 获得窗口的垂直位置;
|
||||||
|
var iLeft = (window.screen.availWidth-10-iWidth)/2; // 获得窗口的水平位置;
|
||||||
|
window.open(url, name,'height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
/*查询*/
|
||||||
|
$("#btn_query").click(function(){
|
||||||
|
Core.refreshTable("#table");
|
||||||
|
});
|
||||||
|
|
||||||
|
//重置搜索栏
|
||||||
|
$("#reset_query").click(function () {
|
||||||
|
$("#contentId").val("");
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -8,15 +8,46 @@
|
|||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="jax-box">
|
<div class="jax-box">
|
||||||
<form id="formSearch" class="form-inline form-search">
|
<form id="formSearch" class="form-inline form-search">
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>案例编号: </label>
|
<label>案例编号: </label>
|
||||||
<input type="text" id="case_number" class="form-control">
|
<input type="text" id="case_number" class="form-control" oninput = "value=value.replace(/[^\d]/g,'')">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>标题: </label>
|
<label>标题: </label>
|
||||||
<input type="text" id="title" class="form-control">
|
<input type="text" id="title" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
|
<label>创建时间:</label>
|
||||||
|
<!--指定 date标记-->
|
||||||
|
<div class='input-group date' id='createTime'>
|
||||||
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
|
<label>至</label>
|
||||||
|
<!--指定 date标记-->
|
||||||
|
<div class='input-group date' id='createTimeSection'>
|
||||||
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
|
<label>品牌公司: </label>
|
||||||
|
<select id="brandCompany" name="tagLists" class="form-control">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>状态: </label>
|
<label>状态: </label>
|
||||||
<select id="status" class="form-control">
|
<select id="status" class="form-control">
|
||||||
<option value="">未提交</option>
|
<option value="">未提交</option>
|
||||||
@ -25,7 +56,9 @@
|
|||||||
<option value="3">未通过</option>
|
<option value="3">未通过</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>反馈次数: </label>
|
<label>反馈次数: </label>
|
||||||
<select id="count" class="form-control">
|
<select id="count" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
@ -33,123 +66,108 @@
|
|||||||
<option value="1">非0</option>
|
<option value="1">非0</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>标签: </label>
|
<label>标签: </label>
|
||||||
<select id="tags" name="tagLists" class="form-control">
|
<select id="tags" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>品牌公司: </label>
|
|
||||||
<select id="brandCompany" name="tagLists" class="form-control">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<option value="">请选择</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>广告公司: </label>
|
<label>广告公司: </label>
|
||||||
<select id="advertisingAgency" name="tagLists" class="form-control">
|
<select id="advertisingAgency" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>案例用途: </label>
|
<label>案例用途: </label>
|
||||||
<select id="purposeCase" name="tagLists" class="form-control">
|
<select id="purposeCase" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>创意形式: </label>
|
<label>创意形式: </label>
|
||||||
<select id="formCreative" name="tagLists" class="form-control">
|
<select id="formCreative" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>案例类型: </label>
|
<label>案例类型: </label>
|
||||||
<select id="typeCase" name="tagLists" class="form-control">
|
<select id="typeCase" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>节日事件: </label>
|
<label>节日事件: </label>
|
||||||
<select id="eventsFestival" name="tagLists" class="form-control">
|
<select id="eventsFestival" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>创建时间:</label>
|
|
||||||
<!--指定 date标记-->
|
|
||||||
<div class='input-group date' id='createTime'>
|
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
|
||||||
<span class="input-group-addon">
|
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>至</label>
|
|
||||||
<!--指定 date标记-->
|
|
||||||
<div class='input-group date' id='createTimeSection'>
|
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
|
||||||
<span class="input-group-addon">
|
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>修改时间:</label>
|
<label>修改时间:</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='updateTime'>
|
<div class='input-group date' id='updateTime'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>至</label>
|
<label>至</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='updateTimeSection'>
|
<div class='input-group date' id='updateTimeSection'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>上线时间:</label>
|
<label>上线时间:</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='onlineTime'>
|
<div class='input-group date' id='onlineTime'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>至</label>
|
<label>至</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='onlineTimeSection'>
|
<div class='input-group date' id='onlineTimeSection'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
||||||
<button type="button" id="btn_query" class="btn btn-info">查 询</button>
|
<button type="button" id="btn_query" class="btn btn-info">查 询</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
||||||
<button type="button" id="reset_query" class="btn btn-info">重置</button>
|
<button type="button" id="reset_query" class="btn btn-info">重置</button>
|
||||||
</div>
|
</div>
|
||||||
@ -160,7 +178,7 @@
|
|||||||
|
|
||||||
<div class="jax-box jax-box-table">
|
<div class="jax-box jax-box-table">
|
||||||
|
|
||||||
<table id="table"></table>
|
<table id="table" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap"></table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -263,7 +281,7 @@
|
|||||||
{field: 'collectionNumber', title: '收藏数', align : "center"},
|
{field: 'collectionNumber', title: '收藏数', align : "center"},
|
||||||
{field: 'comments', title: '评论数', align : "center"},
|
{field: 'comments', title: '评论数', align : "center"},
|
||||||
{field: 'createtime', title: '创建时间', align : "center"},
|
{field: 'createtime', title: '创建时间', align : "center"},
|
||||||
// {field: 'updatetime', title: '修改时间', align : "center"},
|
{field: 'updatetime', title: '修改时间', align : "center"},
|
||||||
{field: 'onlineTime', title: '上线时间', align : "center"},
|
{field: 'onlineTime', title: '上线时间', align : "center"},
|
||||||
{field: 'position', title: '关联部门', align : "center", width: "170", formatter:function(value,row, index){
|
{field: 'position', title: '关联部门', align : "center", width: "170", formatter:function(value,row, index){
|
||||||
for(var i = 0; i < row.tagList.length;i++){
|
for(var i = 0; i < row.tagList.length;i++){
|
||||||
@ -294,16 +312,16 @@
|
|||||||
let seeHtml = "";
|
let seeHtml = "";
|
||||||
let editHtml = "";
|
let editHtml = "";
|
||||||
if(row.status === 1){
|
if(row.status === 1){
|
||||||
adoptHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="operationApplication('+row.applicationId+',2)">发布</a>';
|
adoptHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="operationApplication('+row.applicationId+',2)">发布</a>';
|
||||||
rejectHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="operationApplication('+row.applicationId+',3)">驳回</a>';
|
rejectHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="operationApplication('+row.applicationId+',3)">驳回</a>';
|
||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+')">修改</a>';
|
editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+')">修改</a>';
|
||||||
}else if(row.status === 2){
|
}else if(row.status === 2){
|
||||||
adoptHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="offlineApplication('+row.id+')">下线</a>';
|
adoptHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="offlineApplication('+row.id+')">下线</a>';
|
||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+')">修改</a>';
|
editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+')">修改</a>';
|
||||||
}else if(row.status === 3){
|
}else if(row.status === 3){
|
||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
}
|
}
|
||||||
return adoptHtml+rejectHtml+editHtml+seeHtml;
|
return adoptHtml+rejectHtml+editHtml+seeHtml;
|
||||||
}}
|
}}
|
||||||
@ -430,6 +448,12 @@
|
|||||||
$("#case_number").val("");
|
$("#case_number").val("");
|
||||||
$("#title").val("");
|
$("#title").val("");
|
||||||
$(".form-control").find("option:selected").attr("selected",false);
|
$(".form-control").find("option:selected").attr("selected",false);
|
||||||
|
$("#createTime").find("input").val("");
|
||||||
|
$("#createTimeSection").find("input").val("");
|
||||||
|
$("#updateTime").find("input").val("");
|
||||||
|
$("#updateTimeSection").find("input").val("");
|
||||||
|
$("#onlineTime").find("input").val("");
|
||||||
|
$("#onlineTimeSection").find("input").val("");
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -9,15 +9,33 @@
|
|||||||
<input class="hidden" id="name" name="username" th:value="${session.username}">
|
<input class="hidden" id="name" name="username" th:value="${session.username}">
|
||||||
<div class="jax-box">
|
<div class="jax-box">
|
||||||
<form id="formSearch" class="form-inline form-search">
|
<form id="formSearch" class="form-inline form-search">
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>案例编号: </label>
|
<label>案例编号: </label>
|
||||||
<input type="text" id="case_number" class="form-control" oninput = "value=value.replace(/[^\d]/g,'')">
|
<input type="text" id="case_number" class="form-control" style="width: 100px" oninput = "value=value.replace(/[^\d]/g,'')">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>标题: </label>
|
<label>标题: </label>
|
||||||
<input type="text" id="title" class="form-control">
|
<input type="text" id="title" class="form-control" style="width: 100px">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
|
<label>品牌公司: </label>
|
||||||
|
<select id="brandCompany" name="tagLists" class="form-control">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
|
<label>广告公司: </label>
|
||||||
|
<select id="advertisingAgency" name="tagLists" class="form-control">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>状态: </label>
|
<label>状态: </label>
|
||||||
<select id="status" class="form-control">
|
<select id="status" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
@ -26,7 +44,9 @@
|
|||||||
<option value="3">未通过</option>
|
<option value="3">未通过</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
<br/>
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>反馈次数: </label>
|
<label>反馈次数: </label>
|
||||||
<select id="count" class="form-control">
|
<select id="count" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
@ -34,123 +54,121 @@
|
|||||||
<option value="1">非0</option>
|
<option value="1">非0</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>标签: </label>
|
<label>标签: </label>
|
||||||
<select id="tags" name="tagLists" class="form-control">
|
<select id="tags" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>品牌公司: </label>
|
|
||||||
<select id="brandCompany" name="tagLists" class="form-control">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<option value="">请选择</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>广告公司: </label>
|
|
||||||
<select id="advertisingAgency" name="tagLists" class="form-control">
|
|
||||||
<option value="">请选择</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>案例用途: </label>
|
<label>案例用途: </label>
|
||||||
<select id="purposeCase" name="tagLists" class="form-control">
|
<select id="purposeCase" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>创意形式: </label>
|
<label>创意形式: </label>
|
||||||
<select id="formCreative" name="tagLists" class="form-control">
|
<select id="formCreative" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>案例类型: </label>
|
<label>案例类型: </label>
|
||||||
<select id="typeCase" name="tagLists" class="form-control">
|
<select id="typeCase" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>节日事件: </label>
|
<label>节日事件: </label>
|
||||||
<select id="eventsFestival" name="tagLists" class="form-control">
|
<select id="eventsFestival" name="tagLists" class="form-control">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<br/>
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>创建时间:</label>
|
<label>创建时间:</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='createTime'>
|
<div class='input-group date' id='createTime'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>至</label>
|
<label>至</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='createTimeSection'>
|
<div class='input-group date' id='createTimeSection'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>修改时间:</label>
|
<label>修改时间:</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='updateTime'>
|
<div class='input-group date' id='updateTime'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>至</label>
|
<label>至</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='updateTimeSection'>
|
<div class='input-group date' id='updateTimeSection'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>上线时间:</label>
|
<label>上线时间:</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='onlineTime'>
|
<div class='input-group date' id='onlineTime'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<label>至</label>
|
<label>至</label>
|
||||||
<!--指定 date标记-->
|
<!--指定 date标记-->
|
||||||
<div class='input-group date' id='onlineTimeSection'>
|
<div class='input-group date' id='onlineTimeSection'>
|
||||||
<input type='text' class="form-control" readonly="readonly" />
|
<input type='text' class="form-control" readonly="readonly" style="width: 100px"/>
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<span class="glyphicon glyphicon-calendar"></span>
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
||||||
<button type="button" id="btn_query" class="btn btn-info">查 询</button>
|
<button type="button" id="btn_query" class="btn btn-info">查 询</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group" style="margin-bottom: 10px">
|
||||||
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
<div class="col-md-1 col-sm-3" style="text-align:left;">
|
||||||
<button type="button" id="reset_query" class="btn btn-info">重置</button>
|
<button type="button" id="reset_query" class="btn btn-info">重置</button>
|
||||||
</div>
|
</div>
|
||||||
@ -173,13 +191,13 @@
|
|||||||
</button>
|
</button>
|
||||||
</shiro:hasPermission>
|
</shiro:hasPermission>
|
||||||
|
|
||||||
<shiro:hasPermission name="indexPage">
|
<!--<shiro:hasPermission name="indexPage">
|
||||||
<button id="btn_synces" type="button" class="btn btn-info">
|
<button id="btn_synces" type="button" class="btn btn-info">
|
||||||
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> 同步数据到搜索引擎
|
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> 同步数据到搜索引擎
|
||||||
</button>
|
</button>
|
||||||
</shiro:hasPermission>
|
</shiro:hasPermission>-->
|
||||||
</div>
|
</div>
|
||||||
<table id="table"></table>
|
<table id="table" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap"></table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -230,9 +248,7 @@
|
|||||||
{field: 'visibility', title: '可见性', align : "center", formatter:function(value,row, index){
|
{field: 'visibility', title: '可见性', align : "center", formatter:function(value,row, index){
|
||||||
return row.visibility === 1 ? "可见" : "不可见";
|
return row.visibility === 1 ? "可见" : "不可见";
|
||||||
}},
|
}},
|
||||||
{field: 'labelFeedback', title: '标签反馈数', align : "center",formatter:function(value,row, index){
|
{field: 'labelFeedback', title: '标签反馈数', align : "center"},
|
||||||
|
|
||||||
}},
|
|
||||||
{field: 'purposeCase', title: '案例用途', align : "center", formatter:function(value,row, index){
|
{field: 'purposeCase', title: '案例用途', align : "center", formatter:function(value,row, index){
|
||||||
for(var i = 0; i < row.tagList.length;i++){
|
for(var i = 0; i < row.tagList.length;i++){
|
||||||
if(row.tagList[i].id === 19){
|
if(row.tagList[i].id === 19){
|
||||||
@ -284,7 +300,7 @@
|
|||||||
{field: 'collectionNumber', title: '收藏数', align : "center" },
|
{field: 'collectionNumber', title: '收藏数', align : "center" },
|
||||||
{field: 'comments', title: '评论数', align : "center" },
|
{field: 'comments', title: '评论数', align : "center" },
|
||||||
{field: 'createtime', title: '创建时间', align : "center"},
|
{field: 'createtime', title: '创建时间', align : "center"},
|
||||||
//{field: 'updatetime', title: '修改时间', align : "center"},
|
{field: 'updatetime', title: '修改时间', align : "center"},
|
||||||
{field: 'onlineTime', title: '上线时间', align : "center"},
|
{field: 'onlineTime', title: '上线时间', align : "center"},
|
||||||
{field: 'position', title: '关联部门', align : "center",width:170,formatter:function(value,row, index){
|
{field: 'position', title: '关联部门', align : "center",width:170,formatter:function(value,row, index){
|
||||||
for(var i = 0; i < row.tagList.length;i++){
|
for(var i = 0; i < row.tagList.length;i++){
|
||||||
@ -325,7 +341,7 @@
|
|||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
||||||
}*/
|
}*/
|
||||||
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="submitApplication('+row.id+')">提交</a>';
|
submitHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="submitApplication('+row.id+')">提交</a>';
|
||||||
editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+')">修改</a>';
|
editHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="editPage('+row.id+')">修改</a>';
|
||||||
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
||||||
}else if(row.status === 1){
|
}else if(row.status === 1){
|
||||||
@ -333,30 +349,30 @@
|
|||||||
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="withdrawApplication('+row.applicationId+')">撤回</a>';
|
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="withdrawApplication('+row.applicationId+')">撤回</a>';
|
||||||
}*/
|
}*/
|
||||||
//这里的1标记为查看状态
|
//这里的1标记为查看状态
|
||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
||||||
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="withdrawApplication('+row.applicationId+')">撤回</a>';
|
submitHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="withdrawApplication('+row.applicationId+')">撤回</a>';
|
||||||
}else if(row.status === 3){
|
}else if(row.status === 3){
|
||||||
/*if($("#name").val() !== 'admin'){
|
/*if($("#name").val() !== 'admin'){
|
||||||
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="updateApplication('+row.id+','+row.applicationId+')">更新</a>';
|
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="updateApplication('+row.id+','+row.applicationId+')">更新</a>';
|
||||||
}*/
|
}*/
|
||||||
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="updateApplication('+row.id+','+row.applicationId+')">更新</a>';
|
submitHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="updateApplication('+row.id+','+row.applicationId+')">更新</a>';
|
||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
||||||
}
|
}
|
||||||
if(row.status === 2){
|
if(row.status === 2){
|
||||||
/*if($("#name").val() !== 'admin'){
|
/*if($("#name").val() !== 'admin'){
|
||||||
offlineHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="offlineApplication('+row.id+')">下线</a>';
|
offlineHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="offlineApplication('+row.id+')">下线</a>';
|
||||||
}*/
|
}*/
|
||||||
offlineHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="offlineApplication('+row.id+')">下线</a>';
|
offlineHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="offlineApplication('+row.id+')">下线</a>';
|
||||||
submitHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="updateApplication('+row.id+','+row.applicationId+')">更新</a>';
|
submitHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="updateApplication('+row.id+','+row.applicationId+')">更新</a>';
|
||||||
seeHtml = '<a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
seeHtml = ' <a class="table-btn table-btn-info" href="javascript:void(0)" onclick="seeApplication('+row.id+',1)">查看</a>';
|
||||||
}
|
}
|
||||||
/*if(row.status === 3){
|
/*if(row.status === 3){
|
||||||
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
delHtml = ' <a class="table-btn table-btn-danger" href="javascript:void(0)" onclick="deleteAction('+row.id+',1)">删除</a>';
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
return offlineHtml+submitHtml+editHtml + delHtml + seeHtml;
|
return offlineHtml+submitHtml+editHtml+delHtml+seeHtml;
|
||||||
}}
|
}}
|
||||||
];
|
];
|
||||||
var options={
|
var options={
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<div th:fragment="navbar" class="jax-header">
|
<div th:fragment="navbar" class="jax-header">
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
<a href="admin" class="logo" style="font-size: 18px;">
|
<a href="admin" class="logo" style="font-size: 18px;">
|
||||||
<span class="logo-mini"><b>NB</b></span>
|
<span class="logo-mini"><b>CASES</b></span>
|
||||||
<span class="logo-lg"><b>案例管理系统</b></span>
|
<span class="logo-lg"><b>案例管理系统</b></span>
|
||||||
</a>
|
</a>
|
||||||
<nav class="navbar navbar-static-top">
|
<nav class="navbar navbar-static-top">
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="navbar-custom-menu">
|
<div class="navbar-custom-menu" style="color: #00c0ef">
|
||||||
<span style="float:left; vertical-align: middle; color:white; height: 20px;line-height: 20px; padding: 15px 0px;">
|
<span style="float:left; vertical-align: middle; color:white; height: 20px;line-height: 20px; padding: 15px 0px;">
|
||||||
<!-- <shiro:principal property="rolename" /> -->
|
<!-- <shiro:principal property="rolename" /> -->
|
||||||
欢迎您
|
欢迎您
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" style="float:right;">
|
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" style="float:right;">
|
||||||
<img th:src="@{/img/person.jpg}" class="user-image" alt="">
|
<img id="avatar" th:src="@{/img/admin.png}" class="user-image" alt="">
|
||||||
<span><shiro:principal property="username" /></span>
|
<span><shiro:principal property="username" /></span>
|
||||||
<span id="userId" style="display: none"><shiro:principal property="userId" /></span>
|
<span id="userId" style="display: none"><shiro:principal property="userId" /></span>
|
||||||
</a>
|
</a>
|
||||||
@ -100,14 +100,14 @@
|
|||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
// setLangLabel();
|
// setLangLabel();
|
||||||
|
|
||||||
//修改信息
|
//修改信息
|
||||||
$("#userInfoBtn").on('click', function () {
|
$("#userInfoBtn").on('click', function () {
|
||||||
Core.load("#myInfoOpenWindow","[[@{/user/edit}]]?userId="+$("#userId").text(), function(){
|
Core.load("#myInfoOpenWindow","[[@{/user/edit}]]?userId="+$("#userId").text(), function(){
|
||||||
$("#myModal").modal("show");
|
$("#myModal").modal("show");
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
/*切换语言*/
|
/*切换语言*/
|
||||||
$("#changeLangBtn").on('click', function () {
|
$("#changeLangBtn").on('click', function () {
|
||||||
Core.confirm('确定切换系统语言?', function () {
|
Core.confirm('确定切换系统语言?', function () {
|
||||||
@ -120,7 +120,7 @@
|
|||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*退出登录*/
|
/*退出登录*/
|
||||||
$("#logoutBtn").on('click', function () {
|
$("#logoutBtn").on('click', function () {
|
||||||
Core.confirm("确定退出登录?",function () {
|
Core.confirm("确定退出登录?",function () {
|
||||||
@ -160,13 +160,13 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function getCookie(name){
|
function getCookie(name){
|
||||||
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
|
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
|
||||||
if(arr=document.cookie.match(reg))return unescape(arr[2]);
|
if(arr=document.cookie.match(reg))return unescape(arr[2]);
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLangLabel(){
|
function setLangLabel(){
|
||||||
var lang = getCookie("userLanguage");
|
var lang = getCookie("userLanguage");
|
||||||
if(lang == 'zh'){
|
if(lang == 'zh'){
|
||||||
@ -178,5 +178,16 @@
|
|||||||
$('#lang-label').text('中文');
|
$('#lang-label').text('中文');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getAvatar();
|
||||||
|
|
||||||
|
//获取企业微信头像
|
||||||
|
function getAvatar(){
|
||||||
|
//初始化下拉框
|
||||||
|
$.getJSON("/cases/qywx/getAvatar",function (data){
|
||||||
|
if(data.data !== ""){
|
||||||
|
$("#avatar").attr('src',data.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user