mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-18 23:36:44 +08:00
一期问题修改
This commit is contained in:
@@ -433,32 +433,51 @@
|
||||
}
|
||||
}
|
||||
.el-message.new-message {
|
||||
background-color: #edf2fc !important;
|
||||
box-shadow: none !important;
|
||||
border-color: #EBEEF5 !important;
|
||||
min-width: 170px !important;
|
||||
border-radius: 10px !important;
|
||||
background-color: #edf2fc !important;
|
||||
min-width: 240px !important;
|
||||
height: 52px !important;
|
||||
border-radius: 12px !important;
|
||||
top: 236px !important;
|
||||
font-size: 20px !important;
|
||||
font-weight: bold !important;
|
||||
border: none !important;
|
||||
}
|
||||
.el-message--success.new-message {
|
||||
background-color: #f0f9eb !important;
|
||||
|
||||
box-shadow: none !important;
|
||||
border-color: #e1f3d8 !important;
|
||||
min-width: 170px !important;
|
||||
border-radius: 10px !important
|
||||
}
|
||||
background-color: rgba($color: #4CB967, $alpha: 0.1) !important;
|
||||
min-width: 240px !important;
|
||||
height: 52px !important;
|
||||
border-radius: 12px !important;
|
||||
top: 236px !important;
|
||||
font-size: 20px !important;
|
||||
font-weight: bold !important;
|
||||
color: #189B39 !important;
|
||||
border: none !important;
|
||||
}
|
||||
.el-message--error.new-message {
|
||||
background-color: #fef0f0 !important;
|
||||
box-shadow: none !important;
|
||||
border-color: #fde2e2 !important;
|
||||
min-width: 170px !important;
|
||||
border-radius: 10px !important
|
||||
}
|
||||
background-color: rgba($color: #FF3636 , $alpha: 0.1) !important;
|
||||
min-width: 240px !important;
|
||||
height: 52px !important;
|
||||
border-radius: 12px !important;
|
||||
top: 236px !important;
|
||||
font-size: 20px !important;
|
||||
font-weight: bold !important;
|
||||
color: #CF1717 !important;
|
||||
border: none !important;
|
||||
}
|
||||
.el-message--warning.new-message {
|
||||
background-color: #fdf6ec !important;
|
||||
box-shadow: none !important;
|
||||
border-color: #faecd8 !important;
|
||||
min-width: 170px !important;
|
||||
border-radius: 10px !important
|
||||
background-color: #fdf6ec !important;
|
||||
min-width: 240px !important;
|
||||
height: 52px !important;
|
||||
border-radius: 12px !important;
|
||||
top: 236px !important;
|
||||
font-size: 20px !important;
|
||||
font-weight: bold !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,9 +28,14 @@ export default {
|
||||
this.$emit("handleNameChange", this.aids);
|
||||
},
|
||||
handleClose() {
|
||||
this.$set(this, 'nameList', [])
|
||||
console.log("handleClose", this.aids);
|
||||
this.$emit("handleClose");
|
||||
},
|
||||
handleReset() {
|
||||
this.aids = [];
|
||||
this.nameList = [];
|
||||
},
|
||||
async initNameList(keyword) {
|
||||
console.log("initNameList", keyword);
|
||||
if (!keyword) {
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
<!-- <div style="color: red;">下面的表格标题及内容需要调整完善</div> -->
|
||||
<div>
|
||||
<el-tabs style="width: 100%;" v-model="tabName" @tab-click="handleTabClick">
|
||||
<el-tab-pane label="报名记录" name="second">
|
||||
<el-tab-pane lazy label="报名记录" name="second">
|
||||
<el-row style="margin: 20px 0;" :gutter="20">
|
||||
<el-col :span="4">
|
||||
<div class="grid-content bg-purple">
|
||||
<!-- <el-input v-model="signup.name" clearable placeholder="姓名" maxlength="50" /> -->
|
||||
<NameFilterSelect @handleNameChange="aids => signup.aid = aids" @handleClose="signup.aid = []" />
|
||||
<NameFilterSelect @handleNameChange="aids => signup.aid = aids" ref="signupNameFilter" @handleClose="signup.aid = []" />
|
||||
<!-- <el-select :key="2" style="width:100%" clearable multiple v-model="signup.aid" filterable
|
||||
placeholder="姓名" v-limit-input="50" remote reserve-keyword :remote-method="initNameList"
|
||||
:multiple-limit="5" :loading="nameListLoading">
|
||||
@@ -81,13 +81,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="学习记录" name="third">
|
||||
<el-row style="margin-bottom: 20px;" :gutter="20">
|
||||
<el-tab-pane lazy label="学习记录" name="third">
|
||||
<el-row style="margin: 20px 0;" :gutter="20">
|
||||
<el-col :span="4">
|
||||
<div class="grid-content bg-purple">
|
||||
<!-- <el-input clearable v-model="learningRecords.name" maxlength="50"
|
||||
placeholder="姓名"></el-input> -->
|
||||
<NameFilterSelect @handleNameChange="aids => learningRecords.aid = aids"
|
||||
<NameFilterSelect @handleNameChange="aids => learningRecords.aid = aids" ref="learningRecordsNameFilter"
|
||||
@handleClose="learningRecords.aid = []" />
|
||||
<!-- <el-select :key="1" style="width:100%" clearable multiple v-model="learningRecords.aid" filterable
|
||||
placeholder="姓名" v-limit-input="50" reserve-keyword remote :remote-method="initNameList"
|
||||
@@ -114,8 +114,9 @@
|
||||
<el-col :span="6">
|
||||
<div
|
||||
:class="['grid-content', 'bg-purple', 'resetDatePicker', !studyDateTime||studyDateTime.length==0?'noSplitDatePicker':'']">
|
||||
<el-date-picker value-format="yyyy-MM-dd" v-model="studyDateTime" type="daterange" align="right"
|
||||
unlink-panels range-separator="至" start-placeholder="学习时长" :picker-options="pickerOptions">
|
||||
<el-date-picker style="width: 100%;" value-format="yyyy-MM-dd" v-model="studyDateTime" type="daterange"
|
||||
align="right" unlink-panels range-separator="至" start-placeholder="学习时长"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
|
||||
</div>
|
||||
@@ -178,16 +179,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="资源学习情况" name="first">
|
||||
<el-row style="margin-bottom: 20px;" :gutter="20">
|
||||
<el-tab-pane lazy label="资源学习情况" name="first">
|
||||
<el-row style="margin: 20px 0;" :gutter="20">
|
||||
<el-col :span="4">
|
||||
<div class="grid-content bg-purple"><el-input clearable v-model="recourseListQuery.contentName"
|
||||
placeholder="资源名称"></el-input></div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-button type="primary" @click="getResourseList">搜索</el-button>
|
||||
<el-button @click="resetResourseList">重置</el-button>
|
||||
<el-button type="primary" @click="getResourseList">查 询</el-button>
|
||||
<el-button @click="resetResourseList">重 置</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="9">
|
||||
@@ -275,7 +276,7 @@
|
||||
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg-purple">
|
||||
<NameFilterSelect @handleNameChange="aids => commonResourceStudyPeopleQuery.aid = aids"
|
||||
<NameFilterSelect ref="commonResourceStudyPeopleNameFilter" @handleNameChange="aids => commonResourceStudyPeopleQuery.aid = aids"
|
||||
@handleClose="commonResourceStudyPeopleQuery.aid = []" />
|
||||
|
||||
<!-- <el-select :key="3" style="width:100%" clearable multiple v-model="commonResourceStudyPeopleQuery.aid"
|
||||
@@ -353,7 +354,7 @@
|
||||
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg-purple">
|
||||
<NameFilterSelect @handleNameChange="aids => examResourceStudyPeopleQuery.aid = aids"
|
||||
<NameFilterSelect ref="examResourceStudyPeopleNameFilter" @handleNameChange="aids => examResourceStudyPeopleQuery.aid = aids"
|
||||
@handleClose="examResourceStudyPeopleQuery.aid = []" />
|
||||
<!--
|
||||
<el-select :key="4" style="width:100%" clearable multiple v-model="examResourceStudyPeopleQuery.aid"
|
||||
@@ -371,9 +372,8 @@
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-select style="width: 100%;" v-model="examResourceStudyPeopleQuery.status" placeholder="考试状态" clearable>
|
||||
<el-option label="未开始" :value="1"></el-option>
|
||||
<el-option label="已完成" :value="2"></el-option>
|
||||
<el-option label="进行中" :value="3"></el-option>
|
||||
<el-option label="已通过" :value="2"></el-option>
|
||||
<el-option label="未通过" :value="4"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -412,7 +412,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="考试状态">
|
||||
<template slot-scope="scope">
|
||||
{{ recourseStudyStatusEnum[scope.row.status] }}
|
||||
{{ scope.row.status == '9' ? '已通过' : '未通过' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="score" label="成绩"></el-table-column>
|
||||
@@ -632,8 +632,8 @@ export default {
|
||||
loadSysTypes: "sysType/loadSysTypes",
|
||||
}),
|
||||
|
||||
|
||||
resetCommonResourceQuery() {
|
||||
this.$refs.commonResourceStudyPeopleNameFilter.handleReset();
|
||||
this.commonResourceStudyPeopleQuery = {
|
||||
pageIndex: 1, //第几页
|
||||
pageSize: 10, // 每页多少条
|
||||
@@ -646,6 +646,7 @@ export default {
|
||||
},
|
||||
|
||||
resetExamCommonResourceQuery() {
|
||||
this.$refs.examResourceStudyPeopleNameFilter.handleReset();
|
||||
this.examResourceStudyPeopleQuery = {
|
||||
pageIndex: 1, //第几页
|
||||
pageSize: 10, // 每页多少条
|
||||
@@ -695,14 +696,14 @@ export default {
|
||||
status: this.examResourceStudyPeopleQuery.status,
|
||||
aid: this.examResourceStudyPeopleQuery.aid.join(","),
|
||||
})
|
||||
.then((res) => {
|
||||
.then(async(res) => {
|
||||
if (res.status === 200) {
|
||||
let ids = [];
|
||||
res.result.list.forEach((item) => {
|
||||
item.code = "";
|
||||
ids.push(item.aid);
|
||||
});
|
||||
this.getQaUserData(res.result.list, ids);
|
||||
await this.getQaUserData(res.result.list, ids);
|
||||
this.examResourceStudyPeopleList = res.result.list;
|
||||
this.examResourceStudyPeopleQuery.count = res.result.count;
|
||||
} else {
|
||||
@@ -722,14 +723,14 @@ export default {
|
||||
status: this.commonResourceStudyPeopleQuery.status,
|
||||
aid: this.commonResourceStudyPeopleQuery.aid.join(","),
|
||||
})
|
||||
.then((res) => {
|
||||
.then(async(res) => {
|
||||
if (res.status === 200) {
|
||||
let ids = [];
|
||||
res.result.list.forEach((item) => {
|
||||
item.code = "";
|
||||
ids.push(item.aid);
|
||||
});
|
||||
this.getQaUserData(res.result.list, ids);
|
||||
await this.getQaUserData(res.result.list, ids);
|
||||
this.commonResourceStudyPeopleList = res.result.list;
|
||||
this.commonResourceStudyPeopleQuery.count = res.result.count;
|
||||
} else {
|
||||
@@ -751,14 +752,14 @@ export default {
|
||||
status: this.commonResourceStudyPeopleQuery.status,
|
||||
aid: this.commonResourceStudyPeopleQuery.aid.join(","),
|
||||
})
|
||||
.then((res) => {
|
||||
.then(async(res) => {
|
||||
if (res.status === 200) {
|
||||
let ids = [];
|
||||
res.result.list.forEach((item) => {
|
||||
item.code = "";
|
||||
ids.push(item.aid);
|
||||
});
|
||||
this.getQaUserData(res.result.list, ids);
|
||||
await this.getQaUserData(res.result.list, ids);
|
||||
this.commonResourceStudyPeopleList = res.result.list;
|
||||
this.commonResourceStudyPeopleQuery.count = res.result.count;
|
||||
} else {
|
||||
@@ -793,7 +794,7 @@ export default {
|
||||
contentId: data.contentId,
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExport(res, "HomeWorkRecord.zip", "application/zip");
|
||||
this.handleExport(res, `${this.courseDetail.name}的${data.contentName}.zip`, "application/zip");
|
||||
});
|
||||
} else if (data.contentType == "61") {
|
||||
// 考试导出
|
||||
@@ -803,7 +804,7 @@ export default {
|
||||
contentId: data.contentId,
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExport(res, "ExamRecord.xlsx");
|
||||
this.handleExport(res, `${this.courseDetail.name}的${data.contentName}.xlsx`);
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -813,7 +814,7 @@ export default {
|
||||
courseId: this.courseDetail.id,
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExport(res, " ResourceRecord.xlsx");
|
||||
this.handleExport(res, this.courseDetail.name + "的资源学习情况.xlsx");
|
||||
});
|
||||
},
|
||||
handleExportStudyDetail() {
|
||||
@@ -826,7 +827,7 @@ export default {
|
||||
queryFinishTime: this.learningRecords.queryFinishTime,
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExport(res, " StudyRecord.xlsx");
|
||||
this.handleExport(res, this.courseDetail.name + "的学习记录.xlsx");
|
||||
});
|
||||
},
|
||||
handleExportSignup() {
|
||||
@@ -837,7 +838,7 @@ export default {
|
||||
signType: this.signup.signType,
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExport(res, " SignUpRecord.xlsx");
|
||||
this.handleExport(res, this.courseDetail.name + "的报名记录.xlsx");
|
||||
});
|
||||
},
|
||||
resetResourseList() {
|
||||
@@ -845,6 +846,7 @@ export default {
|
||||
this.getResourseList();
|
||||
},
|
||||
resetStudyRecords() {
|
||||
this.$refs.learningRecordsNameFilter.handleReset()
|
||||
this.learningRecords.aid = [];
|
||||
this.learningRecords.name = "";
|
||||
this.learningRecords.status = "";
|
||||
@@ -855,6 +857,7 @@ export default {
|
||||
},
|
||||
|
||||
resetSignupList() {
|
||||
this.$refs.signupNameFilter.handleReset()
|
||||
this.signup = {
|
||||
name: "",
|
||||
signType: "",
|
||||
@@ -1012,14 +1015,14 @@ export default {
|
||||
this.studyDateTime.length > 1 ? this.studyDateTime[1] : "",
|
||||
aid: this.learningRecords.aid.join(","),
|
||||
};
|
||||
apicourseStudy.studyRecords(params).then((res) => {
|
||||
apicourseStudy.studyRecords(params).then(async(res) => {
|
||||
if (res.status === 200) {
|
||||
let ids = [];
|
||||
res.result.list.forEach((item) => {
|
||||
item.code = "";
|
||||
ids.push(item.aid);
|
||||
});
|
||||
this.getQaUserData(res.result.list, ids);
|
||||
await this.getQaUserData(res.result.list, ids);
|
||||
this.learningRecords.list = res.result.list;
|
||||
this.learningRecords.count = res.result.count;
|
||||
} else {
|
||||
@@ -1070,14 +1073,15 @@ export default {
|
||||
aid: this.signup.aid.join(","),
|
||||
};
|
||||
|
||||
apicourseStudy.findSignup(params).then((res) => {
|
||||
apicourseStudy.findSignup(params).then(async (res) => {
|
||||
if (res.status === 200) {
|
||||
let ids = [];
|
||||
res.result.list.forEach((item) => {
|
||||
item.code = "";
|
||||
ids.push(item.aid);
|
||||
});
|
||||
this.getQaUserData(res.result.list, ids);
|
||||
await this.getQaUserData(res.result.list, ids);
|
||||
console.log(22222);
|
||||
this.study.list = res.result.list;
|
||||
this.study.count = res.result.count;
|
||||
} else {
|
||||
@@ -1086,21 +1090,25 @@ export default {
|
||||
});
|
||||
},
|
||||
getQaUserData(list, ids) {
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(noReapetIds).then((res) => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item) => {
|
||||
res.result.some((author) => {
|
||||
if (author.aid == item.aid) {
|
||||
item.code = author.code;
|
||||
item.orgInfo = author.orgInfo;
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(noReapetIds).then((res) => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item) => {
|
||||
res.result.some((author) => {
|
||||
if (author.aid == item.aid) {
|
||||
item.code = author.code;
|
||||
item.orgInfo = author.orgInfo;
|
||||
}
|
||||
});
|
||||
console.log(11111);
|
||||
// this.study.list = list;
|
||||
resolve();
|
||||
});
|
||||
this.study.list = list;
|
||||
});
|
||||
} else {
|
||||
this.$message({ message: res.message, type: "error" });
|
||||
}
|
||||
} else {
|
||||
this.$showMessage(res.message, "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
@@ -1113,7 +1121,7 @@ export default {
|
||||
this.getSignupList();
|
||||
},
|
||||
handleTabClick(tab) {
|
||||
this.tabName = tab.name;
|
||||
|
||||
if (tab.name === "second") {
|
||||
this.getSignupList();
|
||||
} else if (tab.name === "third") {
|
||||
@@ -1123,6 +1131,8 @@ export default {
|
||||
this.recourseListQuery.courseId = this.courseDetail.id;
|
||||
this.getResourseList();
|
||||
}
|
||||
|
||||
this.tabName = tab.name;
|
||||
},
|
||||
showStudyDetails(row) {
|
||||
this.studyDetailQuery.courseId = row.courseId;
|
||||
@@ -1162,6 +1172,23 @@ export default {
|
||||
.el-date-editor {
|
||||
width: 255px;
|
||||
}
|
||||
.el-input__icon {
|
||||
line-height: 28px;
|
||||
|
||||
&.el-icon-date {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
line-height: 28px;
|
||||
}
|
||||
.el-input__inner {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
&.el-icon-close {
|
||||
margin-right: 8px;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.course-info {
|
||||
display: flex;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="grid-content bg-purple" style="text-align: right;">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addNewCourse">新建课程</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addNewCourse">开发新课程</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
Reference in New Issue
Block a user