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

comp.d.ts 新增

* master:
  .....
  提交
  提交

# Conflicts:
#	components.d.ts
la 2 éve%!(EXTRA string=óta)
szülő
commit
bb6234a0f6

+ 3 - 0
components.d.ts

@@ -27,7 +27,10 @@ declare module '@vue/runtime-core' {
     ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']

+ 5 - 1
src/App.vue

@@ -10,4 +10,8 @@ zhCn.el.pagination.goto = '跳至'
   </el-config-provider>
 
 </template>
-
+<style>
+body{
+  background: #f2f2f2;
+}
+</style>

+ 226 - 0
src/pages/process/create/index.vue

@@ -0,0 +1,226 @@
+<template>
+  <NavHeader/>
+  <bread-crumb/>
+  <div class="w-1200px m-auto">
+    <div class="relative -mt-40px flex justify-end">
+      <button type="button" class="back-btn" @click="linkTo('process')">返回</button>
+    </div>
+    <div class="mt-10px w-full min-h-860px bg-hex-FFF pt-25px">
+      <h3 class="text-18px text-center">新建考试计划</h3>
+      <div class="mt-60px pl-250px">
+        <el-form ref="ruleFormRef" :rules="rules" :model="createForm" label-width="120px" size="large" status-icon>
+          <el-form-item label="考试名称" prop="ksmc" style="width: 620px">
+            <el-input v-model="createForm.ksmc" placeholder="请输入考试名称" />
+          </el-form-item>
+          <el-form-item label="考试时间" prop="kssj" style="width: 620px">
+            <el-date-picker  v-model="createForm.kssj" type="datetimerange" range-separator="至" start-placeholder="考试开始时间"
+                            end-placeholder="考试结束时间" value-format="YYYY-MM-DD hh:mm:ss" />
+          </el-form-item>
+          <el-form-item label="考试类型" prop="kslx" style="width: 620px">
+            <el-radio-group v-model="createForm.kslx">
+              <el-radio v-for="item in type_list" :label="item.value">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item v-if="createForm.kslx === '7'" label="联考学校" prop="lkxx">
+            <el-select v-model="createForm.lkxx" style="width: 500px" multiple placeholder="请选择联考学校">
+              <el-option
+                v-for="item in school_list"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="考试年级" prop="ksnj">
+            <el-select v-model="createForm.ksnj" style="width: 500px" multiple placeholder="请选择考试年级">
+              <el-option
+                v-for="item in grade_list"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="考试科目" prop="kskm">
+            <el-select v-model="createForm.kskm" style="width: 500px" multiple placeholder="请选择考试科目">
+              <el-option
+                v-for="item in subject_list"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="阅卷流程" prop="yjlc" style="width: 620px">
+            <el-radio-group v-model="createForm.yjlc">
+              <el-radio v-for="item in process_type" :label="item.value">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item>
+            <div class="mt-50px pl-50px">
+              <el-button class="mr-20px" @click="linkTo('process')"><span class="px-40px">取消</span></el-button>
+              <el-button type="primary" color="#003eee" @click="handleSubmit(ruleFormRef)"><span class="px-40px">确定</span></el-button>
+            </div>
+
+
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+  </div>
+  <commonFooter/>
+</template>
+<route lang="json">
+{
+"meta":{
+"title":"新建考试计划",
+"breadcrumb": true
+}
+}
+</route>
+<script setup>
+import { useRouter } from "vue-router";
+const router = useRouter();
+const linkTo = (name) => {
+  router.push({ name });
+};
+const rules = $ref({
+  ksmc:[{ required: true, message: '请输入考试名称', trigger: 'blur' }],
+  kssj:[{ required: true, message: "请选择考试时间", trigger: "blur" }],
+  kslx: [{required: true, message: '请选择考试类型', trigger: 'change'}],
+  ksnj: [{required: true, message: '请至少选择一个年级', trigger: 'change'}],
+  kskm: [{required: true, message: '请至少选择一个科目', trigger: 'change'}],
+  yjlc: [{required: true, message: '请选择阅卷流程', trigger: 'change'}],
+  lkxx: [{required: true, message: '请至少选择一个学校', trigger: 'change'}],
+})
+const ruleFormRef = ref(null);
+let createForm = $ref({
+  ksmc:'',
+  kssj:'',
+  kslx:'',
+  ksnj:'',
+  kskm:'',
+  yjlc:'',
+  lkxx:''
+})
+let type_list = [{
+  value: '1',
+  label: '周考'
+}, {
+  value: '2',
+  label: '月考'
+}, {
+  value: '3',
+  label: '期中'
+},{
+  value: '4',
+  label: '期末'
+}, {
+  value: '5',
+  label: '作业'
+}, {
+  value: '6',
+  label: '测试'
+},{
+  value: '7',
+  label: '联考'
+}]
+let grade_list = [{
+  value: '1',
+  label: '一年级'
+}, {
+  value: '2',
+  label: '二年级'
+}, {
+  value: '3',
+  label: '三年级'
+},{
+  value: '4',
+  label: '四年级'
+}, {
+  value: '5',
+  label: '五年级'
+}, {
+  value: '6',
+  label: '六年级'
+},{
+  value: '7',
+  label: '初一'
+},{
+  value: '8',
+  label: '初二'
+},{
+  value: '9',
+  label: '初三'
+},{
+  value: '10',
+  label: '高一'
+},{
+  value: '11',
+  label: '高二'
+},{
+  value: '12',
+  label: '搞三'
+}]
+let subject_list = [{
+  value: '1',
+  label: '语文'
+}, {
+  value: '2',
+  label: '数学'
+}, {
+  value: '3',
+  label: '英语'
+},{
+  value: '4',
+  label: '物理'
+}, {
+  value: '5',
+  label: '生物'
+}, {
+  value: '6',
+  label: '化学'
+}]
+let process_type = [{
+  value: '1',
+  label: '先上传后划块'
+},{
+  value: '2',
+  label: '先划块后上传'
+}]
+let school_list = [{
+  value: '1',
+  label: '蒙阴市第一小学'
+},{
+  value: '2',
+  label: '蒙阴市第二小学'
+},{
+  value: '3',
+  label: '蒙阴市第三小学'
+},{
+  value: '4',
+  label: '蒙阴市第一中学'
+},{
+  value: '5',
+  label: '蒙阴市第二中学'
+},{
+  value: '6',
+  label: '蒙阴市第三中学'
+}]
+const handleCancel = () => {
+  router.back();
+}
+
+const handleSubmit = async (formEl) => {
+  if (!formEl) return;
+
+  formEl.validate(async (valid, fields) => {
+    if (valid) {
+
+    } else {
+      console.log("error submit!", fields);
+    }
+  });
+}
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 12
src/pages/process/detail/[id].vue

@@ -5,7 +5,7 @@
      <div class="relative -mt-40px flex justify-end">
        <button type="button" class="back-btn" @click="linkTo('process')">返回</button>
      </div>
-     <div class="w-full h-869px bg-hex-FFF pt-25px">
+     <div class="mt-10px w-full min-h-860px bg-hex-FFF pt-25px">
        <h3 class="text-18px text-center">详情</h3>
        <div class="mt-70px pl-300px">
          <div class="flex">
@@ -55,6 +55,7 @@
        </div>
      </div>
   </div>
+  <commonFooter/>
 </template>
 <route lang="json">
 {
@@ -67,23 +68,13 @@
 <script setup>
 import { useRouter } from "vue-router";
 const router = useRouter();
-console.log(router,87)
 const linkTo = (name) => {
   router.push({ name });
 };
 </script>
 
 <style lang="scss" scoped>
-.back-btn {
-  width: 90px;
-  height: 36px;
-  background: #fff;
-  border: 1px solid #003eee;
-  border-radius: 4px;
-  font-size: 14px;
-  color: #003eee;
-  text-align: center;
-}
+
 .process-state {
   width: 140px;
 

+ 13 - 3
src/pages/process/index.vue

@@ -41,7 +41,7 @@
       <el-button color="#003eee" class="ml-20px" type="primary" size="large">搜索</el-button>
     </div>
     <div class="flex mt-20px justify-between">
-      <button type="button" class="add-btn">
+      <button type="button" class="add-btn" @click="linkTo({name:'process-create'})">
         <el-icon class="inline-block align-middle">
           <Plus/>
         </el-icon>
@@ -305,6 +305,7 @@
 import {process_list} from "~/pages/process/api";
 import { useRouter } from "vue-router";
 const router = useRouter();
+console.log(router,87)
 const linkTo = (obj) => {
   router.push(obj);
 };
@@ -321,13 +322,22 @@ let form_list = [{
 }]
 let type_list = [{
   value: '1',
-  label: '考'
+  label: '考'
 }, {
   value: '2',
   label: '月考'
 }, {
   value: '3',
-  label: '周考'
+  label: '期中'
+},{
+  value: '4',
+  label: '期末'
+}, {
+  value: '5',
+  label: '作业'
+}, {
+  value: '6',
+  label: '测试'
 }]
 let subject_list = [{
   value: '1',

+ 9 - 2
src/styles/main.css

@@ -34,6 +34,13 @@ html.dark {
 .el-select .el-input.is-focus .el-input__wrapper{
   box-shadow: 0 0 0 1px #003eee!important;
 }
-.new-btn{
-
+.back-btn {
+  width: 90px;
+  height: 36px;
+  background: #fff;
+  border: 1px solid #003eee;
+  border-radius: 4px;
+  font-size: 14px;
+  color: #003eee;
+  text-align: center;
 }