فهرست منبع

取消题库评分人,改为考试评分人

luoaoxuan 1 سال پیش
والد
کامیت
1d92336948

+ 50 - 50
src/views/component/trainingManage/trainingStatic.vue

@@ -309,57 +309,57 @@ export default {
                 this.loading = false
             })
 
-            // 为补签的人发考试与消息 更新试卷人员信息
-            if (row.ti_ku_ming_cheng_) {
-                // todo 1.给考试参加人员替换掉2.结束培训判断谁没签到提示补签
+            // 为补签的人发考试与消息 更新试卷人员信息  1.17 考试与培训取消关联
+            // if (row.ti_ku_ming_cheng_) {
+            //     // todo 1.给考试参加人员替换掉2.结束培训判断谁没签到提示补签
 
-                const sql1 = `select qb.id_ as tkid,qb.ti_ku_ming_cheng_ as bankName, qb.ti_shu_ as questionCount, qb.zong_fen_ as totalScore, ex.kao_shi_ming_chen as examName, ex.xian_kao_ci_shu_ as limitCount, ex.xian_kao_shi_jian as limitDate, ex.kao_shi_shi_chang as duration, ex.can_kao_ren_yuan_ as examinee, ex.da_biao_zhan_bi_ as qualifiedRadio, ex.ji_fen_fang_shi_ as scoringType, ex.yun_xu_bao_ming_ as allowRegist, ex.sui_ji_chou_ti_ as isRand, ex.sui_ji_ti_shu_ as randNumber,ex.chou_ti_zong_fen_ as randScore,ex.ti_mu_zong_shu_ as randTotal  from t_exams ex, t_question_bank qb where ex.ti_ku_id_ = qb.id_ and ex.id_ = '${row.ti_ku_ming_cheng_}'`
-                this.$common.request('sql', sql1).then(res => {
-                    const { data = [] } = res.variables || {}
-                    if (!data.length) {
-                        return
-                    } else {
-                        if (data[0].isRand === '1') {
-                            data[0].questionCount = data[0].randTotal
-                            data[0].totalScore = data[0].randScore
-                        }
-                        console.log('data对象', data)
-                        const { first, second } = this.$store.getters.level || {}
-                        const { tkid, examName, questionCount, totalScore, duration, qualifiedRadio, limitDate, limitCount } = data[0] || {}
-                        const paramWhere = [{
-                            exam_id_: row.ti_ku_ming_cheng_,
-                            ti_ku_id_: tkid,
-                            di_dian_: second || first,
-                            kao_shi_ren_: this.params.peixunrenyuan,
-                            bu_men_: '',
-                            bao_ming_shi_jian: this.$common.getDateNow(19),
-                            ti_ku_zong_fen_: totalScore,
-                            zhuang_tai_: '未开始',
-                            sheng_yu_shi_chan: duration,
-                            da_biao_zhan_bi_: qualifiedRadio
-                        }]
-                        const addParams = {
-                            tableName: 't_examination',
-                            paramWhere
-                        }
-                        console.log('添加考试信息', addParams)
-                        this.$common.request('add', addParams).then(res => {
-                            // 发送通知
-                            const limitTime = duration === '不限' || !duration ? '不限' : this.transformTime(duration)
-                            const msgContent = `您参加的考试【${examName}】已发布,该考试限考时间【${limitDate}】,限考次数【${limitCount}】,考试时长【${limitTime}】,题数【${questionCount}】,总分【${totalScore}】,请及时完成考试!`
-                            console.log('消息msgContent', msgContent)
-                            this.$common.sendMsg({
-                                subject: '考试信息提醒',
-                                content: msgContent,
-                                receiverId: this.params.peixunrenyuan,
-                                canreplay: '0'
-                            })
-                        }).then(res => {
-                            this.$message.success('补签报名考试成功,参与人员可到考试中心考试!')
-                        })
-                    }
-                })
-            }
+            //     const sql1 = `select qb.id_ as tkid,qb.ti_ku_ming_cheng_ as bankName, qb.ti_shu_ as questionCount, qb.zong_fen_ as totalScore, ex.kao_shi_ming_chen as examName, ex.xian_kao_ci_shu_ as limitCount, ex.xian_kao_shi_jian as limitDate, ex.kao_shi_shi_chang as duration, ex.can_kao_ren_yuan_ as examinee, ex.da_biao_zhan_bi_ as qualifiedRadio, ex.ji_fen_fang_shi_ as scoringType, ex.yun_xu_bao_ming_ as allowRegist, ex.sui_ji_chou_ti_ as isRand, ex.sui_ji_ti_shu_ as randNumber,ex.chou_ti_zong_fen_ as randScore,ex.ti_mu_zong_shu_ as randTotal  from t_exams ex, t_question_bank qb where ex.ti_ku_id_ = qb.id_ and ex.id_ = '${row.ti_ku_ming_cheng_}'`
+            //     this.$common.request('sql', sql1).then(res => {
+            //         const { data = [] } = res.variables || {}
+            //         if (!data.length) {
+            //             return
+            //         } else {
+            //             if (data[0].isRand === '1') {
+            //                 data[0].questionCount = data[0].randTotal
+            //                 data[0].totalScore = data[0].randScore
+            //             }
+            //             console.log('data对象', data)
+            //             const { first, second } = this.$store.getters.level || {}
+            //             const { tkid, examName, questionCount, totalScore, duration, qualifiedRadio, limitDate, limitCount } = data[0] || {}
+            //             const paramWhere = [{
+            //                 exam_id_: row.ti_ku_ming_cheng_,
+            //                 ti_ku_id_: tkid,
+            //                 di_dian_: second || first,
+            //                 kao_shi_ren_: this.params.peixunrenyuan,
+            //                 bu_men_: '',
+            //                 bao_ming_shi_jian: this.$common.getDateNow(19),
+            //                 ti_ku_zong_fen_: totalScore,
+            //                 zhuang_tai_: '未开始',
+            //                 sheng_yu_shi_chan: duration,
+            //                 da_biao_zhan_bi_: qualifiedRadio
+            //             }]
+            //             const addParams = {
+            //                 tableName: 't_examination',
+            //                 paramWhere
+            //             }
+            //             console.log('添加考试信息', addParams)
+            //             this.$common.request('add', addParams).then(res => {
+            //                 // 发送通知
+            //                 const limitTime = duration === '不限' || !duration ? '不限' : this.transformTime(duration)
+            //                 const msgContent = `您参加的考试【${examName}】已发布,该考试限考时间【${limitDate}】,限考次数【${limitCount}】,考试时长【${limitTime}】,题数【${questionCount}】,总分【${totalScore}】,请及时完成考试!`
+            //                 console.log('消息msgContent', msgContent)
+            //                 this.$common.sendMsg({
+            //                     subject: '考试信息提醒',
+            //                     content: msgContent,
+            //                     receiverId: this.params.peixunrenyuan,
+            //                     canreplay: '0'
+            //                 })
+            //             }).then(res => {
+            //                 this.$message.success('补签报名考试成功,参与人员可到考试中心考试!')
+            //             })
+            //         }
+            //     })
+            // }
             // 补签更新培训记录表"参加人员"字段与"参加人数字段" 更新操作
             // 更新培训记录表 todo
         },

