ZhaoJing 2 роки тому
батько
коміт
390c719324

+ 4 - 4
src/components.d.ts

@@ -14,13 +14,12 @@ declare module '@vue/runtime-core' {
     VanButton: typeof import('vant/es')['Button']
     VanCard: typeof import('vant/es')['Card']
     VanCellGroup: typeof import('vant/es')['CellGroup']
-    VanCheckbox: typeof import('vant/es')['Checkbox']
-    VanCollapse: typeof import('vant/es')['Collapse']
-    VanCollapseItem: typeof import('vant/es')['CollapseItem']
     VanConfigProvider: typeof import('vant/es')['ConfigProvider']
     VanDialog: typeof import('vant/es')['Dialog']
+    VanDivider: typeof import('vant/es')['Divider']
     VanDropdownItem: typeof import('vant/es')['DropdownItem']
     VanDropdownMenu: typeof import('vant/es')['DropdownMenu']
+    VanField: typeof import('vant/es')['Field']
     VanForm: typeof import('vant/es')['Form']
     VanGrid: typeof import('vant/es')['Grid']
     VanGridItem: typeof import('vant/es')['GridItem']
@@ -29,8 +28,9 @@ declare module '@vue/runtime-core' {
     VanLoading: typeof import('vant/es')['Loading']
     VanNavBar: typeof import('vant/es')['NavBar']
     VanPullRefresh: typeof import('vant/es')['PullRefresh']
+    VanRadio: typeof import('vant/es')['Radio']
+    VanRadioGroup: typeof import('vant/es')['RadioGroup']
     VanRate: typeof import('vant/es')['Rate']
-    VanSticky: typeof import('vant/es')['Sticky']
     VanSwipe: typeof import('vant/es')['Swipe']
     VanSwipeItem: typeof import('vant/es')['SwipeItem']
     VanTab: typeof import('vant/es')['Tab']

+ 1 - 1
src/pages/_home/index.vue

@@ -148,7 +148,7 @@ function routerLink() {
       <van-swipe-item v-for="image in images" :key="image">
         <img :src="image" class="w-full" />
       </van-swipe-item>
-      <van-swipe-item v-if="childrenList.length==0">
+      <van-swipe-item v-if="user._role === 'jz'&& childrenList.length==0">
         <img @click="register()" src="../../assets/home/banner3.png" style="height:100%" class="w-full" alt="">
       </van-swipe-item>
     </van-swipe>

+ 83 - 58
src/pages/_home/xszc.vue

@@ -9,8 +9,14 @@
     <div>
       <van-form @submit="onSubmit" class="bg-light-50 w-full p-0">
         <van-cell-group inset v-for="(g, i) in forms">
-          <div v-if="childrenList.length > 1" class="text-center px-6">
-            <span>学生{{ childrenList.length + 1 }}</span>
+          <div
+            v-if="childrenList.length > 1 || forms.length > 1"
+            class="text-center px-6 mt-2"
+          >
+            <span v-if="childrenList.length > 1"
+              >学生{{ childrenList.length + 1 }}</span
+            >
+            <span v-if="forms.length > 1">学生{{ i + 1 }}</span>
             <span
               class="text-red-500 float-right cursor-pointer"
               @click="deleteStu(i)"
@@ -22,7 +28,7 @@
             <input
               class="pl-2 py-2 ml-2 w-7/9"
               style="border: 1px solid #f2f2f2; border-radius: 5px"
-              v-model="g.name"
+              v-model="g.student_realname"
               label="姓名"
               placeholder="姓名"
             />
@@ -30,15 +36,14 @@
           <div class="flex items-center w-full mt-2">
             <span>年级</span>
             <select
-              @change="njChange"
               class="w-7/9 bg-light-100 py-3 pl-2 ml-2 border_gray"
-              v-model="g.grade"
+              v-model="g.gradenum"
             >
               <option value="" label="年级" disabled class="text-gray-500">
                 年级
               </option>
               <option
-                v-for="n in nj"
+                v-for="n in njList"
                 :key="n.grade"
                 :value="n.grade"
                 :label="n.gradename"
@@ -50,18 +55,12 @@
           <div class="flex items-center w-full mt-2">
             <span>班级</span>
             <select
-              @change="classChange"
               class="w-7/9 bg-light-100 py-3 pl-2 ml-2 border_gray"
-              v-model="g.class"
+              v-model="g.classnum"
             >
               <option value="" label="班级" disabled>班级</option>
-              <option
-                v-for="b in bj"
-                :key="b.cm_id"
-                :value="b.cm_id"
-                :label="b.cm_name"
-              >
-                {{ b.cm_name }}
+              <option v-for="b in 30" :key="b" :value="b" :label="b + '班'">
+                {{ b }}班
               </option>
             </select>
           </div>
@@ -71,14 +70,18 @@
               placeholder="关系"
               class="pl-2 py-2 ml-2 w-7/9"
               style="border: 1px solid #f2f2f2; border-radius: 5px"
-              v-model="g.relative"
+              v-model="g.relation"
             />
           </div>
         </van-cell-group>
         <div style="margin: 32px 64px">
           <van-button icon="plus" block type="primary" @click="addStu">
-            <span v-if="childrenList.length <= 1">多子女添加</span>
-            <span v-if="childrenList.length > 1">继续添加</span>
+            <span v-if="childrenList.length <= 1 && forms.length <= 1"
+              >多子女添加</span
+            >
+            <span v-if="childrenList.length > 1 || forms.length > 1"
+              >继续添加</span
+            >
           </van-button>
         </div>
         <div style="margin: 16px">
@@ -104,14 +107,24 @@
   </div>
 </template>
 <script setup>
+import { showToast } from "vant";
 import { useRouter } from "vue-router";
 const router = useRouter();
 const onClickLeft = () => history.back();
+let baseURL = window.GLOBAL_CONFIG.uc;
+let forms = $ref([
+  {
+    student_realname: "",
+    gradenum: "",
+    classnum: "",
+    relation: "",
+  },
+]);
 let childrenList = $ref([]);
-
+let njList = $ref([]);
 function initData() {
   request({
-    baseURL: window.GLOBAL_CONFIG.uc,
+    baseURL,
     timeout: 10 * 1000,
     url: "/index.php?mod=user&action=main&do=my_child",
     data: {},
@@ -120,47 +133,28 @@ function initData() {
       childrenList = res.data.info;
     }
   });
+  request({
+    baseURL,
+    url: "/school/main/detail?mod=school&action=main&do=detail",
+    data: {
+      token:'',
+      sm_id: "666",
+    },
+  }).then((res) => {
+    if (res.code == "1") {
+      njList = res.data.one_info.school_grade;
+    }
+  });
 }
 initData();
-let forms = $ref([
-  {
-    name: "",
-    grade: "",
-    class: "",
-    relative: "",
-  },
-]);
-let gradePicker = $ref(false);
-let gradeColumns = $ref([
-  {
-    grade: "二年级",
-    id: "2",
-  },
-  {
-    grade: "一年级",
-    id: "1",
-  },
-]);
-
-// let data = {
-//     sm_id: user.sm_info.sm_id,
-//   };
-
-// let nj = $ref([]);
-// request({
-//   url: "https://uc.bozedu.net/index.php?mod=class&action=main&do=grade_class",
-//   data: {},
-// }).then((res) => {
-//   nj = res.data;
-// });
 
 // 添加学生信息
 function addStu() {
   forms.push({
-    name: "",
-    grade: "",
-    class: "",
-    relative: "",
+    student_realname: "",
+    gradenum: "",
+    classnum: "",
+    relation: "",
   });
 }
 
@@ -173,9 +167,40 @@ let dialogShow = $ref(false);
 let coverShow = $ref(false);
 // 添加申请
 const onSubmit = (values) => {
-  console.log("submit", values);
-  dialogShow = true;
-  coverShow = true;
+  console.log(forms);
+  let isFlag = true;
+  forms.forEach((item) => {
+    Object.keys(item).forEach((key) => {
+      if (Array.isArray(item[key])) {
+        item[key].forEach((val) => {
+          Object.keys(val).forEach((key) => {
+            if (val[key] == "" || item[key] == null) {
+              isFlag = false;
+            }
+          });
+        });
+      }
+    });
+  });
+  if (isFlag === false) {
+    return showToast("请填写完成~");
+  }
+  let data = {
+    sm_id: "666",
+    child: JSON.stringify(forms),
+  };
+  request({
+    baseURL,
+    url: "/user/main/parent_supply_stureg",
+    data,
+  }).then((res) => {
+    if (res.code == "1") {
+      dialogShow = true;
+      coverShow = true;
+    }else{
+      showToast(res.msg)
+    }
+  });
 };
 function handleBack() {
   router.push("/home");

+ 7 - 6
src/pages/stxkjs/index.vue

@@ -72,7 +72,8 @@
             <h3 class="c-name">{{ c.khfw_kcbgl.kk_name }}</h3>
             <p class="c-detail">
               <span>主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
-              <span>地点:{{ c.khfw_kcbgl.kj_name }}</span>
+              <span> 地点:{{ c.khfw_kcbgl.kj_name }}</span>
+              <span> 课时数: {{ c.khfw_kcgl.kk_kss }}</span>
             </p>
             <div class="c-date">
               <span class="date"
@@ -141,7 +142,7 @@
         />
         <h3>上传教案</h3>
         <p class="rule">支持的格式:jpg,png,pdf,word,ppt</p>
-        <div v-show="plan">
+        <div v-if="plan">
           <div class="upload">
             <van-uploader
               v-model="jafile"
@@ -162,7 +163,7 @@
             <button>完成</button>
           </div>
         </div>
-        <div class="planed">
+        <div class="planed" v-else>
           <ul class="upload">
             <li v-for="(p, i) in planMsg" :key="i" class="up-plan">
               <div>
@@ -172,7 +173,7 @@
               </div>
               <span class="bar"
                 >(100/100)100%上传成功
-                <span class="delete" @click="jaDelete(p)">删除</span>
+                <span class="delete cursor-pointer" @click="jaDelete(p)">删除</span>
               </span>
             </li>
           </ul>
@@ -589,9 +590,9 @@ getColor();
       cursor: pointer;
     }
     h3 {
-      width: 1.26 * 13.3vw;
+      width: 1.5 * 13.3vw;
       height: 0.4 * 13.3vw;
-      font-size: 0.3 * 13.3vw;
+      font-size: 3.8vw;
       position: relative;
     }
     h3::before {

+ 14 - 7
src/pages/stxkjs/stxk_js_classdetail/index.vue

@@ -8,6 +8,7 @@
     />
     <div class="detail" v-if="classdetail.khfw_kcgl">
       <h3 class="title">{{ classdetail.khfw_kcgl.kk_name }}</h3>
+      <p class="text-3vw text-gray-500 my-2"> <span>主讲 : {{ classdetail.teach_info.kkb_zjjs_xm }}</span> <span>地点:{{ classdetail.teach_info.kj_name }} <span>课时: {{ classdetail.khfw_kcgl.kk_kss }}</span></span> </p>
       <p class="date">
         {{ classdetail.kkbk_starttime }} - {{ classdetail.kkbk_endtime }}
       </p>
@@ -22,20 +23,25 @@
           <span class="stu-num">上课人数:{{ classdetail.member.length }}</span>
           <div class="students">
             <span
+            class="stu-name"
               @click="selectStudent(stu)"
               :class="{ redName: stu.kccq_cqycztbh == 2 || stu.is_cq == 2 }"
               v-for="stu in classdetail.member"
               :key="stu"
-              >{{ stu.kkbm_s_realname }} <i v-show="stu.kccq_cqycztbh == 2"></i
+              >{{ stu.kkbm_s_realname }} {{ stu.kkbm_s_class_name }} <i v-show="stu.kccq_cqycztbh == 2"></i
             ></span>
-            <div class="check">
-              <input type="checkbox" v-model="isTellCheck" />
-              <p>迟到/缺勤通知家长</p>
+            <van-radio-group v-model="checked" direction="horizontal" class="text-3.5vw mt-5">
+              <van-radio name="1" shape="square" icon-size="4vw" class="text-blue-500">未到</van-radio>
+              <van-radio name="2" shape="square" icon-size="4vw">补卡</van-radio>
+            </van-radio-group>
+            <!-- <div class="check">
+              <input :disabled="plusCheck" type="checkbox" v-model="isTellCheck" />
+              <p>未到</p>
             </div>
             <div class="check">
-              <input type="checkbox" v-model="plusCheck" />
+              <input :disabled="isTellCheck" type="checkbox" v-model="plusCheck" />
               <p>补卡</p>
-            </div>
+            </div> -->
           </div>
           <div class="submit">
             <button @click="submitDM(classdetail.member)">提交</button>
@@ -249,6 +255,7 @@ function getDetail() {
 getDetail();
 
 // 点名
+let checked = $ref('1')
 function selectStudent(stu) {
   if (stu.kccq_cqycztbh == 2) {
     stu.kccq_cqycztbh = 0;
@@ -562,7 +569,7 @@ function delCd(c) {
     }
     .students {
       margin-top: 0.3 * 13.3vw;
-      span {
+      .stu-name {
         // display: inline-block;
         padding: 0.05 * 13.3vw 0.08 * 13.3vw;
         line-height: 0.4 * 13.3vw;