瀏覽代碼

研发需求224数字教师资源审核

houxq 1 年之前
父節點
當前提交
2346d04a2c
共有 3 個文件被更改,包括 87 次插入13 次删除
  1. 1 1
      src/layout/app/index.vue
  2. 1 0
      src/pages/home/zysh/detail.vue
  3. 85 12
      src/pages/home/zysh/index.vue

+ 1 - 1
src/layout/app/index.vue

@@ -13,7 +13,7 @@ const router = useRouter()
         <AppSider />
       </el-scrollbar>
     </aside>
-    <div class="flex flex-1 flex-col bg-hex-f7fbfd">
+    <div class="flex flex-1 flex-col bg-hex-f7fbfd overflow-hidden">
       <header class="w-full bg-white">
         <AppHeader />
       </header>

+ 1 - 0
src/pages/home/zysh/detail.vue

@@ -156,6 +156,7 @@ const checkSubmit = (formEl) => {
         data: {
           as_id: route.query.as_id,
           aimooc_spjj: {
+            as_zy_shr_v2:user.value.user_realname,
             as_zy_shzt_v2: checkForm.value.result, //审核状态 ;radio;1|已通过,2|未通过,3|待审核
             as_zy_shbz_v2: checkForm.value.reason, //审核原因
           },

+ 85 - 12
src/pages/home/zysh/index.vue

@@ -16,7 +16,7 @@ const form_query = $ref({
   page: 1,
   limit: 6,
   keyword:"",
-  as_zy_shzt_v2: "3",
+  as_zy_shzt_v2: "1",
   azz_ssnj_v2:"",
   azz_id_v2:"",
   check:"1"
@@ -76,7 +76,6 @@ async function initData() {
     total = Number(data.total_rows);
   }
 }
-initData();
 
 function handleCurrentChange(val) {
   form_query.page = val;
@@ -132,7 +131,11 @@ function handleMutiAudit() {
     url: "/aimooc/spjj/edit",
     data: {
       as_id: multipleSelection.join(","),
-      as_zy_shzt_v2: "1",
+         aimooc_spjj: {
+           as_zy_shzt_v2: "1",
+           as_zy_shr_v2:user.value.user_realname
+          },
+     
     },
   })
     .then((res) => {
@@ -150,19 +153,72 @@ function exportList() {
   let ids = multipleSelection.join(",");
   let link =
     window.GLOBAL_CONFIG.api +
-    "/aimooc/spjj/index?api=xls&simple=1&page=1&limit=10000&as_zy_shzt_v2=3&token=" +
+    "/aimooc/spjj/index?api=xls&simple=1&page=1&limit=10000&check=1&token=" +
     user.value.token +
     "&as_id=" +
-    ids;
+    ids+"&as_zy_shzt_v2="+status.value;
   console.log(link);
   window.open(link, "_blank");
 }
+const status = ref("1");
+const statusData = ref([
+   {
+    name: "已通过",
+    status: "1",
+  },
+  {
+    name: "未通过",
+    status: "2",
+  },
+  {
+    name: "待审核",
+    status: "3",
+  },
+ 
+]);
+let tab = sessionStorage.getItem('tab');
+if (tab) {
+  changeStatus(tab)
+} else {
+  changeStatus('1')
+}
+function changeStatus(data) {
+  status.value = data; 
+  form_query.as_zy_shzt_v2=data;
+  form_query.keyword="";
+  form_query.azz_ssnj_v2='';
+  form_query.azz_id_v2='';
+  multipleSelection = [];
+   sessionStorage.setItem("tab", status.value)
+  initData();
+}
+
+function formatTime(val) {
+  // 将整数转为毫秒数
+  const timestamp = val * 1000;
+  // 创建 Date 对象
+  const date = new Date(timestamp);
+  // 获取年、月、日、时、分、秒
+  const year = date.getFullYear();
+  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1
+  const day = String(date.getDate()).padStart(2, '0');
+  const hours = String(date.getHours()).padStart(2, '0');
+  const minutes = String(date.getMinutes()).padStart(2, '0');
+  const seconds = String(date.getSeconds()).padStart(2, '0');
+  // 拼接成年月日时分秒格式
+  const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+  return formattedDate;
+}
 </script>
 
 <template>
     <div class="h-full flex flex-col" >
-      <div class="mb-12px flex items-center justify-end">
-        <div class="flex items-center">
+ 
+<div class="my-15px flex items-center justify-between">
+      <div class="flex space-x-6">
+        <div v-for="(item, index) in statusData" :key="index" class="pageTitle" :class="status == item.status && 'active'" @click="changeStatus(item.status)">{{ item.name }}</div>
+      </div>
+      <div class="flex items-center">
           <el-button
             plain
             class="ml-33px h-42px w-130px"
@@ -177,11 +233,12 @@ function exportList() {
             type="primary"
             class="h-42px w-130px"
             @click="handleMutiAudit"
+            v-if="status=='3'"
           >
             批量通过
           </el-button>
           <el-input
-            class=" ml-20px h-42px rounded-8px"
+            class="ml-20px h-42px rounded-8px"
             placeholder="搜索"
             :prefix-icon="Search"
             v-model="form_query.keyword"
@@ -189,8 +246,7 @@ function exportList() {
             clearable
           />
         </div>
-      </div>
-
+    </div>
       <div class="h-full rounded-12px bg-white">
         <div class="flex items-center justify-end pr-80px pt-20px">
           <div class="mr-10px">筛选</div>
@@ -265,14 +321,27 @@ function exportList() {
             label="所属专业"
             show-overflow-tooltip
          >
-           
            </el-table-column> 
           <el-table-column
+          v-if="status!='3'"
+            prop="as_zy_shr_v2"
+            label="审核人"
+            show-overflow-tooltip
+          />
+           <el-table-column
+            v-if="status!='3'"
+            prop="modify_dateline"
+            label="审核时间"
+            show-overflow-tooltip
+          > 
+            <template #default="scope">{{ formatTime(scope.row.modify_dateline) }}</template>
+          </el-table-column>
+          <el-table-column
             prop="as_zy_zyscsj_v2"
             label="上传时间"
             show-overflow-tooltip
           />
-          <el-table-column label="操作" width="auto">
+          <el-table-column label="操作" width="180">
             <template #default="{ row }">
               <img
                 class="cursor-pointer"
@@ -307,6 +376,7 @@ function exportList() {
 </route>
 
 <style lang="scss" scoped>
+@use "~/styles/page.scss";
 :deep {
  .el-table__body tr {
     height: 76px;
@@ -365,4 +435,7 @@ function exportList() {
     }
   }
 }
+  .pageTitle{
+    color: #3f3f44;
+  }
 </style>