liuyg
2021-09-10 3109b5773bc18cb8f475d3b480326ef10032cb90
保安员查询分页bug
3 files modified
133 ■■■■ changed files
src/api/system/user.js 5 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 114 ●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/register.vue 14 ●●●● patch | view | raw | blame | history
src/api/system/user.js
@@ -13,15 +13,14 @@
    })
}
export const getListSecurity = (current, size, params, deptId) => {
export const getListSecurity = (current, size, params) => {
    return request({
        url: '/api/blade-user/page-security',
        method: 'get',
        params: {
            ...params,
            current,
            size,
            deptId,
            size
        }
    })
}
src/views/home/index.vue
@@ -699,7 +699,7 @@
  selectJy,
  selectWg,
  punishList,
  lazyTrees
  lazyTrees,
} from "../../api/index/index";
import car from "@/assets/img/car.png";
@@ -728,7 +728,7 @@
        materialNum: 0,
        punishNum: 0,
        wgNum: 0,
        ymwsNum: 0
        ymwsNum: 0,
      },
      carNum: 0,
      peoNum: 0,
@@ -738,7 +738,7 @@
        left1Echart: null,
        left2Echart: null,
        mapEchart: null,
        right3Echart: null
        right3Echart: null,
      },
      left1loading: true,
      left2loading: true,
@@ -755,7 +755,7 @@
        wz: 0,
        kqy: 0,
        nan: 0,
        nv: 0
        nv: 0,
      },
      left2EchartType: 0,
      poorPerformanceType: 3,
@@ -765,29 +765,29 @@
        total: 0,
        current: 1,
        type: "zg",
        title: "资格异常人员清单"
        title: "资格异常人员清单",
      },
      dialogTable: {
        wgTable: [],
        jyTable: [],
        ymTable: []
        ymTable: [],
      },
      props: {
        children: "children",
        label: "title",
        value: "id"
        value: "id",
      },
      node1: {}, //选中的记录
      node2: {}
      node2: {},
    };
  },
  computed: {
    text() {
      return {
        id: this.number,
        val: this.textArr[this.number]
        val: this.textArr[this.number],
      };
    }
    },
  },
  methods: {
    //点击节点
@@ -841,7 +841,7 @@
    // 左侧表的接口返回数据
    initEchart() {
      securityTotal().then(res => {
      securityTotal().then((res) => {
        if (res.data.code == 200) {
          let securityData = res.data.data;
          if (!this.echarts.left1Echart) {
@@ -855,10 +855,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;
            }
@@ -879,8 +879,8 @@
          this.$message.error(res.msg);
        }
      });
      selectFj().then(res => {
        debugger;
      selectFj().then((res) => {
        // debugger;
        if (res.data.code === 200) {
          if (!this.echarts.right3Echart) {
            this.echarts.right3Echart = echarts.init(
@@ -904,7 +904,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(
@@ -917,7 +917,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")
@@ -951,7 +951,7 @@
      this.middleloading = false;
      this.textArr = [];
      if (type === 2) {
        this.tableData.forEach(item => {
        this.tableData.forEach((item) => {
          let obj =
            "押运车辆车牌号" +
            item.carNum +
@@ -966,7 +966,7 @@
          this.textArr.push(obj);
        });
      } else if (type === 1) {
        this.tableData.forEach(item => {
        this.tableData.forEach((item) => {
          let obj =
            "押运人员" +
            item.name +
@@ -979,7 +979,7 @@
          this.textArr.push(obj);
        });
      } else if (type === 3) {
        this.tableData.forEach(item => {
        this.tableData.forEach((item) => {
          let obj =
            "枪支编号" +
            item.number +
@@ -1000,21 +1000,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,
@@ -1022,7 +1022,7 @@
              linkman: m.linkman,
              company: m.company,
              tel: m.tel,
              carNum: m.carNum
              carNum: m.carNum,
            };
            // let geoObj = {
@@ -1031,7 +1031,7 @@
            // };
            middleData[m.type]["geoData"].push([
              Number(m.longitude),
              Number(m.latitude)
              Number(m.latitude),
            ]);
            middleData[m.type]["table"].push(obj);
          });
@@ -1057,38 +1057,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);
@@ -1098,7 +1096,7 @@
    },
    // 获取辖区列表
    getOfficeData() {
      lazyTrees().then(res => {
      lazyTrees().then((res) => {
        if (res.data.code === 200) {
          this.options1 = res.data.data;
          this.options2 = res.data.data;
@@ -1140,7 +1138,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 =
@@ -1158,7 +1156,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 =
@@ -1186,9 +1184,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;
@@ -1226,9 +1224,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;
@@ -1249,9 +1247,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;
@@ -1262,7 +1260,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;
@@ -1274,7 +1272,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;
@@ -1286,7 +1284,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;
@@ -1316,8 +1314,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 {
@@ -1327,8 +1325,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 {
@@ -1367,7 +1365,7 @@
      // this.$router.push({ path: "/register/index" });
      // this.$router.push({ path: "/securityGuardManagement/register" });
      this.$router.push({ path: website.fistPage.value });
    }
    },
  },
  mounted() {
    this.initEchart();
@@ -1378,7 +1376,7 @@
    this.getTableData(0);
    // this.initMapEchart();
    this.getOfficeData();
  }
  },
};
</script>
src/views/securityGuardManagement/register.vue
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-09 09:53:49
 * @Last Modified time: 2021-09-10 16:47:56
 * menu-name 保安员注册查询
 */
<template>
@@ -876,11 +876,11 @@
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      var deptId;
      // var deptId;
      if (params.deptId) {
        deptId = params.deptId;
        this.query["deptId"] = params.deptId;
      }
      this.onLoad(this.page, params, deptId);
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
@@ -931,14 +931,14 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}, deptId) {
    onLoad(page, params = {}) {
      this.loading = true;
      params["jurisdiction"] = this.jurisdiction;
      console.log(params, 1, this.query, 2);
      getListSecurity(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query),
        deptId
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;