Compare commits
6 Commits
60795a84f8
...
ee1f37d64b
| Author | SHA1 | Date |
|---|---|---|
|
|
ee1f37d64b | |
|
|
e2e54fb558 | |
|
|
c147641d4b | |
|
|
829a901af3 | |
|
|
61fffac96b | |
|
|
9bdd98f2a9 |
|
|
@ -0,0 +1,76 @@
|
|||
package com.bonus.aqgqj.basis.controller;
|
||||
|
||||
import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||
import com.bonus.aqgqj.basis.service.HomeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 工器具个体管理
|
||||
* @author hay
|
||||
*/
|
||||
@Api(tags = "首页")
|
||||
@RestController
|
||||
@RequestMapping("/home/")
|
||||
public class HomeController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger("adminLogger");
|
||||
|
||||
@Autowired
|
||||
private HomeService service;
|
||||
|
||||
@PostMapping(value = "getApprovalNum")
|
||||
public Map<String,Object> getApprovalNum(HomeVo vo) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
try{
|
||||
map=service.getApprovalNum(vo);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@PostMapping(value = "getATeamNumForEcharts")
|
||||
@DecryptAndVerify(decryptedClass = ToolsManageDto.class)
|
||||
public Map<String,Object> getATeamNumForEcharts(HomeVo vo) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
try{
|
||||
map=service.getATeamNumForEcharts(vo);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@PostMapping(value = "getATeamCostForEcharts")
|
||||
@DecryptAndVerify(decryptedClass = ToolsManageDto.class)
|
||||
public Map<String,Object> getATeamCostForEcharts(HomeVo vo) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
try{
|
||||
map=service.getATeamCostForEcharts(vo);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@PostMapping(value = "getCostRank")
|
||||
@DecryptAndVerify(decryptedClass = ToolsManageDto.class)
|
||||
public Map<String,Object> getCostRank(HomeVo vo) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
try{
|
||||
map=service.getCostRank(vo);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.aqgqj.basis.dao;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface HomeDao {
|
||||
/**
|
||||
* 查询审批数
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<HomeVo> getApprovalNum(HomeVo vo);
|
||||
/**
|
||||
* 查询试验班组echarts
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<HomeVo> getATeamNumForEcharts(HomeVo vo);
|
||||
/**
|
||||
* 查询试验费用echarts
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<HomeVo> getATeamCostForEcharts(HomeVo vo);
|
||||
/**
|
||||
* 查询费用排名
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<HomeVo> getCostRank(HomeVo vo);
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.bonus.aqgqj.basis.entity.vo;
|
||||
|
||||
import com.bonus.aqgqj.utils.UserUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @className:ExperDeviceVo
|
||||
* @author:cwchen
|
||||
* @date:2024-07-19-13:29
|
||||
* @version:1.0
|
||||
* @description:试验设备-vo
|
||||
*/
|
||||
@Data
|
||||
public class HomeVo {
|
||||
/**
|
||||
* 待派工
|
||||
*/
|
||||
private String dispatchWorkNum;
|
||||
/**
|
||||
* 待试验/实验数
|
||||
*/
|
||||
private String testNum;
|
||||
/**
|
||||
* 待重新审阅
|
||||
*/
|
||||
private String reloadReviewNUm;
|
||||
/**
|
||||
* 待审阅
|
||||
*/
|
||||
private String reviewNUm;
|
||||
/**
|
||||
* 待审核
|
||||
*/
|
||||
private String examineNum;
|
||||
/**
|
||||
* 待审批
|
||||
*/
|
||||
private String approvalNum;
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
private String teamName;
|
||||
/**
|
||||
* 试验日期
|
||||
*/
|
||||
private String testData;
|
||||
/**
|
||||
* 试验费用
|
||||
*/
|
||||
private String testCost;
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
private String sortNum;
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 总费用
|
||||
*/
|
||||
private String totalCost;
|
||||
/**
|
||||
* 订单量
|
||||
*/
|
||||
private String orderNum;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contacts;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 合作时间
|
||||
*/
|
||||
private String cooperateDate;
|
||||
|
||||
private String updateDate;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.bonus.aqgqj.basis.service;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工器具个体管理
|
||||
* @author hay
|
||||
*/
|
||||
public interface HomeService {
|
||||
/**
|
||||
* 查询审批数
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getApprovalNum(HomeVo vo);
|
||||
/**
|
||||
* 查询试验班组echarts
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getATeamNumForEcharts(HomeVo vo);
|
||||
/**
|
||||
* 查询试验费用echarts
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getATeamCostForEcharts(HomeVo vo);
|
||||
/**
|
||||
* 查询费用排名
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getCostRank(HomeVo vo);
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.bonus.aqgqj.basis.service.impl;
|
||||
|
||||
import com.bonus.aqgqj.basis.dao.HomeDao;
|
||||
import com.bonus.aqgqj.basis.dao.ToolsManageDao;
|
||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||
import com.bonus.aqgqj.basis.service.HomeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 工器具个体管理
|
||||
* @author hay
|
||||
* @date 2024/7/20 16:10
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class HomeServiceImpl implements HomeService {
|
||||
@Resource
|
||||
private HomeDao dao;
|
||||
@Override
|
||||
public Map<String, Object> getApprovalNum(HomeVo vo) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
try{
|
||||
List<HomeVo> list=dao.getApprovalNum(vo);
|
||||
HomeVo hvo=new HomeVo();
|
||||
map.put("data",hvo);
|
||||
map.put("code","200");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
map.put("code","400");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public Map<String, Object> getATeamNumForEcharts(HomeVo vo) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
try{
|
||||
List<HomeVo> list=dao.getATeamNumForEcharts(vo);
|
||||
HomeVo hvo=new HomeVo();
|
||||
map.put("data",hvo);
|
||||
map.put("code","200");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
map.put("code","400");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public Map<String, Object> getATeamCostForEcharts(HomeVo vo) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
try{
|
||||
List<HomeVo> list=dao.getATeamCostForEcharts(vo);
|
||||
HomeVo hvo=new HomeVo();
|
||||
map.put("data",hvo);
|
||||
map.put("code","200");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
map.put("code","400");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public Map<String, Object> getCostRank(HomeVo vo) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
try{
|
||||
List<HomeVo> list=dao.getCostRank(vo);
|
||||
HomeVo hvo=new HomeVo();
|
||||
map.put("data",hvo);
|
||||
map.put("code","200");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
map.put("code","400");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public class TokenFilter extends OncePerRequestFilter {
|
|||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
private static String url="/zhly/login.html";
|
||||
private static String url="/szgqj/login.html";
|
||||
|
||||
private static final Long MINUTES_10 = 10 * 60 * 1000L;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,15 @@ server.port=11997
|
|||
#\u8BBF\u95EE\u8DEF\u5F84
|
||||
server.servlet.context-path=/szgqj
|
||||
#mysql\u6570\u636E\u5E93\u8FDE\u63A5
|
||||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/bns_zhly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=bonus@admin123
|
||||
#spring.datasource.url=jdbc:mysql://192.168.0.7:13306/bns_zhly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/bns_zhly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=Bonus@admin123!
|
||||
#spring.datasource.password=bonus@admin123
|
||||
spring.datasource.url=jdbc:mysql://192.168.0.7:13306/sz_aqgqj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=Bonus@admin123!
|
||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/sz_aqgqj ?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=jsk@131551
|
||||
#spring.datasource.url=jdbc:mysql://192.168.0.14:2000/bns_zhly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=zhly@mysql14!
|
||||
|
|
@ -32,10 +35,12 @@ mybatis.type-aliases-package=com.bonus.aqgqj.*.vo
|
|||
#spring.redis.host=localhost
|
||||
|
||||
|
||||
#spring.redis.host=127.0.0.1
|
||||
#spring.redis.port=6379
|
||||
#spring.redis.database=4
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.database=4
|
||||
|
||||
spring.redis.password=123456
|
||||
|
||||
#spring.redis.host=192.168.0.14
|
||||
#spring.redis.port=2002
|
||||
|
|
@ -62,7 +67,7 @@ token.expire.seconds=7200
|
|||
spring.servlet.multipart.enabled=true
|
||||
|
||||
#\u662F\u5426\u5F00\u542F\u5B89\u5168\u6A21\u5F0F
|
||||
zhly.aq.enable=true
|
||||
zhly.aq.enable=false
|
||||
#\u6587\u4EF6\u8FC7\u6EE4
|
||||
zhly.aq.file.suffix=woff,js,css,html,woff2,lang,map,png,jpg
|
||||
#\u9759\u6001\u8D44\u6E90 \u4E0D\u62E6\u622A
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.aqgqj.basis.dao.HomeDao">
|
||||
<select id="getApprovalNum" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||||
select
|
||||
sum(case when team_id is null then 0 else 1 end ) as dispatchWorkNum
|
||||
,sum(case when team_id is not null and process_status is null then 1 else 0 end ) as testNum
|
||||
,sum(case when process_status='1' and remarks is not null then 1 else 0 end ) as reloadReviewNUm
|
||||
,sum(case when process_status='1' and remarks is null then 1 else 0 end ) as reviewNUm
|
||||
,sum(case when process_status='2' then 1 else 0 end ) as examineNum
|
||||
,sum(case when process_status='3' then 1 else 0 end ) as approvalNum
|
||||
,DATE_FORMAT(NOW(), '%Y-%m-%d') as updateDate
|
||||
from (
|
||||
select * from tb_sample where del_flag='0'
|
||||
) ts
|
||||
</select>
|
||||
<select id="getATeamNumForEcharts" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||||
select tt.team_name as teamName,ts.id,DATE_FORMAT(ts.dispatch_time, '%Y-%m-%d') as testData from tb_sample ts
|
||||
where ts.del_flag='0'
|
||||
</select>
|
||||
<select id="getATeamCostForEcharts" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||||
select
|
||||
teamName,sum(amount) as testCost
|
||||
from (
|
||||
select tt.team_name as teamName,ts.id,teis.amount from tb_exper te
|
||||
left join tb_sample ts on te.sample_id=ts.id
|
||||
left join tb_team tt on ts.team_id=tt.id
|
||||
left join tb_exper_items teis on te.id=teis.exper_id
|
||||
where ts.del_flag='0'
|
||||
) aa group by teamName
|
||||
</select>
|
||||
<select id="getCostRank" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
.container{
|
||||
/*display: flex;*/
|
||||
/*flex-direction: column; !*用于设置一个弹性盒子的主轴方向*!*/
|
||||
height: 95vh;
|
||||
}
|
||||
.one{
|
||||
height: 4%;
|
||||
width: 100%;
|
||||
}
|
||||
.one span{
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
.two{
|
||||
height: 40%;
|
||||
width: 100%;
|
||||
}
|
||||
.two table{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 20px; /* 设置边框间距为10px */
|
||||
}
|
||||
.two table td .daiban{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
.two table td .daiban div:nth-child(1){
|
||||
margin-left: 2%;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.two table td .daiban div:nth-child(2){
|
||||
margin-left: 2%;
|
||||
color: #0000FF;
|
||||
font-size: 40px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.two table td .daiban div:nth-child(3){
|
||||
margin-left: 2%;
|
||||
color: #E3E3E3;
|
||||
font-size: 18px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.three{
|
||||
height: 50%;
|
||||
width: 100%;
|
||||
}
|
||||
.three-one{
|
||||
float: left;
|
||||
width: 70%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.three-two{
|
||||
float: left;
|
||||
width: 26%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
margin-left: 1%;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.three-one div:nth-child(1){
|
||||
margin-top: 1%;
|
||||
margin-left: 2%;
|
||||
height: 10%;
|
||||
}
|
||||
.three-one div:nth-child(2){
|
||||
height: 90%;
|
||||
}
|
||||
.three-one span{
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
.three-two span{
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
.three-one button:nth-child(2){
|
||||
float: right;
|
||||
width: 80px;
|
||||
}
|
||||
.three-one button:nth-child(3){
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
width: 80px;
|
||||
}
|
||||
.three-two div:nth-child(1){
|
||||
margin-top: 2%;
|
||||
margin-left: 2%;
|
||||
height: 10%;
|
||||
}
|
||||
.three-two div:nth-child(2){
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
}
|
||||
.four{
|
||||
height: 60%;
|
||||
width: 97.5%;
|
||||
margin-top: 1%;
|
||||
}
|
||||
.four-one{
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
background-color: #fff;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.four-two{
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
background-color: #fff;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.four-one div{
|
||||
height: 58%;
|
||||
margin-left: 2%;
|
||||
padding-top: 1%;
|
||||
}
|
||||
.four-one span{
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
</ul>
|
||||
<div class="layui-tab-content" style="min-height: 150px; padding: 5px 0 0 0;background-color: #F2F2F2;">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<iframe src=""></iframe>
|
||||
<iframe id="sy" src=""></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,197 @@
|
|||
var form,layer,table,carousel,util;
|
||||
layui.use(['form', 'layer', 'table', 'laydate','carousel','util'], function () {
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
carousel = layui.carousel;
|
||||
util=layui.util;
|
||||
console.log("测试")
|
||||
initApproe();
|
||||
echartsone();
|
||||
echartstwo();
|
||||
iniTable();
|
||||
// layui-table-body
|
||||
})
|
||||
function initApproe(){
|
||||
var dispatchWorkNum=0;
|
||||
var testNum =0;
|
||||
var reloadReviewNUm=0;
|
||||
var reviewNUm =0;
|
||||
var examineNum =0;
|
||||
var approvalNum =0;
|
||||
var objs=$(".updateDate");
|
||||
$.each(objs, function (index, item) {
|
||||
$(item).html("2024-07-26")
|
||||
})
|
||||
$.ajax({
|
||||
url: dataUrl + "/home/getApprovalNum",
|
||||
headers: {
|
||||
"token": tokens
|
||||
},
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function (result) {
|
||||
if (result.code === 200) {
|
||||
if (result.data) {
|
||||
|
||||
}
|
||||
}
|
||||
}, error: function (xhr) {
|
||||
// error(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
var data=[{"numbers":1,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":2,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":3,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":4,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":5,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":6,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":7,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":8,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":9,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":10,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":11,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":12,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
,{"numbers":13,"username":"测试","fee":"测试","dingdan":"测试","name":"测试","phone":"测试","gettime":"测试"}
|
||||
]
|
||||
var intervalId;
|
||||
var scrollableDiv ; // 假设你的滚动容器类名为.scrollable
|
||||
var totalHeight ;
|
||||
var visibleHeight ;
|
||||
var currentScrollTop = 0;
|
||||
function iniTable(){
|
||||
table.render({
|
||||
elem: '#table-box',
|
||||
data:data,
|
||||
limit: 10000,
|
||||
page:false,
|
||||
cols: [[
|
||||
{type: 'numbers', title: '排名', width: '10%',align:"center"}//序号列
|
||||
,{field: 'username', title: '用户名称', width: '20%',align:"center"}
|
||||
,{field: 'fee', title: '总金额(元)', width: '15%',align:"center"}
|
||||
,{field: 'dingdan', title: '订单量', width: '12%',align:"center"}
|
||||
,{field: 'name', title: '联系人', width: '12%',align:"center"}
|
||||
,{field: 'phone', title: '联系电话', width: '15%',align:"center"}
|
||||
,{field: 'gettime', title: '最近合作时间', width: '15%',align:"center"}
|
||||
]]
|
||||
});
|
||||
scrollableDiv = $('#table-box + div .layui-table-body'); // 假设你的滚动容器类名为.scrollable
|
||||
totalHeight = scrollableDiv[0].scrollHeight;
|
||||
visibleHeight = scrollableDiv.innerHeight();
|
||||
currentScrollTop = 0;
|
||||
console.log(totalHeight,"totalHeight")
|
||||
console.log(visibleHeight,"visibleHeight")
|
||||
intervalId = setInterval(scrolldiv, 40);
|
||||
monveinout();
|
||||
}
|
||||
function monveinout(){
|
||||
$('#table-box + div .layui-table-body').on("mouseenter",function(){
|
||||
clearInterval(intervalId);
|
||||
}).on("mouseleave",function(){
|
||||
intervalId = setInterval(scrolldiv, 40);
|
||||
})
|
||||
}
|
||||
function scrolldiv() {
|
||||
// 如果滚动到最底部,重置到顶部
|
||||
if (currentScrollTop + visibleHeight >= totalHeight) {
|
||||
currentScrollTop = 0;
|
||||
scrollableDiv.scrollTop(currentScrollTop);
|
||||
} else {
|
||||
// 否则,向下滚动一定的像素数
|
||||
currentScrollTop += 1; // 调整这个数字来改变滚动速度
|
||||
scrollableDiv.scrollTop(currentScrollTop);
|
||||
}
|
||||
}
|
||||
function echartsone(){
|
||||
var myChart = echarts.init(document.getElementById('echartsone'));
|
||||
option = {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
legend: {},
|
||||
tooltip: {
|
||||
// 修改tooltip的触发方式,例如改为'axis'轴触发
|
||||
trigger: 'axis',
|
||||
// 自定义内容格式化函数
|
||||
// 其他tooltip样式和行为
|
||||
extraCssText: 'width:160px;height:100px;',
|
||||
backgroundColor: 'rgba(50,50,50,0.7)', // 背景颜色
|
||||
borderColor: '#333', // 边框颜色
|
||||
borderWidth: 1, // 边框宽度
|
||||
padding: 0, // 内边距
|
||||
textStyle: {
|
||||
color: '#fff' // 文本颜色
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['2024-07-01', '2024-07-02', '2024-07-03', '2024-07-04', '2024-07-05', '2024-07-06', '2024-07-07']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '实验一班',
|
||||
type: 'line',
|
||||
data: [10, 11, 13, 11, 12, 12, 9],
|
||||
lineStyle: {
|
||||
color: '#0052D9',
|
||||
width: 2,
|
||||
type: 'solid'
|
||||
},
|
||||
// 设置散点(线中的点)颜色
|
||||
itemStyle: {
|
||||
color: '#0052D9'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '实验二班',
|
||||
type: 'line',
|
||||
data: [1, 2, 2, 5, 3, 2, 4],
|
||||
lineStyle: {
|
||||
color: '#B5C7FF',
|
||||
width: 2,
|
||||
type: 'solid'
|
||||
},
|
||||
// 设置散点(线中的点)颜色
|
||||
itemStyle: {
|
||||
color: '#B5C7FF'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
function echartstwo(){
|
||||
var myChart = echarts.init(document.getElementById('echartstwo'));
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
extraCssText: 'width:160px;height:100px;',
|
||||
},
|
||||
// legend: {
|
||||
// orient: 'vertical',
|
||||
// left: 'right'
|
||||
// },
|
||||
legend: {},
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
color: ['#0052D9', '#B5C7FF'],
|
||||
data: [
|
||||
{ value: 1048, name: '试验一班' },
|
||||
{ value: 735, name: '试验二班' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,5 @@
|
|||
initMenu();
|
||||
initsy();
|
||||
function initMenu(){
|
||||
$.ajax({
|
||||
url: ctxPath + "/permissions/current",
|
||||
|
|
@ -54,7 +55,14 @@ function initMenu(){
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initsy() {
|
||||
var $tabs=$('#menu');
|
||||
var $tabsTitle = $tabs.find('.layui-nav-item a');
|
||||
$.each($tabsTitle,function(idx, ele){
|
||||
var id=$(ele).attr("lay-id");
|
||||
$("#sy").attr("src","pages/home/home.html?token="+localStorage.getItem("token"));
|
||||
})
|
||||
}
|
||||
function setChild(parentElement, child){
|
||||
if(child != null && child.length > 0){
|
||||
$.each(child, function(j,item2){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
var ctxPath = getContextPath();
|
||||
let aqEnnable = true;//是否开启安全验证
|
||||
let aqEnnable = false;//是否开启安全验证
|
||||
// console.log(ctxPath)
|
||||
var url=window.location.href;
|
||||
// console.log(url)
|
||||
|
|
@ -35,10 +35,10 @@ function error(xhr) {
|
|||
icon: 5,
|
||||
move: false,
|
||||
cancel: function (index, layero) {
|
||||
location.href = '/zhly/login.html';
|
||||
location.href = '/szgqj/login.html';
|
||||
}
|
||||
}, function () {
|
||||
location.href = '/zhly/login.html';
|
||||
location.href = '/szgqj/login.html';
|
||||
})
|
||||
} else if (code == 403) {
|
||||
console.log("未授权:" + message);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>首页</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../js/layui-v2.6.8/css/layui.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../css/home/home.css">
|
||||
</head>
|
||||
<style>
|
||||
#table-box + div .layui-table-body {
|
||||
height: 392px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
/* 自定义整个滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
width: 10px; /* 设置滚动条的宽度 */
|
||||
}
|
||||
/* 自定义滚动条轨道 */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1; /* 设置轨道的背景颜色 */
|
||||
}
|
||||
/* 自定义滚动条的滑块(thumb) */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #F2F2F2; /* 设置滑块的背景颜色 */
|
||||
}
|
||||
/* 当滑块悬停或活动时自定义滚动条的滑块 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #888; /* 设置滑块在悬停状态下的背景颜色 */
|
||||
box-shadow: 0 0 10px #fff;
|
||||
}
|
||||
</style>
|
||||
<body style="width: 99% !important;">
|
||||
<div class="container">
|
||||
<div class="one"><span>待办任务统计</span></div>
|
||||
<div class="two">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="daiban">
|
||||
<div><span>待派工</span></div>
|
||||
<div><span id="dispatchWorkNum">0</span></div>
|
||||
<div><span>更新至</span><span class="updateDate">2024-07-18</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="daiban">
|
||||
<div><span>待试验</span></div>
|
||||
<div><span id="testNum">0</span></div>
|
||||
<div><span>更新至</span><span class="updateDate">2024-07-18</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="daiban">
|
||||
<div><span>待重新审阅</span></div>
|
||||
<div><span id="reloadReviewNUm">0</span></div>
|
||||
<div><span>更新至</span><span class="updateDate">2024-07-18</span></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="daiban">
|
||||
<div><span>待审阅</span></div>
|
||||
<div><span id="reviewNUm">0</span></div>
|
||||
<div><span>更新至</span><span class="updateDate">2024-07-18</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="daiban">
|
||||
<div><span>待审核</span></div>
|
||||
<div><span id="examineNum">0</span></div>
|
||||
<div><span>更新至</span><span class="updateDate">2024-07-18</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="daiban">
|
||||
<div><span>待审批</span></div>
|
||||
<div><span id="approvalNum">0</span></div>
|
||||
<div><span>更新至</span><span class="updateDate">2024-07-18</span></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="three">
|
||||
<div class="three-one">
|
||||
<div><span>班组工作情况统计(试验数)</span><button>近15天</button><button>本周</button></div>
|
||||
<div id="echartsone"></div>
|
||||
</div>
|
||||
<div class="three-two">
|
||||
<div><span>费用统计</span></div>
|
||||
<div id="echartstwo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="four">
|
||||
<div class="four-one">
|
||||
<div><span>大客户信息</span></div>
|
||||
</div>
|
||||
<div class="four-two">
|
||||
<table id="table-box"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
|
||||
<!--<script type="text/javascript" src="../../../js/jq.js"></script>-->
|
||||
<!--<script type="text/javascript" src="../../../js/my/permission.js"></script>-->
|
||||
<script type="text/javascript" src="../../js/layui-v2.6.8/layui.js"></script>
|
||||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../js/libs/echarts.js"></script>
|
||||
<script type="text/javascript" src="../../js/home/home.js"></script>
|
||||
|
||||
Loading…
Reference in New Issue