一大波改动
这个提交包含在:
父节点
c1c80e1a7c
当前提交
c0f9bc1c47
@ -330,6 +330,24 @@ export const updateAdminApi = {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
cancelStoreReview(versionId: string, storeTypes?: StoreType[]) {
|
||||||
|
return updateClient.post<{ data: null }>(
|
||||||
|
`/api/v1/updates/store/app/${versionId}/cancel-review`,
|
||||||
|
storeTypes ? { storeTypes } : {},
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
updatePublishSchedule(
|
||||||
|
versionId: string,
|
||||||
|
publishType: 'IMMEDIATE' | 'SCHEDULED',
|
||||||
|
scheduledAt?: string,
|
||||||
|
) {
|
||||||
|
return updateClient.put<{ data: AppVersion }>(
|
||||||
|
`/api/v1/updates/store/app/${versionId}/publish-schedule`,
|
||||||
|
{ publishType, scheduledAt },
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
getPublishConfig(appKey: string) {
|
getPublishConfig(appKey: string) {
|
||||||
return updateClient.get<{ data: PublishConfig }>('/api/v1/updates/publish/config', { params: { appKey } })
|
return updateClient.get<{ data: PublishConfig }>('/api/v1/updates/publish/config', { params: { appKey } })
|
||||||
},
|
},
|
||||||
|
|||||||
1
tenant-platform/src/env.d.ts
vendored
1
tenant-platform/src/env.d.ts
vendored
@ -3,6 +3,7 @@
|
|||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
readonly VITE_API_BASE_URL: string
|
readonly VITE_API_BASE_URL: string
|
||||||
readonly VITE_FILE_SERVICE_URL: string
|
readonly VITE_FILE_SERVICE_URL: string
|
||||||
|
readonly VITE_LICENSE_API_BASE_URL: string
|
||||||
readonly BASE_URL: string
|
readonly BASE_URL: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -572,7 +572,48 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-empty v-else description="暂无商店状态数据" />
|
<el-empty v-else description="暂无商店状态数据" />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" @click="showStoreReviewDetail = false">关闭</el-button>
|
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;">
|
||||||
|
<el-button
|
||||||
|
v-if="storeReviewDetailItems.some(i => isActiveState(i.state))"
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
:loading="cancellingReview"
|
||||||
|
@click="handleCancelReview()"
|
||||||
|
>撤回审核</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="storeReviewDetailItems.some(i => i.state === 'APPROVED')"
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
@click="showPublishSchedule = true"
|
||||||
|
>修改发布计划</el-button>
|
||||||
|
<el-button style="margin-left:auto" type="primary" @click="showStoreReviewDetail = false">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- Publish Schedule Dialog -->
|
||||||
|
<el-dialog v-model="showPublishSchedule" title="修改发布计划" width="420px">
|
||||||
|
<el-form label-width="120px" style="margin-top:8px">
|
||||||
|
<el-form-item label="发布方式">
|
||||||
|
<el-radio-group v-model="publishScheduleType">
|
||||||
|
<el-radio value="IMMEDIATE">立即发布</el-radio>
|
||||||
|
<el-radio value="SCHEDULED">定时发布</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="publishScheduleType === 'SCHEDULED'" label="发布时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="publishScheduleAt"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择发布时间"
|
||||||
|
format="YYYY-MM-DD HH:mm"
|
||||||
|
value-format="YYYY-MM-DDTHH:mm:ss"
|
||||||
|
style="width:100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="showPublishSchedule = false">取消</el-button>
|
||||||
|
<el-button type="primary" :loading="updatingPublishSchedule" @click="handleUpdatePublishSchedule">确定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -1298,6 +1339,53 @@ const showStoreReviewDetail = ref(false)
|
|||||||
const storeReviewDetailVersion = ref<AppVersion | null>(null)
|
const storeReviewDetailVersion = ref<AppVersion | null>(null)
|
||||||
const storeReviewDetailItems = ref<{ store: string; state: string; reason?: string; stage?: string; submittedAt?: string; updatedAt?: string; batchId?: string }[]>([])
|
const storeReviewDetailItems = ref<{ store: string; state: string; reason?: string; stage?: string; submittedAt?: string; updatedAt?: string; batchId?: string }[]>([])
|
||||||
const storeReviewDetailLive = ref(false)
|
const storeReviewDetailLive = ref(false)
|
||||||
|
const cancellingReview = ref(false)
|
||||||
|
const showPublishSchedule = ref(false)
|
||||||
|
const publishScheduleType = ref<'IMMEDIATE' | 'SCHEDULED'>('IMMEDIATE')
|
||||||
|
const publishScheduleAt = ref('')
|
||||||
|
const updatingPublishSchedule = ref(false)
|
||||||
|
|
||||||
|
async function handleCancelReview(storeType?: string) {
|
||||||
|
if (!storeReviewDetailVersion.value) return
|
||||||
|
const stores = storeType
|
||||||
|
? [storeType]
|
||||||
|
: storeReviewDetailItems.value.filter(i => isActiveState(i.state)).map(i => i.store)
|
||||||
|
if (!stores.length) return
|
||||||
|
cancellingReview.value = true
|
||||||
|
try {
|
||||||
|
await updateAdminApi.cancelStoreReview(storeReviewDetailVersion.value.id, stores as any)
|
||||||
|
ElMessage.success('撤回请求已发送')
|
||||||
|
// Optimistically update local state
|
||||||
|
for (const s of stores) {
|
||||||
|
const idx = storeReviewDetailItems.value.findIndex(i => i.store === s)
|
||||||
|
if (idx >= 0) storeReviewDetailItems.value[idx] = { ...storeReviewDetailItems.value[idx], state: 'WITHDRAWN' }
|
||||||
|
}
|
||||||
|
await loadAppVersions()
|
||||||
|
} catch {
|
||||||
|
ElMessage.error('撤回失败,请稍后重试')
|
||||||
|
} finally {
|
||||||
|
cancellingReview.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleUpdatePublishSchedule() {
|
||||||
|
if (!storeReviewDetailVersion.value) return
|
||||||
|
updatingPublishSchedule.value = true
|
||||||
|
try {
|
||||||
|
await updateAdminApi.updatePublishSchedule(
|
||||||
|
storeReviewDetailVersion.value.id,
|
||||||
|
publishScheduleType.value,
|
||||||
|
publishScheduleType.value === 'SCHEDULED' ? publishScheduleAt.value : undefined,
|
||||||
|
)
|
||||||
|
ElMessage.success('发布计划已更新')
|
||||||
|
showPublishSchedule.value = false
|
||||||
|
await loadAppVersions()
|
||||||
|
} catch {
|
||||||
|
ElMessage.error('更新失败,请稍后重试')
|
||||||
|
} finally {
|
||||||
|
updatingPublishSchedule.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function openSubmitStoreDialog(row: AppVersion) {
|
function openSubmitStoreDialog(row: AppVersion) {
|
||||||
submitStoreVersion.value = row
|
submitStoreVersion.value = row
|
||||||
|
|||||||
@ -42,6 +42,10 @@ export default defineConfig(({ mode }) => {
|
|||||||
server: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
'/api/license': {
|
||||||
|
target: 'http://127.0.0.1:8085',
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
'/api/push': {
|
'/api/push': {
|
||||||
target: 'http://127.0.0.1:8083',
|
target: 'http://127.0.0.1:8083',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户