<repo_name>Dayong99/webgd-cloud<file_sep>/src/icons.js
// src/icons.js

// export what you need
export {
  default as SmileOutline
} from '@ant-design/icons/lib/outline/SmileOutline';
export {
  default as MehOutline
} from '@ant-design/icons/lib/outline/MehOutline';

// export what antd other components need
export {
  default as CloseOutline
} from '@ant-design/icons/lib/outline/CloseOutline';
// and other icons...
<file_sep>/src/store/modules/enhance.js
import Vue from 'vue'
import {getAction} from '@/api/manage'

const enhance = {
  state: {
    enhanceJs: {},
    selectOn: 0,
    menuList: JSON.parse(sessionStorage.getItem('menu')) || []
  },
  mutations: {
    ADD_TABLE_ENHANCE: (state, record) => {
      if (!state.enhanceJs) {
        let obj = {}
        let arr = []
        arr.push({...record})
        obj[record.code] = arr
        state.enhanceJs = obj
      } else {
        if (!state.enhanceJs[record.code]) {
          let arr = []
          arr.push({...record})
          state.enhanceJs[record.code] = arr
        }
        state.enhanceJs[record.code].push({...record})
      }
      let arr = state.enhanceJs[record.code]
      while (arr.length > 16) {
        arr.shift()
      }
      Vue.ls.set('enhance_' + record['code'], arr)
    },
    dsHeadIndex: (state, idx) => {
      state.selectOn = idx
    },
    getMenuList: (state, menus) => {
      state.menuList = menus
      // menus.forEach(item=>{
      //   state.menuList.push(item)
      // })
      window.sessionStorage.setItem('menu', JSON.stringify(state.menuList))
      // state.menuList = menus
    }
  },
  actions: {
    addEhanceRecord({commit}, record) {
      commit('ADD_TABLE_ENHANCE', record)
    },
    setMenuList({commit}, param) {
      return new Promise((resolve, reject) => {
        getAction("/sys/permission/queryBSPermission", param).then(response => {
          // console.log(response)
          const result = response.result
          if (result.length > 0) {
            const list = [];
            result.forEach((value, index) => {
              list.push({
                index: index,
                name: value.bigScreenName,
                url: value.bigScreenUrl
              })
            })
            commit('getMenuList', list)
            resolve(response)
          } else {
            reject(response)
          }
        }).catch(error => {
          reject(error)
        })
      })
    },
    // setHeadIndex(context,list){
    //   context.commit('getHeadIndex',list)
    // }
  }
}
export default enhance<file_sep>/src/utils/Imgaes.js
const images = {
    //背景图片
    loginBg: require('@/assets/digitalScreen-images/loginBg.png'),
    bkPng: require('@/assets/bkPng.png'),

    //头部导航栏图片
    topBoth: require('@/assets/digitalScreen-images/topBoth.png'),
    topContent: require('@/assets/digitalScreen-images/topContent.png'),
    blackLogo: require('@/assets/digitalScreen-images/blackLogo.png'),
    companyLogo: require('@/assets/digitalScreen-images/companyLogo.png'),
    leftLogo: require('@/assets/digitalScreen-images/leftLogo.png'),

    //组件标题头部
    frameTitle: require('@/assets/digitalScreen-images/frameTitle.png'),
    frameTitleOff: require('@/assets/digitalScreen-images/frameTitleOff.png'),
    frameTitleOn: require('@/assets/digitalScreen-images/frameTitleOn.png'),
    frameTitleStrip: require('@/assets/digitalScreen-images/frameTitleStrip.png'),
    frameTitleLog: require('@/assets/digitalScreen-images/frameTitleLog.png'),
    big_Title_bg: require('@/assets/digitalScreen-images/big_tittle.png'),

    //质量安全弹窗
    closeWindow: require('@/assets/digitalScreen-images/closeWindow.png'),
    qualityPopup: require('@/assets/digitalScreen-images/qualityPopup.png'),
    popupBackground: require('@/assets/digitalScreen-images/popupBackground.png'),

    //梁场
    bridgeIconOne: require('@/assets/digitalScreen-images/bridgeIcon1.png'),
    bridgeIconTwo: require('@/assets/digitalScreen-images/bridgeIcon2.png'),
    bridgeIconThree: require('@/assets/digitalScreen-images/bridgeIcon3.png'),
    bridgeIconFour: require('@/assets/digitalScreen-images/bridgeIcon4.png'),

    //测试图片
    csTitle: require('@/assets/digitalScreen-images/cs-title.jpg'),
}

