瀏覽代碼

Merge branch 'iteration-classroom' into online

lex 1 年之前
父節點
當前提交
6181c8eca3

+ 1 - 1
src/views/attend-class/component/rhythm-modal/index.tsx

@@ -25,7 +25,7 @@ export default defineComponent({
     }/classroom-app/#/tempo-practice?v=${+new Date()}&platform=modal&dataJson=${
       props.item.dataJson
     }&Authorization=${userStore.getToken}&win=pc`;
-    if (/(localhost|192)/.test(location.host)) {
+    if (/(localhost)/.test(location.host)) {
       src = `http://localhost:9002/#/tempo-practice?v=${+new Date()}&platform=modal&dataJson=${
         props.item.dataJson
       }&Authorization=${userStore.getToken}&win=pc`;

+ 2 - 1
src/views/attend-class/index.tsx

@@ -1240,7 +1240,8 @@ export default defineComponent({
         id: 4
       }
     ]);
-    const rightColumnShow = ref(true);
+    // 默认收起菜单
+    const rightColumnShow = ref(false);
 
     // 右边栏操作
     const operateRightBtn = async (id: number) => {

+ 40 - 2
src/views/homework-record/detail/index.tsx

@@ -26,13 +26,18 @@ export default defineComponent({
   setup() {
     const route = useRoute();
     const state = reactive({
-      searchForm: { keyword: '', trainingStatus: '' as any },
+      searchForm: {
+        keyword: '',
+        trainingStatus: '' as any,
+        classGroupId: '' as any
+      },
       loading: false,
       pagination: {
         page: 1,
         rows: 10,
         pageTotal: 4
       },
+      studentClassList: [] as any,
       tableList: [] as any,
       workInfo: {} as any,
       detailVisiable: false,
@@ -51,7 +56,11 @@ export default defineComponent({
     };
 
     const onReset = () => {
-      state.searchForm = { keyword: '', trainingStatus: '' as any };
+      state.searchForm = {
+        keyword: '',
+        trainingStatus: '' as any,
+        classGroupId: '' as any
+      };
       search();
     };
     const getList = async () => {
@@ -104,6 +113,15 @@ export default defineComponent({
         result.pTitle = pTitle;
         result.eTitle = eTitle;
         state.workInfo = result;
+
+        // 班级列表
+        const classList = result.studentClassGroup || [];
+        classList.forEach((item: any) => {
+          state.studentClassList.push({
+            label: item.name,
+            value: item.id
+          });
+        });
       } catch (e) {
         console.log(e);
       }
@@ -135,6 +153,10 @@ export default defineComponent({
           }
         },
         {
+          title: '所属班级',
+          key: 'classGroupName'
+        },
+        {
           title: '作业状态',
           key: 'sex',
           render(row: any) {
@@ -327,6 +349,22 @@ export default defineComponent({
                   {...({
                     options: [
                       {
+                        label: '全部班级',
+                        value: ''
+                      },
+                      ...state.studentClassList
+                    ],
+                    placeholder: '全部班级',
+                    clearable: true,
+                    inline: true
+                  } as any)}
+                  v-model:value={state.searchForm.classGroupId}></CSelect>
+              </NFormItem>
+              <NFormItem>
+                <CSelect
+                  {...({
+                    options: [
+                      {
                         label: '全部状态',
                         value: ''
                       },