mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
考试编辑状态下
This commit is contained in:
@@ -10,13 +10,23 @@
|
|||||||
@click="closeDrawer" />
|
@click="closeDrawer" />
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
||||||
<div>
|
<div v-if="taskIndex >= 0">
|
||||||
<button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
|
<button v-show="formData.examType === 1" style="width: 100px; cursor: pointer;"
|
||||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||||
系统考试
|
系统考试
|
||||||
</button>
|
</button>
|
||||||
<button :disabled="taskIndex >= 0" style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
|
<button v-show="formData.examType === 2" style="width: 100px; cursor: pointer;"
|
||||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
: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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,18 +54,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">选择试卷:</span>
|
<span style="margin-right: 3px">选择试卷:</span>
|
||||||
</div>
|
</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">
|
<div v-if="formData.examinationPaperId">
|
||||||
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
||||||
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
@@ -189,7 +199,7 @@
|
|||||||
<span style="margin-right: 3px">考试名称:</span>
|
<span style="margin-right: 3px">考试名称:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<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" />
|
placeholder="请输入考试名称" :maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,7 +211,7 @@
|
|||||||
<span style="margin-right: 3px">数据来源:</span>
|
<span style="margin-right: 3px">数据来源:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<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" />
|
placeholder="请输入数据来源" :maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +220,7 @@
|
|||||||
<span style="margin-right: 3px">考试说明:</span>
|
<span style="margin-right: 3px">考试说明:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<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" />
|
:maxlength="200" :rows="6" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -355,7 +365,7 @@ async function confirm() {
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
emit('update:taskList', [...props.taskList])
|
emit('update:taskList', [...props.taskList])
|
||||||
closeDrawer()
|
closeDrawer()
|
||||||
}
|
}
|
||||||
@@ -374,9 +384,6 @@ const delTag = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeOuter(v) {
|
function changeOuter(v) {
|
||||||
if (taskIndex.value >= 0) {
|
|
||||||
return message.warn("编辑状态不允许切换。")
|
|
||||||
}
|
|
||||||
formData.value.examType = v;
|
formData.value.examType = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,8 @@ export default {
|
|||||||
function formatCapacity(data) {
|
function formatCapacity(data) {
|
||||||
let num = Number(data);
|
let num = Number(data);
|
||||||
let CMB = (num / 1048576).toFixed(2);
|
let CMB = (num / 1048576).toFixed(2);
|
||||||
let countCMB = (num / 1048576*1024).toFixed(2);
|
let total = Number(1048576*1024);
|
||||||
|
let countCMB = (num / total).toFixed(2);
|
||||||
state.countCMB = countCMB;
|
state.countCMB = countCMB;
|
||||||
if(CMB%1024>1){
|
if(CMB%1024>1){
|
||||||
CMB = (CMB/1024).toFixed(2) + 'GB';
|
CMB = (CMB/1024).toFixed(2) + 'GB';
|
||||||
@@ -177,9 +178,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function formatCapacityGB(data) {
|
function formatCapacityGB(data) {
|
||||||
debugger
|
|
||||||
let num = Number(data);
|
let num = Number(data);
|
||||||
let CMB = (num / (1048576*1024)).toFixed(2);
|
let total = Number(1048576*1024);
|
||||||
|
let CMB = (num / total).toFixed(2);
|
||||||
return CMB
|
return CMB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user