fix(aihr): align supervisor scenario options
This commit is contained in:
@@ -45,9 +45,9 @@
|
||||
/>
|
||||
|
||||
<text class="field-label section-label">训练场景</text>
|
||||
<view class="scenario-row">
|
||||
<view v-if="scenarioOptions.length" class="scenario-row">
|
||||
<button
|
||||
v-for="item in supervisorScenarioOptions"
|
||||
v-for="item in scenarioOptions"
|
||||
:key="item.id"
|
||||
class="chip scenario-chip"
|
||||
:class="{ active: assignmentScenarioId === item.id }"
|
||||
@@ -57,6 +57,7 @@
|
||||
{{ item.name }}
|
||||
</button>
|
||||
</view>
|
||||
<text v-else class="muted block">暂无可派发的已启用场景</text>
|
||||
|
||||
<text class="field-label section-label">指派原因</text>
|
||||
<textarea
|
||||
@@ -65,7 +66,7 @@
|
||||
maxlength="180"
|
||||
placeholder="填写本次专项训练原因"
|
||||
/>
|
||||
<button class="primary-button submit-button" :disabled="assigning || historyLoading" @click="assignPractice">
|
||||
<button class="primary-button submit-button" :disabled="assigning || historyLoading || !scenarioOptions.length" @click="assignPractice">
|
||||
{{ assigning ? '指派中' : '确认指派' }}
|
||||
</button>
|
||||
</view>
|
||||
@@ -255,10 +256,8 @@ const loadScenarioOptions = async () => {
|
||||
}
|
||||
return;
|
||||
}
|
||||
scenarioOptions.value = [...supervisorScenarioOptions];
|
||||
if (!isScenarioId(assignmentScenarioId.value)) {
|
||||
assignmentScenarioId.value = supervisorScenarioOptions[0].id;
|
||||
}
|
||||
scenarioOptions.value = [];
|
||||
assignmentScenarioId.value = '';
|
||||
} catch {
|
||||
scenarioOptions.value = [...supervisorScenarioOptions];
|
||||
if (!isScenarioId(assignmentScenarioId.value)) {
|
||||
|
||||
Reference in New Issue
Block a user