6 files modified
1 files added
| New file |
| | |
| | | import request from "@/router/axios.js" |
| | | |
| | | /** |
| | | * 获取警员列表 |
| | | * @param {*} params |
| | | * @returns |
| | | */ |
| | | export const getPoliceList = (params, requestBaseUrl = '') => { |
| | | return request({ |
| | | url: `/policeman/policeman/all`, |
| | | method: 'get', |
| | | requestBaseUrl, |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 活动添加警车和范围 |
| | | * @param {*} carId 警车ID |
| | | * @param {*} position 坐标 |
| | | * @param {*} securityId 活动ID |
| | | * @param {*} type 范围类型 |
| | | * @returns |
| | | */ |
| | | export const addCarAndRange = (carId, position, securityId, type, requestBaseUrl = '') => { |
| | | return request({ |
| | | url: `/securityManageCar/securityManageCar/save`, |
| | | method: 'post', |
| | | requestBaseUrl, |
| | | params: { |
| | | carId, |
| | | position, |
| | | securityId, |
| | | type |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 活动添加警员 |
| | | * @param {*} policemanId 警车ID |
| | | * @param {*} position 坐标 |
| | | * @param {*} securityId 活动ID |
| | | * @param {*} deptId 部分ID |
| | | * @param {*} type 范围类型 |
| | | * @returns |
| | | */ |
| | | export const addActivityPolice = (policemanId, position, securityId, deptId, type, requestBaseUrl = '') => { |
| | | return request({ |
| | | url: `/securityManage/securityManage/save`, |
| | | method: 'post', |
| | | requestBaseUrl, |
| | | params: { |
| | | policemanId, |
| | | position, |
| | | securityId, |
| | | deptId, |
| | | type |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 获取警车信息 |
| | | * @param {*} page 页数 |
| | | * @param {*} count 每页数量 |
| | | * @returns |
| | | */ |
| | | export const getCarList = (params = {},) => { |
| | | return request({ |
| | | url: '/policecar/policecar/all', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | params: { |
| | | page, |
| | | count, |
| | | range, |
| | | requestBaseUrl, |
| | | range |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | const service = axios.create({ |
| | | // baseURL: 'http://36.14.255.242:18080/api', |
| | | baseURL: 'http://192.168.0.105:18080/api', |
| | | // baseURL: 'http://192.168.0.102:1888/api', |
| | | baseURL: 'http://192.168.0.105:8081/api', |
| | | timeout: 600000 // request timeout |
| | | }) |
| | | |
| | |
| | | (config) => { |
| | | |
| | | if (config.requestBaseUrl == 'outside') { |
| | | config.baseURL = 'http://192.168.0.102:1888/api' |
| | | // config.baseURL = 'http://192.168.0.102:1888/api' |
| | | config.baseURL = 'http://192.168.0.105:8081/api' |
| | | } |
| | | |
| | | // const token = auth.getToken() |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPoliceList, addCarAndRange, addActivityPolice } from '@/api/activity/index.js' |
| | | |
| | | let analyseLayer = null |
| | | let analysePolygon = null |
| | | let drawLayers = null |
| | |
| | | value: '选项5', |
| | | label: '北京烤鸭' |
| | | }], |
| | | policeOption: [{ |
| | | value: '选项1', |
| | | label: '何晨光' |
| | | }, { |
| | | value: '选项2', |
| | | label: '李二牛' |
| | | }, { |
| | | value: '选项3', |
| | | label: '王艳兵' |
| | | }, { |
| | | value: '选项4', |
| | | label: '宋凯飞' |
| | | }, { |
| | | value: '选项5', |
| | | label: '徐天龙' |
| | | }], |
| | | policeOption: [], |
| | | activityType: '', |
| | | policeType: '', |
| | | searchActivity: '', |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | |
| | | this.getPoliceList() |
| | | // this.addCarAndRange() |
| | | // this.addActivityPolice() |
| | | }, |
| | | mounted () { |
| | | |
| | |
| | | return list |
| | | }, |
| | | |
| | | getPoliceList () { |
| | | getPoliceList().then(res => { |
| | | console.log(res.data.data, 7777) |
| | | res.data.data.forEach((item, index) => { |
| | | this.policeOption.push({ value: `${index}`, label: `${item.name}` }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | // 活动添加警车和范围 |
| | | addCarAndRange () { |
| | | addCarAndRange('1595988751891415042', '1 2,3 4', 1, 1).then(res => { |
| | | console.log(res, 2323) |
| | | }) |
| | | }, |
| | | |
| | | // 活动添加警员 |
| | | addActivityPolice () { |
| | | addActivityPolice('1596389528611971073', '11 22,33 44', 2, 1, 2).then(res => { |
| | | console.log(res, 3333) |
| | | }) |
| | | }, |
| | | |
| | | treeCheckClick (e1, e2) { |
| | | const that = this |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | :height="currentTableHeight" |
| | | > |
| | | <el-table-column prop="name" label="名称" min-width="25%"></el-table-column> |
| | | <el-table-column prop="serialNumber" label="编号" min-width="25%"></el-table-column> |
| | | <el-table-column prop="carType" label="类型" min-width="25%"></el-table-column> |
| | | <el-table-column prop="state" label="状态" min-width="25%"> |
| | | <el-table-column prop="status" label="状态" min-width="25%"> |
| | | <template slot-scope="scope"> |
| | | <div |
| | | class="state-box" |
| | | :class="{ online: scope.row.state == '使用中' }" |
| | | ></div> |
| | | <div class="state-box" :class="{ online: scope.row.status == '1' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | <script> |
| | | import { listQuery, accurateSearch } from "@/utils/search.js" |
| | | |
| | | import carList from '@/assets/data/car.js' |
| | | import phoneList from '@/assets/data/phone.js' |
| | | import zfList from '@/assets/data/zf.js' |
| | | import dtList from '@/assets/data/dt.js' |
| | | import { getHistoricalTrack } from '@/api/police/index.js' |
| | | import { getCarList } from '@/api/police/index.js' |
| | | |
| | | let tc = null |
| | | let track = null |
| | |
| | | }], |
| | | typeValue: '1', |
| | | boxShow: true, |
| | | carListSaveDate: [], |
| | | } |
| | | }, |
| | | created () { |
| | | this.carList = carList |
| | | this.getCarList() |
| | | |
| | | this.dtList = dtList |
| | | this.phoneList = phoneList |
| | | this.zfList = zfList |
| | |
| | | }) |
| | | |
| | | window.addEventListener('resize', this.setTableHeight) |
| | | |
| | | }, |
| | | mounted () { |
| | | this.$parent.resize('400px', true) |
| | |
| | | handleCurrentChange: function (currentPage) { |
| | | this.currentPage = currentPage |
| | | }, |
| | | |
| | | getCarList () { |
| | | getCarList().then(res => { |
| | | console.log(res, 6666) |
| | | this.carListSaveDate = res.data.data |
| | | this.carList = res.data.data |
| | | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | navClick (type) { |
| | | if (!type) { type = 1 } |
| | |
| | | this.searchValue = '' |
| | | this.searchValBoxShow = false |
| | | this.searchArray = [] |
| | | this.carList = carList |
| | | this.carList = this.carListSaveDate |
| | | this.dtList = dtList |
| | | this.phoneList = phoneList |
| | | this.zfList = zfList |
| | |
| | | if (this.searchValue == '') { |
| | | this.searchValBoxShow = false |
| | | this.searchArray = [] |
| | | this.carList = carList |
| | | this.carList = this.carListSaveDate |
| | | this.dtList = dtList |
| | | this.phoneList = phoneList |
| | | this.zfList = zfList |
| | | } else { |
| | | if (this.navType == 1) { |
| | | this.searchArray = listQuery(carList, this.searchValue, 'name') |
| | | this.searchArray = listQuery(this.carListSaveDate, this.searchValue, 'name') |
| | | } else if (this.navType == 2) { |
| | | this.searchArray = listQuery(phoneList, this.searchValue, 'name') |
| | | } else if (this.navType == 3) { |
| | |
| | | searchClick () { |
| | | this.searchValBoxShow = false |
| | | if (this.navType == 1) { |
| | | this.carList = accurateSearch(carList, this.searchValue, 'name') |
| | | this.carList = accurateSearch(this.carListSaveDate, this.searchValue, 'name') |
| | | } else if (this.navType == 2) { |
| | | this.phoneList = accurateSearch(phoneList, this.searchValue, 'name') |
| | | } else if (this.navType == 3) { |
| | |
| | | this.playVideoList('flvPlayer1', `${this.monitorOption[value].flvUrl}`, 'videoElement1') |
| | | |
| | | }, |
| | | |
| | | navClick2 (value) { |
| | | this.playVideoList('flvPlayer2', `${this.monitorOption[value].flvUrl}`, 'videoElement2') |
| | | |
| | | }, |
| | | |
| | | navClick3 (value) { |
| | | this.playVideoList('flvPlayer3', `${this.monitorOption[value].flvUrl}`, 'videoElement3') |
| | | |
| | | }, |
| | | |
| | | navClick4 (value) { |
| | | this.playVideoList('flvPlayer4', `${this.monitorOption[value].flvUrl}`, 'videoElement4') |
| | | |
| | | }, |
| | | |
| | | navClick5 (value) { |
| | | this.playVideoList('flvPlayer5', `${this.monitorOption[value].flvUrl}`, 'videoElement5') |
| | | |
| | | }, |
| | | |
| | | navClick6 (value) { |
| | | this.playVideoList('flvPlayer6', `${this.monitorOption[value].flvUrl}`, 'videoElement6') |
| | | |