export default images<file_sep>/src/views/digitalScreen/girderFabricationYard/js/echartsSecondaryEncapsulation.js
import echarts from "@/utils/echarts";

export default {
  /**
   * 二次封装饼图
   * @returns *
   */
  //左饼图
  getLeftOption(data) {
    let option = echarts.getDefaultPieOption();

    option.tooltip.trigger = "item";
    option.legend = {
      type: "plain",
      // bottom: 20,
      // itemGap: 20,
      width: "auto",
      textStyle: {
        color: "#ffffff",
        fontSize: "14px",
      },
    };
    option.series = {
      name: "总人数",
      type: "pie",
      center: ["50%", "74%"],
      // radius: ["50%", "70%"],
      // avoidLabelOverlap: false,
      bottom: "20%",
      label: {
        show: false,
        position: "center",
      },
      emphasis: {
        show: true,
      },
      labelLine: {
        show: true,
      },
      data: data
    };

    return option;
  },
  //右饼图
  getRightOption(data) {
    let option = echarts.getDefaultPieOption();

    option.tooltip.trigger = "item";
    option.legend = {
      show: false,
      type: "plain",
      // bottom: 20,
      // itemGap: 20,
      width: "auto",
      textStyle: {
        color: "#ffffff",
        fontSize: "14px",
      },
    };
    option.series = [{
      name: "总人数",
      type: "pie",
      center: ["50%", "50%"],
      radius: ["35%", "80%"],
      // avoidLabelOverlap: false,
      bottom: "20%",
      label: {
        show: true,
        normal: {
          formatter: '{b}:{d}%',
          textStyle: {
            fontSize: 12,
            color:'#fff'
          }
        }
      },
      emphasis: {
        show: true,
      },
      labelLine: {
        show: true,
      },
      data: data
    }];

    return option;
  },
}<file_sep>/src/utils/echarts.js
//--------------------------------------
// Copyright (c) 2021.
// 作者：梁士博(Mr.liang)
// 日期：2021-02-04 15:27:57
// Copyright (c) 2021.
//--------------------------------------

import Vue from 'vue'
import 'echarts/lib/component/legendScroll'

