Update frontend code, add executing job list selecting
This commit is contained in:
parent
ed6b18574f
commit
9651a62caa
@ -54,6 +54,11 @@ public class JmJobController {
|
|||||||
public Object selectList(@Valid @RequestBody JmJobQueryDTO param) {
|
public Object selectList(@Valid @RequestBody JmJobQueryDTO param) {
|
||||||
return jobService.selectList(param);
|
return jobService.selectList(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/execJobs")
|
||||||
|
public Object selectExecJobs(@Valid @RequestBody JmJobQueryDTO param) {
|
||||||
|
return jobService.selectExecJobs(param);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询详情
|
* 查询详情
|
||||||
|
|||||||
@ -22,6 +22,11 @@ public interface JmJobMapper {
|
|||||||
* 列表查询
|
* 列表查询
|
||||||
*/
|
*/
|
||||||
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询执行中的job
|
||||||
|
*/
|
||||||
|
List<JmJobDTO> selectExecJobs(JmJobQueryDTO param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按主键查询
|
* 按主键查询
|
||||||
|
|||||||
@ -21,6 +21,11 @@ public interface JmJobService {
|
|||||||
* 列表查询
|
* 列表查询
|
||||||
*/
|
*/
|
||||||
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找正在执行的job
|
||||||
|
*/
|
||||||
|
List<JmJobDTO> selectExecJobs(JmJobQueryDTO param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按主键查询
|
* 按主键查询
|
||||||
|
|||||||
@ -113,6 +113,14 @@ public class JmJobServiceImpl implements JmJobService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<JmJobDTO> selectExecJobs(JmJobQueryDTO param)
|
||||||
|
{
|
||||||
|
List<JmJobDTO> list = jobMapper.selectExecJobs(param);
|
||||||
|
loadDetail(param.getUavId(), list);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
private void loadDetail(Long uavId, List<JmJobDTO> list) {
|
private void loadDetail(Long uavId, List<JmJobDTO> list) {
|
||||||
if (ObjectUtil.isEmpty(list)) {
|
if (ObjectUtil.isEmpty(list)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -48,6 +48,21 @@
|
|||||||
order by j.create_time desc
|
order by j.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectExecJobs" resultType="com.zhangy.skyeye.jm.dto.JmJobDTO">
|
||||||
|
<include refid="selectSql"/>
|
||||||
|
where j.status = '1'
|
||||||
|
<if test="type != null and type == 1">
|
||||||
|
and j.status in ('1', '3')
|
||||||
|
</if>
|
||||||
|
<if test="uavId != null">
|
||||||
|
and exists (select 1 from jm_job_uav ju where j.id = ju.job_id and ju.uav_id = #{uavId})
|
||||||
|
</if>
|
||||||
|
<if test="payloadId != null">
|
||||||
|
and exists (select 1 from jm_job_payload jp where j.id = jp.job_id and jp.payload_id = #{payloadId})
|
||||||
|
</if>
|
||||||
|
order by j.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectInfo" resultType="com.zhangy.skyeye.jm.dto.JmJobDTO">
|
<select id="selectInfo" resultType="com.zhangy.skyeye.jm.dto.JmJobDTO">
|
||||||
select
|
select
|
||||||
j.id,
|
j.id,
|
||||||
|
|||||||
@ -17,12 +17,15 @@ export const getUavCurrentHeight = params =>
|
|||||||
// 获取任务列表
|
// 获取任务列表
|
||||||
export const getTaskListData = params =>
|
export const getTaskListData = params =>
|
||||||
req('post', '/sar/job/list', params)
|
req('post', '/sar/job/list', params)
|
||||||
|
// 获取执行中的任务列表
|
||||||
|
export const getExecJobs = params =>
|
||||||
|
req('post', '/sar/job/execJobs', params)
|
||||||
// 新增任务
|
// 新增任务
|
||||||
export const addTaskFast = params =>
|
export const addTaskFast = params =>
|
||||||
req('post', '/sar/job/save', params)
|
req('post', '/sar/job/save', params)
|
||||||
// 预览任务
|
// 预览任务
|
||||||
export const previewTaskFast = params =>
|
export const previewTaskFast = params =>
|
||||||
req('post', 'ktkx/UavPlanning/SAR', params)
|
req('post', '/jm/plan/airline', params)
|
||||||
// 编辑任务
|
// 编辑任务
|
||||||
export const editTaskFast = params =>
|
export const editTaskFast = params =>
|
||||||
req('post', '/sar/job/save', params)
|
req('post', '/sar/job/save', params)
|
||||||
@ -41,6 +44,9 @@ export const deleteTaskItem = params =>
|
|||||||
// 查询任务详情
|
// 查询任务详情
|
||||||
export const getTaskItemDetail = params =>
|
export const getTaskItemDetail = params =>
|
||||||
req('get', '/sar/job/detail', params)
|
req('get', '/sar/job/detail', params)
|
||||||
|
// 查询任务编辑详情
|
||||||
|
export const getTaskEditItemDetail = params =>
|
||||||
|
req('get', '/sar/job/info', params)
|
||||||
// 查询无人机列表
|
// 查询无人机列表
|
||||||
export const getUavListData = params =>
|
export const getUavListData = params =>
|
||||||
req('post', '/skyeye/uav/list', params)
|
req('post', '/skyeye/uav/list', params)
|
||||||
@ -74,3 +80,7 @@ export const deletePictureItem = params =>
|
|||||||
// ai识别
|
// ai识别
|
||||||
export const pictureAiCheck = params =>
|
export const pictureAiCheck = params =>
|
||||||
req('post', '/sar/image/identify', params)
|
req('post', '/sar/image/identify', params)
|
||||||
|
|
||||||
|
// 开机
|
||||||
|
export const changePayloadRadarOpenState = params =>
|
||||||
|
req('post', '/sar/control/send', params)
|
||||||
|
|||||||
@ -40,3 +40,18 @@ export const getWeatherInfo = params => req('get', '/weather/info', params)
|
|||||||
// 获取字典接口
|
// 获取字典接口
|
||||||
export const getAllDictType = params =>
|
export const getAllDictType = params =>
|
||||||
req('get', '/dict/list', params)
|
req('get', '/dict/list', params)
|
||||||
|
|
||||||
|
|
||||||
|
// #region 新增user表接口
|
||||||
|
export const userList = params =>
|
||||||
|
req('post', '/user/list', params)
|
||||||
|
// 删除
|
||||||
|
export const userRemove = params =>
|
||||||
|
req('post', '/user/remove', params)
|
||||||
|
// 保存信息
|
||||||
|
export const userSave = params =>
|
||||||
|
req('post', '/user/save', params)
|
||||||
|
// 更新
|
||||||
|
export const userUpdate = params =>
|
||||||
|
req('post', '/user/update', params)
|
||||||
|
//#endregion
|
||||||
|
|||||||
@ -11,11 +11,12 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cesium-split {
|
#cesium-split {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 0;
|
top: 0;
|
||||||
background-color: red;
|
background-color: #ffffff;
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
@ -33,10 +34,12 @@
|
|||||||
::v-deep .dt-card__content {
|
::v-deep .dt-card__content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-content {
|
.timeline-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.timeline-contain {
|
.timeline-contain {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,7 +164,7 @@ export default {
|
|||||||
// console.log('刷新自己取', localStorage.getItem('userId'), localStorage.getItem('username'))
|
// console.log('刷新自己取', localStorage.getItem('userId'), localStorage.getItem('username'))
|
||||||
// }
|
// }
|
||||||
if (this.username !== 'admin') {
|
if (this.username !== 'admin') {
|
||||||
// this.menus[3].show = false
|
this.menus[3].show = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -9,30 +9,30 @@ const whiteList = ['/login'] // 本地测试保留login
|
|||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
// 启动进度条
|
// 启动进度条
|
||||||
NProgress.start()
|
// NProgress.start()
|
||||||
// 确定用户是否已登录
|
// 确定用户是否已登录
|
||||||
const hasToken = getToken()
|
// const hasToken = getToken()
|
||||||
if (hasToken) {
|
// if (hasToken) {
|
||||||
if (to.path === '/login') {
|
// if (to.path === '/login') {
|
||||||
// 如果已登录,则重定向到主页
|
// // 如果已登录,则重定向到主页
|
||||||
next({ path: '/' })
|
// next({ path: '/' })
|
||||||
NProgress.done()
|
// NProgress.done()
|
||||||
} else {
|
// } else {
|
||||||
NProgress.done()
|
// NProgress.done()
|
||||||
next()
|
// next()
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
/* 没有 token */
|
// /* 没有 token */
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
// if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免费登录白名单,直接去
|
// // 在免费登录白名单,直接去
|
||||||
next()
|
// next()
|
||||||
} else {
|
// } else {
|
||||||
// 没有访问权限的其他页面被重定向到登录页面。
|
// // 没有访问权限的其他页面被重定向到登录页面。
|
||||||
next(`/login?redirect=${to.path}`)
|
// next(`/login?redirect=${to.path}`)
|
||||||
NProgress.done()
|
// NProgress.done()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// next()
|
next()
|
||||||
|
|
||||||
// 跳转页面时,取消上一个页面的请求
|
// 跳转页面时,取消上一个页面的请求
|
||||||
if (window.__axiosCancelTokenArr) {
|
if (window.__axiosCancelTokenArr) {
|
||||||
|
|||||||
@ -52,5 +52,7 @@ const getters = {
|
|||||||
jobModeOptions: state => state.dict.jobModeOptions,
|
jobModeOptions: state => state.dict.jobModeOptions,
|
||||||
polarization: state => state.dict.polarization,
|
polarization: state => state.dict.polarization,
|
||||||
polarizationOptions: state => state.dict.polarizationOptions,
|
polarizationOptions: state => state.dict.polarizationOptions,
|
||||||
|
sarImageMode: state => state.dict.sarImageMode,
|
||||||
|
sarImageModeOptions: state => state.dict.sarImageModeOptions,
|
||||||
}
|
}
|
||||||
export default getters
|
export default getters
|
||||||
|
|||||||
@ -15,7 +15,7 @@ const state = {
|
|||||||
duringPlay: false,
|
duringPlay: false,
|
||||||
menuExpand: false, // 侧边工具栏是否展开
|
menuExpand: false, // 侧边工具栏是否展开
|
||||||
theme: 'light',
|
theme: 'light',
|
||||||
menusChose: '2'
|
menusChose: '1'
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
|||||||
@ -13,9 +13,9 @@ const state = {
|
|||||||
taskFlightModeOptions: [],
|
taskFlightModeOptions: [],
|
||||||
jobStatus: {},
|
jobStatus: {},
|
||||||
jobStatusOptions: [],
|
jobStatusOptions: [],
|
||||||
sarResolution:{},
|
sarResolution: {},
|
||||||
sarResolutionOptions: [],
|
sarResolutionOptions: [],
|
||||||
detectType:{},
|
detectType: {},
|
||||||
jobMode: {},
|
jobMode: {},
|
||||||
jobModeOptions: [
|
jobModeOptions: [
|
||||||
{
|
{
|
||||||
@ -29,6 +29,8 @@ const state = {
|
|||||||
],
|
],
|
||||||
polarization: {},
|
polarization: {},
|
||||||
polarizationOptions: {},
|
polarizationOptions: {},
|
||||||
|
sarImageMode: {},
|
||||||
|
sarImageModeOptions: []
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -90,7 +92,12 @@ const mutations = {
|
|||||||
SET_POLARIZATION_OPTIONS: (state, info) => {
|
SET_POLARIZATION_OPTIONS: (state, info) => {
|
||||||
state.polarizationOptions = info
|
state.polarizationOptions = info
|
||||||
},
|
},
|
||||||
|
SET_SAR_IMAGE_MODE: (state, info) => {
|
||||||
|
state.sarImageMode = info
|
||||||
|
},
|
||||||
|
SET_SAR_IMAGE_MODE_OPTIONS: (state, info) => {
|
||||||
|
state.sarImageModeOptions = info
|
||||||
|
},
|
||||||
}
|
}
|
||||||
const actions = {
|
const actions = {
|
||||||
getDict({ commit }) {
|
getDict({ commit }) {
|
||||||
@ -103,66 +110,74 @@ const actions = {
|
|||||||
let imuStatusOptions = []
|
let imuStatusOptions = []
|
||||||
let enableStatus = {}
|
let enableStatus = {}
|
||||||
let enableStatusOptions = []
|
let enableStatusOptions = []
|
||||||
let successStatus= {}
|
let successStatus = {}
|
||||||
let successStatusOptions = []
|
let successStatusOptions = []
|
||||||
let sarWorkStatus= {}
|
let sarWorkStatus = {}
|
||||||
let sarWorkStatusOptions = []
|
let sarWorkStatusOptions = []
|
||||||
let taskFlightMode= {}
|
let taskFlightMode = {}
|
||||||
let taskFlightModeOptions = []
|
let taskFlightModeOptions = []
|
||||||
let jobStatus= {}
|
let jobStatus = {}
|
||||||
let jobStatusOptions = []
|
let jobStatusOptions = []
|
||||||
let sarResolution= {}
|
let sarResolution = {}
|
||||||
let sarResolutionOptions = []
|
let sarResolutionOptions = []
|
||||||
let detectType = {}
|
let detectType = {}
|
||||||
let jobMode = {}
|
let jobMode = {}
|
||||||
let jobModeOptions = []
|
let jobModeOptions = []
|
||||||
let polarization = {}
|
let polarization = {}
|
||||||
let polarizationOptions = []
|
let polarizationOptions = []
|
||||||
|
let sarImageMode = {}
|
||||||
|
let sarImageModeOptions = []
|
||||||
|
|
||||||
res.data.data.forEach(item => {
|
res.data.data.forEach(item => {
|
||||||
switch (item.dictType) {
|
switch (item.dictType) {
|
||||||
case 'imu_status':
|
case 'imu_status':
|
||||||
imuStatus[item.dictValue] = item.dictLabel
|
imuStatus[item.dictValue] = item.dictLabel
|
||||||
imuStatusOptions.push({label: item.dictLabel, value: item.dictValue})
|
imuStatusOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'enable_status':
|
case 'enable_status':
|
||||||
enableStatus[item.dictValue] = item.dictLabel
|
enableStatus[item.dictValue] = item.dictLabel
|
||||||
enableStatusOptions.push({label: item.dictLabel, value: item.dictValue})
|
enableStatusOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'success_status':
|
case 'success_status':
|
||||||
successStatus[item.dictValue] = item.dictLabel
|
successStatus[item.dictValue] = item.dictLabel
|
||||||
successStatusOptions.push({label: item.dictLabel, value: item.dictValue})
|
successStatusOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'sar_work_status':
|
case 'sar_work_status':
|
||||||
sarWorkStatus[item.dictValue] = item.dictLabel
|
sarWorkStatus[item.dictValue] = item.dictLabel
|
||||||
sarWorkStatusOptions.push({label: item.dictLabel, value: item.dictValue})
|
sarWorkStatusOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'task_flight_mode':
|
case 'task_flight_mode':
|
||||||
taskFlightMode[item.dictValue] = item.dictLabel
|
taskFlightMode[item.dictValue] = item.dictLabel
|
||||||
taskFlightModeOptions.push({label: item.dictLabel, value: item.dictValue})
|
taskFlightModeOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'job_status':
|
case 'job_status':
|
||||||
jobStatus[item.dictValue] = item.dictLabel
|
jobStatus[item.dictValue] = item.dictLabel
|
||||||
jobStatusOptions.push({label: item.dictLabel, value: item.dictValue})
|
jobStatusOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'sar_resolution':
|
case 'sar_resolution':
|
||||||
sarResolution[item.dictValue] = item.dictLabel
|
sarResolution[item.dictValue] = item.dictLabel
|
||||||
sarResolutionOptions.push({label: item.dictLabel, value: item.dictValue})
|
sarResolutionOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'py_detect_type':
|
case 'py_detect_type':
|
||||||
detectType[item.dictValue] = item.dictLabel
|
detectType[item.dictValue] = item.dictLabel
|
||||||
break
|
break
|
||||||
case 'job_mode':
|
case 'job_mode':
|
||||||
jobMode[item.dictValue] = item.dictLabel
|
jobMode[item.dictValue] = item.dictLabel
|
||||||
jobModeOptions.push({label: item.dictLabel, value: item.dictValue})
|
jobModeOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
case 'sar_polarization':
|
case 'sar_polarization':
|
||||||
polarization[item.dictValue] = item.dictLabel
|
polarization[item.dictValue] = item.dictLabel
|
||||||
polarizationOptions.push({label: item.dictLabel, value: item.dictValue})
|
polarizationOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
|
break
|
||||||
|
case 'sar_image_mode':
|
||||||
|
sarImageMode[item.dictValue] = item.dictLabel
|
||||||
|
sarImageModeOptions.push({ label: item.dictLabel, value: item.dictValue })
|
||||||
break
|
break
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
commit('SET_SAR_IMAGE_MODE', sarImageMode)
|
||||||
|
commit('SET_SAR_IMAGE_MODE_OPTIONS', sarImageModeOptions)
|
||||||
// 适配机场类型
|
// 适配机场类型
|
||||||
commit('SET_IMU_STATUS', imuStatus)
|
commit('SET_IMU_STATUS', imuStatus)
|
||||||
commit('SET_IMU_STATUS_OPTIONS', imuStatusOptions)
|
commit('SET_IMU_STATUS_OPTIONS', imuStatusOptions)
|
||||||
@ -192,6 +207,7 @@ const actions = {
|
|||||||
// 极化方式
|
// 极化方式
|
||||||
commit('SET_POLARIZATION', polarization)
|
commit('SET_POLARIZATION', polarization)
|
||||||
commit('SET_POLARIZATION_OPTIONS', polarizationOptions)
|
commit('SET_POLARIZATION_OPTIONS', polarizationOptions)
|
||||||
|
commit('SET_POLARIZATION_OPTIONS', sarImageModeOptions)
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.data.message)
|
this.$message.error(res.data.message)
|
||||||
|
|||||||
@ -1506,6 +1506,7 @@ input[type="number"] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.query-form {
|
.query-form {
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
|
|||||||
@ -35,11 +35,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
visibleLocale: false,
|
visibleLocale: false,
|
||||||
deviceData: [
|
deviceData: [
|
||||||
{
|
// {
|
||||||
name: '无人机1',
|
// name: '无人机1',
|
||||||
num: 'M3127',
|
// num: 'M3127',
|
||||||
location: '112.3423242,45.2312324'
|
// location: '112.3423242,45.2312324'
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
device: {
|
device: {
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|||||||
@ -305,3 +305,8 @@
|
|||||||
top: $--icon-mode-larger-card-top;
|
top: $--icon-mode-larger-card-top;
|
||||||
transition: 0.2s ease-in-out;
|
transition: 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .el-icon-plus {
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
|||||||
@ -25,10 +25,7 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-select
|
<el-select v-model="queryForm.type" popper-class="select-light">
|
||||||
v-model="queryForm.type"
|
|
||||||
popper-class="select-light"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deviceTypes"
|
v-for="item in deviceTypes"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -78,14 +75,20 @@
|
|||||||
></i>
|
></i>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<el-table v-if="isShowTable" :data="deviceData" stripe style="width: 100%">
|
<el-table
|
||||||
|
v-if="isShowTable"
|
||||||
|
:data="deviceData"
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="100%"
|
||||||
|
>
|
||||||
<template v-if="queryForm.type === 'payload'">
|
<template v-if="queryForm.type === 'payload'">
|
||||||
<el-table-column prop="name" label="雷达名称"> </el-table-column>
|
<el-table-column prop="name" label="雷达名称"> </el-table-column>
|
||||||
<el-table-column prop="type" label="雷达类型"> </el-table-column>
|
<el-table-column prop="type" label="雷达类型"> </el-table-column>
|
||||||
<el-table-column prop="ip" label="IP"> </el-table-column>
|
<el-table-column prop="ip" label="IP"> </el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-table-column prop="name" label="无人机名称"> </el-table-column>
|
<el-table-column prop="name" label="无人机名称"> </el-table-column>
|
||||||
<el-table-column prop="code" label="无人机码"> </el-table-column>
|
<el-table-column prop="code" label="无人机码"> </el-table-column>
|
||||||
<el-table-column prop="ip" label="IP"> </el-table-column>
|
<el-table-column prop="ip" label="IP"> </el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间"> </el-table-column>
|
<el-table-column prop="createTime" label="创建时间"> </el-table-column>
|
||||||
@ -128,60 +131,60 @@
|
|||||||
label-width="110px"
|
label-width="110px"
|
||||||
class="change-password-form"
|
class="change-password-form"
|
||||||
>
|
>
|
||||||
<template v-if="queryForm.type === 'uav'">
|
<template v-if="queryForm.type === 'uav'">
|
||||||
<el-form-item label="无人机名称" prop="name1">
|
<el-form-item label="无人机名称" prop="name1">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.name1"
|
v-model="device.form.name1"
|
||||||
placeholder="请输入无人机名称"
|
placeholder="请输入无人机名称"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="无人机码" prop="code">
|
<el-form-item label="无人机码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.code"
|
v-model="device.form.code"
|
||||||
placeholder="请输入无人机码"
|
placeholder="请输入无人机码"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="IP" prop="ip1">
|
<el-form-item label="IP" prop="ip1">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.ip1"
|
v-model="device.form.ip1"
|
||||||
placeholder="请输入无人机IP"
|
placeholder="请输入无人机IP"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-form-item label="雷达名称" prop="name2">
|
<el-form-item label="雷达名称" prop="name2">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.name2"
|
v-model="device.form.name2"
|
||||||
placeholder="请输入雷达名称"
|
placeholder="请输入雷达名称"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="雷达类型" prop="type">
|
<el-form-item label="雷达类型" prop="type">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.type"
|
v-model="device.form.type"
|
||||||
placeholder="请输入雷达类型"
|
placeholder="请输入雷达类型"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
disabled
|
disabled
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="IP" prop="ip2">
|
<el-form-item label="IP" prop="ip2">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.ip2"
|
v-model="device.form.ip2"
|
||||||
placeholder="请输入雷达IP"
|
placeholder="请输入雷达IP"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns" slot="footer">
|
<div class="btns" slot="footer">
|
||||||
|
|||||||
@ -29,16 +29,17 @@ export default {
|
|||||||
uploadPictureInfo: {
|
uploadPictureInfo: {
|
||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
pictureData: [{
|
pictureData: [
|
||||||
id: 1,
|
// {
|
||||||
jobName: '任务1',
|
// id: 1,
|
||||||
createTime: '2012-02-18 12:00:00'
|
// jobName: '任务1',
|
||||||
},
|
// createTime: '2012-02-18 12:00:00'
|
||||||
{
|
// },
|
||||||
id: 2,
|
// {
|
||||||
jobName: '任务2',
|
// id: 2,
|
||||||
createTime: '2012-02-18 12:00:00'
|
// jobName: '任务2',
|
||||||
}
|
// createTime: '2012-02-18 12:00:00'
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
page: {
|
page: {
|
||||||
size: 20,
|
size: 20,
|
||||||
@ -123,7 +124,7 @@ export default {
|
|||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log('图片分页', res.data.data)
|
console.log('图片分页', res.data.data)
|
||||||
let data = res.data.data.records
|
let data = res.data.data.records
|
||||||
// this.pictureData = data
|
this.pictureData = data
|
||||||
this.page.total = res.data.data.total
|
this.page.total = res.data.data.total
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.data.message)
|
this.$message.error(res.data.message)
|
||||||
|
|||||||
@ -44,13 +44,13 @@
|
|||||||
<div class="pic-time">拍摄时间:{{ item.createTime }}</div>
|
<div class="pic-time">拍摄时间:{{ item.createTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pic-command">
|
<div class="pic-command">
|
||||||
<el-tooltip effect="dark" content="修改名称" placement="left">
|
<el-tooltip effect="dark" content="修改名称" placement="top">
|
||||||
<i
|
<i
|
||||||
class="el-icon-edit-outline"
|
class="el-icon-edit-outline"
|
||||||
@click.stop="editPictureName(item)"
|
@click.stop="editPictureName(item)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="删除" placement="right">
|
<el-tooltip effect="dark" content="删除" placement="top">
|
||||||
<i
|
<i
|
||||||
class="el-icon-close delete-task"
|
class="el-icon-close delete-task"
|
||||||
@click.stop="deletePicture(item)"
|
@click.stop="deletePicture(item)"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -171,12 +171,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right-part {
|
.right-part {
|
||||||
width: 40px;
|
width: 60px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
justify-content: space-between;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 0 5px;
|
||||||
|
|
||||||
>i {
|
>i {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -543,4 +543,12 @@
|
|||||||
::v-deep .right-content {
|
::v-deep .right-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep input {
|
||||||
|
background-color: #00000052;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep select {
|
||||||
|
background-color: #00000052;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<span class="remote-header">
|
<span class="remote-header">
|
||||||
<i class="ri-task-line"></i>
|
<i class="ri-function-add-line"></i>
|
||||||
任务列表
|
任务列表
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -36,7 +36,10 @@
|
|||||||
></span>
|
></span>
|
||||||
<span class="task-execute">{{ item.name }}</span>
|
<span class="task-execute">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="task-info" :style="{color:dealStatusColor(item.statusName)}">
|
<div
|
||||||
|
class="task-info"
|
||||||
|
:style="{ color: dealStatusColor(item.statusName) }"
|
||||||
|
>
|
||||||
{{ item.statusName }}
|
{{ item.statusName }}
|
||||||
<!-- <i class="el-icon-camera"></i>-->
|
<!-- <i class="el-icon-camera"></i>-->
|
||||||
<!-- <span class="task-name">{{ item.name }}</span>-->
|
<!-- <span class="task-name">{{ item.name }}</span>-->
|
||||||
@ -56,13 +59,16 @@
|
|||||||
<!-- <i class="ri-repeat-line" @click.stop="reRunTask(item)"></i>-->
|
<!-- <i class="ri-repeat-line" @click.stop="reRunTask(item)"></i>-->
|
||||||
|
|
||||||
<!-- </el-tooltip>-->
|
<!-- </el-tooltip>-->
|
||||||
<el-tooltip effect="dark" content="修改名称" placement="right">
|
<el-tooltip effect="dark" content="修改名称" placement="top">
|
||||||
<i
|
<i
|
||||||
class="el-icon-edit-outline"
|
class="el-icon-edit-outline"
|
||||||
@click.stop="editTaskName(item)"
|
@click.stop="editTaskName(item)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="删除" placement="right">
|
<el-tooltip effect="dark" content="复制" placement="top">
|
||||||
|
<i class="ri-file-copy-2-line" @click.stop="copyTask(item)"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip effect="dark" content="删除" placement="top">
|
||||||
<i
|
<i
|
||||||
class="el-icon-close delete-task"
|
class="el-icon-close delete-task"
|
||||||
@click.stop="deleteTask(item)"
|
@click.stop="deleteTask(item)"
|
||||||
@ -104,6 +110,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="mode" label="飞行模式">
|
<el-form-item prop="mode" label="飞行模式">
|
||||||
<el-select
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="duringDraw || airlineCreateInfo.during"
|
:disabled="duringDraw || airlineCreateInfo.during"
|
||||||
@change="onModeChange"
|
@change="onModeChange"
|
||||||
@ -124,12 +131,14 @@
|
|||||||
>
|
>
|
||||||
<div class="form-item-command">
|
<div class="form-item-command">
|
||||||
<el-select
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="duringDraw"
|
:disabled="duringDraw"
|
||||||
v-model="form.targetChoose"
|
v-model="form.targetChoose"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in drawOptions"
|
v-for="item in drawOptions"
|
||||||
|
:disabled="getDrawTargetDisabled(item)"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@ -169,6 +178,7 @@
|
|||||||
>
|
>
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<el-select
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
size="mini"
|
size="mini"
|
||||||
@change="
|
@change="
|
||||||
(value) => handleSelfDirectionChange(value, item, index)
|
(value) => handleSelfDirectionChange(value, item, index)
|
||||||
@ -239,7 +249,11 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<el-form-item prop="uav" label="无人机">
|
<el-form-item prop="uav" label="无人机">
|
||||||
<el-select size="small" v-model="form.uav">
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.uav"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in uavOptions"
|
v-for="item in uavOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -264,7 +278,11 @@
|
|||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item prop="loader" label="载荷">
|
<el-form-item prop="loader" label="载荷">
|
||||||
<el-select size="small" v-model="form.loader">
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.loader"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in loaderOptions"
|
v-for="item in loaderOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -305,12 +323,29 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="ratio" label="分辨率">
|
<el-form-item prop="ratio" label="分辨率">
|
||||||
<el-select
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
size="small"
|
size="small"
|
||||||
@change="calculateLimit"
|
@change="calculateLimit"
|
||||||
v-model="form.ratio"
|
v-model="form.ratio"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in sarResolutionOptions"
|
v-for="item in sarResolutionOptions"
|
||||||
|
:disabled="getRatioDisabled(item, index)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成像模式" prop="imageMode">
|
||||||
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.imageMode"
|
||||||
|
@change="onImageModeChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in sarImageModeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@ -360,7 +395,11 @@
|
|||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="自动聚焦">
|
<el-form-item label="自动聚焦">
|
||||||
<el-select size="small" v-model="form.autoFocus">
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.autoFocus"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in focusOptions"
|
v-for="item in focusOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -370,7 +409,11 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="运动补偿">
|
<el-form-item label="运动补偿">
|
||||||
<el-select size="small" v-model="form.moto">
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.moto"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in motoOptions"
|
v-for="item in motoOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -388,13 +431,18 @@
|
|||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图像位数">
|
<el-form-item label="图像位数">
|
||||||
<el-select size="small" v-model="form.imageBit">
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.imageBit"
|
||||||
|
>
|
||||||
<el-option label="8bit" :value="0"></el-option>
|
<el-option label="8bit" :value="0"></el-option>
|
||||||
<el-option label="16bit" :value="1"></el-option>
|
<el-option label="16bit" :value="1"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="侧视方向" v-if="form.mode !== '3'">
|
<el-form-item label="侧视方向" v-if="form.mode !== '3'">
|
||||||
<el-select
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
size="small"
|
size="small"
|
||||||
@change="handleDirectionChange"
|
@change="handleDirectionChange"
|
||||||
v-model="form.direction"
|
v-model="form.direction"
|
||||||
@ -408,7 +456,11 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="极化方式">
|
<el-form-item label="极化方式">
|
||||||
<el-select size="small" v-model="form.polarization">
|
<el-select
|
||||||
|
popper-class="form-light"
|
||||||
|
size="small"
|
||||||
|
v-model="form.polarization"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in polarizationOptions"
|
v-for="item in polarizationOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
|||||||
@ -107,11 +107,9 @@ export default class LineTarget {
|
|||||||
DT.Cesium.Cartesian3.multiplyByScalar(endToStartDirection, distanceOne + distanceTwo, flyToStart)
|
DT.Cesium.Cartesian3.multiplyByScalar(endToStartDirection, distanceOne + distanceTwo, flyToStart)
|
||||||
DT.Cesium.Cartesian3.add(openToStart, this.positions[0], openToStart)
|
DT.Cesium.Cartesian3.add(openToStart, this.positions[0], openToStart)
|
||||||
DT.Cesium.Cartesian3.add(flyToStart, this.positions[0], flyToStart)
|
DT.Cesium.Cartesian3.add(flyToStart, this.positions[0], flyToStart)
|
||||||
// console.log('开机点', openToStart)
|
|
||||||
|
|
||||||
// let cat1 = DT.Cesium.Cartographic.fromCartesian(openToStart)
|
// let cat1 = DT.Cesium.Cartographic.fromCartesian(openToStart)
|
||||||
// let cat2 = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
// let cat2 = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
||||||
// console.log('开机点高度', cat1.height , cat2.height)
|
|
||||||
// 求关机点
|
// 求关机点
|
||||||
let startToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
let startToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
||||||
DT.Cesium.Cartesian3.subtract(this.positions[1], this.positions[0], startToEndDirection)
|
DT.Cesium.Cartesian3.subtract(this.positions[1], this.positions[0], startToEndDirection)
|
||||||
@ -122,7 +120,6 @@ export default class LineTarget {
|
|||||||
DT.Cesium.Cartesian3.multiplyByScalar(startToEndDirection, distanceOne + distanceTwo, flyToEnd)
|
DT.Cesium.Cartesian3.multiplyByScalar(startToEndDirection, distanceOne + distanceTwo, flyToEnd)
|
||||||
DT.Cesium.Cartesian3.add(openToEnd, this.positions[1], openToEnd)
|
DT.Cesium.Cartesian3.add(openToEnd, this.positions[1], openToEnd)
|
||||||
DT.Cesium.Cartesian3.add(flyToEnd, this.positions[1], flyToEnd)
|
DT.Cesium.Cartesian3.add(flyToEnd, this.positions[1], flyToEnd)
|
||||||
// console.log('关机点', openToEnd)
|
|
||||||
|
|
||||||
// 求成像区域中心经度,成像区域中心维度
|
// 求成像区域中心经度,成像区域中心维度
|
||||||
let boundaryLonLat = []
|
let boundaryLonLat = []
|
||||||
@ -154,7 +151,6 @@ export default class LineTarget {
|
|||||||
let center = [lon / 4, lat / 4] // 中心点坐标
|
let center = [lon / 4, lat / 4] // 中心点坐标
|
||||||
|
|
||||||
let center2 = [(centerLonLat[0].longitude + centerLonLat[1].longitude) / 2, (centerLonLat[0].latitude + centerLonLat[1].latitude) / 2] // 中心点坐标
|
let center2 = [(centerLonLat[0].longitude + centerLonLat[1].longitude) / 2, (centerLonLat[0].latitude + centerLonLat[1].latitude) / 2] // 中心点坐标
|
||||||
// console.log('中心区域', center)
|
|
||||||
|
|
||||||
let areaEndCenter = DT.Cesium.Cartesian3.fromDegrees(
|
let areaEndCenter = DT.Cesium.Cartesian3.fromDegrees(
|
||||||
(boundaryLonLat[0].longitude + boundaryLonLat[1].longitude) / 2,
|
(boundaryLonLat[0].longitude + boundaryLonLat[1].longitude) / 2,
|
||||||
@ -180,7 +176,6 @@ export default class LineTarget {
|
|||||||
let groundOpenToStart2 = new DT.Cesium.Cartesian3() // 开机点
|
let groundOpenToStart2 = new DT.Cesium.Cartesian3() // 开机点
|
||||||
DT.Cesium.Cartesian3.multiplyByScalar(groundEndToStartDirection2, distanceTwo, groundOpenToStart2)
|
DT.Cesium.Cartesian3.multiplyByScalar(groundEndToStartDirection2, distanceTwo, groundOpenToStart2)
|
||||||
DT.Cesium.Cartesian3.add(groundOpenToStart2, areaStartCenter2, groundOpenToStart2)
|
DT.Cesium.Cartesian3.add(groundOpenToStart2, areaStartCenter2, groundOpenToStart2)
|
||||||
// console.log('地面开机', groundOpenToStart)
|
|
||||||
|
|
||||||
// 求地面关机点
|
// 求地面关机点
|
||||||
// let groundStartToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
// let groundStartToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
||||||
@ -189,20 +184,15 @@ export default class LineTarget {
|
|||||||
// let groundOpenToEnd = new DT.Cesium.Cartesian3() // 开机点
|
// let groundOpenToEnd = new DT.Cesium.Cartesian3() // 开机点
|
||||||
// DT.Cesium.Cartesian3.multiplyByScalar(groundStartToEndDirection, distanceTwo, groundOpenToEnd)
|
// DT.Cesium.Cartesian3.multiplyByScalar(groundStartToEndDirection, distanceTwo, groundOpenToEnd)
|
||||||
// DT.Cesium.Cartesian3.add(groundOpenToEnd, areaEndCenter, groundOpenToEnd)
|
// DT.Cesium.Cartesian3.add(groundOpenToEnd, areaEndCenter, groundOpenToEnd)
|
||||||
// console.log('地面关机', groundOpenToEnd)
|
|
||||||
// 成像区域幅宽和方位长度
|
// 成像区域幅宽和方位长度
|
||||||
let width = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.crossPositions[1])
|
let width = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.crossPositions[1])
|
||||||
let width2 = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.centerPositions[0]) * 2
|
let width2 = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.centerPositions[0]) * 2
|
||||||
let length = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[1], this.wave.crossPositions[2])
|
let length = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[1], this.wave.crossPositions[2])
|
||||||
// console.log('幅宽', width, length)
|
|
||||||
// 轴向角度
|
// 轴向角度
|
||||||
let point1 = turf.point([centerLonLat[0].longitude, centerLonLat[0].latitude]);
|
let point1 = turf.point([centerLonLat[0].longitude, centerLonLat[0].latitude]);
|
||||||
let point2 = turf.point([centerLonLat[1].longitude, centerLonLat[1].latitude]);
|
let point2 = turf.point([centerLonLat[1].longitude, centerLonLat[1].latitude]);
|
||||||
let bearing = turf.bearing(point1, point2) + 180
|
let bearing = turf.bearing(point1, point2) + 180
|
||||||
// console.log('角度12', bearing)
|
|
||||||
// console.log('高度123', this.viewer.cesiumViewer.terrainProvider)
|
|
||||||
// DT.Cesium.sampleTerrainMostDetailed(this.viewer.cesiumViewer.terrainProvider, [DT.Cesium.Cartographic.fromDegrees(center[0], center[1])]).then(res => {
|
// DT.Cesium.sampleTerrainMostDetailed(this.viewer.cesiumViewer.terrainProvider, [DT.Cesium.Cartographic.fromDegrees(center[0], center[1])]).then(res => {
|
||||||
// console.log('海拔', res)
|
|
||||||
// })
|
// })
|
||||||
let startCat = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
let startCat = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
||||||
let endCat = DT.Cesium.Cartographic.fromCartesian(flyToEnd)
|
let endCat = DT.Cesium.Cartographic.fromCartesian(flyToEnd)
|
||||||
@ -240,9 +230,6 @@ export default class LineTarget {
|
|||||||
boundaryLonLat: boundaryLonLat,
|
boundaryLonLat: boundaryLonLat,
|
||||||
direction: this.rotation > 0 ? 1 : -1,
|
direction: this.rotation > 0 ? 1 : -1,
|
||||||
}
|
}
|
||||||
console.log('下视角', this.rotation)
|
|
||||||
console.log('擦地角', 90 - Math.abs(this.rotation))
|
|
||||||
console.log('最后参数', info)
|
|
||||||
if (this.showTemp) {
|
if (this.showTemp) {
|
||||||
this.tempCollection.forEach(temp => {
|
this.tempCollection.forEach(temp => {
|
||||||
viewer.entities.remove(temp)
|
viewer.entities.remove(temp)
|
||||||
@ -485,6 +472,19 @@ export default class LineTarget {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restoreTarget(info) {
|
||||||
|
let startPosition = DT.Cesium.Cartesian3.fromDegrees(info.flightStartLon, info.flightStartLat, info.flightStartHeight)
|
||||||
|
let endPosition = DT.Cesium.Cartesian3.fromDegrees(info.flightEndLon, info.flightEndLat, info.flightEndHeight)
|
||||||
|
this.positions = [startPosition, endPosition]
|
||||||
|
this.createMark(startPosition, true)
|
||||||
|
this.createMark(endPosition, false)
|
||||||
|
this.createPolyline()
|
||||||
|
this.addUav()
|
||||||
|
this.addWave()
|
||||||
|
this.addMoveHandler()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
createMark(position, start = true) {
|
createMark(position, start = true) {
|
||||||
let cat = DT.Cesium.Cartographic.fromCartesian(position)
|
let cat = DT.Cesium.Cartographic.fromCartesian(position)
|
||||||
let lon = Math.round(DT.Cesium.Math.toDegrees(cat.longitude) * 10000000000000) / 10000000000000
|
let lon = Math.round(DT.Cesium.Math.toDegrees(cat.longitude) * 10000000000000) / 10000000000000
|
||||||
@ -573,7 +573,6 @@ export default class LineTarget {
|
|||||||
shadows: DT.Cesium.ShadowMode.DISABLED
|
shadows: DT.Cesium.ShadowMode.DISABLED
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
console.log('加载的无人机', this.uavEntity)
|
|
||||||
}
|
}
|
||||||
changeWaveAngle(value) {
|
changeWaveAngle(value) {
|
||||||
this.angle = value
|
this.angle = value
|
||||||
@ -633,9 +632,6 @@ export default class LineTarget {
|
|||||||
if (this.rotation < 0) {
|
if (this.rotation < 0) {
|
||||||
modifyAngle = 0 - modifyAngle
|
modifyAngle = 0 - modifyAngle
|
||||||
}
|
}
|
||||||
console.log('旋转角度和波束半角', this.rotation, this.angle)
|
|
||||||
console.log('距离', distanceOne, distanceTwo, distanceThree, angleOne)
|
|
||||||
console.log('修正角度', modifyAngle)
|
|
||||||
this.wave = new LineWave({color: DT.Cesium.Color.RED,viewer: this.viewer, startPosition: this.positions[0], endPosition: this.positions[1], angle: this.angle - Math.abs(modifyAngle/2), rotation: this.rotation- modifyAngle/2, offsetAngle: modifyAngle/2 })
|
this.wave = new LineWave({color: DT.Cesium.Color.RED,viewer: this.viewer, startPosition: this.positions[0], endPosition: this.positions[1], angle: this.angle - Math.abs(modifyAngle/2), rotation: this.rotation- modifyAngle/2, offsetAngle: modifyAngle/2 })
|
||||||
this.viewer.primitives.add(this.wave.primitive)
|
this.viewer.primitives.add(this.wave.primitive)
|
||||||
this.viewer.entities.add(this.wave.crossLine)
|
this.viewer.entities.add(this.wave.crossLine)
|
||||||
@ -774,7 +770,6 @@ export default class LineTarget {
|
|||||||
let result = new DT.Cesium.Cartesian3()
|
let result = new DT.Cesium.Cartesian3()
|
||||||
DT.Cesium.Cartesian3.lerp(cartesian, this.viewer.cesiumViewer.camera.positionWC, ratio, result)
|
DT.Cesium.Cartesian3.lerp(cartesian, this.viewer.cesiumViewer.camera.positionWC, ratio, result)
|
||||||
// let cat = DT.Cesium.Cartographic.fromCartesian(result)
|
// let cat = DT.Cesium.Cartographic.fromCartesian(result)
|
||||||
// console.log('拾取的位置相机', cat.height )
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -836,10 +831,6 @@ export class LineWave {
|
|||||||
this.bottomHorizontalLength = Math.tan(halfAngleRadians) * this.length
|
this.bottomHorizontalLength = Math.tan(halfAngleRadians) * this.length
|
||||||
this.bottomVerticalLength = this.lineLength
|
this.bottomVerticalLength = this.lineLength
|
||||||
this.offsetAngle = options.offsetAngle ? options.offsetAngle : 0
|
this.offsetAngle = options.offsetAngle ? options.offsetAngle : 0
|
||||||
console.log('角度是啥', this.angle)
|
|
||||||
console.log('旋转是啥', this.rotation)
|
|
||||||
console.log('修正是啥', this.offsetAngle)
|
|
||||||
console.log('旋转+修正是啥', this.offsetAngle + this.rotation)
|
|
||||||
this.createWave()
|
this.createWave()
|
||||||
this.createEdge()
|
this.createEdge()
|
||||||
}
|
}
|
||||||
@ -894,9 +885,7 @@ export class LineWave {
|
|||||||
|
|
||||||
|
|
||||||
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
||||||
console.log('角度', this.rotation)
|
|
||||||
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
||||||
console.log('四元数', rotationQuaternion)
|
|
||||||
let combineQuaternion = new DT.Cesium.Quaternion()
|
let combineQuaternion = new DT.Cesium.Quaternion()
|
||||||
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
||||||
let rotation = DT.Cesium.Matrix4.fromTranslationQuaternionRotationScale(this.middlePosition, combineQuaternion, DT.Cesium.Cartesian3.ONE)
|
let rotation = DT.Cesium.Matrix4.fromTranslationQuaternionRotationScale(this.middlePosition, combineQuaternion, DT.Cesium.Cartesian3.ONE)
|
||||||
@ -938,7 +927,6 @@ export class LineWave {
|
|||||||
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
||||||
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
||||||
let rotationQuaternionCenter = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, (this.rotation + this.offsetAngle) * Math.PI / 180)
|
let rotationQuaternionCenter = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, (this.rotation + this.offsetAngle) * Math.PI / 180)
|
||||||
// console.log('四元数计算角度', this.rotation + this.offsetAngle)
|
|
||||||
let combineQuaternion = new DT.Cesium.Quaternion()
|
let combineQuaternion = new DT.Cesium.Quaternion()
|
||||||
let combineQuaternionCenter = new DT.Cesium.Quaternion()
|
let combineQuaternionCenter = new DT.Cesium.Quaternion()
|
||||||
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
||||||
@ -1001,7 +989,6 @@ export class LineWave {
|
|||||||
DT.Cesium.Cartesian3.clone(start, ray.origin);
|
DT.Cesium.Cartesian3.clone(start, ray.origin);
|
||||||
DT.Cesium.Cartesian3.subtract(end, start, ray.direction);
|
DT.Cesium.Cartesian3.subtract(end, start, ray.direction);
|
||||||
let position = this.viewer.cesiumViewer.scene.globe.pick(ray, this.viewer.cesiumViewer.scene)
|
let position = this.viewer.cesiumViewer.scene.globe.pick(ray, this.viewer.cesiumViewer.scene)
|
||||||
console.log('交点', position)
|
|
||||||
return position
|
return position
|
||||||
}
|
}
|
||||||
findCrossPoint(start, end) {
|
findCrossPoint(start, end) {
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import {
|
|||||||
getRadarListData,
|
getRadarListData,
|
||||||
getTaskItemDetail,
|
getTaskItemDetail,
|
||||||
getTaskListData,
|
getTaskListData,
|
||||||
|
getExecJobs,
|
||||||
getUavListData,
|
getUavListData,
|
||||||
reRunTask, stopTaskFly
|
reRunTask, stopTaskFly
|
||||||
} from '@/api/task'
|
} from '@/api/task'
|
||||||
@ -91,12 +92,14 @@ export default {
|
|||||||
},
|
},
|
||||||
taskList: {
|
taskList: {
|
||||||
visible: true,
|
visible: true,
|
||||||
data: [{
|
data: [
|
||||||
status: 1,
|
//{
|
||||||
name: '巡查任务',
|
// status: 1,
|
||||||
statusName: '巡查中',
|
// name: '巡查任务',
|
||||||
beginTime: '2026-01-23 12:14:45'
|
// statusName: '巡查中',
|
||||||
}]
|
// beginTime: '2026-01-23 12:14:45'
|
||||||
|
//}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
weatherInfo2: {
|
weatherInfo2: {
|
||||||
visible: true,
|
visible: true,
|
||||||
@ -1069,7 +1072,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getTaskList() {
|
getTaskList() {
|
||||||
getTaskListData({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => {
|
// getTaskListData({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => {
|
||||||
|
getExecJobs({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log('任务列表', res.data.data)
|
console.log('任务列表', res.data.data)
|
||||||
let data = res.data.data
|
let data = res.data.data
|
||||||
|
|||||||
@ -5,7 +5,8 @@ import {
|
|||||||
import PicturesUpload from '../pictures-upload/index.vue'
|
import PicturesUpload from '../pictures-upload/index.vue'
|
||||||
import RightSlide from '@/components/RightSlide.vue'
|
import RightSlide from '@/components/RightSlide.vue'
|
||||||
import LeftSlide from '@/components/LeftSlide.vue'
|
import LeftSlide from '@/components/LeftSlide.vue'
|
||||||
|
import { userRemove, userList, userUpdate, userSave } from '@/api/user'
|
||||||
|
import md5 from 'js-md5'
|
||||||
let taskListResource = []
|
let taskListResource = []
|
||||||
export default {
|
export default {
|
||||||
name: 'TwinSituation',
|
name: 'TwinSituation',
|
||||||
@ -19,27 +20,39 @@ export default {
|
|||||||
LeftSlide,
|
LeftSlide,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const cfPsdRule = (rule, value, callback) => {
|
||||||
|
if (value === '' || typeof value === 'undefined') {
|
||||||
|
callback(new Error('请再次输入密码'))
|
||||||
|
} else if (value !== this.user.form.password) {
|
||||||
|
callback(new Error('两次输入密码不一致!'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
visibleLocale: false,
|
visibleLocale: false,
|
||||||
deviceData: [
|
userData: [
|
||||||
{
|
// {
|
||||||
name: '无人机1',
|
// name: '无人机1',
|
||||||
num: 'M3127',
|
// num: 'M3127',
|
||||||
location: '112.3423242,45.2312324'
|
// location: '112.3423242,45.2312324'
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
device: {
|
user: {
|
||||||
visible: false,
|
visible: false,
|
||||||
form: {},
|
form: {
|
||||||
|
account: ''
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
deviceName: [
|
account: [
|
||||||
{ required: true, message: '请输入设备名称', trigger: 'blur' }
|
{ required: true, message: '请输入用户名称', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
num: [
|
password: [
|
||||||
{ required: true, message: '请输入设备编号', trigger: 'blur' }
|
{ required: true, message: '请输入用户密码', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
location: [
|
confirmPassword: [
|
||||||
{ required: true, message: '请输入设备位置', trigger: 'blur' }
|
{ required: true, message: '请再次输入密码', trigger: 'blur' },
|
||||||
|
{ required: true, validator: cfPsdRule, trigger: 'blur' },
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -64,41 +77,61 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.userPage()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addDevice() {
|
userPage() {
|
||||||
this.device.visible = true
|
userList().then(res => {
|
||||||
|
this.userData = res.data.data
|
||||||
|
})
|
||||||
},
|
},
|
||||||
editDevice(form) {
|
addUser() {
|
||||||
this.device.visible = true
|
this.user.visible = true
|
||||||
this.device.form = form
|
|
||||||
},
|
},
|
||||||
detailDevice() {
|
editUser(form) {
|
||||||
this.device.visible = true
|
this.user.visible = true
|
||||||
this.device.form = form
|
this.user.form.account = form.account
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$refs.form.resetFields()
|
this.$refs.form.resetFields()
|
||||||
this.device.visible = false
|
this.user.visible = false
|
||||||
},
|
},
|
||||||
submitDevice() {
|
async submitUser() {
|
||||||
this.$refs.form.validate((valid) => {
|
const valid = await this.$refs.form.validate(valid)
|
||||||
console.log(valid, 3333333);
|
if (!valid) return
|
||||||
|
delete this.user.form.confirmPassword
|
||||||
})
|
const form = { ...this.user.form }
|
||||||
|
form.password = md5(form.password)
|
||||||
|
if (form.id) {
|
||||||
|
userUpdate(this.user.form).then(res => {
|
||||||
|
this.$message.success('更新用户成功')
|
||||||
|
this.userPage()
|
||||||
|
this.close()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
userSave(form).then(res => {
|
||||||
|
this.$message.success('新增用户成功')
|
||||||
|
this.userPage()
|
||||||
|
this.close()
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async deleteDevice() {
|
async deleteUser(row) {
|
||||||
const bool = await this.$confirm('确认要永久删除该设备吗?', '提示', {
|
const bool = await this.$confirm('确认要永久删除该用户吗?', '提示', {
|
||||||
customClass: 'confirm-light',
|
customClass: 'confirm-light',
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
console.log(bool, 333);
|
if (!bool) return
|
||||||
|
userRemove([row.id]).then(res => {
|
||||||
|
this.$message.success('删除用户成功')
|
||||||
|
this.userPage()
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
//#region 无人机详情代码
|
//#region 无人机详情代码
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>.device-name {
|
>.user-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 110px;
|
width: 110px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -175,7 +175,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-location {
|
.user-location {
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -190,14 +190,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-lock {
|
.user-lock {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #ffff00;
|
color: #ffff00;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-status {
|
.user-status {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -280,7 +280,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uav-item .device-name {
|
.uav-item .user-name {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,3 +305,8 @@
|
|||||||
top: $--icon-mode-larger-card-top;
|
top: $--icon-mode-larger-card-top;
|
||||||
transition: 0.2s ease-in-out;
|
transition: 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .el-icon-plus {
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
|||||||
@ -2,15 +2,13 @@
|
|||||||
<!-- 资源列表 -->
|
<!-- 资源列表 -->
|
||||||
<dt-card
|
<dt-card
|
||||||
class="resource-list card-light"
|
class="resource-list card-light"
|
||||||
icon="iconfont icon-left_icon_remote"
|
|
||||||
title="可用资源"
|
|
||||||
:visible.sync="visibleLocale"
|
:visible.sync="visibleLocale"
|
||||||
:scroll="false"
|
:scroll="false"
|
||||||
:showClose="false"
|
:showClose="false"
|
||||||
:showDivider="false"
|
:showDivider="false"
|
||||||
>
|
>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<el-form
|
<!-- <el-form
|
||||||
class="query-form"
|
class="query-form"
|
||||||
:model="queryForm"
|
:model="queryForm"
|
||||||
inline
|
inline
|
||||||
@ -24,35 +22,21 @@
|
|||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="设备类型">
|
|
||||||
<el-select
|
|
||||||
v-model="queryForm.name"
|
|
||||||
placeholder="请输入设备类型"
|
|
||||||
popper-class="select-light"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in deviceTypes"
|
|
||||||
:key="item.value"
|
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item class="query-btn">
|
<el-form-item class="query-btn">
|
||||||
<el-button>查询</el-button>
|
<el-button>查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form> -->
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:command>
|
<template v-slot:command>
|
||||||
<el-button size="mini" icon="el-icon-plus" @click="addDevice"
|
<el-button size="mini" icon="el-icon-plus" @click="addUser"
|
||||||
>新增用户</el-button
|
>新增用户</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<el-table :data="deviceData" style="width: 100%">
|
<el-table :data="userData" style="width: 100%" height="100%">
|
||||||
<el-table-column prop="name" label="用户名称"> </el-table-column>
|
<el-table-column prop="id" label="ID"> </el-table-column>
|
||||||
<el-table-column prop="num" label="手机号"> </el-table-column>
|
<el-table-column prop="account" label="用户名称"> </el-table-column>
|
||||||
<el-table-column prop="location" label="邮箱"> </el-table-column>
|
<!-- <el-table-column prop="updateTime" label="更新时间"> </el-table-column> -->
|
||||||
|
<!-- <el-table-column prop="location" label="账号状态"> </el-table-column> -->
|
||||||
<el-table-column label="操作" width="200">
|
<el-table-column label="操作" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -60,29 +44,22 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
size="mini"
|
size="mini"
|
||||||
circle
|
circle
|
||||||
@click="editDevice(scope.row)"
|
@click="editUser(scope.row)"
|
||||||
></el-button>
|
|
||||||
<el-button
|
|
||||||
type="info"
|
|
||||||
icon="ri-file-line"
|
|
||||||
size="mini"
|
|
||||||
circle
|
|
||||||
@click="detailDevice(scope.row)"
|
|
||||||
></el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
size="mini"
|
size="mini"
|
||||||
circle
|
circle
|
||||||
@click="deleteDevice(scope.row)"
|
@click="deleteUser(scope.row)"
|
||||||
></el-button>
|
></el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<dt-dialog
|
<dt-dialog
|
||||||
class="dialog-light"
|
class="dialog-light"
|
||||||
:title="device.form.deviceId ? '编辑用户' : '新增用户'"
|
:title="user.form.userId ? '编辑用户' : '新增用户'"
|
||||||
:visible.sync="device.visible"
|
:visible.sync="user.visible"
|
||||||
top="20vh"
|
top="20vh"
|
||||||
width="22%"
|
width="22%"
|
||||||
append-to-body
|
append-to-body
|
||||||
@ -91,43 +68,48 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="device.form"
|
:model="user.form"
|
||||||
:rules="device.rules"
|
:rules="user.rules"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
label-width="110px"
|
label-width="110px"
|
||||||
class="change-password-form"
|
class="change-password-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户名称" prop="deviceName">
|
<el-form-item label="用户名称" prop="account">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.deviceName"
|
name="account"
|
||||||
|
autocomplete="account"
|
||||||
|
v-model="user.form.account"
|
||||||
placeholder="请输入用户名称"
|
placeholder="请输入用户名称"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="用户密码" prop="password">
|
||||||
|
<el-input
|
||||||
|
name="password"
|
||||||
|
autocomplete="new-password"
|
||||||
|
v-model="user.form.password"
|
||||||
|
placeholder="请输入用户密码"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
show-password
|
show-password
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="确认密码" prop="confirmPassword">
|
||||||
<el-form-item label="手机号" prop="num">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="device.form.num"
|
v-model="user.form.confirmPassword"
|
||||||
placeholder="请输入用户手机号"
|
placeholder="请再次输入密码"
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="邮箱" prop="location">
|
|
||||||
<el-input
|
|
||||||
v-model="device.form.location"
|
|
||||||
placeholder="请输入用户邮箱"
|
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
|
show-password
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns" slot="footer">
|
<div class="btns" slot="footer">
|
||||||
<el-button @click="close" size="mini">取 消</el-button>
|
<el-button @click="close" size="mini">取 消</el-button>
|
||||||
<el-button type="primary" size="mini" @click="submitDevice"
|
<el-button type="primary" size="mini" @click="submitUser"
|
||||||
>确 定</el-button
|
>确 定</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -477,7 +477,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
menusChose: {
|
menusChose: {
|
||||||
handler: function (nv) {
|
handler: function (nv) {
|
||||||
console.log(nv, 33333333333);
|
window.localStorage.setItem('menusChose', nv)
|
||||||
switch (nv) {
|
switch (nv) {
|
||||||
case '1':
|
case '1':
|
||||||
this.menus.situation.active = true
|
this.menus.situation.active = true
|
||||||
@ -516,7 +516,6 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
|
||||||
},
|
},
|
||||||
// viewMode(nv) {
|
// viewMode(nv) {
|
||||||
// this.sendMessageByBroadcastChannel({ type: 'viewMode', form: 'home', value: nv })
|
// this.sendMessageByBroadcastChannel({ type: 'viewMode', form: 'home', value: nv })
|
||||||
@ -538,6 +537,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const menusChose = window.localStorage.getItem('menusChose')
|
||||||
|
this.SET_MENUS_CHOSE(menusChose)
|
||||||
// this.init()
|
// this.init()
|
||||||
// this.getResourceData()
|
// this.getResourceData()
|
||||||
// 获取字典
|
// 获取字典
|
||||||
@ -625,7 +626,7 @@ export default {
|
|||||||
'SET_MAP_TYPE',
|
'SET_MAP_TYPE',
|
||||||
'SET_SPLIT_VISIBLE',
|
'SET_SPLIT_VISIBLE',
|
||||||
]),
|
]),
|
||||||
...mapMutations('app', ['SET_THEME']),
|
...mapMutations('app', ['SET_THEME', 'SET_MENUS_CHOSE']),
|
||||||
...mapActions('dict', ['getDict']),
|
...mapActions('dict', ['getDict']),
|
||||||
// 工具栏操作
|
// 工具栏操作
|
||||||
toggleTools(tool) {
|
toggleTools(tool) {
|
||||||
|
|||||||
@ -197,6 +197,7 @@ export default {
|
|||||||
path: this.redirect || '/',
|
path: this.redirect || '/',
|
||||||
query: this.otherQuery,
|
query: this.otherQuery,
|
||||||
})
|
})
|
||||||
|
window.localStorage.setItem('menusChose', '1')
|
||||||
console.log(this.$router, 'this.$router')
|
console.log(this.$router, 'this.$router')
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user