Browse Source

feat: 添加跳转页

DESKTOP-USV654P\pc 9 months ago
parent
commit
bd28baad76

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

@@ -112,6 +112,6 @@
 
 <style lang="less" scoped>
   .dsion-step2 {
-    margin: 24px 0;
+    margin: 16px 0;
   }
 </style>

+ 36 - 0
src/views/educational/division/components/DsionStep3.vue

@@ -0,0 +1,36 @@
+<template>
+  <div class="dsion-step3">
+    <BasicTable @register="registerTable">
+      <template #toolbar>
+        <a-button type="primary">开始分班</a-button>
+        <a-button type="warning">撤回</a-button>
+        <a-button type="error">重置</a-button>
+      </template>
+    </BasicTable>
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { ref } from 'vue';
+  import { BasicTable, useTable } from '/@/components/Table';
+  import { table3Columns } from '../data.config';
+
+  const [registerTable, { reload }] = useTable({
+    // api: getEvaluateTemplatePage,
+    title: '班级列表',
+    rowKey: 'id',
+    columns: table3Columns,
+    useSearchForm: false,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    pagination: false,
+  });
+</script>
+
+<style lang="less" scoped>
+  .dsion-step3 {
+    margin: 16px 0;
+  }
+</style>

+ 39 - 0
src/views/educational/division/components/DsionStep4.vue

@@ -0,0 +1,39 @@
+<template>
+  <div class="dsion-step4">
+    <BasicTable @register="registerTable">
+      <template #toolbar>
+        <a-button type="primary">开始分班</a-button>
+        <a-button type="primary">导出</a-button>
+      </template>
+    </BasicTable>
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { ref } from 'vue';
+  import { BasicTable, useTable } from '/@/components/Table';
+  import { table4Columns, searchForm4Schema } from '../data.config';
+
+  const [registerTable, { reload }] = useTable({
+    // api: getEvaluateTemplatePage,
+    title: '学生列表',
+    rowKey: 'id',
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchForm4Schema,
+    },
+    columns: table4Columns,
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    pagination: false,
+  });
+</script>
+
+<style lang="less" scoped>
+  .dsion-step4 {
+    margin: 16px 0;
+  }
+</style>

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

@@ -0,0 +1,34 @@
+<template>
+  <div class="dsion-step5">
+    <BasicTable @register="registerTable">
+      <template #toolbar>
+        <a-button type="primary">分班确认</a-button>
+      </template>
+    </BasicTable>
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { ref } from 'vue';
+  import { BasicTable, useTable } from '/@/components/Table';
+  import { table5Columns } from '../data.config';
+
+  const [registerTable, { reload }] = useTable({
+    // api: getEvaluateTemplatePage,
+    title: '班级列表',
+    rowKey: 'id',
+    useSearchForm: false,
+    columns: table5Columns,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    pagination: false,
+  });
+</script>
+
+<style lang="less" scoped>
+  .dsion-step5 {
+    margin: 16px 0;
+  }
+</style>

+ 243 - 3
src/views/educational/division/data.config.ts

@@ -1,7 +1,7 @@
-
 import { requestMagicApi } from '/@/api/magicApi';
-import { getMajorSetOption } from '/@/api/userMagic';
-import { BasicColumn } from '/@/components/Table';
+import { getDataOption } from '/@/api/system/dic';
+import { getClassOption, getMajorSetOption } from '/@/api/userMagic';
+import { BasicColumn, FormSchema } from '/@/components/Table';
 
 export const table2Columns: BasicColumn[] = [
   {
@@ -77,3 +77,243 @@ export const table2Columns: BasicColumn[] = [
     },
   },
 ];
