竞拍明细;课程审核;课程内容仅查看
This commit is contained in:
@@ -179,9 +179,7 @@ function beforeAvatarUpload(file) {
|
||||
}
|
||||
return !isJPG && isLt05M
|
||||
}
|
||||
function onSubmit() {
|
||||
router.push({name:'courseManage'})
|
||||
}
|
||||
|
||||
function handlerChange(e) {
|
||||
// console.log(e)
|
||||
isChange.value = true
|
||||
@@ -205,6 +203,36 @@ function checkFreeTestFromPrice() { // 检查免费试卷分数是否合理
|
||||
}
|
||||
return flag
|
||||
}
|
||||
// 审核相关
|
||||
const verifyVisible = ref(false)
|
||||
const verifyForm = ref({})
|
||||
function checkCourseFunc() { // 审核
|
||||
// console.log(form.value)
|
||||
if(form.value.status === 2 || form.value.status === 4 ) { // 未审核 或 未通过
|
||||
verifyForm.value.is_pass = -1
|
||||
}
|
||||
else{
|
||||
verifyForm.value.is_pass = 1
|
||||
}
|
||||
verifyForm.is_pass = form.value.status
|
||||
verifyVisible.value = true
|
||||
}
|
||||
function transferStateFromVerify(v_state) {
|
||||
let state = 0
|
||||
if(v_state === 1) { // 审核通过
|
||||
state = form.value.status
|
||||
}
|
||||
else{ // 审核拒绝
|
||||
state = 4
|
||||
}
|
||||
return state
|
||||
}
|
||||
function closeVerifyVisibleDialog() {
|
||||
verifyVisible.value = false
|
||||
}
|
||||
async function enterVerifyDialog() { // 审核提交
|
||||
const status = transferStateFromVerify(verifyForm.value.is_pass)
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
@@ -218,7 +246,7 @@ function checkFreeTestFromPrice() { // 检查免费试卷分数是否合理
|
||||
<!-- 表单区域-->
|
||||
<div class="gva-table-box">
|
||||
<!-- step1-->
|
||||
<el-form ref="ruleFormRef" v-if="active == 0" :model="form" :rules="rules" label-width="120px" style="width: 50%">
|
||||
<el-form ref="ruleFormRef" disabled="true" v-if="active == 0" :model="form" :rules="rules" label-width="120px" style="width: 50%">
|
||||
<el-form-item label="课程名称" prop="name">
|
||||
<el-input placeholder="请输入课程名称" v-model="form.name" @change="handlerChange" />
|
||||
</el-form-item>
|
||||
@@ -288,9 +316,23 @@ function checkFreeTestFromPrice() { // 检查免费试卷分数是否合理
|
||||
<div class="btn-box" style="text-align: right">
|
||||
<el-button v-if="active>0" @click="stepChangeFunc(1)">上一步</el-button>
|
||||
<el-button v-if="active<1" type="primary" @click="stepChangeFunc(2)">下一步</el-button>
|
||||
<el-button v-else type="primary" @click="onSubmit">完成</el-button>
|
||||
<el-button v-else type="primary" @click="checkCourseFunc">审核</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 审核窗口-->
|
||||
<el-dialog v-model="verifyVisible" :before-close="closeVerifyVisibleDialog" title="审核课程">
|
||||
<el-form :model="verifyForm" label-width="80px">
|
||||
<el-form-item label="是否通过" prop="is_free">
|
||||
<el-switch v-model="verifyForm.is_pass" active-text="通过" inactive-text="拒绝" :active-value="1" :inactive-value="1" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button size="small" @click="closeVerifyVisibleDialog">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="enterVerifyDialog">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
Reference in New Issue
Block a user