|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import AddProject from './AddProject/index.vue'
|
|
|
|
|
import { ref, defineProps, onMounted, createVNode } from "vue"
|
|
|
|
|
import { ref, defineProps, onMounted, createVNode, watch } from "vue"
|
|
|
|
|
import { GetWorkspaceList, GetWorkSpaceById, DeleteWorkspace } from '@/api/demo/projecthome'
|
|
|
|
|
import { message, Modal } from 'ant-design-vue'
|
|
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
|
|
|
|
@ -42,17 +42,24 @@ onMounted(() => {
|
|
|
|
|
getProjectList()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const props = defineProps(['map', 'activeProject', 'airPort'])
|
|
|
|
|
const props = defineProps(['map', 'activeProject', 'airPort', 'connect'])
|
|
|
|
|
const emits = defineEmits(['update:activeProject'])
|
|
|
|
|
const addModal = ref(false)
|
|
|
|
|
const modalType = ref('')
|
|
|
|
|
const projectList = ref([])
|
|
|
|
|
const updateProject = ref({})
|
|
|
|
|
const lastSubscriptUrl = ref('')
|
|
|
|
|
const getList = ref(false)
|
|
|
|
|
const addProject = () => {
|
|
|
|
|
modalType.value = 'insert'
|
|
|
|
|
addModal.value = true
|
|
|
|
|
}
|
|
|
|
|
watch(() => [getList.value, props.connect], (value) => {
|
|
|
|
|
const check = value.every(item => item === true)
|
|
|
|
|
if(check){
|
|
|
|
|
selectProject(projectList.value[0])
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const selectProject = (item) => {
|
|
|
|
|
if(props.activeProject != item.Id){
|
|
|
|
|
props.airPort.latitude = null
|
|
|
|
@ -74,6 +81,10 @@ const selectProject = (item) => {
|
|
|
|
|
const getProjectList = () => {
|
|
|
|
|
GetWorkspaceList().then(res => {
|
|
|
|
|
projectList.value = res
|
|
|
|
|
if(res.length > 0){
|
|
|
|
|
emits('update:activeProject',res[0].Id)
|
|
|
|
|
getList.value = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const editProject = (item) => {
|
|
|
|
|