mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
feat:增加考勤查询学员
This commit is contained in:
@@ -513,14 +513,14 @@ export default {
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
// {
|
||||
// title: "所在岗位",
|
||||
// dataIndex: "gang",
|
||||
// key: "gang",
|
||||
// width: 50,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "gang",
|
||||
key: "gang",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "签到时间",
|
||||
dataIndex: "cur",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">【面授】学员</div>
|
||||
<div class="headerTitle">【面授】{{ datasource?.name }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -18,10 +18,13 @@
|
||||
<div class="main">
|
||||
<div class="titl">
|
||||
<div class="endtime">
|
||||
起止时间:2022-07-21 14:00 ~ 2022-7-30 14:00
|
||||
起止时间:{{
|
||||
datasource && datasource.startTime ? datasource.startTime : "-"
|
||||
}}
|
||||
~
|
||||
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
|
||||
</div>
|
||||
<div class="endtime" style="margin-left: 64px">签到时间:14:00</div>
|
||||
<div class="endtime" style="margin-left: 40px">签退时间:21:00</div>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
@@ -189,6 +192,7 @@
|
||||
import { toRefs, reactive } from "vue";
|
||||
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
||||
import SignQR from "./SignQR.vue";
|
||||
import * as api from "../../api/index1";
|
||||
export default {
|
||||
name: "FaceManage",
|
||||
components: {
|
||||
@@ -200,6 +204,12 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
datasource: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
@@ -216,7 +226,8 @@ export default {
|
||||
closable: false, //modal右上角的关闭按钮
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 100,
|
||||
tableDataTotal: -1,
|
||||
tableDataTotal2: 0,
|
||||
selectedRowKeys: [],
|
||||
projectNameList: [
|
||||
{
|
||||
@@ -243,129 +254,29 @@ export default {
|
||||
projectNameList2: [
|
||||
{
|
||||
id: 1,
|
||||
value: "项目一",
|
||||
label: "项目一",
|
||||
value: "1",
|
||||
label: "正常",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "项目二",
|
||||
label: "项目二",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "项目三",
|
||||
label: "项目三",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
value: "项目四",
|
||||
label: "项目四",
|
||||
value: "2",
|
||||
label: "异常",
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
key: 1,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "-",
|
||||
jin: "-",
|
||||
time: "缺勤",
|
||||
state: "异常",
|
||||
signIn: false, //签到
|
||||
signOut: false, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "-",
|
||||
time: "签到/签退",
|
||||
state: "正常",
|
||||
signIn: true, //签到
|
||||
signOut: true, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "2022-10-31 23:12",
|
||||
time: "迟到",
|
||||
state: "异常",
|
||||
signIn: false, //签到
|
||||
signOut: true, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "2022-10-31 23:12",
|
||||
time: "早退",
|
||||
state: "异常",
|
||||
signIn: true, //签到
|
||||
signOut: false, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "2022-10-31 23:12",
|
||||
time: "签到/签退",
|
||||
state: "正常",
|
||||
signIn: true, //签到
|
||||
signOut: true, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "2022-10-31 23:12",
|
||||
time: "签到/签退",
|
||||
state: "正常",
|
||||
signIn: true, //签到
|
||||
signOut: true, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "2022-10-31 23:12",
|
||||
time: "签到/签退",
|
||||
state: "正常",
|
||||
signIn: true, //签到
|
||||
signOut: true, //签退
|
||||
leave: false, //请假
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
cur: "2022-10-31 23:12",
|
||||
jin: "2022-10-31 23:12",
|
||||
time: "请假",
|
||||
state: "正常",
|
||||
signIn: false, //签到
|
||||
signOut: false, //签退
|
||||
leave: true, //请假
|
||||
},
|
||||
// {
|
||||
// key: 1,
|
||||
// name: "张三",
|
||||
// com: "产研部",
|
||||
// gang: "产品经理",
|
||||
// cur: "-",
|
||||
// jin: "-",
|
||||
// time: "缺勤",
|
||||
// state: "异常",
|
||||
// signIn: false, //签到
|
||||
// signOut: false, //签退
|
||||
// leave: false, //请假
|
||||
// },
|
||||
],
|
||||
tableOptions: [
|
||||
{
|
||||
@@ -383,30 +294,42 @@ export default {
|
||||
],
|
||||
// selectOption: [],
|
||||
});
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getStudent();
|
||||
}
|
||||
};
|
||||
//考勤
|
||||
const selectProjectName = (value, index) => {
|
||||
console.log("value", value, index);
|
||||
};
|
||||
//签到状态
|
||||
const selectProjectName2 = (value, index) => {
|
||||
console.log("value", value, index);
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:FSvisible", false);
|
||||
};
|
||||
//导入学员
|
||||
const showImpStu = () => {
|
||||
state.AddImpStuvisible = true;
|
||||
};
|
||||
//批量签到
|
||||
const showCopyModal = () => {
|
||||
state.copyModal = true;
|
||||
};
|
||||
const closeCopyModal = () => {
|
||||
state.copyModal = false;
|
||||
};
|
||||
const closeStopModal = () => {
|
||||
state.stopModal = false;
|
||||
};
|
||||
|
||||
// const closeStopModal = () => {
|
||||
// state.stopModal = false;
|
||||
// };
|
||||
//显示签到二维码弹窗
|
||||
const signQR = () => {
|
||||
state.signQRvisible = true;
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
@@ -454,27 +377,37 @@ export default {
|
||||
const columns = [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "com",
|
||||
dataIndex: "studentUserNo",
|
||||
// width: "30%",
|
||||
key: "com",
|
||||
key: "studentUserNo",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.studentUserNo ? text.record.studentUserNo : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
dataIndex: "studentName",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
key: "studentName",
|
||||
width: 50,
|
||||
align: "left",
|
||||
className: "classify",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.name}</span>
|
||||
<span>
|
||||
{text.record.studentName ? text.record.studentName : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -556,6 +489,49 @@ export default {
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
|
||||
//获取学员
|
||||
const getStudent = () => {
|
||||
console.log("我是传递的查询参数", {
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
type: 2,
|
||||
pid: props.datasource.routerId,
|
||||
taskId: props.datasource.routerTaskId,
|
||||
taskType: props.datasource.type,
|
||||
studentName: state.name,
|
||||
});
|
||||
api
|
||||
.AssessmentManagementMessage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
type: 2,
|
||||
pid: props.datasource.routerId,
|
||||
taskId: props.datasource.routerTaskId,
|
||||
taskType: props.datasource.type,
|
||||
studentName: state.name,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("获取面授学员", res);
|
||||
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;
|
||||
newData.push(res.data.data.records[i]);
|
||||
}
|
||||
state.tableData = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.tableDataTotal2 = res.data.data.total;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.tableData = [];
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -567,8 +543,9 @@ export default {
|
||||
showImpStu,
|
||||
showCopyModal,
|
||||
closeCopyModal,
|
||||
closeStopModal,
|
||||
// closeStopModal,
|
||||
signQR,
|
||||
afterVisibleChange,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
:style="{
|
||||
display: item.type === 2 ? 'flex' : 'none',
|
||||
}"
|
||||
@click="showFS"
|
||||
@click="showFS(item)"
|
||||
>
|
||||
学员
|
||||
</div>
|
||||
@@ -908,7 +908,7 @@
|
||||
v-model:studentId="studentId"
|
||||
/>
|
||||
<!-- 面授学员抽屉 -->
|
||||
<face-stu v-model:FSvisible="FSvisible" />
|
||||
<face-stu v-model:FSvisible="FSvisible" :datasource="studentData" />
|
||||
<!-- 活动考勤抽屉 -->
|
||||
<active-attendance
|
||||
v-model:AAvisible="AAvisible"
|
||||
@@ -1395,6 +1395,8 @@ export default {
|
||||
commonLevelName: "",
|
||||
examLevelName: "",
|
||||
evaluationLevelName: "",
|
||||
|
||||
studentData: "",
|
||||
});
|
||||
|
||||
const levelList = reactive({
|
||||
@@ -1602,8 +1604,10 @@ export default {
|
||||
state.copyModal = false;
|
||||
};
|
||||
//面授学员的弹窗
|
||||
const showFS = () => {
|
||||
const showFS = (item) => {
|
||||
state.FSvisible = true;
|
||||
state.studentData = item;
|
||||
console.log("studentData", state.studentData);
|
||||
};
|
||||
//考勤的抽屉
|
||||
const showAA = (course) => {
|
||||
|
||||
Reference in New Issue
Block a user