export default {
    /**
     * 获取竖柱状图默认设置
     * @returns *
     */
    getDefaultBarColumnOption() {
        return {
            title: {
                x: 'left',
                show: true,//显示策略，默认值true,可选为：true（显示） | false（隐藏）
                text: '',//主标题文本，'\n'指定换行
                textStyle: {//主标题文本样式
                    color: '#555',
                    fontSize: 16,
                },
            },
            color: ['#00c8ff'],
            toolbox: {
                orient: 'horizontal',
                y: 'top',
                featureTitle: {
                    mark: false,
                }
            },
            tooltip: {
                showDelay: 20,
                hideDelay: 100,
                transitionDurantion: .3,
                backgroundColor: 'rgba(0,0,0,.3)',
                borderRadius: 4,
                borderWidth: 0,
                trigger: 'axis',
                textStyle: {//主标题文本样式
                    color: '#fff',
                    fontSize: 10,
                },
                axisPointer: {
                    type: 'line',         // 默认为直线，可选为：'line' | 'shadow'
                    lineStyle: {          // 直线指示器样式设置
                        color: 'rgba(0,0,0,0)',
                        width: 0,
                        type: 'solid'
                    },
                    shadowStyle: {              // 阴影指示器样式设置
                        width: 0,         // 阴影大小
                        color: 'rgba(0,0,0,0.3)'  // 阴影颜色
                    },
                },
            },
            grid: {
                bottom: '4%',
                left: '25%',
                containLabel: false
            },
            categoryAxis: {
                boundaryGap: false,     // 类目起始和结束两端空白策略
                axisLine: {            // 坐标轴线
                    show: false,         // 默认显示，属性show控制显示与否
                    lineStyle: {        // 属性lineStyle控制线条样式
                        color: '#48b',
                        width: 2,
                        type: 'solid'
                    }
                },
                axisTick: {            // 坐标轴小标记
                    show: false,       // 属性show控制显示与否，默认不显示
                    interval: 'auto',
                    // onGap: null,
                    inside: false,        // 控制小标记是否在grid里
                    length: 5,         // 属性length控制线长
                    lineStyle: {       // 属性lineStyle控制线条样式
                        color: '#333',
                        width: 1
                    }
                },
                axisLabel: {           // 坐标轴文本标签，详见axis.axisLabel
                    show: false,
                    interval: 'auto',
                    rotate: 0,
                    margin: 8,
                    // formatter: null,
                    textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                        color: '#333'
                    }
                },
                splitArea: {                // 分隔区域
                    show: false,       // 默认不显示，属性show控制显示与否
                    // onGap: null,
                    areaStyle: {        // 属性areaStyle（详见areaStyle）控制区域样式
                    }
                }
            },
            yAxis: {
                type: "category",
                data: [],
                axisLabel: {
                    show: true,
                    textStyle: {//x轴文字样式
                        color: '#999'
                    },
                    formatter: function (value) {
                        let res = value;
                        if (res.length > 6) {
                            res = res.substring(0, 6) + "..";
                        }
                        return res;
                    }
                },
                axisLine: {//x轴线的颜色
                    show: true,
                    lineStyle: {
                        color: '#eee'
                    }
                },
                splitLine: {                // 分隔线
                    show: false,        // 默认显示，属性show控制显示与否
                },
            },
            xAxis: {
                type: "value",
                data: [],
                axisLabel: {
                    show: true,
                    textStyle: {//x轴文字样式
                        color: '#fff',
                        fontSize: 14
                    }
                },
                axisLine: {//x轴线的颜色
                    show: false,
                    lineStyle: {
                        color: '#fff'
                    }
                },
                splitLine: {                // 分隔线
                    show: false,        // 默认显示，属性show控制显示与否
                },
            },
            series: [{
                name: "查获数量",
                barWidth: 20,
                barGap: 20,
                barCategoryGap: '20%',
                type: "bar",
                itemStyle: {
                    normal: {
                        color: Vue.prototype.$echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                            //给颜色设置渐变色 前面4个参数，给第一个设置1，第四个设置0 ，就是水平渐变
                            //给第一个设置0，第四个设置1，就是垂直渐变
                            offset: 1,
                            color: 'rgba(30,181,229,.9)'
                        }, {
                            offset: 0,
                            color: 'rgba(92,203,177,.3)'
                        }]),
                    }
                },
                data: [],
            }],
            dataZoom: [//给x轴设置滚动条
                {
                    start: 100,//默认为0
                    end: 50,//默认为100
                    type: 'slider',
                    show: true,
                    yAxisIndex: [0],
                    handleSize: 10,//滑动条的 左右2个滑动条的大小
                    height: '60%',//组件高度
                    top: '20%',
                    right: '0%', //左边的距离
                    width: 14,
                    handleStyle: {
                        borderColor: "#fff",
                        borderWidth: "1",
                        shadowBlur: 2,
                        background: "#ddd",
                        shadowColor: "#ddd",
                    },
                    fillerColor: Vue.prototype.$echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                        //给颜色设置渐变色 前面4个参数，给第一个设置1，第四个设置0 ，就是水平渐变
                        //给第一个设置0，第四个设置1，就是垂直渐变
                        offset: 0,
                        color: 'rgba(30,181,229,.5)'
                    }, {
                        offset: 1,
                        color: 'rgba(92,203,177,.5'
                    }]),
                    // fillerColor: 'rgba(76,160,255,.5)',
                    backgroundColor: 'rgba(0,0,0,.15)',//两边未选中的滑动条区域的颜色
                    showDataShadow: true,//是否显示数据阴影 默认auto
                    showDetail: false,//即拖拽时候是否显示详细数值信息 默认true
                    realtime: true, //是否实时更新
                    filterMode: 'filter',
                    borderColor: 'rgba(0,0,0,0)',
                    shadowColor: 'rgba(0,0,0,.8)',
                    handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
                },
                //下面这个属性是里面拖到
                {
                    type: 'inside',
                    show: true,
                    yAxisIndex: [0],
                    start: 0,//默认为1
                    end: 50,//默认为100
                },
            ],
        }
    },
    /**
     * 获取饼图的默认设置
     */
    getDefaultPieOption() {
        return {
            tooltip: {
                show: true,
                textStyle: { //设置鼠标移动上去的文字样式
                    color: '#fff',
                    fontSize: 16
                },
                trigger: "item",
                formatter: "{b}: {c} ({d}%)",
                showDelay: 20,             // 显示延迟，添加显示延迟可以避免频繁切换，单位ms
                hideDelay: 100,            // 隐藏延迟，单位ms
                transitionDuration: 0.4,         // 动画变换时间，单位s
                backgroundColor: 'rgba(0,0,0,0.7)',  // 提示背景颜色，默认为透明度为0.7的黑色
                borderColor: '#333',            // 提示边框颜色
                borderRadius: 4,                // 提示边框圆角，单位px，默认为4
                borderWidth: 0,                // 提示边框线宽，单位px，默认为0（无边框）
                padding: 5,                   // 提示内边距，单位px，默认各方向内边距为5，
                // 接受数组分别设定上右下左边距，同css
                axisPointer: {                 // 坐标轴指示器，坐标轴触发有效
                    type: 'line',         // 默认为直线，可选为：'line' | 'shadow'
                    lineStyle: {          // 直线指示器样式设置
                        color: '#48b',
                        width: 2,
                        type: 'solid'
                    },
                    shadowStyle: {              // 阴影指示器样式设置
                        width: 'auto',         // 阴影大小
                        color: 'rgba(150,150,150,0.3)'  // 阴影颜色
                    }
                }
            },
            title: {
                x: 'left',
                show: true,//显示策略，默认值true,可选为：true（显示） | false（隐藏）
                text: '',//主标题文本，'\n'指定换行
                textStyle: {//主标题文本样式
                    color: '#555',
                    fontSize: 16,
                },
            },
            //内部图层配置
            grid: {
                // //上右下左属性等于一个相对父级的定位
                left: "0%",
                right: "0%",
                bottom: "",
                top: '0',
                containLabel: true,
            },
            color: ['#3FEEA5', '#32c5e9', '#67e0e3', '#9fe6b8', '#ffdb5c', '#ff9f7f', '#fb7293', '#e062ae', '#e690d1', '#e7bcf3', '#9d96f5', '#8378ea', '#96bfff'],//设置颜色
            legend: {//设置图例部分
                show: true,
                textStyle: { //设置图例文字的样式
                    color: '#fff',//设置颜色
                    fontSize: 12,
                },
                itemWidth: 12,
                itemHeight: 12,
                itemGap: 5,
                orient: "vertical",
                //设置图例的位置，bottom、left、left、right
                right: '0',
                top: '20',
            },
            series: [
                {
                    name: "",
                    type: "pie",
                    center: ['30%', '54%'],
                    radius: ["0%", "80%"],//控制内圈和外圈圆的大小
                    roseType: '',
                    avoidLabelOverlap: false,
                    label: {
                        show: false,
                        position: "left",
                    },
                    emphasis: {
                        label: {
                            show: false,
                            fontSize: "14",
                            fontWeight: "bold",
                        },
                    },

                    labelLine: {
                        show: true,
                    },
                    data: [],//数值
                },
            ],
        }
    },
    /**
     * 获取横柱状图的默认设置
     */
    getDefaultBarOption() {
        return {
            title: {
                x: 'left',
                show: true,//显示策略，默认值true,可选为：true（显示） | false（隐藏）
                text: '',//主标题文本，'\n'指定换行
                textStyle: {//主标题文本样式
                    color: '#555',
                    fontSize: 16,
                },
            },
            color: '#00c8ff',
            toolbox: {
                orient: 'horizontal',
                y: 'top',
                featureTitle: {
                    mark: false,
                }
            },
            tooltip: {
                showDelay: 20,
                hideDelay: 100,
                transitionDurantion: .3,
                backgroundColor: 'rgba(0,0,0,.3)',
                borderRadius: 4,
                borderWidth: 0,
                trigger: 'axis',
                textStyle: {//主标题文本样式
                    color: '#fff',
                    fontSize: 10,
                },
            },
            axisPointer: {
                type: 'line',         // 默认为直线，可选为：'line' | 'shadow'
                lineStyle: {          // 直线指示器样式设置
                    color: 'rgba(0,0,0,0)',
                    width: 0,
                    type: 'solid'
                },
                shadowStyle: {              // 阴影指示器样式设置
                    width: 0,         // 阴影大小
                    color: 'rgba(0,0,0,0.3)'  // 阴影颜色
                },
            },
            legend: {//设置图例部分
                show: false,
                textStyle: { //设置图例文字的样式
                    color: '#999',//设置颜色
                    fontSize: 12,
                },
                itemWidth: 12,
                itemHeight: 12,
                itemGap: 5,
                orient: "vertical",
                //设置图例的位置，bottom、left、left、right
                right: '0',
                top: '20',
            },
            grid: {
                bottom: '40',
                left: '36',
                top: 36,
                containLabel: false,
                right: 16
            },
            categoryAxis: {
                boundaryGap: false,     // 类目起始和结束两端空白策略
                axisLine: {            // 坐标轴线
                    show: false,         // 默认显示，属性show控制显示与否
                    lineStyle: {        // 属性lineStyle控制线条样式
                        color: '#48b',
                        width: 2,
                        type: 'solid'
                    }
                },
                axisTick: {            // 坐标轴小标记
                    show: false,       // 属性show控制显示与否，默认不显示
                    interval: 'auto',
                    // onGap: null,
                    inside: false,        // 控制小标记是否在grid里
                    length: 5,         // 属性length控制线长
                    lineStyle: {       // 属性lineStyle控制线条样式
                        color: '#333',
                        width: 1
                    }
                },
                axisLabel: {           // 坐标轴文本标签，详见axis.axisLabel
                    show: false,
                    interval: 'auto',
                    rotate: 0,
                    margin: 8,
                    // formatter: null,
                    textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                        color: '#333'
                    }
                },
                splitArea: {                // 分隔区域
                    show: false,       // 默认不显示，属性show控制显示与否
                    // onGap: null,
                    areaStyle: {        // 属性areaStyle（详见areaStyle）控制区域样式
                    }
                }
            },
            xAxis: {
                data: [],
                axisLabel: {
                    show: true,
                    textStyle: {//x轴文字样式
                        color: '#999',
                        fontSize: 14
                    }
                },
                axisLine: {//x轴线的颜色
                    show: true,
                    lineStyle: {
                        color: '#eee'
                    }
                },
                splitLine: {
                    show: false
                },
            },
            yAxis: {
                axisLabel: {
                    show: true,
                    textStyle: {//x轴文字样式
                        color: '#999',
                        fontSize: 14
                    }
                },
                axisLine: {//x轴线的颜色
                    show: true,
                    lineStyle: {
                        color: '#eee'
                    }
                },
                splitLine: { // 参考线
                    show: true,
                    color: 'block'
                },

            },
            series: [{
                name: "查获数量",
                barWidth: 20,
                barGap: 20,
                barCategoryGap: '20%',
                type: "bar",
                itemStyle: {
                    normal: {
                        color: Vue.prototype.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                            //给颜色设置渐变色 前面4个参数，给第一个设置1，第四个设置0 ，就是水平渐变
                            //给第一个设置0，第四个设置1，就是垂直渐变
                            offset: 0,
                            color: '#009cff'
                        }, {
                            offset: 1,
                            color: '#ae53e7'
                        }]),

                    }
                },
                data: [],
            }],
        }
    },
    /**
     * 获取折线图的默认设置
     */
    getDefaultLineOption() {
        return {
            title: {
                x: 'left',
                show: true,//显示策略，默认值true,可选为：true（显示） | false（隐藏）
                text: '',//主标题文本，'\n'指定换行
                textStyle: {//主标题文本样式
                    color: '#555',
                    fontSize: 16,
                },
            },
            //鼠标移动上去的信息窗口
            tooltip: { //鼠标移动上去的信息窗口
                //show:false,
                trigger: "axis",
                axisPointer: {
                    //鼠标移动到图表显示十字
                    // type: "cross",
                    //文本框框的样式
                    label: {
                        backgroundColor: "#6a7985",//背景颜色
                    },
                },
            },
            //设置图例部分
            legend: {
                show: true,
                textStyle: { //设置图例文字的样式
                    color: '#fff',
                    fontSize: 12,
                },
                orient: "horizontal",
                //设置图例的位置，bottom、left、left、right
                right: 'center',
                top: '0',
            },
            //内部图层配置
            grid: {
                // //上右下左属性等于一个相对父级的定位
                left: 16,
                right: 16,
                bottom: 20,
                containLabel: true,
            },
            //操作x轴的配置
            xAxis: [{
                type: "category",
                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
                //两边的留白
                boundaryGap: false,
                axisLabel: {
                    show: true,
                    textStyle: {//x轴文字样式
                        color: '#999'
                    }
                },
                axisLine: {//x轴线的颜色
                    lineStyle: {
                        color: '#eee'
                    },
                },
                splitLine: { // 参考线
                    show: false,
                    color: '#eee'
                },

            }],
            //操作y轴的配置
            yAxis: [{
                type: "value",
                axisLabel: {//y轴文字样式
                    show: true,
                    textStyle: {
                        color: '#999'
                    }
                },
                axisLine: {//y轴线的颜色
                    show: false,
                    lineStyle: {
                        color: '#eee'
                    },
                },
                splitLine: { // 参考线
                    show: true,
                    color: 'block'
                },
                data: [],

            }],
            //操作数据类型和数据的配置
            series: [{
                name: '去年',
                type: "line",
                // stack: "总量",
                areaStyle: {
                    global: false,
                    type: 'default',
                    color: Vue.prototype.$echarts.graphic.LinearGradient(0, 0, 0, 1,//变化度
                        //两种由深及浅的颜色
                        [{
                            offset: 0,
                            color: 'rgba(93,236,133,.8)'
                        }, {
                            offset: 1,
                            color: 'rgba(93,236,133,.4)'
                        }]),
                },
                symbol: 'emptyCircle',
                symbolSize: 2,//拐点大小
                // 折线弧度
                smooth: .5,
                color: ['#4dd08a'],
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                            // color:'#70c8ee',
                            type: 'solid',//dottde虚线  solid 实线
                            color: 'rgba(77,208,138,1)',// 线颜色
                        },
                        label: {
                            show: true,
                            borderColor: '',
                            borderWidth: 2
                        }
                    }
                },
                data: [],
            }]

        }
    }
}
<file_sep>/src/views/digitalScreen/qualityAndSafety/js/echartsSecondaryEncapsulation.js
import echarts from "@/utils/echarts";

