Administrator
2021-07-29 796407bf0a1f9d3b54db27b7c13699582e33a233
考试成绩新增导入实操成绩,考试样式调整
5 files modified
360 ■■■■■ changed files
src/styles/element-ui.scss 183 ●●●●● patch | view | raw | blame | history
src/views/exam/examination.vue 2 ●●● patch | view | raw | blame | history
src/views/exam/performance.vue 171 ●●●● patch | view | raw | blame | history
src/views/exam/startexam.vue 2 ●●● patch | view | raw | blame | history
src/views/exam/subject.vue 2 ●●● patch | view | raw | blame | history
src/styles/element-ui.scss
@@ -1,204 +1,233 @@
.el-dropdown-menu__item {
  font-size: 12px !important;
  line-height: 28px !important;
    font-size: 12px !important;
    line-height: 28px !important;
}
//.el-card.is-always-shadow {
//  box-shadow: none;
//  border: none !important;
//}
.el-scrollbar__view {
  height: 100%;
    height: 100%;
}
.el-menu--horizontal {
  border-bottom: none !important;
    border-bottom: none !important;
}
.el-menu {
  border-right: none !important;
    border-right: none !important;
}
.el-menu--display,
.el-menu--display + .el-submenu__icon-arrow {
  display: none;
.el-menu--display+.el-submenu__icon-arrow {
    display: none;
}
.el-message__icon,
.el-message__content {
  display: inline-block;
    display: inline-block;
}
.el-date-editor .el-range-input,
.el-date-editor .el-range-separator {
  height: auto;
  overflow: hidden;
    height: auto;
    overflow: hidden;
}
.el-dialog__wrapper {
  z-index: 2048;
    z-index: 2048;
}
.el-col {
  margin-bottom: 8px;
    margin-bottom: 8px;
}
.el-main {
  padding: 0 !important;
    padding: 0 !important;
}
.el-dropdown-menu__item--divided:before,
.el-menu,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  background-color: transparent;
.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal>.el-submenu .el-submenu__title:hover {
    background-color: transparent;
}
.el-dropdown-menu__item--divided:before,
.el-menu,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  background-color: transparent !important;
.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal>.el-submenu .el-submenu__title:hover {
    background-color: transparent !important;
}
.el-card__header {
  padding: 6px 18px !important;
    padding: 6px 18px !important;
}
.el-card__body {
  //padding: 16px !important;
    //padding: 16px !important;
}
.el-divider--horizontal {
  margin: 12px 0 !important;
    margin: 12px 0 !important;
}
//表格斑马纹
.el-table tr:nth-child(2n -1) {
  // background-color: rgba($color: #000000, $alpha: 0.1) !important;
    // background-color: rgba($color: #000000, $alpha: 0.1) !important;
}
//顶部搜索栏
.el-card.is-never-shadow.avue-crud__search {
  position: absolute !important;
  width: calc(100% - 220px) !important;
  z-index: 500 !important;
  border: none !important;
  box-shadow: none !important;
  height: 40px;
    position: absolute !important;
    width: calc(100% - 220px) !important;
    z-index: 500 !important;
    border: none !important;
    box-shadow: none !important;
    height: 40px;
}
//取消顶部搜索栏
.user .el-card.is-never-shadow.avue-crud__search {
  position: relative !important;
  width: auto !important;
  z-index: 500 !important;
  border: none !important;
  box-shadow: none !important;
  height: auto;
    position: relative !important;
    width: auto !important;
    z-index: 500 !important;
    border: none !important;
    box-shadow: none !important;
    height: auto;
}
.desk .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 360px) !important;
    width: calc(100% - 360px) !important;
}
.securityGuard .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 300px) !important;
  left: 120px;
    width: calc(100% - 300px) !important;
    left: 120px;
}
.securityUnit .el-card.is-never-shadow.avue-crud__search {
  left: 200px;
  width: calc(100% - 380px) !important;
    left: 200px;
    width: calc(100% - 380px) !important;
}
.equipments .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 380px) !important;
  left: 200px;
    width: calc(100% - 380px) !important;
    left: 200px;
}
.dispatch .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 380px) !important;
  left: 200px;
    width: calc(100% - 380px) !important;
    left: 200px;
}
.dispatchChildoperable .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 280px) !important;
  left: 90px;
    width: calc(100% - 280px) !important;
    left: 90px;
}
.workreply .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 380px) !important;
  left: 200px !important;
    width: calc(100% - 380px) !important;
    left: 200px !important;
}
.recruitmentManagement .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 380px) !important;
  left: 200px !important;
    width: calc(100% - 380px) !important;
    left: 200px !important;
}
.hasButOne .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 300px) !important;
  left: 120px !important;
    width: calc(100% - 300px) !important;
    left: 120px !important;
}
.hasButTwo .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 380px) !important;
  left: 200px !important;
    width: calc(100% - 380px) !important;
    left: 200px !important;
}
.topmenu .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 390px) !important;
  left: 220px !important;
    width: calc(100% - 390px) !important;
    left: 220px !important;
}
.hasButThree .el-card.is-never-shadow.avue-crud__search {
  width: calc(100% - 510px) !important;
  left: 310px !important;
    width: calc(100% - 510px) !important;
    left: 310px !important;
}
.morpheus-box .el-card.is-never-shadow.avue-crud__search {
    width: calc(100% - 390px) !important;
    left: 270px !important;
}
.morpheus-box-exam .el-card.is-never-shadow.avue-crud__search {
    width: calc(100% - 390px) !important;
    left: 20px !important;
}
.morpheus-box-paper .el-card.is-never-shadow.avue-crud__search {
    width: calc(100% - 390px) !important;
    left: 220px !important;
}
.avue-form {
  position: relative;
  top: -10px;
    position: relative;
    top: -10px;
}
//顶部按钮栏
.avue-crud__menu {
  height: 60px;
    height: 60px;
}
//顶部按钮
.avue-crud .avue-crud__left .el-button,
.avue-crud .avue-crud__right .el-button,
.avue-form .avue-crud__left .el-button,
.avue-form .avue-crud__right .el-button {
  position: relative;
  top: 5px;
    position: relative;
    top: 5px;
}
//左侧导航栏
.avue-logo {
  background-color: #409eff !important;
  color: #fff !important;
    background-color: #409eff !important;
    color: #fff !important;
}
.avue-sidebar {
  background-color: #fff !important;
    background-color: #fff !important;
}
.avue-header {
  background-color: #409eff !important;
  color: #fff !important;
    background-color: #409eff !important;
    color: #fff !important;
}
.avue-sidebar .el-menu-item span,
.avue-sidebar .el-submenu__title span,
.avue-sidebar .el-submenu__title i,
.avue-sidebar .el-menu-item i {
  color: #000 !important;
    color: #000 !important;
}
// 菜单 活动背景
.avue-sidebar .el-menu-item.is-active {
  background-color: #409eff !important;
    background-color: #409eff !important;
}
.avue-sidebar .el-menu-item.is-active span,
.el-menu-item.is-active i {
  color: #fff !important;
    color: #fff !important;
}
//top 导航 按钮
.el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal>.el-menu-item.is-active,
.avue-top,
.el-dropdown {
  color: #fff !important;
}
    color: #fff !important;
}
src/views/exam/examination.vue
@@ -6,7 +6,7 @@
 * menu-name 试卷管理
 */
