Commit 268b09ee authored by “yiyousong”'s avatar “yiyousong”
parents 12ebd7a5 dadacf10
...@@ -3,12 +3,15 @@ package com.mortals.xhx.base.framework.config; ...@@ -3,12 +3,15 @@ package com.mortals.xhx.base.framework.config;
import com.mortals.framework.filter.RepeatableFilter; import com.mortals.framework.filter.RepeatableFilter;
import com.mortals.framework.filter.XssFilter; import com.mortals.framework.filter.XssFilter;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.framework.filter.RepeatReadHttpRequest;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import javax.servlet.DispatcherType; import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -17,8 +20,8 @@ import java.util.Map; ...@@ -17,8 +20,8 @@ import java.util.Map;
* *
* @author zxfei * @author zxfei
*/ */
//@Configuration @Configuration
public class FilterConfig { public class FilterConfig {
@Value("${xss.enabled}") @Value("${xss.enabled}")
private String enabled; private String enabled;
...@@ -45,7 +48,7 @@ public class FilterConfig { ...@@ -45,7 +48,7 @@ public class FilterConfig {
} }
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})
@Bean /* @Bean
public FilterRegistrationBean someFilterRegistration() { public FilterRegistrationBean someFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean(); FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new RepeatableFilter()); registration.setFilter(new RepeatableFilter());
...@@ -53,6 +56,33 @@ public class FilterConfig { ...@@ -53,6 +56,33 @@ public class FilterConfig {
registration.setName("repeatableFilter"); registration.setName("repeatableFilter");
registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE); registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE);
return registration; return registration;
}*/
@Bean
public FilterRegistrationBean requestReplaceFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(new RequestReplaceFilter());
registrationBean.addUrlPatterns("/*");
registrationBean.setName("RequestReplaceFilter");
registrationBean.setOrder(1);
return registrationBean;
}
public static class RequestReplaceFilter implements Filter {
@Override
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException {
}
@Override
public void destroy() {
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
filterChain.doFilter(new RepeatReadHttpRequest((HttpServletRequest) servletRequest), servletResponse);
}
} }
} }
...@@ -6,53 +6,45 @@ import org.springframework.stereotype.Component; ...@@ -6,53 +6,45 @@ import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter; import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.util.ContentCachingRequestWrapper; import org.springframework.web.util.ContentCachingRequestWrapper;
import javax.servlet.Filter; import javax.servlet.*;
import javax.servlet.FilterChain; import javax.servlet.annotation.WebFilter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
/** /**
*
* 请求过滤链 * 请求过滤链
*
* @author: zxfei * @author: zxfei
* @date: 2022/4/20 14:52 * @date: 2022/4/20 14:52
*/ */
//@Component //@WebFilter(urlPatterns = "/*")
@Slf4j @Slf4j
public class RequestFilter extends OncePerRequestFilter implements Filter { public class RequestFilter implements Filter {
private static final String FORM_CONTENT_TYPE = "multipart/form-data";
@Override @Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { public void init(FilterConfig filterConfig) {
try {
request = new ContentCachingRequestWrapper(request);
filterChain.doFilter(request, response);
} catch (Exception e) {
throw e;
} finally {
//清理ThreadLocal
MDC.clear();
}
} }
@Override
/*private void setUsername(HttpServletRequest request) { public void doFilter(ServletRequest request, ServletResponse response,
//通过token解析出username FilterChain chain) throws IOException, ServletException {
String token = authTokenService.getToken(request); String contentType = request.getContentType();
//String token = request.getHeader("token"); if (request instanceof HttpServletRequest) {
if (!ObjectUtils.isEmpty(token)) { HttpServletRequest requestWrapper = new ContentCachingRequestWrapper((HttpServletRequest) request);
MDC.put("token",token); // #1
MDC.put("token", token); if (contentType != null && contentType.contains(FORM_CONTENT_TYPE)) {
try { chain.doFilter(request, response);
SessionUserInfo info = tokenService.getUserInfo(); } else {
if (info != null) { chain.doFilter(requestWrapper, response);
String username = info.getUsername();
MDC.put("username", username);
}
} catch (CommonJsonException e) {
log.info("无效的token:{}", token);
} }
return;
} }
}*/ chain.doFilter(request, response);
}
@Override
public void destroy() {
}
} }
...@@ -9,9 +9,19 @@ import com.mortals.framework.model.Context; ...@@ -9,9 +9,19 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseJsonBodyController; import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterInfo; import com.mortals.xhx.module.matter.model.vo.MatterInfo;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.window.model.*;
import com.mortals.xhx.module.window.service.WindowBusinessService;
import com.mortals.xhx.module.window.service.WindowMatterService;
import com.mortals.xhx.module.window.service.WindowService;
import lombok.extern.apachecommons.CommonsLog; import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
...@@ -30,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -30,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -47,6 +58,16 @@ import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY; ...@@ -47,6 +58,16 @@ import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
@Slf4j @Slf4j
public class DemoWebApiController { public class DemoWebApiController {
@Autowired
private WindowService windowService;
@Autowired
private SiteMatterService siteMatterService;
@Autowired
private WindowMatterService windowMatterService;
@Autowired
private DeptService deptService;
@PostMapping(value = "testGov") @PostMapping(value = "testGov")
@UnAuth @UnAuth
public Rest<String> testGov(@RequestBody MatterQuery query) { public Rest<String> testGov(@RequestBody MatterQuery query) {
...@@ -83,6 +104,64 @@ public class DemoWebApiController { ...@@ -83,6 +104,64 @@ public class DemoWebApiController {
} }
@PostMapping(value = "reDepts")
@UnAuth
public Rest<String> reDepts() {
log.info("更新部门与设备关联");
//更新窗口部门
List<WindowEntity> windowEntities = windowService.find(new WindowQuery());
for (WindowEntity windowEntity : windowEntities) {
String deptName = windowEntity.getDeptName();
//根据部门名称查询部门
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().name(deptName+"%"));
if (!ObjectUtils.isEmpty(deptEntity)) {
if (deptEntity.getId() != windowEntity.getDeptId()&&deptEntity.getName().trim().equals(windowEntity.getDeptName().trim())) {
log.info("部门:{},更新部门id:orgin deptId:{} ,updateDeptId:{}", deptName, windowEntity.getDeptId(), deptEntity.getId());
WindowEntity temp = new WindowEntity();
temp.setId(windowEntity.getId());
temp.setDeptId(deptEntity.getId());
windowService.getDao().update(temp);
// windowService.update(windowEntity);
}
}
}
//更新窗口事项中的部门id
List<WindowMatterEntity> windowMatterEntities = windowMatterService.find(new WindowMatterQuery());
for (WindowMatterEntity windowMatterEntity : windowMatterEntities) {
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().name(windowMatterEntity.getDeptName()+"%"));
if (!ObjectUtils.isEmpty(deptEntity)) {
if (deptEntity.getId() != windowMatterEntity.getDeptId()&&windowMatterEntity.getDeptName().trim().equals(deptEntity.getName())) {
WindowMatterEntity temp = new WindowMatterEntity();
temp.setId(windowMatterEntity.getId());
temp.setDeptId(deptEntity.getId());
temp.setDeptCode(deptEntity.getDeptNumber());
windowMatterService.getDao().update(temp);
// windowMatterService.update(windowMatterEntity);
}
}
}
List<SiteMatterEntity> siteMatterEntities = siteMatterService.find(new SiteMatterQuery());
for (SiteMatterEntity siteMatterEntity : siteMatterEntities) {
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().name(siteMatterEntity.getDeptName()+"%"));
if (!ObjectUtils.isEmpty(deptEntity)) {
if (deptEntity.getId() != siteMatterEntity.getDeptId()&&siteMatterEntity.getDeptName().trim().equals(deptEntity.getName().trim())) {
SiteMatterEntity temp = new SiteMatterEntity();
temp.setId(siteMatterEntity.getId());
temp.setDeptId(deptEntity.getId());
temp.setDeptCode(deptEntity.getDeptNumber());
siteMatterService.getDao().update(temp);
//siteMatterService.update(siteMatterEntity);
}
}
}
return Rest.ok();
}
public static void main(String[] args) { public static void main(String[] args) {
HttpClient http = null; HttpClient http = null;
CookieStore httpCookieStore = new BasicCookieStore(); CookieStore httpCookieStore = new BasicCookieStore();
...@@ -96,9 +175,9 @@ public class DemoWebApiController { ...@@ -96,9 +175,9 @@ public class DemoWebApiController {
byte[] data = EntityUtils.toByteArray(httpResponse.getEntity()); byte[] data = EntityUtils.toByteArray(httpResponse.getEntity());
String encode = Base64.encode(data); String encode = Base64.encode(data);
log.info("encode64:{}",encode); log.info("encode64:{}", encode);
// String resp = com.mortals.framework.util.HttpUtil.processMultipartResponse(httpResponse); // String resp = com.mortals.framework.util.HttpUtil.processMultipartResponse(httpResponse);
// log.info("resp:{}", resp); // log.info("resp:{}", resp);
//String content = EntityUtils.toString(entity, charset); //String content = EntityUtils.toString(entity, charset);
//httpResponse.getEntity() //httpResponse.getEntity()
//httpResponse.toString() //httpResponse.toString()
...@@ -107,7 +186,7 @@ public class DemoWebApiController { ...@@ -107,7 +186,7 @@ public class DemoWebApiController {
} }
/* check cookies */ /* check cookies */
String cookieStr = Arrays.asList(httpCookieStore.getCookies()).stream().map(item -> JSON.toJSONString(item)).collect(Collectors.joining("|")); String cookieStr = Arrays.asList(httpCookieStore.getCookies()).stream().map(item -> JSON.toJSONString(item)).collect(Collectors.joining("|"));
// log.info("cookies:{}", cookieStr); // log.info("cookies:{}", cookieStr);
} }
......
...@@ -65,7 +65,6 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService, ...@@ -65,7 +65,6 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
List<AppEntity> appEntityList = this.service.find(new AppQuery().appCode(entity.getAppCode()), context); List<AppEntity> appEntityList = this.service.find(new AppQuery().appCode(entity.getAppCode()), context);
entity.setApplianceSiteScope(appEntityList.size()); entity.setApplianceSiteScope(appEntityList.size());
entity.setSiteIdList(appEntityList.stream().map(AppEntity::getSiteId).collect(Collectors.toList())); entity.setSiteIdList(appEntityList.stream().map(AppEntity::getSiteId).collect(Collectors.toList()));
SiteEntity siteEntity = siteService.getCache(entity.getSiteId().toString()); SiteEntity siteEntity = siteService.getCache(entity.getSiteId().toString());
if(!ObjectUtils.isEmpty(siteEntity)){ if(!ObjectUtils.isEmpty(siteEntity)){
//请求地址 http://domian/app/siteCode/appcode/html //请求地址 http://domian/app/siteCode/appcode/html
......
...@@ -49,9 +49,6 @@ import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH; ...@@ -49,9 +49,6 @@ import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH;
@RequestMapping("app/version") @RequestMapping("app/version")
public class AppVersionController extends BaseCRUDJsonBodyMappingController<AppVersionService, AppVersionEntity, Long> { public class AppVersionController extends BaseCRUDJsonBodyMappingController<AppVersionService, AppVersionEntity, Long> {
@Autowired
private ParamService paramService;
@Autowired @Autowired
private SiteService siteService; private SiteService siteService;
@Autowired @Autowired
......
...@@ -69,6 +69,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -69,6 +69,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return data.getDeptNumber(); return data.getDeptNumber();
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void validData(DeptEntity entity, Context context) throws AppException {
super.validData(entity, context);
//校验部门编码是否重复
DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache) && SourceEnum.自定义.getValue() == entity.getSource()) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
}
}
@Override @Override
public void syncDept(String areaCode, Context context) { public void syncDept(String areaCode, Context context) {
List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery()); List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery());
...@@ -96,22 +111,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -96,22 +111,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
public Rest<String> syncDeptBySiteId(SiteEntity siteEntity, Context context) { public Rest<String> syncDeptBySiteId(SiteEntity siteEntity, Context context) {
String url = GlobalSysInfo.getParamValue(Constant.GOV_DEPT_URL, "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch"); String url = GlobalSysInfo.getParamValue(Constant.GOV_DEPT_URL, "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch");
Long siteId = siteEntity.getId(); Long siteId = siteEntity.getId();
String areaCode = siteEntity.getAreaCode(); String areaCode = siteEntity.getAreaCode();
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
params.put("areaCode", areaCode); params.put("areaCode", areaCode);
Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url); Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
if (rest.getCode() == YesNoEnum.YES.getValue() && rest.getData().keySet().size() > 0) { if (rest.getCode() == YesNoEnum.YES.getValue() && rest.getData().keySet().size() > 0) {
//删除部门中属于政务部门的 //删除部门中属于政务部门的
deptService.deleteGovBySiteId(siteId, context); // deptService.deleteGovBySiteId(siteId, context);
int sortN = 1; int sortN = 1;
Map<String, String> data = rest.getData(); Map<String, String> data = rest.getData();
for (Map.Entry<String, String> item : data.entrySet()) { for (Map.Entry<String, String> item : data.entrySet()) {
String deptCode = item.getKey(); String deptCode = item.getKey();
String deptName = item.getValue(); String deptName = item.getValue();
int count = deptService.count(new DeptQuery().siteId(siteId).deptNumber(deptCode), context); DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (count == 0) { if (ObjectUtils.isEmpty(deptEntity)) {
DeptEntity deptEntity = new DeptEntity(); deptEntity = new DeptEntity();
deptEntity.initAttrValue(); deptEntity.initAttrValue();
deptEntity.setDeptNumber(deptCode); deptEntity.setDeptNumber(deptCode);
deptEntity.setSiteId(siteId); deptEntity.setSiteId(siteId);
...@@ -121,6 +135,13 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -121,6 +135,13 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
deptEntity.setCreateTime(new Date()); deptEntity.setCreateTime(new Date());
deptEntity.setCreateUserId(1L); deptEntity.setCreateUserId(1L);
deptService.save(deptEntity, context); deptService.save(deptEntity, context);
} else {
//更新
deptEntity.setName(deptName);
deptEntity.setSource(SourceEnum.政务网.getValue());
deptEntity.setUpdateTime(new Date());
deptEntity.setUpdateUserId(1L);
deptService.update(deptEntity, context);
} }
sortN++; sortN++;
} }
...@@ -136,7 +157,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -136,7 +157,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
List<DeptVo> businessDeptList = this.dao.getBusinessByDept(deptQuery); List<DeptVo> businessDeptList = this.dao.getBusinessByDept(deptQuery);
Map<String, List<DeptVo>> collect = businessDeptList.parallelStream().collect(Collectors.groupingBy(x -> x.getId().toString())); Map<String, List<DeptVo>> collect = businessDeptList.parallelStream().collect(Collectors.groupingBy(x -> x.getId().toString()));
return Rest.ok(collect); return Rest.ok(collect);
/* //查询部门窗口 /* //查询部门窗口
......
...@@ -150,4 +150,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -150,4 +150,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
} }
} }
\ No newline at end of file
...@@ -36,6 +36,8 @@ import com.mortals.xhx.module.site.service.SiteMatterService; ...@@ -36,6 +36,8 @@ import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import com.mortals.xhx.module.site.service.SiteThemeMatterService; import com.mortals.xhx.module.site.service.SiteThemeMatterService;
import com.mortals.xhx.module.site.service.SiteThemeService; import com.mortals.xhx.module.site.service.SiteThemeService;
import com.mortals.xhx.module.window.model.WindowMatterQuery;
import com.mortals.xhx.module.window.service.WindowMatterService;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
...@@ -92,6 +94,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -92,6 +94,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
private SiteThemeMatterService siteThemeMatterService; private SiteThemeMatterService siteThemeMatterService;
@Autowired @Autowired
private SiteThemeService siteThemeService; private SiteThemeService siteThemeService;
@Autowired
private WindowMatterService windowMatterService;
@Override @Override
...@@ -102,7 +106,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -102,7 +106,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
SiteEntity siteEntity = siteService.get(entity.getSiteId(), context); SiteEntity siteEntity = siteService.get(entity.getSiteId(), context);
entity.setAreaCode(siteEntity.getAreaCode()); entity.setAreaCode(siteEntity.getAreaCode());
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
entity.setDeptName(extCache==null?"":extCache.getName()); entity.setDeptName(extCache == null ? "" : extCache.getName());
} }
} }
...@@ -143,8 +147,34 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -143,8 +147,34 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
SiteEntity siteEntity = siteService.get(entity.getSiteId(), context); SiteEntity siteEntity = siteService.get(entity.getSiteId(), context);
entity.setAreaCode(siteEntity.getAreaCode()); entity.setAreaCode(siteEntity.getAreaCode());
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
entity.setDeptName(extCache==null?"":extCache.getName()); entity.setDeptName(extCache == null ? "" : extCache.getName());
}
MatterEntity beforeMatterEntity = this.get(entity.getId(), context);
//如果部门切换了 级联修改关联的其它项
if (!ObjectUtils.isEmpty(entity.getDeptCode())) {
if (!entity.getDeptCode().equals(beforeMatterEntity.getDeptCode())) {
//更新站点事项关联项
SiteMatterQuery condition = new SiteMatterQuery();
condition.setMatterId(entity.getId());
SiteMatterQuery siteMatterQuery = new SiteMatterQuery();
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
siteMatterQuery.setDeptId(extCache == null ? 0L : extCache.getId());
siteMatterQuery.setDeptCode(entity.getDeptCode());
siteMatterQuery.setDeptName(entity.getDeptName());
siteMatterService.updateBatch(siteMatterQuery, condition, context);
//更新站点窗口事项关联项
WindowMatterQuery winCondition = new WindowMatterQuery();
winCondition.setSiteMatterId(entity.getId());
WindowMatterQuery windowMatterQuery = new WindowMatterQuery();
windowMatterQuery.setDeptId(extCache == null ? 0L : extCache.getId());
windowMatterQuery.setDeptCode(entity.getDeptCode());
windowMatterQuery.setDeptName(entity.getDeptName());
windowMatterService.updateBatch(windowMatterQuery, winCondition, context);
}
} }
} }
super.updateBefore(entity, context); super.updateBefore(entity, context);
} }
...@@ -997,7 +1027,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -997,7 +1027,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
//更新部门信息 //更新部门信息
DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(extCache==null?"":extCache.getName()); matterEntity.setDeptName(extCache == null ? "" : extCache.getName());
/* if(!ObjectUtils.isEmpty(matterEntity.getDeptCode())&&ObjectUtils.isEmpty(matterEntity.getDeptName())){ /* if(!ObjectUtils.isEmpty(matterEntity.getDeptCode())&&ObjectUtils.isEmpty(matterEntity.getDeptName())){
DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode());
......
package com.mortals.xhx.module.site.service; package com.mortals.xhx.module.site.service;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.site.dao.SiteMatterDao;
import com.mortals.xhx.module.site.model.SiteMatterEntity; import com.mortals.xhx.module.site.model.SiteMatterEntity;
/** /**
* SiteMatterService * SiteMatterService
* * <p>
* 站点事项 service接口 * 站点事项 service接口
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-01-12
*/ */
public interface SiteMatterService extends ICRUDService<SiteMatterEntity,Long>{ public interface SiteMatterService extends ICRUDService<SiteMatterEntity, Long> {
void deleteBysiteIdAndSource(Long siteId,Integer source, Context context);
SiteMatterDao getDao();
void deleteBysiteIdAndSource(Long siteId, Integer source, Context context);
} }
\ No newline at end of file
package com.mortals.xhx.module.site.service.impl; package com.mortals.xhx.module.site.service.impl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
...@@ -17,12 +18,12 @@ import java.util.List; ...@@ -17,12 +18,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* SiteMatterService * SiteMatterService
* 站点事项 service实现 * 站点事项 service实现
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-01-12
*/ */
@Service("siteMatterService") @Service("siteMatterService")
public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao, SiteMatterEntity, Long> implements SiteMatterService { public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao, SiteMatterEntity, Long> implements SiteMatterService {
...@@ -31,10 +32,10 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -31,10 +32,10 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override @Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException { protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
list.forEach(item->{ list.forEach(item -> {
if(!ObjectUtils.isEmpty(item.getMatterId())){ if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterService.get(item.getMatterId()); MatterEntity matterEntity = matterService.get(item.getMatterId());
if(!ObjectUtils.isEmpty(matterEntity)){ if (!ObjectUtils.isEmpty(matterEntity)) {
item.setBelongDept(matterEntity.getBelongDept()); item.setBelongDept(matterEntity.getBelongDept());
item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum()); item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum());
item.setOnlineToTheSceneNum(matterEntity.getOnlineToTheSceneNum()); item.setOnlineToTheSceneNum(matterEntity.getOnlineToTheSceneNum());
...@@ -45,6 +46,26 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -45,6 +46,26 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void updateBefore(SiteMatterEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
SiteMatterEntity beforeSiteMatterEntity = this.get(entity.getId(), context);
if (!ObjectUtils.isEmpty(beforeSiteMatterEntity.getDeptId())&&!beforeSiteMatterEntity.getDeptId().equals(entity.getDeptId())) {
//更新事项中的部门编号
MatterEntity matterEntity = matterService.get(entity.getMatterId(), context);
if (!ObjectUtils.isEmpty(matterEntity)) {
matterEntity.setDeptCode(entity.getDeptCode());
matterEntity.setDeptName(entity.getDeptName());
matterService.update(matterEntity, context);
}
}
}
@Override @Override
public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) { public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) {
Map<String, Object> condition = new HashMap<>(); Map<String, Object> condition = new HashMap<>();
......
...@@ -368,8 +368,16 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -368,8 +368,16 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
private List<SiteTreeSelect> getSiteTreeSelects(String userId) { private List<SiteTreeSelect> getSiteTreeSelects(String userId) {
String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class); String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class);
log.info("userId:{},siteTreeSelectStr:{}",userId,siteTreeSelectStr);
//反序列化树对象 //反序列化树对象
if(ObjectUtils.isEmpty(siteTreeSelectStr)){
return new ArrayList<>();
}
JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr); JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr);
if(ObjectUtils.isEmpty(jsonArray)){
return new ArrayList<>();
}
List<SiteTreeSelect> collect = jsonArray.stream().map(item -> { List<SiteTreeSelect> collect = jsonArray.stream().map(item -> {
SiteTreeSelect siteTreeSelect = JSON.parseObject(item.toString(), SiteTreeSelect.class); SiteTreeSelect siteTreeSelect = JSON.parseObject(item.toString(), SiteTreeSelect.class);
return siteTreeSelect; return siteTreeSelect;
......
...@@ -22,6 +22,17 @@ import java.util.stream.Collectors; ...@@ -22,6 +22,17 @@ import java.util.stream.Collectors;
@Service("smsSetService") @Service("smsSetService")
public class SmsSetServiceImpl extends AbstractCRUDCacheServiceImpl<SmsSetDao, SmsSetEntity, Long> implements SmsSetService { public class SmsSetServiceImpl extends AbstractCRUDCacheServiceImpl<SmsSetDao, SmsSetEntity, Long> implements SmsSetService {
/**
* @param key
* @param data
*/
@Override
public void putCache(String key, SmsSetEntity data) {
key=data.getSiteId().toString();
super.putCache(key, data);
}
@Override @Override
public List<SmsSetEntity> find(SmsSetEntity entity) throws AppException { public List<SmsSetEntity> find(SmsSetEntity entity) throws AppException {
List<SmsSetEntity> cacheList = this.getCacheList(); List<SmsSetEntity> cacheList = this.getCacheList();
......
package com.mortals.xhx.module.window.service; package com.mortals.xhx.module.window.service;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.window.dao.WindowMatterDao;
import com.mortals.xhx.module.window.model.WindowMatterEntity; import com.mortals.xhx.module.window.model.WindowMatterEntity;
/** /**
* WindowMatterService * WindowMatterService
* * <p>
* 窗口事项 service接口 * 窗口事项 service接口
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-01-12
*/ */
public interface WindowMatterService extends ICRUDService<WindowMatterEntity,Long>{ public interface WindowMatterService extends ICRUDService<WindowMatterEntity, Long> {
WindowMatterDao getDao();
} }
\ No newline at end of file
package com.mortals.xhx.module.window.service; package com.mortals.xhx.module.window.service;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.window.dao.WindowDao;
import com.mortals.xhx.module.window.model.WindowEntity; import com.mortals.xhx.module.window.model.WindowEntity;
/** /**
* WindowService * WindowService
* * <p>
* 站点部门窗口 service接口 * 站点部门窗口 service接口
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-01-12
*/ */
public interface WindowService extends ICRUDCacheService<WindowEntity,Long> { public interface WindowService extends ICRUDCacheService<WindowEntity, Long> {
WindowDao getDao();
/** /**
* 添加业务到窗口 * 添加业务到窗口
*
* @param businessIds * @param businessIds
* @param windowId * @param windowId
* @param context * @param context
...@@ -23,5 +29,4 @@ public interface WindowService extends ICRUDCacheService<WindowEntity,Long> { ...@@ -23,5 +29,4 @@ public interface WindowService extends ICRUDCacheService<WindowEntity,Long> {
void addBusinessToWindow(String businessIds, Long windowId, Context context); void addBusinessToWindow(String businessIds, Long windowId, Context context);
} }
\ No newline at end of file
...@@ -6,13 +6,19 @@ import com.mortals.framework.ap.GlobalSysInfo; ...@@ -6,13 +6,19 @@ import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.util.HttpUtil; import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.window.model.WindowMatterQuery; import com.mortals.xhx.module.window.model.WindowMatterQuery;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.window.dao.WindowMatterDao; import com.mortals.xhx.module.window.dao.WindowMatterDao;
import com.mortals.xhx.module.window.model.WindowMatterEntity; import com.mortals.xhx.module.window.model.WindowMatterEntity;
import com.mortals.xhx.module.window.service.WindowMatterService; import com.mortals.xhx.module.window.service.WindowMatterService;
import org.springframework.util.ObjectUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
...@@ -31,6 +37,29 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL; ...@@ -31,6 +37,29 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL;
@Service("windowMatterService") @Service("windowMatterService")
@Slf4j @Slf4j
public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatterDao, WindowMatterEntity, Long> implements WindowMatterService { public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatterDao, WindowMatterEntity, Long> implements WindowMatterService {
@Autowired
private MatterService matterService;
@Autowired
private DeptService deptService;
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void saveBefore(WindowMatterEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
if (!ObjectUtils.isEmpty(entity.getDeptId())) {
DeptEntity cache = deptService.getCache(entity.getDeptId().toString());
if (ObjectUtils.isEmpty(entity.getDeptCode())) {
entity.setDeptCode(cache == null ? "" : cache.getDeptNumber());
}
}
}
/** /**
* @param entity * @param entity
* @param context * @param context
...@@ -49,9 +78,9 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte ...@@ -49,9 +78,9 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
*/ */
@Override @Override
protected void removeBefore(Long id, Context context) throws AppException { protected void removeBefore(Long id, Context context) throws AppException {
super.removeBefore(id, context);
WindowMatterEntity windowMatterEntity = this.get(id, context); WindowMatterEntity windowMatterEntity = this.get(id, context);
pushChangeMsg(windowMatterEntity); pushChangeMsg(windowMatterEntity);
super.removeBefore(id, context);
} }
/** /**
...@@ -61,11 +90,11 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte ...@@ -61,11 +90,11 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
*/ */
@Override @Override
protected void removeBefore(Long[] ids, Context context) throws AppException { protected void removeBefore(Long[] ids, Context context) throws AppException {
super.removeBefore(ids, context);
Arrays.asList(ids).forEach(id -> { Arrays.asList(ids).forEach(id -> {
WindowMatterEntity windowMatterEntity = this.get(id, context); WindowMatterEntity windowMatterEntity = this.get(id, context);
pushChangeMsg(windowMatterEntity); pushChangeMsg(windowMatterEntity);
}); });
super.removeBefore(ids, context);
} }
/** /**
...@@ -90,6 +119,27 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte ...@@ -90,6 +119,27 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void updateBefore(WindowMatterEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
WindowMatterEntity beforeWindowMatterEntity = this.get(entity.getId(), context);
if (!ObjectUtils.isEmpty(beforeWindowMatterEntity.getDeptCode()) && !beforeWindowMatterEntity.getDeptCode().equals(entity.getDeptCode())) {
//更新
MatterEntity matterEntity = matterService.get(entity.getSiteMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) {
matterEntity.setDeptCode(entity.getDeptCode());
matterEntity.setDeptName(entity.getDeptName());
matterService.update(matterEntity, context);
}
}
}
/** /**
* @param entity * @param entity
* @param context * @param context
...@@ -97,8 +147,8 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte ...@@ -97,8 +147,8 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
*/ */
@Override @Override
protected void updateAfter(WindowMatterEntity entity, Context context) throws AppException { protected void updateAfter(WindowMatterEntity entity, Context context) throws AppException {
pushChangeMsg(entity);
super.updateAfter(entity, context); super.updateAfter(entity, context);
pushChangeMsg(entity);
} }
private void pushChangeMsg(WindowMatterEntity entity) { private void pushChangeMsg(WindowMatterEntity entity) {
......
...@@ -91,8 +91,11 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -91,8 +91,11 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
if (ObjectUtils.isEmpty(windowId)) { if (ObjectUtils.isEmpty(windowId)) {
throw new AppException("请选择对应窗口"); throw new AppException("请选择对应窗口");
} }
List<Long> businessIdList = Arrays.asList(businessIds.split(",")).stream().map(Long::parseLong).collect(Collectors.toList()); List<Long> businessIdList =new ArrayList<>();
WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery(); if(!ObjectUtils.isEmpty(businessIds)){
businessIdList = Arrays.asList(businessIds.split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
}
WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery();
//windowBusinessQuery.setSiteBusinessIdList(businessIdList); //windowBusinessQuery.setSiteBusinessIdList(businessIdList);
//先删除后再新增 //先删除后再新增
...@@ -104,7 +107,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -104,7 +107,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
} }
WindowEntity windowEntity = this.get(windowId, context); WindowEntity windowEntity = this.get(windowId, context);
List<WindowBusinessEntity> windowBusinessEntities = businessIdList.stream().map(id -> { List<WindowBusinessEntity> windowBusinessEntities = businessIdList.stream().map(id -> {
WindowBusinessEntity windowBusinessEntity = new WindowBusinessEntity(); WindowBusinessEntity windowBusinessEntity = new WindowBusinessEntity();
windowBusinessEntity.initAttrValue(); windowBusinessEntity.initAttrValue();
...@@ -122,7 +124,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -122,7 +124,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
return null; return null;
} }
return windowBusinessEntity; return windowBusinessEntity;
}).collect(Collectors.toList()); }).filter(f->f!=null).collect(Collectors.toList());
windowBusinessService.save(windowBusinessEntities, context); windowBusinessService.save(windowBusinessEntities, context);
} }
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
<appender-ref ref="fileError"/> <appender-ref ref="fileError"/>
</logger> </logger>
<!-- <logger name="com.mortals.xhx.module"> <logger name="com.mortals.xhx.module">
<level value="debug"/> <level value="debug"/>
</logger>--> </logger>
</configuration> </configuration>
\ No newline at end of file
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<if test="condition.matterName != null and condition.matterName != ''"> <if test="condition.matterName != null and condition.matterName != ''">
and a.matterName like #{condition.matterName} and a.matterName like #{condition.matterName}
</if> </if>
<if test="condition.source!=null and condition.source!=''"> <if test="condition.source!=null">
and a.source = #{condition.source,jdbcType=VARCHAR} and a.source = #{condition.source,jdbcType=INTEGER}
</if> </if>
</trim> </trim>
</trim> </trim>
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
<if test="condition.matterName != null and condition.matterName != ''"> <if test="condition.matterName != null and condition.matterName != ''">
and a.matterName like #{condition.matterName} and a.matterName like #{condition.matterName}
</if> </if>
<if test="condition.source!=null and condition.source!=''"> <if test="condition.source!=null">
and a.source = #{condition.source,jdbcType=VARCHAR} and a.source = #{condition.source,jdbcType=INTEGER}
</if> </if>
</trim> </trim>
</trim> </trim>
......
...@@ -62,9 +62,10 @@ POST {{baseUrl}}/dept/getDeptListByBusiness ...@@ -62,9 +62,10 @@ POST {{baseUrl}}/dept/getDeptListByBusiness
Content-Type: application/json Content-Type: application/json
{ {
"siteBusinessIdList":[9] "siteBusinessIdList":[12]
} }
...@@ -43,8 +43,8 @@ Content-Type: application/json ...@@ -43,8 +43,8 @@ Content-Type: application/json
{ {
"siteId": 54, "siteId": 1,
"matterName": "", "source": 0,
"page": 1, "page": 1,
"size": 10 "size": 10
} }
......
...@@ -4,7 +4,7 @@ POST {{baseUrl}}/site/business/list ...@@ -4,7 +4,7 @@ POST {{baseUrl}}/site/business/list
Content-Type: application/json Content-Type: application/json
{ {
"idNotList": [11,12,17,18,19,20,21], "idNotList": [11,12,17,18,19,20],
"siteId": 1, "siteId": 1,
"page":1, "page":1,
"size":5 "size":5
......
...@@ -71,6 +71,14 @@ Content-Type: application/json ...@@ -71,6 +71,14 @@ Content-Type: application/json
} }
###testre
POST {{baseUrl}}/test/reDepts
Content-Type: application/json
{}
###短信设置编辑 ###短信设置编辑
GET {{baseUrl}}/sms/set/edit?id={{SmsSet_id}} GET {{baseUrl}}/sms/set/edit?id={{SmsSet_id}}
Accept: application/json Accept: application/json
......
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.9.1. 查询API服务列表 // 1.9.1. 查询API服务列表
export function serviceApiList(params) { export function serviceApiList(params) {
return http.post("/zwfw/system/service/api/list", params); return http.post(`${baseURL}/zwfw/system/service/api/list`, params);
} }
// 1.9.2. 查看API服务 // 1.9.2. 查看API服务
export function serviceApiInfo(params) { export function serviceApiInfo(params) {
return http.get("/zwfw/system/service/api/info", params); return http.get(`${baseURL}/zwfw/system/service/api/info`, params);
} }
// 1.9.3. 保存更新API服务 // 1.9.3. 保存更新API服务
export function serviceApiSave(params) { export function serviceApiSave(params) {
return http.post("/zwfw/system/service/api/save", params); return http.post(`${baseURL}/zwfw/system/service/api/save`, params);
} }
// 1.9.4. 删除API服务 // 1.9.4. 删除API服务
export function serviceApiDelete(params) { export function serviceApiDelete(params) {
return http.get("/zwfw/system/service/api/delete", params); return http.get(`${baseURL}/zwfw/system/service/api/delete`, params);
} }
// const BASE_URL = process.env.VUE_APP_API_BASE_URL // const BASE_URL = process.env.VUE_APP_API_BASE_URL
let baseURL = process.env.VUE_APP_API_BASE_URL
module.exports = { module.exports = {
fileCommonupload: `/zwfw/file/commonupload`, //1.2.4. 上传附件 fileCommonupload: `${baseURL}/zwfw/file/commonupload`, //1.2.4. 上传附件
}; };
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.10.1. 查询应用服务列表 // 1.10.1. 查询应用服务列表
export function serviceList(params) { export function serviceList(params) {
return http.post("/zwfw/system/service/list", params); return http.post(`${baseURL}/zwfw/system/service/list`, params);
} }
// 1.10.2. 查看应用服务 // 1.10.2. 查看应用服务
export function serviceInfo(params) { export function serviceInfo(params) {
return http.get("/zwfw/system/service/info", params); return http.get(`${baseURL}/zwfw/system/service/info`, params);
} }
// 1.10.3. 保存更新应用服务 // 1.10.3. 保存更新应用服务
export function serviceSave(params) { export function serviceSave(params) {
return http.post("/zwfw/system/service/save", params); return http.post(`${baseURL}/zwfw/system/service/save`, params);
} }
// 1.10.4. 删除应用服务 // 1.10.4. 删除应用服务
export function serviceDelete(params) { export function serviceDelete(params) {
return http.get("/zwfw/system/service/delete", params); return http.get(`${baseURL}/zwfw/system/service/delete`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.14.1. 查询区域列表 // 1.14.1. 查询区域列表
export function areaList(params) { export function areaList(params) {
return http.post("/zwfw/area/list", params); return http.post(`${baseURL}/zwfw/area/list`, params);
} }
// 1.14.2. 查看区域 // 1.14.2. 查看区域
export function areaInfo(params) { export function areaInfo(params) {
return http.get("/zwfw/area/info", params); return http.get(`${baseURL}/zwfw/area/info`, params);
} }
// 1.14.3. 查看区域子信息 // 1.14.3. 查看区域子信息
export function getListByParentId(params) { export function getListByParentId(params) {
return http.get("/zwfw/area/getListByParentId", params); return http.get(`${baseURL}/zwfw/area/getListByParentId`, params);
} }
// 1.14.4. 获取所有区域信息 // 1.14.4. 获取所有区域信息
export function areaTreeselect(params) { export function areaTreeselect(params) {
return http.post("/zwfw/area/treeselect", params); return http.post(`${baseURL}/zwfw/area/treeselect`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.4.1. 查询角色信息列表 // 1.4.1. 查询角色信息列表
export function roleList(params) { export function roleList(params) {
return http.post("/zwfw/role/list", params); return http.post(`${baseURL}/zwfw/role/list`, params);
} }
// 1.4.2. 查看角色信息 // 1.4.2. 查看角色信息
export function roleInfo(params) { export function roleInfo(params) {
return http.get("/zwfw/role/info", params); return http.get(`${baseURL}/zwfw/role/info`, params);
} }
// 1.4.3. 保存更新角色信息 // 1.4.3. 保存更新角色信息
export function roleSave(params) { export function roleSave(params) {
return http.post("/zwfw/role/save", params); return http.post(`${baseURL}/zwfw/role/save`, params);
} }
// 1.4.4. 删除角色信息 // 1.4.4. 删除角色信息
export function roleDelete(params) { export function roleDelete(params) {
return http.get("/zwfw/role/delete", params); return http.get(`${baseURL}/zwfw/role/delete`, params);
} }
// 1.6.1. 分配菜单到角色 // 1.6.1. 分配菜单到角色
export function assignMenuToRole(params) { export function assignMenuToRole(params) {
return http.post("/zwfw/role/auth/assignMenuToRole", params); return http.post(`${baseURL}/zwfw/role/auth/assignMenuToRole`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
let BASEURL = process.env.VUE_APP_API_PHP_URL
// 1.15.1. 获取站点下的数据管理列表 // 1.15.1. 获取站点下的数据管理列表
export function censusListInterface(params) { export function censusListInterface(params) {
return http.post("/zwfw/site/model/census/list", params); return http.post(`${baseURL}/zwfw/site/model/census/list`, params);
} }
//排号机列表数据
export function getTaskList(params){
return http.get(`${BASEURL}/admin/take/takelist`,params)
}
//排队办理记录报表接口 //排队办理记录报表接口
export function getQueueData(params){ export function getQueueData(params){
return http.post("/inter/reportform/quelist",params) return http.post(`${BASEURL}/inter/reportform/quelist`,params)
}
//排号记录详情
export function getQueueInfo(params){
return http.post(`${BASEURL}/inter/reportform/queinfo`,params)
}
//业务事项关联
export function getBusinessEvent(params){
return http.post(`${baseURL}/basics_api/base/business/matter/list`,params)
}
//查询业务人员信息
export function getWorkerInfo(params){
return http.get(`${baseURL}/basics_api/base/workman/info`,params)
} }
\ No newline at end of file
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 查看操作日志列表 // 查看操作日志列表
export function getOperLogList(params) { export function getOperLogList(params) {
return http.post("/zwfw/oper/log/list", params); return http.post(`${baseURL}/zwfw/oper/log/list`, params);
} }
// 查看操作日志 // 查看操作日志
export function getOperLogInfo(params) { export function getOperLogInfo(params) {
return http.get("/zwfw/oper/log/info", params); return http.get(`${baseURL}/zwfw/oper/log/info`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.7.1. 查询菜单信息业务列表 // 1.7.1. 查询菜单信息业务列表
export function menuList(params) { export function menuList(params) {
return http.post("/zwfw/menu/list", params); return http.post(`${baseURL}/zwfw/menu/list`, params);
} }
// 1.7.2. 查看菜单信息业务 // 1.7.2. 查看菜单信息业务
export function menuInfo(params) { export function menuInfo(params) {
return http.get("/zwfw/menu/info", params); return http.get(`${baseURL}/zwfw/menu/info`, params);
} }
// 1.7.3. 保存更新菜单信息业务 // 1.7.3. 保存更新菜单信息业务
export function menuSave(params) { export function menuSave(params) {
return http.post("/zwfw/menu/save", params); return http.post(`${baseURL}/zwfw/menu/save`, params);
} }
// 1.7.4. 删除菜单信息业务 // 1.7.4. 删除菜单信息业务
export function menuDelete(params) { export function menuDelete(params) {
return http.get("/zwfw/menu/delete", params); return http.get(`${baseURL}/zwfw/menu/delete`, params);
} }
// 1.7.5. 查询所有可用菜单 // 1.7.5. 查询所有可用菜单
export function menuFindAll(params) { export function menuFindAll(params) {
return http.post("/zwfw/menu/findAll", params); return http.post(`${baseURL}/zwfw/menu/findAll`, params);
} }
// 1.3.8 查询菜单权限列表 // 1.3.8 查询菜单权限列表
export function menuFindAllTree(params) { export function menuFindAllTree(params) {
return http.post("/zwfw/menu/list/tree", params); return http.post(`${baseURL}/zwfw/menu/list/tree`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.16.1. 查询站点编排列表 // 1.16.1. 查询站点编排列表
export function appsListInterface(params) { export function appsListInterface(params) {
return http.post("/zwfw/site/model/list", params); return http.post(`${baseURL}/zwfw/site/model/list`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.2.1. 登录 // 1.2.1. 登录
export function LoginInterface(params) { export function LoginInterface(params) {
return http.post("/zwfw/login/login", params); return http.post(`${baseURL}/zwfw/login/login`, params);
} }
// 1.2.2. 首页 // 1.2.2. 首页
export function loginIndex(params) { export function loginIndex(params) {
return http.post("/zwfw/login/index", params); return http.post(`${baseURL}/zwfw/login/index`, params);
} }
// 1.2.3. 登出 // 1.2.3. 登出
export function LogoutInterface(params) { export function LogoutInterface(params) {
return http.post("/zwfw/login/logout", params); return http.post(`${baseURL}/zwfw/login/logout`, params);
} }
// 1.2.4. 用户修改密码 // 1.2.4. 用户修改密码
export function changePassword(params) { export function changePassword(params) {
return http.post("/zwfw/user/change/password", params); return http.post(`${baseURL}/zwfw/user/change/password`, params);
} }
// 管理员修改密码 // 管理员修改密码
export function editPassword(params) { export function editPassword(params) {
return http.post("/zwfw/user/reset/password", params); return http.post(`${baseURL}/zwfw/user/reset/password`, params);
} }
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.3.1. 查询用户信息业务列表 // 1.3.1. 查询用户信息业务列表
export function userList(params) { export function userList(params) {
return http.post("/zwfw/user/list", params); return http.post(`${baseURL}/zwfw/user/list`, params);
} }
// 1.3.2. 查看用户信息业务 // 1.3.2. 查看用户信息业务
export function userInfo(params) { export function userInfo(params) {
return http.get("/zwfw/user/info", params); return http.get(`${baseURL}/zwfw/user/info`, params);
} }
// 1.3.3. 保存更新用户信息业务 // 1.3.3. 保存更新用户信息业务
export function userSave(params) { export function userSave(params) {
return http.post("/zwfw/user/save", params); return http.post(`${baseURL}/zwfw/user/save`, params);
} }
// 1.3.4. 删除用户信息业务 // 1.3.4. 删除用户信息业务
export function userDelete(params) { export function userDelete(params) {
return http.get("/zwfw/user/delete", params); return http.get(`${baseURL}/zwfw/user/delete`, params);
} }
// 1.3.5. 用户站点授权 // 1.3.5. 用户站点授权
export function userSiteAuth(params) { export function userSiteAuth(params) {
return http.post("/zwfw/user/siteAuth", params); return http.post(`${baseURL}/zwfw/user/siteAuth`, params);
} }
...@@ -28,6 +28,9 @@ import * as filters from "@/filters"; ...@@ -28,6 +28,9 @@ import * as filters from "@/filters";
Object.keys(filters).forEach((key) => { Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[key]); Vue.filter(key, filters[key]);
}); });
//引入字典
import codeMap from "@/utils/codeMap"
Vue.prototype.$codeMap = codeMap
Vue.prototype.$bus = new Vue(); Vue.prototype.$bus = new Vue();
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
tablePagination: { tablePagination: {
current: 1, current: 1,
pageSize: 10, pageSize: 10,
total: 20, total: 0,
showQuickJumper: true, //是否可以快速跳转至某页 showQuickJumper: true, //是否可以快速跳转至某页
showSizeChanger: true, //是否可以改变 pageSize showSizeChanger: true, //是否可以改变 pageSize
showTotal: (total, range) => `共${total}条`, showTotal: (total, range) => `共${total}条`,
...@@ -108,10 +108,8 @@ export default { ...@@ -108,10 +108,8 @@ export default {
// console.log(this.tableSelectedKeys, this.tableSelectedRows); // console.log(this.tableSelectedKeys, this.tableSelectedRows);
}, },
pagTableChange(pag, filters) { pagTableChange(pagination) {
// console.log(pag); this.tablePagination = pagination
this.tablePagination = pag;
this.$nextTick(() => { });
}, },
......
...@@ -4,7 +4,7 @@ import axios from "axios"; ...@@ -4,7 +4,7 @@ import axios from "axios";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import Storage from "@/utils/js/Storage"; import Storage from "@/utils/js/Storage";
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_API_BASE_URL, // baseURL: process.env.VUE_APP_API_BASE_URL,
// timeout: 10000 // timeout: 10000
}); });
service.interceptors.request.use( service.interceptors.request.use(
...@@ -18,9 +18,12 @@ service.interceptors.request.use( ...@@ -18,9 +18,12 @@ service.interceptors.request.use(
"Content-Type": "application/json;charset=utf-8", "Content-Type": "application/json;charset=utf-8",
}; };
const Authorization = JSON.parse(localStorage.getItem("Authorization")); const Authorization = JSON.parse(localStorage.getItem("Authorization"));
const siteid = JSON.parse(localStorage.getItem("siteId"))
if (Authorization) { if (Authorization) {
config.headers.Authorization = Authorization; config.headers.Authorization = Authorization;
config.headers.Authtoken = Authorization; config.headers.Authtoken = Authorization;
config.headers.siteid = siteid
} }
return config; return config;
}, },
......
export default{
//排队叫号字典
"queueState":{"0":"排队中","1":"办理中","4":"接待结束"},
"takeNumWay":{"0":"现场取号","1":"在线取号"},
"politicalStatus":{"0":"中共党员","1":"中共预备党员","2":"共青团员","3":"普通居民","4":"其它"}
}
\ No newline at end of file
<template> <template>
<div class="handling" ref="handling"> <div class="handling" ref="handling">
<a-drawer <a-drawer :destroyOnClose="true" :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible"
:destroyOnClose="true" @close="modalClose" @getContainer="() => $refs.handling">
:title="modalInfo.title"
:width="modalInfo.width"
:visible="modalInfo.visible"
@close="modalClose"
@getContainer="() => $refs.handling"
>
<div class="headerInfo"> <div class="headerInfo">
<!-- 头部耗时部分 -->
<p> <p>
<span v-for="item of 3" <span>总耗时:{{ dataList.alltime || "--" }}
>总耗时:13分15秒<i class="fa fa-long-arrow-down"></i <i v-show="dataList.alltime && compareTime(dataList.p_alltime,dataList.alltime)" class="fa fa-long-arrow-down"></i>
></span> </span>
<span>等待时间:{{ dataList.waittime || "--" }}
<i v-show="dataList.waittime && compareTime(dataList.p_waittime,dataList.waittime)" class="fa fa-long-arrow-down"></i>
</span>
<span>办理时间:{{ dataList.bltime || "--" }}
<i v-show="dataList.bltime && compareTime(dataList.p_bltime , dataList.bltime)" class="fa fa-long-arrow-down"></i>
</span>
</p>
<p>
<span>平均耗时:{{ dataList.p_alltime }}</span>
<span>平均等待时间:{{ dataList.p_waittime }}</span>
<span>平均办理时间:{{ dataList.p_bltime }}</span>
</p> </p>
<p><span v-for="item of 3">平均耗时:14分0秒</span></p>
</div> </div>
<div class="state">接件结束</div> <div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div>
<a-steps <a-steps direction="vertical" size="small" :current="approveLs.length" class="steps_box">
direction="vertical" <a-step :disabled="true" class="step_box">
size="small"
:current="approveLs.length"
class="steps_box"
>
<a-step
v-for="(item, index) of approveLs"
:key="item.id"
:disabled="true"
@click.stop="drawerchange(item.id)"
class="step_box"
>
<div class="icon_box" slot="icon"></div> <div class="icon_box" slot="icon"></div>
<div class="title_box" slot="title"> <div class="title_box" slot="title">
<span class="title_name">{{ <span class="title_name">排队中</span>
item.status == 1
? "办理中"
: item.status == 2
? "接件结束"
: "排队中"
}}</span>
</div> </div>
<div <div class="description_box" slot="description">
class="description_box"
slot="description"
v-if="item.status == 0"
>
<div class="details"> <div class="details">
<span v-for="item of 8"><i class="lable">申报人:</i>张三</span> <span><i class="lable">申报人:</i>{{ dataList.people_name || "--" }}</span>
<span><i class="lable">取号时间:</i>{{ dataList.taketime || "--" }}</span>
<span><i class="lable">排队编码:</i>{{ dataList.flownum || "--" }}</span>
<span><i class="lable">取号方式:</i>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span>
<span><i class="lable">注册方式:</i>{{ "--" }}</span>
<span><i class="lable">取号设备:</i>{{ dataList.take_name || "--" }}</span>
</div> </div>
</div> </div>
<div </a-step>
class="description_box" <a-step :disabled="true" class="step_box" v-if="dataList.style > 0">
slot="description" <div class="icon_box" slot="icon"></div>
v-else-if="item.status == 1" <div class="title_box" slot="title">
> <span class="title_name">办理中</span>
</div>
<div class="description_box" slot="description">
<div class="details"> <div class="details">
<span v-for="item of 6"><i class="lable">办理窗口:</i>s003</span> <span><i class="lable">办理窗口:</i>{{ dataList.window_name || "--" }}</span>
<span><i class="lable">办理开始时间:</i>{{ dataList.calltime || "--" }}</span>
<span><i class="lable">工作人员:</i>{{ dataList.workman_name || "--" }}</span>
<span><i class="lable">叫号设备:</i>{{ dataList.window_fromnum || "--" }}</span>
</div> </div>
</div> </div>
<div </a-step>
class="description_box" <a-step :disabled="true" class="step_box" v-if="dataList.style > 1">
slot="description" <div class="icon_box" slot="icon"></div>
v-else-if="item.status == 2" <div class="title_box" slot="title">
> <span class="title_name">接件结束</span>
</div>
<div class="description_box" slot="description">
<div class="details"> <div class="details">
<span v-for="item of 2" <span><i class="lable">办理结束时间:</i>{{ dataList.endtime || "--" }}</span>
><i class="lable">办理结束时间:</i>2021-01-15 12:00:00</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
</a-steps> </a-steps>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
<script> <script>
import modal from "../mixins/modal";
export default { export default {
mixins: [modal],
name: "PortalAdminVueHandlingDetails", name: "PortalAdminVueHandlingDetails",
data() { data() {
return { return {
defaultInfoForm: {},
modalInfo: {
confirmLoading: false,
visible: false,
title: '用户信息',
width: '38%',
},
dataList: [],
approveLs: [ approveLs: [
{ {
id: "001", id: "001",
...@@ -99,33 +101,52 @@ export default { ...@@ -99,33 +101,52 @@ export default {
], ],
}; };
}, },
filters: { computed: {
returnScolor(key) { returnScolor() {
switch (key) { switch (this.dataList.style) {
case 0: case 0:
return "state_colo1"; return "state1";
break; break;
case 1: case 1:
return "state_colo2"; return "state2";
break;
case 2:
return "state_colo3";
break;
case 3:
return "state_colo2";
break;
case 4:
return "state_colo3";
break; break;
default: default:
return "state_colo0"; return "state0";
break; break;
} }
}, },
}, },
mounted() {}, mounted() {
},
methods: {}, methods: {
modalClose() {
this.modalInfo.visible = false;
},
// 比较时间大小
compareTime(time1, time2) {
if (this.timeToSec(time1) - this.timeToSec(time2) > 0) {
return true;
}
return false;
},
// 转换时间为秒
timeToSec(time) {
if (time !== null && time !== undefined) {
var s = "";
if (time.includes("分钟") && time.includes("")) {
var min = time.split("分钟")[0];
var sec = time.split("分钟")[1].split("")[0];
s = Number(min * 60) + Number(sec);
return s;
}else{
sec = time.split("")[0]
return sec;
}
}
},
},
}; };
</script> </script>
...@@ -133,9 +154,11 @@ export default { ...@@ -133,9 +154,11 @@ export default {
/deep/.ant-steps-icon { /deep/.ant-steps-icon {
top: -4px !important; top: -4px !important;
} }
/deep/.ant-drawer-content { /deep/.ant-drawer-content {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
/deep/.icon_box { /deep/.icon_box {
margin-top: -20px !important; margin-top: -20px !important;
display: inline-block; display: inline-block;
...@@ -154,11 +177,13 @@ export default { ...@@ -154,11 +177,13 @@ export default {
color: #1d95fd !important; color: #1d95fd !important;
} }
} }
.headerInfo { .headerInfo {
border-left: 3px solid #0595fd; border-left: 3px solid #0595fd;
background: #e6f5ff; background: #e6f5ff;
padding: 5px 15px; padding: 5px 15px;
margin-bottom: 20px; margin-bottom: 20px;
p { p {
&:first-child { &:first-child {
color: #0037b0; color: #0037b0;
...@@ -167,15 +192,18 @@ export default { ...@@ -167,15 +192,18 @@ export default {
justify-content: space-between; justify-content: space-between;
padding: 2px 0; padding: 2px 0;
font-size: 16px; font-size: 16px;
span { span {
display: inline-block; display: inline-block;
width: 32%; width: 32%;
i { i {
color: #63d7a5 !important; color: #63d7a5 !important;
margin-left: 5px; margin-left: 5px;
} }
} }
} }
&:last-child { &:last-child {
color: #0595fd; color: #0595fd;
padding: 2px 0; padding: 2px 0;
...@@ -183,6 +211,7 @@ export default { ...@@ -183,6 +211,7 @@ export default {
font-size: 14px; font-size: 14px;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
span { span {
display: inline-block; display: inline-block;
width: 32%; width: 32%;
...@@ -195,10 +224,12 @@ export default { ...@@ -195,10 +224,12 @@ export default {
.details { .details {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
span { span {
display: inline-block; display: inline-block;
width: 49%; width: 49%;
padding: 4px 0; padding: 4px 0;
.lable { .lable {
display: inline-block; display: inline-block;
font-style: normal; font-style: normal;
...@@ -209,7 +240,7 @@ export default { ...@@ -209,7 +240,7 @@ export default {
} }
} }
.state { .state0 {
position: absolute; position: absolute;
right: 10px; right: 10px;
top: 150px; top: 150px;
...@@ -222,11 +253,45 @@ export default { ...@@ -222,11 +253,45 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #BDBAB4;
}
.state1 {
position: absolute;
right: 10px;
top: 150px;
width: 85px;
height: 85px;
border: 5px solid #FCE2D9;
border-radius: 50%;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
display: flex;
justify-content: center;
align-items: center;
color: #f7072f;
}
.state2 {
position: absolute;
right: 10px;
top: 150px;
width: 85px;
height: 85px;
border: 5px solid #D9F1E4;
border-radius: 50%;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
display: flex;
justify-content: center;
align-items: center;
color: #05fd6c;
} }
.state_colo0 { .state_colo0 {
color: #bbb; color: #bbb;
} }
.state_colo1 { .state_colo1 {
color: #fac; color: #fac;
} }
...@@ -243,15 +308,18 @@ export default { ...@@ -243,15 +308,18 @@ export default {
left: 6px !important; left: 6px !important;
top: 24px !important; top: 24px !important;
border-left: 3px dashed #e6f5ff !important; border-left: 3px dashed #e6f5ff !important;
&::after { &::after {
background: none !important; background: none !important;
} }
} }
/deep/.ant-steps-item { /deep/.ant-steps-item {
& + .ant-steps-item { &+.ant-steps-item {
margin-top: 25px !important; margin-top: 25px !important;
} }
} }
.handling { .handling {
.steps_box { .steps_box {
height: 280px !important; height: 280px !important;
......
<template> <template>
<div class="businessModal" ref="businessModal"> <div class="businessModal" ref="businessModal">
<a-modal <a-modal :title="modalInfo.title" width="400px" :visible="modalInfo.visible"
:title="modalInfo.title" :confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true"
:width="modalInfo.width" :getContainer="() => $refs.businessModal">
:visible="modalInfo.visible"
:confirmLoading="modalInfo.confirmLoading"
@cancel="modalClose"
:centered="true"
:destroyOnClose="true"
:getContainer="() => $refs.businessModal"
>
<div class="content"> <div class="content">
<h1>{{ defaultInfoForm.yewuming }}</h1> <h1>{{ title }}</h1>
<em <em>关联事项({{ dataList.length }}</em>
>关联事项({{ <p>
defaultInfoForm.guanlianshixiang && <!-- {{ item.shixiangmingcheng }} -->
defaultInfoForm.guanlianshixiang.length
}}</em
>
<p
v-for="(item, index) of defaultInfoForm.guanlianshixiang"
:key="index"
>
{{ item.shixiangmingcheng }}
</p> </p>
<h4> <h4>
<span <span>受理次数<br /><i>12</i></span>
>受理次数<br /><i>{{ defaultInfoForm.shoulicishu }}</i></span <span>办结次数<br /><i>12</i></span>
> <span>好评率<br /><i>99%</i></span>
<span
>办结次数<br /><i>{{ defaultInfoForm.banjiecishu }}</i></span
>
<span
>好评率<br /><i>{{ defaultInfoForm.haopinglv }}</i></span
>
</h4> </h4>
</div> </div>
<template slot="footer"> <template slot="footer">
<a-button type="primary" ghost>查看业务分析</a-button> <a-button type="primary" ghost @click="lookDetails">查看业务分析</a-button>
</template> </template>
</a-modal> </a-modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -49,11 +28,18 @@ export default { ...@@ -49,11 +28,18 @@ export default {
mixins: [modal], mixins: [modal],
name: "PortalAdminVueBusinessInfo", name: "PortalAdminVueBusinessInfo",
data() { data() {
return {}; return {
title: '',
dataList: []
};
}, },
mounted() {}, mounted() { },
methods: {}, methods: {
lookDetails() {
this.$message.warning('暂未开放');
},
},
}; };
</script> </script>
...@@ -65,6 +51,7 @@ export default { ...@@ -65,6 +51,7 @@ export default {
color: #139bfd; color: #139bfd;
padding: 20px; padding: 20px;
} }
em { em {
padding: 20px; padding: 20px;
font-style: normal; font-style: normal;
...@@ -72,6 +59,7 @@ export default { ...@@ -72,6 +59,7 @@ export default {
color: #999; color: #999;
margin-bottom: 10px; margin-bottom: 10px;
} }
p { p {
padding: 3px 20px; padding: 3px 20px;
font-size: 16px; font-size: 16px;
...@@ -80,6 +68,7 @@ export default { ...@@ -80,6 +68,7 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
h4 { h4 {
margin-top: 10px; margin-top: 10px;
padding: 20px; padding: 20px;
...@@ -87,19 +76,23 @@ export default { ...@@ -87,19 +76,23 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #f3faff; background: #f3faff;
span { span {
text-align: center; text-align: center;
i { i {
color: #0b97fd; color: #0b97fd;
font-style: normal; font-style: normal;
} }
} }
span, span,
i { i {
padding: 3px 0; padding: 3px 0;
} }
} }
} }
.ant-modal-body { .ant-modal-body {
padding: 0 !important; padding: 0 !important;
min-height: 300px !important; min-height: 300px !important;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
:getContainer="() => $refs.userModal" :getContainer="() => $refs.userModal"
> >
<div class="content"> <div class="content">
<h1>{{ defaultInfoForm.name }}</h1> <h1>{{ useInfo.name }}</h1>
<p> <p>
<span>{{ defaultInfoForm.Gender }}</span> <span>{{ defaultInfoForm.Gender }}</span>
<span>{{ defaultInfoForm.Age }}</span> <span>{{ defaultInfoForm.Age }}</span>
...@@ -47,7 +47,9 @@ export default { ...@@ -47,7 +47,9 @@ export default {
mixins: [modal], mixins: [modal],
name: "PortalAdminVueUserInfo", name: "PortalAdminVueUserInfo",
data() { data() {
return {}; return {
useInfo:[]
};
}, },
components: { components: {
Blockchain, Blockchain,
......
<template> <template>
<div class="workPeopleModal" ref="workPeopleModal"> <div class="workPeopleModal" ref="workPeopleModal">
<a-modal <a-modal :title="modalInfo.title" width="500px" :visible="modalInfo.visible"
:title="modalInfo.title" :confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true"
:width="modalInfo.width" :getContainer="() => $refs.workPeopleModal">
:visible="modalInfo.visible"
:confirmLoading="modalInfo.confirmLoading"
@cancel="modalClose"
:centered="true"
:destroyOnClose="true"
:getContainer="() => $refs.workPeopleModal"
>
<div class="content"> <div class="content">
<div class="workInfo"> <div class="workInfo">
<div class="left"> <div class="left">
<img src="../../../../../assets/images/logo.png" alt="" /> <img :src="apis + infoData.photoPath" alt="" />
</div> </div>
<div class="right"> <div class="right">
<h1 class="title">刘明洋</h1> <h1 class="title">{{ infoData.name }}</h1>
<div class="details"> <div class="details">
<span v-for="item of 3"><i class="lable">工号:</i>01</span> <span><i class="lable">工号:</i>{{ infoData.number || "--" }}</span>
<span v-for="item of 3"><i class="lable">测试工号:</i>01</span> <span><i class="lable">所属部门:</i>{{ infoData.deptName || "--" }}</span>
<span><i class="lable">政治面貌:</i>{{ $codeMap.politicalStatus[infoData.politicalstatus] || "--" }}</span>
<span><i class="lable">电话:</i>{{ infoData.phone || "--" }}</span>
<span><i class="lable">星级:</i>{{ infoData.starlevel || "--" }}</span>
</div> </div>
</div> </div>
</div> </div>
<h2> <h2>
<span <span>受理业务<br /><i>{{ "--" }}</i></span>
>受理业务<br /><i>{{ defaultInfoForm.souliyewu }}</i></span <span>评价次数<br /><i>{{ "--" }}</i></span>
> <span>好评率<br /><i>{{ "--" }}</i></span>
<span
>评价次数<br /><i>{{ defaultInfoForm.pingjiacishu }}</i></span
>
<span
>好评率<br /><i>{{ defaultInfoForm.haopinglv }}</i></span
>
</h2> </h2>
</div> </div>
<template slot="footer"> <template slot="footer">
<a-button type="primary" ghost>查看TA的数据画像</a-button> <a-button type="primary" ghost @click="openBlockchain">查看TA的数据画像</a-button>
<a-button type="primary" ghost @click="openBlockchain" <a-button type="primary" ghost @click="openBlockchain">区块链信息</a-button>
>区块链信息</a-button
>
</template> </template>
</a-modal> </a-modal>
<Blockchain ref="Blockchain" /> <Blockchain ref="Blockchain" />
</div> </div>
</template> </template>
<script> <script>
...@@ -53,16 +41,20 @@ export default { ...@@ -53,16 +41,20 @@ export default {
mixins: [modal], mixins: [modal],
name: "PortalAdminVueUserInfo", name: "PortalAdminVueUserInfo",
data() { data() {
return {}; return {
infoData: [],
apis: process.env.VUE_APP_API_IMG_URL
};
}, },
components: { components: {
Blockchain, Blockchain,
}, },
mounted() {}, mounted() { },
methods: { methods: {
openBlockchain() { openBlockchain() {
this.$refs.Blockchain.modalInfo.visible = true; // this.$refs.Blockchain.modalInfo.visible = true;
this.$message.warning('暂未开通')
}, },
}, },
}; };
...@@ -72,30 +64,37 @@ export default { ...@@ -72,30 +64,37 @@ export default {
.workPeopleModal { .workPeopleModal {
.content { .content {
.workInfo { .workInfo {
padding: 20px; // padding: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left { .left {
width: 100px; width: 100px;
padding: 0 10px; padding: 0 10px;
img { img {
max-height: 120px; max-height: 120px;
width: 100%; width: 100%;
} }
} }
.right { .right {
flex: 1; flex: 1;
.title { .title {
color: #149bfd; color: #149bfd;
font-size: 17px; font-size: 17px;
} }
.details { .details {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
span { span {
display: inline-block; display: inline-block;
width: 49%; width: 49%;
padding: 10px 0; padding: 2px 0;
.lable { .lable {
display: inline-block; display: inline-block;
font-style: normal; font-style: normal;
...@@ -106,15 +105,20 @@ export default { ...@@ -106,15 +105,20 @@ export default {
} }
} }
} }
h2 { h2 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 10px;
padding: 20px; padding: 20px;
background: #f3faff; background: #f3faff;
border-radius: 4px;
span { span {
font-size: 15px; font-size: 15px;
text-align: center; text-align: center;
i { i {
color: #3bacfd; color: #3bacfd;
font-style: normal; font-style: normal;
...@@ -122,6 +126,7 @@ export default { ...@@ -122,6 +126,7 @@ export default {
} }
} }
} }
.ant-modal-body { .ant-modal-body {
padding: 0 !important; padding: 0 !important;
min-height: 300px !important; min-height: 300px !important;
......
...@@ -34,13 +34,13 @@ export default { ...@@ -34,13 +34,13 @@ export default {
yewuming: '公安户籍类', yewuming: '公安户籍类',
guanlianshixiang: [ guanlianshixiang: [
{ {
shixiangmingcheng: '事项名称事项名称事项名称事项名称事项名称事项名称', shixiangmingcheng: '事项名称事项名称事项名称事项名称',
}, },
{ {
shixiangmingcheng: '事项名称事项名称事项名称事项名称事项名称事项名称', shixiangmingcheng: '事项名称事项名称事项名称事项名称',
}, },
{ {
shixiangmingcheng: '事项名称事项名称事项名称事项名称事项名称事项名称', shixiangmingcheng: '事项名称事项名称事项名称事项名称',
}, },
], ],
shoulicishu: "12546", shoulicishu: "12546",
......
...@@ -5,50 +5,93 @@ ...@@ -5,50 +5,93 @@
<a-button type="success" @click="exportTable"> <a-button type="success" @click="exportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>叫号次数:<i>233次</i></b> <b>叫号次数:<i>{{ tablePagination.total }}</i></b>
<sub>统计时间段:2020.09.09~2021.09.09</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-select default-value="001"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value="001"> 设备001 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option value="002"> 设备002 </a-select-option> <a-select-option v-for="item in deviceData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select> </a-select>
<a-select default-value="001"> <a-select v-model="searchForm.style" style="width: 120px">
<a-select-option value="001"> 状态001 </a-select-option> <a-select-option value=""> 全部状态 </a-select-option>
<a-select-option value="002"> 状态002 </a-select-option> <a-select-option v-for="v in style" :key="v.key" :value="v.key">{{
v.name
}}</a-select-option>
</a-select> </a-select>
<a-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
v-model="BegindAndEndTime">
</a-range-picker> </a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索">
<a-input v-model="searchName" placeholder="请输入排队编号或申报人姓名搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary">搜索</a-button> <a-button type="primary" @click="getDataList">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading"
:columns="tableHeaders" :dataSource="tableSourceData"> :columns="tableHeaders" :dataSource="tableList">
<template slot="shenbaoren" slot-scope="text, record, index"> <!-- 序号 -->
<a-button type="link" @click="openDeclarant">{{ text }}</a-button> <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<!-- 申报人 -->
<template slot="people_name" slot-scope="text">
<a v-if="text.people_name" @click="openDeclarant(text)">{{
text.people_name
}}</a>
<span v-else>--</span>
</template>
<!-- 联系方式 -->
<template slot="people_phone" slot-scope="text">
{{ text.people_phone ? text.people_phone : "--" }}
</template>
<!-- 取号设备 -->
<template slot="device_name" slot-scope="text">
{{ text.device_name ? text.device_name : "--" }}
</template>
<!-- 办理业务 -->
<template slot="business" slot-scope="text">
<a v-if="text.business" @click="openBusiness(text.business, text.businessId)">{{ text.business }}</a>
<span v-else>--</span>
</template>
<!-- 办理开始时间 -->
<template slot="calltime" slot-scope="text">
{{ text.calltime ? text.calltime : "--" }}
</template>
<!-- 办理窗口 -->
<template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }}
</template> </template>
<template slot="banliyewu" slot-scope="text, record, index"> <!-- 工作人员 -->
<a-button type="link" @click="openBusiness">{{ text }}</a-button> <template slot="workman_name" slot-scope="text">
<a v-if="text.workman_name" @click="openWorkpeople(text.workmanid)">{{
text.workman_name
}}</a>
<span v-else>--</span>
</template> </template>
<template slot="gongzuorenyuan" slot-scope="text, record, index"> <!-- 办理结束时间 -->
<a-button type="link" @click="openWorkpeople">{{ text }}</a-button> <template slot="endtime" slot-scope="text">
{{ text.endtime ? text.endtime : "--" }}
</template> </template>
<template slot="zhuangtai" slot-scope="text, record, index"> <!-- 操作 -->
<a-button type="link" :class="[QueueState(index)]">{{ <template slot="action" slot-scope="text">
text <a @click="openHandlingDetails(text.id)">详细信息</a>
}}</a-button>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <!-- 状态 -->
<a-button type="link" @click="openHandlingDetails">详细信息{{ record.id }}</a-button> <template slot="style" slot-scope="text">
<span :class="{
'stand-line': text.style === 0,
'on-transact': text.style === 1,
'on-end': text.style === 4,
}">
{{ $codeMap.queueState[text.style] }}
</span>
</template> </template>
</a-table> </a-table>
<UserInfo ref="UserInfo" /> <UserInfo ref="UserInfo" />
...@@ -56,16 +99,17 @@ ...@@ -56,16 +99,17 @@
<WorkpeopleInfo ref="WorkpeopleInfo" /> <WorkpeopleInfo ref="WorkpeopleInfo" />
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import moment from "moment";
import UserInfo from "./components/userInfo.vue"; import UserInfo from "./components/userInfo.vue";
import BusinessInfo from "./components/businessInfo.vue"; import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { getQueueData } from "@/api/dataAdmin"; import { getTaskList, getQueueData, getQueueInfo, getBusinessEvent, getWorkerInfo } from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVueQueueRecord", name: "PortalAdminVueQueueRecord",
...@@ -74,95 +118,123 @@ export default { ...@@ -74,95 +118,123 @@ export default {
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index", width: "65px",
width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "num",
},
}, },
{ {
title: "排队编号", title: "排队编号",
align: "center", align: "center",
dataIndex: "paiduibianhao", dataIndex: "flownum",
}, },
{ {
title: "申报人", title: "申报人",
align: "center", align: "center",
dataIndex: "shenbaoren",
scopedSlots: { scopedSlots: {
customRender: "shenbaoren", customRender: "people_name",
}, },
}, },
{ {
title: "联系方式", title: "联系方式",
align: "center", align: "center",
dataIndex: "lianxifangshi", scopedSlots: {
customRender: "people_phone",
},
}, },
{ {
title: "取号时间", title: "取号时间",
width: "115px",
align: "center", align: "center",
dataIndex: "quhaoshijian", dataIndex: "taketime",
}, },
{ {
title: "取号设备", title: "取号设备",
align: "center", align: "center",
dataIndex: "quhaoshebei", scopedSlots: {
customRender: "device_name",
},
}, },
{ {
title: "办理业务", title: "办理业务",
align: "center", align: "center",
dataIndex: "banliyewu",
scopedSlots: { scopedSlots: {
customRender: "banliyewu", customRender: "business",
}, },
}, },
{ {
title: "办理开始时间", title: "办理开始时间",
width: "115px", width: "8%",
align: "center", align: "center",
dataIndex: "banlikaishishijian", scopedSlots: {
customRender: "calltime",
},
}, },
{ {
title: "办理窗口", title: "办理窗口",
align: "center", align: "center",
dataIndex: "banlichuangkou", scopedSlots: {
customRender: "window_name",
},
}, },
{ {
title: "工作人员", title: "工作人员",
align: "center", align: "center",
dataIndex: "gongzuorenyuan",
scopedSlots: { scopedSlots: {
customRender: "gongzuorenyuan", customRender: "workman_name",
}, },
}, },
{ {
title: "办理结束时间", title: "办理结束时间",
width: "115px", width: "8%",
align: "center", align: "center",
dataIndex: "banlijieshushijian", scopedSlots: {
customRender: "endtime",
},
}, },
{ {
title: "状态", title: "状态",
align: "center", align: "center",
dataIndex: "zhuangtai",
scopedSlots: { scopedSlots: {
customRender: "zhuangtai", customRender: "style",
}, },
}, },
{ {
title: "操作", title: "操作",
align: "center", align: "center",
width: "110px",
dataIndex: "operation",
scopedSlots: { scopedSlots: {
customRender: "operation", customRender: "action",
}, },
}, },
], ],
BegindAndEndTime: [], //设备数据
searchName: undefined, deviceData: [],
// 搜索数据
searchForm: {
id: "", // 排队机id
style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
},
//状态
style: [
{
key: 0,
name: "排队中",
},
{
key: 1,
name: "办理中",
},
{
key: 4,
name: "办理完成",
},
],
//Form数据列表
tableList: [],
}; };
}, },
components: { components: {
...@@ -173,62 +245,85 @@ export default { ...@@ -173,62 +245,85 @@ export default {
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.getQueueDataArr() this.getTaskListArr();
for (let key = 0; key < 20; key++) { this.getQueueDataArr();
this.tableSourceData.push({
id: `00${key + 1}`,
paiduibianhao: `A0001${key + 1}`,
shenbaoren: `张三 00${key + 1}`,
lianxifangshi: `13080888888${key + 1}`,
quhaoshijian: `2021-01-15 12:00:00`,
quhaoshebei: `一楼排队机 ${key + 1}`,
banliyewu: `公安户籍类 ${key + 1}`,
banlikaishishijian: `2021-01-15 12:00:00`,
banlichuangkou: `01/东区1 ${key + 1}`,
gongzuorenyuan: `刘明洋 ${key + 1}`,
banlijieshushijian: `2021-01-15 12:00:00`,
zhuangtai: `排队中 ${key + 1}`,
});
}
}, },
methods: { methods: {
//搜索按钮
getDataList() {
this.tablePagination.current = 1
this.getQueueDataArr();
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1
this.searchForm = {
id: "", // 排队机id
style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
}
this.getQueueDataArr()
},
//获取排号机设备列表
async getTaskListArr() {
await getTaskList({ page: 1, size: -1 }).then((res) => {
// console.log(res.data.data)
this.deviceData = res.data.data;
});
},
// 获取列表数据 // 获取列表数据
getQueueDataArr() { getQueueDataArr() {
getQueueData().then(res => { getQueueData({
console.log(res) page: this.tablePagination.current,
}) size: this.tablePagination.pageSize,
...this.searchForm,
}).then((res) => {
this.tableList = res.data.data;
this.tablePagination.total = res.data.total;
});
},
//分页
changeTablePage(page) {
this.pagTableChange(page)
this.getQueueDataArr()
}, },
openDeclarant() { //用户模态框
openDeclarant(item) {
console.log(item)
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
openBusiness() { //业务关联模块
async openBusiness(business, id) {
let siteId = localStorage.getItem('siteId')
await getBusinessEvent({ siteId, page: 1, size: -1, siteBusinessId: id }).then(res => {
this.$refs.BusinessInfo.dataList = res.data.data
})
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
openWorkpeople() { //工作人员信息模态框
async openWorkpeople(id) {
await getWorkerInfo({ id }).then(res => {
console.log(res.data)
this.$refs.WorkpeopleInfo.infoData = res.data
})
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
openHandlingDetails() { //详情信息抽屉
async openHandlingDetails(id) {
//获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => {
this.$refs.HandlingDetails.dataList = res.data
})
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
rangePickerChange(val) {
console.log(val);
},
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
}, },
}; };
</script> </script>
...@@ -237,5 +332,12 @@ export default { ...@@ -237,5 +332,12 @@ export default {
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block !important; display: block !important;
} }
</style>
.stand-line {
color: #f23a3a;
}
.on-transact {
color: #04ca8f;
}
</style>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<profiles.log.level>INFO</profiles.log.level> <profiles.log.level>INFO</profiles.log.level>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<package.environment>yibin</package.environment> <package.environment>yibin</package.environment>
<skipUi>false</skipUi> <skipUi>true</skipUi>
</properties> </properties>
</profile> </profile>
......
...@@ -249,7 +249,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered { ...@@ -249,7 +249,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
String originalResponseContentType = exchange.getAttribute(ServerWebExchangeUtils.ORIGINAL_RESPONSE_CONTENT_TYPE_ATTR); String originalResponseContentType = exchange.getAttribute(ServerWebExchangeUtils.ORIGINAL_RESPONSE_CONTENT_TYPE_ATTR);
if (ObjectUtil.equal(this.getStatusCode(), HttpStatus.OK) if (ObjectUtil.equal(this.getStatusCode(), HttpStatus.OK)
&& StringUtils.isNotBlank(originalResponseContentType)) { && StringUtils.isNotBlank(originalResponseContentType)) {
accessLogPdu.setRequestData(JSON.toJSONString(Rest.ok())); accessLogPdu.setResponseData(JSON.toJSONString(Rest.ok()));
/* Flux<? extends DataBuffer> fluxBody = Flux.from(body); /* Flux<? extends DataBuffer> fluxBody = Flux.from(body);
return super.writeWith(fluxBody.buffer().map(dataBuffers -> { return super.writeWith(fluxBody.buffer().map(dataBuffers -> {
// 合并多个流集合,解决返回体分段传输 // 合并多个流集合,解决返回体分段传输
...@@ -265,7 +265,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered { ...@@ -265,7 +265,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
return bufferFactory.wrap(content); return bufferFactory.wrap(content);
}));*/ }));*/
}else { }else {
accessLogPdu.setRequestData(JSON.toJSONString(Rest.fail())); accessLogPdu.setResponseData(JSON.toJSONString(Rest.fail()));
} }
} }
// if body is not a flux. never got there. // if body is not a flux. never got there.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment