瀏覽代碼

Merge branch 'master' of http://gcls-git.helxsoft.cn/dsy/gcls_sys_learn_web

dusenyao 4 年之前
父節點
當前提交
d2e463cad7

+ 202 - 108
.eslintrc.js

@@ -1,6 +1,11 @@
 module.exports = {
   root: true,
 
+  parserOptions: {
+    parser: 'babel-eslint',
+    sourceType: 'module'
+  },
+
   env: {
     node: true,
     browser: true,
@@ -9,10 +14,6 @@ module.exports = {
 
   extends: ['plugin:vue/strongly-recommended', 'eslint:recommended', '@vue/prettier'],
 
-  parserOptions: {
-    parser: 'babel-eslint'
-  },
-
   rules: {
     'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
@@ -30,17 +31,211 @@ module.exports = {
         printWidth: 100
       }
     ],
+    'vue/max-attributes-per-line': [
+      2,
+      {
+        singleline: 10,
+        multiline: {
+          max: 1,
+          allowFirstLine: false
+        }
+      }
+    ],
+    'vue/singleline-html-element-content-newline': 'off',
+    'vue/multiline-html-element-content-newline': 'off',
+    'vue/name-property-casing': ['error', 'PascalCase'],
+    'vue/no-v-html': 'off',
+    'accessor-pairs': 2,
+    'arrow-spacing': [
+      2,
+      {
+        before: true,
+        after: true
+      }
+    ],
+    'block-spacing': [2, 'always'],
+    'brace-style': [
+      2,
+      '1tbs',
+      {
+        allowSingleLine: true
+      }
+    ],
+    camelcase: [
+      0,
+      {
+        properties: 'always'
+      }
+    ],
+    'comma-dangle': [2, 'never'],
+    'comma-spacing': [
+      2,
+      {
+        before: false,
+        after: true
+      }
+    ],
+    'comma-style': [2, 'last'],
+    'constructor-super': 2,
+    curly: [2, 'multi-line'],
+    'dot-location': [2, 'property'],
+    'eol-last': 2,
+    eqeqeq: ['error', 'always', { null: 'ignore' }],
+    'generator-star-spacing': [
+      2,
+      {
+        before: true,
+        after: true
+      }
+    ],
+    'handle-callback-err': [2, '^(err|error)$'],
+    indent: [
+      2,
+      2,
+      {
+        SwitchCase: 1
+      }
+    ],
+    'jsx-quotes': [2, 'prefer-single'],
+    'key-spacing': [
+      2,
+      {
+        beforeColon: false,
+        afterColon: true
+      }
+    ],
+    'keyword-spacing': [
+      2,
+      {
+        before: true,
+        after: true
+      }
+    ],
+    'new-cap': [
+      2,
+      {
+        newIsCap: true,
+        capIsNew: false
+      }
+    ],
+    'no-caller': 2,
+    'no-control-regex': 0,
+    'no-dupe-class-members': 2,
+    'no-empty-pattern': 2,
+    'no-eval': 2,
+    'no-fallthrough': 2,
+    'no-labels': [
+      2,
+      {
+        allowLoop: false,
+        allowSwitch: false
+      }
+    ],
+    'no-mixed-spaces-and-tabs': 2,
+    'no-multi-spaces': 2,
+    'no-multiple-empty-lines': [
+      2,
+      {
+        max: 1
+      }
+    ],
+    'no-new-symbol': 2,
+    'no-path-concat': 2,
+    'no-return-assign': [2, 'except-parens'],
+    'no-self-assign': 2,
+    'no-sequences': 2,
+    'no-this-before-super': 2,
+    'no-trailing-spaces': 2,
+    'no-unmodified-loop-condition': 2,
+    'no-unneeded-ternary': [
+      2,
+      {
+        defaultAssignment: false
+      }
+    ],
+    'no-unsafe-finally': 2,
+    'no-unused-vars': [
+      2,
+      {
+        vars: 'all',
+        args: 'none'
+      }
+    ],
+    'no-useless-computed-key': 2,
+    'no-useless-constructor': 2,
+    'no-useless-escape': 0,
+    'no-whitespace-before-property': 2,
+    'one-var': [
+      2,
+      {
+        initialized: 'never'
+      }
+    ],
+    'operator-linebreak': [
+      2,
+      'after',
+      {
+        overrides: {
+          '?': 'before',
+          ':': 'before'
+        }
+      }
+    ],
+    'padded-blocks': [2, 'never'],
+    quotes: [
+      2,
+      'single',
+      {
+        avoidEscape: true,
+        allowTemplateLiterals: true
+      }
+    ],
+    semi: [0, 'never'],
+    'semi-spacing': [
+      2,
+      {
+        before: false,
+        after: true
+      }
+    ],
+    'space-before-blocks': [2, 'always'],
+    'space-in-parens': [2, 'never'],
+    'space-infix-ops': 2,
+    'space-unary-ops': [
+      2,
+      {
+        words: true,
+        nonwords: false
+      }
+    ],
+    'spaced-comment': [
+      2,
+      'always',
+      {
+        markers: ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+      }
+    ],
+    'template-curly-spacing': [2, 'never'],
+    'use-isnan': 2,
+    'valid-typeof': 2,
+    'wrap-iife': [2, 'any'],
+    'yield-star-spacing': [2, 'both'],
+    'object-curly-spacing': [
+      2,
+      'always',
+      {
+        objectsInObjects: false
+      }
+    ],
     'no-alert': 0,
     'no-array-constructor': 2,
     'no-bitwise': 0,
-    'no-caller': 1,
     'no-catch-shadow': 2,
     'no-class-assign': 2,
     'no-cond-assign': 2,
     'no-const-assign': 2,
     'no-constant-condition': 2,
     'no-continue': 0,
-    'no-control-regex': 2,
     'no-delete-var': 2,
     'no-div-regex': 1,
     'no-dupe-keys': 2,
@@ -51,14 +246,12 @@ module.exports = {
     'no-empty-character-class': 2,
     'no-empty-label': 0,
     'no-eq-null': 2,
-    'no-eval': 1,
     'no-ex-assign': 2,
     'no-extend-native': 2,
     'no-extra-bind': 2,
     'no-extra-boolean-cast': 2,
     'no-extra-parens': [2, 'functions'],
     'no-extra-semi': 2,
-    'no-fallthrough': 1,
     'no-floating-decimal': 2,
     'no-func-assign': 2,
     'no-implicit-coercion': 1,
@@ -70,21 +263,12 @@ module.exports = {
     'no-irregular-whitespace': 2,
     'no-iterator': 2,
     'no-label-var': 2,
-    'no-labels': 2,
     'no-lone-blocks': 2,
     'no-lonely-if': 2,
     'no-loop-func': 1,
     'no-mixed-requires': [0, false],
-    'no-mixed-spaces-and-tabs': [2, false],
     'linebreak-style': [0, 'windows'],
-    'no-multi-spaces': 1,
     'no-multi-str': 2,
-    'no-multiple-empty-lines': [
-      1,
-      {
-        max: 2
-      }
-    ],
     'no-native-reassign': 2,
     'no-negated-in-lhs': 2,
     'no-nested-ternary': 0,
@@ -97,7 +281,6 @@ module.exports = {
     'no-octal': 2,
     'no-octal-escape': 2,
     'no-param-reassign': 2,
-    'no-path-concat': 0,
     'no-plusplus': 0,
     'no-process-env': 0,
     'no-process-exit': 0,
@@ -105,32 +288,19 @@ module.exports = {
     'no-redeclare': 2,
     'no-regex-spaces': 2,
     'no-restricted-modules': 0,
-    'no-return-assign': 1,
     'no-script-url': 0,
     'no-self-compare': 2,
-    'no-sequences': 0,
     'no-shadow-restricted-names': 2,
     'no-spaced-func': 2,
     'no-sparse-arrays': 2,
     'no-sync': 0,
     'no-ternary': 0,
-    'no-trailing-spaces': 1,
-    'no-this-before-super': 0,
     'no-throw-literal': 2,
-    'no-undef': 1,
+    'no-undef': 2,
     'no-undef-init': 2,
-    'no-undefined': 2,
     'no-unexpected-multiline': 2,
     'no-underscore-dangle': 1,
-    'no-unneeded-ternary': 2,
     'no-unreachable': 2,
-    'no-unused-vars': [
-      2,
-      {
-        vars: 'all',
-        args: 'after-used'
-      }
-    ],
     'no-use-before-define': 2,
     'no-useless-call': 2,
     'no-void': 2,
@@ -145,119 +315,43 @@ module.exports = {
     'no-with': 2,
     'array-bracket-spacing': [2, 'never'],
     'arrow-parens': 0,
-    'arrow-spacing': 0,
-    'accessor-pairs': 0,
     'block-scoped-var': 0,
-    'brace-style': [1, '1tbs'],
-    camelcase: 0,
-    'comma-dangle': [2, 'never'],
-    'comma-spacing': 0,
-    'comma-style': [2, 'last'],
-    complexity: [0, 11],
     'computed-property-spacing': [0, 'never'],
     'consistent-return': 0,
     'consistent-this': [2, 'that'],
-    'constructor-super': 0,
-    curly: [2, 'all'],
     'default-case': 0,
-    'dot-location': 0,
     'dot-notation': [
       0,
       {
         allowKeywords: true
       }
     ],
-    'eol-last': 0,
-    eqeqeq: 2,
     'func-names': 0,
     'func-style': [0, 'declaration'],
-    'generator-star-spacing': 0,
     'guard-for-in': 0,
-    'handle-callback-err': 0,
     'id-length': 0,
-    indent: [2, 2],
     'init-declarations': 0,
-    'key-spacing': [
-      0,
-      {
-        beforeColon: false,
-        afterColon: true
-      }
-    ],
     'lines-around-comment': 0,
     'max-depth': [0, 4],
     'max-len': [0, 100, 4],
     'max-nested-callbacks': [0, 2],
     'max-params': [0, 3],
     'max-statements': [0, 10],
-    'jsx-quotes': [2, 'prefer-single'],
-    'keyword-spacing': [
-      2,
-      {
-        before: true,
-        after: true
-      }
-    ],
-    'new-cap': [
-      2,
-      {
-        newIsCap: true,
-        capIsNew: false
-      }
-    ],
     'new-parens': 2,
-    'object-curly-spacing': [0, 'never'],
     'object-shorthand': 0,
-    'one-var': 0,
     'operator-assignment': [0, 'always'],
-    'operator-linebreak': [
-      2,
-      'after',
-      {
-        overrides: {
-          '?': 'before',
-          ':': 'before'
-        }
-      }
-    ],
-    'padded-blocks': 0,
-    'prefer-const': 0,
     'prefer-spread': 0,
     'prefer-reflect': 0,
-    quotes: [1, 'single'],
     'quote-props': [0, 'always'],
     radix: 2,
     'id-match': 0,
     'require-yield': 0,
-    semi: [0, 'always'],
-    'semi-spacing': [
-      0,
-      {
-        before: false,
-        after: true
-      }
-    ],
     'sort-vars': 0,
     'space-after-keywords': [0, 'always'],
-    'space-before-blocks': [0, 'always'],
-    'space-before-function-paren': [0, 'always'],
-    'space-in-parens': [0, 'never'],
-    'space-infix-ops': 0,
     'space-return-throw-case': 0,
-    'space-unary-ops': [
-      0,
-      {
-        words: true,
-        nonwords: false
-      }
-    ],
-    'spaced-comment': 0,
     strict: 2,
-    'use-isnan': 2,
     'valid-jsdoc': 0,
-    'valid-typeof': 2,
     'vars-on-top': 2,
-    'wrap-iife': [2, 'inside'],
     'wrap-regex': 0,
     yoda: [2, 'never']
   },

+ 1 - 1
public/index.html

@@ -12,6 +12,6 @@
       <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
     </noscript>
     <div id="app"></div>
-    <!-- built files will be auto injected -->
+    <script src="https://class.csslcloud.net/static/dist/js/websdk_4.0.js"></script>
   </body>
 </html>

+ 2 - 1
src/api/liveBroadcast.js → src/api/live.js

@@ -1,7 +1,8 @@
 import { request, getRequestParameter } from '@/utils/request';
 
 /**
- * @param {Object } cs_item_id 课次ID
+ * @description 创建进入直播教室链接
+ * @param { Object } cs_item_id 课次ID
  */
 export function createEnterLiveRoomLink(Parameter) {
   let params = getRequestParameter(

+ 2 - 2
src/api/table.js

@@ -1,7 +1,7 @@
 import { request, getRequestParameter } from '@/utils/request';
 
 /**
- * 教师得到自己一天的课次
+ * @description 教师得到自己一天的课次
  * @param {Object} { date_stamp } 格式化后的时间 yyy-mm-dd
  */
 export function getMyCsItemsDateTeacher(Parameter) {
@@ -14,7 +14,7 @@ export function getMyCsItemsDateTeacher(Parameter) {
 }
 
 /**
- * 得到课次详情(信息集合)
+ * @description 得到课次详情(信息集合)
  * @param {Object} Parameter {id}
  */
 export function getCSItemInfoBox(Parameter) {

+ 1 - 2
src/api/user.js

@@ -1,9 +1,8 @@
 import { request } from '@/utils/request';
 
 /**
- * 登录
+ * @description 登录
  * @param {Object} Parameter 登录对象 { user_type 用户类型 user_name 用户登录名 password 用户密码 }
- * @returns
  */
 export function login(Parameter) {
   return request({

+ 3 - 3
src/common/SvgIcon/CircleProgress.vue → src/common/CircleProgress/CircleProgressSvg.vue

@@ -22,19 +22,19 @@
 
 <script>
 export default {
-  name: 'CircleProgress',
+  name: 'CircleProgressSvg',
   props: {
     dashoffset: {
       type: Number,
       default: 0
     }
-  },
-  mounted() {}
+  }
 };
 </script>
 
 <style scoped>
 .circle-progress {
   transform: rotate(-90deg);
+  margin-right: 8px;
 }
 </style>

+ 49 - 0
src/common/CircleProgress/index.vue

@@ -0,0 +1,49 @@
+<template>
+  <span>
+    <circle-progress-svg v-for="n in 10" :key="n" :dashoffset="computedSingleProgress(n)" />
+  </span>
+</template>
+
+<script>
+import CircleProgressSvg from './CircleProgressSvg';
+
+export default {
+  name: 'CircleProgress',
+  props: {
+    totalCount: {
+      type: Number,
+      default: 0
+    },
+    finishCount: {
+      type: Number,
+      default: 0
+    }
+  },
+  components: {
+    CircleProgressSvg
+  },
+  computed: {
+    percentage() {
+      const per = this.finishCount / this.totalCount;
+      return isNaN(per) ? 100 : Math.trunc(per * 100);
+    }
+  },
+  methods: {
+    // 计算每个环形进度条的进度
+    computedSingleProgress(n) {
+      const percent = this.percentage;
+      if (percent === 100) {
+        return 0;
+      }
+      const surplus = percent - n * 10;
+      if (surplus >= 10) {
+        return 0;
+      }
+      if (surplus > 0) {
+        return -100 + (percent % 10) * 10;
+      }
+      return 100;
+    }
+  }
+};
+</script>

+ 3 - 3
src/layouts/components/Header.vue

@@ -5,9 +5,9 @@
         <el-col :span="1">
           <span>logo</span>
         </el-col>
-        <el-col :span="1" :push="22"
-          ><div class="sign-out" @click="signOut">{{ userType }}退出</div></el-col
-        >
+        <el-col :span="1" :push="22">
+          <div class="sign-out" @click="signOut">{{ userType }}退出</div>
+        </el-col>
       </el-row>
     </el-header>
   </div>

+ 1 - 0
src/layouts/index.vue

@@ -11,6 +11,7 @@
 
 <script>
 import Header from './components/Header';
+
 export default {
   name: 'Layout',
   components: {

+ 1 - 1
src/utils/request.js

@@ -54,7 +54,7 @@ service.interceptors.response.use(
 );
 
 /**
- * 得到必需的请求参数
+ * @description 得到必需的请求参数
  * @param {String} MethodName 请求方法名
  * @param {Object} Parameter 请求参数
  *

+ 56 - 0
src/views/live/index.vue

@@ -0,0 +1,56 @@
+<template>
+  <div>
+    <div>
+      <div class="page-title">直播间</div>
+      <div class="title"></div>
+      <div id="live"></div>
+    </div>
+    <div></div>
+  </div>
+</template>
+
+<script>
+import * as common from './live';
+
+export default {
+  name: 'Live',
+  data() {
+    return {
+      userid: '',
+      roomid: '',
+      sessionid: '',
+      rtc: null,
+      roomData: null
+    };
+  },
+  mounted() {
+    common.initSDK({
+      userid: this.userid,
+      roomid: this.roomid,
+      sessionid: this.sessionid
+    });
+    common.initListener(); // 注册监听事件
+    window.rtc = this.rtc;
+  },
+  methods: {
+    startLive() {
+      common.startLive(); // 开启直播
+    },
+    stopLive() {
+      common.stopLive(); // 结束直播
+    },
+    createLocalStream() {
+      common.createLocalStream(); // 创建本地流
+    },
+    publistStream() {
+      common.publistStream(); // 推流
+    }
+  }
+};
+</script>
+
+<style lang="scss">
+.page-title {
+  font-size: 12px;
+}
+</style>

+ 158 - 0
src/views/live/live.js

@@ -0,0 +1,158 @@
+/**
+ * @description WebSDK 实例化对象
+ */
+let rtc;
+
+/**
+ * @method initSDK
+ * @description 初始化SDK方法
+ * @param { object } data 初始化SDK所需参数
+ * @returns { object }
+ */
+export function initSDK(data) {
+  // eslint-disable-next-line no-undef
+  rtc = new Rtc(data);
+  return rtc;
+}
+
+/**
+ * @method initListener
+ * @description 初始化监听事件
+ */
+export function initListener() {
+  rtc.on('login_success', data => {
+    console.log('登录成功', data);
+    alert('登录成功:' + JSON.stringify(data));
+  });
+
+  rtc.on('login_failed', data => {
+    console.log('登录失败', data);
+    alert('登录失败:' + JSON.stringify(data));
+  });
+
+  rtc.on('conference_join', function () {
+    // 有监听就是加入房间成功
+    console.log('加入房间成功');
+  });
+
+  rtc.on('conference_join_failed', function (err) {
+    // 加入房间失败  err为错误原因
+    console.log('加入房间失败', err);
+  });
+
+  rtc.on('switch_user_settings', function (settingData) {
+    // 单个用户配置监听
+    console.log(settingData);
+  });
+
+  rtc.on('allow_sub', stream => {
+    alert('监听到有流');
+    rtc.trySubscribeStream({
+      tryStream: stream,
+      success: function success(stream) {
+        stream.show('other');
+      },
+      fail: function fail(err) {
+        console.error(err);
+      }
+    });
+  });
+}
+
+/**
+ * @method startLive
+ * @description 开启直播
+ */
+export function startLive() {
+  rtc.startLive({
+    success(data) {
+      alert('开启直播成功:' + JSON.stringify(data));
+    },
+    fail(data) {
+      alert('开启直播失败:' + JSON.stringify(data));
+    }
+  });
+}
+
+/**
+ * @method endLive
+ * @description 结束直播
+ */
+export function endLive() {
+  rtc.endLive({
+    success(data) {
+      alert('结束直播成功:' + JSON.stringify(data));
+    },
+    fail(data) {
+      alert('结束直播失败:' + JSON.stringify(data));
+    }
+  });
+}
+
+/**
+ * @method createLocalStram
+ * @description 创建本地流
+ */
+export function createLocalStream() {
+  const createData = { video: true, audio: true };
+  rtc.createLocalStream({
+    streamName: 'main',
+    createData,
+    success: function (stream) {
+      // 创建本地流成功,将流展示到id为 live 的dom元素盒子中
+      stream.show('live');
+      // publish(stream); // 如果需要立即推流,执行publish方法
+      alert('创建本地流成功');
+    },
+    fail: function (data) {
+      // 创建本地流失败,应用层处理
+      console.log(data);
+      alert('创建本地流失败');
+    }
+  });
+}
+
+/**
+ * @method publishStream
+ * @description 推流
+ */
+export function publishStream() {
+  rtc.publish({
+    streamName: 'main',
+    // 推流成功,更新上麦结果
+    success: function (stream) {
+      rtc.updateMcResult({
+        pid: 1,
+        stid: stream.id(),
+        success: function (data) {
+          alert('更新上麦结果请求成功,此处可处理应用层逻辑' + JSON.stringify(data));
+        },
+        fail: function (data) {
+          alert('更新上麦结果请求失败,此处可处理应用层逻辑' + JSON.stringify(data));
+        }
+      });
+    },
+    fail: function (stream) {
+      // 推流失败,更新上麦结果
+      rtc.updateMcResult({
+        pid: 0,
+        stid: stream.id(),
+        success: function (data) {
+          console.log('更新上麦结果请求成功,此处可处理应用层逻辑', data);
+        },
+        fail: function (data) {
+          console.log('更新上麦结果请求失败,此处可处理应用层逻辑', data);
+        }
+      });
+      alert('推流失败,此处可处理应用层逻辑');
+    }
+  });
+}
+
+/**
+ * @method handsUp
+ * @description 申请连麦
+ */
+export function handsUp(data) {
+  rtc.handsUp(data);
+}

+ 30 - 68
src/views/teacher/cs_item_detail/ClassroomTask.vue

@@ -12,9 +12,9 @@
                   <el-row class="classroom-task-title">
                     <el-col :span="4">{{ list.name }}</el-col>
                     <el-col :span="16" class="title-date">2021-3-23</el-col>
-                    <el-col :span="4"
-                      >已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}</el-col
-                    >
+                    <el-col :span="4">
+                      已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}
+                    </el-col>
                   </el-row>
                 </template>
 
@@ -51,17 +51,14 @@
                   <span>完成情况:</span>
                   <el-row>
                     <el-col :span="20">
-                      <span v-for="n in 10" :key="n">
-                        <circle-progress
-                          :dashoffset="
-                            computeProgress(n, list.student_count_finish_task, list.student_count)
-                          "
-                        />
-                      </span>
+                      <circle-progress
+                        :total-count="list.student_count"
+                        :finish-count="list.student_count_finish_task"
+                      />
+                    </el-col>
+                    <el-col :span="4">
+                      已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}
                     </el-col>
-                    <el-col :span="4"
-                      >已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}</el-col
-                    >
                   </el-row>
                 </div>
               </el-collapse-item>
@@ -77,9 +74,9 @@
                   <el-row class="classroom-task-title">
                     <el-col :span="4">{{ list.name }}</el-col>
                     <el-col :span="16" class="title-date">2021-3-23</el-col>
-                    <el-col :span="4"
-                      >已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}</el-col
-                    >
+                    <el-col :span="4">
+                      已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}
+                    </el-col>
                   </el-row>
                 </template>
 
@@ -116,17 +113,14 @@
                   <span>完成情况:</span>
                   <el-row>
                     <el-col :span="20">
-                      <span v-for="n in 10" :key="n">
-                        <circle-progress
-                          :dashoffset="
-                            computeProgress(n, list.student_count_finish_task, list.student_count)
-                          "
-                        />
-                      </span>
+                      <circle-progress
+                        :total-count="list.student_count"
+                        :finish-count="list.student_count_finish_task"
+                      />
+                    </el-col>
+                    <el-col :span="4">
+                      已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}
                     </el-col>
-                    <el-col :span="4"
-                      >已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}</el-col
-                    >
                   </el-row>
                 </div>
               </el-collapse-item>
@@ -142,9 +136,9 @@
                   <el-row class="classroom-task-title">
                     <el-col :span="4">{{ list.name }}</el-col>
                     <el-col :span="16" class="title-date">2021-3-23</el-col>
-                    <el-col :span="4"
-                      >已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}</el-col
-                    >
+                    <el-col :span="4">
+                      已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}
+                    </el-col>
                   </el-row>
                 </template>
 
@@ -181,17 +175,11 @@
                   <span>完成情况:</span>
                   <el-row>
                     <el-col :span="20">
-                      <span v-for="n in 10" :key="n">
-                        <circle-progress
-                          :dashoffset="
-                            computeProgress(n, list.student_count_finish_task, list.student_count)
-                          "
-                        />
-                      </span>
+                      <circle-progress :total-count="100" :finish-count="66" />
+                    </el-col>
+                    <el-col :span="4">
+                      已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}
                     </el-col>
-                    <el-col :span="4"
-                      >已完成 {{ list.student_count_finish_task }}/{{ list.student_count }}</el-col
-                    >
                   </el-row>
                 </div>
               </el-collapse-item>
@@ -206,14 +194,7 @@
       <div class="classroom-courseware-container">
         <div class="internet-courseware">
           <div>线上课件:</div>
-          <div class="internet-courseware-content">
-            <el-tag type="info">say the Chinese Numbers</el-tag>
-            <el-tag type="info">say the Chinese Numbers</el-tag>
-            <el-tag type="info">say the Chinese Numbers</el-tag>
-            <el-tag type="info">say the Chinese Numbers</el-tag>
-            <el-tag type="info">say the Chinese Numbers</el-tag>
-            <el-tag type="info">say the Chinese Numbers</el-tag>
-          </div>
+          <div class="internet-courseware-content"></div>
         </div>
         <div class="return-file">
           <div>回传文件:</div>
@@ -225,7 +206,7 @@
 </template>
 
 <script>
-import CircleProgress from '@/common/SvgIcon/CircleProgress';
+import CircleProgress from '@/common/CircleProgress';
 
 export default {
   name: 'ClassroomTask',
@@ -256,23 +237,6 @@ export default {
   },
   components: {
     CircleProgress
-  },
-  methods: {
-    // 计算每个环形进度条的进度
-    computeProgress(n, finishCount, totalCount) {
-      let percentage = Math.trunc((finishCount / totalCount) * 100);
-      if (percentage === 100) {
-        return 0;
-      }
-      let surplus = percentage - n * 10;
-      if (surplus >= 10) {
-        return 0;
-      }
-      if (surplus > 0) {
-        return -100 + (percentage % 10) * 10;
-      }
-      return 100;
-    }
   }
 };
 </script>
@@ -330,9 +294,6 @@ $card-radius: 18px;
         .accessory-tag {
           @extend .courseware-tag;
         }
-        .circle-progress {
-          margin-right: 8px;
-        }
       }
     }
 
@@ -368,6 +329,7 @@ $card-radius: 18px;
   .classroom-courseware {
     display: inline-block;
     width: 30%;
+    padding-top: 30px;
     vertical-align: top;
 
     &-container {

+ 8 - 8
src/views/teacher/cs_item_detail/index.vue

@@ -4,18 +4,18 @@
       <span>讲次详情</span>
       <div class="cs-item-info">
         <el-row>
-          <el-col :span="21"
-            >{{ CSItemInfoBox.date_stamp }} {{ CSItemInfoBox.minute_space }}</el-col
-          >
-          <el-col :span="3" class="col_right"
-            >任务{{
+          <el-col :span="21">
+            {{ CSItemInfoBox.date_stamp }} {{ CSItemInfoBox.minute_space }}
+          </el-col>
+          <el-col :span="3" class="col_right">
+            任务{{
               CSItemInfoBox.finish_status === 0
                 ? '未开始'
                 : CSItemInfoBox.finish_status === 1
                 ? '已开始'
                 : '已结束'
-            }}</el-col
-          >
+            }}
+          </el-col>
         </el-row>
         <el-row class="cs-item-name">
           <el-col>{{ CSItemInfoBox.name }}</el-col>
@@ -56,7 +56,7 @@
 
 <script>
 import { getCSItemInfoBox } from '@/api/table';
-import { createEnterLiveRoomLink } from '@/api/liveBroadcast';
+import { createEnterLiveRoomLink } from '@/api/live';
 import ClassroomTask from './ClassroomTask';
 
 export default {

+ 1 - 1
src/views/teacher/main/CurriculaManager.vue

@@ -80,7 +80,7 @@ export default {
         },
         {
           status: '2',
-          val: '报名中',
+          val: '待开始',
         },
         {
           status: '3',

+ 4 - 4
src/views/teacher/main/TaskKanban.vue

@@ -42,11 +42,11 @@
       >
         <el-row class="task-date">
           <el-col :span="20">{{ item.date_stamp }}&nbsp;{{ item.minute_space }}</el-col>
-          <el-col :span="4" :style="{ 'text-align': 'right' }"
-            >任务{{
+          <el-col :span="4" :style="{ 'text-align': 'right' }">
+            任务{{
               item.finish_status === 0 ? '未开始' : item.finish_status === 1 ? '已开始' : '已结束'
-            }}</el-col
-          >
+            }}
+          </el-col>
         </el-row>
         <el-row class="task-name">
           <el-col :span="24">{{ item.name }}</el-col>