Bläddra i källkod

9/18 bug 提交

zhangjintao 1 år sedan
förälder
incheckning
59aae837b5

+ 5 - 5
src/views/courseTable/components/shenheTip.vue

@@ -175,7 +175,7 @@
             }
             if (code == 1 && check_status == 2) {
               this.tipMessage =
-                '<div><strong>【实验中心】</strong>【实验中心】审核<span style="color:red"><strong>【失败】</strong></span>,审核结果已通过短信通知申请人</div>'
+                '<div><strong>【实验中心】</strong>【实验中心】审核<span style="color:red"><strong>【被驳回】</strong></span>,审核结果已通过短信通知申请人</div>'
             }
 
             if (code == 2 && check_status == 1) {
@@ -184,7 +184,7 @@
             }
             if (code == 2 && check_status == 2) {
               this.tipMessage =
-                '<div><strong>【课程所在院系】</strong>审核<span style="color:red"><strong>【失败】</strong></span>,审核结果已通过短信通知申请人</div>'
+                '<div><strong>【课程所在院系】</strong>审核<span style="color:red"><strong>【被驳回】</strong></span>,审核结果已通过短信通知申请人</div>'
             }
 
             if (code == 3 && check_status == 1) {
@@ -195,7 +195,7 @@
             if (code == 3 && check_status == 2) {
               4
               this.tipMessage =
-                '<div><strong>【专业所在院系】</strong>审核<span style="color:red"><strong>【失败】</strong></span>,审核结果已通过短信通知申请人</div>'
+                '<div><strong>【专业所在院系】</strong>审核<span style="color:red"><strong>【被驳回】</strong></span>,审核结果已通过短信通知申请人</div>'
             }
             if (this.lesson_type == 3) {
               if (code == 4 && check_status == 1) {
@@ -206,7 +206,7 @@
               if (code == 4 && check_status == 2) {
                 4
                 this.tipMessage =
-                  '<div>审核<span style="color:red"><strong>【失败】</strong></span>,审核结果已通过短信通知申请人</div>'
+                  '<div>审核<span style="color:red"><strong>【被驳回】</strong></span>,审核结果已通过短信通知申请人</div>'
               }
             } else {
               if (code == 4 && check_status == 1) {
@@ -217,7 +217,7 @@
               if (code == 4 && check_status == 2) {
                 4
                 this.tipMessage =
-                  '<div><strong>【教务处】</strong>审核<span style="color:red"><strong>【失败】</strong></span>,审核结果已通过短信通知申请人</div>'
+                  '<div><strong>【教务处】</strong>审核<span style="color:red"><strong>【被驳回】</strong></span>,审核结果已通过短信通知申请人</div>'
               }
             }
           }

+ 8 - 0
src/views/courseTable/courseHandle.vue

@@ -40,6 +40,14 @@
             />
           </el-form-item>
           <el-form-item>
+            <el-input
+              v-model.trim="queryForm.admin_name"
+              clearable
+              placeholder="请输入教师姓名"
+              @keyup.enter.native="queryData"
+            />
+          </el-form-item>
+          <el-form-item>
             <el-date-picker
               v-model="queryForm.day"
               format="yyyy-MM-dd"

+ 71 - 1
src/views/courseTable/tableList.vue

@@ -425,6 +425,7 @@
   </div>
 </template>
 <script>
+  import { mapGetters } from 'vuex'
   import { transformWeek, transformAuth } from '@/config/key.config'
   import {
     scheduleList,
@@ -443,6 +444,8 @@
   import changeClass from './components/changeClass'
   import changeTeacher from './components/changeTeacher'
   import shenheTip from './components/shenheTip.vue'
+  import axios from 'axios'
+  import { baseURL } from '@/config'
   export default {
     components: {
       addTable,
@@ -464,6 +467,7 @@
         timeSelectList: [], //时间段选择列表
         is_admin: false, //当前用户是否为管理员
         queryForm: {
+          ids: [],
           lesson_name: '',
           teacher_name: '',
           room_id: '',
@@ -494,8 +498,14 @@
             name: '补课',
           },
         ],
+        term_name: localStorage.getItem('term_name'),
       }
     },
+    computed: {
+      ...mapGetters({
+        token: 'user/token',
+      }),
+    },
 
     created() {
       let roles_list = this.$store.state.user.role_list
@@ -761,7 +771,67 @@
       transformAuth,
       //数据导出
       handleExport() {
-        this.$refs['export'].showEdit()
+        // this.$refs['export'].showEdit()
+        this.queryForm.ids = this.selectRows.map((item) => item.id)
+        delete this.queryForm.page
+        delete this.queryForm.per_page
+        this.$confirm('确定导出此筛选条件下的数据吗', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            axios({
+              baseURL: baseURL, // url = base url + request url
+              timeout: 5000, // request timeout
+              method: 'get',
+              url: '/school/schedule/export',
+              headers: {
+                Authorization: `Bearer ${this.token}`,
+              },
+              params: this.queryForm,
+              responseType: 'blob',
+            }).then((response) => {
+              this.convertRes2Blob(response)
+              this.handleClose()
+            })
+          })
+          .catch(() => {})
+      },
+      convertRes2Blob(response) {
+        // 提取文件名
+        // const fileNameList =
+        //   response.headers['content-disposition'].match(/filename=(.*)(.*)/)
+        // console.log(fileNameList, 'Mead')
+        // const fileName = fileNameList[1]
+        let fileName = this.term_name + '' + '教学任务表'
+
+        // 将二进制流转为blob
+        const blob = new Blob([response.data], {
+          type: 'application/vnd.ms-excel',
+        })
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          // 兼容IE,window.navigator.msSaveBlob:以本地方式保存文件
+          window.navigator.msSaveBlob(blob, decodeURI(fileName))
+        } else {
+          // 创建新的URL并指向File对象或者Blob对象的地址
+          const blobURL = window.URL.createObjectURL(blob)
+          // 创建a标签,用于跳转至下载链接
+          const tempLink = document.createElement('a')
+          tempLink.style.display = 'none'
+          tempLink.href = blobURL
+          tempLink.setAttribute('download', decodeURI(fileName))
+          // 兼容:某些浏览器不支持HTML5的download属性
+          if (typeof tempLink.download === 'undefined') {
+            tempLink.setAttribute('target', '_blank')
+          }
+          // 挂载a标签
+          document.body.appendChild(tempLink)
+          tempLink.click()
+          document.body.removeChild(tempLink)
+          // 释放blob URL地址
+          window.URL.revokeObjectURL(blobURL)
+        }
       },
 
       setSelectRows(val) {

+ 3 - 3
src/views/openOrder/components/checkStep.vue

@@ -2,7 +2,7 @@
  * @Author: 阿小凉
  * @Date: 2022-06-30 17:16:35
  * @LastEditTime: 2022-09-28 17:07:05
- * @Description: 
+ * @Description:
  * @LastEditors: 阿小凉
 -->
 <template>
@@ -82,7 +82,7 @@
           >
             <h4>
               实验中心审核
-              <span class="fail">(审核失败)</span>
+              <span class="fail">(被驳回)</span>
             </h4>
             <p>
               审核人:{{
@@ -150,7 +150,7 @@
           >
             <h4>
               信息技术学院审核
-              <span class="fail">(审核失败)</span>
+              <span class="fail">(被驳回)</span>
             </h4>
             <p>
               审核人:{{

+ 2 - 2
src/views/openOrder/orderList.vue

@@ -414,9 +414,9 @@
           { id: 1, name: '待上传实验室开放申请单' },
           { id: 2, name: '待实验中心审核' },
           { id: 3, name: '实验中心审核通过,待院系审核' },
-          { id: 4, name: '实验中心审核失败' },
+          { id: 4, name: '实验中心被驳回' },
           { id: 5, name: '审核成功' },
-          { id: 6, name: '院系审核失败' },
+          { id: 6, name: '院系被驳回' },
           { id: 7, name: '已完成' },
         ], //审核状态列表
         selectRows: [],