diff --git a/.env.development b/.env.development index c1e8f12..cdf8000 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_WS_BASE_URL ='ws://220.185.188.222:8055/api/gisWs' # VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api' # 成彬本地 -VITE_APP_BASE_URL = 'http://100.95.157.241:6061/api' +VITE_APP_BASE_URL = 'http://100.95.100.2:6061/api' # VITE_APP_BASE_URL = 'http://100.95.236.218:6061/api' # VITE_APP_BASE_URL = 'http://119.167.138.11:6061/video-service' diff --git a/src/api/device.js b/src/api/device.js index 1d007a0..ca25624 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -86,6 +86,7 @@ export const cctvExport = (data) => { return request({ url: '/pollExport/cctvExport', method: 'post', - data: data + data: data, + responseType: 'blob' }) } \ No newline at end of file diff --git a/src/components/Filter/index.vue b/src/components/Filter/index.vue index c14c529..2d68003 100644 --- a/src/components/Filter/index.vue +++ b/src/components/Filter/index.vue @@ -158,8 +158,10 @@ defineExpose({ justify-content: space-between; width: 100%; .el-form{ - width: 1060px; text-align: left; } + .buttons{ + min-width: 140px; + } } diff --git a/src/components/Filter/index2.vue b/src/components/Filter/index2.vue new file mode 100644 index 0000000..8bdb0f3 --- /dev/null +++ b/src/components/Filter/index2.vue @@ -0,0 +1,462 @@ + + + + diff --git a/src/components/Map/index.vue b/src/components/Map/index.vue index 5b3c20d..4b699a2 100644 --- a/src/components/Map/index.vue +++ b/src/components/Map/index.vue @@ -27,7 +27,6 @@ import { dsVideoList, findUavPage, getVideoInfo } from '@/api/device.js' const mapStore = useMapStore() const UAV = computed(() => mapStore.legend.UAV) const monitor = computed(() => mapStore.legend.monitor) -const origin_monitor = computed(() => mapStore.legend.origin_monitor) const ais_station = computed(() => mapStore.legend.ais_station) const environmental = computed(() => mapStore.legend.environmental) const fence = computed(() => mapStore.legend.fence) @@ -37,13 +36,11 @@ let globalMap = null let vector = {} const geography = { monitor: [], // 监控数据 - origin_monitor: [], // 原始监控数据 UAV: [], // 无人机 ais_station: [], // ais基站 environmental: [], // 环境监测 fence: [] // 电子围栏 } -let sectorLayer = null const initMap = () => { const mapDom = document.getElementById('map') globalMap = new GlobalMap(mapDom)//, { seamlessZoom: false }) @@ -377,9 +374,9 @@ const initUAV = () => { const initMonitor = () => { const params = {} dsVideoList(params).then(res => { - geography.monitor = res.data - addMonitorToMap() - }) + geography.monitor = res.data + addMonitorToMap() + }) } const initAisStation = () => { geography.ais_station = stations diff --git a/src/components/Map/window/uav.vue b/src/components/Map/window/uav.vue index da09bba..6135ff3 100644 --- a/src/components/Map/window/uav.vue +++ b/src/components/Map/window/uav.vue @@ -31,9 +31,11 @@ import CockpitCom from '@/views/business/drone/cockpit.vue' import { getVideoStream, doStartOrStopUavAlgorithm } from '@/api/uav' import { ElMessage } from 'element-plus' +// sourceType1 的是接道通的视频流 +// sourceType2 的是擎天云的识别的视频流 const mapStore = useMapStore() const data = computed(() => mapStore.windowInfo.data) -const url = 'http://198.16.74.210:3456/embed?projectId=2&authInfoId=3&deviceSn=7601839813836800&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjcxNzA1NTIsImlhdCI6MTc2NjU2NTc1Mn0._YhukLexaErvTc3QDIAV5MuOa6cqglYUfsixNCit3us' +const url = 'http://198.16.74.210:3456/embed?projectId=2&authInfoId=3&deviceSn=7601839813836800&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjgxODQ5NDUsImlhdCI6MTc2NzU4MDE0NX0.AuUfl9Cbi_KZsIHrwRzwpLcpiMYB70NcXb0IYlha_5s' // const url = computed(() => `http://198.16.74.210:3456/embed?projectId=4bd996b8-5201-4e5d-82b1-6879be360c20&authInfoId=eyJhbGciOiJIUzUxMiIsImNyaXQiOlsidHlwIiwiYWxnIiwia2lkIl0sImtpZCI6IjU3YmQyNmEwLTYyMDktNGE5My1hNjg4LWY4NzUyYmU1ZDE5MSIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiIiwiZXhwIjoyMDc1OTQ3NzIyLCJuYmYiOjE3NjA0MTQ5MjIsIm9yZ2FuaXphdGlvbl91dWlkIjoiOWRmMjlmYTgtNGI5OS00MThlLWJhMmQtMGY5ZWY5ZWVlMzkyIiwicHJvamVjdF91dWlkIjoiIiwic3ViIjoiZmgyIiwidXNlcl9pZCI6IjE3NjA0MTQxMDkzNTcwMDI0MjkifQ.DC_aS37W2fkqOjCtfvysDfhTn-4XVn3_IrXBnPD9rICGyrIBKBG3oPldeW_pqele5H_gCn1EgM0KXcbDgvq-dw& // deviceSn=${data.value.droneSn}&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjcxNzA1NTIsImlhdCI6MTc2NjU2NTc1Mn0._YhukLexaErvTc3QDIAV5MuOa6cqglYUfsixNCit3us`) // 算法开启关闭状态 diff --git a/src/router/index.js b/src/router/index.js index 30be581..43080cd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -39,43 +39,43 @@ const router = createRouter({ }) router.beforeEach((to, from, next) => { - const token = cache.local.get('token') - if (token) { - if (whiteList.indexOf(to.path) !== -1) { - next() - } else { - if (useUserStore().roles.length === 0) { - // 判断当前用户是否已拉取完user_info信息 - useUserStore().getInfo().then(() => { - usePermissionStore().generateRoutes().then(accessRoutes => { - accessRoutes.forEach(route => { - router.addRoute(route) // 动态添加可访问路由表 - }) + // const token = cache.local.get('token') + // if (token) { + // if (whiteList.indexOf(to.path) !== -1) { + // next() + // } else { + // if (useUserStore().roles.length === 0) { + // // 判断当前用户是否已拉取完user_info信息 + // useUserStore().getInfo().then(() => { + // usePermissionStore().generateRoutes().then(accessRoutes => { + // accessRoutes.forEach(route => { + // router.addRoute(route) // 动态添加可访问路由表 + // }) - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 - }) - }).catch(err => { - // 登出接口防抖操作 - debounce(() => { - useUserStore().logout().then(() => { - ElMessage.error(err) - next({ path: '/login' }) - }) - }, 1000)() - }) - } else { - next() - } - } - } else { - // 没有token - if (whiteList.indexOf(to.path) !== -1) { - // 在免登录白名单,直接进入 + // next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 + // }) + // }).catch(err => { + // // 登出接口防抖操作 + // debounce(() => { + // useUserStore().logout().then(() => { + // ElMessage.error(err) + // next({ path: '/login' }) + // }) + // }, 1000)() + // }) + // } else { + // next() + // } + // } + // } else { + // // 没有token + // if (whiteList.indexOf(to.path) !== -1) { + // // 在免登录白名单,直接进入 next() - } else { - // next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 - next('/login') // 否则全部重定向到登录页 - } - } + // } else { + // // next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 + // next('/login') // 否则全部重定向到登录页 + // } + // } }) export default router diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 2a084e8..a693a93 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -7,7 +7,6 @@ const useMapStore = defineStore( legend: { UAV: true, monitor: true, - origin_monitor: false, ais_station: true, environmental: true, fence: true diff --git a/src/views/business/alarm/monitor.vue b/src/views/business/alarm/monitor.vue index b55fee9..bff9613 100644 --- a/src/views/business/alarm/monitor.vue +++ b/src/views/business/alarm/monitor.vue @@ -3,7 +3,7 @@
{{item}}
@@ -23,20 +23,13 @@ const videoData = computed(() => mapStore.locate.data) const tabs = [ '锁定轮询', '重新轮询', '巡检报告' ] -const active = ref(null) - const data = ref([]) const lock = ref(false) let timer = null let monitorIndex = 0 const videoUrl = ref('') -const arr = [ 'https://sl-shandong-stud-166141.chinatowercom.cn:10263/live/37021200001327000138_1_0_be18783a8d444023becb4e96c1c37ffc.flv', -'https://sl-shandong-stud-166141.chinatowercom.cn:10343/live/37021100001327000007_0_0_9626ad56bd3340cc9554c30454a66f2d.flv', -'https://sl-shandong-stud-022093.chinatowercom.cn:10073/live/37100200001327000003_0_0_e83bd475262b448b9d06c2d8085a7a9c.flv', -'http://198.16.74.214:80/Channels0001/Channels0001.live.flv?originTypeStr=pull&audioCodec=G711A&videoCodec=H264' ] const handle = (index) => { - active.value = index if(index === 0) { lock.value = true ElMessage.success('锁定成功') @@ -44,10 +37,10 @@ const handle = (index) => { lock.value = false ElMessage.success('成功轮询') }else if(index === 2) { // 巡检报告下载 - console.log(videoData.value, 'value') - // window.open(item.url, '_blank') cctvExport({}).then(res => { - console.log(res, 'resssss') + const blob = new Blob([ res ], { type: 'application/pdf' }) + const pdfUrl = URL.createObjectURL(blob) + window.open(pdfUrl, '_blank') }) } } diff --git a/src/views/business/identification/alarm/index.vue b/src/views/business/identification/alarm/index.vue index 646b2fb..97acc82 100644 --- a/src/views/business/identification/alarm/index.vue +++ b/src/views/business/identification/alarm/index.vue @@ -555,7 +555,7 @@ defineExpose({ gap: 20px; height: 812px; .identificate-index{ - width: 1200px; + width: 67.95%; display: flex; flex-direction: column; align-items: flex-start; @@ -642,7 +642,7 @@ defineExpose({ } } .identificate-detail{ - width: 545px; + width: 30.8%; height: 802px; overflow: auto; // 单个设备抓拍详情 diff --git a/src/views/system/dept/detail.vue b/src/views/system/dept/detail.vue index bcaa1d5..9072484 100644 --- a/src/views/system/dept/detail.vue +++ b/src/views/system/dept/detail.vue @@ -74,7 +74,7 @@ const model = reactive({ leader: '', phone: '', email: '', - areaCodes: '', + // areaCodes: '', orderNum: '' }) @@ -92,11 +92,11 @@ const items = [ return model.parentId !== 0 } }, - { - label: '数据来源', - prop: 'areaCodes', - type: 'tree' - }, + // { + // label: '数据来源', + // prop: 'areaCodes', + // type: 'tree' + // }, { label: '负责人', prop: 'leader', @@ -140,16 +140,16 @@ const getAllCheckedKeys = () => { * 初始化赋值 */ const initData = () => { - getAreaTree({ id: 331000 }).then(res => { - areaOptions.value = res.data - if (props.data.areaCodes && props.type !== 'add') { - props.data.areaCodes.split(',').forEach(item => { - nextTick(() => { - areaRef.value[0].setChecked(item, true, false) - }) - }) - } - }) + // getAreaTree({ id: 331000 }).then(res => { + // areaOptions.value = res.data + // if (props.data.areaCodes && props.type !== 'add') { + // props.data.areaCodes.split(',').forEach(item => { + // nextTick(() => { + // areaRef.value[0].setChecked(item, true, false) + // }) + // }) + // } + // }) if (props.type !== 'add') { Object.keys(model).forEach((key) => { model[key] = props.data[key] @@ -161,7 +161,7 @@ const initData = () => { * 表单校验 */ const validate = () => { - model.areaCodes = getAllCheckedKeys() + // model.areaCodes = getAllCheckedKeys() form.value.validate().then((valid) => { if (valid) { submit() diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 2d001c1..b25b729 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -12,7 +12,7 @@ import { ref, reactive } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getDept, delDept, listDeptExcludeChild } from '@/api/system' import { handleTree } from '@/utils/common' -import FilterComponent from '@/components/Filter/index.vue' +import FilterComponent from '@/components/Filter/index2.vue' import TableComponent from '@/components/Table/index.vue' import DialogComponent from '@/components/Dialog/index.vue' import DetailComponent from './detail.vue' diff --git a/src/views/system/index.vue b/src/views/system/index.vue index e1d2086..b410119 100644 --- a/src/views/system/index.vue +++ b/src/views/system/index.vue @@ -157,7 +157,7 @@ const goBusiness = () => { window.open('/', 'business_window') } const goHome = () => { - window.open('/data-center', 'business_window') + window.open('/', 'business_window') } watch( route, diff --git a/src/views/system/log/login/index.vue b/src/views/system/log/login/index.vue index 9f0620f..967a34f 100644 --- a/src/views/system/log/login/index.vue +++ b/src/views/system/log/login/index.vue @@ -17,7 +17,7 @@ import { ref, reactive } from 'vue' import { ElMessage } from 'element-plus' import { loginLogPage, exportLoginLog } from '@/api/system' import { addDateRange, downloadFile } from '@/utils/common' -import FilterComponent from '@/components/Filter/index.vue' +import FilterComponent from '@/components/Filter/index2.vue' import TableComponent from '@/components/Table/index.vue' const items = [ @@ -158,7 +158,7 @@ const initData = () => { loginLogPage(params).then(res => { if(res.code === 200) { const statusArr = [ '成功', '失败' ] - data.value = res.data.map(item => { + data.value = res.rows.map(item => { return { ...item, statusStr: statusArr[item.status] diff --git a/src/views/system/log/operate/index.vue b/src/views/system/log/operate/index.vue index 27bd72e..ce3c8fc 100644 --- a/src/views/system/log/operate/index.vue +++ b/src/views/system/log/operate/index.vue @@ -17,7 +17,7 @@ import { ref, reactive } from 'vue' import { ElMessage } from 'element-plus' import { operateLogPage, exportOperateLog } from '@/api/system' import { addDateRange, downloadFile } from '@/utils/common' -import FilterComponent from '@/components/Filter/index.vue' +import FilterComponent from '@/components/Filter/index2.vue' import TableComponent from '@/components/Table/index.vue' const items = [ @@ -144,7 +144,7 @@ const initData = () => { operateLogPage(params).then(res => { if(res.code === 200) { const statusArr = [ '成功', '失败' ] - data.value = res.data.map(item => { + data.value = res.rows.map(item => { return { ...item, statusStr: statusArr[item.status], diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 70085b2..627906e 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -12,7 +12,7 @@ import { ref, reactive } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getMenu, delMenu } from '@/api/system' import { handleTree } from '@/utils/common' -import FilterComponent from '@/components/Filter/index.vue' +import FilterComponent from '@/components/Filter/index2.vue' import TableComponent from '@/components/Table/index.vue' import DialogComponent from '@/components/Dialog/index.vue' import DetailComponent from './detail.vue' diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 888ca26..8efdb78 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -14,7 +14,7 @@ import { ref, reactive } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getRolePage, delRole } from '@/api/system' -import FilterComponent from '@/components/Filter/index.vue' +import FilterComponent from '@/components/Filter/index2.vue' import TableComponent from '@/components/Table/index.vue' import DialogComponent from '@/components/Dialog/index.vue' import DetailComponent from './detail.vue' @@ -117,7 +117,7 @@ const detail = reactive({ } getRolePage(params).then(res => { if(res.code === 200) { - data.value = res.data + data.value = res.rows pagination.total = res.total }else{ ElMessage.error(res.msg || '查询失败!') diff --git a/src/views/system/user/detail.vue b/src/views/system/user/detail.vue index 4aa65b0..aa32f9c 100644 --- a/src/views/system/user/detail.vue +++ b/src/views/system/user/detail.vue @@ -32,20 +32,6 @@ check-strictly :render-after-expand="false" /> - - {{opt.label}} @@ -89,8 +75,6 @@ const props = defineProps({ const form = ref(null) const model = reactive({ - areaCode: '', - areaName: '', userName: '', password: '', confirmPassword: '', @@ -104,14 +88,6 @@ const model = reactive({ }) const items = ref([ - { - label: '行政区域', - prop: 'areaCode', - type: 'treeselect', - options: [], - key: 'areaCode', - props: { value: 'areaCode', label: 'areaName', children: 'childArea' } - }, { label: '用户账号', prop: 'userName', @@ -180,7 +156,6 @@ const items = ref([ ]) const rules = { - areaCode: [ { required: true, message: '行政区域 未填写', type: 'error' } ], userName: [ { required: true, message: '用户账号 未填写', type: 'error' } ], nickName: [ { required: true, message: '用户名称 未填写', type: 'error' } ], password: [ @@ -218,23 +193,6 @@ const rules = { // idCard: [ { required: true, message: '身份证 未填写', type: 'error' } ] } -const load = async (node, resolve) => { - if(node.data && node.data.childArea) { - resolve(node.data.childArea) - } -} -const initArea = () => { - let index = items.value.findIndex(i => i.prop === 'areaCode') - getAreaTree({ id: 0 }).then(res => { - items.value[index].options = res.data - }) -} -const changeArea = (val, prop) => { - if(prop === 'areaCode') { - let index = items.value.findIndex(i => i.prop === 'areaCode') - findName(val, items.value[index].options) - } -} const findName = (val, list) => { for (const i of list) { if (i.areaCode === val) { @@ -300,7 +258,6 @@ const submit = () => { } initData() -initArea()