luohailiang 2 years ago
parent
commit
edababe09a
5 changed files with 142 additions and 70 deletions
  1. 28 0
      src/components/commonFooter/index.vue
  2. 0 3
      src/pages/index/api.js
  3. 112 64
      src/pages/index/index.vue
  4. 1 2
      src/utils/request.ts
  5. 1 1
      vite.config.ts

+ 28 - 0
src/components/commonFooter/index.vue

@@ -0,0 +1,28 @@
+<template>
+<div class="mt-15px footer bg-hex-003eee text-white text-center pb-10px">
+  <div class="w-1200px m-auto">
+    <h3 class="text-13px text-center leading-35px">Copyright ©2019精准教学 版权所有 苏州博智电子科技有限公司</h3>
+    <h4 class="mt-5px text-13px">
+      <a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=32050702010915">苏公网安备 32050702010915号</a>
+    </h4>
+    <h4 class="mt-10px text-13px">
+      技术支持 <a href="https://qqyxt.bozedu.net">亲亲云学堂</a> 2019
+      <a href="https://beian.miit.gov.cn/#/Integrated/index">( 苏ICP备15025316号 )</a>
+    </h4>
+  </div>
+</div>
+</template>
+
+<script>
+export default {
+  name: "index"
+}
+</script>
+
+<style lang="scss">
+$color: #003eee;
+.footer{
+  width: 100%;
+
+}
+</style>

+ 0 - 3
src/pages/index/api.js

@@ -6,6 +6,3 @@ export const process_list = (data = {}) => {
     data,
   })
 }
-export default {
-
-}

+ 112 - 64
src/pages/index/index.vue

@@ -1,64 +1,3 @@
-<route lang="json">
-{
-"meta":{
-"title":"阅卷流程",
-"breadcrumb": true
-}
-}
-</route>
-<script setup>
-// import {process_list} from "~/pages/index/api";
-import { useRouter } from "vue-router";
-const router = useRouter();
-const linkTo = (name) => {
-  router.push({ name });
-};
-let exam_time = $ref('')
-let exam_form = $ref('')
-let exam_type = $ref('')
-let keyword = $ref('')
-let form_list = [{
-  value: '1',
-  label: '线上考试'
-}, {
-  value: '2',
-  label: '线下考试'
-}]
-let type_list = [{
-  value: '1',
-  label: '联考'
-}, {
-  value: '2',
-  label: '月考'
-}, {
-  value: '3',
-  label: '周考'
-}]
-let chooseCheck = $ref([]);
-let checked = $ref(false);
-let checkedIds = $ref([]);
-let noData = $ref(null);
-let limit = $ref(10);
-let total = $ref(0);
-let cur_page = $ref(1);
-let listData = $ref([]);
-function chooseAll() {
-
-}
-// function getListData() {
-//   let data = {
-//     page:cur_page,
-//     limit:limit,
-//   };
-//   process_list(data).then(res=>{
-//     if(res.code === '1') {
-//       listData = res.data.page_data;
-//       total = Number(res.data.total_rows);
-//       cur_page = Number(res.data.page_now);
-//     }
-//   })
-// }
-</script>
 <template>
   <NavHeader/>
   <bread-crumb/>
