fix: 开发北京星纵考试系统页面

This commit is contained in:
Vce 2024-04-07 19:45:56 +08:00
parent 5ca5d7c8d6
commit bd610da879
4 changed files with 605 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -36,7 +36,7 @@
<el-pagination class="pagerBox" @size-change="SizeChange" @current-change="CurrentChange" :current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pagInfo.pageSize" layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background>
</el-pagination>
</div>
<!-- 新增-编辑-弹窗 -->
<!-- 新增--弹窗 -->
<el-dialog :modal-append-to-body="false" @close="close" :title="title" :visible.sync="dialogShow" width="667px">
<div class="dialog_content">
<el-form size="medium" ref="addEditForm" :model="addEditForm" :rules="addEditRules" label-width="120px" class="dialogFormBox">

View File

@ -0,0 +1,601 @@
<template>
<!-- 评价中心 -->
<div class="assessmentCentent whiteBlock">
<div v-if="!isStudyDetail">
<el-tabs v-model="activeName" @tab-click="handleClick" style="padding: 0 15px;">
<el-tab-pane :label="'全部'" name="allModule"></el-tab-pane>
<el-tab-pane :label="'教育培训'" name="eduTrain"></el-tab-pane>
<el-tab-pane :label="'入场教育'" name="admissionEdu"></el-tab-pane>
<el-tab-pane :label="'企业安全演练'" name="enterSafeDrill"></el-tab-pane>
</el-tabs>
<div>
<div class="headPart">
<el-form :inline="true" class="demo-form-inline">
<el-form-item>
<el-button type="primary" size="medium" @click="addCourse">新增课程</el-button>
</el-form-item>
<el-form-item>
<el-input placeholder="请搜索课程" size="medium" suffix-icon="el-icon-search"></el-input>
</el-form-item>
</el-form>
</div>
<div class="listPart">
<div class="listItem" v-for="(item,i) in tableList" :key="i">
<div class="cardTop">
<div class="topLeft">
<div class="courseName">{{item.courseName}}</div>
<div class="courseTime">{{item.courseTime}}</div>
<div class="courseInfo">
<div class="infoItem">类型<span>{{ item.courseType }}</span></div>
<div class="infoItem">待质检数<span>{{item.courseCount}}</span></div>
<div class="infoItem">学习周期<span>{{item.coursePeroid}}</span></div>
<div class="infoItem">选修人员数<span>{{item.courseElective}}</span></div>
<div class="infoItem">必修人员数<span>{{item.courseCompulsory}}</span></div>
</div>
</div>
<div class="topRight">
<img src="@/assets/images/default-course.png" alt="">
</div>
</div>
<div class="cardBottom">
<div class="bottomBtn1">删除</div>
<div class="bottomBtn2" @click="gotoStudyDetail(item)">学习情况</div>
</div>
</div>
</div>
</div>
<el-pagination class="pagerBox" @size-change="sizeChange" @current-change="currentChange" :current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS"
:page-size="pagInfo.pageSize" layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background></el-pagination>
<el-dialog :modal-append-to-body="false" :title="'查看答题卡'" :visible.sync="dialogVisible" width="1000px">
<div class="dialogContainer">
<div class="dialogLeft">
<el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="科目类别" prop="subjectType">
<el-select v-model="ruleForm.subjectType" placeholder="请选择">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="科目名称" prop="subjectName">
<el-input v-model="ruleForm.subjectName"></el-input>
</el-form-item>
<el-form-item label="学习资料" prop="learningMaterial">
<div>单个文件不超过100M,最多可上传</div>
<el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
<!-- <div class="el-upload__tip" slot="tip">单个文件不超过100M,最多可上传</div> -->
<div class="el-upload__text"><i style="font-size: 18px" class="el-icon-upload"></i>将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-form-item>
<el-form-item label="课程封面" prop="delivery">
<el-upload action="#" list-type="picture-card" :auto-upload="false">
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" >
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)" >
<i class="el-icon-zoom-in"></i>
</span>
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)" >
<i class="el-icon-download"></i>
</span>
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)" >
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible2">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
<el-form-item label="课程类型" prop="resource">
<el-radio-group v-model="ruleForm.resource">
<el-radio label="视频"></el-radio>
<el-radio label="音频"></el-radio>
<el-radio label="文档"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="学习周期" prop="studyPeroid">
<el-date-picker v-model="ruleForm.studyPeroid" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="desc">
<el-input type="textarea" v-model="ruleForm.desc"></el-input>
</el-form-item>
<!-- @click="submitForm('ruleForm')" -->
</el-form>
</div>
<div class="dialogRight"></div>
</div>
<div class="dialogFooter">
<el-button @click="centerDialogVisible = false"><i class="el-icon-circle-close"></i> </el-button>
<el-button type="primary" @click="centerDialogVisible = false"><i class="el-icon-circle-check"></i> </el-button>
</div>
</el-dialog>
</div>
<!-- <div v-show="isStudyDetail"> -->
<div class="studyContainer" v-else>
<div class="studyTop">
<div class="studyTopLeft">
<div class="courseImg">
<img src="@/assets/images/aa5cd03a486a3faaeb9cf4b8d06405e.png" alt="">
</div>
<div class="courseInfo">
<div class="infoHeadLine">信息系统中级项目管理网课</div>
<div class="infoContent">科目类型<span>安全教育</span></div>
<div class="infoContent">课程类型<span>视频</span></div>
<div class="infoContent">学习周期<span>2024-03-05至2024-03-23</span></div>
<div class="infoContent">学习频率<span>5/</span></div>
</div>
</div>
<div class="studyTopRight">
<div>
<el-button type="primary" plain @click="isStudyDetail = !isStudyDetail"> </el-button>
</div>
</div>
</div>
<div class="studyBottom">
<el-tabs v-model="activeName2" @tab-click="handleClick2" style="padding: 0 15px;">
<el-tab-pane :label="'学习情况'" name="studySitu"></el-tab-pane>
<el-tab-pane :label="'图表统计'" name="studyCharts"></el-tab-pane>
<el-tab-pane :label="'员工评论'" name="stuffComment"></el-tab-pane>
</el-tabs>
<div class="tableInfo">
<div class="searchBox whiteBlock">
<el-form :inline="true" size="medium" class="demo-form-inline">
<el-form-item label="姓名" v-show="activeName2 === 'studySitu'">
<el-input placeholder="请输入"></el-input>
</el-form-item>
<el-form-item v-show="activeName2 === 'studySitu'">
<el-button class="expintBtn" size="medium" type="primary">导出明细</el-button>
<el-button class="expintBtn" size="medium" plain type="primary">查询</el-button>
<el-button class="expintBtn" size="medium" plain type="primary">刷新</el-button>
</el-form-item>
<div v-show="activeName2 === 'stuffComment'">
<el-form-item>
<el-button class="expintBtn" size="medium" type="primary">批量删除</el-button>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入内容" suffix-icon="el-icon-search"></el-input>
</el-form-item>
<el-form-item>
<el-button class="expintBtn" size="medium" plain type="primary">查询</el-button>
</el-form-item>
</div>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<el-table class="tables" :data="tableList4" height="400px" max-height="400px" v-show="activeName2 === 'studySitu'">
<el-table-column width="200" align="center" prop="workerName" label="姓名"></el-table-column>
<el-table-column align="center" prop="idCard" label="身份证号"></el-table-column>
<el-table-column align="center" prop="studyStart" label="开始学习时间"></el-table-column>
<el-table-column align="center" prop="studyEnd" label="结束学习时间"></el-table-column>
<el-table-column width="200" align="center" prop="studyCount" label="学习次数"></el-table-column>
</el-table>
<el-table class="tables" :data="tableList4" height="400px" max-height="400px" v-show="activeName2 === 'stuffComment'">
<el-table-column type="selection" align="center" width="140"></el-table-column>
<el-table-column align="center" prop="commentPerson" label="评论人"></el-table-column>
<el-table-column align="center" prop="commentTime" label="评论时间"></el-table-column>
<el-table-column width="200" align="center" label="操作">
<template slot-scope="scope">
<!-- <div class="tableBtns"> -->
<div @click="remove(scope.row)" style="display:flex;justify-content:center;align-items:center">
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
<span style="white-space: nowrap;margin-left:5px">删除</span>
</div>
<!-- </div> -->
</template>
</el-table-column>
</el-table>
</div>
</div>
<el-pagination class="pagerBox" @size-change="sizeChange" @current-change="currentChange" :current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS"
:page-size="pagInfo.pageSize" layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background></el-pagination>
</div>
</div>
</div>
</template>
<script>
import {
getAssessmentListApi,
deleteWorkerAssessmentInfoApi,
} from '@/assets/js/api/laborPerson'
export default {
computed: {},
data() {
return {
isStudyDetail: true,
dialogImageUrl: '',
disabled: false,
dialogVisible2: false,
ruleForm: {},
projectSn: '',
activeName: 'allModule', //tab
activeName2: 'studySitu', //tab
pagInfo: {
//
pageNo: 1,
pageSize: 10,
total: 0,
},
tableList: [{
courseName: '木工基础-建筑施工技术工序之木工(上)测试测试测试测试测试测试测试测试测试测试',
courseTime: '2021-10-12 00:00:00',
courseType: '视频',
courseCount: '120',
coursePeroid: '1次/天',
courseElective: '0人',
courseCompulsory: '0人',
}],
tableList2: [{
workerName: '123',
idCard: '123',
studyStart: '123',
studyEnd: '123',
studyCount: '123',
}],
tableList3: [{
commentPerson: '123',
commentTime: '123',
}],
dialogVisible: false, //
//
}
},
created() {
this.projectSn = this.$store.state.projectSn
// this.getRecordList()
for(let i = 0;i<11;i++){
let temp = this.tableList[0]
this.tableList.push(temp)
}
this.isStudyDetail = false
},
methods: {
gotoStudyDetail(val){
this.isStudyDetail = !this.isStudyDetail
this.activeName2 = 'studySitu'
this.tableList4 = this.tableList2
},
handleRemove(file) {
console.log(file);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible2 = true;
},
handleDownload(file) {
console.log(file);
},
arrayLength(val) {
console.log('==================================')
// console.log(val.correctAnswers.length)
let arr = val.correctAnswers
let len = arr.reduce((acc) => acc + 1, 0)
return len
},
getRecordList() {
let data = {}
data.pageNo = this.pagInfo.pageNo
data.pageSize = this.pagInfo.pageSize
data.projectSn = this.projectSn
data.userEnterpriseId = this.$store.state.userInfo.userEnterpriseId
if (this.activeName == 'allModule') {
// getAssessmentListApi(data).then((res) => {
// if (res.code == 200) {
// this.tableList = res.result.records
// this.pagInfo.total = res.result.total
// }
// })
this.tableList[0].courseName = 'allModule'
}
if (this.activeName == 'eduTrain') {
this.tableList[0].courseName = 'eduTrain'
}
if (this.activeName == 'admissionEdu') {
this.tableList[0].courseName = 'admissionEdu'
}
if (this.activeName == 'enterSafeDrill') {
this.tableList[0].courseName = 'enterSafeDrill'
}
},
//Tab
handleClick(val) {
this.activeName = val.name
this.pagInfo = {
pageNo: 1,
pageSize: 10,
total: 0,
}
// this.getRecordList()
},
//Tab
handleClick2(val) {
this.activeName2 = val.name
if(val.name === 'studySitu'){
this.tableList4 = this.tableList2
}
if(val.name === 'studyCharts'){
}
if(val.name === 'stuffComment'){
this.tableList4 = this.tableList3
}
this.pagInfo = {
pageNo: 1,
pageSize: 10,
total: 0,
}
// this.getRecordList()
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
},
//
addCourse() {
this.dialogVisible = true;
},
sizeChange(val) {
this.pagInfo.pageSize = val
// this.getContractList()
},
currentChange(val) {
this.pagInfo.pageNo = val
// this.getContractList()
},
},
}
</script>
<style lang="less" scoped>
//studyDetail
.studyContainer{
width: 100%;
height: 762px;
.studyTop{
display: flex;
justify-content: space-between;
height: 25%;
.studyTopLeft{
// background-color: darkred;
width: 60%;
padding: 20px 20px;
display: flex;
justify-content: flex-start;
.courseImg{
width: 40%;
height: 100%;
background-color: #fff;
border-radius: 10px;;
img{
width: 100%;
height: 100%;
}
}
.courseInfo{
margin-left: 20px;
.infoHeadLine{
font-size: 25px;
font-weight: bold;
margin-bottom: 17px;
}
.infoContent{
color: #b4b6bf;
font-size: 12px;
margin-bottom: 17px;
}
}
}
.studyTopRight{
// background-color: darkblue;
width: 20%;
padding: 0 20px;
padding-top: 20px;
display: flex;
justify-content: flex-end;
}
}
.studyBottom{
.tableInfo{
.searchBox{
height: auto;
margin-bottom: 0;
}
.tables{
min-height: 0;
}
}
}
}
//dialog
.dialogContainer{
display: flex;
justify-content: space-between;
width:100%;
height:575px;
/deep/ .el-dialog__body{
padding: 0 20px;
}
.dialogLeft{
width:35%;
height:100%;
background-color: darkred;
/deep/ .el-upload-dragger {
width: 230px;
height: auto;
}
/deep/ .el-input {
width: 230px;
}
/deep/ .el-textarea {
width: 230px;
}
/deep/ .el-date-editor--daterange.el-input__inner {
width: 230px;
}
/deep/ .el-upload-dragger .el-icon-upload{
margin: 0 0 0;
}
/deep/ .el-upload__tip{
margin: 0 0 0;
}
/deep/ .el-upload--picture-card{
width: 100px;
height: 100px;
line-height: 102px;
}
}
.dialogRight{
width:65%;
height:100%;
background-color: darkblue;
}
}
.dialogFooter{
display: flex;
justify-content: center;
}
//tab
.listPart {
width: 100%;
height: 667px;
height: 90%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
// padding: 0 30px;
.listItem {
margin: 0 30px;
margin-bottom: 20px;
padding: 9px 9px;
width: 20%;
height: 160px;
background-color: #fff;
// border: 1px solid;
border-radius: 10px;
box-shadow: 0px 0px 7px rgba(196, 206, 255, 0.5);
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
.cardTop{
width:100%;
height: 80%;
// background-color: darkred;
display: flex;
justify-content: space-between;
.topLeft{
width: 70%;
height: 100%;
.courseName{
color: rgba(62,72,144, 1);
font-size: 20px;
font-weight: bold;
line-height: 23px; /* 行高 */
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3; /* 显示三行文本 */
-webkit-box-orient: vertical;
}
.courseTime{
font-size: 12px;
color: gray;
margin: 5px 0;
}
.courseInfo{
font-size: 12px;
width: 100%;
display: flex;
flex-wrap: wrap;
.infoItem{
margin-bottom: 5px;
width: 50%;
span{
color: #557ff6;
}
}
}
}
.topRight{
width: 30%;
height: 100%;
img{
width: 100%;
height: 85%;
}
}
}
.cardBottom{
width:100%;
height: 20%;
// background-color: darkblue;
display: flex;
align-items: center;
justify-content: flex-end;
text-align: center;
font-size: 12px;
.bottomBtn1{
line-height: 18px;
color: gray;
background-color: #e4e6fd;
// border: 1px solid;
margin-left: 20px;
width: 65px;
border-radius: 10px;
}
.bottomBtn2{
cursor: pointer;
line-height: 18px;
color: #fff;
background-color: #557ff6;
// border: 1px solid;
width: 65px;
margin-left: 20px;
border-radius: 10px;
}
}
}
}
.headPart {
display: flex;
padding: 0 30px;
}
.pagerBox{
position: absolute;
left: 40%;
bottom: 5%;
margin-top: 0;
}
.assessmentCentent {
width: 100%;
height: 100%;
box-sizing: border-box;
}
.rewards_wrap {
width: 100%;
}
.badness_wrap {
width: 100%;
}
.accessory {
cursor: pointer;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<!-- 风险清册 -->
<div class="fullHeight">
<div v-if="type != 'detail'">
<div v-if="type != 'detail'" style="height: 100%;">
<div class="searchBox whiteBlock">
<el-form :inline="true" size="medium" :model="queryInfo" class="demo-form-inline">
<el-form-item>
@ -542,7 +542,8 @@ export default {
margin-right: 10px;
}
.table_wrap {
height: 800px;
// height: 800px;
height: calc(100% - 98px);
overflow: auto;
}
.delete-btn {