فهرست منبع

系统导入页面

natasha 1 سال پیش
والد
کامیت
acd1a2af28

+ 5 - 0
src/router/index.js

@@ -134,6 +134,11 @@ export const constantRoutes = [{
         component: () =>
             import ('@/views/content_manage/newspaper_manage/ChannelList.vue')
     },
+    {
+        path: '/checkCourse',
+        component: () =>
+            import ('@/views/content_manage/course_manage/CheckLBCourse.vue')
+    },
     // 404 page must be placed at the end !!!
     { path: '*', redirect: '/', hidden: true }
 ]

+ 2 - 1
src/store/index.js

@@ -56,7 +56,8 @@ const store = new Vuex.Store({
                 bg: '#00B42A',
                 color: ''
             }
-        }
+        },
+        file_preview_url: 'https://docpreview.utschool.cn',
     },
     mutations: {
         setStudyTypeAll(state, data) {

+ 154 - 0
src/views/content_manage/course_manage/CheckLBCourse.vue

@@ -0,0 +1,154 @@
+<template>
+  <div class="check-course">
+    <div class="navBar" v-if="info">
+        <div class="navBar-left">
+            <a class="goback" @click="$router.go(-1)"><i class="el-icon-arrow-left"></i>课程详情</a>
+            <div class="border"></div>
+            <p>{{info.name}}</p>
+        </div>
+        <div class="navBar-right">
+            <el-button @click="handleCheck('true')" type="primary" size="small">审核通过</el-button>
+            <el-button @click="handleCheck('false')" type="danger" size="small" plain>驳回</el-button>
+        </div>
+    </div>
+    <h1 style="padding: 300px 0; text-align:center">还没有详情接口,有接口后补充页面信息</h1>
+  </div>
+</template>
+
+<script>
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+//例如:import 《组件名称》from ‘《组件路径》';
+import { getLogin } from "@/api/ajax";
+
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: { },
+  props: {},
+  filters:{
+    
+  },
+  data() {
+    //这里存放数据
+    return {
+        info: null,
+        id: this.$route.query.id?this.$route.query.id:'',
+    }
+  },
+  //计算属性 类似于data概念
+  computed: {
+    
+  },
+  //监控data中数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    // 审核
+    handleCheck(type){
+        let Mname = "/CourseServer/Manager/LBCourseManager/AuditLBCourse";
+        let data = {
+            id: this.id,
+            is_pass: type
+        };
+        getLogin(Mname, data).then(res => {
+            this.$message.success("操作成功");
+            this.$router.go(-1)
+        });
+    },
+    // 获取课程信息
+    getInfo(){
+        let MethodName = "/CourseServer/Manager/LBCourseManager/GetLBCourseInfo";
+        let data = {
+            id: this.id,
+            is_contain_cs_item:'true'
+        }
+        getLogin(MethodName, data)
+        .then((res) => {
+            if(res.status===1){
+                this.info = res.lb_course
+            }
+        })
+        .catch(() => {
+            this.loading = false
+        });
+    }
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.getInfo()
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+
+  },
+  //生命周期-创建之前
+  beforeCreated() { },
+  //生命周期-挂载之前
+  beforeMount() { },
+  //生命周期-更新之前
+  beforUpdate() { },
+  //生命周期-更新之后
+  updated() { },
+  //生命周期-销毁之前
+  beforeDestory() { },
+  //生命周期-销毁完成
+  destoryed() { },
+  //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() { }
+}
+</script>
+<style lang="scss" scoped>
+/* @import url(); 引入css类 */
+.navBar {
+    background: #fff;
+    padding: 8px 24px;
+    border-bottom: 1px solid #EBEBEB;
+    display: flex;
+    justify-content: space-between;
+    height: 56px;
+    align-items: center;
+    position: fixed;
+    width: 100%;
+    left: 0;
+    top: 0;
+    z-index: 3;
+    &-left {
+        display: flex;
+        align-items: center;
+        p {
+            margin: 0 12px;
+            font-weight: 400;
+            font-size: 14px;
+            line-height: 22px;
+            color: #86909C;
+        }
+    }
+    &-right {
+        a {
+            padding: 6px 8px;
+        }
+        .svg-icon {
+            width: 16px;
+            height: 16px;
+            margin-right: 8px;
+            &.icon-like {
+                color: rgba(0, 0, 0, 0.56);
+            }
+        }
+    }
+    .goback {
+        font-weight: 500;
+        font-size: 20px;
+        line-height: 28px;
+        color: #1D2129;
+        padding-right: 12px;
+        .el-icon-arrow-left {
+            margin-right: 8px;
+        }
+    }
+    .border {
+        width: 1px;
+        height: 20px;
+        background: #E5E6EB;
+    }
+}
+</style>