+ 44 - 2
src/views/platform/examination/exam/edit.vue

@@ -222,6 +222,43 @@
                     placeholder="请选择需参加考试的人员"
                 />
             </el-form-item>
+            <el-form-item prop="ping_fen_ren_">
+                <template slot="label">
+                    评分人
+                    <el-tooltip effect="dark" content="设置该考试的评分人,选择的评分人与题目评分人都可以进行试题评阅" placement="top">
+                        <i class="el-icon-question question-icon">:</i>
+                    </el-tooltip>
+                </template>
+                <!-- <el-cascader
+                    v-model="form.ping_fen_ren_"
+                    :options="getRaterOptions()"
+                    :show-all-levels="false"
+                    collapse-tags
+                    :props="{
+                        value: 'value',
+                        label: 'label',
+                        multiple: true,
+                        checkStrictly: false
+                    }"
+                /> -->
+                <el-select
+                    v-model="form.ping_fen_ren_"
+                    filterable
+                    style="width:100%"
+                    clearable
+                    multiple
+                    :multiple-limit="16"
+                    :disabled="isDisabled"
+                    placeholder="请选择评分人"
+                >
+                    <el-option
+                        v-for="item in userList"
+                        :key="item.userId"
+                        :label="item.userName"
+                        :value="item.userId"
+                    />
+                </el-select>
+            </el-form-item>
             <el-form-item prop="isCountLimit" class="inline-item">
                 <template slot="label">
                     限考次数
