Forráskód Böngészése

feat:调整分班

DESKTOP-USV654P\pc 4 hónapja
szülő
commit
4e7eae089c

+ 10 - 9
src/views/educational/banding/task/division.vue

@@ -1,5 +1,5 @@
 <template>
-  <BasicDrawer
+  <BasicModal
     @ok="handleSubmit"
     :destroyOnClose="true"
     :maskClosable="false"
@@ -7,23 +7,24 @@
     @register="registerModal"
     :title="getTitle"
     width="85%"
-    :showFooter="false"
+    :footer="null"
     @close="handelClose"
+    :defaultFullscreen="true"
   >
     <FormDivision :taskId="modelRef?.id" :status="modelRef?.status" @success="handelSuccess" />
-  </BasicDrawer>
+  </BasicModal>
 </template>
 <script setup lang="ts">
   import { ref, computed, unref } from 'vue';
-  import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
   import FormDivision from '../../division/index.vue';
   import { Recordable } from 'vite-plugin-mock';
   const isUpdate = ref(true);
   const modelRef = ref<Recordable>();
   const emit = defineEmits(['success', 'register']);
 
-  const [registerModal, { closeDrawer, setDrawerProps }] = useDrawerInner(async (data) => {
-    setDrawerProps({ confirmLoading: false });
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+    setModalProps({ confirmLoading: false });
     isUpdate.value = !!data?.isUpdate;
     modelRef.value = { ...data.baseData };
   });
@@ -31,15 +32,15 @@
   const getTitle = computed(() => (!unref(isUpdate) ? '新生分配' : '新生分配'));
   const handleSubmit = async () => {
     try {
-      closeDrawer();
+      closeModal();
       emit('success');
     } finally {
-      setDrawerProps({ confirmLoading: false });
+      setModalProps({ confirmLoading: false });
     }
   };
 
   const handelSuccess = () => {
-    closeDrawer();
+    closeModal();
     emit('success');
   };
 

+ 2 - 2
src/views/educational/banding/task/index.vue

@@ -45,7 +45,7 @@
   import FormDivision from './division.vue';
 
   const [registerModal, { openModal }] = useModal();
-  const [registerDrawer, { openDrawer }] = useDrawer();
+  const [registerDrawer, { openModal: openDivisionModal }] = useModal();
 
   const [registerTable, { reload }] = useTable({
     api: getBandingTaskPage,
@@ -91,7 +91,7 @@
   };
 
   const handleDivision = (record: any) => {
-    openDrawer(true, {
+    openDivisionModal(true, {
       isUpdate: true,
       baseData: {
         ...record,

+ 1 - 0
src/views/educational/division/components/DsionStep2.vue

@@ -57,6 +57,7 @@
         slots: { customRender: 'action' },
         fixed: 'right',
       },
+      resizeHeightOffset: 60,
     });
 
   const searchInfo = reactive<Recordable>({});

+ 16 - 0
src/views/educational/division/components/DsionStep2_1.vue

@@ -12,6 +12,8 @@
           v-model:value="record[column.dataIndex]"
           :options="majorSetOptions"
           :disabled="status === 1"
+          :showSearch="true"
+          :filterOption="filterOption"
           style="margin: -5px 0; width: 100%"
         />
       </template>
@@ -20,6 +22,8 @@
           v-model:value="record[column.dataIndex]"
           :options="classTypeOptions"
           :disabled="status === 1"
+          :showSearch="true"
+          :filterOption="filterOption"
           style="margin: -5px 0; width: 100%"
         />
       </template>
@@ -44,6 +48,8 @@
           v-model:value="record[column.dataIndex]"
           :options="teacherOptions"
           :disabled="status === 1"
+          :showSearch="true"
+          :filterOption="filterOption"
           style="margin: -5px 0; width: 100%"
         />
       </template>
@@ -52,6 +58,8 @@
           v-model:value="record[column.dataIndex]"
           :options="classroomOptions"
           :disabled="status === 1"
+          :showSearch="true"
+          :filterOption="filterOption"
           style="margin: -5px 0; width: 100%"
         />
       </template>
@@ -135,6 +143,7 @@
           return item;
         });
       },
+      resizeHeightOffset: 60,
     });
 
   const searchInfo = reactive<Recordable>({});
@@ -248,6 +257,13 @@
     classTypeOptions.value = await getDataOption({ code: 'class_type' });
   });
 
+  const filterOption = (input: string, option: any) => {
+    return (
+      option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+      option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    );
+  };
+
   defineExpose({ validateStep, reloadStep });
 </script>
 

