Lijy 1 день тому
батько
коміт
fafca8c39e

+ 1 - 1
fhKeeper/formulahousekeeper/course-pc/src/views/coursemanagement/addVideo.vue

@@ -36,7 +36,7 @@
               :min="0"
               :max="600"
               placeholder="试看时间(秒)"
-              :disabled="item.coursePreviousUrl"
+              
             ></el-input-number>
           </el-col>
           <el-col :span="5">

+ 55 - 1
fhKeeper/formulahousekeeper/course-pc/src/views/coursemanagement/list.vue

@@ -24,6 +24,9 @@
                 <el-form-item>
                     <el-button type="primary" @click="batchManage" size="small">分类管理</el-button>
                 </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="examinationManagement()" size="small">考试管理</el-button>
+                </el-form-item>
             </el-form>
         </el-col>
 
@@ -229,6 +232,22 @@
         <viewer ref="imageWrapper" :images="previewImages" style="opacity: 1;position: absolute;top: -9999px;">
             <img v-for="(image, index) in previewImages" :src="image" :key="index" />
         </viewer>
+
+        <!-- 考试管理 -->
+        <el-dialog :visible.sync="examinationManagementVislable" title="考试管理" width="500px" top="6.5vh">
+            <div>
+                <el-form ref="form" :model="examinationManagementRow" label-width="120px">
+                    <el-form-item label="设置考试次数">
+                        <el-input-number v-model="examinationManagementRow.dailyQuizLimitValue" controls-position="right" @change="handleChange" :min="1" :precision="0" size="small"></el-input-number>
+                        <span style="padding-left: 10px">次</span>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <span slot="footer" class="classificationOperation">
+                <el-button @click="examinationManagementVislable = false">关 闭</el-button>
+                <el-button type="primary" :disabled="!examinationManagementRow.dailyQuizLimitValue" @click="saveSysConfig()">保存</el-button>
+            </span>
+        </el-dialog>
     </section>
 </template>
 
@@ -345,10 +364,44 @@ export default {
             newCategoryDialogVisible: false,
             newCategoryDialogForm: {},
             previewImages: [],
-            newCategoryDialogLoading: false
+            newCategoryDialogLoading: false,
+
+            // 考试管理
+            examinationManagementVislable: false,
+            examinationManagementRow: {},
         }
     },
     methods: {
+        examinationManagement() {
+            this.examinationManagementRow = {
+                ...this.examinationManagementRow,
+                dailyQuizLimitValue: this.examinationManagementRow.dailyQuizLimit
+            }
+            this.examinationManagementVislable = true;
+        },
+        saveSysConfig() {
+            const { id, dailyQuizLimitValue = 1 } = this.examinationManagementRow;
+            post('/sys-config/updateSysConfig', {
+                id, dailyQuizLimit: dailyQuizLimitValue
+            }).then(res => {
+                if (res.code == 'ok') {
+                    this.$message.success('保存成功');
+                    this.examinationManagementVislable = false
+                    this.getExaminationManagement()
+                } else {
+                    this.$message.error(res.msg);
+                }
+            })
+        },
+        getExaminationManagement() {
+            post('/sys-config/getSysConfig', {}).then(res => {
+                if (res.code == 'ok') {
+                    this.examinationManagementRow = res.data;
+                } else {
+                    this.$message.error(res.msg);
+                }
+            })
+        },
         getUpList() {
             post('/course-type/uplist', {}).then(res => {
                 if (res.code == 'ok') {
@@ -1014,6 +1067,7 @@ export default {
         // 获取课程列表
         this.getList();
         this.getUpList()
+        this.getExaminationManagement()
     }
 }
 </script>

+ 30 - 3
fhKeeper/formulahousekeeper/course-pc/src/views/examinationManagement/certificates.vue

@@ -29,6 +29,7 @@
                     <span v-else>无证书</span>
                 </template>
             </el-table-column>
+            <el-table-column prop="postNumber" label="快递单号" min-width="220" align="center"></el-table-column>
             <el-table-column prop="certCreateDate" label="发证日期" min-width="120" align="center"></el-table-column>
             <el-table-column label="操作" min-width="150" align="center">
                 <template slot-scope="scope">
@@ -38,8 +39,8 @@
                             <el-button size="small" type="primary" @click="certificateClick(scope.row)">{{
                                 scope.row.certificate ? '编辑证书' : '上传证书' }}</el-button>
                         </el-upload>
-                        <el-button size="small" v-if="!scope.row.isPost" @click="mail(scope.row.id)"
-                            type="primary">邮寄</el-button>
+                        <!-- <el-button size="small" v-if="!scope.row.isPost" @click="mail(scope.row.id)" type="primary">邮寄</el-button> -->
+                        <el-button size="small" v-if="!scope.row.isPost" @click="mailClick(scope.row)" type="primary">邮寄</el-button>
                         <el-button size="small" v-if="scope.row.isPost">已邮寄</el-button>
                     </div>
                 </template>
@@ -53,6 +54,21 @@
                 :total="total" style="float:right;"></el-pagination>
         </el-col>
 
+        <!-- 邮寄 -->
+        <el-dialog :visible.sync="mailVislable" title="邮寄" width="500px" top="6.5vh">
+            <div>
+                <el-form ref="form" :model="mailForm" label-width="120px">
+                    <el-form-item label="快递单号">
+                        <el-input v-model.trim="mailForm.postNumbervalue" size="small" clearable></el-input>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <span slot="footer" class="classificationOperation">
+                <el-button @click="mailVislable = false">关 闭</el-button>
+                <el-button type="primary" :disabled="!mailForm.postNumbervalue" @click="mail()">保存</el-button>
+            </span>
+        </el-dialog>
+
         <!-- 图片预览 -->
         <viewer ref="imageWrapper" :images="images" style="opacity: 1;position: absolute;top: -9999px;">
             <img v-for="(image, index) in images" :src="image" :key="index" />
@@ -82,18 +98,29 @@ export default {
                 certificate: null
             },
             images: [],
+
+            // 邮寄
+            mailVislable: false,
+            mailForm: {}
         }
     },
     methods: {
+        mailClick(row) {
+            this.mailForm = { ...row, postNumbervalue: row.postNumber || '' }
+            this.mailVislable = true
+        },
         mail(ids) {
+            const { id, postNumbervalue } = this.mailForm
             this.$confirm('确认邮寄该讲师的证书?', '邮寄', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
                 type: 'warning'
             }).then(() => {
                 this.http.post('/exam-record/batchPost', {
-                    idString: ids
+                    idString: id,
+                    postNumber: postNumbervalue
                 }, res => {
+                    this.mailVislable = false
                     this.getList()
                     this.$message.success('邮寄成功!');
                 }, () => { })