Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
wyx
2023-01-07 15:26:16 +08:00
13 changed files with 177 additions and 84 deletions

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 {