mo 5 lat temu
rodzic
commit
d9bab4a777
2 zmienionych plików z 157 dodań i 133 usunięć
  1. 1 1
      package.json
  2. 156 132
      src/views/teamDetail/teamCourseList.vue

+ 1 - 1
package.json

@@ -23,7 +23,7 @@
     "i": "^0.3.6",
     "js-cookie": "2.2.0",
     "linq": "^3.2.2",
-    "node-sass": "^4.14.1",
+    "node-sass": "^4.13.1",
     "normalize.css": "7.0.0",
     "npm": "^6.13.0",
     "nprogress": "0.2.0",

+ 156 - 132
src/views/teamDetail/teamCourseList.vue

@@ -5,171 +5,198 @@
     </h2>
     <div class="m-core">
       <!-- 搜索类型 -->
-      <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
+      <el-form :inline="true"
+               class="searchForm"
+               v-model.trim="searchForm">
         <el-form-item>
           <el-input style="width: 240px"
-            v-model.trim="searchForm.search"
-            @keyup.enter.native="search"
-            placeholder="课程组编号/课堂编号/课程名称"
-          />
+                    v-model.trim="searchForm.search"
+                    @keyup.enter.native="search"
+                    placeholder="课程组编号/课程编号/课程名称" />
         </el-form-item>
         <el-form-item>
-          <el-select v-model.trim="searchForm.schoolId" clearable filterable placeholder="请选择教学点">
-            <el-option
-              v-for="(item, index) in schoolList"
-              :key="index"
-              :value="item.id"
-              :label="item.name"
-            ></el-option>
+          <el-select v-model.trim="searchForm.schoolId"
+                     clearable
+                     filterable
+                     placeholder="请选择教学点">
+            <el-option v-for="(item, index) in schoolList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.name"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select
-            v-model.trim="searchForm.teacherIdList"
-            clearable
-            filterable
-            placeholder="请选择老师"
-          >
-            <el-option
-              v-for="(item, index) in teacherList"
-              :key="index"
-              :value="item.id"
-              :label="item.realName"
-            ></el-option>
+          <el-select v-model.trim="searchForm.teacherIdList"
+                     clearable
+                     filterable
+                     placeholder="请选择老师">
+            <el-option v-for="(item, index) in teacherList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.realName"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select
-            class="multiple"
-            v-model.trim="searchForm.organIdList"
-            filterable
-            clearable
-            placeholder="请选择分部"
-          >
-            <el-option
-              v-for="(item,index) in organList"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+          <el-select class="multiple"
+                     v-model.trim="searchForm.organIdList"
+                     filterable
+                     clearable
+                     placeholder="请选择分部">
+            <el-option v-for="(item,index) in organList"
+                       :key="index"
+                       :label="item.name"
+                       :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select v-model.trim="searchForm.courseType" clearable filterable placeholder="课程类型">
-            <el-option
-              v-for="(item, index) in courseType"
-              :key="index"
-              :value="item.value"
-              :label="item.label"
-            ></el-option>
+          <el-select v-model.trim="searchForm.courseType"
+                     clearable
+                     filterable
+                     placeholder="课程类型">
+            <el-option v-for="(item, index) in courseType"
+                       :key="index"
+                       :value="item.value"
+                       :label="item.label"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select v-model.trim="searchForm.courseStatus" clearable filterable placeholder="课程状态">
-            <el-option label="未开始" value="NOT_START"></el-option>
-            <el-option label="进行中" value="UNDERWAY"></el-option>
-            <el-option label="已结束" value="OVER"></el-option>
+          <el-select v-model.trim="searchForm.courseStatus"
+                     clearable
+                     filterable
+                     placeholder="课程状态">
+            <el-option label="未开始"
+                       value="NOT_START"></el-option>
+            <el-option label="进行中"
+                       value="UNDERWAY"></el-option>
+            <el-option label="已结束"
+                       value="OVER"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-date-picker
-            v-model.trim="searchForm.timer"
-            style="width:420px;"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          ></el-date-picker>
+          <el-date-picker v-model.trim="searchForm.timer"
+                          style="width:420px;"
+                          type="daterange"
+                          value-format="yyyy-MM-dd"
+                          range-separator="至"
+                          start-placeholder="开始日期"
+                          end-placeholder="结束日期"></el-date-picker>
         </el-form-item>
         <el-form-item>
-          <div class="searchBtn" @click="search">搜索</div>
+          <div class="searchBtn"
+               @click="search">搜索</div>
         </el-form-item>
         <el-form-item>
-          <div
-            class="searchBtn exportBtn"
-            v-permission="'export/superFindCourseSchedules'"
-            @click="onCourseExport"
-          >导出课表</div>
+          <div class="searchBtn exportBtn"
+               v-permission="'export/superFindCourseSchedules'"
+               @click="onCourseExport">导出课表</div>
         </el-form-item>
       </el-form>
       <div class="btnWraps"></div>
       <!-- 列表 -->
       <div class="tableWrap">
