mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 01:46:43 +08:00
style:新版面授课界面添加
This commit is contained in:
BIN
src/assets/images/courseManage/persion.png
Normal file
BIN
src/assets/images/courseManage/persion.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
BIN
src/assets/images/courseManage/position.png
Normal file
BIN
src/assets/images/courseManage/position.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
BIN
src/assets/images/courseManage/time.png
Normal file
BIN
src/assets/images/courseManage/time.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
278
src/components/drawers/AddFaceClass.vue
Normal file
278
src/components/drawers/AddFaceClass.vue
Normal file
@@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<div @click="openDrawer">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-drawer :visible="visible" class="drawerStyle addinvistDrawer" width="70%" title="添加面授" placement="right">
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div v-if="taskIndex>=0" class="headerTitle">编辑面授</div>
|
||||
<div v-else class="headerTitle">添加面授</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main">
|
||||
<div class="main_left">
|
||||
<FaceClassAll v-model:id="formData.courseId" v-model:name="formData.courseName"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineEmits, defineProps, ref} from "vue";
|
||||
import {Form, message} from "ant-design-vue";
|
||||
import FaceClassAll from "@/components/drawers/FeaceClassAll.vue";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
taskList: []
|
||||
})
|
||||
const visible = ref(false)
|
||||
const formData = ref({
|
||||
courseId: '',
|
||||
courseName: '',
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
const taskIndex = ref(-1);
|
||||
const rulesRef = ref({
|
||||
courseId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择课程',
|
||||
},
|
||||
],
|
||||
courseName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择课程',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const {resetFields, validate} = Form.useForm(formData, rulesRef);
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
taskIndex.value = -1
|
||||
resetFields()
|
||||
};
|
||||
|
||||
async function confirm() {
|
||||
await validate().catch(({errorFields}) => {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过")
|
||||
});
|
||||
if (taskIndex.value === -1) {
|
||||
const list = props.taskList
|
||||
list.push({
|
||||
name: formData.value.courseName,
|
||||
type: props.type,
|
||||
courseId: formData.value.courseId,
|
||||
info: {...formData.value}
|
||||
})
|
||||
console.log('新建',{
|
||||
name: formData.value.courseName,
|
||||
type: props.type,
|
||||
courseId: formData.value.courseId,
|
||||
info: {...formData.value}
|
||||
})
|
||||
} else {
|
||||
const data = props.taskList[taskIndex.value]
|
||||
data.name = formData.value.courseName
|
||||
data.courseId = formData.value.courseId
|
||||
data.info = {...formData.value}
|
||||
}
|
||||
emit('update:taskList', [...props.taskList])
|
||||
closeDrawer()
|
||||
}
|
||||
|
||||
function openDrawer(i, row) {
|
||||
console.log(row)
|
||||
row && (formData.value = {courseId: row.info?row.info.courseId:row.id, courseName: row.info?row.info.courseName:row.name});
|
||||
(i >= 0) && (taskIndex.value = i);
|
||||
visible.value = true
|
||||
console.log('11111',formData.value)
|
||||
}
|
||||
|
||||
defineExpose({openDrawer})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
.addinvistDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.contentMain {
|
||||
.main {
|
||||
width: 100%;
|
||||
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
margin-top: 32px;
|
||||
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.fi_input {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-right: 20px;
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
//border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnsn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_notice {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 3px;
|
||||
height: 40px;
|
||||
background-color: #e9f6fe;
|
||||
|
||||
.mntc_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
margin-right: 17px;
|
||||
}
|
||||
|
||||
.data {
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.notice_icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 9px;
|
||||
margin-left: 9px;
|
||||
background-image: url(@/assets/images/coursewareManage/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.mntc_right {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_btns {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
1382
src/components/drawers/AddOpenCourse.vue
Normal file
1382
src/components/drawers/AddOpenCourse.vue
Normal file
File diff suppressed because it is too large
Load Diff
470
src/components/drawers/FeaceClassAll.vue
Normal file
470
src/components/drawers/FeaceClassAll.vue
Normal file
@@ -0,0 +1,470 @@
|
||||
<!-- 面授列表 -->
|
||||
<template>
|
||||
<div class="main_item">
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="params.courseName"
|
||||
style="width: 220px; height: 40px; border-radius: 8px;margin-right: 32px;"
|
||||
placeholder="请输入课程名称/编号"
|
||||
maxlength="20"
|
||||
/>
|
||||
<a-tree-select
|
||||
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
|
||||
v-model:value="valueproj"
|
||||
show-search
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
:fieldNames="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'code',
|
||||
}"
|
||||
placeholder="请选择内容分类"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="sysTypeOptions">
|
||||
</a-tree-select>
|
||||
</div>
|
||||
<div class="btns" @click="search" style="margin-left: 16px;">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btnsn" @click="reset">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<button class="xkbtn" style="margin: 0" @click="goResearchmanage">
|
||||
新建课程
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="main_notice" style="display: none">
|
||||
<div class="mntc_left">
|
||||
<div class="notice_icon"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_table">
|
||||
<a-table
|
||||
:customRow="customRow"
|
||||
class="ant-table-striped"
|
||||
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:loading="loading"
|
||||
:pagination="pagination"
|
||||
:row-selection="rowSelection"
|
||||
/>
|
||||
</div>
|
||||
<!-- 新建面授课 -->
|
||||
<CourseModal
|
||||
ref="CourseModalRef"
|
||||
v-model:xzinputV1="xzinputV1"
|
||||
@visibleClose="visibleClose"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { courseListView } from "../../api/indexAudit";
|
||||
import CourseModal from "../../views/courselibrary/courseModal.vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
const props = defineProps({
|
||||
id: String,
|
||||
name: String,
|
||||
});
|
||||
const emit = defineEmits([]);
|
||||
const store = useStore();
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
const valueproj = ref(null);
|
||||
const columns = ref([
|
||||
{
|
||||
title: "课程编号",
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
width: "40%",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: "40%",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
dataIndex: "sysTypeId",
|
||||
key: "sysTypeId",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: (text) => (
|
||||
<div>
|
||||
{sHX(text.record.sysTypeId)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const initParams = {
|
||||
courseName: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
releaseStatus: 2,
|
||||
};
|
||||
// const router = useRouter();
|
||||
const params = ref(initParams);
|
||||
|
||||
const rowSelectKeys = ref([]);
|
||||
const selectsData = ref([]);
|
||||
const total = ref(0);
|
||||
const data = ref([]);
|
||||
const loading = ref(false);
|
||||
|
||||
const sysTypeOption = computed(() => store.state.content_type);
|
||||
|
||||
function findClassFullName(list,classify,name=''){
|
||||
return list && list.length && list.map(e=>{
|
||||
return classify == e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,classify,name?name+'-'+e.name:e.name)
|
||||
}).filter(name=>name).join('')
|
||||
}
|
||||
|
||||
// 课程三级分类回显
|
||||
const sHX = (classify) => {
|
||||
return findClassFullName(sysTypeOption.value,classify) || '-'
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
loading.value = true
|
||||
let objn = {
|
||||
auditStatus: 0,
|
||||
sysTypeId: valueproj.value,
|
||||
name: params.value.courseName,
|
||||
pageNo: params.value.pageNo,
|
||||
pageSize: 10,
|
||||
};
|
||||
console.log(objn);
|
||||
courseListView(objn)
|
||||
.then((res) => {
|
||||
console.log("获取已审核课程成功", res.data.data);
|
||||
data.value = res.data.data.rows;
|
||||
total.value = Number(res.data.data.total);
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取已审核课程失败", err);
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
getList()
|
||||
|
||||
// 新建面授课
|
||||
const CourseModalRef = ref(null);
|
||||
|
||||
const visibleClose = () => {
|
||||
getList()
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.id,
|
||||
() => {
|
||||
if (props.id) {
|
||||
console.log(props)
|
||||
rowSelectKeys.value = [props.id];
|
||||
selectsData.value = [{ id: props.id, name: props.name }];
|
||||
} else {
|
||||
rowSelectKeys.value = [];
|
||||
selectsData.value = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const customRow = (record) => ({
|
||||
onClick: () => {
|
||||
rowSelectKeys.value = [record.id];
|
||||
selectsData.value = [record];
|
||||
emit("update:id", selectsData.value[0].id);
|
||||
emit("update:name", selectsData.value[0].name);
|
||||
},
|
||||
});
|
||||
|
||||
const pagination = computed(() => ({
|
||||
total: total.value,
|
||||
showSizeChanger: false,
|
||||
current: params.value.pageNo,
|
||||
pageSize: params.value.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
|
||||
const changePagination = (e) => {
|
||||
params.value.pageNo = e;
|
||||
getList();
|
||||
};
|
||||
const rowSelection = computed(() => ({
|
||||
type: "radio",
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: rowSelectKeys.value,
|
||||
onChange: onSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
getCheckboxProps: getCheckboxProps,
|
||||
}));
|
||||
const getCheckboxProps = () => ({
|
||||
// 某几项默认禁止选中(R: 当state等于1时)
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
function onSelectChange(e, l) {
|
||||
console.log(e,l)
|
||||
rowSelectKeys.value = e;
|
||||
selectsData.value = l;
|
||||
console.log('112233',selectsData.value)
|
||||
emit("update:id", selectsData.value[0].id);
|
||||
emit("update:name", selectsData.value[0].name);
|
||||
}
|
||||
|
||||
function search() {
|
||||
params.value.pageIndex = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
rowSelectKeys.value = [];
|
||||
selectsData.value = [];
|
||||
params.value.pageIndex = 1;
|
||||
params.value.keyWord = "";
|
||||
params.value.courseName = "";
|
||||
valueproj.value = null;
|
||||
getList();
|
||||
}
|
||||
|
||||
const goResearchmanage = () => {
|
||||
CourseModalRef.value.visibleOpen(null, "");
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-select-selector {
|
||||
border-radius: 8px !important;
|
||||
align-items: center !important;
|
||||
width: 220px !important;
|
||||
height: 40px !important;
|
||||
padding-top: 5px;
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
.ant-select-show-search {
|
||||
width: 220px !important;
|
||||
}
|
||||
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 8px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
.addinvistDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.contentMain {
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
margin-top: 32px;
|
||||
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.fi_input {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-right: 20px;
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
//border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnsn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: rgba(64, 158, 255, 1) !important;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset0.png") !important;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #fff !important;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_item2 {
|
||||
.pa {
|
||||
width: 100%;
|
||||
margin: 15px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_table {
|
||||
position: relative;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.ant-checkbox-wrapper {
|
||||
align-items: center;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
.pa {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.main_btns {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="FSvisible"
|
||||
class="drawerStyle ProjectFaceStu"
|
||||
class="drawerStyle RouterFaceStu"
|
||||
placement="right"
|
||||
width="80%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">【面授】{{ projectTaskInfo?.name }}</div>
|
||||
<div class="headerTitle">【面授】{{ datasource?.name }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../../assets/images/basicinfo/close.png"
|
||||
@@ -17,21 +17,29 @@
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="titl">
|
||||
<div class="endtime">
|
||||
起止时间:{{
|
||||
projectTaskInfo && projectTaskInfo.startTime
|
||||
? projectTaskInfo.startTime
|
||||
: "-"
|
||||
}}
|
||||
~
|
||||
{{
|
||||
projectTaskInfo && projectTaskInfo.endTime
|
||||
? projectTaskInfo.endTime
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="endtime" style="margin-left: 64px">
|
||||
允许签到时段:{{ beginTime }}~{{ endTime }}
|
||||
<div
|
||||
style="width: 100%;height:220px;display: flex;flex-wrap: nowrap;overflow-x: scroll;">
|
||||
<div v-for="item,n in [1,2,3]" :key="n" style="cursor: pointer;">
|
||||
<div
|
||||
@click="ChoiceCourse(item)"
|
||||
style="width: 360px;height:180px;margin-right: 32px;display: flex;flex-direction: column;padding: 16px;"
|
||||
:style="{background:item==currentCourse?'rgb(247, 251, 253)':'rgb(250, 250, 250)'}">
|
||||
<div style="font-size: 16px;">第{{item}}次开课</div>
|
||||
<div style="font-size: 14px;margin-top: 12px;">2023年管理者面授课程({{item}})</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/time.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
2023.3.14 12:34 ~ 2023.3.17 12:34
|
||||
</div>
|
||||
<div style="font-size: 14px;margin-top: 6px;margin-bottom: 6px;">
|
||||
<img src="../../../assets/images/courseManage/position.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
京东方大厦({{item}})号楼
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/persion.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
董瑞华
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,12 +53,12 @@
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="namecon" style="margin-right: 30px">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">考勤:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="projectName"
|
||||
style="width: 160px"
|
||||
style="width: 200px"
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
@@ -58,7 +66,7 @@
|
||||
showSearch
|
||||
></a-select>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="namecon">
|
||||
<div class="name">签到状态:</div>
|
||||
<div class="select">
|
||||
@@ -82,13 +90,13 @@
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="btn btn1" @click="resetTaskList">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@@ -100,10 +108,10 @@
|
||||
<div class="img1"></div>
|
||||
<div class="wz">导入学员</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="showCopyModal">
|
||||
<div class="btn btn1" @click="showCopyModal" style="margin-right: 20px">
|
||||
<div class="wz">批量签到</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportTaskStu">
|
||||
<div class="btn btn1" @click="exportTaskStu">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
@@ -121,14 +129,13 @@
|
||||
<div class="right" @click="clearLine">清空</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pad"></div> -->
|
||||
<div class="pad"></div> -->
|
||||
|
||||
<div class="tableBox" style="margin-top: 30px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 1300 }"
|
||||
@@ -185,7 +192,7 @@
|
||||
<imp-stu
|
||||
v-model:AddImpStuvisible="AddImpStuvisible"
|
||||
@AddImpStuvisibleClose="AddImpStuvisibleClose"
|
||||
:courseId="projectTaskInfo.courseId"
|
||||
:courseId="datasource.courseId"
|
||||
:courseType="3"
|
||||
/>
|
||||
<!-- 批量签到弹窗 -->
|
||||
@@ -237,6 +244,8 @@ import * as api from "../../../api/index1";
|
||||
import TwoDimensionalCode from "../../../components/TwoDimensionalCode";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../../api/method";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "FaceManage",
|
||||
components: {
|
||||
@@ -245,11 +254,19 @@ export default {
|
||||
TwoDimensionalCode,
|
||||
},
|
||||
props: {
|
||||
createId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
permissions: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
FSvisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
projectTaskInfo: {
|
||||
datasource: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
@@ -267,6 +284,7 @@ export default {
|
||||
closeStop: false, //签退弹窗关闭图标
|
||||
signQRvisible: false, //二维码弹窗
|
||||
name: null,
|
||||
projectName: undefined,
|
||||
projectName2: undefined,
|
||||
showmodal: false, //勾选提示框
|
||||
closable: false, //modal右上角的关闭按钮
|
||||
@@ -279,23 +297,23 @@ export default {
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
value: "项目一",
|
||||
label: "项目一",
|
||||
value: "签到",
|
||||
label: "签到",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "项目二",
|
||||
label: "项目二",
|
||||
value: "缺勤",
|
||||
label: "缺勤",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "项目三",
|
||||
label: "项目三",
|
||||
value: "迟到",
|
||||
label: "迟到",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
value: "项目四",
|
||||
label: "项目四",
|
||||
value: "请假",
|
||||
label: "请假",
|
||||
},
|
||||
],
|
||||
projectNameList2: [
|
||||
@@ -339,17 +357,24 @@ export default {
|
||||
value: "3",
|
||||
},
|
||||
],
|
||||
// selectOption: [],
|
||||
codevisible: false, //二维码弹窗
|
||||
codeType: null,
|
||||
codeIndex: null,
|
||||
codeInfo: null, //二维码内容
|
||||
// selectOption: [],
|
||||
beginTime: null, //签到开始时间
|
||||
endTime: null, //签到结束时间
|
||||
currentCourse: 1,
|
||||
});
|
||||
|
||||
const ChoiceCourse = (n) => {
|
||||
state.currentCourse = n;
|
||||
}
|
||||
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getStudent();
|
||||
console.log("1111");
|
||||
isSignClick();
|
||||
}
|
||||
};
|
||||
@@ -391,14 +416,13 @@ export default {
|
||||
//批量签到
|
||||
const batchSign = () => {
|
||||
let obj = {
|
||||
courseId: Number(props.projectTaskInfo.courseId),
|
||||
projectId: Number(props.projectTaskInfo.projectId),
|
||||
// routerId: Number(props.projectTaskInfo.projectId),
|
||||
courseId: Number(props.datasource.courseId),
|
||||
// projectId: 0,
|
||||
routerId: Number(props.datasource.routerId),
|
||||
ids: state.selectedStudents,
|
||||
taskId: Number(props.projectTaskInfo.projectTaskId),
|
||||
taskType: Number(props.projectTaskInfo.type),
|
||||
type: 3,
|
||||
// userName: "",
|
||||
taskId: Number(props.datasource.routerTaskId),
|
||||
taskType: Number(props.datasource.type),
|
||||
type: 2,
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj)
|
||||
@@ -418,32 +442,17 @@ export default {
|
||||
console.log("签到失败", err, obj);
|
||||
});
|
||||
};
|
||||
|
||||
// const closeStopModal = () => {
|
||||
// state.stopModal = false;
|
||||
// };
|
||||
//显示签到二维码弹窗
|
||||
//二维码
|
||||
const qrcodeVisible = () => {
|
||||
state.codevisible = true;
|
||||
state.codeInfo = {
|
||||
title: "【签到】二维码",
|
||||
name: props.projectTaskInfo?.name,
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
`/admin/student/studentSign?taskId=${
|
||||
props.projectTaskInfo.projectTaskId
|
||||
}&taskType=${props.projectTaskInfo.type}&type=${1}`,
|
||||
};
|
||||
console.log("codeInfo", state.codeInfo);
|
||||
state.codeIndex = 0;
|
||||
state.codeType = 1;
|
||||
const signQR = () => {
|
||||
state.signQRvisible = true;
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys, e) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys, e);
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
// state.selectedStudents=e
|
||||
let array = [];
|
||||
for (let i = 0; i < e.length; i++) {
|
||||
array.push(e[i].studentId);
|
||||
@@ -455,44 +464,7 @@ export default {
|
||||
state.selectedRowKeys = [];
|
||||
state.selectedStudents = [];
|
||||
};
|
||||
// const getTableData = () => {
|
||||
// let arr = state.tabledata;
|
||||
// arr.map((value) => {
|
||||
// // console.log("value", value);
|
||||
// value.opacation = (
|
||||
// <div class="opa">
|
||||
// <a-checkbox
|
||||
// checked={value.signIn}
|
||||
// onChange={(e) => {
|
||||
// console.log("点击签到", e);
|
||||
// }}
|
||||
// >
|
||||
// 签到
|
||||
// </a-checkbox>
|
||||
// {/**
|
||||
// <a-checkbox
|
||||
// checked={value.signOut}
|
||||
// onChange={(e) => {
|
||||
// console.log("点击签退", e);
|
||||
// }}
|
||||
// >
|
||||
// 签退
|
||||
// </a-checkbox>
|
||||
// */}
|
||||
// <a-checkbox
|
||||
// checked={value.leave}
|
||||
// onChange={(e) => {
|
||||
// console.log("点击请假", e);
|
||||
// }}
|
||||
// >
|
||||
// 请假
|
||||
// </a-checkbox>
|
||||
// </div>
|
||||
// );
|
||||
// });
|
||||
// state.tabledata = arr;
|
||||
// };
|
||||
// getTableData();
|
||||
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
@@ -500,7 +472,7 @@ export default {
|
||||
dataIndex: "studentUserNo",
|
||||
// width: "30%",
|
||||
key: "studentUserNo",
|
||||
width: 50,
|
||||
width: 120,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
@@ -538,10 +510,10 @@ export default {
|
||||
dataIndex: "studentDepartName",
|
||||
// width: "30%",
|
||||
key: "studentDepartName",
|
||||
width: 50,
|
||||
width: 60,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
@@ -590,6 +562,38 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考勤",
|
||||
dataIndex: "signTime",
|
||||
key: "signTime",
|
||||
width: 110,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signTime ? text.record.signTime : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
dataIndex: "signTime",
|
||||
key: "signTime",
|
||||
width: 110,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signTime ? text.record.signTime : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "签退时间",
|
||||
// dataIndex: "jin",
|
||||
@@ -598,45 +602,6 @@ export default {
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
{
|
||||
title: "考勤",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
// console.log("text", text);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.signStatus
|
||||
? "签到"
|
||||
: text.record.leaveStatus
|
||||
? "请假"
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{ text.record.signStatus == null && new Date().getTime() > new Date(state.endTime).getTime() ? "异常" : text.record.signStatus ? "正常" : text.record.leaveStatus ? "异常" : text.record.signStatus == null ? "-" : "异常" }</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考勤情况",
|
||||
ellipsis: true,
|
||||
@@ -648,6 +613,7 @@ export default {
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
|
||||
customRender: (text) => {
|
||||
// console.log("text.record.signStatus", text.record.signStatus);
|
||||
return (
|
||||
<div class="opa">
|
||||
<a-radio
|
||||
@@ -656,15 +622,14 @@ export default {
|
||||
onChange={(e) => {
|
||||
console.log("点击签到", e);
|
||||
let obj = {
|
||||
courseId: Number(props.projectTaskInfo.courseId),
|
||||
projectId: Number(props.projectTaskInfo.projectId),
|
||||
// routerId: Number(props.projectTaskInfo.projectId),
|
||||
courseId: Number(props.datasource.courseId),
|
||||
// projectId: 0,
|
||||
routerId: Number(props.datasource.routerId),
|
||||
ids: [text.record.studentId],
|
||||
studentName: text.record.studentName,
|
||||
taskId: Number(props.projectTaskInfo.projectTaskId),
|
||||
taskType: Number(props.projectTaskInfo.type),
|
||||
type: 3,
|
||||
// userName: "",
|
||||
taskId: Number(props.datasource.routerTaskId),
|
||||
taskType: Number(props.datasource.type),
|
||||
type: 2,
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj)
|
||||
@@ -688,16 +653,17 @@ export default {
|
||||
value="2"
|
||||
checked={text.record.leaveStatus}
|
||||
onChange={(e) => {
|
||||
console.log("点击请假", e, props.projectTaskInfo);
|
||||
console.log("点击请假", e, props.datasource);
|
||||
let obj = {
|
||||
courseId: Number(props.projectTaskInfo.courseId),
|
||||
projectId: Number(props.projectTaskInfo.projectId),
|
||||
// routerId: Number(props.projectTaskInfo.projectId),
|
||||
courseId: Number(props.datasource.courseId),
|
||||
// projectId: 0,
|
||||
routerId: Number(props.datasource.routerId),
|
||||
ids: [text.record.studentId],
|
||||
studentName: text.record.studentName,
|
||||
taskId: Number(props.projectTaskInfo.projectTaskId),
|
||||
taskType: Number(props.projectTaskInfo.type),
|
||||
type: 3,
|
||||
taskId: Number(props.datasource.routerTaskId),
|
||||
taskType: Number(props.datasource.type),
|
||||
type: 2,
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceLeave(obj)
|
||||
@@ -717,76 +683,6 @@ export default {
|
||||
>
|
||||
请假
|
||||
</a-radio>
|
||||
|
||||
{/**
|
||||
<a-checkbox
|
||||
checked={text.record.signIn}
|
||||
onChange={(e) => {
|
||||
console.log("点击签到", e);
|
||||
let obj = {
|
||||
courseId: Number(props.projectTaskInfo.courseId),
|
||||
projectId: Number(props.projectTaskInfo.projectId),
|
||||
// routerId: Number(props.projectTaskInfo.projectId),
|
||||
ids: [Number(text.record.studentId)],
|
||||
studentName: text.record.studentName,
|
||||
taskId: Number(props.projectTaskInfo.projectTaskId),
|
||||
taskType: Number(props.projectTaskInfo.type),
|
||||
type: 1,
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj, (res) => {
|
||||
console.log("签到结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.signIn = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("签到失败", err, obj);
|
||||
text.record.signIn = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
签到
|
||||
</a-checkbox>
|
||||
<a-checkbox
|
||||
checked={text.record.leave}
|
||||
onChange={(e) => {
|
||||
console.log("点击请假", e, props.projectTaskInfo);
|
||||
let obj = {
|
||||
courseId: Number(props.projectTaskInfo.courseId),
|
||||
projectId: Number(props.projectTaskInfo.projectId),
|
||||
// routerId: Number(props.projectTaskInfo.projectId),
|
||||
studentId: Number(text.record.studentId),
|
||||
studentName: text.record.studentName,
|
||||
taskId: Number(props.projectTaskInfo.projectTaskId),
|
||||
taskType: Number(props.projectTaskInfo.type),
|
||||
type: 1,
|
||||
};
|
||||
api
|
||||
.attendanceLeave(obj, (res) => {
|
||||
console.log("请假结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.leave = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("请假结果", err, obj);
|
||||
text.record.leave = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
请假
|
||||
</a-checkbox>
|
||||
<a-checkbox
|
||||
checked={value.signOut}
|
||||
onChange={(e) => {
|
||||
console.log("点击签退", e);
|
||||
}}
|
||||
>
|
||||
签退
|
||||
</a-checkbox>
|
||||
*/}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -797,18 +693,30 @@ export default {
|
||||
|
||||
//获取学员
|
||||
const getStudent = () => {
|
||||
console.log("我是传递的查询参数222", props.datasource, {
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
type: 2,
|
||||
pid: props.datasource.routerId,
|
||||
// status: Number(state.name),
|
||||
studentName: state.name,
|
||||
signStatus: state.projectName2,
|
||||
taskId: props.datasource.routerTaskId,
|
||||
taskType: props.datasource.type,
|
||||
});
|
||||
api
|
||||
.AssessmentManagementMessage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.projectTaskInfo.stageId,
|
||||
// currentStageId: props.datasource.chapterId,
|
||||
type: 3,
|
||||
pid: props.projectTaskInfo.courseId,
|
||||
pid: props.datasource.courseId,
|
||||
// status: Number(state.name),
|
||||
studentName: state.name,
|
||||
// taskId: props.projectTaskInfo.projectTaskId,
|
||||
signStatus: state.projectName2,
|
||||
// taskType: props.projectTaskInfo.type,
|
||||
studentName: state.name,
|
||||
// taskId: props.datasource.routerTaskId,
|
||||
// taskType: props.datasource.type,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("获取面授管理学员", res);
|
||||
@@ -826,6 +734,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.tabledata = [];
|
||||
state.tabledata = [{name:'测试数据'}];
|
||||
});
|
||||
};
|
||||
//搜索学员
|
||||
@@ -837,6 +746,7 @@ export default {
|
||||
};
|
||||
// 重置按钮
|
||||
function resetTaskList() {
|
||||
state.projectName = undefined;
|
||||
state.currentPage = 1;
|
||||
state.name = null;
|
||||
state.projectName2 = undefined;
|
||||
@@ -853,27 +763,33 @@ export default {
|
||||
};
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
console.log("props.projectTaskInfo", props.projectTaskInfo);
|
||||
console.log("props.datasource", props.datasource);
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.projectTaskInfo.stageId}&type=3&pid=${props.projectTaskInfo.courseId}&thirdType=6`
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?currentStageId=${
|
||||
props.datasource.chapterId
|
||||
}&type=3&pid=${props.datasource.courseId}&thirdType=7&taskId=${props.datasource.routerTaskId}`
|
||||
);
|
||||
// api
|
||||
// .exportTaskStudent({
|
||||
// pageNo: state.currentPage,
|
||||
// pageSize: state.pageSize,
|
||||
// currentStageId: props.projectTaskInfo.stageId,
|
||||
// currentTaskId: props.projectTaskInfo.projectTaskId,
|
||||
// type: 1,
|
||||
// pid: props.projectTaskInfo.projectId,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
}
|
||||
|
||||
//二维码
|
||||
const qrcodeVisible = () => {
|
||||
state.codevisible = true;
|
||||
state.codeInfo = {
|
||||
title: "【签到】二维码",
|
||||
name: props.datasource?.name,
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
`/admin/student/studentSign?taskId=${
|
||||
props.datasource.routerTaskId
|
||||
}&taskType=${props.datasource.type}&type=${2}`,
|
||||
};
|
||||
console.log("codeInfo", state.codeInfo);
|
||||
state.codeIndex = 0;
|
||||
state.codeType = 1;
|
||||
};
|
||||
|
||||
{
|
||||
/* 添加学员弹框关闭,重新获取学员列表 */
|
||||
}
|
||||
@@ -886,42 +802,35 @@ export default {
|
||||
getStudent();
|
||||
}
|
||||
};
|
||||
|
||||
// 计算签到时间
|
||||
const isSignClick = () => {
|
||||
console.log("props.projectTaskInfo.startTime", props.projectTaskInfo);
|
||||
let beginTime = new Date(props.projectTaskInfo.startTime).getTime();
|
||||
let endTime = !props.projectTaskInfo.afterStart
|
||||
? new Date(props.projectTaskInfo.endTime).getTime()
|
||||
: new Date(props.projectTaskInfo.startTime).getTime();
|
||||
console.log("beginTime,endTime", beginTime, endTime);
|
||||
if (
|
||||
props.projectTaskInfo.beforeStart &&
|
||||
props.projectTaskInfo.afterStart
|
||||
) {
|
||||
console.log("计算签到时间", props.datasource);
|
||||
let beginTime = new Date(props.datasource.startTime).getTime();
|
||||
let endTime = !props.datasource.afterStart
|
||||
? new Date(props.datasource.endTime).getTime()
|
||||
: new Date(props.datasource.startTime).getTime();
|
||||
|
||||
if (props.datasource.beforeStart && props.datasource.afterStart) {
|
||||
//有开始前有开始后
|
||||
beginTime = beginTime - props.projectTaskInfo.beforeStart * 60 * 1000;
|
||||
endTime = endTime + props.projectTaskInfo.afterStart * 60 * 1000;
|
||||
console.log("1111");
|
||||
} else if (
|
||||
props.projectTaskInfo.beforeStart &&
|
||||
!props.projectTaskInfo.afterStart
|
||||
) {
|
||||
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
|
||||
endTime = endTime + props.datasource.afterStart * 60 * 1000;
|
||||
console.log("1111", beginTime, endTime);
|
||||
} else if (props.datasource.beforeStart && !props.datasource.afterStart) {
|
||||
//只有开始前无开始后
|
||||
beginTime = beginTime - props.projectTaskInfo.beforeStart * 60 * 1000;
|
||||
console.log("11112222");
|
||||
} else if (
|
||||
!props.projectTaskInfo.beforeStart &&
|
||||
props.projectTaskInfo.afterStart
|
||||
) {
|
||||
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
|
||||
console.log("11112222", beginTime);
|
||||
} else if (!props.datasource.beforeStart && props.datasource.afterStart) {
|
||||
//无开始前有开始后
|
||||
endTime = endTime + props.projectTaskInfo.afterStart * 60 * 1000;
|
||||
console.log("1111333");
|
||||
endTime = endTime + props.datasource.afterStart * 60 * 1000;
|
||||
console.log("1111333", endTime);
|
||||
}
|
||||
|
||||
state.beginTime = toDate(beginTime / 1000, "Y/M/D h:m");
|
||||
state.endTime = toDate(endTime / 1000, "Y/M/D h:m");
|
||||
console.log("beginTime,endTime", state.beginTime, state.endTime);
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -933,16 +842,18 @@ export default {
|
||||
showCopyModal,
|
||||
closeCopyModal,
|
||||
// closeStopModal,
|
||||
qrcodeVisible,
|
||||
signQR,
|
||||
afterVisibleChange,
|
||||
|
||||
checkPer,
|
||||
searchTaskList,
|
||||
resetTaskList,
|
||||
changePaginationStu,
|
||||
exportTaskStu,
|
||||
clearLine,
|
||||
qrcodeVisible,
|
||||
AddImpStuvisibleClose,
|
||||
batchSign,
|
||||
ChoiceCourse,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1065,7 +976,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.ProjectFaceStu {
|
||||
.RouterFaceStu {
|
||||
// // width: 80%;
|
||||
// .ant-drawer-content-wrapper {
|
||||
// // max-width: 1000px;
|
||||
@@ -1161,7 +1072,7 @@ export default {
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../../assets/images/courseManage/reset1.png);
|
||||
background-image: url(../../../assets/images/courseManage/reset0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -1202,7 +1113,7 @@ export default {
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../../assets/images/coursewareManage/export.png);
|
||||
background-image: url(../../../assets/images/coursewareManage/export1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
@@ -17,17 +17,30 @@
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="endtime">
|
||||
起止时间:{{
|
||||
projectTaskInfo && projectTaskInfo.startTime
|
||||
? projectTaskInfo.startTime
|
||||
: "-"
|
||||
}}
|
||||
~
|
||||
{{
|
||||
projectTaskInfo && projectTaskInfo.endTime
|
||||
? projectTaskInfo.endTime
|
||||
: "-"
|
||||
}}
|
||||
<div
|
||||
style="width: 100%;height:220px;display: flex;flex-wrap: nowrap;overflow-x: scroll;">
|
||||
<div v-for="item,n in [1,2,3]" :key="n" style="cursor: pointer;">
|
||||
<div
|
||||
@click="ChoiceCourse(item)"
|
||||
style="width: 360px;height:180px;margin-right: 32px;display: flex;flex-direction: column;padding: 16px;"
|
||||
:style="{background:item==currentCourse?'rgb(247, 251, 253)':'rgb(250, 250, 250)'}">
|
||||
<div style="font-size: 16px;">第{{item}}次开课</div>
|
||||
<div style="font-size: 14px;margin-top: 12px;">2023年管理者面授课程({{item}})</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/time.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
2023.3.14 12:34 ~ 2023.3.17 12:34
|
||||
</div>
|
||||
<div style="font-size: 14px;margin-top: 6px;margin-bottom: 6px;">
|
||||
<img src="../../../assets/images/courseManage/position.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
京东方大厦({{item}})号楼
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/persion.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
董瑞华
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
@@ -60,29 +73,29 @@
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="btn btn1" @click="resetTaskList">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
|
||||
<!-- <div class="btn btn1" style="margin-right: 20px" @click="godie">
|
||||
<div class="btn btn1" style="margin-right: 20px" @click="godie">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促学习</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="btn btn2" @click="allStuOver">
|
||||
|
||||
<div class="btn btn1" @click="allStuOver" style="margin-right: 16px;">
|
||||
<div class="wz">批量标注完成</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="showEntryScore">
|
||||
<div class="btn btn1" @click="showEntryScore" style="margin-right: 16px;">
|
||||
<div class="wz">批量录入成绩</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportTaskStu">
|
||||
<div class="btn btn1" @click="exportTaskStu" style="margin-right: 16px;">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportHomeWorkShow">
|
||||
<div class="btn btn1" @click="exportHomeWorkShow">
|
||||
<div class="wz">导出作业</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,7 +118,6 @@
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 1300 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
@@ -283,7 +295,7 @@ export default {
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: '15%',
|
||||
width: '10%',
|
||||
align: "left",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
@@ -317,7 +329,7 @@ export default {
|
||||
title: "所在部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: '15%',
|
||||
width: '10%',
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
@@ -433,111 +445,35 @@ export default {
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: 100,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text, {record:{examStatus,workStatus}}) => {
|
||||
return (examStatus || workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
{workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
customRender: () => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<a
|
||||
onClick={()=>{
|
||||
state.CWvisible = true;
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>}
|
||||
{examStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.datasource = text.record;
|
||||
style="margin-right:12px;">查看作业</a>
|
||||
<a
|
||||
onClick={()=>{
|
||||
state.CAvisible = true;
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>}
|
||||
</div>)
|
||||
}
|
||||
}}>查看答卷</a>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}
|
||||
],
|
||||
exportHomeWorkV: false,
|
||||
downloadUrl: null,
|
||||
currentCourse: 1
|
||||
});
|
||||
// //面授直播管理列表操作
|
||||
// const ListOpera = () => {
|
||||
// let arr = state.tabledata;
|
||||
// arr.map((value) => {
|
||||
// if (value.finishStatus == 1) {
|
||||
// value.operation = (
|
||||
// <div
|
||||
// style={{
|
||||
// display: "flex",
|
||||
// alignItems: "center",
|
||||
// justifyContent: "center",
|
||||
// }}
|
||||
// >
|
||||
// <a-button
|
||||
// type="link"
|
||||
// class="operation"
|
||||
// style="cursor:pointer;margin-right:10px;"
|
||||
// onClick={() => {
|
||||
// state.CWvisible = true;
|
||||
// }}
|
||||
// >
|
||||
// 查看作业
|
||||
// </a-button>
|
||||
// <a-button
|
||||
// type="link"
|
||||
// class="operation"
|
||||
// style="cursor:pointer;margin-right:10px;"
|
||||
// onClick={() => {
|
||||
// state.CQvisible = true;
|
||||
// }}
|
||||
// >
|
||||
// 查看答卷
|
||||
// </a-button>
|
||||
// </div>
|
||||
// );
|
||||
// } else {
|
||||
// value.operation = (
|
||||
// <div
|
||||
// style={{
|
||||
// display: "flex",
|
||||
// alignItems: "center",
|
||||
// justifyContent: "center",
|
||||
// }}
|
||||
// >
|
||||
// <a-button
|
||||
// type="link"
|
||||
// class="operation"
|
||||
// style="cursor:pointer;margin-right:10px;"
|
||||
// disabled
|
||||
// >
|
||||
// 查看作业
|
||||
// </a-button>
|
||||
// <a-button
|
||||
// type="link"
|
||||
// class="operation"
|
||||
// style="cursor:pointer;margin-right:10px;"
|
||||
// disabled
|
||||
// >
|
||||
// 查看答卷
|
||||
// </a-button>
|
||||
// </div>
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
const ChoiceCourse = (n) => {
|
||||
state.currentCourse = n;
|
||||
}
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Fvisible", false);
|
||||
state.name = "";
|
||||
@@ -621,6 +557,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.tabledata = [];
|
||||
state.tabledata = [{name:'测试数据'}];
|
||||
});
|
||||
};
|
||||
//搜索学员
|
||||
@@ -718,6 +655,7 @@ export default {
|
||||
exportHomeWorkShow,
|
||||
exportHomeWork,
|
||||
getStudent,
|
||||
ChoiceCourse
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -802,7 +740,7 @@ export default {
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../../assets/images/courseManage/reset1.png);
|
||||
background-image: url(../../../assets/images/courseManage/reset0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -847,7 +785,7 @@ export default {
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../../assets/images/coursewareManage/export.png);
|
||||
background-image: url(../../../assets/images/coursewareManage/export1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
@@ -17,15 +17,29 @@
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="titl">
|
||||
<div class="endtime">
|
||||
起止时间:{{
|
||||
datasource && datasource.startTime ? datasource.startTime : "-"
|
||||
}}
|
||||
~
|
||||
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
|
||||
</div>
|
||||
<div class="endtime" style="margin-left: 64px">
|
||||
允许签到时段:{{ beginTime }}~{{ endTime }}
|
||||
<div
|
||||
style="width: 100%;height:220px;display: flex;flex-wrap: nowrap;overflow-x: scroll;">
|
||||
<div v-for="item,n in [1,2,3]" :key="n" style="cursor: pointer;">
|
||||
<div
|
||||
@click="ChoiceCourse(item)"
|
||||
style="width: 360px;height:180px;margin-right: 32px;display: flex;flex-direction: column;padding: 16px;"
|
||||
:style="{background:item==currentCourse?'rgb(247, 251, 253)':'rgb(250, 250, 250)'}">
|
||||
<div style="font-size: 16px;">第{{item}}次开课</div>
|
||||
<div style="font-size: 14px;margin-top: 12px;">2023年管理者面授课程({{item}})</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/time.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
2023.3.14 12:34 ~ 2023.3.17 12:34
|
||||
</div>
|
||||
<div style="font-size: 14px;margin-top: 6px;margin-bottom: 6px;">
|
||||
<img src="../../../assets/images/courseManage/position.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
京东方大厦({{item}})号楼
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/persion.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
董瑞华
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,12 +53,12 @@
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="namecon" style="margin-right: 30px">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">考勤:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="projectName"
|
||||
style="width: 160px"
|
||||
style="width: 200px"
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
@@ -52,7 +66,7 @@
|
||||
showSearch
|
||||
></a-select>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="namecon">
|
||||
<div class="name">签到状态:</div>
|
||||
<div class="select">
|
||||
@@ -76,7 +90,7 @@
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="btn btn1" @click="resetTaskList">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
@@ -94,10 +108,10 @@
|
||||
<div class="img1"></div>
|
||||
<div class="wz">导入学员</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="showCopyModal">
|
||||
<div class="btn btn1" @click="showCopyModal" style="margin-right: 20px">
|
||||
<div class="wz">批量签到</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportTaskStu">
|
||||
<div class="btn btn1" @click="exportTaskStu">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
@@ -122,7 +136,6 @@
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 1300 }"
|
||||
@@ -232,6 +245,7 @@ import TwoDimensionalCode from "../../../components/TwoDimensionalCode";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../../api/method";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "FaceManage",
|
||||
components: {
|
||||
@@ -270,6 +284,7 @@ export default {
|
||||
closeStop: false, //签退弹窗关闭图标
|
||||
signQRvisible: false, //二维码弹窗
|
||||
name: null,
|
||||
projectName: undefined,
|
||||
projectName2: undefined,
|
||||
showmodal: false, //勾选提示框
|
||||
closable: false, //modal右上角的关闭按钮
|
||||
@@ -282,23 +297,23 @@ export default {
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
value: "项目一",
|
||||
label: "项目一",
|
||||
value: "签到",
|
||||
label: "签到",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "项目二",
|
||||
label: "项目二",
|
||||
value: "缺勤",
|
||||
label: "缺勤",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "项目三",
|
||||
label: "项目三",
|
||||
value: "迟到",
|
||||
label: "迟到",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
value: "项目四",
|
||||
label: "项目四",
|
||||
value: "请假",
|
||||
label: "请假",
|
||||
},
|
||||
],
|
||||
projectNameList2: [
|
||||
@@ -349,7 +364,13 @@ export default {
|
||||
codeInfo: null, //二维码内容
|
||||
beginTime: null, //签到开始时间
|
||||
endTime: null, //签到结束时间
|
||||
currentCourse: 1,
|
||||
});
|
||||
|
||||
const ChoiceCourse = (n) => {
|
||||
state.currentCourse = n;
|
||||
}
|
||||
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getStudent();
|
||||
@@ -541,6 +562,38 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考勤",
|
||||
dataIndex: "signTime",
|
||||
key: "signTime",
|
||||
width: 110,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signTime ? text.record.signTime : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
dataIndex: "signTime",
|
||||
key: "signTime",
|
||||
width: 110,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signTime ? text.record.signTime : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "签退时间",
|
||||
// dataIndex: "jin",
|
||||
@@ -549,45 +602,6 @@ export default {
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
{
|
||||
title: "考勤",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus ",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
// console.log("text", text);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.signStatus
|
||||
? "签到"
|
||||
: text.record.leaveStatus
|
||||
? "请假"
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signStatus == null && new Date().getTime() > new Date(state.endTime).getTime() ? "异常" : text.record.signStatus ? "正常" : text.record.leaveStatus ? "异常" : text.record.signStatus == null ? "-" : "异常"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考勤情况",
|
||||
ellipsis: true,
|
||||
@@ -669,83 +683,6 @@ export default {
|
||||
>
|
||||
请假
|
||||
</a-radio>
|
||||
|
||||
{/**
|
||||
<a-checkbox
|
||||
checked={text.record.signIn}
|
||||
onChange={(e) => {
|
||||
let obj = {
|
||||
courseId: Number(props.datasource.courseId),
|
||||
// projectId: 0,
|
||||
routerId: Number(props.datasource.routerId),
|
||||
ids: [text.record.studentId],
|
||||
studentName: text.record.studentName,
|
||||
taskId: Number(props.datasource.routerTaskId),
|
||||
taskType: Number(props.datasource.type),
|
||||
type: 2,
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj, (res) => {
|
||||
console.log("签到结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.signIn = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("签到失败", err, obj);
|
||||
text.record.signIn = false;
|
||||
});
|
||||
// console.log(
|
||||
// "点击签到",
|
||||
// e,
|
||||
// text.record,
|
||||
// props.datasource,
|
||||
// obj
|
||||
// );
|
||||
}}
|
||||
>
|
||||
签到
|
||||
</a-checkbox>
|
||||
<a-checkbox
|
||||
checked={text.record.leave}
|
||||
onChange={(e) => {
|
||||
console.log("点击请假", e, props.datasource);
|
||||
let obj = {
|
||||
courseId: Number(props.datasource.courseId),
|
||||
// projectId: 0,
|
||||
routerId: Number(props.datasource.routerId),
|
||||
studentId: Number(text.record.studentId),
|
||||
studentName: text.record.studentName,
|
||||
taskId: Number(props.datasource.routerTaskId),
|
||||
taskType: Number(props.datasource.type),
|
||||
type: 2,
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceLeave(obj, (res) => {
|
||||
console.log("请假结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.leave = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("请假结果", err, obj);
|
||||
text.record.leave = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
请假
|
||||
</a-checkbox>
|
||||
<a-checkbox
|
||||
checked={value.signOut}
|
||||
onChange={(e) => {
|
||||
console.log("点击签退", e);
|
||||
}}
|
||||
>
|
||||
签退
|
||||
</a-checkbox>
|
||||
*/}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -797,6 +734,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.tabledata = [];
|
||||
state.tabledata = [{name:'测试数据'}];
|
||||
});
|
||||
};
|
||||
//搜索学员
|
||||
@@ -808,6 +746,7 @@ export default {
|
||||
};
|
||||
// 重置按钮
|
||||
function resetTaskList() {
|
||||
state.projectName = undefined;
|
||||
state.currentPage = 1;
|
||||
state.name = null;
|
||||
state.projectName2 = undefined;
|
||||
@@ -832,21 +771,6 @@ export default {
|
||||
props.datasource.chapterId
|
||||
}&type=3&pid=${props.datasource.courseId}&thirdType=7&taskId=${props.datasource.routerTaskId}`
|
||||
);
|
||||
// api
|
||||
// .exportTaskStudent({
|
||||
// pageNo: state.currentPage,
|
||||
// pageSize: state.pageSize,
|
||||
// currentStageId: props.datasource.stageId,
|
||||
// currentTaskId: props.datasource.projectTaskId,
|
||||
// type: 1,
|
||||
// pid: props.datasource.projectId,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
}
|
||||
|
||||
//二维码
|
||||
@@ -929,6 +853,7 @@ export default {
|
||||
qrcodeVisible,
|
||||
AddImpStuvisibleClose,
|
||||
batchSign,
|
||||
ChoiceCourse,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1147,7 +1072,7 @@ export default {
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../../assets/images/courseManage/reset1.png);
|
||||
background-image: url(../../../assets/images/courseManage/reset0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -1188,7 +1113,7 @@ export default {
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../../assets/images/coursewareManage/export.png);
|
||||
background-image: url(../../../assets/images/coursewareManage/export1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,30 @@
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="endtime">
|
||||
起止时间:{{
|
||||
datasource && datasource.startTime ? datasource.startTime : "-"
|
||||
}}
|
||||
~
|
||||
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
|
||||
<div
|
||||
style="width: 100%;height:220px;display: flex;flex-wrap: nowrap;overflow-x: scroll;">
|
||||
<div v-for="item,n in [1,2,3]" :key="n" style="cursor: pointer;">
|
||||
<div
|
||||
@click="ChoiceCourse(item)"
|
||||
style="width: 360px;height:180px;margin-right: 32px;display: flex;flex-direction: column;padding: 16px;"
|
||||
:style="{background:item==currentCourse?'rgb(247, 251, 253)':'rgb(250, 250, 250)'}">
|
||||
<div style="font-size: 16px;">第{{item}}次开课</div>
|
||||
<div style="font-size: 14px;margin-top: 12px;">2023年管理者面授课程({{item}})</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/time.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
2023.3.14 12:34 ~ 2023.3.17 12:34
|
||||
</div>
|
||||
<div style="font-size: 14px;margin-top: 6px;margin-bottom: 6px;">
|
||||
<img src="../../../assets/images/courseManage/position.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
京东方大厦({{item}})号楼
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<img src="../../../assets/images/courseManage/persion.png" alt="" srcset="" style="width:16px;height:16px;">
|
||||
董瑞华
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
@@ -55,28 +74,28 @@
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="btn btn1" @click="resetTaskList">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
|
||||
<!--<div class="btn btn1" style="margin-right: 20px" @click="godie">
|
||||
<div class="btn btn1" style="margin-right: 20px" @click="godie">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促学习</div>
|
||||
</div> -->
|
||||
<div class="btn btn2" @click="allStuOver">
|
||||
</div>
|
||||
<div class="btn btn1" @click="allStuOver" style="margin-right: 16px;">
|
||||
<div class="wz">批量标注完成</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="btn btn1" style="margin-right: 16px;">
|
||||
<div class="wz" @click="showEntryScore">批量录入成绩</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportTaskStu">
|
||||
<div class="btn btn1" @click="exportTaskStu" style="margin-right: 16px;">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportHomeWorkShow">
|
||||
<div class="btn btn1" @click="exportHomeWorkShow">
|
||||
<div class="wz">导出作业</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,7 +117,6 @@
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 1300 }"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
@@ -242,18 +260,7 @@ export default {
|
||||
currentPage: 1,
|
||||
tableDataTotal: -1,
|
||||
tableDataTotal2: 0,
|
||||
tabledata: [
|
||||
// {
|
||||
// workNum: "123",
|
||||
// userName: "li",
|
||||
// deptName: "开发",
|
||||
// jobName: "前端开发",
|
||||
// score: 89,
|
||||
// exam: 98,
|
||||
// testscore: 80,
|
||||
// status: "已完成",
|
||||
// },
|
||||
],
|
||||
tabledata: [],
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
@@ -433,12 +440,33 @@ export default {
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: () => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<a
|
||||
onClick={()=>{
|
||||
state.CWvisible = true;
|
||||
}}
|
||||
style="margin-right:12px;">查看作业</a>
|
||||
<a
|
||||
onClick={()=>{
|
||||
state.CAvisible = true;
|
||||
}}>查看答卷</a>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
exportHomeWorkV: false,
|
||||
downloadUrl: null,
|
||||
CAvisible: false
|
||||
CAvisible: false,
|
||||
currentCourse: 1
|
||||
});
|
||||
|
||||
const ChoiceCourse = (n) => {
|
||||
state.currentCourse = n;
|
||||
}
|
||||
|
||||
//面授直播管理列表操作
|
||||
const ListOpera = () => {
|
||||
let arr = state.tabledata;
|
||||
@@ -540,7 +568,6 @@ export default {
|
||||
newData.push(res.data.data.records[i]);
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tabledata = [{name:'小星星',workStatus:1}];
|
||||
ListOpera();
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.tableDataTotal2 = res.data.data.total;
|
||||
@@ -549,6 +576,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.tabledata = [];
|
||||
state.tabledata = [{name:'测试数据',workStatus:1}];
|
||||
});
|
||||
};
|
||||
//搜索学员
|
||||
@@ -652,6 +680,7 @@ export default {
|
||||
checkPer,
|
||||
clearLine,
|
||||
searchTaskList,
|
||||
ChoiceCourse,
|
||||
resetTaskList,
|
||||
changePaginationStu,
|
||||
exportTaskStu,
|
||||
@@ -742,7 +771,7 @@ export default {
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../../assets/images/courseManage/reset1.png);
|
||||
background-image: url(../../../assets/images/courseManage/reset0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -787,7 +816,7 @@ export default {
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../../assets/images/coursewareManage/export.png);
|
||||
background-image: url(../../../assets/images/coursewareManage/export1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import onLineImg from '@/assets/images/leveladd/zai.png'
|
||||
// import faceCourseImg from '@/assets/images/leveladd/mian.png'
|
||||
import faceCourseImg from '@/assets/images/leveladd/mian.png'
|
||||
import caseImg from '@/assets/images/leveladd/an.png'
|
||||
import workImg from '@/assets/images/leveladd/zuo.png'
|
||||
import exaImg from '@/assets/images/leveladd/kao.png'
|
||||
@@ -24,7 +24,7 @@ import AddVote from "@/components/vote/AddVote.vue";
|
||||
import AddLive from "@/components/drawers/AddLive.vue";
|
||||
import AddRef from "@/components/drawers/AddRef.vue";
|
||||
import AddProject from "@/components/drawers/AddProject.vue";
|
||||
// import AddFaceteach from "@/components/drawers/AddFaceteach.vue";
|
||||
import AddFaceClass from "@/components/drawers/AddFaceClass.vue";
|
||||
|
||||
export const TASK_TYPE = {
|
||||
1: {
|
||||
@@ -32,11 +32,11 @@ export const TASK_TYPE = {
|
||||
img: onLineImg,
|
||||
component: AddOnline
|
||||
},
|
||||
// 2: {
|
||||
// name: '面授',
|
||||
// img: faceCourseImg,
|
||||
// component: AddFaceteach
|
||||
// },
|
||||
2: {
|
||||
name: '面授',
|
||||
img: faceCourseImg,
|
||||
component: AddFaceClass
|
||||
},
|
||||
3: {
|
||||
name: '案例',
|
||||
img: caseImg,
|
||||
|
||||
@@ -279,10 +279,15 @@
|
||||
margin-right: 20px;">
|
||||
<div class="opa">
|
||||
<div class="opacation">
|
||||
<span
|
||||
v-if="element.type==2"
|
||||
style="color: #4ea6ff; cursor: pointer"
|
||||
@click="openCourse(element,index)">
|
||||
开课
|
||||
</span>
|
||||
<span
|
||||
style="color: #4ea6ff;
|
||||
margin-right: 25px;
|
||||
cursor: pointer;"
|
||||
style="color: #4ea6ff;cursor: pointer;"
|
||||
:style="{marginRight:element.type==2?6+'px':25+'px',marginLeft:element.type==2?6+'px':0+'px'}"
|
||||
@click="editTaskForType(element,index)">
|
||||
编辑
|
||||
</span>
|
||||
@@ -360,6 +365,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 面授课开课弹框 -->
|
||||
<AddOpenCourse v-model:visible="opencourseVisible"/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -368,6 +375,7 @@ import {GetRouterDraftDetail, releaseRouter} from "@/api/indexTask";
|
||||
import {message} from "ant-design-vue";
|
||||
import {useRoute} from "vue-router";
|
||||
import UnlockMode from "@/components/drawers/UnlockMode.vue";
|
||||
import AddOpenCourse from "@/components/drawers/AddOpenCourse.vue";
|
||||
import {TASK_TYPE} from "@/utils/const";
|
||||
import Draggable from "vuedraggable";
|
||||
import {ROUTER_DETAIL_MODIFY} from "@/api/apis";
|
||||
@@ -577,6 +585,12 @@ const cancelStorage = async () => {
|
||||
cancleLoading.value = false;
|
||||
};
|
||||
|
||||
// 开课按钮
|
||||
const opencourseVisible = ref(false);
|
||||
const openCourse = async () => {
|
||||
opencourseVisible.value = true;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ConfirmModal {
|
||||
|
||||
@@ -251,11 +251,16 @@
|
||||
">
|
||||
<div class="opa">
|
||||
<div class="opacation">
|
||||
<span style="
|
||||
color: #4ea6ff;
|
||||
margin-right: 25px;
|
||||
cursor: pointer;
|
||||
" @click="editTaskForType(element,index)">
|
||||
<span
|
||||
v-if="element.type==2"
|
||||
style="color: #4ea6ff; cursor: pointer;"
|
||||
@click="openCourse(element,index)">
|
||||
开课
|
||||
</span>
|
||||
<span
|
||||
style="color: #4ea6ff;cursor: pointer;"
|
||||
:style="{marginRight:element.type==2?6+'px':25+'px',marginLeft:element.type==2?6+'px':0+'px'}"
|
||||
@click="editTaskForType(element,index)">
|
||||
编辑
|
||||
</span>
|
||||
<span style="color: #4ea6ff; cursor: pointer" @click="confirmDelTask(index)">
|
||||
@@ -387,6 +392,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 面授课开课弹框 -->
|
||||
<AddOpenCourse v-model:visible="opencourseVisible"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -395,6 +402,7 @@ import {computed, onMounted, ref, watch,} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import * as api from "../../api/indexTaskadd";
|
||||
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||
import AddOpenCourse from "@/components/drawers/AddOpenCourse.vue";
|
||||
import Draggable from "vuedraggable";
|
||||
import {useRoute} from "vue-router";
|
||||
import {TASK_TYPE} from "@/utils/const";
|
||||
@@ -625,6 +633,13 @@ const cancelStorage = async () => {
|
||||
message.success("取消成功");
|
||||
cancleLoading.value = false
|
||||
};
|
||||
|
||||
// 开课按钮
|
||||
const opencourseVisible = ref(false);
|
||||
const openCourse = async () => {
|
||||
opencourseVisible.value = true;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user