Commit 002e5504 authored by caixingbing's avatar caixingbing
parents ea33030b 62e97408
...@@ -41,4 +41,9 @@ public class CacheConstants ...@@ -41,4 +41,9 @@ public class CacheConstants
* 登录账户密码错误次数 redis key * 登录账户密码错误次数 redis key
*/ */
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:"; public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
/**
* 查甲方 菜单选线
*/
public static final String DATA_UIPGROUPDATA = "data:uipGroupData";
} }
...@@ -70,8 +70,8 @@ public class BusinessFollowRecord extends BaseEntity ...@@ -70,8 +70,8 @@ public class BusinessFollowRecord extends BaseEntity
private String visitWay; private String visitWay;
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date creatTime; private Date creatTime;
public String getProjectName() { public String getProjectName() {
......
...@@ -171,8 +171,24 @@ export default { ...@@ -171,8 +171,24 @@ export default {
this.initChart() this.initChart()
this.getDT(1) this.getDT(1)
}) })
window.addEventListener("resize", this.resizeEcharts);
},
beforeDestroy(){
window.removeEventListener("resize", this. resizeEcharts);
},
activated() {
this.resizeEcharts()
}, },
methods: { methods: {
resizeEcharts (){
const self = this
setTimeout(function(){ //图表跟随页面大小变化宽度
self.myChart.resize()
self.myChart1.resize()
self.myChart2.resize()
self.myChart3.resize()
}, 10)
},
initChart(){ initChart(){
//客户级别 //客户级别
this.option = { this.option = {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card class="box-card noborder"> <el-card class="box-card noborder" id="charts">
<div class="cardtitles i">项目经营分析 <div class="cardtitles i">项目经营分析
<div class="labels"> <div class="labels">
<div :class="{'on':datatype==1}" @click="getDT(1)">周</div> <div :class="{'on':datatype==1}" @click="getDT(1)">周</div>
...@@ -222,6 +222,13 @@ export default { ...@@ -222,6 +222,13 @@ export default {
item.createTime = this.gettime(item.createTime) item.createTime = this.gettime(item.createTime)
item.nextVisitTime = this.gettime(item.nextVisitTime) item.nextVisitTime = this.gettime(item.nextVisitTime)
}) })
window.addEventListener("resize", this.resizeEcharts);
},
beforeDestroy(){
window.removeEventListener("resize", this. resizeEcharts);
},
activated() {
this.resizeEcharts()
}, },
methods: { methods: {
getDT(type){ getDT(type){
...@@ -298,6 +305,12 @@ export default { ...@@ -298,6 +305,12 @@ export default {
} }
this.initDT(datas,labels) this.initDT(datas,labels)
}, },
resizeEcharts (){
const self = this
setTimeout(function(){
self.myChart.resize()
}, 10)
},
initDT(datas,labels){ initDT(datas,labels){
this.chartDom = document.getElementById("xmjyfx") this.chartDom = document.getElementById("xmjyfx")
this.myChart = echarts.init(this.chartDom) this.myChart = echarts.init(this.chartDom)
...@@ -436,6 +449,11 @@ export default { ...@@ -436,6 +449,11 @@ export default {
] ]
} }
this.option && this.myChart.setOption(this.option) this.option && this.myChart.setOption(this.option)
let _this = this
// document.getElementById('charts').onresize = function () {
// _this.myChart.resize() ; // 如果有多个图标变动,可写多个
//
// }
}, },
gettime(time){ gettime(time){
if(time == null || time == "") if(time == null || time == "")
......
...@@ -5,9 +5,11 @@ import cn.hutool.core.map.MapUtil; ...@@ -5,9 +5,11 @@ import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.dsk.acc.openapi.client.util.CommonUtils; import com.dsk.acc.openapi.client.util.CommonUtils;
import com.dsk.common.constant.CacheConstants;
import com.dsk.common.core.domain.R; import com.dsk.common.core.domain.R;
import com.dsk.common.core.domain.model.*; import com.dsk.common.core.domain.model.*;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.core.redis.RedisCache;
import com.dsk.common.utils.DskOpenApiUtil; import com.dsk.common.utils.DskOpenApiUtil;
import com.dsk.common.utils.EncodeIdUtil; import com.dsk.common.utils.EncodeIdUtil;
import com.dsk.system.domain.customer.vo.CustomerStatusListVo; import com.dsk.system.domain.customer.vo.CustomerStatusListVo;
...@@ -23,6 +25,7 @@ import java.util.ArrayList; ...@@ -23,6 +25,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
/** /**
* @ClassName enterpriseService * @ClassName enterpriseService
...@@ -42,6 +45,9 @@ public class EnterpriseService { ...@@ -42,6 +45,9 @@ public class EnterpriseService {
@Autowired @Autowired
ICustomerService iCustomerService; ICustomerService iCustomerService;
@Autowired
private RedisCache redisCache;
public R infoHeader(EnterpriseInfoHeaderBody body) throws Exception { public R infoHeader(EnterpriseInfoHeaderBody body) throws Exception {
Map<String, Object> companyMap = dskOpenApiUtil.requestBody("/api/jsk/enterprise/infoHeader", BeanUtil.beanToMap(body, false, false)); Map<String, Object> companyMap = dskOpenApiUtil.requestBody("/api/jsk/enterprise/infoHeader", BeanUtil.beanToMap(body, false, false));
Integer companyCode = MapUtils.getInteger(companyMap, "code", 300); Integer companyCode = MapUtils.getInteger(companyMap, "code", 300);
...@@ -80,13 +86,6 @@ public class EnterpriseService { ...@@ -80,13 +86,6 @@ public class EnterpriseService {
return BeanUtil.toBean(map, R.class); return BeanUtil.toBean(map, R.class);
} }
public R supplierPage(EnterpriseSupplierPageBody body) throws Exception {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Api-Version", "1.0");
Map<String, Object> map = dskOpenApiUtil.requestBodyWithHeader("/api/jsk/enterpriseBusiness/selectPageSupplierInfo", BeanUtil.beanToMap(body, false, false), headerMap);
return BeanUtil.toBean(map, R.class);
}
public R projectTenderDataGroup(EnterpriseProjectTenderDataGroupBody body) throws Exception { public R projectTenderDataGroup(EnterpriseProjectTenderDataGroupBody body) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterprise/projectTenderDataGroup", BeanUtil.beanToMap(body, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterprise/projectTenderDataGroup", BeanUtil.beanToMap(body, false, false));
return BeanUtil.toBean(map, R.class); return BeanUtil.toBean(map, R.class);
...@@ -108,34 +107,6 @@ public class EnterpriseService { ...@@ -108,34 +107,6 @@ public class EnterpriseService {
return dskOpenApiUtil.responsePage(map); return dskOpenApiUtil.responsePage(map);
} }
public R bidNoticePage(EnterpriseBidNoticePageBody body) throws Exception {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Api-Version", "1.0");
Map<String, Object> map = dskOpenApiUtil.requestBodyWithHeader("/api/jsk/enterpriseBusiness/selectPageBidNoticeInfo", BeanUtil.beanToMap(body, false, false), headerMap);
return BeanUtil.toBean(map, R.class);
}
public R bidNoticeProvince(EnterpriseBidNoticePageBody body) throws Exception {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Api-Version", "1.0");
Map<String, Object> map = dskOpenApiUtil.requestBodyWithHeader("/api/jsk/enterpriseBusiness/selectBidProvinceByCompanyId", BeanUtil.beanToMap(body, false, false), headerMap);
return BeanUtil.toBean(map, R.class);
}
public R bidNoticeTenderStage(EnterpriseBidNoticePageBody body) throws Exception {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Api-Version", "1.0");
Map<String, Object> map = dskOpenApiUtil.requestBodyWithHeader("/api/jsk/enterpriseBusiness/selectTenderStageByCompanyId", BeanUtil.beanToMap(body, false, false), headerMap);
return BeanUtil.toBean(map, R.class);
}
public R bidNoticeDeatil(EnterpriseBidNoticeDetailBody body) throws Exception {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Api-Version", "1.0");
Map<String, Object> map = dskOpenApiUtil.requestBodyWithHeader("/api/jsk/enterpriseBusiness/bid/detail", BeanUtil.beanToMap(body, false, false), headerMap);
return BeanUtil.toBean(map, R.class);
}
public TableDataInfo dynamicPage(EnterpriseDynamicPageBody body) throws Exception { public TableDataInfo dynamicPage(EnterpriseDynamicPageBody body) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/api/jsk/enterprise/dynamic", BeanUtil.beanToMap(body, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/api/jsk/enterprise/dynamic", BeanUtil.beanToMap(body, false, false));
return dskOpenApiUtil.responsePage(map); return dskOpenApiUtil.responsePage(map);
...@@ -210,7 +181,21 @@ public class EnterpriseService { ...@@ -210,7 +181,21 @@ public class EnterpriseService {
} }
public R uipGroupData() throws Exception { public R uipGroupData() throws Exception {
String redisKey = CacheConstants.DATA_UIPGROUPDATA;
Map<String, Object> cacheMap = redisCache.getCacheMap(redisKey);
if (MapUtils.isNotEmpty(cacheMap)) {
return R.ok(cacheMap);
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterprise/uipGroupData", new HashMap<>()); Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterprise/uipGroupData", new HashMap<>());
Integer code = MapUtils.getInteger(map, "code", 300);
if (200 != code) throw new RuntimeException();
Map data = MapUtils.getMap(map, "data", null);
redisCache.setCacheMap(redisKey, data);
redisCache.expire(redisKey, 24, TimeUnit.HOURS);
return BeanUtil.toBean(map, R.class); return BeanUtil.toBean(map, R.class);
} }
......
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