export default {
  /**
   * 二次封装饼图
   * @returns *
   */
  //左饼图
  getLeftOption(data) {
    let option = echarts.getDefaultPieOption();
// option.grid = {
//       top: "55%",
//         left: "90px",
//         right: "50px",
//         bottom: "50px"
//     },
    option.tooltip.trigger = "item";
    option.legend = {
      show: false,
      type: "plain",
      // bottom: 20,
      // itemGap: 20,
      width: "auto",
      textStyle: {
        color: "#ffffff",
        fontSize: "14px",
      },
    };
    option.series = {
      name: "总人数",
      type: "pie",
      center: ["50%", "50%"],
      radius: ["35%", "80%"],
      // avoidLabelOverlap: false,
      bottom: "20%",
      label: {
        show: true,
        normal: {
          formatter: '{b}:{d}%',
          textStyle: {
            fontSize: 12,
            color: '#fff'
          }
        }
      },
      emphasis: {
        show: true,
      },
      labelLine: {
        show: true,
      },
      data: data
    };
    return option;
  },
  //中间折线图
  getMiddleOption(data, time) {
    let option = echarts.getDefaultLineOption();
      option.legend = {
        width: '800px',
        textStyle: { //设置图例文字的样式
          color: '#fff',
          fontSize: 12,
        },
      },
        option.color=[
            "rgba(255, 63, 63, 1)",
            "rgba(50, 197, 78, 1)",
            "rgba(242, 199, 97, 1)",
            "rgba(242, 153, 97, 1)",
            "rgba(0, 204, 205, 1)",
          ],
      option.xAxis = {
        // category: 'category',
        // boundaryGap: false,
        data: time,
      },
      option.yAxis = {
        type: 'value'
      },
      option.series = data
    return option
  },
  //右饼图
  getRightOption(data) {
    let option = echarts.getDefaultPieOption();

    option.tooltip.trigger = "item";
    option.legend = {
      type: "plain",
      // bottom: 20,
      // itemGap: 20,
      width: "auto",
      textStyle: {
        color: "#ffffff",
        fontSize: "14px",
      },
    };
    option.series = [{
      name: "总人数",
      type: "pie",
      center: ["50%", "74%"],
      // radius: ["50%", "70%"],
      // avoidLabelOverlap: false,
      bottom: "20%",
      label: {
        show: false,
        position: "center",
      },
      emphasis: {
        show: true,
      },
      labelLine: {
        show: true,
      },
      data: data
    }];

    return option;
  },
}<file_sep>/src/api/api.js
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
import store from '@/store'

