feat:增加批量标注完成等

This commit is contained in:
lixg
2023-01-07 14:41:16 +08:00
parent 068415d23e
commit 8346807ce0
13 changed files with 177 additions and 84 deletions

13
.env
View File

@@ -1,13 +1,18 @@
# 本项目基础url
VUE_APP_BASE=/manage
# api项目基础url
VUE_APP_BASE_API=/manageApi
# 导出url
VUE_APP_PROXY_URL=http://111.231.196.214:30001/
# 登录url
VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
# boe域名
VUE_APP_BOE_API_URL=https://u-pre.boe.com
# iframe嵌套url
VUE_APP_IFRAME_URL=https://u-pre.boe.com/pc/iframe
# 学员端路由
VUE_APP_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc/loading
COURSE_STUDY=https://u-pre.boe.com/pc/course/studyindex?id=
# 课程二维码
VUE_APP_COURSE_STUDY=https://u-pre.boe.com/pc/course/studyindex?id=

View File

@@ -9,4 +9,4 @@ VUE_APP_BOE_API_URL=https://u.boe.com
VUE_APP_IFRAME_URL=https://u.boe.com/pc/iframe
VUE_APP_IFRAME_STUDENT_URL=https://u.boe.com/pc/loading
COURSE_STUDY=https://u.boe.com/pc/course/studyindex?id=
VUE_APP_COURSE_STUDY=https://u.boe.com/pc/course/studyindex?id=

View File

@@ -9,4 +9,4 @@ VUE_APP_BOE_API_URL=https://u.boe.com
VUE_APP_IFRAME_URL=https://u.boe.com/pc-release/iframe
VUE_APP_IFRAME_STUDENT_URL=https://u.boe.com/pc-release/loading
COURSE_STUDY=https://u.boe.com/pc-release/course/studyindex?id=
VUE_APP_COURSE_STUDY=https://u.boe.com/pc-release/course/studyindex?id=

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-04 22:45:31
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-01-06 15:21:17
* @LastEditTime: 2023-01-06 18:04:16
* @FilePath: /fe-manage/src/api/index1.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -170,7 +170,8 @@ export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave',
//批量标记完成
export const batchFinishTask = (obj) => http.post('/admin/student/batchFinishTask', obj)
//批量更新学员状态
export const batchUpdateStatus = (obj) => http.post('/admin/student/batchUpdateStatus', obj)
// //面授课批量导入成绩
export const batchImportScore = (offcoursePlanId, obj) =>
http.post(`/admin/offcourse/batchImportScore?offcoursePlanId=${offcoursePlanId}`, obj);

View File