-        <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-          <el-table-column align="center" prop="organName" label="分部名称"></el-table-column>
-          <el-table-column align="center" prop="id" label="课程编号"></el-table-column>
-          <el-table-column align="center" width="200px" label="时间">
-            <template
-              slot-scope="scope"
-            >{{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}</template>
+        <el-table :data="tableList"
+                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column align="center"
+                           prop="organName"
+                           label="分部名称"></el-table-column>
+          <el-table-column align="center"
+                           prop="id"
+                           label="课程编号"></el-table-column>
+          <el-table-column align="center"
+                           width="200px"
+                           label="时间">
+            <template slot-scope="scope">{{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}</template>
           </el-table-column>
           <!-- <el-table-column align="center" prop="groupName" label="乐团/VIP名"></el-table-column> -->
           <!-- <el-table-column align="center" prop="classGroupName" label="班级名称"></el-table-column> -->
-          <el-table-column align="center" prop="studentId" label="学生ID">
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="学生ID">
             <template slot-scope="scope">
               <div v-if="scope.row.groupType != 'MUSIC'">{{scope.row.studentId}}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="subjectName" label="声部"></el-table-column>
-          <el-table-column align="center" prop="name" label="课程名称"></el-table-column>
-          <el-table-column align="center" label="课程类型">
+          <el-table-column align="center"
+                           prop="subjectName"
+                           label="声部"></el-table-column>
+          <el-table-column align="center"
+                           prop="name"
+                           label="课程名称"></el-table-column>
+          <el-table-column align="center"
+                           label="课程类型">
             <template slot-scope="scope">
               <div>{{ scope.row.type | coursesType}}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="教学模式">
+          <el-table-column align="center"
+                           label="教学模式">
             <template slot-scope="scope">
               <div>{{ scope.row.teachMode | teachMode}}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="schoolName" label="教学点">
+          <el-table-column align="center"
+                           prop="schoolName"
+                           label="教学点">
             <template slot-scope="scope">
               <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="courseScheduleStatus" label="课程状态">
+          <el-table-column align="center"
+                           prop="courseScheduleStatus"
+                           label="课程状态">
             <template slot-scope="scope">
               <div>{{ scope.row.status | coursesStatus }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="是否签到">
+          <el-table-column align="center"
+                           label="是否签到">
             <template slot-scope="scope">
               <div>{{ scope.row.isSignIn | attendanceType}}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="是否签退" fixed="right">
+          <el-table-column align="center"
+                           label="是否签退"
+                           fixed="right">
             <template slot-scope="scope">
               <div>{{ scope.row.isSignOut | attendanceOutType}}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="isCallNames" label="是否点名" fixed="right">
+          <el-table-column align="center"
+                           prop="isCallNames"
+                           label="是否点名"
+                           fixed="right">
             <template slot-scope="scope">{{ scope.row.isCallNames ? '是' : '否' }}</template>
           </el-table-column>
-          <el-table-column align="center" prop="teacherName" label="指导老师" fixed="right"></el-table-column>
-          <el-table-column align="center" label="详情" fixed="right" width="120px">
+          <el-table-column align="center"
+                           prop="teacherName"
+                           label="指导老师"
+                           fixed="right"></el-table-column>
+          <el-table-column align="center"
+                           label="详情"
+                           fixed="right"
+                           width="120px">
             <template slot-scope="scope">
               <div>
-                <el-button type="text" v-if="permission('teamCourseList/details')" @click="lookDetail(scope.row)">详情</el-button>
+                <el-button type="text"
+                           v-if="permission('teamCourseList/details')"
+                           @click="lookDetail(scope.row)">详情</el-button>
               </div>
             </template>
           </el-table-column>
         </el-table>
-        <pagination
-          :total="rules.total"
-          :page.sync="rules.page"
-          :limit.sync="rules.limit"
-          :page-sizes="rules.page_size"
-          @pagination="getList"
-        />
+        <pagination :total="rules.total"
+                    :page.sync="rules.page"
+                    :limit.sync="rules.limit"
+                    :page-sizes="rules.page_size"
+                    @pagination="getList" />
       </div>
     </div>
-    <el-dialog
-      title="课表详情"
-      :visible.sync="classVisible"
-      :before-close="closeClassVisible"
-      width="1000px">
-      <el-form :model="maskForm" :inline="true">
+    <el-dialog title="课表详情"
+               :visible.sync="classVisible"
+               :before-close="closeClassVisible"
+               width="1000px">
+      <el-form :model="maskForm"
+               :inline="true">
         <el-form-item label="老师姓名">
           <!-- <el-input v-model.trim="maskForm.teacherName"
           disabled></el-input>-->
@@ -210,18 +237,14 @@
         <el-form-item label="签到状态">
           <!-- <el-input :value=" maskForm.isSignIn | attendanceType"
           disabled></el-input>-->
-          <div
-            class="inputStyle"
-            :class="maskForm.isSignIn==1?'':'red'"
-          >{{ maskForm.isSignIn | attendanceType}}</div>
+          <div class="inputStyle"
+               :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignIn | attendanceType}}</div>
         </el-form-item>
         <el-form-item label="签退状态">
           <!-- <el-input :value=" maskForm.isSignOut | attendanceOutType"
           disabled></el-input>-->
-          <div
-            class="inputStyle"
-            :class="maskForm.isSignIn==1?'':'red'"
-          >{{ maskForm.isSignOut | attendanceOutType}}</div>
+          <div class="inputStyle"
+               :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignOut | attendanceOutType}}</div>
         </el-form-item>
         <el-form-item label="备注">
           <!-- <el-input :value=" maskForm.isSignOut | attendanceOutType"
