fix: 允许给已批准配置绑定脚本,DTO加scriptStoragePath,无脚本时显示编辑按钮
This commit is contained in:
@@ -44,7 +44,8 @@
|
||||
<el-button size="small" @click="startEdit">编辑</el-button>
|
||||
</template>
|
||||
|
||||
<el-button size="small" text @click="configVisible=true" v-if="selectedConfigId">查看配置</el-button>
|
||||
<el-button size="small" type="primary" @click="configVisible=true; configTab='script'" v-if="selectedConfigId && !hasScript">编辑脚本</el-button>
|
||||
<el-button size="small" @click="configVisible=true" v-else-if="selectedConfigId">查看配置</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -74,14 +75,14 @@
|
||||
</el-tabs>
|
||||
<template #footer>
|
||||
<el-button @click="configVisible=false">关闭</el-button>
|
||||
<template v-if="selectedConfig?.status==='pending'">
|
||||
<el-button v-if="configTab==='config' && selectedConfigJson" type="primary" size="small" @click="editing? saveEdit() : startEdit()">
|
||||
<template v-if="configTab==='config' && selectedConfigJson">
|
||||
<el-button v-if="editing" size="small" @click="cancelEdit">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="editing? saveEdit() : startEdit()">
|
||||
{{ editing ? '保存JSON' : '编辑JSON' }}
|
||||
</el-button>
|
||||
<el-button v-if="configTab==='config' && editing" size="small" @click="cancelEdit">取消</el-button>
|
||||
<el-button v-if="configTab==='script'" type="primary" size="small" @click="saveScript" :loading="saving">
|
||||
保存脚本
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-if="configTab==='script'">
|
||||
<el-button type="primary" size="small" @click="saveScript" :loading="saving">保存脚本</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -193,6 +194,7 @@ const allResults = ref([])
|
||||
const pageParsed = ref({})
|
||||
const expandedSet = reactive(new Set())
|
||||
|
||||
const hasScript = computed(() => !!selectedConfig.value?.scriptStoragePath)
|
||||
const totalResults = computed(() => allResults.value.length)
|
||||
|
||||
// 始终从 allResults 按 URL 分组
|
||||
|
||||
Reference in New Issue
Block a user