1. 优化了查询SQL
2. 控制台调试支持选择人员
This commit is contained in:
parent
363d968635
commit
6b9acef655
@ -1,4 +1,4 @@
|
|||||||
package cn.com.tenlion.systemcard.controller.app.api.cardconsole;
|
package cn.com.tenlion.systemcard.controller.api.cardconsole;
|
||||||
|
|
||||||
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumngroup.ConfigColumnGroupDTO;
|
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumngroup.ConfigColumnGroupDTO;
|
||||||
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||||
@ -29,8 +29,8 @@ import java.util.Map;
|
|||||||
**/
|
**/
|
||||||
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "接口")
|
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(ISystemConstant.APP_PREFIX + "/cardconsole")
|
@RequestMapping(ISystemConstant.API_PREFIX + "/cardconsole")
|
||||||
public class CardConsoleAppController extends DefaultBaseController {
|
public class CardConsoleController extends DefaultBaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMiniappUserService iMiniappUserService;
|
private IMiniappUserService iMiniappUserService;
|
@ -1,6 +1,7 @@
|
|||||||
package cn.com.tenlion.systemcard.controller.app.api.cardtemplatescans;
|
package cn.com.tenlion.systemcard.controller.app.api.cardtemplatescans;
|
||||||
|
|
||||||
import cn.com.tenlion.systemcard.pojo.vos.cardtemplatescans.CardTemplateScansSaveVO;
|
import cn.com.tenlion.systemcard.pojo.vos.cardtemplatescans.CardTemplateScansSaveVO;
|
||||||
|
import cn.com.tenlion.systemcard.socket.CardLogSocket;
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
@ -110,8 +111,11 @@ public class CardTemplateScansAppController extends DefaultBaseController {
|
|||||||
params.put("cardTemplateUseUserId", userId);
|
params.put("cardTemplateUseUserId", userId);
|
||||||
}
|
}
|
||||||
page.setParams(params);
|
page.setParams(params);
|
||||||
return cardTemplateScansService.listPage(page);
|
SuccessResultList<List<CardTemplateScansDTO>> list = cardTemplateScansService.listPage(page);
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
CardLogSocket cardLogSocket;
|
||||||
|
|
||||||
}
|
}
|
@ -21,7 +21,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "CBC日志控制台")
|
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "CBC日志控制台")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/cardconsole")
|
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/cardconsole")
|
||||||
public class CardConsoleController extends DefaultBaseController {
|
public class CardConsoleRouteController extends DefaultBaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ServerProperties systemProperties;
|
private ServerProperties systemProperties;
|
||||||
@ -33,4 +33,10 @@ public class CardConsoleController extends DefaultBaseController {
|
|||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("appuser")
|
||||||
|
public ModelAndView appUser() {
|
||||||
|
ModelAndView mv = new ModelAndView("cardconsole/select-department-appuser");
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.systemcard.filter;
|
package cn.com.tenlion.systemcard.filter;
|
||||||
|
|
||||||
|
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||||
import cn.com.tenlion.systemcard.socket.CardLogSocket;
|
import cn.com.tenlion.systemcard.socket.CardLogSocket;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
import ink.wgink.pojo.app.AppTokenUser;
|
import ink.wgink.pojo.app.AppTokenUser;
|
||||||
@ -33,7 +34,9 @@ public class CardAppException {
|
|||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
public ModelAndView customException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Exception e) {
|
public ModelAndView customException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Exception e) {
|
||||||
System.out.println(e.getMessage());
|
if (!ProjectConfigUtil.getSwitch("consoleDebugSwitch")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
HttpServletRequest httpRequest = (HttpServletRequest) httpServletRequest;
|
HttpServletRequest httpRequest = (HttpServletRequest) httpServletRequest;
|
||||||
String token = httpRequest.getHeader("token");
|
String token = httpRequest.getHeader("token");
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.systemcard.filter;
|
package cn.com.tenlion.systemcard.filter;
|
||||||
|
|
||||||
|
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||||
import cn.com.tenlion.systemcard.socket.CardLogSocket;
|
import cn.com.tenlion.systemcard.socket.CardLogSocket;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
@ -38,6 +39,10 @@ public class CardAppFilter extends DefaultBaseController implements Filter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||||
|
if (!ProjectConfigUtil.getSwitch("consoleDebugSwitch")) {
|
||||||
|
filterChain.doFilter(servletRequest, servletResponse);
|
||||||
|
return;
|
||||||
|
}
|
||||||
HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
|
HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
|
||||||
String token = httpRequest.getHeader("token");
|
String token = httpRequest.getHeader("token");
|
||||||
String url = httpRequest.getRequestURI();
|
String url = httpRequest.getRequestURI();
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package cn.com.tenlion.systemcard.service.cardtemplatescans.impl;
|
package cn.com.tenlion.systemcard.service.cardtemplatescans.impl;
|
||||||
|
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.cardtemplate.CardTemplateDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.dtos.cardtemplateuse.CardTemplateUseDTO;
|
import cn.com.tenlion.systemcard.pojo.dtos.cardtemplateuse.CardTemplateUseDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.vos.cardtemplatescans.CardTemplateScansSaveVO;
|
import cn.com.tenlion.systemcard.pojo.vos.cardtemplatescans.CardTemplateScansSaveVO;
|
||||||
import cn.com.tenlion.systemcard.service.cardtemplateuse.ICardTemplateUseService;
|
import cn.com.tenlion.systemcard.service.cardtemplateuse.ICardTemplateUseService;
|
||||||
|
import cn.com.tenlion.systemcard.socket.CardLogSocket;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.module.wechat.pojo.pos.miniapp.MiniappUserPO;
|
import ink.wgink.module.wechat.pojo.pos.miniapp.MiniappUserPO;
|
||||||
@ -226,6 +228,7 @@ public class CardTemplateScansServiceImpl extends DefaultBaseService implements
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CardTemplateScansBO> listBO(Map<String, Object> params) {
|
public List<CardTemplateScansBO> listBO(Map<String, Object> params) {
|
||||||
return cardTemplateScansDao.listBO(params);
|
return cardTemplateScansDao.listBO(params);
|
||||||
@ -240,23 +243,49 @@ public class CardTemplateScansServiceImpl extends DefaultBaseService implements
|
|||||||
public SuccessResultList<List<CardTemplateScansDTO>> listPage(ListPage page) {
|
public SuccessResultList<List<CardTemplateScansDTO>> listPage(ListPage page) {
|
||||||
PageHelper.startPage(page.getPage(), page.getRows());
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
List<CardTemplateScansDTO> cardTemplateScansDTOs = list(page.getParams());
|
List<CardTemplateScansDTO> cardTemplateScansDTOs = list(page.getParams());
|
||||||
// 加载系统默认名片在最上面
|
// 为了让系统默认名片在最上面 , 把本页的系统默认名片先删除掉
|
||||||
if(1 == page.getPage() && page.getParams().get("homePage") != null && 1 == Integer.valueOf(page.getParams().get("homePage").toString())) {
|
Iterator<CardTemplateScansDTO> scansDTOIterator = cardTemplateScansDTOs.iterator();
|
||||||
|
while(scansDTOIterator.hasNext()) {
|
||||||
|
CardTemplateScansDTO cardTemplateScansDTO = scansDTOIterator.next();
|
||||||
|
CardTemplateUseDTO useDTO = iCardTemplateUseService.get(cardTemplateScansDTO.getCardTemplateUseId());
|
||||||
|
if("1".equals(useDTO.getCardTemplateUseSystem())) {
|
||||||
|
scansDTOIterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 把系统默认名片放到第一页
|
||||||
|
if(1 == page.getPage()) {
|
||||||
CardTemplateUseDTO cardTemplateUseDTO = iCardTemplateUseService.getSystemCard();
|
CardTemplateUseDTO cardTemplateUseDTO = iCardTemplateUseService.getSystemCard();
|
||||||
List<CardTemplateScansDTO> cardTemplateScansDTOList = new ArrayList<CardTemplateScansDTO>();
|
|
||||||
if(cardTemplateUseDTO != null) {
|
if(cardTemplateUseDTO != null) {
|
||||||
CardTemplateScansDTO scansDTO = new CardTemplateScansDTO();
|
CardTemplateScansDTO scansDTO = new CardTemplateScansDTO();
|
||||||
scansDTO.setCardTemplateUseId(cardTemplateUseDTO.getCardTemplateUseId());
|
scansDTO.setCardTemplateUseId(cardTemplateUseDTO.getCardTemplateUseId());
|
||||||
scansDTO.setCardTemplateUseDTO(cardTemplateUseDTO);
|
scansDTO.setCardTemplateUseDTO(cardTemplateUseDTO);
|
||||||
cardTemplateScansDTOList.add(scansDTO);
|
cardTemplateScansDTOs.add(0, scansDTO);
|
||||||
}
|
}
|
||||||
cardTemplateScansDTOList.addAll(cardTemplateScansDTOs);
|
|
||||||
PageInfo<CardTemplateScansDTO> pageInfo = new PageInfo<>(cardTemplateScansDTOList);
|
|
||||||
return new SuccessResultList<>(cardTemplateScansDTOList, pageInfo.getPageNum(), pageInfo.getTotal());
|
|
||||||
}else {
|
|
||||||
PageInfo<CardTemplateScansDTO> pageInfo = new PageInfo<>(cardTemplateScansDTOs);
|
|
||||||
return new SuccessResultList<>(cardTemplateScansDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
|
||||||
}
|
}
|
||||||
|
PageInfo<CardTemplateScansDTO> pageInfo = new PageInfo<>(cardTemplateScansDTOs);
|
||||||
|
return new SuccessResultList<>(cardTemplateScansDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
// 加载系统默认名片在最上面
|
||||||
|
// if(1 == page.getPage() && page.getParams().get("homePage") != null && 1 == Integer.valueOf(page.getParams().get("homePage").toString())) {
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 如果有系统默认名片. 删除掉,
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
// CardTemplateUseDTO cardTemplateUseDTO = iCardTemplateUseService.getSystemCard();
|
||||||
|
// List<CardTemplateScansDTO> cardTemplateScansDTOList = new ArrayList<CardTemplateScansDTO>();
|
||||||
|
// if(cardTemplateUseDTO != null) {
|
||||||
|
// CardTemplateScansDTO scansDTO = new CardTemplateScansDTO();
|
||||||
|
// scansDTO.setCardTemplateUseId(cardTemplateUseDTO.getCardTemplateUseId());
|
||||||
|
// scansDTO.setCardTemplateUseDTO(cardTemplateUseDTO);
|
||||||
|
// cardTemplateScansDTOList.add(scansDTO);
|
||||||
|
// }
|
||||||
|
// cardTemplateScansDTOList.addAll(cardTemplateScansDTOs);
|
||||||
|
// PageInfo<CardTemplateScansDTO> pageInfo = new PageInfo<>(cardTemplateScansDTOList);
|
||||||
|
// return new SuccessResultList<>(cardTemplateScansDTOList, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
// }else {
|
||||||
|
// PageInfo<CardTemplateScansDTO> pageInfo = new PageInfo<>(cardTemplateScansDTOs);
|
||||||
|
// return new SuccessResultList<>(cardTemplateScansDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -338,7 +338,7 @@ public class CardTemplateUseServiceImpl extends DefaultBaseService implements IC
|
|||||||
buildingPicturesMap.put(buildingDTO.getTemplateAreaSource(), userPO.getAvatarUrl());
|
buildingPicturesMap.put(buildingDTO.getTemplateAreaSource(), userPO.getAvatarUrl());
|
||||||
// 海报小程序二维码
|
// 海报小程序二维码
|
||||||
}else if("currentUserPosterQRCode".equals(buildingDTO.getTemplateAreaSource())) {
|
}else if("currentUserPosterQRCode".equals(buildingDTO.getTemplateAreaSource())) {
|
||||||
buildingPicturesMap.put(buildingDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateUseId=" + cardTemplateUseId);
|
buildingPicturesMap.put(buildingDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateUseId=" + cardTemplateUseId + "&userId=" + "e022768c-14f4-4dde-847f-b51587be9d36" );
|
||||||
// 名片小程序二维码
|
// 名片小程序二维码
|
||||||
}else if("currentUserQRCode".equals(buildingDTO.getTemplateAreaSource())) {
|
}else if("currentUserQRCode".equals(buildingDTO.getTemplateAreaSource())) {
|
||||||
buildingPicturesMap.put(buildingDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateDispatchId=" + cardTemplateUseId);
|
buildingPicturesMap.put(buildingDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateDispatchId=" + cardTemplateUseId);
|
||||||
@ -402,7 +402,7 @@ public class CardTemplateUseServiceImpl extends DefaultBaseService implements IC
|
|||||||
String cardTemplateDispatchId = iCardTemplateDispatchService.saveReturnId(token, cardTemplateDispatchSaveVO);
|
String cardTemplateDispatchId = iCardTemplateDispatchService.saveReturnId(token, cardTemplateDispatchSaveVO);
|
||||||
if("2".equals(cardTemplateAppDTO.getTemplateMode())) {
|
if("2".equals(cardTemplateAppDTO.getTemplateMode())) {
|
||||||
// 生成海报二维码
|
// 生成海报二维码
|
||||||
BufferedImage weiXinImage = WeiXinBarCodeUtils.getBarCodeImage(appKey, appSecret, "pages/index/index?cardTemplateUseId=" + cardTemplateUseId, 200);
|
BufferedImage weiXinImage = WeiXinBarCodeUtils.getBarCodeImage(appKey, appSecret, "pages/index/index?cardTemplateUseId=" + cardTemplateUseId + "&userId=" + getUserId(token) , 200);
|
||||||
String fileId = iPicturesTemplateBuildingService.saveBufferImageToFile(weiXinImage);
|
String fileId = iPicturesTemplateBuildingService.saveBufferImageToFile(weiXinImage);
|
||||||
vo.setCardTemplateUseBarcode(fileId);
|
vo.setCardTemplateUseBarcode(fileId);
|
||||||
}else{
|
}else{
|
||||||
@ -567,7 +567,7 @@ public class CardTemplateUseServiceImpl extends DefaultBaseService implements IC
|
|||||||
buildingPicturesMap.put(useAreaDTO.getTemplateAreaSource(), userPO.getAvatarUrl());
|
buildingPicturesMap.put(useAreaDTO.getTemplateAreaSource(), userPO.getAvatarUrl());
|
||||||
// 海报小程序二维码
|
// 海报小程序二维码
|
||||||
}else if("currentUserPosterQRCode".equals(useAreaDTO.getTemplateAreaSource())) {
|
}else if("currentUserPosterQRCode".equals(useAreaDTO.getTemplateAreaSource())) {
|
||||||
buildingPicturesMap.put(useAreaDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateUseId=" + cardTemplateUseId);
|
buildingPicturesMap.put(useAreaDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateUseId=" + cardTemplateUseId + "&userId=" + getUserId(token) );
|
||||||
// 名片小程序二维码
|
// 名片小程序二维码
|
||||||
}else if("currentUserQRCode".equals(useAreaDTO.getTemplateAreaSource())) {
|
}else if("currentUserQRCode".equals(useAreaDTO.getTemplateAreaSource())) {
|
||||||
buildingPicturesMap.put(useAreaDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateDispatchId=" + cardTemplateUseId);
|
buildingPicturesMap.put(useAreaDTO.getTemplateAreaSource(), "appid=" + WeiXinUtils.getAppKey() + "&secret=" + WeiXinUtils.getAppSecret() + "&path=pages/index/index&cardTemplateDispatchId=" + cardTemplateUseId);
|
||||||
|
@ -220,10 +220,10 @@
|
|||||||
t1.is_delete
|
t1.is_delete
|
||||||
FROM
|
FROM
|
||||||
e_card_template_scans t1
|
e_card_template_scans t1
|
||||||
LEFT JOIN
|
/* LEFT JOIN
|
||||||
e_card_template_use t2
|
e_card_template_use t2
|
||||||
ON
|
ON
|
||||||
t1.card_template_use_id = t2.card_template_use_id
|
t1.card_template_use_id = t2.card_template_use_id*/
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="creator != null and creator != ''">
|
<if test="creator != null and creator != ''">
|
||||||
@ -236,9 +236,9 @@
|
|||||||
AND t1.card_template_use_id = #{cardTemplateUseId}
|
AND t1.card_template_use_id = #{cardTemplateUseId}
|
||||||
</if>
|
</if>
|
||||||
<!-- 不查询首页 -->
|
<!-- 不查询首页 -->
|
||||||
<if test="homePage != null and homePage == 1">
|
<!-- <if test="homePage != null and homePage == 1">
|
||||||
AND t2.card_template_use_system = '0'
|
AND t2.card_template_use_system = '0'
|
||||||
</if>
|
</if>-->
|
||||||
ORDER BY
|
ORDER BY
|
||||||
t1.gmt_create DESC
|
t1.gmt_create DESC
|
||||||
</select>
|
</select>
|
||||||
|
@ -71,9 +71,9 @@ var context = context || (function () {
|
|||||||
}
|
}
|
||||||
if (typeof data[i].action !== 'undefined') {
|
if (typeof data[i].action !== 'undefined') {
|
||||||
var actiond = new Date(),
|
var actiond = new Date(),
|
||||||
actionID = 'event-' + actiond.getTime() * Math.floor(Math.random()*100000),
|
actionID = 'event-' + actiond.getTime() * Math.floor(Math.random()*100000),
|
||||||
eventAction = data[i].action;
|
eventAction = data[i].action;
|
||||||
$sub.find('a').attr('id', actionID);
|
$sub.find('a').attr('id', data[i].id ? data[i].id : actionID);
|
||||||
$('#' + actionID).addClass('context-event');
|
$('#' + actionID).addClass('context-event');
|
||||||
$(document).on('click', '#' + actionID, eventAction);
|
$(document).on('click', '#' + actionID, eventAction);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ var context = context || (function () {
|
|||||||
var actiond = new Date(),
|
var actiond = new Date(),
|
||||||
actionID = 'event-' + actiond.getTime() * Math.floor(Math.random()*100000),
|
actionID = 'event-' + actiond.getTime() * Math.floor(Math.random()*100000),
|
||||||
eventAction = data[i].action;
|
eventAction = data[i].action;
|
||||||
$sub.find('a').attr('id', actionID);
|
$sub.find('a').attr('id', data[i].id ? data[i].id : actionID);
|
||||||
$('#' + actionID).addClass('context-event');
|
$('#' + actionID).addClass('context-event');
|
||||||
$(document).on('click', '#' + actionID, eventAction);
|
$(document).on('click', '#' + actionID, eventAction);
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ layui.define(function(exports) {
|
|||||||
cancel: function (index) {
|
cancel: function (index) {
|
||||||
self.closeBox();
|
self.closeBox();
|
||||||
},
|
},
|
||||||
|
success: opt.onSuccess,
|
||||||
end: opt.onClose
|
end: opt.onClose
|
||||||
});
|
});
|
||||||
this.dialogArray.push(index);
|
this.dialogArray.push(index);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
<input type="text" style="" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
|
@ -10,6 +10,12 @@
|
|||||||
<!-- 代码编辑器 -->
|
<!-- 代码编辑器 -->
|
||||||
<script src="assets/js/vendor/template/jquery.min.js"></script>
|
<script src="assets/js/vendor/template/jquery.min.js"></script>
|
||||||
<script src="assets/js/vendor/template/jstorage.min.js"></script>
|
<script src="assets/js/vendor/template/jstorage.min.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="assets/js/vendor/safety/js/jquery.min.js" ></script>
|
||||||
|
<script type="text/javascript" src="assets/js/vendor/safety/js/context.js"></script>
|
||||||
|
<script type="text/javascript" src="assets/js/vendor/safety/js/drag.js" ></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/safety/css/context.standalone.css">
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var codetype="java";
|
var codetype="java";
|
||||||
var unid="59396e99ae344";
|
var unid="59396e99ae344";
|
||||||
@ -39,7 +45,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="10">
|
<td colspan="10">
|
||||||
<div class="starter-template">
|
<div class="starter-template">
|
||||||
<div id="editor" class="ace_editor ace-monokai ace_dark">
|
<div id="editor" class="ace_editor ace-monokai ace_dark" data-clipboard-action="copy">
|
||||||
<textarea id="codeContent" class="ace_text-input" wrap="off" autocorrect="off" autocapitalize="off" spellcheck="false" style="opacity: 0; height: 17px; width: 8px; left: 45px; top: 0px;"></textarea>
|
<textarea id="codeContent" class="ace_text-input" wrap="off" autocorrect="off" autocapitalize="off" spellcheck="false" style="opacity: 0; height: 17px; width: 8px; left: 45px; top: 0px;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +61,7 @@
|
|||||||
<a class="btn btn-big btn-danger" id="jumpNumber">指定行跳转</a>
|
<a class="btn btn-big btn-danger" id="jumpNumber">指定行跳转</a>
|
||||||
<label class="layui-form-label">打印异常详情</label>
|
<label class="layui-form-label">打印异常详情</label>
|
||||||
<input type="checkbox" style="height:15px;width:15px;" id="exceptionDescription">
|
<input type="checkbox" style="height:15px;width:15px;" id="exceptionDescription">
|
||||||
<a class="btn btn-big btn-warm">选中文字内容 CTRL + K【下一个】 | ALT + SHIF + K【上一个】</a>
|
<span class="btn btn-big btn-warm" id="copyData" >选中文字内容 CTRL + K【下一个】 | ALT + SHIF + K【上一个】</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -74,6 +80,7 @@
|
|||||||
<script src="assets/js/vendor/template/ace.js" type="text/javascript" charset="utf-8"></script>
|
<script src="assets/js/vendor/template/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<!--提示框-->
|
<!--提示框-->
|
||||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/safety/copy/clipboard.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
layui.config({
|
layui.config({
|
||||||
@ -136,7 +143,7 @@
|
|||||||
};
|
};
|
||||||
//获得消息事件
|
//获得消息事件
|
||||||
socket.onmessage = function(msg) {
|
socket.onmessage = function(msg) {
|
||||||
console.log(msg.data);
|
// console.log(msg.data);
|
||||||
if(!stopStatus) {
|
if(!stopStatus) {
|
||||||
consoleLog = consoleLog + ( msg.data + "\r\n" );
|
consoleLog = consoleLog + ( msg.data + "\r\n" );
|
||||||
//发现消息进入
|
//发现消息进入
|
||||||
@ -157,9 +164,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click','#selectUser',function(){
|
$(document).on('click','#selectUser',function(){
|
||||||
top.dialog.dialogData.selectedUserIds = $('#selectUserVal').val();
|
// route/cardconsole/appuser route/department/user/select-user
|
||||||
top.dialog.open({
|
var index = top.dialog.open({
|
||||||
url: top.restAjax.path('route/department/user/select-user', []),
|
url: top.restAjax.path('route/cardconsole/appuser?selectedUserIds=' + $('#selectUserVal').val(), []),
|
||||||
title: '选择用户',
|
title: '选择用户',
|
||||||
width: '500px',
|
width: '500px',
|
||||||
height: '500px',
|
height: '500px',
|
||||||
@ -362,6 +369,47 @@
|
|||||||
closeBox();
|
closeBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 右键菜单参数
|
||||||
|
context.init({
|
||||||
|
fadeSpeed: 100,
|
||||||
|
filter: function ($obj){},
|
||||||
|
above: 'auto',
|
||||||
|
preventDoubleContext: true,
|
||||||
|
compress: false
|
||||||
|
});
|
||||||
|
|
||||||
|
context.attach('#editor', [
|
||||||
|
// {header: '操作'},
|
||||||
|
// {id: 'test', text: '复 制 内 容', action: function(e){
|
||||||
|
// e.preventDefault();
|
||||||
|
// var text = editor.getSelectedText();
|
||||||
|
// // var clipboard = new Clipboard('#editor',{
|
||||||
|
// // text: function(trigger) {
|
||||||
|
// // console.log(trigger);
|
||||||
|
// // return "123"; // trigger.getAttribute('aria-label');
|
||||||
|
// // }
|
||||||
|
// // });
|
||||||
|
// // clipboard.on('success', function(e) {
|
||||||
|
// // top.layer.msg("已复制到剪切板")
|
||||||
|
// // });
|
||||||
|
// // clipboard.on('error', function(e) {
|
||||||
|
// // top.layer.msg("复制失败");
|
||||||
|
// // });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
{text: '暂 停 | 继 续', action: function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
$("#stop").click();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{text: '清 空 控 制 台', action: function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
$("#clear").click();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{divider: true}
|
||||||
|
] );
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
function initData() {
|
function initData() {
|
||||||
consoleLog = "控制台等待连接...\r\n\r\n";
|
consoleLog = "控制台等待连接...\r\n\r\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user