讨论导出

This commit is contained in:
lpq
2023-02-19 21:22:21 +08:00
parent 216ddac945
commit 1e18f648ef
4 changed files with 28 additions and 29 deletions

View File

@@ -300,6 +300,7 @@ const disabledRangeTime = () => ({
async function confirm() { async function confirm() {
debugger
await validate().catch(({errorFields}) => { await validate().catch(({errorFields}) => {
message.warning(errorFields[0].errors.join()); message.warning(errorFields[0].errors.join());
throw Error("数据校验不通过") throw Error("数据校验不通过")
@@ -535,4 +536,3 @@ defineExpose({openDrawer})
} }
} }
</style> </style>

View File

@@ -224,7 +224,7 @@
<a-radio :value="1">允许查看</a-radio> <a-radio :value="1">允许查看</a-radio>
<a-radio :value="2">不允许查看</a-radio> <a-radio :value="2">不允许查看</a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
@@ -245,7 +245,7 @@
<div class="signbox"> <div class="signbox">
<span style="margin-right: 3px">评分模式</span> <span style="margin-right: 3px">评分模式</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="taskIndex >= 0" :disabled="taskIndex >= 0"
style="margin-right: 12px" style="margin-right: 12px"
@@ -310,7 +310,7 @@
<span style="margin-right: 3px">数据来源</span> <span style="margin-right: 3px">数据来源</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
v-model:value="formDataOuter.source" v-model:value="formDataOuter.source"
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入数据来源" placeholder="请输入数据来源"
@@ -370,7 +370,7 @@ const formData = ref({
const formDataOuter = ref({ const formDataOuter = ref({
examType: 2, examType: 2,
examinationName:"", examinationName:"",
source:"", source:"",
externalExplain:"" externalExplain:""
}) })
@@ -392,7 +392,7 @@ const closeDrawer = () => {
} }
formDataOuter.value = ref({ formDataOuter.value = ref({
examType: 2, examType: 2,
examinationName:"", examinationName:"",
source:"", source:"",
externalExplain:"" externalExplain:""
}) })
@@ -448,6 +448,7 @@ function confirm() {
message.warning("请输入及格线"); message.warning("请输入及格线");
return return
} }
debugger
if (taskIndex.value === -1) { if (taskIndex.value === -1) {
const list = props.taskList const list = props.taskList
list.push({name: formData.value.examinationName, type: props.type, info: {...formData.value}}) list.push({name: formData.value.examinationName, type: props.type, info: {...formData.value}})
@@ -748,4 +749,3 @@ defineExpose({openDrawer})
} }
} }
</style> </style>

View File

@@ -72,13 +72,13 @@
</div> </div>
<div class="tab" style="margin-top: 20px; margin-bottom: 100px"> <div class="tab" style="margin-top: 20px; margin-bottom: 100px">
<div v-if="itemsType == 5"> <div v-if="itemsType == 5">
<a-table <a-table
style="border: 1px solid #f2f6fe" style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()" :columns="tableDataFunc()"
:data-source="tabledata" :data-source="tabledata"
:row-selection="{ :row-selection="{
selectedRowKeys:selectedRowKeys, selectedRowKeys:selectedRowKeys,
onChange:onSelectChange, onChange:onSelectChange,
onSelect:onSelect, onSelect:onSelect,
}" }"
:loading="tableDataTotal === -1 ? true : false" :loading="tableDataTotal === -1 ? true : false"
@@ -87,7 +87,7 @@
/> />
</div> </div>
<div v-if="itemsType == 10"> <div v-if="itemsType == 10">
<a-table <a-table
style="border: 1px solid #f2f6fe" style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()" :columns="tableDataFunc()"
:data-source="tabledata" :data-source="tabledata"
@@ -118,7 +118,7 @@
</div> </div>
</div> </div>
<!-- 查看答卷抽屉 --> <!-- 查看答卷抽屉 -->
<CQue v-model:CQvisible="CQvisible"/> <CQue v-model:CQvisible="CQvisible"/>
</a-drawer> </a-drawer>
</template> </template>
@@ -128,8 +128,8 @@ import { message } from 'ant-design-vue';
import * as api from "../../api/indexExam"; import * as api from "../../api/indexExam";
import CQue from './CheckQue.vue' import CQue from './CheckQue.vue'
export default { export default {
name: "TestManage", name: "TestManage",
components: { components: {
CQue, CQue,
}, },
props: { props: {
@@ -342,7 +342,7 @@ export default {
justifyContent: "center", justifyContent: "center",
}} }}
> >
<a-button <a-button
type="link" type="link"
class="operation" class="operation"
style="cursor:pointer;margin-right:10px;" style="cursor:pointer;margin-right:10px;"
@@ -363,7 +363,7 @@ export default {
justifyContent: "center", justifyContent: "center",
}} }}
> >
<a-button <a-button
type="link" type="link"
class="operation" class="operation"
style="cursor:pointer;margin-right:10px;" style="cursor:pointer;margin-right:10px;"

