mo пре 4 година
родитељ
комит
bc0d97026b
2 измењених фајлова са 49 додато и 31 уклоњено
  1. 46 29
      src/views/teamDetail/teamCourseList.vue
  2. 3 2
      vue.config.js

+ 46 - 29
src/views/teamDetail/teamCourseList.vue

@@ -22,7 +22,7 @@
       >
         <el-form-item>
           <el-input
-          type="number"
+            type="number"
             v-model.trim="searchForm.courseIdSearch"
             clearable
             placeholder="课程编号"
@@ -332,18 +332,23 @@
             width="130px"
           >
             <template slot-scope="scope">
-              {{
-                scope.row.newCourseId > 0 &&
-                scope.row.newCourseId == scope.row.id
-                  ? "合并课"
-                  : null
-              }}
-              {{
-                scope.row.newCourseId > 0 &&
-                scope.row.newCourseId != scope.row.id
-                  ? "被合并课"
-                  : null
-              }}
+              <div>
+                <span
+                  v-if="
+                    scope.row.newCourseId > 0 &&
+                    scope.row.newCourseId == scope.row.id
+                  "
+                  >合并课
+                </span>
+                <el-button
+                  type="text"
+                  @click="common(scope.row)"
+                  v-if=" scope.row.newCourseId > 0 &&
+                  scope.row.newCourseId != scope.row.id"
+                >
+                  被合并课
+                </el-button>
+              </div>
             </template>
           </el-table-column>
           <el-table-column
@@ -364,14 +369,14 @@
           >
             <template slot-scope="scope">
               <div>
-                <!-- <el-button
+                <el-button
                   type="text"
                   @click="removeCourse(scope.row)"
                   v-permission="
                     'courseSchedule/batchDelete?page=teamCourseList'
                   "
                   >删除</el-button
-                > -->
+                >
                 <el-button
                   type="text"
                   v-if="permission('teamCourseList/details')"
@@ -387,13 +392,7 @@
                   @click="resetClass(scope.row)"
                   >调整</el-button
                 >
-                <el-button
-                  type="text"
-                  @click="common(scope.row)"
-                  v-if="scope.row.newCourseId > 0"
-                >
-                  合并课
-                </el-button>
+
                 <el-button
                   type="text"
                   @click="addCompound(scope.row)"
@@ -526,10 +525,28 @@
           </div>
         </el-form-item>
         <el-form-item label="学员考勤" v-if="maskForm.status != 'NOT_START'">
-          <div class="inputStyle" :class="maskForm.errorAttendanceNum != 0 ? 'red' : null">{{ maskForm.errorAttendanceNum != 0 ? '异常' : '正常' }}</div>
+          <div
+            class="inputStyle"
+            :class="maskForm.errorAttendanceNum != 0 ? 'red' : null"
+          >
+            {{ maskForm.errorAttendanceNum != 0 ? "异常" : "正常" }}
+          </div>
         </el-form-item>
         <el-form-item label="老师考勤" v-if="maskForm.status != 'NOT_START'">
-          <div class="inputStyle" :class="maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1? null : 'red'">{{ maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1 ? '正常' : '异常' }}</div>
+          <div
+            class="inputStyle"
+            :class="
+              maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1
+                ? null
+                : 'red'
+            "
+          >
+            {{
+              maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1
+                ? "正常"
+                : "异常"
+            }}
+          </div>
         </el-form-item>
         <el-form-item v-if="maskForm.school" label="教学点">
           {{ maskForm.school.name }}
@@ -669,7 +686,7 @@ const initSearch = {
   teacherIdList: null, // 老师编号
   schoolId: null, // 教学点编号
   creatTimer: [],
-  courseIdSearch:null
+  courseIdSearch: null,
 };
 export default {
   data() {
@@ -769,8 +786,8 @@ export default {
       this.searchForm.timer = [nowTime, nowTime];
       this.getList();
     },
-    async removeCourse() {
-      if (this.deleteList.length < 1) {
+    async removeCourse(row) {
+      if (this.deleteList.length < 1 && !row) {
         this.$message.error("请自少选择一个班级");
         return;
       }
@@ -778,7 +795,7 @@ export default {
       let arr = this.deleteList.map((course) => {
         return course.id;
       });
-      let courseScheduleIds = arr.join(",");
+      let courseScheduleIds = arr.join(",") || row.id;
       try {
         await this.$confirm("是否确认删除此数据?", "提示", {
           type: "warning",
@@ -804,7 +821,7 @@ export default {
       this.searchForm = {
         ...initSearch,
         timer: [],
-        search: row.newCourseId,
+        courseIdSearch: row.newCourseId,
       };
       this.search();
     },

+ 3 - 2
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 测试服
-let target = 'https://test.dayaedu.com' //开发环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -63,6 +63,7 @@ module.exports = {
       // http://192.168.3.28:8000
       // http://192.168.3.134
       // http://47.114.176.40:8000
+      // let target = 'http://dev.dayaedu.com'
       '/api-auth': {
         target: 'https://test.dayaedu.com',
         changeOrigin: true,