Explorar el Código

批阅进度详情

luohailiang hace 1 año
padre
commit
1875973b21

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

@@ -116,7 +116,7 @@
                     </div>
                   </div>
                 </li>
-                <li class="cursor-pointer" @click="addSubject(item,index)">
+                <li class="cursor-pointer" @click="addSubject(item,index)" v-if="item.btn_check.btn_edit == '1'">
                   <div class="subject-add-btn"></div>
                 </li>
               </ul>

+ 176 - 0
src/pages/process/kmpyjdxq/[ykj_id]/[subject_id].vue

@@ -0,0 +1,176 @@
+<script setup>
+import request from "~/utils/request";
+import {REQUEST} from "~/utils/request";
+import {user} from "~/store";
+import {useRouter} from "vue-router";
+const router = useRouter();
+const route = useRoute();
+const linkTo = (obj) => {
+  router.push(obj);
+};
+let ykj_id = $ref('');
+let subject_id = $ref('');
+let detail = $ref({});
+let sm_id = $ref('');
+let school_list = $ref([])
+let subject_list = $ref([])
+function getFilterData() {
+  let data = {
+    ykj_id: ykj_id
+  };
+  request({
+    url: "/yzy/ksjh/detail",
+    data: data,
+  }).then((res) => {
+    if (res.code === '1') {
+      subject_list = res.data.one_info.ykj_kskm_ex;
+      school_list = res.data.one_info.ykj_lkxx_ex;
+    }
+  })
+}
+function getData() {
+  let data = {
+    ykj_id: ykj_id,
+    ysdt_subjectid:subject_id,
+    sm_id:sm_id
+  };
+  request({
+    url: "/yzy/jspyjd/kmpy_detail",
+    data: data,
+  }).then((res) => {
+    if (res.code === '1') {
+      detail = res.data;
+
+    }
+
+  })
+}
+if (route.params.ykj_id) {
+  ykj_id = route.params.ykj_id;
+  subject_id = route.params.subject_id;
+  getData();
+  getFilterData();
+}
+</script>
+<route lang="json">
+{
+"meta":{
+"title":"科目批阅进度详情",
+"breadcrumb":true
+}
+}
+</route>
+<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({name:'process-pyjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
+    </div>
+    <div class="mt-10px w-full bg-hex-fff py-20px min-h-700px px-15px">
+      <h3 class="mb-20px text-18px text-center">{{detail.jh_name}}</h3>
+      <div class="mt-20px flex items-center justify-between">
+        <div>
+          <el-select v-model="sm_id" placeholder="全部学校" size="large" @change="getData">
+            <el-option label="全部" value=""
+            />
+            <el-option
+              v-for="item in school_list"
+              :key="item.sm_id"
+              :label="item.sm_name"
+              :value="item.sm_id"
+            />
+          </el-select>
+        </div>
+        <ul class="sub-nav">
+          <li v-for="item in sub_nav" :class="item.id === cur_sub.id?'selected':''" @click="switchSub(item)">{{item.name}}</li>
+        </ul>
+      </div>
+      <h4 class="mt-30px text-16px text-hex-0148E5">{{detail.xueke_name}}—详情</h4>
+      <div class="mt-25px" v-if="detail.list && detail.list.length > 0">
+        <table class="data-table" cellpadding="0" cellspacing="0">
+          <tr>
+            <th>题目</th>
+            <th>批阅进度</th>
+            <th>总份数</th>
+            <th>完成量</th>
+            <th>异常数</th>
+            <th>平均分</th>
+            <th>满分</th>
+            <th>在线人数</th>
+          </tr>
+          <tr v-for="item in detail.list">
+            <td>{{item.hq_id}}</td>
+            <td>{{item.jd}}</td>
+            <td>{{item.zfs}}</td>
+            <td>{{item.wcl}}</td>
+            <td>{{item.ycs}}</td>
+            <td>{{item.pjf}}</td>
+            <td>{{item.mf}}</td>
+            <td>{{item.zxrs}}</td>
+          </tr>
+        </table>
+      </div>
+      <div class="mt-25px no-data" v-else>
+        <div>
+          <h3 class="no-data-img"></h3>
+          <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style scoped lang="scss">
+$color: #0048e5;
+.data-table {
+  width: 100%;
+  table-layout: fixed;
+
+  tr:nth-child(even) {
+    background: #F1F7FF;
+  }
+
+  th {
+    padding: 15px 0;
+    background: $color;
+    font-weight: normal;
+    text-align: center;
+    font-size: 16px;
+    color: #fff;
+    &:first-child{
+      border-radius: 6px 0 0 0;
+      text-align: left;
+      padding-left: 30px;
+    }
+    &:last-child{
+      border-radius: 0 6px 0 0;
+    }
+  }
+
+  td {
+    padding: 15px 0;
+    font-size: 16px;
+    color: #474747;
+    text-align: center;
+    &:first-child{
+      text-align: left;
+      padding-left: 30px;
+    }
+  }
+}
+
+.no-data {
+  width: 100%;
+  height: 450px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .no-data-img {
+    width: 233px;
+    height: 199px;
+    background: url("/images/no-data.png") center no-repeat;
+  }
+}
+</style>

+ 113 - 0
src/pages/process/pyjd/[id]/[bh].vue

@@ -10,10 +10,34 @@ const linkTo = (obj) => {
 };
 let ykj_id = $ref('');
 let bh = $ref('');
+let detail = $ref({});
+let total_list = $ref([]);
+function getData() {
+  let data = {
+    ykj_id: ykj_id,
+    ysdt_pyyhbh:bh
+  };
+  request({
+    url: "/yzy/jspyjd/py_detail",
+    data: data,
+  }).then((res) => {
+    if (res.code === '1') {
+      detail = res.data;
+      total_list = res.data.list.reduce((prev, cur) => {
+          const ysdt_pydf = cur.ysdt_pydf;
+          ysdt_pydf.forEach((item, index) => {
+            prev[index] = (prev[index] || 0) + Number(item);
+          });
+          return prev;
+        }, []);
+    }
 
+  })
+}
 if (route.params.id) {
   ykj_id = route.params.id;
   bh = route.params.bh;
+  getData();
 }
 </script>
 <route lang="json">
@@ -31,9 +55,98 @@ if (route.params.id) {
     <div class="relative -mt-40px flex justify-end">
       <button type="button" class="back-btn" @click="linkTo({name:'process-pyjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
     </div>
+    <div class="mt-10px w-full bg-hex-fff py-20px min-h-700px px-15px">
+      <h3 class="mb-20px text-18px text-center">{{detail.jh_name}}</h3>
+      <h4 class="text-16px text-hex-0148E5">{{detail.tacher_name}}老师—批阅详情</h4>
+      <div class="mt-25px" v-if="detail.list && detail.list.length > 0">
+        <table class="data-table" cellpadding="0" cellspacing="0">
+          <tr>
+            <th v-for="(item,index) in detail.titles">
+              <div v-if="index === 0">
+                <h3 class="text-16px text-hex-ffffff">{{item.th}}/</h3>
+                <h3 class="mt-8px text-16px text-hex-ffffff">{{item.mf}}</h3>
+              </div>
+              <div v-else>
+                <h3 class="text-16px text-hex-ffffff">{{item.th}}</h3>
+                <h3 class="mt-8px text-16px text-hex-ffffff">【满分{{item.mf}}】</h3>
+              </div>
+            </th>
+          </tr>
+          <tr v-for="item in detail.list">
+            <td>{{item.username}}</td>
+            <td v-for="items in item.ysdt_pydf">{{items}}</td>
+          </tr>
+          <tr>
+            <td>
+              <h3 class="text-16px text-hex-ff0000">合计平均分</h3>
+
+            </td>
+            <td v-for="item in total_list">
+              <h3 class="text-16px text-hex-ff0000">{{(item/detail.list.length).toFixed(1)}}</h3>
+            </td>
+          </tr>
+        </table>
+      </div>
+      <div class="mt-25px no-data" v-else>
+        <div>
+          <h3 class="no-data-img"></h3>
+          <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <style scoped lang="scss">
+$color: #0048e5;
+.data-table {
+  width: 100%;
+  table-layout: fixed;
+
+  tr:nth-child(even) {
+    background: #F1F7FF;
+  }
+
+  th {
+    padding: 15px 0;
+    background: $color;
+    font-weight: normal;
+    text-align: center;
+    font-size: 16px;
+    color: #fff;
+    &:first-child{
+      border-radius: 6px 0 0 0;
+      text-align: left;
+      padding-left: 30px;
+    }
+    &:last-child{
+      border-radius: 0 6px 0 0;
+    }
+  }
 
+  td {
+    padding: 15px 0;
+    font-size: 16px;
+    color: #474747;
+    text-align: center;
+    &:first-child{
+      text-align: left;
+      padding-left: 30px;
+    }
+  }
+}
+
+.no-data {
+  width: 100%;
+  height: 450px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .no-data-img {
+    width: 233px;
+    height: 199px;
+    background: url("/images/no-data.png") center no-repeat;
+  }
+}
 </style>

+ 2 - 2
src/pages/process/pyjd/[ykj_id].vue

@@ -6,6 +6,7 @@ import {user} from "~/store";
 import {useRouter} from "vue-router";
 const router = useRouter();
 const route = useRoute();
+console.log(router,8)
 const linkTo = (obj) => {
   router.push(obj);
 };
@@ -75,7 +76,6 @@ function getData() {
         })
 
       }
-
     }
   })
 }
@@ -307,7 +307,7 @@ onMounted(() => {
             <td>{{item.mf}}</td>
             <td>{{item.zxrs}}</td>
             <td>
-              <button type="button" class="op-btn">查看详情</button>
+              <button type="button" class="op-btn" @click="linkTo({name:'process-kmpyjdxq-ykj_id-subject_id',params:{ykj_id:ykj_id,subject_id:item.subject_id}})">查看详情</button>
             </td>
           </tr>
         </table>