Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
8f756cf5
提交
8f756cf5
authored
6月 21, 2024
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 无人机列表更改为V4接口
上级
82bf688e
流水线
#10101
已失败 于阶段
变更
26
流水线
1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
142 行增加
和
187 行删除
+142
-187
vue.config.js
iframe/vue.config.js
+1
-1
uav_control.js
...ponents/MMCFlightControlCenter/api/modules/uav_control.js
+1
-16
request.js
src/components/MMCFlightControlCenter/api/request.js
+26
-57
index.vue
...el/components/controlLeft/components/player/uav/index.vue
+1
-1
index.js
...l/components/controlLeft/components/player/utils/index.js
+3
-3
index.vue
.../components/controlPanel/components/controlLeft/index.vue
+3
-3
index.vue
...Panel/components/controlRight/components/logger/index.vue
+1
-1
index.vue
...mponents/hangar/components/list/components/item/index.vue
+1
-1
linkFusion.js
...lightControlCenter/components/hangar/mixins/linkFusion.js
+2
-2
index.vue
...htControlCenter/components/mount/MMC_Gimbal_GAS/index.vue
+5
-5
index.vue
.../components/controlPanel/components/controlLeft/index.vue
+3
-3
index.vue
...el/components/controlRight/components/alarmLamp/index.vue
+4
-4
index.vue
...lRight/components/controlList/components/logger/index.vue
+1
-1
index.vue
.../controlRight/components/health/components/logs/index.vue
+1
-1
index.vue
...components/controlPanel/components/controlRight/index.vue
+1
-1
index.vue
...plications/components/player/components/qingliu/index.vue
+3
-3
index.vue
...er/components/uavApplications/components/player/index.vue
+11
-11
index.vue
...ponents/uavList/components/list/components/item/index.vue
+31
-26
data.json
...r/components/uavApplications/components/uavList/data.json
+0
-0
linkFusion.js
...rolCenter/components/uavApplications/mixins/linkFusion.js
+2
-2
index.vue
src/components/MMCFlightControlCenter/index.vue
+1
-1
hangar.js
src/components/MMCFlightControlCenter/store/hangar.js
+18
-18
uav.js
src/components/MMCFlightControlCenter/store/uav.js
+0
-0
package.json
vue2/package.json
+2
-1
demo.vue
vue2/src/views/fkzxIframe/demo.vue
+19
-24
vue.config.js
vue2/vue.config.js
+1
-1
没有找到文件。
iframe/vue.config.js
浏览文件 @
8f756cf5
...
...
@@ -8,7 +8,7 @@ module.exports = defineConfig({
plugins
:
[
new
NodePolyfillPlugin
()],
},
devServer
:
{
https
:
tru
e
,
https
:
fals
e
,
port
:
9000
,
client
:
{
overlay
:
false
,
...
...
src/components/MMCFlightControlCenter/api/modules/uav_control.js
浏览文件 @
8f756cf5
...
...
@@ -3,21 +3,6 @@ import request_uav from "../request_uav";
class
Control_API
{
/**
* 无人机token登录
* @param {*} data
* @returns
*/
static
login
(
data
)
{
return
request
({
url
:
"/crm/account/loginInfo"
,
method
:
"post"
,
data
,
headers
:
{
token
:
window
.
localStorage
.
getItem
(
"tmj_token"
),
},
});
}
/**
* 无人机接管更新状态
* @param {*} id //设备id
* @returns
...
...
@@ -32,7 +17,7 @@ class Control_API {
// 获取无人机树结构列表
static
getUavTree
(
params
)
{
return
request
({
url
:
"/
dms/uav/t
ree"
,
url
:
"/
admin-api/uas/drive/getT
ree"
,
// url: '/crm/personalCenter/list?id=4',
method
:
"get"
,
params
,
...
...
src/components/MMCFlightControlCenter/api/request.js
浏览文件 @
8f756cf5
import
axios
from
'axios'
;
import
Vue
from
'vue'
;
import
{
resetMessage
}
from
'./message'
;
import
router
from
'../router'
;
import
store
from
'../store'
;
import
axios
from
"axios"
;
import
Vue
from
"vue"
;
import
{
resetMessage
}
from
"./message"
;
import
router
from
"../router"
;
import
store
from
"../store"
;
let
prodUrl
=
'https://tmj.mmcuav.cn'
;
let
devUrl
=
'https://test.tmj.mmcuav.cn/'
let
prodUrl
=
"http://192.168.5.80:30080"
;
let
devUrl
=
"http://192.168.5.80:30080"
;
const
$axios
=
axios
.
create
({
// baseURL: process.env.VUE_APP_BASE_API_TG
// withCredentials: true
});
Vue
.
prototype
.
$http
=
axios
;
const
loading
=
null
;
/**
...
...
@@ -22,7 +20,7 @@ const loading = null;
*/
$axios
.
interceptors
.
request
.
use
(
(
config
)
=>
{
if
(
store
.
state
.
devMode
)
{
if
(
store
.
state
.
devMode
)
{
config
.
baseURL
=
devUrl
;
}
else
{
config
.
baseURL
=
prodUrl
;
...
...
@@ -30,14 +28,14 @@ $axios.interceptors.request.use(
const
token
=
store
.
state
.
token
;
if
(
token
)
{
config
.
headers
[
'token'
]
=
token
;
// config.headers['channel'] = 'channel'; // 渠道 主平台 子平台 后台
console
.
log
(
'config'
,
config
)
config
.
headers
[
"Authorization"
]
=
"Bearer "
+
token
;
}
config
.
headers
[
"Tenant-Id"
]
=
1
;
config
.
headers
[
"terminal"
]
=
2
;
// 1 为管理后台 2 为前端项目
return
config
;
},
(
error
)
=>
{
console
.
log
(
'进来了2....'
);
console
.
log
(
"请求出错"
);
return
Promise
.
reject
(
error
);
}
);
...
...
@@ -47,40 +45,25 @@ $axios.interceptors.request.use(
*/
$axios
.
interceptors
.
response
.
use
(
(
response
)
=>
{
console
.
log
(
'请求的URL:'
,
response
.
config
.
url
);
console
.
log
(
"请求的URL:"
,
response
.
config
.
url
);
if
(
loading
)
{
loading
.
close
();
}
console
.
log
(
'回应参数...'
,
response
);
console
.
log
(
"回应参数..."
,
response
);
const
status
=
response
.
status
;
const
res
=
response
.
data
;
// 请求成功返回response.data
if
((
status
>=
200
&&
status
<
300
)
||
status
===
304
)
{
switch
(
res
.
code
)
{
case
200
:
return
Promise
.
resolve
(
response
.
data
);
case
525
:
if
(
store
.
state
.
isIframe
)
{
resetMessage
.
error
(
response
.
data
.
msg
);
}
return
Promise
.
resolve
(
response
.
data
);
case
401
:
return
Promise
.
reject
(
response
);
case
403
:
if
(
store
.
state
.
isIframe
)
{
resetMessage
.
error
(
response
.
data
.
msg
);
}
break
;
case
0
:
return
Promise
.
resolve
(
res
);
default
:
if
(
response
.
config
.
responseType
===
'blob'
)
{
return
Promise
.
resolve
(
res
ponse
.
data
);
if
(
response
.
config
.
responseType
===
"blob"
)
{
return
Promise
.
resolve
(
res
);
}
resetMessage
.
error
(
res
ponse
?.
data
?.
msg
||
'网络请求错误'
);
return
Promise
.
reject
(
res
ponse
.
data
);
resetMessage
.
error
(
res
?.
msg
||
"网络请求错误"
);
return
Promise
.
reject
(
res
);
}
}
else
{
return
Promise
.
reject
(
response
);
...
...
@@ -95,38 +78,24 @@ $axios.interceptors.response.use(
switch
(
error
.
response
.
data
.
code
)
{
case
401
:
// 返回401 清除token信息并跳转到登陆页面
// store.commit("user/LOGIN_OUT");
// router.replace({
// path: "/login",
// query: {
// redirect: router.currentRoute.fullPath,
// },
// });
break
;
case
403
:
// 返回403 清除token信息并跳转到登陆页面
// store.commit("user/LOGIN_OUT");
resetMessage
.
error
(
'token过期'
);
/* router.replace({
path: "/login",
query: {
redirect: router.currentRoute.fullPath,
},
}); */
resetMessage
.
error
(
"token过期"
);
break
;
case
404
:
resetMessage
.
error
(
'网络请求不存在'
);
resetMessage
.
error
(
"网络请求不存在"
);
break
;
default
:
// 统一错误提示弹窗
resetMessage
.
error
(
error
.
response
?.
data
?.
msg
||
'网络请求错误'
);
resetMessage
.
error
(
error
.
response
?.
data
?.
msg
||
"网络请求错误"
);
}
}
else
{
// 请求超时或者网络有问题
if
(
error
.
message
.
includes
(
'timeout'
))
{
resetMessage
.
error
(
'请求超时!请检查网络是否正常'
);
if
(
error
.
message
.
includes
(
"timeout"
))
{
resetMessage
.
error
(
"请求超时!请检查网络是否正常"
);
}
else
{
resetMessage
.
error
(
'请求失败,请检查网络是否已连接'
);
resetMessage
.
error
(
"请求失败,请检查网络是否已连接"
);
}
}
return
Promise
.
reject
(
error
);
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/player/uav/index.vue
浏览文件 @
8f756cf5
...
...
@@ -42,7 +42,7 @@ export default {
this.hangar?.uav?.streamConfiguration
?.find((v) => v.videoType === 1)
?.streamUrlMessage.map((v) => ({
url: /* coverStreamUrl(v.streamUrl, this.hangar.uav.
hard
Id) */ v.streamUrl,
url: /* coverStreamUrl(v.streamUrl, this.hangar.uav.
device
Id) */ v.streamUrl,
brand: v.streamType,
})) || []
);
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/player/utils/index.js
浏览文件 @
8f756cf5
...
...
@@ -2,16 +2,16 @@ import { Base64 } from "js-base64";
/**
* 转换流地址, 这样后端才可统计播放情况
* @param {*} url
* @param {*}
hard
Id
* @param {*}
device
Id
* @returns
*/
export
function
coverStreamUrl
(
url
,
hard
Id
)
{
export
function
coverStreamUrl
(
url
,
device
Id
)
{
if
(
url
.
includes
(
"https://live.mmcuav.cn"
))
{
const
str
=
Base64
.
encode
(
JSON
.
stringify
({
token
:
localStorage
.
getItem
(
"tmj_token"
),
actionId
:
new
Date
().
getTime
().
toString
(),
deviceHardId
:
hard
Id
,
deviceHardId
:
device
Id
,
environment
:
process
.
env
.
VUE_APP_ENV
===
"dev"
?
"sit"
:
"prod"
,
})
);
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/index.vue
浏览文件 @
8f756cf5
...
...
@@ -18,12 +18,12 @@
<img
class=
"left-bar-item__icon"
src=
"./assets/images/carAI2.png"
/>
<div
class=
"left-bar-item__text"
>
车辆识别
</div>
</div>
<Face
v-if=
"openFace"
class=
"ai-dialog"
:uavId=
"uav.
hard
Id"
@
close=
"openFace = false"
/>
<Car
v-if=
"openPlate"
class=
"ai-dialog"
:uavId=
"uav.
hard
Id"
@
close=
"openPlate = false"
/>
<Face
v-if=
"openFace"
class=
"ai-dialog"
:uavId=
"uav.
device
Id"
@
close=
"openFace = false"
/>
<Car
v-if=
"openPlate"
class=
"ai-dialog"
:uavId=
"uav.
device
Id"
@
close=
"openPlate = false"
/>
<Traffic
v-if=
"openTraffic"
class=
"ai-dialog"
:uavId=
"uav.
hard
Id"
:uavId=
"uav.
device
Id"
@
close=
"openTraffic = false"
/>
<Jm
v-if=
"openModeling"
:device=
"device"
class=
"jm-dialog"
@
close=
"openModeling = false"
></Jm>
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlRight/components/logger/index.vue
浏览文件 @
8f756cf5
...
...
@@ -135,7 +135,7 @@ export default {
*/
onClear
()
{
let
dataSet
=
this
.
$store
.
state
.
MMCMQTT
.
dataSet
;
dataSet
[
this
.
hangar
.
hard
Id
][
3
]
=
null
;
dataSet
[
this
.
hangar
.
device
Id
][
3
]
=
null
;
this
.
$store
.
commit
(
"MMCMQTT/setState"
,
{
key
:
"dataSet"
,
value
:
{
...
...
src/components/MMCFlightControlCenter/components/hangar/components/list/components/item/index.vue
浏览文件 @
8f756cf5
...
...
@@ -33,7 +33,7 @@
>
<el-checkbox
:disabled=
"device.online !== 1"
:value=
"hangar && device.
hardId === hangar.hard
Id && device.isCheck"
:value=
"hangar && device.
deviceId === hangar.device
Id && device.isCheck"
@
change=
"(e) => handClick(e, device)"
></el-checkbox>
</el-tooltip>
...
...
src/components/MMCFlightControlCenter/components/hangar/mixins/linkFusion.js
浏览文件 @
8f756cf5
...
...
@@ -7,10 +7,10 @@ export default {
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uav"
]),
// mqtt实时数据
mqttDataSetHangar
()
{
return
this
.
$store
.
state
.
MMCMQTT
?.
dataSet
?.[
this
.
hangar
?.
hard
Id
];
return
this
.
$store
.
state
.
MMCMQTT
?.
dataSet
?.[
this
.
hangar
?.
device
Id
];
},
mqttDataSetUav
()
{
return
this
.
$store
.
state
.
MMCMQTT
?.
dataSet
?.[
this
.
uav
?.
hard
Id
];
return
this
.
$store
.
state
.
MMCMQTT
?.
dataSet
?.[
this
.
uav
?.
device
Id
];
},
mqttUrl
()
{
return
this
.
$store
.
getters
[
"MMCFlightControlCenter/mqttUrl"
];
...
...
src/components/MMCFlightControlCenter/components/mount/MMC_Gimbal_GAS/index.vue
浏览文件 @
8f756cf5
...
...
@@ -276,7 +276,7 @@ export default {
},
},
mounted
()
{
this
.
GAStopic
=
"GAS/RECEIVE/"
+
this
.
$uav
.
hard
Id
;
this
.
GAStopic
=
"GAS/RECEIVE/"
+
this
.
$uav
.
device
Id
;
// this.initMqtt();
this
.
click_billboard
();
},
...
...
@@ -392,7 +392,7 @@ export default {
this
.
statrTime
=
setInterval
(
async
()
=>
{
const
data
=
await
Control_API
.
gasRecords
({
size
:
1
,
mountHardId
:
this
.
$uav
.
hard
Id
,
mountHardId
:
this
.
$uav
.
device
Id
,
sort
:
"-id"
,
// startTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
});
...
...
@@ -411,10 +411,10 @@ export default {
},
1000
);
},
async
opengasRecordsFn
()
{
await
Control_API
.
opengasRecords
(
this
.
$uav
.
hard
Id
);
await
Control_API
.
opengasRecords
(
this
.
$uav
.
device
Id
);
},
async
delgasRecordsFn
()
{
await
Control_API
.
delgasRecords
(
this
.
$uav
.
hard
Id
);
await
Control_API
.
delgasRecords
(
this
.
$uav
.
device
Id
);
},
switchFn
()
{
if
(
this
.
GSAFlag
)
{
...
...
@@ -464,7 +464,7 @@ export default {
if
(
GSAentities
.
length
==
0
)
{
let
entities
=
viewer
.
entities
;
console
.
log
(
entities
,
"entities"
);
this
.
uavModel
=
entities
.
getById
(
`model_
${
this
.
$uav
.
hard
Id
}
`
);
this
.
uavModel
=
entities
.
getById
(
`model_
${
this
.
$uav
.
device
Id
}
`
);
console
.
log
(
this
.
uavModel
,
"this.uavModel"
);
if
(
this
.
uavModel
)
{
let
time
=
Cesium
.
JulianDate
.
now
();
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/index.vue
浏览文件 @
8f756cf5
...
...
@@ -27,12 +27,12 @@
<img
class=
"left-bar-item__icon"
src=
"./assets/images/ksjm.png"
/>
<div
class=
"left-bar-item__text"
>
快速建模
</div>
</div>
-->
<Face
v-if=
"openFace"
class=
"ai-dialog"
:uavId=
"uav.
hard
Id"
@
close=
"openFace = false"
/>
<Car
v-if=
"openPlate"
class=
"ai-dialog"
:uavId=
"uav.
hard
Id"
@
close=
"openPlate = false"
/>
<Face
v-if=
"openFace"
class=
"ai-dialog"
:uavId=
"uav.
device
Id"
@
close=
"openFace = false"
/>
<Car
v-if=
"openPlate"
class=
"ai-dialog"
:uavId=
"uav.
device
Id"
@
close=
"openPlate = false"
/>
<Traffic
v-if=
"openTraffic"
class=
"ai-dialog"
:uavId=
"uav.
hard
Id"
:uavId=
"uav.
device
Id"
@
close=
"openTraffic = false"
/>
<Jm
v-if=
"openModeling"
:device=
"device"
class=
"jm-dialog"
@
close=
"openModeling = false"
></Jm>
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/components/alarmLamp/index.vue
浏览文件 @
8f756cf5
...
...
@@ -86,7 +86,7 @@ export default {
},
type
:
531
,
};
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
hard
Id
}
`
;
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
device
Id
}
`
;
this
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
,
data
,
...
...
@@ -105,7 +105,7 @@ export default {
},
type
:
531
,
};
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
hard
Id
}
`
;
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
device
Id
}
`
;
this
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
,
data
,
...
...
@@ -124,7 +124,7 @@ export default {
},
type
:
531
,
};
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
hard
Id
}
`
;
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
device
Id
}
`
;
this
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
,
data
,
...
...
@@ -143,7 +143,7 @@ export default {
},
type
:
531
,
};
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
hard
Id
}
`
;
let
topic
=
`PX4/OBTAIN/
${
this
.
uav
.
device
Id
}
`
;
this
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
,
data
,
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/components/controlList/components/logger/index.vue
浏览文件 @
8f756cf5
...
...
@@ -60,7 +60,7 @@ export default {
},
onClear
()
{
let
dataSet
=
this
.
$store
.
state
.
MMCMQTT
.
dataSet
;
dataSet
[
this
.
uav
.
hard
Id
][
270
]
=
null
;
dataSet
[
this
.
uav
.
device
Id
][
270
]
=
null
;
this
.
$store
.
commit
(
"MMCMQTT/setState"
,
{
key
:
"dataSet"
,
value
:
{
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/components/health/components/logs/index.vue
浏览文件 @
8f756cf5
...
...
@@ -188,7 +188,7 @@ export default {
endTime
:
this
.
search
.
endTime
,
pageNo
:
this
.
search
.
pageNo
,
pageSize
:
this
.
search
.
pageSize
,
deviceHardId
:
this
.
uav
.
hard
Id
,
deviceHardId
:
this
.
uav
.
device
Id
,
mark
:
this
.
type
==
"VPN"
?
"公网"
:
this
.
type
==
"SPE"
?
"专网"
:
""
,
};
this
.
flag
=
false
;
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/index.vue
浏览文件 @
8f756cf5
...
...
@@ -104,7 +104,7 @@
/>
<MountController
@
webscoketFn=
"(data) => fun(data)"
v-if=
"uav && uav.
hard
Id"
v-if=
"uav && uav.
device
Id"
ref=
"MountControllerRef"
/>
<AlarmLamp
v-if=
"showAlarmLamp"
:uav=
"uav"
@
close=
"showAlarmLamp = false"
/>
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/player/components/qingliu/index.vue
浏览文件 @
8f756cf5
...
...
@@ -5,14 +5,14 @@
class=
"timeStr"
ref=
"timeStr"
:class=
"infoflag ? 'timeStrStyle' : ''"
v-if=
"device.
hard
Id"
v-if=
"device.
device
Id"
v-show=
"isInfoShow && !device.videos.osd"
>
{{
timeStr
||
""
}}
</div>
<div
class=
"wsDataleft"
ref=
"wsDataleft"
:class=
"infoflag ? 'leftStyle' : ''"
v-if=
"device.
hard
Id"
v-if=
"device.
device
Id"
v-show=
"isInfoShow && !device.videos.osd"
>
<div>
经度:
{{
wsData
.
longitude
||
0
}}
</div>
...
...
@@ -25,7 +25,7 @@
class=
"wsDataright"
ref=
"wsDataright"
:class=
"infoflag ? 'rightStyle' : ''"
v-if=
"device.
hard
Id"
v-if=
"device.
device
Id"
v-show=
"isInfoShow && !device.videos.osd"
>
<div>
盐城
</div>
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/player/index.vue
浏览文件 @
8f756cf5
...
...
@@ -395,7 +395,7 @@
</div>
</div>
<FaceAI
v-if=
"faceAiShow"
:uavId=
"pid"
@
closeface=
"faceAiShow = false"
/>
<CarAI
v-if=
"carAiShow"
:uavId=
"device.
hard
Id"
:list=
"carList"
@
closecar=
"carAiShow = false"
/>
<CarAI
v-if=
"carAiShow"
:uavId=
"device.
device
Id"
:list=
"carList"
@
closecar=
"carAiShow = false"
/>
<Traffic
v-if=
"trafficShow"
:trafficData=
"trafficData"
@
close=
"trafficShow = false"
/>
<carTraffic
v-if=
"cartrafficShow"
...
...
@@ -750,7 +750,7 @@ export default {
},
async
checkUseOperateFn
(
device
)
{
// 查看是否有控制权限
let
res
=
await
API
.
FCKERNEL
.
checkUseOperate
({
hard
Id
:
device
});
let
res
=
await
API
.
FCKERNEL
.
checkUseOperate
({
device
Id
:
device
});
if
(
res
.
code
==
201
)
{
this
.
$message
.
warning
(
res
.
msg
);
return
false
;
...
...
@@ -763,7 +763,7 @@ export default {
},
async
VideoModelChange
()
{
let
res
=
await
API
.
FCKERNEL
.
checkUseOperate
({
hardId
:
this
.
device
.
hard
Id
,
deviceId
:
this
.
device
.
device
Id
,
});
if
(
res
.
code
==
201
)
{
this
.
$message
.
warning
(
res
.
msg
);
...
...
@@ -820,11 +820,11 @@ export default {
},
//车流密度
async
carFrame
()
{
this
.
carFlow
(
this
.
device
.
hard
Id
);
this
.
carFlow
(
this
.
device
.
device
Id
);
},
//人流密度
async
frame
()
{
this
.
flow
(
this
.
device
.
hard
Id
);
this
.
flow
(
this
.
device
.
device
Id
);
},
/**
* 截图
...
...
@@ -880,7 +880,7 @@ export default {
//游泳识别
async
aiIdentifyType
(
aiType
)
{
const
data
=
{
hardId
:
this
.
device
.
hard
Id
,
deviceId
:
this
.
device
.
device
Id
,
mqttType
:
true
,
aiType
,
id
:
this
.
device
.
id
,
...
...
@@ -894,7 +894,7 @@ export default {
const
data
=
new
FormData
();
data
.
append
(
"addtime"
,
dayjs
().
format
(
"YYYY-MM-DD HH:mm:ss"
));
data
.
append
(
"file"
,
blob
);
data
.
append
(
"
hardId"
,
this
.
device
.
hard
Id
);
data
.
append
(
"
deviceId"
,
this
.
device
.
device
Id
);
data
.
append
(
"name"
,
this
.
device
.
name
);
data
.
append
(
"imageType"
,
1
);
data
.
append
(
"sortie"
,
this
.
flightSortie
||
""
);
...
...
@@ -922,7 +922,7 @@ export default {
// 人脸车牌识别
handle
(
command
)
{
// this.getcanvas(command);
this
.
getcanvasFaceCar
(
command
,
this
.
device
.
hard
Id
,
this
.
device
.
id
);
this
.
getcanvasFaceCar
(
command
,
this
.
device
.
device
Id
,
this
.
device
.
id
);
},
/**
* 居中
...
...
@@ -954,7 +954,7 @@ export default {
// if mountStatus =1 代表启用 屏幕指点功能
if
(
mountData
.
mountStatus
==
1
&&
device
.
hardId
==
mountData
.
hard
Id
&&
device
.
deviceId
==
mountData
.
device
Id
&&
mountData
.
moveType
==
"wrj"
)
{
let
evt
=
window
.
event
||
el
;
...
...
@@ -993,7 +993,7 @@ export default {
let
mounteList
=
{
data
:
buffer
,
...
mountData
};
if
(
buffer
)
{
if
(
this
.
device
.
network
===
1
)
{
let
topic
=
"PX4/OBTAIN/"
+
this
.
device
.
hard
Id
;
let
topic
=
"PX4/OBTAIN/"
+
this
.
device
.
device
Id
;
this
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
topic
,
data
:
{
...
...
@@ -1018,7 +1018,7 @@ export default {
cmdBuffer
:
mounteList
.
data
.
join
(
","
),
cmdName
:
mounteList
.
name
,
},
deviceHardId
:
mounteList
.
hard
Id
,
deviceHardId
:
mounteList
.
device
Id
,
};
this
.
$store
.
dispatch
(
"MMCGroundStation/publish"
,
sendData
);
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/components/list/components/item/index.vue
浏览文件 @
8f756cf5
...
...
@@ -15,18 +15,18 @@
/>
</div>
<div
class=
"online-info"
>
(共
{{
data
.
on
line
+
data
.
offline
}}
架
(共
{{
data
.
on
LineCount
+
data
.
offLineCount
}}
架
<span
class=
"ml10"
:class=
"
{ online: data.on
line
}"
>
{{
data
.
on
line
}}
在线
</span>
:class=
"
{ online: data.on
LineCount
}"
>
{{
data
.
on
LineCount
}}
在线
</span>
/
{{
data
.
off
line
}}
离线)
{{
data
.
off
LineCount
}}
离线)
</div>
</div>
<div
class=
"uav-item-child-box"
:class=
"
{ collapse: data.collapse }">
<Item
v-for=
"child in data.child
s
"
v-for=
"child in data.child"
:key=
"child.id"
:data=
"child"
:level=
"level+1"
...
...
@@ -34,20 +34,25 @@
/>
<div
class=
"device-item-box"
:class=
"
{ online: device.
online
== 1 }"
v-for="device in data.
uavs
"
:key="`device_${device.
i
d}`"
:class=
"
{ online: device.
status
== 1 }"
v-for="device in data.
driveMonitorReqVOList
"
:key="`device_${device.
deviceI
d}`"
>
<div
class=
"device-name"
>
<!--
<span
style=
"margin-right:10px"
:class=
"device.status==1&&device.currentOperator==1? 'blue' : device.status==1&&device.currentOperator!=1 ?'yellow':'' "
:title=
"device.name"
>
{{
device
.
name
}}
</span>
-->
<span
style=
"margin-right:10px"
:class=
"
device.online==1&&device.currentOperator==1? 'blue' : device.online==1&&device.currentOperator!=1 ?'yellow':''
"
:class=
"
'blue'
"
:title=
"device.name"
>
{{
device
.
name
}}
</span>
<span
style=
"color:#31DB24 "
class=
"dib"
v-if=
" device.
online
== 1 "
>
(在线)
</span>
<span
style=
"color:#31DB24 "
class=
"dib"
v-if=
" device.
status
== 1 "
>
(在线)
</span>
<span
v-else
class=
"dib"
>
(离线)
</span>
<div
class=
"symbol-icon-box"
>
<template
v-if=
"device.modelName && device.modelName.includes('入云龙1')"
>
<
!--
<
template
v-if=
"device.modelName && device.modelName.includes('入云龙1')"
>
<div
class=
"uav_version status-icon cp"
>
<img
src=
"./assets/images/I.svg"
/>
</div>
...
...
@@ -62,25 +67,31 @@
<div
class=
"uav_version status-icon cp"
>
<img
src=
"./assets/images/cq.svg"
/>
</div>
</
template
>
-->
<
template
>
<div
class=
"uav_version status-icon cp"
>
<img
src=
"./assets/images/I.svg"
/>
<img
src=
"./assets/images/I.svg"
/>
</div>
</
template
>
</div>
</div>
<div
class=
"device-fns"
>
<div
class=
"iconfont icon-luxiang_xianxing"
:class=
"{ active: uav && device.
id === uav.i
d && uav.showPlayer }"
:class=
"{ active: uav && device.
deviceId === uav.deviceI
d && uav.showPlayer }"
title=
"视频"
@
click=
"onShowPlayer(device)"
></div>
<div
v-if=
"device.
online
"
v-if=
"device.
status
"
class=
"iconfont icon-kongzhi_xianxing"
:class=
"{ active: uav && device.
id === uav.i
d && uav.showPanel }"
:class=
"{ active: uav && device.
deviceId === uav.deviceI
d && uav.showPanel }"
title=
"控制面板"
@
click=
"onShowPanel(device)"
></div>
<div
class=
"jieg"
title=
"接管无人机 "
v-if=
"device.
online
"
@
click=
"onTakeOver(device)"
>
<div
class=
"jieg"
title=
"接管无人机 "
v-if=
"device.
status
"
@
click=
"onTakeOver(device)"
>
<img
src=
"./assets/images/jieguan_active.svg"
v-if=
"device.currentOperator"
/>
<img
src=
"./assets/images/jieguan.svg"
v-else
/>
</div>
...
...
@@ -181,7 +192,7 @@ export default {
*/
async
onShowPanel
(
item
)
{
// 选中与取消选中
if
(
this
.
uav
?.
hardId
===
item
.
hard
Id
)
{
if
(
this
.
uav
?.
deviceId
===
item
.
device
Id
)
{
// 已打开播放器的情况下只需要展示数据面板
if
(
this
.
showPlayer
&&
!
this
.
showPanel
)
{
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
...
...
@@ -215,12 +226,6 @@ export default {
if
(
this
.
uav
)
{
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/unsubscribe"
);
}
if
(
!
item
.
streamConfiguration
)
{
let
res
=
await
Control_API
.
uavDetail
({
id
:
item
.
id
,
});
item
.
streamConfiguration
=
res
.
data
.
streamConfiguration
;
}
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
key
:
"showPanel"
,
value
:
true
,
...
...
@@ -258,7 +263,7 @@ export default {
*/
async
onShowPlayer
(
item
)
{
// 选中与取消选中
if
(
this
.
uav
?.
hardId
===
item
.
hard
Id
)
{
if
(
this
.
uav
?.
deviceId
===
item
.
device
Id
)
{
if
(
this
.
showPlayer
)
{
// 已显示播放器则关掉
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
...
...
@@ -279,11 +284,11 @@ export default {
}
}
else
{
// 在未打开播放器的情况下,有uav信息,到此步时肯定已经展开了面板,判断是否有流媒体信息, 并显示播放器
if
(
!
this
.
uav
.
streamConfiguration
)
{
if
(
!
this
.
uav
.
deviceStreamReqVOList
)
{
let
res
=
await
Control_API
.
uavDetail
({
id
:
item
.
id
,
});
item
.
streamConfiguration
=
res
.
data
.
streamConfiguration
;
item
.
deviceStreamReqVOList
=
res
.
data
.
deviceStreamReqVOList
;
}
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
key
:
"showPlayer"
,
...
...
@@ -315,7 +320,7 @@ export default {
let
res
=
await
Control_API
.
uavDetail
({
id
:
item
.
id
,
});
item
.
streamConfiguration
=
res
.
data
.
streamConfiguration
;
item
.
deviceStreamReqVOList
=
res
.
data
.
deviceStreamReqVOList
;
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
key
:
"showPlayer"
,
value
:
true
,
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/data.json
浏览文件 @
8f756cf5
差异被折叠。
点击展开。
src/components/MMCFlightControlCenter/components/uavApplications/mixins/linkFusion.js
浏览文件 @
8f756cf5
...
...
@@ -3,11 +3,11 @@ export default {
computed
:
{
// mqtt实时数据
mqttDataSet
()
{
return
this
.
$store
.
state
.
MMCMQTT
?.
dataSet
?.[
this
.
uav
?.
hard
Id
];
return
this
.
$store
.
state
.
MMCMQTT
?.
dataSet
?.[
this
.
uav
?.
device
Id
];
},
// 地面站实时数据
gsDataSet
()
{
return
this
.
$store
.
state
.
MMCGroundStation
?.
dataSet
?.[
this
.
uav
?.
hard
Id
];
return
this
.
$store
.
state
.
MMCGroundStation
?.
dataSet
?.[
this
.
uav
?.
device
Id
];
},
mqttUrl
()
{
return
this
.
$store
.
getters
[
"MMCFlightControlCenter/mqttUrl"
];
...
...
src/components/MMCFlightControlCenter/index.vue
浏览文件 @
8f756cf5
...
...
@@ -193,7 +193,7 @@ export default {
});
this
.
$store
.
commit
(
"MMCFlightControlCenter/setState"
,
{
key
:
"token"
,
value
:
this
.
userInfo
.
t
oken
,
value
:
this
.
userInfo
.
accessT
oken
,
});
this
.
$store
.
commit
(
"MMCFlightControlCenter/setState"
,
{
key
:
"userInfo"
,
...
...
src/components/MMCFlightControlCenter/store/hangar.js
浏览文件 @
8f756cf5
...
...
@@ -116,17 +116,17 @@ const actions = {
*/
subscribe
({
state
,
dispatch
})
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/subscribe"
,
{
topic
:
"APRON/RECEIVE/"
+
state
.
hangar
.
hard
Id
,
topic
:
"APRON/RECEIVE/"
+
state
.
hangar
.
device
Id
,
callback
(
ok
)
{
ok
&&
console
.
log
(
"mqtt订阅主题"
,
"APRON/RECEIVE/"
+
state
.
hangar
.
hard
Id
);
console
.
log
(
"mqtt订阅主题"
,
"APRON/RECEIVE/"
+
state
.
hangar
.
device
Id
);
},
});
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/subscribe"
,
{
topic
:
"PROCESS/RECEIVE/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/RECEIVE/"
+
state
.
hangar
.
device
Id
,
callback
(
ok
)
{
ok
&&
console
.
log
(
"mqtt订阅主题"
,
"PROCESS/RECEIVE/"
+
state
.
hangar
.
hard
Id
);
console
.
log
(
"mqtt订阅主题"
,
"PROCESS/RECEIVE/"
+
state
.
hangar
.
device
Id
);
},
});
},
...
...
@@ -136,22 +136,22 @@ const actions = {
*/
unsubscribe
({
state
,
dispatch
})
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/unsubscribe"
,
{
topic
:
"APRON/RECEIVE/"
+
state
.
hangar
.
hard
Id
,
topic
:
"APRON/RECEIVE/"
+
state
.
hangar
.
device
Id
,
callback
(
ok
)
{
ok
&&
console
.
log
(
"mqtt取消订阅主题"
,
"APRON/RECEIVE/"
+
state
.
hangar
.
hard
Id
"APRON/RECEIVE/"
+
state
.
hangar
.
device
Id
);
},
});
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/unsubscribe"
,
{
topic
:
"PROCESS/RECEIVE/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/RECEIVE/"
+
state
.
hangar
.
device
Id
,
callback
(
ok
)
{
ok
&&
console
.
log
(
"mqtt取消订阅主题"
,
"PROCESS/RECEIVE/"
+
state
.
hangar
.
hard
Id
"PROCESS/RECEIVE/"
+
state
.
hangar
.
device
Id
);
},
});
...
...
@@ -178,7 +178,7 @@ const actions = {
*/
out
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
2059
,
},
...
...
@@ -194,7 +194,7 @@ const actions = {
*/
in
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
2073
,
},
...
...
@@ -210,7 +210,7 @@ const actions = {
*/
chargeStart
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
2060
,
},
...
...
@@ -226,7 +226,7 @@ const actions = {
*/
chargeEnd
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
2071
,
},
...
...
@@ -242,7 +242,7 @@ const actions = {
*/
warmUp
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
2072
,
},
...
...
@@ -258,7 +258,7 @@ const actions = {
*/
dormancy
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
2061
,
},
...
...
@@ -274,7 +274,7 @@ const actions = {
*/
processExit
({
state
,
commit
,
dispatch
},
data
)
{
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
100001
,
},
...
...
@@ -294,15 +294,15 @@ const actions = {
// 生成架次號
const
getFlightSortic
=
await
Control_API
.
getFlightSortic
({
taskId
:
state
.
airlineData
.
id
,
deviceHardId
:
data
.
uav
.
hard
Id
,
deviceHardId
:
data
.
uav
.
device
Id
,
});
// 一键任务指令
const
waypointList
=
state
.
airlineData
?.
content
;
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
hard
Id
,
topic
:
"PROCESS/OBTAIN/"
+
state
.
hangar
.
device
Id
,
data
:
{
cmdControlType
:
100004
,
uavDeviceId
:
data
.
uav
.
hard
Id
,
uavDeviceId
:
data
.
uav
.
device
Id
,
wayLineObj
:
{
taskId
:
state
.
airlineData
.
id
,
flightSortiesID
:
getFlightSortic
.
data
,
...
...
src/components/MMCFlightControlCenter/store/uav.js
浏览文件 @
8f756cf5
差异被折叠。
点击展开。
vue2/package.json
浏览文件 @
8f756cf5
...
...
@@ -47,7 +47,8 @@
},
"rules"
:
{
"vue/multi-word-component-names"
:
"off"
,
"no-undef"
:
"off"
"no-undef"
:
"off"
,
"no-debugger"
:
"off"
}
},
"browserslist"
:
[
...
...
vue2/src/views/fkzxIframe/demo.vue
浏览文件 @
8f756cf5
...
...
@@ -28,9 +28,9 @@
<iframe
id=
"iframe"
ref=
"iframe"
src=
"http
s
://localhost:9000/"
src=
"http://localhost:9000/"
style=
"width: 1920px; height: 1000px;"
anonymous
anonymous
allowfullscreen=
"true"
></iframe>
</div>
...
...
@@ -87,7 +87,7 @@ export default {
data
()
{
return
{
isIframeReady
:
false
,
//是否接收到iframe里的ready事件
baseUrl
:
"http
s://test.tmj.mmcuav.cn
"
,
baseUrl
:
"http
://192.168.5.80:30080
"
,
devMode
:
false
,
scene1
:
false
,
// 场景类型 true: 无人机 false: 机库
useSTLAirway
:
false
,
// 使用标准航线库
...
...
@@ -184,13 +184,13 @@ export default {
immediate
:
true
,
handler
()
{
if
(
this
.
devMode
)
{
this
.
account
=
"
mmctest@
admin"
;
this
.
password
=
"
test@Admin001
"
;
this
.
baseUrl
=
"http
s://test.tmj.mmcuav.cn
"
;
this
.
account
=
"admin"
;
this
.
password
=
"
mmc@123456
"
;
this
.
baseUrl
=
"http
://192.168.5.80:30080
"
;
}
else
{
this
.
account
=
"
mmcadmin@kbt001
"
;
this
.
password
=
"
TMJMMC@kbta0227&adm
"
;
this
.
baseUrl
=
"http
s://tmj.mmcuav.cn
"
;
this
.
account
=
"
admin
"
;
this
.
password
=
"
mmc@123456
"
;
this
.
baseUrl
=
"http
://192.168.5.80:30080
"
;
}
this
.
postIframe
({
type
:
"param"
,
...
...
@@ -635,25 +635,20 @@ export default {
let
formData
=
new
FormData
();
formData
.
append
(
"userAccount"
,
this
.
account
);
formData
.
append
(
"password"
,
Base64
.
encode
(
this
.
password
));
let
res
1
=
await
fetch
(
this
.
baseUrl
+
"/crm
/login"
,
{
let
res
=
await
fetch
(
this
.
baseUrl
+
"/admin-api/system/auth
/login"
,
{
method
:
"post"
,
headers
:
{
// "Content-Type": "multipart/form-data",
"Content-Type"
:
"application/json"
,
"Tenant-Id"
:
1
,
"terminal"
:
2
},
body
:
formData
,
body
:
JSON
.
stringify
({
username
:
this
.
account
,
password
:
this
.
password
,
}),
});
let
data1
=
await
res1
.
json
();
if
(
data1
.
code
==
200
)
{
await
fetch
(
this
.
baseUrl
+
"/crm/user/platformPermission"
,
{
method
:
"get"
,
headers
:
{
Token
:
data1
.
data
.
token
,
},
});
this
.
userInfo
=
data1
.
data
;
this
.
init
();
}
this
.
userInfo
=
(
await
res
.
json
()).
data
;
this
.
init
();
},
},
};
...
...
vue2/vue.config.js
浏览文件 @
8f756cf5
...
...
@@ -15,7 +15,7 @@ module.exports = defineConfig({
],
},
devServer
:
{
https
:
tru
e
,
https
:
fals
e
,
client
:
{
overlay
:
false
,
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论