+
+export const table3Columns: BasicColumn[] = [
+  {
+    title: '专业方向',
+    dataIndex: 'majorSetId',
+    align: 'left',
+    width: 250,
+  },
+  {
+    title: '第一志愿报名数',
+    dataIndex: 'fc',
+    align: 'left',
+    width: 150,
+  },
+  {
+    title: '第二志愿报名数',
+    dataIndex: 'fd',
+    align: 'left',
+    width: 150,
+  },
+  {
+    title: '分班班级',
+    dataIndex: 'className',
+    align: 'left',
+  },
+  {
+    title: '班级人数',
+    dataIndex: 'count',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '限制身高大于(cm)',
+    dataIndex: 'he',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '限制成绩高于(分)',
+    dataIndex: 'sc',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '满足人数',
+    dataIndex: 'cc',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '剩余人数',
+    dataIndex: 'ss',
+    align: 'left',
+    width: 250,
+  },
+  {
+    title: '剩余调剂专业',
+    dataIndex: 'dd',
+    align: 'left',
+    width: 200,
+  },
+];
+
+export const table4Columns: BasicColumn[] = [
+  {
+    title: '学号',
+    dataIndex: 'studentId',
+    align: 'left',
+  },
+  {
+    title: '姓名',
+    dataIndex: 'name',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '性别',
+    dataIndex: 'gend',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '毕业学校',
+    dataIndex: 'schoolName',
+    align: 'left',
+    width: 180,
+  },
+  {
+    title: '毕业班级',
+    dataIndex: 'className',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '住宿类型',
+    dataIndex: 'stateType',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '身高',
+    dataIndex: 'hi',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '体重',
+    dataIndex: 'wg',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '成绩',
+    dataIndex: 'score',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '班级名称',
+    dataIndex: 'cName',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '班主任',
+    dataIndex: 'teacherName',
+    align: 'left',
+    width: 120,
+  },
+];
+
+export const searchForm4Schema: FormSchema[] = [
+  {
+    field: 'studentId',
+    label: '学号',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    field: 'name',
+    label: '姓名',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    field: 'schoolId',
+    label: '毕业学校',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    field: 'className',
+    label: '毕业班级',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    field: 'stduyStatus',
+    label: '就读方式',
+    component: 'ApiSelect',
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: getDataOption,
+      params: { code: 'stduy_status' },
+    },
+    colProps: { span: 8 },
+  },
+  {
+    field: 'classId',
+    label: '班级',
+    component: 'ApiSelect',
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: getClassOption,
+    },
+    colProps: { span: 8 },
+  },
+];
+
+export const table5Columns: BasicColumn[] = [
+  {
+    title: '专业方向',
+    dataIndex: 'studentId',
+    align: 'left',
+  },
+  {
+    title: '班级名称',
+    dataIndex: 'name',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '班主任',
+    dataIndex: 'gend',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '固定教室',
+    dataIndex: 'schoolName',
+    align: 'left',
+    width: 180,
+  },
+  {
+    title: '是否订单班',
+    dataIndex: 'className',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '班级人数',
+    dataIndex: 'stateType',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '男生人数',
+    dataIndex: 'hi',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '女生人数',
+    dataIndex: 'wg',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '住校人数',
+    dataIndex: 'score',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '走读人数',
+    dataIndex: 'cName',
+    align: 'left',
+    width: 120,
+  },
+];

+ 6 - 0
src/views/educational/division/index.vue

@@ -11,6 +11,9 @@
       <div class="page-dsion-body">
         <DsionStep1 v-show="state.stepIndex === 0" />
         <DsionStep2 v-show="state.stepIndex === 1" />
+        <DsionStep3 v-show="state.stepIndex === 2" />
+        <DsionStep4 v-show="state.stepIndex === 3" />
+        <DsionStep5 v-show="state.stepIndex === 4" />
       </div>
       <div class="page-dsion-floor">
         <a-button v-show="state.stepIndex !== 0" @click="handleStep(0)" class="ml-[24px]">
@@ -43,6 +46,9 @@
   import { reactive, onMounted } from 'vue';
   import DsionStep1 from './components/DsionStep1.vue';
   import DsionStep2 from './components/DsionStep2.vue';
+  import DsionStep3 from './components/DsionStep3.vue';
+  import DsionStep4 from './components/DsionStep4.vue';
+  import DsionStep5 from './components/DsionStep5.vue';
 
   const state = reactive({
     stepIndex: 0,

+ 52 - 0
src/views/system/external/index.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="example h-full">
+    <Spin :spinning="spinning" tip="正在加载,请稍等..." />
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { Spin } from 'ant-design-vue';
+  import { onMounted, ref, unref } from 'vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { requestMagicApi } from '/@/api/magicApi';
+  import { useRouter } from 'vue-router';
+  import { useUserStore } from '/@/store/modules/user';
+
+  const { createMessage } = useMessage();
+  const { currentRoute } = useRouter();
+  const { path } = unref(currentRoute);
+  const userStore = useUserStore();
+
+  const spinning = ref(true);
+
+  onMounted(async () => {
+    try {
+      const paths = path.split('/');
+      const code = paths.length > 0 ? paths[paths.length - 1] : '';
+      const data = await requestMagicApi({
+        url: 'baseData/system/config',
+        query: { code: code },
+      } as any);
+      if (data.length > 0) {
+        const url = `${data[0].value}?token=${userStore.getToken}`;
+        // console.log('url', url);
+        location.href = url;
+      } else {
+        createMessage.error('参数出错,请联系管理员');
+        spinning.value = false;
+      }
+    } catch {
+      createMessage.error('参数出错,请联系管理员');
+      spinning.value = false;
+    }
+  });
+</script>
+
+<style scoped lang="less">
+  .example {
+    text-align: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+</style>