mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
feat:合并
This commit is contained in:
6
src/api/indexTaskManage.js
Normal file
6
src/api/indexTaskManage.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import http from "./config";
|
||||
|
||||
|
||||
|
||||
// 获取考试管理的信息
|
||||
export const ExamManagementMessage = (obj) => http.post('/admin/exam/manage/queryExamManagementMessage',obj)
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -45,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>
|
||||
@@ -65,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">
|
||||
@@ -87,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="{
|
||||
@@ -106,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>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
@@ -124,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: "RouterExaminationManage",
|
||||
@@ -154,18 +157,17 @@
|
||||
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: "未通过",
|
||||
},
|
||||
{
|
||||
@@ -179,64 +181,53 @@
|
||||
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: "level",
|
||||
key: "level",
|
||||
dataIndex: "currentStageId",
|
||||
key: "currentStageId",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "考试次数",
|
||||
dataIndex: "examNum",
|
||||
key: "examNum",
|
||||
dataIndex: "testNumber",
|
||||
key: "testNumber",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -252,8 +243,8 @@
|
||||
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "comptime",
|
||||
key: "comptime",
|
||||
dataIndex: "finishedTime",
|
||||
key: "finishedTime",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -265,8 +256,17 @@
|
||||
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 = () => {
|
||||
@@ -279,6 +279,7 @@
|
||||
};
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
};
|
||||
@@ -286,6 +287,7 @@
|
||||
state.projectName = value;
|
||||
};
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log('表格前方选中项目', selectedRowKeys)
|
||||
if (selectedRowKeys.length > 2) {
|
||||
return;
|
||||
}
|
||||
@@ -308,20 +310,62 @@
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
state.tabledata = [
|
||||
{
|
||||
workNum: "123",
|
||||
userName: "li",
|
||||
deptName: "开发",
|
||||
jobName: "前端开发",
|
||||
score: 89,
|
||||
examNum: 1,
|
||||
comptime: "2022-07-22 14:00:30",
|
||||
status: "已完成",
|
||||
},
|
||||
]
|
||||
console.log('我是传递的参数',{
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"targetId": props.datasource.routerId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
})
|
||||
api.ExamManagementMessage({
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"targetId": props.datasource.routerId,
|
||||
"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,
|
||||
@@ -331,6 +375,9 @@
|
||||
godie,
|
||||
clearLine,
|
||||
showEScoreModal,
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -625,7 +625,7 @@
|
||||
: item.type == '4'
|
||||
? showWork(item.name, item.projectTaskId)
|
||||
: item.type == '5'
|
||||
? showTest(item.name, item.projectTaskId)
|
||||
? showTest(item.name, item.projectTaskId, item)
|
||||
: item.type == '10'
|
||||
? showEval(item.name, item.projectTaskId)
|
||||
: item.type == '12'
|
||||
@@ -1114,6 +1114,7 @@
|
||||
v-model:TMvisible="TMvisible"
|
||||
:title="showTestText"
|
||||
:projectTaskId="projectTaskId"
|
||||
:datasource="examData"
|
||||
/>
|
||||
<!-- 测评抽屉 -->
|
||||
<ProjectEvalManage
|
||||
@@ -2444,6 +2445,8 @@ export default {
|
||||
|
||||
codevisible: false, //二维码是否显示
|
||||
codeInfo: null, //二维码标题
|
||||
|
||||
examData: "",
|
||||
});
|
||||
|
||||
const levelList = reactive({
|
||||
@@ -2724,13 +2727,14 @@ export default {
|
||||
state.showkaoqinText = title;
|
||||
};
|
||||
//作业管理的抽屉
|
||||
const showWork = (name, id) => {
|
||||
const showWork = (name, id, ) => {
|
||||
state.Wvisible = true;
|
||||
state.showWorkText = name;
|
||||
state.projectTaskId = id;
|
||||
};
|
||||
//考试管理的抽屉
|
||||
const showTest = (name, id) => {
|
||||
const showTest = (name, id, data) => {
|
||||
state.examData = data;
|
||||
state.TMvisible = true;
|
||||
state.showTestText = name;
|
||||
state.projectTaskId = id;
|
||||
|
||||
Reference in New Issue
Block a user