mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 05:16:45 +08:00
考试编辑状态下
This commit is contained in:
@@ -10,13 +10,23 @@
|
||||
@click="closeDrawer" />
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
||||
<div>
|
||||
<button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
|
||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||
<div v-if="taskIndex >= 0">
|
||||
<button v-show="formData.examType === 1" style="width: 100px; cursor: pointer;"
|
||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||
系统考试
|
||||
</button>
|
||||
<button :disabled="taskIndex >= 0" style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
|
||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
||||
<button v-show="formData.examType === 2" style="width: 100px; cursor: pointer;"
|
||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
||||
外部考试
|
||||
</button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
|
||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||
系统考试
|
||||
</button>
|
||||
<button style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
|
||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
||||
外部考试
|
||||
</button>
|
||||
</div>
|
||||
@@ -44,18 +54,18 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">选择试卷:</span>
|
||||
</div>
|
||||
<s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" style="margin:0" :disabled="taskIndex >= 0">
|
||||
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
</div>
|
||||
</s-test>
|
||||
<div v-if="formData.examinationPaperId">
|
||||
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
||||
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
<s-test v-else v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" style="margin:0" >
|
||||
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
</div>
|
||||
</s-test>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
@@ -189,7 +199,7 @@
|
||||
<span style="margin-right: 3px">考试名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input v-model:value="formData.examinationName" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
<a-input v-model:value="formData.examinationName" style="width: 400px; height: 40px; border-radius: 8px" :disabled="taskIndex >= 0"
|
||||
placeholder="请输入考试名称" :maxlength="20" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -201,7 +211,7 @@
|
||||
<span style="margin-right: 3px">数据来源:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input v-model:value="formData.source" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
<a-input v-model:value="formData.source" style="width: 400px; height: 40px; border-radius: 8px" :disabled="taskIndex >= 0"
|
||||
placeholder="请输入数据来源" :maxlength="20" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -210,7 +220,7 @@
|
||||
<span style="margin-right: 3px">考试说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea v-model:value="formData.externalExplain" placeholder="请输入考试说明" allow-clear show-count
|
||||
<a-textarea v-model:value="formData.externalExplain" placeholder="请输入考试说明" allow-clear show-count :disabled="taskIndex >= 0"
|
||||
:maxlength="200" :rows="6" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -355,7 +365,7 @@ async function confirm() {
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
emit('update:taskList', [...props.taskList])
|
||||
closeDrawer()
|
||||
}
|
||||
@@ -374,9 +384,6 @@ const delTag = () => {
|
||||
}
|
||||
|
||||
function changeOuter(v) {
|
||||
if (taskIndex.value >= 0) {
|
||||
return message.warn("编辑状态不允许切换。")
|
||||
}
|
||||
formData.value.examType = v;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user