@@ -58,6 +58,10 @@ export default {
type: Number,
default: null,
},
getStudent: {
type: Function,
default: null,
},
},
setup(props, ctx) {
const state = reactive({
@@ -93,6 +97,9 @@ export default {
message.destroy();
message.success("标记成功");
closeModal();
props.getStudent && props.getStudent();
ctx.emit("update:ids", []);
// console.log("props.getStudent", props.getStudent);
}
})
.catch((err) => {

View File

@@ -88,7 +88,11 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn1" style="margin-right: 20px" @click="signQR">
<div
class="btn btn1"
style="margin-right: 20px"
@click="qrcodeVisible()"
>
<div class="wz">签到二维码</div>
</div>
<div class="btn btn1" style="margin-right: 20px" @click="showImpStu">
@@ -207,6 +211,15 @@
</div>
</div>
</a-modal>
<!-- 二维码弹窗 -->
<two-dimensional-code
v-model:codevisible="codevisible"
:codeInfo="codeInfo"
:index="codeIndex"
:type="codeType == 1 ? '课程二维码' : codeType == 2 ? '签到二维码' : ''"
/>
<!-- 二维码弹窗 -->
</template>
<script>
@@ -214,11 +227,13 @@ import { toRefs, reactive } from "vue";
import ImpStu from "../../../components/drawers/AddLevelImportStu";
import SignQR from "../SignQR.vue";
import * as api from "../../../api/index1";
import TwoDimensionalCode from "../../../components/TwoDimensionalCode";
export default {
name: "FaceManage",
components: {
ImpStu,
SignQR,
TwoDimensionalCode,
},
props: {
FSvisible: {
@@ -314,6 +329,10 @@ export default {
value: "3",
},
],
codevisible: false, //二维码弹窗
codeType: null,
codeIndex: null,
codeInfo: null, //二维码内容
// selectOption: [],
});
const afterVisibleChange = (bol) => {
@@ -355,8 +374,21 @@ export default {
// state.stopModal = false;
// };
//显示签到二维码弹窗
const signQR = () => {
state.signQRvisible = true;
//二维码
const qrcodeVisible = () => {
state.codevisible = true;
state.codeInfo = {
title: "【签到】二维码",
name: props.projectTaskInfo?.name,
url:
process.env.VUE_APP_BOE_API_URL +
`/admin/student/studentSign?taskId=${
props.projectTaskInfo.projectTaskId
}&type=${1}`,
};
console.log("codeInfo", state.codeInfo);
state.codeIndex = 1;
state.codeType = 2;
};
const onSelectChange = (selectedRowKeys) => {
@@ -708,7 +740,7 @@ export default {
showCopyModal,
closeCopyModal,
// closeStopModal,
signQR,
qrcodeVisible,
afterVisibleChange,
searchTaskList,

View File

@@ -137,7 +137,7 @@
<!-- 批量标注完成 -->
<ASOver
v-model:ASOvervisible="ASOvervisible"
:ids="selectedRowKeys"
v-model:ids="selectedRowKeys"
:taskId="
projectTaskInfo && projectTaskInfo.projectTaskId
? projectTaskInfo.projectTaskId
@@ -157,6 +157,7 @@
? projectTaskInfo.stageId
: null
"
v-model:getStudent="getStudent"
/>
<!-- 录入成绩抽屉 -->
<entry-scores v-model:Evisible="Evisible" />
@@ -393,7 +394,8 @@ export default {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
{text.record.finishStatus == 0 ||
text.record.finishStatus == null
? "未开始"
: text.record.finishStatus == 1
? "已完成"
@@ -560,6 +562,7 @@ export default {
// return;
// }
state.selectedRowKeys = selectedRowKeys;
// console.log("选择信息", e);
};
const allStuOver = () => {
@@ -607,7 +610,7 @@ export default {
if (res.data.code == 200) {
let newData = [];
for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].id;
res.data.data.records[i].key = res.data.data.records[i].studentId;
newData.push(res.data.data.records[i]);
}
state.tabledata = newData;
@@ -702,6 +705,7 @@ export default {
changePaginationStu,
exportTaskStu,
exportHomeWork,
getStudent,
};
},
};

View File

@@ -360,7 +360,8 @@ export default {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
{text.record.finishStatus == 0 ||
text.record.finishStatus == null
? "未开始"
: text.record.finishStatus == 1
? "已完成"
@@ -422,7 +423,7 @@ export default {
style="cursor:pointer;margin-right:10px;"
disabled
>
-
查看
</a-button>
</div>
);

View File

@@ -132,7 +132,7 @@
<!-- 批量标注完成 -->
<ASOver
v-model:ASOvervisible="ASOvervisible"
:ids="selectedRowKeys"
v-model:ids="selectedRowKeys"
:taskId="
datasource && datasource.routerTaskId ? datasource.routerTaskId : null
"
@@ -142,6 +142,7 @@
:currentStageId="
datasource && datasource.chapterId ? datasource.chapterId : null
"
v-model:getStudent="getStudent"
/>
<!-- 录入成绩抽屉 -->
<entry-scores v-model:Evisible="Evisible" />
@@ -395,7 +396,8 @@ export default {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
{text.record.finishStatus == 0 ||
text.record.finishStatus == null
? "未开始"
: text.record.finishStatus == 1
? "已完成"
@@ -554,7 +556,7 @@ export default {
if (res.data.code == 200) {
let newData = [];
for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].id;
res.data.data.records[i].key = res.data.data.records[i].studentId;
newData.push(res.data.data.records[i]);
}
state.tabledata = newData;
@@ -648,6 +650,7 @@ export default {
changePaginationStu,
exportTaskStu,
exportHomeWork,
getStudent,
};
},
};

View File

@@ -371,7 +371,8 @@ export default {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
{text.record.finishStatus == 0 ||
text.record.finishStatus == null
? "未开始"
: text.record.finishStatus == 1
? "已完成"
@@ -433,7 +434,7 @@ export default {
style="cursor:pointer;margin-right:10px;"
disabled
>
-
查看
</a-button>
</div>
);

View File

@@ -1,76 +1,86 @@
<template>
<a-tree-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="labelValue"
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择归属组织"
:labelInValue="true"
allow-clear
v-model:treeExpandedKeys="stuTreeExpandedKeys"
:loading="orgLoading"
:load-data="onLoadData"
:tree-data="options"
:fieldNames="{
children: 'treeChildList',
label: 'name',
value: 'id',
}"
:disabled="disabled"
@change="change"
dropdownClassName="treeDropdown"
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="labelValue"
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择归属组织"
:labelInValue="true"
allow-clear
v-model:treeExpandedKeys="stuTreeExpandedKeys"
:loading="orgLoading"
:load-data="onLoadData"
:tree-data="options"
:fieldNames="{
children: 'treeChildList',
label: 'name',
value: 'id',
}"
:disabled="disabled"
@change="change"
dropdownClassName="treeDropdown"
>
</a-tree-select>
</template>
<script setup>
import {defineEmits, defineProps, ref, watch} from "vue";
import {request, useBoeApi} from "@/api/request";
import {ORG_CHILD_LIST, ORG_LIST} from "@/api/ThirdApi";
import { defineEmits, defineProps, ref, watch } from "vue";
import { request, useBoeApi } from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
const props = defineProps({
value: String,
name: String,
disabled: {
type: Boolean,
default: false
default: false,
},
});
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref({});
const { data: options, loading: orgLoading } = useBoeApi(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
})
const emit = defineEmits({})
const stuTreeExpandedKeys = ref([])
const labelValue = ref({})
const {
data: options,
loading: orgLoading,
} = useBoeApi(ORG_LIST, {keyword: ''}, {
init: true,
result: (res) => res.result.map(e => ({...e, isLeaf: false})),
})
);
watch(props, () => {
stuTreeExpandedKeys.value = []
stuTreeExpandedKeys.value = [];
if (labelValue.value.value !== props.value) {
labelValue.value = {value: props.value, label: props.name}
labelValue.value = { value: props.value, label: props.name };
}
if (labelValue.value.label !== props.name) {
labelValue.value = {value: props.value, label: props.name}
labelValue.value = { value: props.value, label: props.name };
}
})
});
function onLoadData(treeNode) {
return request(ORG_CHILD_LIST, {keyword: '', orgId: treeNode.id}).then(r => {
treeNode.dataRef.treeChildList = r.result.directChildList
options.value = [...options.value]
})
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
options.value = [...options.value];
}
);
}
function change({label,value}, obj, {triggerNode: {props: {namePath}}}) {
emit('update:name', label)
emit('update:fullName', namePath)
emit('update:value', value)
function change(
{ label, value },
obj,
{
triggerNode: {
props: { namePath },
},
}
) {
emit("update:name", label);
emit("update:fullName", namePath);
emit("update:value", value);
}
</script>

View File

@@ -142,13 +142,13 @@
<div class="btn4_tit" @click="showEScoreModal">
<span>批量录入成绩</span>
</div>
<div class="btn4_op1" @click="handleAllover">
<div class="btn4_op1" @click="updateStatus(1)">
<span>批量结业</span>
</div>
<div class="btn4_op2" @click="handleAllSuc">
<div class="btn4_op2" @click="updateStatus(0)">
<span>批量通过</span>
</div>
<div class="btn4_op3" @click="handleAllReject">
<div class="btn4_op3" @click="updateStatus(2)">
<span>批量拒绝</span>
</div>
</div>
@@ -220,6 +220,7 @@
margin-left: 10px;
cursor: pointer;
"
@click="updateStatus(0, record.id)"
>
通过
</div>
@@ -233,6 +234,7 @@
margin-left: 10px;
cursor: pointer;
"
@click="updateStatus(2, record.id)"
>
拒绝
</div>
@@ -340,7 +342,7 @@
</template>
<script setup>
import { computed, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage } from "@/api/index1";
import { delStudentList, getStuPage, batchUpdateStatus } from "@/api/index1";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message } from "ant-design-vue";
@@ -641,6 +643,32 @@ const exportStu = () => {
}admin/student/exportTaskStudent?type=${3}&pid=${props.id}`
);
};
//批量操作 结业、通过、拒绝等
const updateStatus = (status, id) => {
if (!id && stuSelectKeys.value.length === 0) {
message.warning("请选择学员");
}
let obj = {
ids: id ? [id] : stuSelectKeys.value,
};
if (status === 1) {
obj.completionStatus = 1;
} else {
obj.status = status;
}
batchUpdateStatus(obj)
.then((res) => {
console.log("批量更新学员状态", res);
if (res.data.code === 200) {
getStuList();
stuSelectKeys.value = [];
}
})
.catch((err) => {
console.log("批量更新学员状态失败", err);
});
};
</script>
<style lang="scss">
.TableStudent {

View File

@@ -3309,6 +3309,7 @@ export default defineComponent({
addhomeworkvisible: false,
addtestvisible: false,
codevisible: false, //二维码弹窗
codeIndex: null,
codeInfo: null, //二维码内容
codeUrl: codeUrl,
@@ -5414,18 +5415,18 @@ export default defineComponent({
//二维码
const qrcodeVisible = (record, type) => {
console.log(
"record",
record,
process.env.VUE_APP_IFRAME_STUDENT_URL,
process.env.COURSE_STUDY
);
state.codevisible = true;
state.codeInfo = {
title: type == 1 ? "【课程】二维码" : "【签到】二维码",
name: record.name ? record.name : "",
url: process.env.COURSE_STUDY + record.offcourseId,
url:
type == 1
? process.env.VUE_APP_COURSE_STUDY + record.offcourseId
:process.env.VUE_APP_BOE_API_URL + `/admin/student/studentSign?taskId=${
record.offcoursePlanId
}&type=${3}`,
};
console.log("codeInfo", state.codeInfo);
state.codeIndex = type;
state.codeType = type;
};