<template>
    <el-row class="morpheus-box">
    <el-row class="morpheus-box-paper">
        <el-col :span="24">
            <el-card>
src/views/exam/performance.vue
@@ -7,7 +7,7 @@
 */
<template>
    <el-row class="morpheus-box">
        <el-col :span="24">
        <el-col :span="24" class="recruitmentManagement">
            <el-card>
                <div class="exam-card-body">
@@ -34,28 +34,49 @@
                        </template>
                        <!-- 自定义按钮 -->
                        <!-- <template slot="menuLeft">
                            <el-button type="danger"
                        <template slot="menuLeft">
                            <!-- <el-button type="danger"
                                       size="mini"
                                       icon="el-icon-delete"
                                       plain
                                       @click="handleDelete">新增
                            </el-button>
                            <el-button type="danger"
                            </el-button> -->
                            <!-- <el-button type="danger"
                                       size="mini"
                                       icon="el-icon-delete"
                                       plain
                                       @click="handleDelete">删除
                            </el-button> -->
                            <el-button
                                type="success"
                                size="small"
                                plain
                                icon="el-icon-upload2"
                                @click="handleImport"
                                >实操成绩导入
                            </el-button>
                            <el-button type="danger"
                                       size="mini"
                                       icon="el-icon-delete"
                                       plain
                                       @click="handleDelete">导出
                            </el-button>
                        </template> -->
                        </template>
                    </avue-crud>
                    <el-dialog
                        title="实操成绩导入"
                        append-to-body
                        :visible.sync="excelBox"
                        width="555px"
                        >
                        <avue-form
                            :option="excelOption"
                            v-model="excelForm"
                            :upload-after="uploadAfter"
                        >
                            <template slot="excelTemplate">
                            <el-button type="primary" @click="handleTemplate">
                                点击下载<i class="el-icon-download el-icon--right"></i>
                            </el-button>
                            </template>
                        </avue-form>
                    </el-dialog>
                </div>
