feat:增加签到签退等

This commit is contained in:
lixg
2023-01-06 17:07:57 +08:00
parent e80ee2f4f7
commit 8cb9c6649e
11 changed files with 297 additions and 143 deletions

View File

@@ -1,54 +1,104 @@
<template>
<a-modal
:visible="ASOvervisible"
:closable="closable"
centered="true"
:footer="null"
wrapClassName="AllStuOverModel"
@cancel="closeModal"
>
<div class="head">
<div class="inhead">
<div class="left">
<div class="gan"></div>
<div class="tis">提示</div>
</div>
<div class="right" @click="closeModal"></div>
</div>
<a-modal
:visible="ASOvervisible"
:closable="closable"
centered="true"
:footer="null"
wrapClassName="AllStuOverModel"
@cancel="closeModal"
>
<div class="head">
<div class="inhead">
<div class="left">
<div class="gan"></div>
<div class="tis">提示</div>
</div>
<div class="main">确定将所选学员标记完成吗</div>
<div class="butn">
<button class="btn btn1" @click="closeModal">取消</button>
<button class="btn btn2" @click="check">确定</button>
</div>
</a-modal>
<div class="right" @click="closeModal"></div>
</div>
</div>
<div class="main">确定将所选学员标记完成吗</div>
<div class="butn">
<button class="btn btn1" @click="closeModal">取消</button>
<button class="btn btn2" @click="batchFinishTask">确定</button>
</div>
</a-modal>
</template>
<script>
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
export default {
props: {
ASOvervisible:{
type:Boolean,
default:false
}
},
setup(props,ctx){
props: {
ASOvervisible: {
type: Boolean,
default: false,
},
type: {
type: Number,
default: null,
},
ids: {
type: Array,
default: () => [],
},
taskId: {
type: Number,
default: null,
},
pid: {
type: Number,
default: null,
},
taskType: {
type: Number,
default: null,
},
currentStageId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
const state = reactive({
closable:false,
closable: false,
});
const closeModal = () => {
ctx.emit("update:ASOvervisible", false);
ctx.emit("update:ASOvervisible", false);
};
const check = () => {
//批量标记完成
const batchFinishTask = () => {
if (props.studentsId.length === 0) {
message.destroy();
message.warning("请选择学员");
return;
}
console.log("props.studentsId", props.studentsId);
closeModal();
let obj = {
ids: props.ids,
type: props.type,
taskId: props.taskId,
pid: props.pid,
taskType: props.taskType,
currentStageId: props.currentStageId,
};
api
.batchFinishTask(obj)
.then((res) => {
console.log("批量标记结果", res);
})
.catch((err) => {
console.log("批量标记失败", err);
});
};
return{
...toRefs(state),
closeModal,
check,
}
}
return {
...toRefs(state),
closeModal,
batchFinishTask,
};
},
};
</script>
<style lang="scss">

View File

@@ -135,7 +135,15 @@
</div>
</a-drawer>
<!-- 批量标注完成 -->
<ASOver v-model:ASOvervisible="ASOvervisible" />
<ASOver
v-model:ASOvervisible="ASOvervisible"
:ids="selectedRowKeys"
:taskId="projectTaskInfo.projectTaskId"
:type="2"
:pid="projectTaskInfo.projectId"
:taskType="projectTaskInfo.type"
:currentStageId="projectTaskInfo.stageId"
/>
<!-- 录入成绩抽屉 -->
<entry-scores v-model:Evisible="Evisible" />
<!-- 查看作业抽屉 -->
@@ -664,6 +672,7 @@ export default {
}&taskType=${props.projectTaskInfo.type}`
);
}
return {
...toRefs(state),
selectProjectName,

View File

@@ -127,8 +127,7 @@
</div>
</div>
</a-drawer>
<!-- 批量标注完成 -->
<ASOver v-model:ASOvervisible="ASOvervisible" />
<!-- 录入成绩抽屉 -->
<EScore v-model:eScorevisible="Evisible" />
<!-- 查看作业抽屉 -->
@@ -140,7 +139,6 @@
<script>
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import ASOver from "../AllStuOver.vue";
import CKWork from "../CheckWork.vue";
import CQue from "../CheckQue.vue";
// import EntryScores from "../EntryScores.vue";
@@ -153,7 +151,6 @@ export default {
// EntryScores,
CKWork,
CQue,
ASOver,
EScore,
},
props: {

View File

@@ -130,7 +130,15 @@
</div>
</a-drawer>
<!-- 批量标注完成 -->
<ASOver v-model:ASOvervisible="ASOvervisible" />
<ASOver
v-model:ASOvervisible="ASOvervisible"
:ids="selectedRowKeys"
:taskId="datasource.routerTaskId"
:type="2"
:pid="datasource.routerId"
:taskType="datasource.type"
:currentStageId="datasource.chapterId"
/>
<!-- 录入成绩抽屉 -->
<entry-scores v-model:Evisible="Evisible" />
<!-- 查看作业抽屉 -->

View File

@@ -122,8 +122,7 @@
</div>
</div>
</a-drawer>
<!-- 批量标注完成 -->
<ASOver v-model:ASOvervisible="ASOvervisible" />
<!-- 录入成绩抽屉 -->
<EScore v-model:eScorevisible="Evisible" />
<!-- 查看作业抽屉 -->
@@ -135,7 +134,6 @@
<script>
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import ASOver from "../AllStuOver.vue";
import CKWork from "../CheckWork.vue";
import CQue from "../CheckQue.vue";
// import EntryScores from "../EntryScores.vue";
@@ -148,7 +146,6 @@ export default {
// EntryScores,
CKWork,
CQue,
ASOver,
EScore,
},
props: {

View File

@@ -14,6 +14,40 @@
/>
</a-form-item>
</a-col>
<a-col v-if="type === 1">
<a-form-item title="小组名称:">
<a-input
class="cus-input"
v-model:value="tableParam.groupName"
placeholder="请输入小组名称"
/>
</a-form-item>
</a-col>
<a-col v-if="type === 1">
<a-form-item title="部门:">
<div class="select in" style="width: 270px">
<OrgClass
v-model:value="tableParam.studentDepartId"
v-model:name="tableParam.studentDepartName"
></OrgClass>
</div>
</a-form-item>
</a-col>
<a-col v-if="type === 1">
<a-form-item title="优秀学员:">
<div class="select">
<a-select
v-model:value="tableParam.topFlag"
style="width: 260px; height: 40px"
placeholder="是否为优秀学员"
:options="topFlagList"
@change="selectProjectName"
allowClear
showSearch
></a-select>
</div>
</a-form-item>
</a-col>
<a-col>
<a-button class="cus-btn" style="width: 100px" @click="getStuList">
<template #icon>
@@ -120,14 +154,14 @@
</div>
</div>
</div>
<div class="stmm_btn btn5" @click="handleExportStu">
<div class="stmm_btn btn5" @click="exportStu">
<div class="export"></div>
<div class="btnText">导出</div>
</div>
<div
class="stmm_btn btn5"
style="margin-left: 15px"
@click="handleExportStu"
@click="exportHomeWork"
>
<div class="btnText">导出作业</div>
</div>
@@ -313,6 +347,7 @@ import { message } from "ant-design-vue";
// import { topStudent } from "../../api/indexProjStu";
import SeeStu from "../../components/drawers/SeeStu";
import ExportScore from "../drawers/ExportScore.vue";
import OrgClass from "@/components/project/OrgClass";
const props = defineProps({
type: Number,
id: String,
@@ -329,6 +364,18 @@ const props = defineProps({
default: false,
},
});
const topFlagList = ref([
{
id: 0,
value: 0,
label: "普通学员",
},
{
id: 1,
value: 1,
label: "优秀学员",
},
]);
const tablecolumns = ref([
{
title: "姓名",
@@ -397,7 +444,11 @@ const tablecolumns = ref([
},
]);
const tableParam = ref({
studentName: "",
studentName: "", //学员名称
groupName: "", //学员小组
studentDepartId: null, //部门
studentDepartName: null, //部门名称
topFlag: null, //是否是优秀学员
pageNo: 1,
pageSize: 10,
type: props.type,
@@ -450,6 +501,7 @@ function changePagination(page) {
function getStuList() {
tableData.value.loading = true;
console.log("tableParam.value", tableParam.value);
getStuPage(tableParam.value).then((res) => {
console.log("学员管理-获取学员", res.data);
tableData.value.total = res.data.data.total;
@@ -460,6 +512,10 @@ function getStuList() {
function reset() {
tableParam.value.studentName = "";
tableParam.value.groupName = ""; //学员小组
tableParam.value.studentDepartId = null; //部门
tableParam.value.studentDepartName = null; //部门
tableParam.value.topFlag = null; //是否是优秀学员
getStuList();
}
@@ -568,6 +624,23 @@ const eScorevisible = ref(false);
const showEScoreModal = () => {
eScorevisible.value = true;
};
//导出作业
const exportHomeWork = () => {
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportHomeWork?type=${3}&pid=${props.id}`
);
};
//导出
const exportStu = () => {
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportTaskStudent?type=${3}&pid=${props.id}`
);
};
</script>
<style lang="scss">
.TableStudent {