中扬CRM客户关系管理系统
whycq
2023-12-15 a7ba113f05b0b32adbab8bd2c603d31d543a0699
# 大屏显示-1
8个文件已修改
1个文件已添加
1983 ■■■■■ 已修改文件
src/main/java/com/zy/crm/common/entity/UserYear.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/controller/BIController.java 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/mapper/PlanMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/service/PlanService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/service/impl/PlanServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/PlanMapper.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/BI/comon0.css 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/BI/js.js 1355 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/BI/index.html 479 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/common/entity/UserYear.java
New file
@@ -0,0 +1,13 @@
package com.zy.crm.common.entity;
import lombok.Data;
@Data
public class UserYear{
    private Integer count;
    private Integer year;
    private Integer month;
}
src/main/java/com/zy/crm/manager/controller/BIController.java
@@ -2,9 +2,11 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.R;
import com.core.common.SpringUtils;
import com.zy.crm.common.entity.UserYear;
import com.zy.crm.common.web.BaseController;
import com.zy.crm.manager.entity.ContractSales;
import com.zy.crm.manager.entity.Plan;
import com.zy.crm.manager.entity.PlanType;
import com.zy.crm.manager.entity.ProcessPermissions;
@@ -14,14 +16,10 @@
import com.zy.crm.system.entity.User;
import com.zy.crm.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
@RestController
public class BIController extends BaseController {
@@ -41,9 +39,17 @@
        // 传入用户id查询规划单 区分,通过区分出来的规划单类型查询 规划申请单
        //
        EntityWrapper<Plan> wrapper = new EntityWrapper<>();
        wrapper.setSqlSelect("user_id");
        wrapper.eq("settle",2).eq("assistant_host_sign",0).groupBy("user_id");
        wrapper.setSqlSelect("user_id","director","count(id) count");
        wrapper.eq("settle",2).eq("assistant_host_sign",0).groupBy("user_id,director");
        List<Map<String, Object>> maps = planService.selectMaps(wrapper);
        for (Map<String, Object> map : maps) {
            String user_id = map.get("user_id").toString();
            UserService service = SpringUtils.getBean(UserService.class);
            User user = service.selectById(user_id);
            if (!Cools.isEmpty(user)) {
                map.put("userId$",String.valueOf(user.getNickname()));
            }
        }
        return R.ok().add(maps);
    }
@@ -51,8 +57,8 @@
    @ManagerAuth
    public R getPlanByUser() {
        PlanType planType = new PlanType();
        planType.setType(1);
        planType.setType(1);
        planType.setType(2);
        planType.setHostId(1L);
        User planLeader = planTypeService.findPlanLeader(planType);
        List<User> users = userService.selectList(new EntityWrapper<User>().eq("dept_id", planLeader.getDeptId()));
        List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 101));
@@ -63,10 +69,17 @@
        List<Map<String, Object>> result = new ArrayList<>();
        for (User user:users){
            if (user.getUsername().equals("周夏天") || user.getUsername().equals("梁昌民")) {
                continue;
            }
            List<Plan> plans = planService.selctPlanListByDirector(user.getId());
            String userList = "";
            for (Plan plan:plans){
                userList = userList+","+plan.getUserId$();
                if (plans.indexOf(plan)==plans.size()-1){
                    userList = userList+plan.getUserId$();
                    continue;
                }
                userList = plan.getUserId$() +","+ userList;
            }
            int director = planService.selectCount(new EntityWrapper<Plan>().eq("director", user.getId()));
@@ -77,18 +90,39 @@
            map.put("anfme", director);
            result.add(map);
        }
        return R.ok().add(result);
    }
