柱状图实现可跳转
parent
6eb1d99a56
commit
64c7132d79
|
@ -47,6 +47,7 @@ public class SpaceController extends BaseController {
|
|||
@RequestMapping("/list")
|
||||
public String list(@RequestParam(value = "keywords", required = false) String keywords,
|
||||
@RequestParam(value = "certainty") int certainty,
|
||||
@RequestParam(value = "certaintyStr", required = false) String certaintyStr,
|
||||
@RequestParam(value = PAGE_NUMBER, defaultValue = DEFAULT_PAGE_NUMBER) int pageNumber,
|
||||
@RequestParam(value = PAGE_SIZE, defaultValue = DEFAULT_PAGE_SIZE) int pageSize,
|
||||
Map<String, Object> model) {
|
||||
|
@ -57,6 +58,15 @@ public class SpaceController extends BaseController {
|
|||
model.put("adminId", admin.getId());
|
||||
model.put("admin", admin);
|
||||
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords, model);
|
||||
if (certainty == 0) {
|
||||
if (certaintyStr.startsWith("A")) {
|
||||
certainty = 1;
|
||||
} else if (certaintyStr.startsWith("B")) {
|
||||
certainty = 2;
|
||||
} else if (certaintyStr.startsWith("C")) {
|
||||
certainty = 3;
|
||||
}
|
||||
}
|
||||
model.put("certainty", certainty);
|
||||
searchInfo.putIfAbsent("certainty", String.valueOf(certainty));
|
||||
searchInfo.putIfAbsent("deptName", "销售管理部");
|
||||
|
|
|
@ -101,10 +101,7 @@ public class ProjectService {
|
|||
if(StrUtil.isNotEmpty(searchInfo.get("underwrittenMode")) && !"-1".equals(searchInfo.get("underwrittenMode"))){
|
||||
queryHelper.addCondition("p.underwritten_mode=?", Integer.parseInt(searchInfo.get("underwrittenMode")));
|
||||
}
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("certainty")) && !"-1".equals(searchInfo.get("certainty"))){
|
||||
queryHelper.addCondition("p.certainty=?", Integer.parseInt(searchInfo.get("certainty")));
|
||||
}
|
||||
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("deptName")),"p.dept_name LIKE ?", "%"+searchInfo.get("deptName")+"%");
|
||||
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("estimateStatus")) && !"-1".equals(searchInfo.get("estimateStatus"))){
|
||||
queryHelper.addCondition("p.approve_status_estimate>=1 and p.approve_status_estimate<=2");
|
||||
}
|
||||
|
|
|
@ -46,6 +46,9 @@ public class SpaceService {
|
|||
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("customer")),"p.customer LIKE ?", "%"+searchInfo.get("customer")+"%");
|
||||
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("terminalCustomer")),"p.terminal_customer LIKE ?", "%"+searchInfo.get("terminalCustomer")+"%");
|
||||
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("principal")),"p.principal LIKE ?", "%"+searchInfo.get("principal")+"%");
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("certainty")) && !"-1".equals(searchInfo.get("certainty"))){
|
||||
queryHelper.addCondition("p.certainty=?", Integer.parseInt(searchInfo.get("certainty")));
|
||||
}
|
||||
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("approveStatus")) && !"-1".equals(searchInfo.get("approveStatus"))){
|
||||
int approveStatus = Integer.parseInt(searchInfo.get("approveStatus"));
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
xAxis: {
|
||||
type: 'category',
|
||||
name: '项目把握度',
|
||||
// triggerEvent: true,
|
||||
axisLabel: {
|
||||
interval:0
|
||||
},
|
||||
|
@ -202,6 +203,15 @@
|
|||
window.location.href = "${base}/space/list?certainty=" + certainty;
|
||||
});
|
||||
|
||||
myChart2.on('click', function (param) {
|
||||
// for (const key in param) {
|
||||
// console.log('key is ' + key + ', value is ' + param[key]);
|
||||
// }
|
||||
|
||||
const certaintyStr = param.name;
|
||||
window.location.href = "${base}/space/list?certainty=0&certaintyStr=" + certaintyStr;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue