Merge branch 'main' of http://123.132.248.154:10000/gitY/DiKongGanZhiPingTai
commit
17960dfa5b
Binary file not shown.
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 428 B |
@ -0,0 +1,18 @@
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
enum Api {
|
||||
GetUavList = '/api/Manage/GetUavList',
|
||||
AddWorkspace = '/api/Manage/AddWorkspace'
|
||||
}
|
||||
|
||||
export function GetUavList(params?) {
|
||||
return defHttp.get({
|
||||
url: Api.GetUavList,
|
||||
params
|
||||
});
|
||||
}
|
||||
export function AddWorkspace(params) {
|
||||
return defHttp.post({
|
||||
url: Api.AddWorkspace,
|
||||
params
|
||||
});
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div class="search-div">
|
||||
<a-input class="search-input" v-model:value="searchInput" placeholder="搜索">
|
||||
<template #suffix>
|
||||
<div class="search-icon" @click="search"></div>
|
||||
</template>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="setting-table-title-div">
|
||||
<div class="table-title-item" style="width: 29px;">
|
||||
</div>
|
||||
<div class="table-title-item" style="width: 121px;">
|
||||
设备名称
|
||||
</div>
|
||||
<div class="table-title-item" style="width: 121px;border-right: 0px;">设备型号</div>
|
||||
</div>
|
||||
<div class="setting-table-item" v-for="item in props.deviceList">
|
||||
<div class="table-item-col" style="width: 29px;">
|
||||
<a-checkbox class="item-check" :checked="getCheck(item.id)" @change="changeCheck(item)"></a-checkbox>
|
||||
</div>
|
||||
<div class="table-item-col" style="width: 121px;">
|
||||
{{ item.name }}
|
||||
<div class="user-icon" v-if="props.userId == item.id"></div>
|
||||
</div>
|
||||
<div class="table-item-col" style="width: 121px;">
|
||||
{{ item.account }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, defineProps, defineEmits } from "vue"
|
||||
const props = defineProps(['project','deviceList','userId'])
|
||||
const emits = defineEmits(['searchDevice'])
|
||||
const searchInput = ref("")
|
||||
const search = () => {
|
||||
emits('searchDevice',searchInput.value)
|
||||
}
|
||||
const changeCheck = (item) => {
|
||||
console.log(item)
|
||||
if(props.project.deviceIds.find(device => device.id == item.id)){
|
||||
props.project.deviceIds = props.project.deviceIds.filter(device => device.id != item.id)
|
||||
}else{
|
||||
props.project.deviceIds.push(item)
|
||||
}
|
||||
}
|
||||
const getCheck = (id) => {
|
||||
return props.project.deviceIds.find(item => item.id == id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-div{
|
||||
height: 30px;
|
||||
margin-bottom: 10px;
|
||||
.search-input{
|
||||
:deep(.ant-input){
|
||||
background: #17181F;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
background: #17181F;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15), 0px 0px 4px 0px rgba(58,87,232,0.48);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3B4154;
|
||||
color: #FFFFFF;
|
||||
.search-icon{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url('/public/projecthome/result_search_icon.png');
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.setting-table-title-div{
|
||||
display: flex;
|
||||
height: 30px;
|
||||
background: #2D3342;
|
||||
border-radius: 2px 2px 0px 0px;
|
||||
border-top: 1px solid #444B5F;
|
||||
border-left: 1px solid #444B5F;
|
||||
border-right: 1px solid #444B5F;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #FFFFFF;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
.table-title-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-right: 1px solid #444B5F;
|
||||
.sort-icon{
|
||||
width: 11px;
|
||||
height: 14px;
|
||||
background-image: url('/public/projecthome/table_sort_icon.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.setting-table-item{
|
||||
display: flex;
|
||||
height: 35px;
|
||||
border-bottom: 1px solid #444B5F ;
|
||||
border-left: 1px solid #444B5F ;
|
||||
border-right: 1px solid #444B5F ;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #FFFFFF;
|
||||
line-height: 17px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
.table-item-col{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.user-icon{
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-image: url('/public/projecthome/user_icon.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.item-check{
|
||||
:deep(.ant-checkbox-inner){
|
||||
background-color: #17181F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div class="search-div">
|
||||
<a-input class="search-input" v-model:value="searchInput" placeholder="搜索">
|
||||
<template #suffix>
|
||||
<div class="search-icon" @click="search"></div>
|
||||
</template>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="setting-table-title-div">
|
||||
<div class="table-title-item" style="width: 29px;">
|
||||
</div>
|
||||
<div class="table-title-item" style="width: 121px;">
|
||||
人员名称
|
||||
</div>
|
||||
<div class="table-title-item" style="width: 121px;border-right: 0px;">成员账号</div>
|
||||
</div>
|
||||
<div class="setting-table-item" v-for="item in props.userList">
|
||||
<div class="table-item-col" style="width: 29px;">
|
||||
<a-checkbox class="item-check" :checked="getCheck(item.id)" @change="changeCheck(item)"></a-checkbox>
|
||||
</div>
|
||||
<div class="table-item-col" style="width: 121px;">
|
||||
{{ item.name }}
|
||||
<div class="user-icon" v-if="props.userId == item.id"></div>
|
||||
</div>
|
||||
<div class="table-item-col" style="width: 121px;">
|
||||
{{ item.account }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, defineProps, defineEmits } from "vue"
|
||||
const props = defineProps(['project','userList','userId'])
|
||||
const emits = defineEmits(['searchUser'])
|
||||
const searchInput = ref("")
|
||||
const search = () => {
|
||||
emits('searchUser',searchInput.value)
|
||||
}
|
||||
const changeCheck = (item) => {
|
||||
console.log(item)
|
||||
if(props.project.userIds.find(userObj => userObj.id == item.id)){
|
||||
props.project.userIds = props.project.userIds.filter(userObj => userObj.id != item.id)
|
||||
}else{
|
||||
props.project.userIds.push(item)
|
||||
}
|
||||
}
|
||||
const getCheck = (id) => {
|
||||
return props.project.userIds.find(item => item.id == id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-div{
|
||||
height: 30px;
|
||||
margin-bottom: 10px;
|
||||
.search-input{
|
||||
:deep(.ant-input){
|
||||
background: #17181F;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
background: #17181F;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15), 0px 0px 4px 0px rgba(58,87,232,0.48);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3B4154;
|
||||
color: #FFFFFF;
|
||||
.search-icon{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url('/public/projecthome/result_search_icon.png');
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.setting-table-title-div{
|
||||
display: flex;
|
||||
height: 30px;
|
||||
background: #2D3342;
|
||||
border-radius: 2px 2px 0px 0px;
|
||||
border-top: 1px solid #444B5F;
|
||||
border-left: 1px solid #444B5F;
|
||||
border-right: 1px solid #444B5F;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #FFFFFF;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
.table-title-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-right: 1px solid #444B5F;
|
||||
.sort-icon{
|
||||
width: 11px;
|
||||
height: 14px;
|
||||
background-image: url('/public/projecthome/table_sort_icon.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.setting-table-item{
|
||||
display: flex;
|
||||
height: 35px;
|
||||
border-bottom: 1px solid #444B5F ;
|
||||
border-left: 1px solid #444B5F ;
|
||||
border-right: 1px solid #444B5F ;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #FFFFFF;
|
||||
line-height: 17px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
.table-item-col{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.user-icon{
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-image: url('/public/projecthome/user_icon.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.item-check{
|
||||
:deep(.ant-checkbox-inner){
|
||||
background-color: #17181F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<div class="setting-item">
|
||||
<div class="setting-label-div">
|
||||
<div class="setting-label">云端天气阻飞</div>
|
||||
<div class="hint"></div>
|
||||
</div>
|
||||
<div class="setting-value-div">
|
||||
<a-switch class="setting-switch" v-model:checked="props.project.isCloudBlockFlight" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="props.project.isCloudBlockFlight">
|
||||
<div class="setting-item">
|
||||
<div class="setting-label-div">
|
||||
<div class="setting-label">使用天气预报数据阻飞</div>
|
||||
<div class="hint"></div>
|
||||
</div>
|
||||
<div class="setting-value-div">
|
||||
<a-switch class="setting-switch" v-model:checked="props.project.isWeatherBlockFlight" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="item in props.project.lockfly">
|
||||
<div class="setting-title">
|
||||
<div class="setting-title-content">{{item.name}}</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<div class="setting-item" style="margin-bottom: 0px;">
|
||||
<div class="setting-label-div">
|
||||
<div class="setting-label">风速</div>
|
||||
</div>
|
||||
<div class="setting-value-div">
|
||||
<template v-if="!isEdit">{{ item.windSpeed }}m/s</template>
|
||||
<template v-else>
|
||||
<a-input-number v-model:value="item.windSpeed" class="setting-number-input" :min="1" :max="12" :controls=false :precision="0"/>m/s
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weather-hint">(风速计)(1-12m/s)</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;" v-if="props.project.isWeatherBlockFlight">
|
||||
<div class="setting-item" style="margin-bottom: 0px;">
|
||||
<div class="setting-label-div">
|
||||
<div class="setting-label">风速</div>
|
||||
</div>
|
||||
<div class="setting-value-div">
|
||||
<template v-if="!isEdit">{{ item.weatherWindSpeed }}m/s</template>
|
||||
<template v-else>
|
||||
<a-input-number v-model:value="item.weatherWindSpeed" class="setting-number-input" :min="1" :max="12" :controls=false :precision="0"/>m/s
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weather-hint">(天气预报)(1-12m/s)</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<div class="setting-item" style="margin-bottom: 0px;">
|
||||
<div class="setting-label-div">
|
||||
<div class="setting-label">雨量</div>
|
||||
</div>
|
||||
<div class="setting-value-div">
|
||||
<template v-if="!isEdit"> {{ item.rainFall }}</template>
|
||||
<template v-else>
|
||||
<a-select
|
||||
class="setting-weather-select"
|
||||
popupClassName="setting-weather-dropdown"
|
||||
v-model:value="item.rainFall"
|
||||
:options="weatherOptions"/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weather-hint">(雨量计/天气预报)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-div">
|
||||
<a-button v-if="!isEdit" class="button-item" type="primary" @click="changeEdit(true,'')">编辑</a-button>
|
||||
<a-button v-if="isEdit" class="button-item" style="margin-right: 15px;background: #6b6b6b;" type="primary" @click="changeEdit(false,'cancel')">取消</a-button>
|
||||
<a-button v-if="isEdit" class="button-item" type="primary" @click="changeEdit(false,'save')">确定</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineProps, defineEmits, ref } from "vue"
|
||||
const props = defineProps(['project'])
|
||||
const emits = defineEmits([])
|
||||
const isEdit = ref(false)
|
||||
const oldValue = ref('')
|
||||
const weatherOptions = [
|
||||
{ label: '小雨', value: '小雨' },
|
||||
{ label: '中雨', value: '中雨' },
|
||||
{ label: '大雨', value: '大雨' }
|
||||
]
|
||||
|
||||
const changeEdit = (value,type) => {
|
||||
if(value){
|
||||
oldValue.value = JSON.stringify(props.project.lockfly)
|
||||
isEdit.value = value
|
||||
return
|
||||
}
|
||||
if(type == 'cancel'){
|
||||
props.project.lockfly = JSON.parse(oldValue.value)
|
||||
isEdit.value = value
|
||||
return
|
||||
}
|
||||
isEdit.value = value
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hint{
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-image: url('/public/projecthome/hint.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 6px;
|
||||
}
|
||||
.tip{
|
||||
font-family: 'PingFangSC-Medium';
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.setting-item{
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: 'PingFangSC-Medium';
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
color: #FFFFFF;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-bottom: 10px;
|
||||
.setting-label-div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.setting-value-div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.arrow-icon{
|
||||
width: 8px;
|
||||
height: 12px;
|
||||
background-image: url('/public/projecthome/arrow_icon.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.setting-switch{
|
||||
min-width: 40px;
|
||||
width: 40px;
|
||||
height: 21px;
|
||||
background: #ccc;
|
||||
}
|
||||
:deep(.ant-switch-checked){
|
||||
background: #2941B0;
|
||||
}
|
||||
.setting-number-input{
|
||||
min-width: 40px;
|
||||
width: 40px !important;
|
||||
height: 30px;
|
||||
background: #151823;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3B4154;
|
||||
color: #FFFFFF;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.setting-weather-select{
|
||||
:deep(.ant-select-selector){
|
||||
background-color: #151823;
|
||||
border: 1px solid #3B4154;
|
||||
color: #FFFFFF;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
}
|
||||
:deep(.ant-select-selection-item){
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
:deep(input){
|
||||
color: #FFFFFF;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
}
|
||||
:deep(input::placeholder){
|
||||
color: #FFFFFF;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.setting-title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: 'PingFangSC-Medium';
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
margin-bottom: 9px;
|
||||
line-height: 20px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
.setting-title-content{
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-name-input-div{
|
||||
margin-bottom: 13px;
|
||||
.setting-name-input{
|
||||
height: 30px;
|
||||
background: #151823;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3B4154;
|
||||
color: #FFFFFF;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
}
|
||||
.setting-date{
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background: #151823;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3B4154;
|
||||
:deep(input){
|
||||
color: #FFFFFF;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
}
|
||||
:deep(input::placeholder){
|
||||
color: #FFFFFF;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.button-div{
|
||||
display: flex;
|
||||
.button-item{
|
||||
background: #3A57E8;
|
||||
border-radius: 4px;
|
||||
font-family: 'PingFangSC-Medium';
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
}
|
||||
.weather-hint{
|
||||
font-family: 'PingFangSC-Medium';
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.setting-weather-dropdown{
|
||||
background-color: #151823;
|
||||
color: #FFFFFF;
|
||||
font-family: 'PingFangSC-Regular';
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
.ant-select-item{
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,53 @@
|
||||
export const defaultPorject = {
|
||||
id: '',
|
||||
workspaceName: '',
|
||||
workspaceDesc: '',
|
||||
platformName: '',
|
||||
createTime: '',
|
||||
createId: '',
|
||||
bindCode: '',
|
||||
centerLng: '',
|
||||
centerLat: '',
|
||||
isAllowRequestCode: false,
|
||||
requestCode: '',
|
||||
requestCodeCutOffTime: '',
|
||||
isCloudBlockFlight: true,
|
||||
isWeatherBlockFlight: true,
|
||||
isMultipleAircraft: false,
|
||||
isAirportRecord: false,
|
||||
isAircraftRecord: false,
|
||||
isLiveShare: true,
|
||||
isMediaShare: true,
|
||||
isDeviceTrans: false,
|
||||
isDeicePlaneTrans: false,
|
||||
sate: 0,
|
||||
isDelete: true,
|
||||
lockfly:[
|
||||
{
|
||||
id: "",
|
||||
name: '大疆机场',
|
||||
windSpeed: 12,
|
||||
weatherWindSpeed: 15,
|
||||
rainFall: '大雨',
|
||||
workSpaceId: "",
|
||||
},
|
||||
{
|
||||
id: "",
|
||||
name: '大疆机场2',
|
||||
windSpeed: 8,
|
||||
weatherWindSpeed: 12,
|
||||
rainFall: '大雨',
|
||||
workSpaceId: "",
|
||||
},
|
||||
{
|
||||
id: "",
|
||||
name: '大疆机场3',
|
||||
windSpeed: 12,
|
||||
weatherWindSpeed: 12,
|
||||
rainFall: '大雨',
|
||||
workSpaceId: "",
|
||||
},
|
||||
],
|
||||
userIds:[],
|
||||
deviceIds:[],
|
||||
}
|
Loading…
Reference in New Issue