//        List<PlanType> planTypes = planTypeService.selectList(new EntityWrapper<PlanType>().eq("type", "1").eq("host_id",1));
//        for (PlanType planType2:planTypes){
//
//        }
        // 传入用户id查询规划单 区分,通过区分出来的规划单类型查询 规划申请单
        //
    @RequestMapping(value = "/pending/sum/auth")
    @ManagerAuth
    public R getAllPlan() {
        EntityWrapper<Plan> wrapper = new EntityWrapper<>();
        wrapper.setSqlSelect("user_id");
        wrapper.eq("settle",2).eq("assistant_host_sign",0).groupBy("user_id");
        wrapper.setSqlSelect("count(0) count","MONTH(create_time) month");
        wrapper.groupBy("MONTH(create_time)");
        List<Map<String, Object>> maps = planService.selectMaps(wrapper);
        return R.ok().add(maps);
    }
    @RequestMapping(value = "/user/sumyear/auth")
    @ManagerAuth
    public R getUserYear() {
        PlanType planType = new PlanType();
        planType.setType(2);
        planType.setHostId(1L);
        User planLeader = planTypeService.findPlanLeader(planType);
        List<User> users = userService.selectList(new EntityWrapper<User>().eq("dept_id", planLeader.getDeptId()));
        List<Map<String, Object>> maps = new ArrayList<>();
        for (User user : users) {
            if (user.getUsername().equals("周夏天") || user.getUsername().equals("梁昌民")) {
                continue;
            }
            Map<String, Object> map = new HashMap<>();
            map.put("user", user);
            map.put("obj", planService.selectUserYear(user.getId()));
            maps.add(map);
        }
        return R.ok().add(maps);
    }
}
src/main/java/com/zy/crm/manager/mapper/PlanMapper.java
@@ -2,12 +2,14 @@
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.zy.crm.common.entity.UserYear;
import com.zy.crm.manager.entity.Plan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
@@ -22,4 +24,9 @@
    List<Plan> selctPlanListByDirector(Long userId);
    List<Plan> getApproval(Integer settle, Integer assistantHostSign);
    List<Object> selectMonth();
    List<UserYear> selectUserYear(Long userId);
}
src/main/java/com/zy/crm/manager/service/PlanService.java
@@ -2,9 +2,11 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zy.crm.common.entity.UserYear;
import com.zy.crm.manager.entity.Plan;
import java.util.List;
import java.util.Map;
public interface PlanService extends IService<Plan> {
@@ -17,4 +19,10 @@
    List<Plan> selctPlanListByDirector(Long userId);
    List<Plan> getApproval(Integer settle, Integer assistantHostSign);
    List<Object> selectMonth();
    List<UserYear> selectUserYear(Long userId);
}
src/main/java/com/zy/crm/manager/service/impl/PlanServiceImpl.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.zy.crm.common.entity.UserYear;
import com.zy.crm.manager.entity.CompanyMoney;
import com.zy.crm.manager.entity.Plan;
import com.zy.crm.manager.mapper.PlanMapper;
import com.zy.crm.manager.service.PlanService;
@@ -10,6 +12,7 @@
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service("planService")
public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements PlanService {
@@ -71,4 +74,19 @@
        return this.baseMapper.selctPlanListByDirector(userId);
    }
    @Override
    public List<Plan> getApproval(Integer settle, Integer assistantHostSign){
        return this.baseMapper.getApproval(settle,assistantHostSign);
    }
    @Override
    public  List<Object> selectMonth(){
        return this.baseMapper.selectMonth();
    }
    @Override
    public List<UserYear> selectUserYear(Long user){
        return this.baseMapper.selectUserYear(user);
    }
}
src/main/resources/mapper/PlanMapper.xml
@@ -128,10 +128,31 @@
        and settle &lt; settle_size
    </select>
    <select id="selctPlanListByDirector" resultType="java.lang.Integer">
    <select id="selctPlanListByDirector" resultMap="BaseResultMap">
        select DISTINCT user_id from man_plan
        where 1=1
        and director = #{director}
    </select>
    <select id="getApproval" resultMap="BaseResultMap">
        SELECT user_id,status2,host_id,director,dept_id,plan_type,order_id,COUNT(*) num
        FROM man_plan
        WHERE settle = #{settle} AND assistant_host_sign = #{assistantHostSign}
        GROUP BY user_id,status2,host_id,director,dept_id,plan_type,order_id
    </select>
    <select id="selectMonth" resultMap="BaseResultMap">
        SELECT count(0) as count, MONTH(create_time) as month FROM man_plan
        where 1=1
        group by MONTH(create_time)
    </select>
    <select id="selectUserYear" resultType="com.zy.crm.common.entity.UserYear">
        select COUNT(1) as count,YEAR(p.create_time) as year
        from (select DISTINCT m.plan_id,m.user_id from man_plan_foll as m where m.user_id = #{userId}) as f
        LEFT JOIN man_plan as p on (f.plan_id = p.id)
        where f.user_id = #{userId}
        group by YEAR(p.create_time)
    </select>
</mapper>
src/main/webapp/static/css/BI/comon0.css
@@ -235,4 +235,12 @@
    line-height: 1;
    border-radius: 15%;
    background-color: #4acc96;
}
#innder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: electronicFont;
    color: orange;
}
src/main/webapp/static/js/BI/js.js
@@ -1,776 +1,745 @@

