Procházet zdrojové kódy

task-5335 考试管理创建考试增加预设参考人员功能

tianxinyu před 1 měsícem
rodič
revize
ed656649c3

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

@@ -210,6 +210,17 @@
                     :picker-options="pickerOptions"
                 />
             </el-form-item>
+            <el-form-item label="选择参考人员配置:">
+              <ibps-custom-dialog
+                  v-model="fenZu"
+                  size="small"
+                  template-key="ckryfzpzdhk"
+                  :disabled="isDisabled"
+                  type="dialog"
+                  class="custom-dialog"
+                  placeholder="请选择参考人员配置"
+              />
+          </el-form-item>
             <el-form-item label="参考人员:" prop="can_kao_ren_yuan_">
                 <ibps-custom-dialog
                     v-model="form.can_kao_ren_yuan_"
@@ -489,6 +500,7 @@ export default {
             dialogLoading: false,
             randButtonDisabled: false,
             isFirst: true,
+            fenZu: '',
             form: {
                 di_dian_: level.second || level.first,
                 chuang_jian_shi_j: '',
@@ -515,7 +527,8 @@ export default {
                 hours: 2,
                 minutes: 30,
                 chou_ti_fang_shi_: '1',
-                ping_fen_ren_: ''
+                ping_fen_ren_: '',
+                fen_zu_id_: ''
             },
             pickerOptions: {
                 disabledDate (time) {
@@ -625,7 +638,27 @@ export default {
                 }
             },
             deep: true
-        }
+        },
+        'fenZu': {
+            handler (val) { 
+              console.log('val  ', val)
+              this.$common.request('query', { key: 'hqckrypz', params: [val] }).then(res => {
+                const { data } = res?.variables || {}
+                console.log('data', res)
+                if(!data[0].can_kao_ren_yuan_){
+                  return
+                }
+                if(this.form.can_kao_ren_yuan_){
+                  let ids = data[0].can_kao_ren_yuan_ + ',' + this.form.can_kao_ren_yuan_
+                  this.form.can_kao_ren_yuan_ = [...new Set(ids.split(','))].join(',');
+                }else{
+                  this.form.can_kao_ren_yuan_ = data[0].can_kao_ren_yuan_
+                }
+
+                console.log(this.form.can_kao_ren_yuan_, '22222222222')
+              })
+            },
+         }
     },
     mounted () {
         this.getExamData()
@@ -752,6 +785,7 @@ export default {
                     }
                 }
                 this.allQuestions.tiKu = this.form.ti_ku_id_
+                this.fenZu = this.form.fen_zu_id_
             })
         },
         handleSubmit () {
@@ -821,6 +855,10 @@ export default {
                         this.form.ti_ku_id_ = this.allQuestions.tiKu
                     }
 
+                    if(this.fenZu){
+                      this.form.fen_zu_id_ = this.fenZu
+                    }
+
                     // 表单验证通过,提交表单
                     this.submitForm()
                 } else {

+ 18 - 2
src/views/platform/examination/exam/list.vue

@@ -19,6 +19,7 @@
             @pagination-change="handlePaginationChange"
             @row-dblclick="handleRowDblclick"
         >
+
             <!-- 查询参数插槽 -->
             <template slot="examBankId">
                 <ibps-custom-dialog
@@ -76,6 +77,15 @@
             :visible.sync="showJudgeDialog"
             @close="visible => showJudgeDialog = visible"
         />
+        <custom-dialog
+          :visible="customDialogVisible"
+          :value="[]"
+          template-key="ckryfzpzdhk"
+          :dynamic-params="{}"
+          @close="(visible) => (customDialogVisible = visible)"
+      />
+
+
     </div>
 </template>
 
@@ -86,6 +96,7 @@ import FixHeight from '@/mixins/height'
 import { max, min, mean, sum, maxBy, minBy, meanBy, round, keyBy, mapValues, fromPairs } from 'lodash'
 import { removeFormData } from '@/api/platform/data/dataTemplate'
 import { queryExams } from '@/api/business/general'
+import CustomDialog from '@/business/platform/data/templaterender/custom-dialog/dialog'
 
 const sortField = {
     CREATE_TIME_: 'chuangJianShiJ',
@@ -98,7 +109,8 @@ export default {
         ExamDetail: () => import('./detail'),
         ExamJudge: () => import('../question/judge'),
         IbpsCustomDialog: () => import('@/business/platform/data/templaterender/custom-dialog'),
-        IbpsUserSelector: () => import('@/business/platform/org/selector')
+        IbpsUserSelector: () => import('@/business/platform/org/selector'),
+        CustomDialog
     },
     mixins: [FixHeight],
     data () {
@@ -115,6 +127,7 @@ export default {
         ]
         const showType = 'info'
         return {
+            customDialogVisible: false,  //分组配置按钮
             userId,
             userList,
             userOption,
@@ -153,7 +166,8 @@ export default {
                     { key: 'create', label: '新建考试', type: 'success', icon: 'ibps-icon-plus' },
                     { key: 'remove' },
                     { key: 'judge', label: '试题评阅', type: 'info', icon: 'ibps-icon-adjust' },
-                    { key: 'change', label: `${this.showType === 'info' ? '考试结果' : '考试信息'}`, type: 'warning', icon: 'el-icon-s-operation' }
+                    { key: 'change', label: `${this.showType === 'info' ? '考试结果' : '考试信息'}`, type: 'warning', icon: 'el-icon-s-operation' },
+                    { key: 'fenzu', label: '参考人员分组配置', type: 'info', icon: 'ibps-icon-cogs', },
                 ],
                 searchForm: {
                     forms: [
@@ -580,6 +594,8 @@ export default {
                     }
                     this.showDetailDialog = true
                     break
+                case 'fenzu':
+                    this.customDialogVisible = true
                 default:
                     break
             }