+ 7 - 4
src/views/educational/division/components/DsionStep3.vue

@@ -23,6 +23,7 @@
             },
             {
               label: '解锁',
+              color: 'error',
               disabled: status === 1,
               ifShow: record.status === 1,
               onClick: handleLock.bind(null, record, 0),
@@ -50,7 +51,7 @@
   import { useModal } from '/@/components/Modal';
   import { postBandingTaskAutomaticBanding } from '/@/services/apis/BandingTaskController';
 
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
     api: getBandingTaskClassList,
     title: '班级列表',
     rowKey: 'id',
@@ -61,6 +62,7 @@
     immediate: false,
     canResize: true,
     pagination: false,
+    resizeHeightOffset: 60,
 
     actionColumn: {
       width: 100,
@@ -100,6 +102,7 @@
   };
 
   const handleSuccess = () => {
+    clearSelectedRowKeys();
     reload();
   };
 
@@ -112,16 +115,16 @@
 
   const handelConfirm = async () => {
     await postBandingTaskAutomaticBanding({ bandingTaskId: props.taskId });
-    reload();
+    handleSuccess();
   };
 
   const reloadStep = () => {
-    reload();
+    handleSuccess();
   };
 
   const handleLock = async (record: Recordable, status: number) => {
     await postBandingTaskClassChangeStatus({ id: record.id, status: status });
-    reload();
+    handleSuccess();
   };
 
   defineExpose({ validateStep, reloadStep });

+ 4 - 2
src/views/educational/division/components/DsionStep4.vue

@@ -25,7 +25,7 @@
 
   const [registerModal, { openModal }] = useModal();
 
-  const [registerTable, { reload, getSelectRows, getForm }] = useTable({
+  const [registerTable, { reload, getSelectRows, getForm, clearSelectedRowKeys }] = useTable({
     api: getBandingTaskClassClassStudent,
     title: '学生列表',
     rowKey: 'id',
@@ -42,6 +42,7 @@
     rowSelection: {
       type: 'checkbox',
     },
+    resizeHeightOffset: 60,
   });
 
   const searchInfo = reactive<Recordable>({});
@@ -65,7 +66,7 @@
   };
 
   const reloadStep = () => {
-    reload();
+    handleSuccess();
   };
 
   const handelAjd = () => {
@@ -80,6 +81,7 @@
   };
 
   const handleSuccess = () => {
+    clearSelectedRowKeys();
     reload();
   };
 

+ 1 - 0
src/views/educational/division/components/DsionStep5.vue

@@ -37,6 +37,7 @@
     immediate: true,
     canResize: true,
     pagination: false,
+    resizeHeightOffset: 60,
   });
 
   const searchInfo = reactive<Recordable>({});

+ 2 - 1
src/views/educational/division/components/DsionStep6.vue

@@ -47,6 +47,7 @@
     immediate: false,
     canResize: true,
     pagination: false,
+    resizeHeightOffset: 60,
   });
 
   const searchInfo = reactive<Recordable>({});
@@ -105,7 +106,7 @@
 
 <style lang="less" scoped>
   .dsion-step6 {
-    margin: 16px 0;
+    // margin: 16px 0;
     position: relative;
   }
 </style>

+ 15 - 15
src/views/educational/division/components/satisfy.vue

@@ -34,6 +34,7 @@
       slots: { customRender: 'action' },
       fixed: 'right',
     },
+    // resizeHeightOffset: 80,
   });
 
   const [registerModal, { setModalProps }] = useModalInner((data) => {
@@ -67,22 +68,21 @@
     title="满足学生"
     :footer="null"
     @cancel="handleCancel"
+    :defaultFullscreen="true"
   >
-    <div style="height: 600px">
-      <BasicTable @register="registerTable" :searchInfo="searchInfo">
-        <template #action="{ record }">
-          <TableAction
-            :actions="[
-              {
-                label: '移出',
-                disabled: status === 1,
-                onClick: handleDelete.bind(null, record),
-              },
-            ]"
-          />
-        </template>
-      </BasicTable>
-    </div>
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
+      <template #action="{ record }">
+        <TableAction
+          :actions="[
+            {
+              label: '移出',
+              disabled: status === 1,
+              onClick: handleDelete.bind(null, record),
+            },
+          ]"
+        />
+      </template>
+    </BasicTable>
   </BasicModal>
 </template>
 

+ 15 - 15
src/views/educational/division/components/surplus.vue

@@ -34,6 +34,7 @@
       slots: { customRender: 'action' },
       fixed: 'right',
     },