$(function () {
echarts_1();
echarts_4();
function echarts_1() {
$(function () {
    echarts_1();
    //echarts_4();
    function echarts_1() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart1'));
       option = {
  //  backgroundColor: '#00265f',
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    grid: {
        left: '0%',
        top:'10px',
        right: '0%',
        bottom: '4%',
       containLabel: true
    },
    xAxis: [{
        type: 'category',
              data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
        axisLine: {
            show: true,
         lineStyle: {
                color: "rgba(255,255,255,.1)",
                width: 1,
                type: "solid"
        option = {
            //  backgroundColor: '#00265f',
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                }
            },
        },
        axisTick: {
            show: false,
        },
        axisLabel:  {
                interval: 0,
               // rotate:50,
                show: true,
                splitNumber: 15,
                textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize: '12',
            grid: {
                left: '0%',
                top: '10px',
                right: '0%',
                bottom: '4%',
                containLabel: true
            },
            xAxis: [{
                type: 'category',
                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.1)",
                        width: 1,
                        type: "solid"
                    },
                },
            },
    }],
    yAxis: [{
        type: 'value',
        axisLabel: {
           //formatter: '{value} %'
            show:true,
             textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                axisTick: {
                    show: false,
                },
        },
        axisTick: {
            show: false,
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: "rgba(255,255,255,.1    )",
                width: 1,
                type: "solid"
            },
        },
        splitLine: {
            lineStyle: {
               color: "rgba(255,255,255,.1)",
            }
        }
    }],
    series: [
        {
        type: 'bar',
        data: [200, 300, 300, 900, 1500, 1200, 600],
        barWidth:'35%', //柱子宽度
       // barGap: 1, //柱子之间间距
        itemStyle: {
            normal: {
                color:'#2f89cf',
                opacity: 1,
                barBorderRadius: 5,
            }
        }
    }
    ]
};
                axisLabel: {
                    interval: 0,
                    // rotate:50,
                    show: true,
                    splitNumber: 15,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
                },
            }],
            yAxis: [{
                type: 'value',
                axisLabel: {
                    //formatter: '{value} %'
                    show: true,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
                },
                axisTick: {
                    show: false,
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.1    )",
                        width: 1,
                        type: "solid"
                    },
                },
                splitLine: {
                    lineStyle: {
                        color: "rgba(255,255,255,.1)",
                    }
                }
            }],
            series: [
                {
                    type: 'bar',
                    data: [200, 300, 300, 900, 1500, 1200, 600],
                    barWidth: '35%', //柱子宽度
                    // barGap: 1, //柱子之间间距
                    itemStyle: {
                        normal: {
                            color: '#2f89cf',
                            opacity: 1,
                            barBorderRadius: 5,
                        }
                    }
                }
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
function echarts_2() {
    function echarts_2() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart2'));
       option = {
  //  backgroundColor: '#00265f',
    tooltip: {
        trigger: 'axis',
        axisPointer: { type: 'shadow'}
    },
    grid: {
        left: '0%',
        top:'10px',
        right: '0%',
        bottom: '4%',
       containLabel: true
    },
    xAxis: [{
        type: 'category',
              data: ['浙江', '上海', '江苏', '广东', '北京', '深圳', '安徽'],
        axisLine: {
            show: true,
         lineStyle: {
                color: "rgba(255,255,255,.1)",
                width: 1,
                type: "solid"
        option = {
            //  backgroundColor: '#00265f',
            tooltip: {
                trigger: 'axis',
                axisPointer: {type: 'shadow'}
            },
        },
        axisTick: {
            show: false,
        },
        axisLabel:  {
                interval: 0,
               // rotate:50,
                show: true,
                splitNumber: 15,
                textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize: '12',
            grid: {
                left: '0%',
                top: '10px',
                right: '0%',
                bottom: '4%',
                containLabel: true
            },
            xAxis: [{
                type: 'category',
                data: ['浙江', '上海', '江苏', '广东', '北京', '深圳', '安徽'],
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.1)",
                        width: 1,
                        type: "solid"
                    },
                },
            },
    }],
    yAxis: [{
        type: 'value',
        axisLabel: {
           //formatter: '{value} %'
            show:true,
             textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                axisTick: {
                    show: false,
                },
        },
        axisTick: {
            show: false,
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: "rgba(255,255,255,.1    )",
                width: 1,
                type: "solid"
            },
        },
        splitLine: {
            lineStyle: {
               color: "rgba(255,255,255,.1)",
            }
        }
    }],
    series: [
        {
        type: 'bar',
        data: [1500, 1200, 600, 200, 300, 300, 900],
        barWidth:'35%', //柱子宽度
       // barGap: 1, //柱子之间间距
        itemStyle: {
            normal: {
                color:'#27d08a',
                opacity: 1,
                barBorderRadius: 5,
            }
        }
    }
    ]
};
                axisLabel: {
                    interval: 0,
                    // rotate:50,
                    show: true,
                    splitNumber: 15,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
                },
            }],
            yAxis: [{
                type: 'value',
                axisLabel: {
                    //formatter: '{value} %'
                    show: true,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
                },
                axisTick: {
                    show: false,
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.1    )",
                        width: 1,
                        type: "solid"
                    },
                },
                splitLine: {
                    lineStyle: {
                        color: "rgba(255,255,255,.1)",
                    }
                }
            }],
            series: [
                {
                    type: 'bar',
                    data: [1500, 1200, 600, 200, 300, 300, 900],
                    barWidth: '35%', //柱子宽度
                    // barGap: 1, //柱子之间间距
                    itemStyle: {
                        normal: {
                            color: '#27d08a',
                            opacity: 1,
                            barBorderRadius: 5,
                        }
                    }
                }
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
function echarts_5() {
    function echarts_5() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart5'));
       option = {
  //  backgroundColor: '#00265f',
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    grid: {
        left: '0%',
        top:'10px',
        right: '0%',
        bottom: '2%',
       containLabel: true
    },
    xAxis: [{
        type: 'category',
              data: ['浙江', '上海', '江苏', '广东', '北京', '深圳', '安徽', '四川'],
        axisLine: {
            show: true,
         lineStyle: {
                color: "rgba(255,255,255,.1)",
                width: 1,
                type: "solid"
        option = {
            //  backgroundColor: '#00265f',
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                }
            },
        },
        axisTick: {
            show: false,
        },
        axisLabel:  {
                interval: 0,
               // rotate:50,
                show: true,
                splitNumber: 15,
                textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize: '12',
            grid: {
                left: '0%',
                top: '10px',
                right: '0%',
                bottom: '2%',
                containLabel: true
            },
            xAxis: [{
                type: 'category',
                data: ['浙江', '上海', '江苏', '广东', '北京', '深圳', '安徽', '四川'],
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.1)",
                        width: 1,
                        type: "solid"
                    },
                },
            },
    }],
    yAxis: [{
        type: 'value',
        axisLabel: {
           //formatter: '{value} %'
            show:true,
             textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                axisTick: {
                    show: false,
                },
        },
        axisTick: {
            show: false,
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: "rgba(255,255,255,.1    )",
                width: 1,
                type: "solid"
            },
        },
        splitLine: {
            lineStyle: {
               color: "rgba(255,255,255,.1)",
                axisLabel: {
                    interval: 0,
                    // rotate:50,
                    show: true,
                    splitNumber: 15,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
                },
            }],
            yAxis: [{
                type: 'value',
                axisLabel: {
                    //formatter: '{value} %'
                    show: true,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
                },
                axisTick: {
                    show: false,
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.1    )",
                        width: 1,
                        type: "solid"
                    },
                },
                splitLine: {
                    lineStyle: {
                        color: "rgba(255,255,255,.1)",
                    }
                }
            }],
            series: [{
                type: 'bar',
                data: [2, 3, 3, 9, 15, 12, 6, 4, 6, 7, 4, 10],
                barWidth: '35%', //柱子宽度
                // barGap: 1, //柱子之间间距
                itemStyle: {
                    normal: {
                        color: '#2f89cf',
                        opacity: 1,
                        barBorderRadius: 5,
                    }
                }
            }
        }
    }],
    series: [{
        type: 'bar',
        data: [2, 3, 3, 9, 15, 12, 6, 4, 6, 7, 4, 10],
        barWidth:'35%', //柱子宽度
       // barGap: 1, //柱子之间间距
        itemStyle: {
            normal: {
                color:'#2f89cf',
                opacity: 1,
                barBorderRadius: 5,
            }
        }
    }
    ]
};
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
function echarts_4() {
    function echarts_4() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart4'));
    option = {
        tooltip: {
        trigger: 'axis',
        axisPointer: {
            lineStyle: {
                color: '#dddc6b'
            }
        }
    },
            legend: {
    top:'0%',
        data:['安卓','IOS'],
                textStyle: {
           color: 'rgba(255,255,255,.5)',
            fontSize:'12',
        }
    },
    grid: {
        left: '10',
        top: '30',
        right: '10',
        bottom: '10',
        containLabel: true
    },
    xAxis: [{
        type: 'category',
        boundaryGap: false,
axisLabel:  {
                textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize:12,
                },
        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    lineStyle: {
                        color: '#dddc6b'
                    }
                }
            },
        axisLine: {
            lineStyle: {
                color: 'rgba(255,255,255,.2)'
            }
        },
        data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
    }, {
        axisPointer: {show: false},
        axisLine: {  show: false},
        position: 'bottom',
        offset: 20,
    }],
    yAxis: [{
        type: 'value',
        axisTick: {show: false},
        axisLine: {
            lineStyle: {
                color: 'rgba(255,255,255,.1)'
            }
        },
       axisLabel:  {
            legend: {
                top: '0%',
                data: ['规划量'],
                textStyle: {
                     color: "rgba(255,255,255,.6)",
                    fontSize:12,
                },
                    color: 'rgba(255,255,255,.5)',
                    fontSize: '12',
                }
            },
            grid: {
                left: '10',
                top: '30',
                right: '10',
                bottom: '10',
                containLabel: true
            },
        splitLine: {
            lineStyle: {
                 color: 'rgba(255,255,255,.1)'
            }
        }
    }],
    series: [
        {
        name: '安卓',
        type: 'line',
         smooth: true,
        symbol: 'circle',
        symbolSize: 5,
        showSymbol: false,
        lineStyle: {
            normal: {
                color: '#0184d5',
                width: 2
            }
        },
        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(1, 132, 213, 0.4)'
                }, {
                    offset: 0.8,
                    color: 'rgba(1, 132, 213, 0.1)'
                }], false),
                shadowColor: 'rgba(0, 0, 0, 0.1)',
            }
        },
            itemStyle: {
            normal: {
                color: '#0184d5',
                borderColor: 'rgba(221, 220, 107, .1)',
                borderWidth: 12
            }
        },
        data: [3, 4, 3, 4, 3, 4, 3, 6, 2, 4, 2, 4,3, 4, 3, 4, 3, 4, 3, 6, 2, 4, 2, 4]
            xAxis: [{
                type: 'category',
                boundaryGap: false,
                axisLabel: {
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: 12,
                    },
                },
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.2)'
                    }
    },
{
        name: 'IOS',
        type: 'line',
        smooth: true,
        symbol: 'circle',
        symbolSize: 5,
        showSymbol: false,
        lineStyle: {
            normal: {
                color: '#00d887',
                width: 2
            }
        },
        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(0, 216, 135, 0.4)'
                }, {
                    offset: 0.8,
                    color: 'rgba(0, 216, 135, 0.1)'
                }], false),
                shadowColor: 'rgba(0, 0, 0, 0.1)',
            }
        },
            itemStyle: {
            normal: {
                color: '#00d887',
                borderColor: 'rgba(221, 220, 107, .1)',
                borderWidth: 12
            }
        },
        data: [5, 3, 5, 6, 1, 5, 3, 5, 6, 4, 6, 4, 8, 3, 5, 6, 1, 5, 3, 7, 2, 5, 1, 4]
                },
    },
         ]
                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
};
            }, {
                axisPointer: {show: false},
                axisLine: {show: false},
                position: 'bottom',
                offset: 20,
            }],
            yAxis: [{
                type: 'value',
                axisTick: {show: false},
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }
                },
                axisLabel: {
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: 12,
                    },
                },
                splitLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }
                }
            }],
            series: [
                {
                    name: '规划量',
                    type: 'line',
                    smooth: true,
                    symbol: 'circle',
                    symbolSize: 5,
                    showSymbol: false,
                    lineStyle: {
                        normal: {
                            color: '#00d887',
                            width: 2
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: 'rgba(0, 216, 135, 0.4)'
                            }, {
                                offset: 0.8,
                                color: 'rgba(0, 216, 135, 0.1)'
                            }], false),
                            shadowColor: 'rgba(0, 0, 0, 0.1)',
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: '#00d887',
                            borderColor: 'rgba(221, 220, 107, .1)',
                            borderWidth: 12
                        }
                    },
                    data: [1,2,3,4,5,6,7,8,9,10,11,12]
                },
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
function echarts_6() {
    function echarts_6() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart6'));
        var dataStyle = {
    normal: {
        label: {
            show: false
        },
        labelLine: {
            show: false
        },
        //shadowBlur: 40,
        //shadowColor: 'rgba(40, 40, 40, 1)',
    }
};
var placeHolderStyle = {
    normal: {
        color: 'rgba(255,255,255,.05)',
        label: {show: false,},
        labelLine: {show: false}
    },
    emphasis: {
        color: 'rgba(0,0,0,0)'
    }
};
option = {
    color: ['#0f63d6', '#0f78d6', '#0f8cd6', '#0fa0d6', '#0fb4d6'],
    tooltip: {
        show: true,
        formatter: "{a} : {c} "
    },
    legend: {
        itemWidth: 10,
        itemHeight: 10,
        itemGap: 12,
        bottom: '3%',
        data: ['浙江', '上海', '广东', '北京', '深圳'],
        textStyle: {
            normal: {
                label: {
                    show: false
                },
                labelLine: {
                    show: false
                },
                //shadowBlur: 40,
                //shadowColor: 'rgba(40, 40, 40, 1)',
            }
        };
        var placeHolderStyle = {
            normal: {
                color: 'rgba(255,255,255,.05)',
                label: {show: false,},
                labelLine: {show: false}
            },
            emphasis: {
                color: 'rgba(0,0,0,0)'
            }
        };
        option = {
            color: ['#0f63d6', '#0f78d6', '#0f8cd6', '#0fa0d6', '#0fb4d6'],
            tooltip: {
                show: true,
                formatter: "{a} : {c} "
            },
            legend: {
                itemWidth: 10,
                itemHeight: 10,
                itemGap: 12,
                bottom: '3%',
                data: ['浙江', '上海', '广东', '北京', '深圳'],
                textStyle: {
                    color: 'rgba(255,255,255,.6)',
                }
    },
    series: [
        {
        name: '浙江',
        type: 'pie',
        clockWise: false,
        center: ['50%', '42%'],
        radius: ['59%', '70%'],
        itemStyle: dataStyle,
        hoverAnimation: false,
        data: [{
            value: 80,
            name: '01'
        }, {
            value: 20,
            name: 'invisible',
            tooltip: {show: false},
            itemStyle: placeHolderStyle
        }]
    },
        {
        name: '上海',
        type: 'pie',
        clockWise: false,
        center: ['50%', '42%'],
        radius: ['49%', '60%'],
        itemStyle: dataStyle,
        hoverAnimation: false,
        data: [{
            value: 70,
            name: '02'
        }, {
            value: 30,
            name: 'invisible',
            tooltip: {show: false},
            itemStyle: placeHolderStyle
        }]
    },
        {
        name: '广东',
        type: 'pie',
        clockWise: false,
        hoverAnimation: false,
        center: ['50%', '42%'],
        radius: ['39%', '50%'],
        itemStyle: dataStyle,
        data: [{
            value: 65,
            name: '03'
        }, {
            value: 35,
            name: 'invisible',
            tooltip: {show: false},
            itemStyle: placeHolderStyle
        }]
    },
        {
        name: '北京',
        type: 'pie',
        clockWise: false,
        hoverAnimation: false,
        center: ['50%', '42%'],
        radius: ['29%', '40%'],
        itemStyle: dataStyle,
        data: [{
            value: 60,
            name: '04'
        }, {
            value: 40,
            name: 'invisible',
            tooltip: {show: false},
            itemStyle: placeHolderStyle
        }]
    },
        {
        name: '深圳',
        type: 'pie',
        clockWise: false,
        hoverAnimation: false,
        center: ['50%', '42%'],
        radius: ['20%', '30%'],
        itemStyle: dataStyle,
        data: [{
            value: 50,
            name: '05'
        }, {
            value: 50,
            name: 'invisible',
            tooltip: {show: false},
            itemStyle: placeHolderStyle
        }]
    }, ]
};
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
function echarts_31() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb1'));
option = {
        title: [{
        text: '年龄分布',
        left: 'center',
        textStyle: {
            color: '#fff',
            fontSize:'16'
        }
            },
    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
position:function(p){   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
top:'70%',
       itemWidth: 10,
        itemHeight: 10,
        data:['0岁以下','20-29岁','30-39岁','40-49岁','50岁以上'],
                textStyle: {
            color: 'rgba(255,255,255,.5)',
            fontSize:'12',
        }
    },
    series: [
        {
            name:'年龄分布',
            type:'pie',
            center: ['50%', '42%'],
            radius: ['40%', '60%'],
                  color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],
            label: {show:false},
            labelLine: {show:false},
            data:[
                {value:1, name:'0岁以下'},
                {value:4, name:'20-29岁'},
                {value:2, name:'30-39岁'},
                {value:2, name:'40-49岁'},
                {value:1, name:'50岁以上'},
            ]
        }
    ]
};
            series: [
                {
                    name: '浙江',
                    type: 'pie',
                    clockWise: false,
                    center: ['50%', '42%'],
                    radius: ['59%', '70%'],
                    itemStyle: dataStyle,
                    hoverAnimation: false,
                    data: [{
                        value: 80,
                        name: '01'
                    }, {
                        value: 20,
                        name: 'invisible',
                        tooltip: {show: false},
                        itemStyle: placeHolderStyle
                    }]
                },
                {
                    name: '上海',
                    type: 'pie',
                    clockWise: false,
                    center: ['50%', '42%'],
                    radius: ['49%', '60%'],
                    itemStyle: dataStyle,
                    hoverAnimation: false,
                    data: [{
                        value: 70,
                        name: '02'
                    }, {
                        value: 30,
                        name: 'invisible',
                        tooltip: {show: false},
                        itemStyle: placeHolderStyle
                    }]
                },
                {
                    name: '广东',
                    type: 'pie',
                    clockWise: false,
                    hoverAnimation: false,
                    center: ['50%', '42%'],
                    radius: ['39%', '50%'],
                    itemStyle: dataStyle,
                    data: [{
                        value: 65,
                        name: '03'
                    }, {
                        value: 35,
                        name: 'invisible',
                        tooltip: {show: false},
                        itemStyle: placeHolderStyle
                    }]
                },
                {
                    name: '北京',
                    type: 'pie',
                    clockWise: false,
                    hoverAnimation: false,
                    center: ['50%', '42%'],
                    radius: ['29%', '40%'],
                    itemStyle: dataStyle,
                    data: [{
                        value: 60,
                        name: '04'
                    }, {
                        value: 40,
                        name: 'invisible',
                        tooltip: {show: false},
                        itemStyle: placeHolderStyle
                    }]
                },
                {
                    name: '深圳',
                    type: 'pie',
                    clockWise: false,
                    hoverAnimation: false,
                    center: ['50%', '42%'],
                    radius: ['20%', '30%'],
                    itemStyle: dataStyle,
                    data: [{
                        value: 50,
                        name: '05'
                    }, {
                        value: 50,
                        name: 'invisible',
                        tooltip: {show: false},
                        itemStyle: placeHolderStyle
                    }]
                },]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
function echarts_32() {
    function echarts_31() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb1'));
        option = {
            title: [{
                text: '年龄分布',
                left: 'center',
                textStyle: {
                    color: '#fff',
                    fontSize: '16'
                }
            }],
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)",
                position: function (p) {   //其中p为当前鼠标的位置
                    return [p[0] + 10, p[1] - 10];
                }
            },
            legend: {
                top: '70%',
                itemWidth: 10,
                itemHeight: 10,
                data: ['0岁以下', '20-29岁', '30-39岁', '40-49岁', '50岁以上'],
                textStyle: {
                    color: 'rgba(255,255,255,.5)',
                    fontSize: '12',
                }
            },
            series: [
                {
                    name: '年龄分布',
                    type: 'pie',
                    center: ['50%', '42%'],
                    radius: ['40%', '60%'],
                    color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab', '#06c8ab', '#06dcab', '#06f0ab'],
                    label: {show: false},
                    labelLine: {show: false},
                    data: [
                        {value: 1, name: '0岁以下'},
                        {value: 4, name: '20-29岁'},
                        {value: 2, name: '30-39岁'},
                        {value: 2, name: '40-49岁'},
                        {value: 1, name: '50岁以上'},
                    ]
                }
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
    function echarts_32() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb2'));
option = {
        title: [{
        text: '职业分布',
        left: 'center',
        textStyle: {
            color: '#fff',
            fontSize:'16'
        }
        option = {
    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
position:function(p){   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
    top:'70%',
       itemWidth: 10,
        itemHeight: 10,
        data:['电子商务','教育','IT/互联网','金融','学生','其他'],
            title: [{
                text: '职业分布',
                left: 'center',
                textStyle: {
           color: 'rgba(255,255,255,.5)',
            fontSize:'12',
        }
    },
    series: [
        {
            name:'年龄分布',
            type:'pie',
            center: ['50%', '42%'],
            radius: ['40%', '60%'],
            color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],
            label: {show:false},
            labelLine: {show:false},
            data:[
                {value:5, name:'电子商务'},
                {value:1, name:'教育'},
                {value:6, name:'IT/互联网'},
                {value:2, name:'金融'},
                {value:1, name:'学生'},
                {value:1, name:'其他'},
                    color: '#fff',
                    fontSize: '16'
                }
            }],
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)",
                position: function (p) {   //其中p为当前鼠标的位置
                    return [p[0] + 10, p[1] - 10];
                }
            },
            legend: {
                top: '70%',
                itemWidth: 10,
                itemHeight: 10,
                data: ['电子商务', '教育', 'IT/互联网', '金融', '学生', '其他'],
                textStyle: {
                    color: 'rgba(255,255,255,.5)',
                    fontSize: '12',
                }
            },
            series: [
                {
                    name: '年龄分布',
                    type: 'pie',
                    center: ['50%', '42%'],
                    radius: ['40%', '60%'],
                    color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab', '#06c8ab', '#06dcab', '#06f0ab'],
                    label: {show: false},
                    labelLine: {show: false},
                    data: [
                        {value: 5, name: '电子商务'},
                        {value: 1, name: '教育'},
                        {value: 6, name: 'IT/互联网'},
                        {value: 2, name: '金融'},
                        {value: 1, name: '学生'},
                        {value: 1, name: '其他'},
                    ]
                }
            ]
        }
    ]
};
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
function echarts_33() {
    function echarts_33() {
        // 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb3'));
option = {
        title: [{
        text: '兴趣分布',
        left: 'center',
        textStyle: {
            color: '#fff',
            fontSize:'16'
        }
    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
position:function(p){   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
    top:'70%',
       itemWidth: 10,
        itemHeight: 10,
        data:['汽车','旅游','财经','教育','软件','其他'],
        option = {
            title: [{
                text: '兴趣分布',
                left: 'center',
                textStyle: {
            color: 'rgba(255,255,255,.5)',
            fontSize:'12',
        }
    },
    series: [
        {
            name:'兴趣分布',
            type:'pie',
            center: ['50%', '42%'],
            radius: ['40%', '60%'],
                   color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],
            label: {show:false},
            labelLine: {show:false},
            data:[
                {value:2, name:'汽车'},
                {value:3, name:'旅游'},
                {value:1, name:'财经'},
                {value:4, name:'教育'},
                {value:8, name:'软件'},
                {value:1, name:'其他'},
                    color: '#fff',
                    fontSize: '16'
                }
            }],
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)",
                position: function (p) {   //其中p为当前鼠标的位置
                    return [p[0] + 10, p[1] - 10];
                }
            },
            legend: {
                top: '70%',
                itemWidth: 10,
                itemHeight: 10,
                data: ['汽车', '旅游', '财经', '教育', '软件', '其他'],
                textStyle: {
                    color: 'rgba(255,255,255,.5)',
                    fontSize: '12',
                }
            },
            series: [
                {
                    name: '兴趣分布',
                    type: 'pie',
                    center: ['50%', '42%'],
                    radius: ['40%', '60%'],
                    color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab', '#06c8ab', '#06dcab', '#06f0ab'],
                    label: {show: false},
                    labelLine: {show: false},
                    data: [
                        {value: 2, name: '汽车'},
                        {value: 3, name: '旅游'},
                        {value: 1, name: '财经'},
                        {value: 4, name: '教育'},
                        {value: 8, name: '软件'},
                        {value: 1, name: '其他'},
                    ]
                }
            ]
        }
    ]
};
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
})
src/main/webapp/views/BI/index.html
@@ -23,8 +23,9 @@
    });
</script>
<script type="text/javascript" src="../../static/js/echarts/echarts.min.js"></script>
<script language="JavaScript" src="../../static/js/BI/js.js"></script>
<!--<script language="JavaScript" src="../../static/js/BI/js.js"></script>-->
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
<body>
<div class="canvas" style="opacity: .2">
    <iframe frameborder="0" src="./bg-index.html" style="width: 100%; height: 100%"></iframe>
@@ -61,94 +62,42 @@
                <div class="swiper-head-item">审核员:梁昌民</div>
                <div class="swiper-head-item">待审核项目</div>
            </div>
            <div class="swiper">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
            <div style="display: flex;height: 81%">
                <!--业务员滚动-->
                <div style="flex: 1;">
                    <div id="swiper1" class="swiper" style="height: 100%;">
                        <div id="box1" class="swiper-wrapper">
                            <div class="swiper-slide">
                                <div class="swiper-item" style="">
                                    <div class="swiper-item-item">${k.userId$}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
                            </div>
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
                            </div>
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
                            </div>
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
                            </div>
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
                            </div>
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">张双龙</div>
                            <div class="swiper-item-item">1</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">20</span>
                            </div>
                        </div>
                    </div>
                </div>
                <!--中间区域-->
                <div style="flex: 1;" ></div>
                <!--<div></div>-->
                <!--待审核项目总数-->
                <div style="flex: 1;" id="innder">3</div>
            </div>
            <div class="boxfoot"></div>
        </div>
        <div class="boxall" style="width: 49.7%;height: 3.2rem">
            <div class="alltitle">待规划项目</div>
            <div class="swiper-head">
                <div class="swiper-head-item">规划员</div>
                <div class="swiper-head-item" id="planId">规划员</div>
                <div class="swiper-head-item">规划中业务员</div>
                <div class="swiper-head-item">待规划总数</div>
            </div>
            <div class="swiper">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <div class="swiper-item">
                            <div class="swiper-item-item">史喜超</div>
                            <div class="swiper-item-item">张卢,张双龙,刘青</div>
                            <div class="swiper-item-item">
                                <span class="swiper-item-lable">5</span>
                            </div>
                        </div>
                    </div>
            <div id="swiper2" class="swiper">
                <div id="box2" class="swiper-wrapper">
                </div>
            </div>
            <div class="boxfoot"></div>
@@ -166,38 +115,382 @@
    </div>
</div>
<div class="back"></div>
<script type="text/javascript" src="../../static/js/BI/china.js"></script>
<!--<script type="text/javascript" src="../../static/js/BI/area_echarts.js"></script>-->
<script src="../../static/swiper/swiper-bundle.min.js"></script>
<script>
    var mySwiper = new Swiper('.swiper', {
        direction: 'vertical',
        grabCursor: true,
        loop: true,
        slidesPerView: 5,
        slidesPerGroup: 1,
        loopedSlides: 5,
        speed: 1000,
        autoplay: {
            delay: 3000,//1秒切换一次
        },
    })
    setTimeout(()=>{
        getPending()
    },1000)
    let getPending = function() {
        getPendingApproval()
        getPendingUser()
        getAllPlan()
        getSumyear()
    },0)
    /*
    *  待审核项目
    * */
    let getPendingApproval = function() {
        $.ajax({
            url: baseUrl + "/pending/approval/auth",
            headers: {'token': localStorage.getItem('token')},
            method: 'GET',
            success(res){
                console.log(res)
                for(let k in res.data) {
                let newList = '', count = 0;
                for (let k of res.data) {
                    let list = `<div class="swiper-slide">
                                    <div class="swiper-item" >
                                        <div class="swiper-item-item">${k.userId$}</div>
                                    </div>
                                </div>`
                    newList = newList + list
                    count = count + k.count
                }
                $("#box1").html(newList)
                $("#innder").html(count)
                runder()
            }
        })
    }
    /*
    *   待规划项目
    * */
    let getPendingUser = function() {
        $.ajax({
            url: baseUrl + "/pending/user/approval/auth",
            headers: {'token': localStorage.getItem('token')},
            method: 'GET',
            success(res){
                //console.log(res)
                let newList = ''
                let len = res.data.length
                for (let k of res.data) {
                    let list = `<div class="swiper-slide">
                                    <div class="swiper-item" style="border-bottom: 1px solid #dedede">
                                        <div class="swiper-item-item">${k.user}</div>
                                        <div class="swiper-item-item">${k.value}</div>
                                        <div class="swiper-item-item">
                                            <span class="swiper-item-lable">${k.anfme}</span>
                                        </div>
                                    </div>
                                </div>`
                    newList = newList + list
                }
                $("#box2").html(newList)
                $("#planId").html(`规划员(${len})人`)
                runder2()
            }
        })
    }
    function runder() {
        var mySwiper = new Swiper('#swiper1', {
            direction: 'vertical',
            grabCursor: true,
            loop: true,
            slidesPerView: 5,
            slidesPerGroup: 1,
            loopedSlides: 5,
            speed: 1000,
            autoplay: {
                delay: 3000,//1秒切换一次
            },
        })
    }
    function runder2() {
        var mySwiper = new Swiper('#swiper2', {
            direction: 'vertical',
            grabCursor: true,
            loop: true,
            slidesPerView: 5,
            slidesPerGroup: 1,
            loopedSlides: 5,
            speed: 1000,
            autoplay: {
                delay: 3000,//1秒切换一次
            },
        })
    }
    let getAllPlan = function() {
        $.ajax({
            url: baseUrl + "/pending/sum/auth",
            headers: {'token': localStorage.getItem('token')},
            method: 'GET',
            success(res){
                let monthData = []
                let flag = false
                for (let i = 1; i <= 12; i++) {
                    let data = null
                    for (let k of res.data) {
                        if (k.month == i) {
                            data = k.count
                            flag = true
                            break
                        } else {
                            flag = false
                        }
                    }
                    if (flag) {
                        monthData.push(data)
                    } else {
                        monthData.push(0)
                    }
                }
                option.series[0].data = monthData
                myChart.setOption(option);
                myChart.resize();
            }
        })
    }
    var myChart = echarts.init(document.getElementById('echart4'));
    option = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                lineStyle: {
                    color: '#dddc6b'
                }
            }
        },
        legend: {
            top: '0%',
            data: ['规划量'],
            textStyle: {
                color: 'rgba(255,255,255,.5)',
                fontSize: '12',
            }
        },
        grid: {
            left: '10',
            top: '30',
            right: '10',
            bottom: '10',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: false,
            axisLabel: {
                textStyle: {
                    color: "rgba(255,255,255,.6)",
                    fontSize: 12,
                },
            },
            axisLine: {
                lineStyle: {
                    color: 'rgba(255,255,255,.2)'
                }
            },
            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
        }, {
            axisPointer: {show: false},
            axisLine: {show: false},
            position: 'bottom',
            offset: 20,
        }],
        yAxis: [{
            type: 'value',
            axisTick: {show: false},
            axisLine: {
                lineStyle: {
                    color: 'rgba(255,255,255,.1)'
                }
            },
            axisLabel: {
                textStyle: {
                    color: "rgba(255,255,255,.6)",
                    fontSize: 12,
                },
            },
            splitLine: {
                lineStyle: {
                    color: 'rgba(255,255,255,.1)'
                }
            }
        }],
        series: [
            {
                name: '规划量',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                //showSymbol: false,
                label: {
                    show: true,
                    position: 'top'
                },
                lineStyle: {
                    normal: {
                        color: '#00d887',
                        width: 2
                    }
                },
                areaStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(0, 216, 135, 0.4)'
                        }, {
                            offset: 0.8,
                            color: 'rgba(0, 216, 135, 0.1)'
                        }], false),
                        shadowColor: 'rgba(0, 0, 0, 0.1)',
                    }
                },
                itemStyle: {
                    normal: {
                        color: '#00d887',
                        borderColor: 'rgba(221, 220, 107, .1)',
                        borderWidth: 12
                    }
                },
                data: [1,2,3,4,5,6,7,8,9,10,11,12]
            },
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    window.addEventListener("resize", function () {
        myChart.resize();
    });
    let getSumyear = function() {
        $.ajax({
            url: baseUrl + "/user/sumyear/auth",
            headers: {'token': localStorage.getItem('token')},
            method: 'GET',
            success(res){
                console.log(res)
                let user = []
                let count = []
                for (let k of res.data) {
                    user.push(k.user.username)
                    for (let n of k.obj) {
                        if(n.year == 2023) {
                            count.push(n.count)
                        }
                    }
                }
                option2.xAxis[0].data = user
                option2.series[0].data = count
                myChart2.setOption(option2);
                myChart2.resize();
            }
        })
    }
    var myChart2 = echarts.init(document.getElementById('echart1'));
    option2 = {
        //  backgroundColor: '#00265f',
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            left: '0%',
            top: '10px',
            right: '0%',
            bottom: '4%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
            axisLine: {
                show: true,
                lineStyle: {
                    color: "rgba(255,255,255,.1)",
                    width: 1,
                    type: "solid"
                },
            },
            axisTick: {
                show: false,
            },
            axisLabel: {
                interval: 0,
                // rotate:50,
                show: true,
                splitNumber: 15,
                textStyle: {
                    color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                },
            },
        }],
        yAxis: [{
            type: 'value',
            axisLabel: {
                //formatter: '{value} %'
                show: true,
                textStyle: {
                    color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                },
            },
            axisTick: {
                show: false,
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: "rgba(255,255,255,.1    )",
                    width: 1,
                    type: "solid"
                },
            },
            splitLine: {
                lineStyle: {
                    color: "rgba(255,255,255,.1)",
                }
            }
        }],
        series: [
            {
                type: 'bar',
                data: [200, 300, 300, 900, 1500, 1200, 600],
                barWidth: '35%', //柱子宽度
                // barGap: 1, //柱子之间间距
                itemStyle: {
                    normal: {
                        color: '#2f89cf',
                        opacity: 1,
                        barBorderRadius: 5,
                    }
                },
                label: {
                    show: true,
                    position: 'inside'
                },
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    window.addEventListener("resize", function () {
        myChart2.resize();
    });
</script>
</body>
</html>