@@ -229,33 +252,34 @@
           <div class="inputStyle">{{ maskForm.remark}}</div>
         </el-form-item>
       </el-form>
-      <el-tabs
-        v-model.trim="activeName"
-        v-if="maskForm.status != 'NOT_START'"
-        type="card"
-        @tab-click="handleClick"
-      >
-        <el-tab-pane label="点名" name="first">
+      <el-tabs v-model.trim="activeName"
+               v-if="maskForm.status != 'NOT_START'"
+               type="card"
+               @tab-click="handleClick">
+        <el-tab-pane label="点名"
+                     name="first">
           <div v-if="activeName == 'first'">
             <!-- studentRollCall  -->
             <studentRollCall :courseScheduleId="maskForm.id"></studentRollCall>
           </div>
         </el-tab-pane>
-        <el-tab-pane label="GPS定位" v-if="maskForm.teachMode == 'OFFLINE'" name="second">
+        <el-tab-pane label="GPS定位"
+                     v-if="maskForm.teachMode == 'OFFLINE'"
+                     name="second">
           <div v-if="activeName == 'second'">
             <gpsLoction :courseScheduleId="maskForm.id"></gpsLoction>
           </div>
         </el-tab-pane>
-        <el-tab-pane label="作业" v-if="maskForm.type != 'VIP'" name="third">
+        <el-tab-pane label="作业"
+                     v-if="maskForm.type != 'VIP'"
+                     name="third">
           <div v-if="activeName == 'third'">
             <studentWork :courseScheduleId="maskForm.id"></studentWork>
           </div>
         </el-tab-pane>
-        <el-tab-pane
-          label="评论"
-          v-if="maskForm.type == 'VIP' || maskForm.type == 'PRACTICE'"
-          name="four"
-        >
+        <el-tab-pane label="评论"
+                     v-if="maskForm.type == 'VIP' || maskForm.type == 'PRACTICE'"
+                     name="four">
           <div v-if="activeName == 'four'">
             <courseEvaluate :courseScheduleId="maskForm.id"></courseEvaluate>
           </div>
@@ -290,7 +314,7 @@ nowTime =
   "-" +
   nowTime.getDate();
 export default {
-  data() {
+  data () {
     return {
       classVisible: false,
       timerVisible: false,
@@ -330,14 +354,14 @@ export default {
     studentWork,
     courseEvaluate
   },
-  activated() {
+  activated () {
     this.init();
   },
-  mounted() {
+  mounted () {
     this.init();
   },
   methods: {
-    init() {
+    init () {
       this.getList();
       // 获取所有老师
       getTeacher().then(res => {
@@ -359,15 +383,15 @@ export default {
         }
       });
     },
-    permission(str, parent) {
+    permission (str, parent) {
       return permission(str, parent);
     },
-    
-    search() {
+
+    search () {
       this.rules.page = 1;
       this.getList();
     },
-    onCourseExport() {
+    onCourseExport () {
       // 课表导出
       let searchForm = this.searchForm;
       if (!searchForm.timer || searchForm.timer.length <= 0) {
@@ -433,9 +457,9 @@ export default {
               load.endLoading();
             });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
-    getList() {
+    getList () {
       let searchForm = this.searchForm;
       if (!searchForm.timer || searchForm.timer.length <= 0) {
         searchForm.timer = [];
@@ -462,22 +486,22 @@ export default {
         }
       });
     },
-    lookDetail(row) {
+    lookDetail (row) {
       this.maskForm = row;
       this.activeName = "first";
       // console.log(row)
       this.classVisible = true;
     },
-    handleClick(tab, event) {
+    handleClick (tab, event) {
       // console.log(tab, event);
     },
-    closeClassVisible() {
+    closeClassVisible () {
       this.activeName = null;
       this.classVisible = false;
     }
   },
   filters: {
-    isCall(val) {
+    isCall (val) {
       if (val == 0) {
         return "未点名";
       } else if (val == 1) {