View File

@@ -39,7 +39,7 @@
v-if="datasource.type !== 6 && datasource.type !== 9" v-if="datasource.type !== 6 && datasource.type !== 9"
class="endtime" class="endtime"
> >
<!-- 起止时间--> <!-- 起止时间-->
</div> </div>
<div v-else class="endtime"> <div v-else class="endtime">
@@ -64,7 +64,7 @@
placeholder="请选择" placeholder="请选择"
:options="projectNameList" :options="projectNameList"
@change="selectProjectName" @change="selectProjectName"
></a-select> ></a-select>
</div> </div>
</div> </div>
@@ -181,7 +181,7 @@ export default {
tableDataTotal: 0, tableDataTotal: 0,
projectName: undefined, projectName: undefined,
projectNameList: [ projectNameList: [
{ {
id: 1, id: 1,
value: "0", value: "0",
@@ -241,7 +241,7 @@ export default {
key: "studentDepartName", key: "studentDepartName",
width: "20%", width: "20%",
align: "center", align: "center",
className: "h", className: "h",
ellipsis: true, ellipsis: true,
customRender: (text) => { customRender: (text) => {
@@ -356,8 +356,8 @@ export default {
currentStageId: props.datasource.chapterId, currentStageId: props.datasource.chapterId,
type: 2, type: 2,
pid: props.datasource.routerId, pid: props.datasource.routerId,
taskId: props.datasource.id, taskId: props.datasource.id,
taskType: props.datasource.type, taskType: props.datasource.type,
status: state.projectName, status: state.projectName,
studentName: state.name, studentName: state.name,
}); });
@@ -368,7 +368,7 @@ export default {
currentStageId: props.datasource.chapterId, currentStageId: props.datasource.chapterId,
type: 2, type: 2,
pid: props.datasource.routerId, pid: props.datasource.routerId,
taskId: props.datasource.id, taskId: props.datasource.id,
taskType: props.datasource.type, taskType: props.datasource.type,
status: state.projectName, status: state.projectName,
studentName: state.name, studentName: state.name,
@@ -417,9 +417,9 @@ export default {
// 处理在线课字段和表格中字段保持一致 // 处理在线课字段和表格中字段保持一致
let obj = { let obj = {
studentUserNo: res.data.data.studyDetailList[i].studentCode, studentUserNo: res.data.data.studyDetailList[i].studentCode,
studentName: res.data.data.studyDetailList[i].studentName, studentName: res.data.data.studyDetailList[i].studentName,
studentDepartName: res.data.data.studyDetailList[i].studentDepartName, studentDepartName: res.data.data.studyDetailList[i].studentDepartName,
studentJobName: res.data.data.studyDetailList[i].studentJobName, studentJobName: res.data.data.studyDetailList[i].studentJobName,
lastStudyTime: res.data.data.studyDetailList[i].finishedTime, lastStudyTime: res.data.data.studyDetailList[i].finishedTime,
finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0 finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0
} }
@@ -462,8 +462,8 @@ export default {
// 导出数据 // 导出数据
function exportTaskStu() { function exportTaskStu() {
console.log(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`) console.log(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`) window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}&currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&status=${state.name}&studentName=${state.projectName}`) // window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}&currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&status=${state.name}&studentName=${state.projectName}`)
} }
@@ -718,4 +718,3 @@ export default {
} }
} }
</style> </style>