+    // resizeHeightOffset: 80,
   });
 
   const [registerModal, { setModalProps }] = useModalInner((data) => {
@@ -67,22 +68,21 @@
     title="剩余学生"
     :footer="null"
     @cancel="handleCancel"
+    :defaultFullscreen="true"
   >
-    <div style="height: 600px">
-      <BasicTable @register="registerTable" :searchInfo="searchInfo">
-        <template #action="{ record }">
-          <TableAction
-            :actions="[
-              {
-                label: '移入',
-                disabled: status === 1,
-                onClick: handleDelete.bind(null, record),
-              },
-            ]"
-          />
-        </template>
-      </BasicTable>
-    </div>
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
+      <template #action="{ record }">
+        <TableAction
+          :actions="[
+            {
+              label: '移入',
+              disabled: status === 1,
+              onClick: handleDelete.bind(null, record),
+            },
+          ]"
+        />
+      </template>
+    </BasicTable>
   </BasicModal>
 </template>
 

+ 21 - 0
src/views/educational/division/data.config.ts

@@ -302,6 +302,13 @@ export const searchForm4Schema: FormSchema[] = [
     componentProps: {
       getPopupContainer: () => document.body,
       api: getClassOption,
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
     colProps: { span: 8 },
   },
@@ -313,6 +320,13 @@ export const searchForm4Schema: FormSchema[] = [
     componentProps: {
       api: getMajorSetOption,
       getPopupContainer: () => document.body,
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
   },
   {
@@ -323,6 +337,13 @@ export const searchForm4Schema: FormSchema[] = [
     componentProps: {
       api: getMajorSetOption,
       getPopupContainer: () => document.body,
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
   },
 ];

+ 76 - 76
src/views/educational/division/index.vue

@@ -1,80 +1,78 @@
 <template>
-  <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
-    <div class="page-dsion">
-      <div class="page-dsion-header">
-        <Steps :percent="60" :current="state.stepIndex" :items="state.stepItems" type="navigation">
-          <Steps.Step v-for="(item, index) in state.stepItems" :key="index">
-            <template #title>{{ item.title }}</template>
-          </Steps.Step>
-        </Steps>
-      </div>
-      <div class="page-dsion-body">
-        <DsionStep1
-          ref="dsionStep1Ref"
-          :taskId="taskId"
-          :status="status"
-          v-show="state.stepIndex === 0"
-        />
-        <DsionStep6
-          ref="dsionStep6Ref"
-          :taskId="taskId"
-          :status="status"
-          v-show="state.stepIndex === 1"
-        />
-        <DsionStep2
-          ref="dsionStep2Ref"
-          :taskId="taskId"
-          :status="status"
-          v-show="state.stepIndex === 2"
-        />
-        <DsionStep3
-          ref="dsionStep3Ref"
-          :taskId="taskId"
-          :status="status"
-          v-show="state.stepIndex === 3"
-        />
-        <DsionStep4
-          ref="dsionStep4Ref"
-          :taskId="taskId"
-          :status="status"
-          v-show="state.stepIndex === 4"
-        />
-        <DsionStep5
-          ref="dsionStep5Ref"
-          :taskId="taskId"
-          :status="status"
-          v-show="state.stepIndex === 5"
-          @success="handleSubmit"
-        />
-      </div>
-      <div class="page-dsion-floor">
-        <a-button v-show="state.stepIndex !== 0" @click="handleStep(0)" class="ml-[24px]">
-          上一步
-        </a-button>
-        <a-button
-          v-show="state.stepIndex !== 5"
-          type="primary"
-          @click="handleStep(1)"
-          class="ml-[24px]"
-        >
-          下一步
-        </a-button>
-        <a-button
-          v-show="state.stepIndex === 5"
-          type="primary"
-          class="ml-[24px]"
-          :disabled="status === 1"
-          @click="handleSubmit"
-        >
-          确认
-        </a-button>
-      </div>
+  <div class="page-dsion">
+    <div class="page-dsion-header">
+      <Steps :percent="60" :current="state.stepIndex" :items="state.stepItems" type="navigation">
+        <Steps.Step v-for="(item, index) in state.stepItems" :key="index">
+          <template #title>{{ item.title }}</template>
+        </Steps.Step>
+      </Steps>
     </div>
-  </PageWrapper>
+    <div class="page-dsion-body">
+      <DsionStep1
+        ref="dsionStep1Ref"
+        :taskId="taskId"
+        :status="status"
+        v-show="state.stepIndex === 0"
+      />
+      <DsionStep6
+        ref="dsionStep6Ref"
+        :taskId="taskId"
+        :status="status"
+        v-show="state.stepIndex === 1"
+      />
+      <DsionStep2
+        ref="dsionStep2Ref"
+        :taskId="taskId"
+        :status="status"
+        v-show="state.stepIndex === 2"
+      />
+      <DsionStep3
+        ref="dsionStep3Ref"
+        :taskId="taskId"
+        :status="status"
+        v-show="state.stepIndex === 3"
+      />
+      <DsionStep4
+        ref="dsionStep4Ref"
+        :taskId="taskId"
+        :status="status"
+        v-show="state.stepIndex === 4"
+      />
+      <DsionStep5
+        ref="dsionStep5Ref"
+        :taskId="taskId"
+        :status="status"
+        v-show="state.stepIndex === 5"
+        @success="handleSubmit"
+      />
+    </div>
+    <div class="page-dsion-floor">
+      <a-button v-show="state.stepIndex !== 0" @click="handleStep(0)" class="ml-[24px]">
+        上一步
+      </a-button>
+      <a-button
+        v-show="state.stepIndex !== 5"
+        type="primary"
+        @click="handleStep(1)"
+        class="ml-[24px]"
+      >
+        下一步
+      </a-button>
+      <a-button
+        v-show="state.stepIndex === 5"
+        type="primary"
+        class="ml-[24px]"
+        :disabled="status === 1"
+        @click="handleSubmit"
+      >
+        确认
+      </a-button>
+    </div>
+  </div>
 </template>
 
 <script setup lang="ts">
-  import { PageWrapper } from '/@/components/Page';
+  // import { PageWrapper } from '/@/components/Page';
   import { Steps } from 'ant-design-vue';
   import { reactive, onMounted, ref } from 'vue';
   import DsionStep1 from './components/DsionStep1.vue';
@@ -83,8 +81,8 @@
   import DsionStep4 from './components/DsionStep4.vue';
   import DsionStep5 from './components/DsionStep5.vue';
   import DsionStep6 from './components/DsionStep6.vue';
-  import { postBandingTaskSure } from '/@/services/apis/BandingTaskController';
-  import { useMessage } from '/@/hooks/web/useMessage';
+  // import { postBandingTaskSure } from '/@/services/apis/BandingTaskController';
+  // import { useMessage } from '/@/hooks/web/useMessage';
 
   const props = defineProps({
     taskId: { type: String, default: '' },
@@ -92,7 +90,7 @@
   });
 
   const emits = defineEmits(['success']);
-  const { createMessage } = useMessage();
+  // const { createMessage } = useMessage();
 
   const dsionStep1Ref = ref<ElRef>(null);
   const dsionStep2Ref = ref<ElRef>(null);
@@ -158,6 +156,8 @@
     width: 100%;
     height: 100%;
     position: relative;
+    overflow: hidden;
+    padding: 0;
 
     &-header {
       margin: 0 auto;
@@ -171,7 +171,7 @@
       // display: flex;
       position: relative;
       // display: inline-block;
-      overflow: auto;
+      overflow: hidden;
     }
 
     &-floor {

+ 5 - 5
src/views/teachingManager/textbookManagement/components/data.config.ts

@@ -77,7 +77,7 @@ export const TableColumns: BasicColumn[] = [
     },
   },
   {
-    title: '类',
+    title: '教材分类',
     dataIndex: 'textbookTypeCn',
     customRender: ({ text }) => {
       return text ? text : '/';
@@ -170,7 +170,7 @@ export const formSchema: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
-    label: '类',
+    label: '教材分类',
     field: 'textbookType',
     component: 'ApiSelect',
     componentProps: {
@@ -242,7 +242,7 @@ export const formSchema: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
-    label: '使用类型',
+    label: '使用时长',
     field: 'useType',
     component: 'Select',
     required: true,
@@ -445,7 +445,7 @@ export const formSchema: FormSchema[] = [
 ];
 export const searchFormSchema: FormSchema[] = [
   {
-    label: '教材类',
+    label: '教材类',
     field: 'textbookType',
     component: 'ApiSelect',
     componentProps: {
@@ -718,7 +718,7 @@ export const pushFormSchema: FormSchema[] = [
 export const infoEumns = {
   issn: '书号',
   bookName: '书名',
-  textbookTypeCn: '类',
+  textbookTypeCn: '教材分类',
   publishingHouse: '出版社',
   editorInChief: '作者(主编)',
   isTextbookPlanCn: '是否为规划教材',