@@ -473,7 +510,8 @@ export default {
                 sui_ji_ti_shu_: [],
                 hours: 2,
                 minutes: 30,
-                chou_ti_fang_shi_: '1'
+                chou_ti_fang_shi_: '1',
+                ping_fen_ren_: ''
             },
             pickerOptions: {
                 disabledDate (time) {
@@ -667,7 +705,7 @@ export default {
                 this.randButtonDisabled = true
                 this.$message.info('非未发布状态的考试仅可修改限考时间!')
             }
-            const sql = `select id_, create_by_, ti_ku_id_, guan_lian_id_, kao_shi_ming_chen, kao_shi_lei_xing_, chuang_jian_shi_j, fa_bu_shi_jian_, fa_bu_ren_, xian_kao_shi_jian, xian_kao_ci_shu_, kao_shi_shi_chang, can_kao_ren_yuan_, zhuang_tai_, da_biao_zhan_bi_, ji_fen_fang_shi_, kao_shi_miao_shu_, yun_xu_bao_ming_, sui_ji_chou_ti_, sui_ji_ti_shu_,chou_ti_zong_fen_,ti_mu_zong_shu_,chou_ti_fang_shi_ from t_exams where id_ = '${this.id}'`
+            const sql = `select id_, create_by_, ti_ku_id_, guan_lian_id_, kao_shi_ming_chen, kao_shi_lei_xing_, chuang_jian_shi_j, fa_bu_shi_jian_, fa_bu_ren_, xian_kao_shi_jian, xian_kao_ci_shu_, kao_shi_shi_chang, can_kao_ren_yuan_, zhuang_tai_, da_biao_zhan_bi_, ji_fen_fang_shi_, kao_shi_miao_shu_, yun_xu_bao_ming_, sui_ji_chou_ti_, sui_ji_ti_shu_,chou_ti_zong_fen_,ti_mu_zong_shu_,chou_ti_fang_shi_,ping_fen_ren_ from t_exams where id_ = '${this.id}'`
             this.$common.request('sql', sql).then((res) => {
                 const { data = [] } = res.variables || {}
                 if (!data.length) {
@@ -685,6 +723,9 @@ export default {
                     data[0].hours = Math.floor(data[0].kao_shi_shi_chang / (1000 * 60 * 60))
                     data[0].minutes = (data[0].kao_shi_shi_chang % (1000 * 60 * 60)) / (60 * 1000)
                 }
+                if (data[0].ping_fen_ren_) {
+                    data[0].ping_fen_ren_ = data[0].ping_fen_ren_.split(',') || []
+                }
                 this.form = data[0]
                 if (this.form.sui_ji_chou_ti_ === '1') {
                     this.form.sui_ji_ti_shu_ = this.form.sui_ji_ti_shu_.split(',')
@@ -754,6 +795,7 @@ export default {
                         }
                     }
                     this.form.sui_ji_ti_shu_ = this.form.sui_ji_ti_shu_.join(',')
+                    this.form.ping_fen_ren_ = this.form.ping_fen_ren_ ? this.form.ping_fen_ren_.join(',') : ''
 
                     const { isTimeLimit, xian_kao_shi_jian = '' } = this.form || {}
                     // 转换考试时长

+ 2 - 1
src/views/platform/examination/question/judge.vue

@@ -252,7 +252,8 @@ export default {
             this.loading = true
             const param = this.id ? ` and find_in_set(ex.exam_id_, '${this.id}')` : ''
             // const sql = `select id_ as dataId, parent_id_ as paperId, ti_mu_id_ as questionId, ti_gan_ as stem, ti_xing_ as questionType, fu_tu_ as img, xuan_xiang_lei_xi as optionType, fen_zhi_ as score, ping_fen_fang_shi as rateType, ping_fen_ren_ as rater, hui_da_ as answer, can_kao_da_an_ as rightKey, shi_fou_yi_yue_ as isRate from t_examination_detail where ping_fen_ren_ = '${this.userId}' and shi_fou_yi_yue_ = '否' and parent_id_ in (select id_ from t_examination where zhuang_tai_ = '已交卷'${param}) order by field(ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
-            const sql = `select ed.id_ as dataId, ed.parent_id_ as paperId, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionType, ed.fen_zhi_ as score, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.can_kao_da_an_ as rightKey, ed.shi_fou_yi_yue_ as isRate from t_examination_detail ed join t_examination ex on ed.parent_id_ = ex.id_ left join t_question_bank qb on ex.ti_ku_id_ = qb.id_ where ex.zhuang_tai_ = '已交卷' and ed.shi_fou_yi_yue_ = '否' and (ed.ping_fen_ren_ like '%${this.userId}%' or qb.ping_fen_ren_ like '%${this.userId}%')${param} order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
+            // const sql = `select ed.id_ as dataId, ed.parent_id_ as paperId, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionType, ed.fen_zhi_ as score, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.can_kao_da_an_ as rightKey, ed.shi_fou_yi_yue_ as isRate from t_examination_detail ed join t_examination ex on ed.parent_id_ = ex.id_ left join t_question_bank qb on ex.ti_ku_id_ = qb.id_ where ex.zhuang_tai_ = '已交卷' and ed.shi_fou_yi_yue_ = '否' and (ed.ping_fen_ren_ like '%${this.userId}%' or qb.ping_fen_ren_ like '%${this.userId}%')${param} order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
+            const sql = `select ed.id_ as dataId, ed.parent_id_ as paperId, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionType, ed.fen_zhi_ as score, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.can_kao_da_an_ as rightKey, ed.shi_fou_yi_yue_ as isRate from t_examination_detail ed join t_examination ex on ed.parent_id_ = ex.id_ LEFT JOIN t_exams exam ON ex.exam_id_ = exam.id_ where ex.zhuang_tai_ = '已交卷' and ed.shi_fou_yi_yue_ = '否' and (ed.ping_fen_ren_ like '%${this.userId}%' or exam.ping_fen_ren_ like '%${this.userId}%')${param} order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
             return new Promise((resolve, reject) => {
                 this.$common.request('sql', sql).then(res => {
                     const { data = [] } = res.variables || {}

+ 5 - 5
src/views/platform/examination/questionBank/edit.vue

@@ -168,14 +168,14 @@
                 />
                 <div class="unit">%</div>
             </el-form-item>
-            <el-form-item v-if="!readonly || form.ping_fen_ren_" prop="ping_fen_ren_">
+            <!-- <el-form-item v-if="!readonly || form.ping_fen_ren_" prop="ping_fen_ren_">
                 <template slot="label">
                     默认评分人
                     <el-tooltip effect="dark" content="设置该题库试题的默认评分人,该题库下所有未设置评分人的题目都以该评分人为准。" placement="top">
                         <i class="el-icon-question question-icon">:</i>
                     </el-tooltip>
-                </template>
-                <!-- <el-cascader
+                </template> -->
+            <!-- <el-cascader
                     v-model="form.ping_fen_ren_"
                     :options="getRaterOptions()"
                     :show-all-levels="false"
@@ -187,7 +187,7 @@
                         checkStrictly: false
                     }"
                 /> -->
-                <el-select
+            <!-- <el-select
                     v-model="form.ping_fen_ren_"
                     filterable
                     width="100%"
@@ -205,7 +205,7 @@
                         :value="item.userId"
                     />
                 </el-select>
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item v-if="!readonly || form.miao_shu_" label="题库描述:" prop="miao_shu_">
                 <el-input
                     v-model="form.miao_shu_"