//角色管理
const addRole = (params)=>postAction("/sys/role/add",params);
const editRole = (params)=>putAction("/sys/role/edit",params);
const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
const queryall = (params)=>getAction("/sys/role/queryall",params);

//用户管理
const addUser = (params)=>postAction("/sys/user/add",params);
const editUser = (params)=>putAction("/sys/user/edit",params);
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
const getUserList = (params)=>getAction("/sys/user/list",params);
const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
//验证用户是否存在
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
//改变密码
const changePassword = (params)=>putAction("/sys/user/changePassword",params);
//权限管理
const addPermission= (params)=>postAction("/sys/permission/add",params);
const editPermission= (params)=>putAction("/sys/permission/edit",params);
const getPermissionList = (params)=>getAction("/sys/permission/list",params);
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)

const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken");
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);

// 目录树
const documenTreeList = (params)=>getAction("/sys/archivesTree/queryTreeList?relTenantIds="+store.state.user.info.relTenantIds+"&depId="+store.state.user.info.departIds,params);
const documenByDepartId   = (params)=>deleteAction("/sys/archivesTree/delete",params);
// 保存部门id
const documencertigier   = (params)=>postAction("/sys/archivesTreeDepart/save",params);

// 获取已勾选的部门id
const documencertigierID  = (params)=>getAction("/sys/archivesTreeDepart/list",params);

