feat(short-drama-agent-front): 完善镜头定位与项目配置
This commit is contained in:
1 parent
470b52e26d
commit
5b134207b8
66 files changed
+2042
-984
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { useShotSelection } from '../storyboard/useShotSelection'
|
||||
import type { KeyframeBatchResult } from './types'
|
||||
import type { PromptBatchResult } from '../storyboard/types'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
@@ -21,10 +22,8 @@ export function useProduction() {
|
||||
const context = useProjectContext()
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const id = computed(() => context.project.value?.id ?? '')
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const selectedEpisode = ref<number>()
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const selectedShot = ref('')
|
||||
/** 两个镜头工作区共用地址选择,刷新恢复同一正式镜头。 */
|
||||
const { selectedEpisode, selectedShot } = useShotSelection(() => episodeNo.value)
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const concurrency = ref(2)
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
@@ -68,7 +67,7 @@ export function useProduction() {
|
||||
)
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const queryKey = computed(() => JSON.stringify([id.value, episodeNo.value, force.value]))
|
||||
/** 生产页已有刷新按钮,就绪状态改为手动更新。 */
|
||||
/** 就绪状态在进入、切集或自身操作完成后读取,不定时刷新。 */
|
||||
const query = usePolling(
|
||||
queryKey,
|
||||
async (key, signal) => {
|
||||
@@ -112,10 +111,12 @@ export function useProduction() {
|
||||
const episodeSourceUnavailable = computed(
|
||||
() => !!getStoryboardSession(id.value).invalidatedEpisodeSources[episodeNo.value]
|
||||
)
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
/** 当前剧集的正式镜头目录。 */
|
||||
const shots = computed(() => mergeDesignedShots(query.data.value?.directions ?? null, null, source.value))
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const shot = computed(() => shots.value.find(item => item.shotId === selectedShot.value) ?? shots.value[0])
|
||||
/** 明确指定的镜头不存在时不代选其它镜头;首次进入才选择第一镜。 */
|
||||
const shot = computed(() =>
|
||||
selectedShot.value ? shots.value.find(item => item.shotId === selectedShot.value) : shots.value[0]
|
||||
)
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const promptItem = computed(() => query.data.value?.prompts.items.find(item => item.shotId === shot.value?.shotId))
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
|
||||
Reference in new issue
Block a user