Browse Source

Merge branch 'master' of http://192.168.1.43:3000/v3/v3-lab-web

dedsudiyu 1 year ago
parent
commit
fe7fa19a4f

+ 5 - 5
src/views/safetyEducationExam/safeLearning/el_course/index.vue

@@ -248,11 +248,11 @@ export default {
       ],
       statusList:[
         {
-          type: 1,
+          type: true,
           value: "上架",
         },
         {
-          type: 2,
+          type: false,
           value: "下架",
         },
       ],
@@ -303,12 +303,12 @@ export default {
     switchChange(row){
       console.log(row.status)
       //1上架0下架
-      this.$confirm('是否确定'+(row.status==2?'上架':'下架')+'?', '提示', {
+      this.$confirm('是否确定'+(row.status==true?'上架':'下架')+'?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.upDownShelf(row.id,row.status==1?2:1)
+        this.upDownShelf(row.id,row.status==false?true:false)
 
 
       }).catch(() => {
@@ -530,7 +530,7 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      if(row.status == 1){
+      if(row.status == true){
         this.msgError('请先下架课程后再进行删除操作')
         return
       }

+ 9 - 4
src/views/safetyEducationExam/safeLearning/safe_book/index.vue

@@ -285,12 +285,12 @@ export default {
       this.loading = true;
       if(this.dateRange&&this.dateRange.length>0)
       {
-        this.queryParams.beginTime=this.dateRange[0]
-        this.queryParams.endTime=this.dateRange[1]
+        this.queryParams.startTime=this.dateRange[0]+'T00:00:00';
+        this.queryParams.endTime=this.dateRange[1]+'T23:59:59';
       }
       else
       {
-        this.queryParams.beginTime=null;
+        this.queryParams.startTime=null;
         this.queryParams.endTime=null
       }
       examSafeBookList(this.queryParams).then( response => {
@@ -356,10 +356,12 @@ export default {
       examSafeBook(id).then( response => {
         this.form =  response.data;
         this.form.content = window.location.href.split('://')[0]+'://' + response.data.content.split('://')[1];
+        console.log(this.form)
         this.getNumPages();
         this.open = true;
         this.title = "修改实验室安全制度";
       });
+
     },
     getNumPages() {
       let loadingTask = pdf.createLoadingTask(this.form.content)
@@ -372,7 +374,10 @@ export default {
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
-        this.form.content=this.form.realcontent;
+        if(this.form.realcontent){
+          this.form.content=this.form.realcontent;
+        }
+
         console.log(this.form)
         if (valid) {
           // this.form.content = escape(this.form.content);