@@ -97,6 +118,7 @@
            obj: {
                name: '张三',
            },
            excelBox:false,
            questionBankOption: {
                // 操作栏多余按钮去除
                delBtn: false,
@@ -107,8 +129,7 @@
                excelBtn: true,
                excelBtnText: '成绩导出',
                viewBtn: true,
                title: '成绩',
                // title: '成绩',
                align: 'center',
                height: 'auto',
                calcHeight: 80,
@@ -175,14 +196,14 @@
                    },
                    {
                        label: "所属公司",
                        prop: "company",
                        prop: "companyName",
                        search: true,
                        searchSpan: 4,
                        dicUrl: '/api/blade-system/dept/tree',
                        props: {
                            label: "title",
                            value: "id",
                        },
                        // dicUrl: '/api/blade-system/dept/tree',
                        // props: {
                        //     label: "title",
                        //     value: "id",
                        // },
                        slot: true,
                        // 表单新增时是否禁止
                        addDisabled: false,
@@ -260,28 +281,30 @@
                        editDetail: false,
                        rules: [{ validator: validatePass, required: true, trigger: 'blur' }],
                    },
                    {
                        label: "总成绩",
                        prop: "allGrade",
                        slot: true,
                        // 表单新增时是否禁止
                        addDisabled: false,
                        // 表单新增时是否可见
                        addDisplay: true,
                        // 表单新增时是否为查看模式
                        addDetail: false,
                        // 表单编辑时是否禁止
                        editDisabled: true,
                        // 表单编辑时是否可见
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        rules: [{
                            required: true,
                            message: "请输入考试名称",
                            trigger: "blur"
                        }]
                    },
                    // {
                    //     label: "总成绩",
                    //     prop: "allGrade",
                    //     slot: true,
                    //     hide:true,
                    //     // 表单新增时是否禁止
                    //     addDisabled: false,
                    //     viewDisplay:false,
                    //     // 表单新增时是否可见
                    //     addDisplay: false,
                    //     // 表单新增时是否为查看模式
                    //     addDetail: false,
                    //     // 表单编辑时是否禁止
                    //     editDisabled: false,
                    //     // 表单编辑时是否可见
                    //     editDisplay: false,
                    //     // 表单编辑时是否为查看模式
                    //     editDetail: false,
                    //     rules: [{
                    //         required: true,
                    //         message: "请输入考试名称",
                    //         trigger: "blur"
                    //     }]
                    // },
                    {
                        label: "是否合格",
                        prop: "qualified",
@@ -330,6 +353,58 @@
            },
            questionBankQuery: {},
            questionBankSelectionList: [],
            excelForm: {},
            excelOption: {
                submitBtn: false,
                emptyBtn: false,
                column: [
                {
                    label: "模板上传",
                    prop: "excelFile",
                    type: "upload",
                    drag: true,
                    loadText: "模板上传中,请稍等",
                    span: 24,
                    propsHttp: {
                    res: "data",
                    },
                    tip: "请上传 .xls,.xlsx 标准格式文件",
                    action: "/api/examScore/import-examScore",
                },
                // {
                //     label: "数据覆盖",
                //     prop: "isCovered",
                //     type: "switch",
                //     align: "center",
                //     width: 80,
                //     dicData: [
                //     {
                //         label: "否",
                //         value: 0,
                //     },
                //     {
                //         label: "是",
                //         value: 1,
                //     },
                //     ],
                //     value: 0,
                //     slot: true,
                //     rules: [
                //     {
                //         required: true,
                //         message: "请选择是否覆盖",
                //         trigger: "blur",
                //     },
                //     ],
                // },
                {
                    label: "模板下载",
                    prop: "excelTemplate",
                    formslot: true,
                    span: 24,
                },
                ],
            },
        }
    },
    created () {
@@ -389,6 +464,18 @@
                loading();
            });
        },
        handleTemplate() {
            window.open(`/api/examScore/export-template`);
        },
        handleImport() {
            this.excelBox = true;
        },
        uploadAfter(res, done, loading, column) {
            window.console.log(column);
            this.excelBox = false;
            this.refreshChange();
            done();
        },
    }
}
src/views/exam/startexam.vue
@@ -6,7 +6,7 @@
 * menu-name 考试管理
 */
<template>
    <el-row class="morpheus-box">
    <el-row class="morpheus-box-exam">
        <el-col :span="24">
            <el-card>
src/views/exam/subject.vue
@@ -67,7 +67,7 @@
                // 导出按钮
                excelBtn: true,
                excelBtnText: '题库导出',
                title: '题库',
                // title: '题库',
                align: 'center',
                height: 'auto',