feat:修改bug

This commit is contained in:
lixg
2023-01-04 16:06:58 +08:00
parent ff72f982fc
commit 3dbf35d2c1
2 changed files with 160 additions and 134 deletions

View File

@@ -35,8 +35,15 @@
/> />
</div> </div>
<div class="main"> <div class="main">
<div v-if="datasource.type !==6 || datasource.type !==9 " class="endtime">起止时间</div> <div
<div v-else class="endtime">起止时间{{datasource.startTime}} {{datasource.endTime}}</div> v-if="datasource.type !== 6 || datasource.type !== 9"
class="endtime"
>
起止时间
</div>
<div v-else class="endtime">
起止时间{{ datasource.startTime }} {{ datasource.endTime }}
</div>
<div class="search"> <div class="search">
<div class="sealeft"> <div class="sealeft">
<div class="namecon" style="margin-right: 30px"> <div class="namecon" style="margin-right: 30px">
@@ -125,7 +132,7 @@
import { toRefs, reactive, onMounted, onUnmounted } from "vue"; import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
// import * as api from "../../../api/index"; // import * as api from "../../../api/index";
import * as api from '../../../api/indexTaskManage'; import * as api from "../../../api/indexTaskManage";
export default { export default {
name: "ProjectOnlineManage", name: "ProjectOnlineManage",
@@ -228,13 +235,13 @@ export default {
width: 60, width: 60,
align: "center", align: "center",
className: "h", className: "h",
customRender: (text) => { customRender: () => {
return ( return (
<div class="racona"> <div class="racona">
<span> {props.levelName}</span> <span> {props.levelName}</span>
</div> </div>
); );
} },
}, },
{ {
title: "完成时间", title: "完成时间",
@@ -252,12 +259,12 @@ export default {
align: "center", align: "center",
className: "h", className: "h",
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.status==0?"未完成":"已完成"}</span> <span> {text.record.status == 0 ? "未完成" : "已完成"}</span>
</div> </div>
); );
} },
}, },
]; ];
return columns; return columns;
@@ -272,7 +279,7 @@ export default {
}; };
const afterVisibleChange = (bol) => { const afterVisibleChange = (bol) => {
if (bol == true) { if (bol == true) {
console.log('当前是什么类型',props.datasource.type) console.log("当前是什么类型", props.datasource.type);
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
getData(); getData();
} }
@@ -291,40 +298,43 @@ export default {
// 获取数据 // 获取数据
function getData() { function getData() {
if(props.datasource.type==11){ if (props.datasource.type == 11) {
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
console.log('我是传递的查询参数',{ console.log("我是传递的查询参数", {
pageNo:state.currentPage, pageNo: state.currentPage,
pageSize:state.pageSize, pageSize: state.pageSize,
currentStageId:props.datasource.stageId, currentStageId: props.datasource.stageId,
type: 1, type: 1,
pid: props.datasource.projectId, pid: props.datasource.projectId,
status: state.projectName, status: state.projectName,
studentName: state.name studentName: state.name,
}) });
api.AssessmentManagementMessage({ api
pageNo:state.currentPage, .AssessmentManagementMessage({
pageSize:state.pageSize, pageNo: state.currentPage,
currentStageId:props.datasource.stageId, pageSize: state.pageSize,
type: 1, currentStageId: props.datasource.stageId,
pid: props.datasource.projectId, type: 1,
status: state.projectName, pid: props.datasource.projectId,
studentName: state.name status: state.projectName,
}).then(res=>{ studentName: state.name,
console.log(res) })
if(res.status==200){ .then((res) => {
state.tabledata = res.data.data.records; console.log(res);
state.tableDataTotal =res.data.data.total; if (res.status == 200) {
state.tabledata = res.data.data.records;
state.tableDataTotal = res.data.data.total;
state.tableDataTotalLoading = false;
}
})
.catch((err) => {
console.log(err);
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
} state.tabledata = [];
}).catch(err=>{ });
console.log(err) } else {
state.tableDataTotalLoading = false;
state.tabledata = [];
})
}else{
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
state.tabledata = []; state.tabledata = [];
} }
} }
@@ -345,24 +355,27 @@ export default {
//分页 //分页
const changePaginationStu = (page) => { const changePaginationStu = (page) => {
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
state.currentPage = page; state.currentPage = page;
getData(); getData();
}; };
// 导出数据 // 导出数据
function exportTaskStu() { function exportTaskStu() {
api.ExportTaskStudent({ api
pageNo:state.currentPage, .ExportTaskStudent({
pageSize:state.pageSize, pageNo: state.currentPage,
currentStageId:props.datasource.stageId, pageSize: state.pageSize,
type: 1, currentStageId: props.datasource.stageId,
pid: props.datasource.projectId type: 1,
}).then(res=>{ pid: props.datasource.projectId,
console.log(res) })
}).catch(err=>{ .then((res) => {
console.log(err) console.log(res);
}) })
.catch((err) => {
console.log(err);
});
} }
return { return {
@@ -378,7 +391,7 @@ export default {
searchTaskList, searchTaskList,
resetTaskList, resetTaskList,
changePaginationStu, changePaginationStu,
exportTaskStu exportTaskStu,
}; };
}, },
}; };

View File

@@ -35,8 +35,15 @@
/> />
</div> </div>
<div class="main"> <div class="main">
<div v-if="datasource.type !==6 || datasource.type !==9 " class="endtime">起止时间</div> <div
<div v-else class="endtime">起止时间{{datasource.startTime}} {{datasource.endTime}}</div> v-if="datasource.type !== 6 || datasource.type !== 9"
class="endtime"
>
起止时间
</div>
<div v-else class="endtime">
起止时间{{ datasource.startTime }} {{ datasource.endTime }}
</div>
<div class="search"> <div class="search">
<div class="sealeft"> <div class="sealeft">
<div class="namecon" style="margin-right: 30px"> <div class="namecon" style="margin-right: 30px">
@@ -125,7 +132,7 @@
import { toRefs, reactive, onMounted, onUnmounted } from "vue"; import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
// import * as api from "../../../api/index"; // import * as api from "../../../api/index";
import * as api from '../../../api/indexTaskManage'; import * as api from "../../../api/indexTaskManage";
export default { export default {
name: "RouterCommonManage", name: "RouterCommonManage",
@@ -228,13 +235,13 @@ export default {
width: 60, width: 60,
align: "center", align: "center",
className: "h", className: "h",
customRender: (text) => { customRender: () => {
return ( return (
<div class="racona"> <div class="racona">
<span> {props.levelName}</span> <span> {props.levelName}</span>
</div> </div>
); );
} },
}, },
{ {
title: "完成时间", title: "完成时间",
@@ -252,12 +259,12 @@ export default {
align: "center", align: "center",
className: "h", className: "h",
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.status==0?"未完成":"已完成"}</span> <span> {text.record.status == 0 ? "未完成" : "已完成"}</span>
</div> </div>
); );
} },
}, },
]; ];
return columns; return columns;
@@ -272,7 +279,7 @@ export default {
}; };
const afterVisibleChange = (bol) => { const afterVisibleChange = (bol) => {
if (bol == true) { if (bol == true) {
console.log('当前是什么类型',props.datasource.type) console.log("当前是什么类型", props.datasource.type);
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
getData(); getData();
} }
@@ -291,40 +298,43 @@ export default {
// 获取数据 // 获取数据
function getData() { function getData() {
if(props.datasource.type==11){ if (props.datasource.type == 11) {
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
console.log('我是传递的查询参数',{ console.log("我是传递的查询参数", {
pageNo:state.currentPage, pageNo: state.currentPage,
pageSize:state.pageSize, pageSize: state.pageSize,
currentStageId:props.datasource.chapterId, currentStageId: props.datasource.chapterId,
type: 2, type: 2,
pid: props.datasource.routerId, pid: props.datasource.routerId,
status: state.projectName, status: state.projectName,
studentName: state.name studentName: state.name,
}) });
api.AssessmentManagementMessage({ api
pageNo:state.currentPage, .AssessmentManagementMessage({
pageSize:state.pageSize, pageNo: state.currentPage,
currentStageId:props.datasource.chapterId, pageSize: state.pageSize,
type: 2, currentStageId: props.datasource.chapterId,
pid: props.datasource.routerId, type: 2,
status: state.projectName, pid: props.datasource.routerId,
studentName: state.name status: state.projectName,
}).then(res=>{ studentName: state.name,
console.log(res) })
if(res.status==200){ .then((res) => {
state.tabledata = res.data.data.records; console.log(res);
state.tableDataTotal =res.data.data.total; if (res.status == 200) {
state.tabledata = res.data.data.records;
state.tableDataTotal = res.data.data.total;
state.tableDataTotalLoading = false;
}
})
.catch((err) => {
console.log(err);
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
} state.tabledata = [];
}).catch(err=>{ });
console.log(err) } else {
state.tableDataTotalLoading = false;
state.tabledata = [];
})
}else{
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
state.tabledata = []; state.tabledata = [];
} }
} }
@@ -345,24 +355,27 @@ export default {
//分页 //分页
const changePaginationStu = (page) => { const changePaginationStu = (page) => {
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
state.currentPage = page; state.currentPage = page;
getData(); getData();
}; };
// 导出数据 // 导出数据
function exportTaskStu() { function exportTaskStu() {
api.ExportTaskStudent({ api
pageNo:state.currentPage, .ExportTaskStudent({
pageSize:state.pageSize, pageNo: state.currentPage,
currentStageId:props.datasource.chapterId, pageSize: state.pageSize,
type: 2, currentStageId: props.datasource.chapterId,
pid: props.datasource.routerId type: 2,
}).then(res=>{ pid: props.datasource.routerId,
console.log(res) })
}).catch(err=>{ .then((res) => {
console.log(err) console.log(res);
}) })
.catch((err) => {
console.log(err);
});
} }
return { return {
@@ -378,7 +391,7 @@ export default {
searchTaskList, searchTaskList,
resetTaskList, resetTaskList,
changePaginationStu, changePaginationStu,
exportTaskStu exportTaskStu,
}; };
}, },
}; };