feat: 新增市场边界编辑并修正 Vue 列表布局
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import { computed, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
|
||||
import FileField from '../components/FileField.vue'
|
||||
import LayerEditor from '../components/LayerEditor.vue'
|
||||
import TaskCard from '../components/TaskCard.vue'
|
||||
import { getJSON, postJSON } from '../api'
|
||||
|
||||
@@ -33,6 +34,7 @@ const marketError = ref('')
|
||||
const error = ref('')
|
||||
const success = ref('')
|
||||
const submitting = ref(false)
|
||||
const editingBoundary = ref(false)
|
||||
const loadingMarkets = ref(false)
|
||||
const lastTask = ref(null)
|
||||
let marketTicket = 0
|
||||
@@ -181,8 +183,17 @@ onUnmounted(() => {
|
||||
:label="item.label"
|
||||
: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>
|
||||
</FileField>
|
||||
</div>
|
||||
<LayerEditor
|
||||
v-model:show="editingBoundary"
|
||||
:path="draft.paths.MARKET_GPKG || ''"
|
||||
@changed="loadMarkets(draft.paths.MARKET_GPKG)"
|
||||
/>
|
||||
<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