// 生产记录的查询
const productionSearch  = (params)=>getAction("/beamyard/structRecord/list",params);

// 关联记录查询
const relationalrecord  = (params)=>getAction("/beamyard/structLedger/list",params);

// 梁 排序判断
const bridgesort  = (params)=>getAction("/beamyard/structStatus/sortCheck",params);

// 参建单位
const contractor = (params)=>getAction("/contractor/contractor/list",params);

// 参见单位删除

const contractordelete = (params)=>deleteAction("/contractor/contractor/delete",params);
// 隐患列表查询

const danger = (params)=>getAction("/sys/hazardType/list",params);

// 隐患类型删除
const dangerdelete  = (params)=>deleteAction("/sys/hazardType/delete",params);

// 人员管理操作

const personTreeList=(params)=>getAction('/person/person/queryPersonTree',params)
// 部门管理

const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList?relTenantIds="+store.state.user.info.relTenantIds,params);


const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree?relTenantIds="+store.state.user.info.relTenantIds,params);
const queryParentName   = (params)=>getAction("/sys/sysDepart/queryParentName",params);
const searchByKeywords   = (params)=>getAction("/sys/sysDepart/searchBy?relTenantIds="+store.state.user.info.relTenantIds,params);
const deleteByDepartId   = (params)=>deleteAction("/sys/sysDepart/delete",params);

