保安监管系统-验收版本
zhengpz
2021-12-01 77b0b0b6e5306c5cbdf4c55f7d310a7e869423bd
枪支定位接口
2 files modified
42 ■■■■■ changed files
src/api/index/index.js 8 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 34 ●●●●● patch | view | raw | blame | history
src/api/index/index.js
@@ -251,3 +251,11 @@
    params: param
  })
}
// 获取枪支定位数据
export const getGunPosition = () => {
  return request({
    url: '/api/gun/getGunList',
    method: 'get',
  })
}
src/views/home/index.vue
@@ -720,7 +720,8 @@
  getSubstationWarnInfoPage,
  getSelectPeo,
  getSelectCar,
  getSelectGun
  getSelectGun,
  getGunPosition
} from "../../api/index/index";
import { getPeopleList, getPosition, getNewPeople } from "@/api/map/people";
@@ -847,9 +848,19 @@
            LTTD: Number(res.y)
          };
        }
        // this.getGunPosition();
        this.getTableData();
      });
    },
    // // 获取枪支定位信息
    // getGunPosition() {
    //   getGunPosition().then(res => {
    //   if(res.data.code === 200){
    //     let obj = {}
    //   }
    //     this.getTableData();
    //   });
    // },
    //点击节点
    handleNodeClick1(data) {
      this.value1 = data;
@@ -1245,25 +1256,22 @@
      });
      // 获取枪支列表
      getSelectGun({
        type: 1,
        deptId: "1460129345988239362"
      }).then(res => {
      getGunPosition().then(res => {
        var records = res.data.data;
        records.forEach(m => {
          let obj = {
            gunMode: m.gun_mode,
            personInCharge: m.person_in_charge,
            issueTime: m.issue_time,
            validTime: m.valid_time,
            issueUnit: m.issue_unit,
            cardNumber: m.card_number,
            gunMode: m.gunMode,
            personInCharge: m.personInCharge,
            issueTime: m.issueTime,
            validTime: m.validTime,
            issueUnit: m.issueUnit,
            cardNumber: m.cardNumber,
            id: m.id
          };
          this.mapData[3]["geoData"].push([
            m.id,
            Number(this.carGps.LGTD),
            Number(this.carGps.LTTD)
            Number(m.jd),
            Number(m.wd)
          ]);
          this.mapData[3]["table"].push(obj);
        });