style:增加下载中心

This commit is contained in:
lixg
2023-01-06 11:56:19 +08:00
parent 047e553d7b
commit 9879020c6b
10 changed files with 665 additions and 190 deletions

View File

@@ -361,44 +361,7 @@ export default {
const clearLine = () => {
state.selectedRowKeys = [];
};
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 = [
{
@@ -518,21 +481,88 @@ export default {
align: "center",
// scopedSlots: { customRender: "action" }, //引入的插槽
// customRender: () => {
// return (
// <div class="opa">
// <a-checkbox-group
// // value={state.selectOption}
// name="checkboxgroup"
// options={state.tableOptions}
// onChange={(e) => {
// console.log("eee", e);
// // state.selectOption = e;
// }}
// />
// </div>
// );
// },
customRender: (text) => {
return (
<div class="opa">
<a-checkbox
checked={text.record.signIn}
onChange={(e) => {
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
.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={value.signOut}
onChange={(e) => {
console.log("点击签退", e);
}}
>
签退
</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>
</div>
);
},
},
];
return columns;
@@ -543,23 +573,23 @@ export default {
console.log("我是传递的查询参数", props.datasource, {
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.stageId,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.projectId,
pid: props.datasource.routerId,
// status: Number(state.name),
studentName: state.name,
currentTaskId: props.datasource.projectTaskId,
currentTaskId: props.datasource.routerTaskId,
});
api
.AssessmentManagementMessage({
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.stageId,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.projectId,
pid: props.datasource.routerId,
// status: Number(state.name),
studentName: state.name,
currentTaskId: props.datasource.projectTaskId,
currentTaskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
})
.then((res) => {
@@ -610,9 +640,9 @@ export default {
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportTaskStudent?currentStageId=${
props.datasource.stageId
}&type=${2}&pid=${props.datasource.projectId}&taskId=${
props.datasource.projectTaskId
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskId=${
props.datasource.routerTaskId
}&taskType=${props.datasource.type}`
);
// api
@@ -638,7 +668,6 @@ export default {
closeDrawer,
onSelectChange,
tableDataFunc,
getTableData,
showImpStu,
showCopyModal,
closeCopyModal,
@@ -1048,6 +1077,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
background-color: #fff;
.btn1 {
width: 100px;
height: 40px;