feat: 支持编辑 QGIS 工程模板图层
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { computed, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
|
||||
import FileField from '../components/FileField.vue'
|
||||
import LayerEditor from '../components/LayerEditor.vue'
|
||||
import ProjectEditor from '../components/ProjectEditor.vue'
|
||||
import TaskCard from '../components/TaskCard.vue'
|
||||
import { getJSON, postJSON } from '../api'
|
||||
|
||||
@@ -35,6 +36,7 @@ const error = ref('')
|
||||
const success = ref('')
|
||||
const submitting = ref(false)
|
||||
const editingBoundary = ref(false)
|
||||
const editingProject = ref(false)
|
||||
const loadingMarkets = ref(false)
|
||||
const lastTask = ref(null)
|
||||
let marketTicket = 0
|
||||
@@ -184,8 +186,9 @@ onUnmounted(() => {
|
||||
:extension="item.extension"
|
||||
:hint="item.hint"
|
||||
>
|
||||
<template v-if="item.key === 'MARKET_GPKG'" #extra>
|
||||
<n-button size="small" :disabled="!draft.paths.MARKET_GPKG" @click="editingBoundary = true">编辑图层</n-button>
|
||||
<template #extra>
|
||||
<n-button v-if="item.key === 'MARKET_GPKG'" size="small" :disabled="!draft.paths.MARKET_GPKG" @click="editingBoundary = true">编辑图层</n-button>
|
||||
<n-button v-if="item.key === 'GIS_PROJECT_SOURCE'" size="small" :disabled="!draft.paths.GIS_PROJECT_SOURCE" @click="editingProject = true">编辑工程</n-button>
|
||||
</template>
|
||||
</FileField>
|
||||
</div>
|
||||
@@ -194,6 +197,7 @@ onUnmounted(() => {
|
||||
:path="draft.paths.MARKET_GPKG || ''"
|
||||
@changed="loadMarkets(draft.paths.MARKET_GPKG)"
|
||||
/>
|
||||
<ProjectEditor v-model:show="editingProject" :path="draft.paths.GIS_PROJECT_SOURCE || ''" />
|
||||
<h2 class="section-title">2 · 选择市场与参数</h2>
|
||||
<n-alert v-if="marketError" type="warning">{{ marketError }}</n-alert>
|
||||
<n-spin :show="loadingMarkets" size="small">
|
||||
|
||||
Reference in New Issue
Block a user