+ 1 - 1
src/views/content_manage/course_manage/CreateLive.vue

@@ -60,7 +60,7 @@
                             v-model="organizeForm.startData"
                             type="datetime"
                             placeholder="选择日期"
-                            value-format="yyyy-MM-dd HH:mm:ss"
+                            value-format="yyyy-MM-dd HH:mm"
                             format="yyyy-MM-dd HH:mm">
                         </el-date-picker>
                     </el-form-item>

+ 1 - 3
src/views/content_manage/course_manage/CreateRecorded.vue

@@ -383,7 +383,6 @@ export default {
         itemsId: null, // 课节id
         resourceUrl: '', // 课节资源预览地址
         resourceFlag: false,
-        file_preview_url: 'https://docpreview.utschool.cn',
         loading: false,
         player: null,
         audio: {
@@ -397,7 +396,7 @@ export default {
   },
   //计算属性 类似于data概念
   computed: {
-    ...mapState(['$studyType']),
+    ...mapState(['$studyType', 'file_preview_url']),
   },
   //监控data中数据变化
   watch: {
@@ -793,7 +792,6 @@ export default {
     handleLoadAudio(){
         let _this = this;
         let audio = document.getElementsByTagName("audio");
-        console.log(audio)
         audio[0].addEventListener("play", function () {
             _this.audio.playing = true;
             _this.audio.loading = false;

+ 4 - 3
src/views/content_manage/course_manage/LiveCourse.vue

@@ -328,22 +328,23 @@ export default {
         let data = {
             id: row.id
         };
-        this.$confirm('审核', '提示', {
+        this.$confirm('审核', '', {
           confirmButtonText: '审核通过',
           cancelButtonText: '驳回',
+          showClose: false,
           type: 'warning'
         }).then(() => {
             data.is_pass = "true";
             updataData.status = 1;
             getLogin(Mname, data).then(res => {
-                this.$message.success("操作成功");
+                this.$message.success("已审核通过");
                 this.$set(this.tableData, index, updataData);
             });
         }).catch(() => {
             data.is_pass = "false";
             updataData.status = 3;
             getLogin(Mname, data).then(res => {
-                this.$message.success("操作成功");
+                this.$message.success("已驳回");
                 this.$set(this.tableData, index, updataData);
             });      
         });

+ 32 - 24
src/views/content_manage/course_manage/RecordedCourse.vue

@@ -392,30 +392,38 @@ export default {
     },
     // 审核
     handleCheck(row, index){
-        let Mname = "/CourseServer/Manager/LBCourseManager/AuditLBCourse";
-        let updataData = JSON.parse(JSON.stringify(row));
-        let data = {
-            id: row.id
-        };
-        this.$confirm('审核', '提示', {
-          confirmButtonText: '审核通过',
-          cancelButtonText: '驳回',
-          type: 'warning'
-        }).then(() => {
-            data.is_pass = "true";
-            updataData.status = 1;
-            getLogin(Mname, data).then(res => {
-                this.$message.success("操作成功");
-                this.$set(this.tableData, index, updataData);
-            });
-        }).catch(() => {
-            data.is_pass = "false";
-            updataData.status = 3;
-            getLogin(Mname, data).then(res => {
-                this.$message.success("操作成功");
-                this.$set(this.tableData, index, updataData);
-            });      
-        });
+        window.localStorage.setItem('pageSize',this.pageSize)
+        window.localStorage.setItem('pageNumber',this.pageNumber)
+        this.$router.push({
+            path: '/checkCourse',
+            query: {
+                id: row.id
+            }
+        })
+        // let Mname = "/CourseServer/Manager/LBCourseManager/AuditLBCourse";
+        // let updataData = JSON.parse(JSON.stringify(row));
+        // let data = {
+        //     id: row.id
+        // };
+        // this.$confirm('审核', '提示', {
+        //   confirmButtonText: '审核通过',
+        //   cancelButtonText: '驳回',
+        //   type: 'warning'
+        // }).then(() => {
+        //     data.is_pass = "true";
+        //     updataData.status = 1;
+        //     getLogin(Mname, data).then(res => {
+        //         this.$message.success("操作成功");
+        //         this.$set(this.tableData, index, updataData);
+        //     });
+        // }).catch(() => {
+        //     data.is_pass = "false";
+        //     updataData.status = 3;
+        //     getLogin(Mname, data).then(res => {
+        //         this.$message.success("操作成功");
+        //         this.$set(this.tableData, index, updataData);
+        //     });      
+        // });
     },
     //计算table高度(动态设置table高度)
     getTableHeight() {

+ 3 - 3
src/views/organize_manage/BatchImport.vue

@@ -61,7 +61,7 @@
         <template v-else>
             <div class="log-box" v-if="resultData">
                 <p>上传文件 {{fileList[0].name}}</p>
-                <p>用时 {{realFormatSecond(uploadTime)}}</p>
+                <p>用时 {{realFormatSecond(uploadTime+resultData.execute_duration)}}</p>
                 <p>成功上传 <span class="color-green">{{resultData.success_count}}</span> 条记录,失败 <span class="color-red">{{resultData.error_count}}</span> 条</p>
                 <div class="border"></div>
                 <p :class="[item.is_success==='true'?'color-green':'color-red']" v-for="(item,index) in execute_log_list" :key="index">
@@ -72,7 +72,7 @@
     </div>
     <div class="batch-box-bottom">
         <template v-if="tabsIndex===0">
-            <a class="downLoad" target="_blank" :href="''">下载模板</a>
+            <a class="downLoad" target="_blank" :href="exportUrl">下载模板</a>
             <div class="btn-box">
                 <el-button @click="closeDialog" size="small">取消</el-button>
                 <el-button type="primary" :key="3" :disabled="!uploadFlag&&!file_id||(resultData&&resultData.is_finish==='true')" v-if="!uploading&&!isStop&&(resultData&&resultData.is_finish==='true'||!resultData)" @click="handleUpload" v-loading="loading"><svg-icon icon-class="upload"></svg-icon>开始上传</el-button>
@@ -95,7 +95,7 @@ import { getLogin } from "@/api/ajax";
 export default {
   components: {},
   name: "batchImport",
-  props: [""],
+  props: ["exportUrl"],
   data() {
     return {
       tabsIndex: 0,

+ 11 - 22
src/views/organize_manage/PersonList.vue

@@ -337,7 +337,7 @@
         width="398px"
         class="login-dialog person-dialog"
         v-if="importFlag">
-        <batch-import @closeDialog="closeDialog"></batch-import>
+        <batch-import @closeDialog="closeDialog" :exportUrl="exportUrl"></batch-import>
     </el-dialog>
   </div>
 </template>
@@ -459,7 +459,8 @@ export default {
         info: null, 
         total_count: 0,
         dataSort: {},
-        dataSorts: {}
+        dataSorts: {},
+        exportUrl: '', // 下载模板链接
     }
   },
   //计算属性 类似于data概念
@@ -701,6 +702,14 @@ export default {
         .catch(() => {
             
         });
+        getLogin('/OrgServer/Manager/SysConfigManager/GetSysConfig_DataImport', {})
+        .then((res) => {
+            if(res.status===1){
+                this.exportUrl = res.person_data_import_template_file_url
+            }
+        }).catch((res) =>{
+            
+        })
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -709,27 +718,7 @@ export default {
     this.getTableHeight();
     if(this.id){
         this.getInfo()
-    }else{
-        this.breadcrumbList=[
-            {
-                icon:'school-line',
-                url:'',
-                text:''
-            },
-            {
-                icon:'',
-                url:'',
-                text:'机构管理'
-            }
-        ]
-        let obj = {
-            icon:'',
-            url:'',
-            text:'青岛科技大学'
-        }
-        this.breadcrumbList.push(obj)
     }
-    
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {

+ 11 - 11
src/views/system_config/EmailSetting.vue

@@ -151,17 +151,17 @@ export default {
     // 得到配置信息
     getInfo(){
         let MethodName = "/OrgServer/Manager/SysConfigManager/GetSysConfig_Mailbox";
-            getLogin(MethodName, {})
-            .then((res) => {
-                if(res.status===1){
-                    this.registerForm.email = res.address
-                    this.registerForm.smtp = res.smtp,
-                    this.registerForm.emailName = res.user_name,
-                    this.registerForm.newPwd = res.password
-                }
-            }).catch((res) =>{
-                
-            })
+        getLogin(MethodName, {})
+        .then((res) => {
+            if(res.status===1){
+                this.registerForm.email = res.address
+                this.registerForm.smtp = res.smtp,
+                this.registerForm.emailName = res.user_name,
+                this.registerForm.newPwd = res.password
+            }
+        }).catch((res) =>{
+            
+        })
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 119 - 8
src/views/system_config/ExportSetting.vue

@@ -9,7 +9,13 @@
                 <h3>导入配置</h3>
                 <el-form :model="registerForm" ref="registerForm" label-width="100px" class="registerForm" label-position="top">
                     <el-form-item label="人员导入模板" prop="resource">
-                        <upload :datafileList="registerForm.resource" :changeFillId="handleAvatarSuccess" :fileName="'courseResource'" :filleNumber="1" :uploadType="'xls'" />
+                        <upload :datafileList="registerForm.resource" :changeFillId="handleAvatarSuccess" :fileName="'courseResource'" :filleNumber="1" :uploadType="'xls'" :showList="true" />
+                        <ul v-if="registerForm.resource.length>0" class="resource-list">
+                            <li v-for="(itemR,indexR) in registerForm.resource" :key="indexR">
+                                <a @click="handlePreview(itemR)"><svg-icon icon-class="xlsx" class="icon-logo"></svg-icon><span>{{itemR.name}}</span></a>
+                                <i class="el-icon-delete" @click="handleDelResource(indexR)"></i>
+                            </li>
+                        </ul>
                     </el-form-item>
                     <el-form-item>
                         <el-button type="primary" @click="onSubmit('registerForm')" size="small" :loading="loading">保存</el-button>
@@ -19,6 +25,20 @@
             </div>
         </div>
     </div>
+    <el-dialog
+        :visible.sync="resourceFlag"
+        :show-close="true"
+        :close-on-click-modal="false"
+        :modal-append-to-body="false"
+        width="1000px"
+        class="login-dialog"
+        v-if="resourceFlag">
+        <iframe
+          :src="resourceUrl"
+          width="100%"
+          height="600px"
+        ></iframe>
+    </el-dialog>
   </div>
 </template>
 
@@ -30,6 +50,8 @@ import NavMenu from "../../components/NavMenu.vue"
 import Breadcrumb from '../../components/Breadcrumb.vue';
 import Upload from "../../components/Upload.vue"
 import { getLogin } from "@/api/ajax";
+import { mapState } from 'vuex';
+const Base64 = require("js-base64").Base64;
 
 export default {
   //import引入的组件需要注入到对象中才能使用
@@ -62,12 +84,14 @@ export default {
             file_id: '',
             file_url: ''
         },
-        loading: false
+        loading: false,
+        resourceUrl: '', // 课节资源预览地址
+        resourceFlag: false,
     }
   },
   //计算属性 类似于data概念
   computed: {
-    
+    ...mapState(['file_preview_url']),
   },
   //监控data中数据变化
   watch: {
@@ -87,12 +111,9 @@ export default {
         this.$refs[formName].validate((valid) => {
           if (valid) {
             this.loading = true
-            let MethodName = "/OrgServer/Manager/SysUserManager/UpdateSysUser_BaseInfo";
+            let MethodName = "/OrgServer/Manager/SysConfigManager/SetSysConfig_DataImport";
             let data = {
-                email: this.registerForm.email,
-                smtp: this.registerForm.smtp,
-                emailName: this.registerForm.emailName,
-                newPwd: this.registerForm.newPwd
+                person_data_import_template_file_id: this.registerForm.file_id
             }
             getLogin(MethodName, data)
             .then((res) => {
@@ -117,9 +138,57 @@ export default {
         this.registerForm.file_id = fileList[0]&&fileList[0].response&&fileList[0].response.file_info_list&&fileList[0].response.file_info_list[0]?fileList[0].response.file_info_list[0].file_id:''
         this.registerForm.file_url = fileList[0]&&fileList[0].response&&fileList[0].response.file_info_list&&fileList[0].response.file_info_list[0]?fileList[0].response.file_info_list[0].file_url:''
     },
+    // 预览文件
+    handlePreview(){
+        let MethodName = '/FileServer/GetFileInfo'
+        let data = {
+            file_id: this.registerForm.file_id
+        }
+        getLogin(MethodName, data)
+        .then((res) => {
+            if(res.status===1){
+                let path =
+                `${this.file_preview_url}/onlinePreview?url=` +
+                Base64.encode(res.file_url);
+                this.resourceUrl = path;
+                this.resourceFlag = true
+            }
+        })
+        
+    },
+    // 删除资源文件
+    handleDelResource(i){
+        this.$confirm("确定删除吗?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+        }).then(() => {
+            this.registerForm.resource.splice(i, 1);
+        });
+    },
+    // 得到信息
+    getInfo(){
+        let MethodName = "/OrgServer/Manager/SysConfigManager/GetSysConfig_DataImport";
+        getLogin(MethodName, {})
+        .then((res) => {
+            if(res.status===1){
+                this.registerForm.file_id = res.person_data_import_template_file_id
+                this.registerForm.file_url = res.person_data_import_template_file_url,
+                this.registerForm.resource = [
+                    {
+                        id: res.person_data_import_template_file_id,
+                        name: res.person_data_import_template_file_name
+                    }
+                ]
+            }
+        }).catch((res) =>{
+            
+        })
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    this.getInfo()
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -158,6 +227,48 @@ export default {
         color: #1D2129;
     }
 }
+.resource-list{
+    list-style: none;
+    margin: 12px 0;
+    padding: 0;
+    li{
+        display: flex;
+        align-items: center;
+        margin-bottom: 16px;
+        a{
+            width: 360px;
+            padding: 7px 12px;
+            background: #F7F8FA;
+            border-radius: 2px;
+            color: #1D2129;
+            display: flex;
+            align-items: center;
+            span{
+                overflow:hidden;
+                text-overflow:ellipsis;
+                white-space: nowrap;
+                flex: 1;
+                display: block;
+                font-size: 14px;
+                line-height: 22px;
+            }
+            .svg-icon{
+                width: 16px;
+                height: 16px;
+                margin-right: 8px;
+                color: #4E5969;
+            }
+        }
+        .el-icon-delete{
+            color: #4E5969;
+            cursor: pointer;
+            margin-left: 12px;
+            &:hover{
+                color: #165DFF;
+            }
+        }
+    }
+}
 </style>
 
 <style lang="scss">