@@ -274,7 +213,7 @@ function chooseAll() {
                   </div>
                 </div>
               </li>
-              <li class="cursor-pointer">
+              <li class="cursor-pointer" @click="dialogVisible = true">
                 <div class="subject-add-btn"></div>
               </li>
             </ul>
@@ -323,11 +262,120 @@ function chooseAll() {
 
     </div>
     <div class="mt-20px page-new flex justify-end">
-      <el-pagination v-model:current-page="cur_page" v-model:page-size="limit" layout="prev, pager, next" :total="total" :background="true" @current-change="handleSelectionChange"></el-pagination>
+      <el-pagination v-model:current-page="cur_page" v-model:page-size="limit" layout="total,prev, pager, next" :total="total" :background="true" @current-change="handleSelectionChange"></el-pagination>
     </div>
   </div>
-
+  <el-dialog
+    v-model="dialogVisible"
+    title="增加考试学科"
+    width="500px"
+    center
+    append-to-body
+  >
+    <div>
+      <el-form label-width="120px" size="large">
+        <el-form-item label="请选择学科">
+          <el-select v-model="add_sub_id" placeholder="请选择学科">
+            <el-option v-for="item in subject_list" :label="item.label" :value="item.value" />
+          </el-select>
+        </el-form-item>
+      </el-form>
+    </div>
+    <template #footer>
+      <span class="dialog-footer text-right">
+        <el-button @click="dialogVisible = false" size="large">取消</el-button>
+        <el-button size="large" type="primary" @click="dialogVisible = false">
+          确定
+        </el-button>
+      </span>
+    </template>
+
+  </el-dialog>
+  <commonFooter/>
 </template>
+<route lang="json">
+{
+"meta":{
+"title":"阅卷流程",
+"breadcrumb": true
+}
+}
+</route>
+<script setup>
+import {process_list} from "~/pages/index/api";
+import { useRouter } from "vue-router";
+const router = useRouter();
+const linkTo = (name) => {
+  router.push({ name });
+};
+let exam_time = $ref('')
+let exam_form = $ref('')
+let exam_type = $ref('')
+let keyword = $ref('')
+let form_list = [{
+  value: '1',
+  label: '线上考试'
+}, {
+  value: '2',
+  label: '线下考试'
+}]
+let type_list = [{
+  value: '1',
+  label: '联考'
+}, {
+  value: '2',
+  label: '月考'
+}, {
+  value: '3',
+  label: '周考'
+}]
+let subject_list = [{
+  value: '1',
+  label: '语文'
+}, {
+  value: '2',
+  label: '数学'
+}, {
+  value: '3',
+  label: '英语'
+},{
+  value: '4',
+  label: '物理'
+}, {
+  value: '5',
+  label: '生物'
+}, {
+  value: '6',
+  label: '化学'
+}]
+let chooseCheck = $ref([]);
+let checked = $ref(false);
+let checkedIds = $ref([]);
+let noData = $ref(null);
+let limit = $ref(10);
+let total = $ref(0);
+let cur_page = $ref(1);
+let listData = $ref([]);
+let dialogVisible = $ref(false)
+let add_sub_id = $ref('')
+function chooseAll() {
+
+}
+function getListData() {
+  let data = {
+    page:cur_page,
+    limit:limit,
+  };
+  process_list(data).then(res=>{
+    if(res.code === '1') {
+      listData = res.data.page_data;
+      total = Number(res.data.total_rows);
+      cur_page = Number(res.data.page_now);
+    }
+  })
+}
+getListData();
+</script>
 <style lang="scss" scoped>
 $color: #003eee;
 ::v-deep .el-pagination.is-background .btn-next.is-active,

+ 1 - 2
src/utils/request.ts

@@ -10,7 +10,7 @@ export interface Response {
 }
 
 const instance = axios.create({
-  baseURL: window.GLOBAL_CONFIG.api,
+  baseURL: window.GLOBAL_CONFIG.yzy,
   timeout: 180 * 1000,
   headers: {
     'Content-Type': 'application/x-www-form-urlencoded',
@@ -29,7 +29,6 @@ instance.interceptors.request.use(
           token,
           client: 'web',
           api: 'json',
-          site: 'txwx',
           issubmit: (config.url?.endsWith('add') || config.url?.endsWith('edit')) ? '1' : undefined,
         },
         config.data)

+ 1 - 1
vite.config.ts

@@ -26,7 +26,7 @@ export default defineConfig({
     }),
     WindiCss(),
     // https://github.com/hannoeru/vite-plugin-pages
-    Pages(),
+    Pages({extensions: ['vue']}),
 
     // https://github.com/antfu/unplugin-auto-import
     AutoImport({