liuyg
2021-09-03 ef32fdb91a9b5f2aa53bd499698aee2cd381616d
src/views/home/index.vue
@@ -666,12 +666,14 @@
  selectYs,
  selectJy,
  selectWg,
  punishList
  punishList,
} from "../../api/index/index";
import car from "@/assets/img/car.png";
import peo from "@/assets/img/people.png";
import gun from "@/assets/img/gun.png";
import website from "@/config/website";
export default {
  data() {
@@ -693,7 +695,7 @@
        materialNum: 0,
        punishNum: 0,
        wgNum: 0,
        ymwsNum: 0
        ymwsNum: 0,
      },
      carNum: 0,
      peoNum: 0,
@@ -703,7 +705,7 @@
        left1Echart: null,
        left2Echart: null,
        mapEchart: null,
        right3Echart: null
        right3Echart: null,
      },
      left1loading: true,
      left2loading: true,
@@ -720,7 +722,7 @@
        wz: 0,
        kqy: 0,
        nan: 0,
        nv: 0
        nv: 0,
      },
      left2EchartType: 0,
      poorPerformanceType: 3,
@@ -730,22 +732,22 @@
        total: 0,
        current: 1,
        type: "zg",
        title: "资格异常人员清单"
        title: "资格异常人员清单",
      },
      dialogTable: {
        wgTable: [],
        jyTable: [],
        ymTable: []
      }
        ymTable: [],
      },
    };
  },
  computed: {
    text() {
      return {
        id: this.number,
        val: this.textArr[this.number]
        val: this.textArr[this.number],
      };
    }
    },
  },
  methods: {
    sexFormatter(row, column) {
@@ -784,7 +786,7 @@
    // 左侧表的接口返回数据
    initEchart() {
      securityTotal().then(res => {
      securityTotal().then((res) => {
        if (res.data.code == 200) {
          let securityData = res.data.data;
          if (!this.echarts.left1Echart) {
@@ -798,10 +800,10 @@
        }
        this.left1loading = false;
      });
      seCountI({ jurisdiction: "", deptid: "" }).then(res => {
      seCountI({ jurisdiction: "", deptid: "" }).then((res) => {
        if (res.data.code == 200) {
          let data = res.data.data;
          data.forEach(item => {
          data.forEach((item) => {
            if (item.stats === "0") {
              this.leftData.zz = item.num;
            }
@@ -822,7 +824,7 @@
          this.$message.error(res.msg);
        }
      });
      selectFj().then(res => {
      selectFj().then((res) => {
        if (res.data.code === 200) {
          if (!this.echarts.right3Echart) {
            this.echarts.right3Echart = echarts.init(
@@ -846,7 +848,7 @@
        this.echarts.left2Echart.clear();
      }
      if (type === 0) {
        holderNum().then(res => {
        holderNum().then((res) => {
          if (res.data.code === 200) {
            let data = res.data.data;
            this.echarts.left2Echart = echarts.init(
@@ -859,7 +861,7 @@
          this.left2loading = false;
        });
      } else {
        seCountUg({ jurisdiction: "", deptid: "" }).then(res => {
        seCountUg({ jurisdiction: "", deptid: "" }).then((res) => {
          if (res.data.code === 200) {
            this.echarts.left2Echart = echarts.init(
              document.getElementById("left2Echart")
@@ -893,7 +895,7 @@
      this.middleloading = false;
      this.textArr = [];
      if (type === 2) {
        this.tableData.forEach(item => {
        this.tableData.forEach((item) => {
          let obj =
            "押运车辆车牌号" +
            item.carNum +
@@ -908,7 +910,7 @@
          this.textArr.push(obj);
        });
      } else if (type === 1) {
        this.tableData.forEach(item => {
        this.tableData.forEach((item) => {
          let obj =
            "押运人员" +
            item.name +
@@ -921,7 +923,7 @@
          this.textArr.push(obj);
        });
      } else if (type === 3) {
        this.tableData.forEach(item => {
        this.tableData.forEach((item) => {
          let obj =
            "枪支编号" +
            item.number +
@@ -942,21 +944,21 @@
      let middleData = {
        1: {
          table: [],
          geoData: []
          geoData: [],
        },
        2: {
          table: [],
          geoData: []
          geoData: [],
        },
        3: {
          table: [],
          geoData: []
        }
          geoData: [],
        },
      };
      getLiveLocationVoList({ type: type }).then(res => {
      getLiveLocationVoList({ type: type }).then((res) => {
        if (res.data.code === 200) {
          let allData = res.data.data;
          allData.forEach(m => {
          allData.forEach((m) => {
            let obj = {
              location: m.location,
              name: m.name,
@@ -964,7 +966,7 @@
              linkman: m.linkman,
              company: m.company,
              tel: m.tel,
              carNum: m.carNum
              carNum: m.carNum,
            };
            // let geoObj = {
@@ -973,7 +975,7 @@
            // };
            middleData[m.type]["geoData"].push([
              Number(m.longitude),
              Number(m.latitude)
              Number(m.latitude),
            ]);
            middleData[m.type]["table"].push(obj);
          });
@@ -999,38 +1001,36 @@
            zIndex: 4,
            title: "影像",
            source: new XYZ({
              url:
                "http://t3.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0" // 行政区划
            })
              url: "http://t3.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0", // 行政区划
            }),
          }),
          new Tile({
            zIndex: 5,
            title: "道路+中文注记",
            source: new XYZ({
              url:
                "http://t3.tianditu.com/DataServer?T=cta_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0" // 注记
            })
          })
              url: "http://t3.tianditu.com/DataServer?T=cta_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0", // 注记
            }),
          }),
        ],
        view: new View({
          projection: "EPSG:4326",
          center: [115.892151, 28.676493],
          zoom: 10
        })
          zoom: 10,
        }),
      });
      this.carVectorLayer = new VectorLayer({
        zIndex: 99,
        source: new VectorSource()
        source: new VectorSource(),
      });
      this.peoVectorLayer = new VectorLayer({
        zIndex: 99,
        source: new VectorSource()
        source: new VectorSource(),
      });
      this.gunVectorLayer = new VectorLayer({
        zIndex: 99,
        source: new VectorSource()
        source: new VectorSource(),
      });
      this.map.addLayer(this.carVectorLayer);
      this.map.addLayer(this.peoVectorLayer);
@@ -1040,7 +1040,7 @@
    },
    // 获取辖区列表
    getOfficeData() {
      lazyTreeJu().then(res => {
      lazyTreeJu().then((res) => {
        if (res.data.code === 200) {
          this.options1 = res.data.data;
          this.options2 = res.data.data;
@@ -1080,7 +1080,7 @@
      }
    },
    getWgTable() {
      this.dialogTable.wgTable.forEach(item => {
      this.dialogTable.wgTable.forEach((item) => {
        let czl = 0;
        if (Number(item.cznum) !== 0 && Number(item.znum) !== 0) {
          czl =
@@ -1098,7 +1098,7 @@
      this.gridData.total = this.dialogTable.wgTable.length;
    },
    getJyTable() {
      this.dialogTable.jyTable.forEach(item => {
      this.dialogTable.jyTable.forEach((item) => {
        let pql = 0;
        if (Number(item.painum) !== 0 && Number(item.znum) !== 0) {
          pql =
@@ -1126,9 +1126,9 @@
      let params = {
        current: this.gridData.current,
        size: 10,
        jurisdiction: this.value2
        jurisdiction: this.value2,
      };
      punishList(params).then(res => {
      punishList(params).then((res) => {
        if (res.data.code === 200) {
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
@@ -1166,9 +1166,9 @@
        current: this.gridData.current,
        size: 10,
        examinationType: 1,
        jurisdiction: this.value1
        jurisdiction: this.value1,
      };
      qualificationPages(params).then(res => {
      qualificationPages(params).then((res) => {
        if (res.data.code === 200) {
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
@@ -1189,9 +1189,9 @@
      let params = {
        current: this.gridData.current,
        size: 10,
        jurisdiction: this.value2
        jurisdiction: this.value2,
      };
      punishList(params).then(res => {
      punishList(params).then((res) => {
        if (res.data.code === 200) {
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
@@ -1202,7 +1202,7 @@
    },
    // 经营不善
    getMaterial() {
      selectJy({ jurisdiction: this.value2 }).then(res => {
      selectJy({ jurisdiction: this.value2 }).then((res) => {
        if (res.data.code === 200) {
          this.rightData.materialNum = res.data.data.count;
          this.dialogTable.jyTable = res.data.data.List;
@@ -1214,7 +1214,7 @@
    },
    // 有名无实
    getselectYs() {
      selectYs({ jurisdiction: this.value2 }).then(res => {
      selectYs({ jurisdiction: this.value2 }).then((res) => {
        if (res.data.code === 200) {
          this.rightData.ymwsNum = res.data.data.count;
          this.dialogTable.ymTable = res.data.data.List;
@@ -1226,7 +1226,7 @@
    },
    // 违规经营
    getselectWg() {
      selectWg({ jurisdiction: this.value2 }).then(res => {
      selectWg({ jurisdiction: this.value2 }).then((res) => {
        if (res.data.code === 200) {
          this.rightData.wgNum = res.data.data.count;
          this.dialogTable.wgTable = res.data.data.list;
@@ -1256,8 +1256,8 @@
      // this.rightData.qualification = 45;
      selectBx({
        jurisdiction: this.value1,
        type: this.poorPerformanceType
      }).then(res => {
        type: this.poorPerformanceType,
      }).then((res) => {
        if (res.data.code === 200) {
          this.rightData.poorPerformance = res.data.data[0].count;
        } else {
@@ -1267,8 +1267,8 @@
      });
      selectExtype({
        jurisdiction: this.value1,
        type: this.poorPerformanceType
      }).then(res => {
        type: this.poorPerformanceType,
      }).then((res) => {
        if (res.data.code === 200) {
          this.rightData.qualification = res.data.data[0].count;
        } else {
@@ -1305,8 +1305,9 @@
    goSystemHome() {
      // this.$router.push({ path: "/register/index" });
      this.$router.push({ path: "/securityGuardManagement/register" });
    }
      // this.$router.push({ path: "/securityGuardManagement/register" });
      this.$router.push({ path: website.fistPage.value });
    },
  },
  mounted() {
    this.initEchart();
@@ -1317,7 +1318,7 @@
    this.getTableData(0);
    // this.initMapEchart();
    this.getOfficeData();
  }
  },
};
</script>