diff --git a/src/utils/index.js b/src/utils/index.js index 89ced25..0e160f6 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -755,7 +755,7 @@ export function tablePrint(id, title) { body{margin:5mm;font-size:8px;}} body{-webkit-print-color-adjust: exact;} .tit{text-align:center;font-size:20px;color:#333;line-height:24px;font-weight:700;padding:10px 0;margin:0;} - .table-box,.el-table,.el-table__body-wrapper,.el-table--border{max-height:99999999px!important;height:auto;width:auto!important} + .table-box,.el-table,.el-table__body-wrapper,.el-table--border{max-height:99999999px!important;height:auto;width:auto!important;max-width:1400px;margin: 0 auto;} .el-table{width:100%} .el-table,.el-table__body-wrapper{max-height:auto} .el-table .el-table__cell{padding:12px 0} @@ -782,6 +782,7 @@ export function tablePrint(id, title) { .hui-s.s3{width: 120px;} .info { display: flex;flex-wrap: wrap;border-left: 1px solid #ccc;border-top: 1px solid #ccc;margin-bottom: 12px;} .info-item {width: 25%;height: 50px;box-sizing: border-box;flex-shrink: 0;background: #f8f8f8;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;line-height: 50px;text-align: center;} + .el-table__header,.el-table__body{width:100%!important;} `; let aDom = divs.cloneNode(true); let aTbody = aDom diff --git a/src/views/standard/setUp/student.vue b/src/views/standard/setUp/student.vue index 8292ff1..e781227 100644 --- a/src/views/standard/setUp/student.vue +++ b/src/views/standard/setUp/student.vue @@ -399,6 +399,10 @@ export default { }, methods: { openAddDia() { + if(!formStu.className){ + this.$message.warning('暂无班级信息,请导入班级!') + return + } this.formStu.studentName = ""; this.formStu.studentCode = ""; this.formStu.shortNumber = "";