mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 15:26:48 +08:00
feat:增加项目/学习路径图考试管理页面部分数据查询
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
v-if="TMvisible"
|
||||
:visible="TMvisible"
|
||||
class="drawerStyle ProjectExamManage"
|
||||
placement="right"
|
||||
@@ -16,7 +17,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="endtime">起止时间:2022-07-21 14:00 ~ 2022-7-30 14:00</div>
|
||||
<div class="endtime">起止时间:{{datasource.startTime}} ~ {{datasource.endTime}}</div>
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">姓名:</div>
|
||||
@@ -44,12 +45,12 @@
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="searchTaskList"
|
||||
@click="searchTableData"
|
||||
>
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="btn btn2" @click="reseatTableData">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
@@ -64,9 +65,9 @@
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="showEScoreModal">
|
||||
<!-- <div class="btn btn2" @click="showEScoreModal">
|
||||
<div class="wz">导入成绩</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <div class="line">
|
||||
<div class="inline">
|
||||
@@ -86,7 +87,7 @@
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:loading="loadingData"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
@@ -105,13 +106,14 @@
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
v-if="tableDataTotal > 10"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
@@ -123,6 +125,8 @@
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import EScore from "../ExportScore.vue";
|
||||
import * as api from '../../../api/indexTaskManage';
|
||||
|
||||
// import * as api from "../../../api/index";
|
||||
export default {
|
||||
name: "ProjectExamManage",
|
||||
@@ -142,23 +146,28 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
datasource: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
name: "",
|
||||
|
||||
open: false,
|
||||
projectName: null,
|
||||
projectName: "",
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
value: "-1",
|
||||
value: "0",
|
||||
label: "未开始",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "0",
|
||||
value: "10",
|
||||
label: "未通过",
|
||||
},
|
||||
{
|
||||
@@ -172,56 +181,45 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 1,
|
||||
tabledata: [
|
||||
{
|
||||
workNum: "123",
|
||||
userName: "li",
|
||||
deptName: "开发",
|
||||
jobName: "前端开发",
|
||||
score: 89,
|
||||
examNum: 1,
|
||||
comptime: "2022-07-22 14:00:30",
|
||||
status: "已完成",
|
||||
},
|
||||
],
|
||||
tableDataTotal: 0,
|
||||
tabledata: [],
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "workNum",
|
||||
key: "workNum",
|
||||
dataIndex: "studentCode",
|
||||
key: "studentCode",
|
||||
width: 50,
|
||||
align: "left",
|
||||
className: "h head",
|
||||
className: "h head"
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "userName",
|
||||
key: "userName",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
width: 50,
|
||||
align: "left",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "所在部门",
|
||||
dataIndex: "deptName",
|
||||
key: "userName",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "jobName",
|
||||
key: "jobName",
|
||||
dataIndex: "studentJobName",
|
||||
key: "studentJobName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "考试次数",
|
||||
dataIndex: "examNum",
|
||||
key: "examNum",
|
||||
dataIndex: "testNumber",
|
||||
key: "testNumber",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -237,8 +235,8 @@ export default {
|
||||
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "comptime",
|
||||
key: "comptime",
|
||||
dataIndex: "finishedTime",
|
||||
key: "finishedTime",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -250,8 +248,17 @@ export default {
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
console.log(text.record.status);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.status==0?"未开始":text.record.status==10?"未通过":"已通过"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -260,16 +267,19 @@ export default {
|
||||
state.projectName = "";
|
||||
state.selectedRowKeys = [];
|
||||
state.currentPage = 1;
|
||||
state.tabledata = [];
|
||||
};
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
// getManageList();
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
};
|
||||
const selectProjectName = (value) => {
|
||||
state.projectName = value;
|
||||
};
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log('表格前方选中项目', selectedRowKeys)
|
||||
if (selectedRowKeys.length > 2) {
|
||||
return;
|
||||
}
|
||||
@@ -290,6 +300,64 @@ export default {
|
||||
state.selectedRowKeys = [];
|
||||
};
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
console.log('我是传递的参数',{
|
||||
"chapterId": props.datasource.stageId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"targetId": props.datasource.projectId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
})
|
||||
api.ExamManagementMessage({
|
||||
"chapterId": props.datasource.stageId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"targetId": props.datasource.projectId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
if(res.data.code == 200){
|
||||
let newData = [];
|
||||
for(let i=0;i<res.data.data.managementDtoList.length;i++){
|
||||
res.data.data.managementDtoList[i].key = i + 1;
|
||||
newData.push(res.data.data.managementDtoList[i])
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
console.log('我是处理过后的数据', newData)
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.loadingData = false;
|
||||
})
|
||||
}
|
||||
// 搜索
|
||||
function searchTableData() {
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
// 重置
|
||||
function reseatTableData() {
|
||||
state.loadingData = true;
|
||||
state.currentPage = 1;
|
||||
state.name = '';
|
||||
state.projectName = '';
|
||||
getData();
|
||||
}
|
||||
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
state.loadingData = true;
|
||||
state.currentPage = page;
|
||||
getData();
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -299,6 +367,9 @@ export default {
|
||||
godie,
|
||||
clearLine,
|
||||
showEScoreModal,
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -597,3 +668,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user