//二级部门管理
const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params);
const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);

//日志管理
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);


// 新添加的接口
const start = (params)=>putAction("/person/person/updatePersonUserStatus",params);

// 首页请求1
 const homestart1 = (params)=>postAction("/materials/weighbridgeBill/countWeighbridgeBill",params);

//数据字典
const addDict = (params)=>postAction("/sys/dict/add",params);
const editDict = (params)=>putAction("/sys/dict/edit",params);
const treeList = (params)=>getAction("/sys/dict/treeList",params);
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);

//人员表查询
const getPersonList = (params)=>getAction("/person/person/list",params);
//特种人员表查询
const getSpecialPersonList = (params)=>getAction("/deviceMaintain/deviceSpecialists/list",params);

//设备类型管理
const getDevTypeTree = (params) => getAction("/deviceMaintain/maintainDeviceType/list",params);                   //查询
const deleteDevType = (params) => deleteAction("/deviceMaintain/maintainDeviceType/delete",params);               //删除
//设备养护-设备管理
const queryById = (params) => getAction("/deviceMaintain/maintainDevice/queryById",params);                                            //id查询设备
const queryList = (params) => getAction("/deviceMaintain/maintainDevice/list",params);                                                 //列表查询
const addDev = (params) => postAction("/deviceMaintain/maintainDevice/add",params);                               //添加
const ediDev = (params) => putAction("/deviceMaintain/maintainDevice/edit",params);                               //编辑
const deleteDev = (params) => deleteAction("/deviceMaintain/maintainDevice/delete",params);                       //删除
const deleteBatchDev = (params) => deleteAction("/deviceMaintain/maintainDevice/deleteBatch",params);             //批量删除


const queryDeviceType = (params) => getAction("/deviceManage/deviceType/list",params);                            //查询
const queryNoPageDeviceType = (params) => getAction("/deviceManage/deviceType/noPageList",params);                //无分页查询
const deviceTypeDelete = (params) => deleteAction("/deviceManage/deviceType/delete",params);                      //删除


//字典标签专用（通过code获取字典数组）
export const ajaxGetDictItems = (code, params)=>{
  if(code.indexOf('rel_tenant_ids')==-1){
    code=code+',rel_tenant_ids='+store.state.user.newValue
  }
  return getAction(`/sys/dict/getDictItems/${code}`,params);
}


//从缓存中获取字典配置
function getDictItemsFromCache(dictCode) {
  if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
    let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode];
    console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
    return dictItems;
  }
}

//系统通告
const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
//获取系统访问量
const getLoginfo = (params)=>getAction("/sys/loginfo",params);
const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
// 根据部门主键查询用户信息
const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);
// 重复校验
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",Object.assign(params,{relTenantIds:store.state.user.info.relTenantIds}));
// 加载分类字典
const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
//加载我的通告信息
const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
// 中转HTTP请求
export const transitRESTful = {
  get: (url, parameter) => getAction(getTransitURL(url), parameter),
  post: (url, parameter) => postAction(getTransitURL(url), parameter),
  put: (url, parameter) => putAction(getTransitURL(url), parameter),
  http: (url, parameter) => httpAction(getTransitURL(url), parameter),
}

export {
  start,
  addRole,
  editRole,
  checkRoleCode,
  addUser,
  editUser,
  queryUserRole,
  getUserList,
  queryall,
  frozenBatch,
  checkOnlyUser,
  changePassword,
  getPermissionList,
  addPermission,
  editPermission,
  queryTreeList,
  queryListAsync,
  queryRolePermission,
  saveRolePermission,
  queryPermissionsByUser,
  loadAllRoleIds,
  getPermissionRuleList,
  queryPermissionRule,
  queryDepartTreeList,
  queryIdTree,
  queryParentName,
  searchByKeywords,
  deleteByDepartId,
  deleteLog,
  deleteLogList,
  addDict,
  editDict,
  treeList,
  addDictItem,
  editDictItem,
  doReleaseData,
  doReovkeData,
  getLoginfo,
  getVisitInfo,
  queryUserByDepId,
  duplicateCheck,
  queryTreeListForRole,
  getSystemMenuList,
  getSystemSubmenu,
  getSystemSubmenuBatch,
  loadCategoryData,
  checkRuleByCode,
  queryDepartPermission,
  saveDepartPermission,
  queryTreeListForDeptRole,
  queryDeptRolePermission,
  saveDeptRolePermission,
  queryMyDepartTreeList,
  getUserNoticeInfo,
  getDictItemsFromCache,
  homestart1,
  documenTreeList,
  documenByDepartId,
  documencertigier,
  documencertigierID,
  productionSearch,
  relationalrecord,
  bridgesort,
  contractor,
  contractordelete,
  danger,
  dangerdelete,
  personTreeList,
  getPersonList,
  getSpecialPersonList,
  getDevTypeTree,
  deleteDevType,
  queryById,
  queryList,
  addDev,
  ediDev,
  deleteDev,
  deleteBatchDev,
  queryDeviceType,
  queryNoPageDeviceType,
  deviceTypeDelete
}



