Преглед на файлове

Merge branch 'bencao' of ssh://gogs.hanyiyun.com:2222/xmnk/party into bencao

xsc преди 1 година
родител
ревизия
54606f5409
променени са 6 файла, в които са добавени 60 реда и са изтрити 37 реда
  1. 9 1
      .env.development
  2. 1 0
      src/router/index.js
  3. 2 1
      src/views/kaohe/components/detail.vue
  4. 27 15
      src/views/kaohe/rewardList.vue
  5. 8 7
      src/views/kaohe/uploadList.vue
  6. 13 13
      vue.config.js

+ 9 - 1
.env.development

@@ -1,8 +1,16 @@
+###
+ # @FilePath: .env.development
+ # @Author: 旭颖
+ # @Date: 2022-11-21 11:10:29
+ # @LastEditors: 
+ # @LastEditTime: 2023-03-24 17:27:46
+### 
 # just a flag
 ENV = 'development'
 
 # base api
-VUE_APP_BASE_API = 'http://api.party.site.ximengnaikang.com'
+ VUE_APP_BASE_API = '/stage-api'
+# VUE_APP_BASE_API = 'http://api.party.site.ximengnaikang.com'
 # VUE_APP_BASE_API = 'http://zhdj.xxjsxy.hactcm.edu.cn/api'
 VUE_Sidebar_Title='党员管理系统', //左侧导航栏标题
 VUE_Title='党员管理', //浏览器导航栏显示标题

+ 1 - 0
src/router/index.js

@@ -295,6 +295,7 @@ export const asyncRoutes = [
           icon: "message",
           roles: ["Student", "Super admin", "Admin"],
         },
+        hidden: true,
       },
 
       {

+ 2 - 1
src/views/kaohe/components/detail.vue

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2023-03-22 11:54:21
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-03-24 17:08:43
+ * @LastEditTime: 2023-03-24 17:48:03
 -->
 <template>
   <el-drawer
@@ -69,6 +69,7 @@ export default {
       });
     },
     handleClose() {
+      this.$emit('fetch-data')
       this.dialogVisible = false;
     },
     async showEdit(row) {

+ 27 - 15
src/views/kaohe/rewardList.vue

@@ -3,11 +3,11 @@
  * @Author: 旭颖
  * @Date: 2023-03-22 10:15:16
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-03-24 16:44:45
+ * @LastEditTime: 2023-03-24 18:13:52
 -->
 <template>
   <div class="index-home" v-loading.fullscreen.lock="loadingFull">
-    <el-page-header @back="goBack" content="考核详情"> </el-page-header>
+    <el-page-header @back="goBack" content="文件详情"> </el-page-header>
     <el-table :data="tableData" style="width: 100%" border>
       <el-table-column label="序号" width="50" type="index" />
       <el-table-column
@@ -34,19 +34,17 @@
         min-width="100"
         align="center"
       />
-
       <el-table-column
         prop="award_day"
         label="时间"
         min-width="100"
         align="center"
       />
-      <el-table-column
-        prop="point"
-        label="得分"
-        min-width="100"
-        align="center"
-      />
+      <el-table-column prop="point" label="得分" min-width="100" align="center">
+        <template #default="{ row }">
+          {{ row.check_status == 2 ? row.check_point : row.point }}
+        </template>
+      </el-table-column>
       <el-table-column
         prop="check_status"
         label="审核状态"
@@ -73,9 +71,9 @@
       </el-table-column>
     </el-table>
     <!-- 上传文件 -->
-    <checkOut ref="check-out" />
+    <checkOut ref="check-out" @fetch-data="getListAdmin" />
     <!-- 文件详情 -->
-    <detail ref="detail" />
+    <detail ref="detail" @fetch-data="getListAdmin" />
   </div>
 </template>
 <script>
@@ -133,8 +131,11 @@ export default {
     },
     //学生提交列表
     async getListAdmin() {
-      this.loadingFull = true;
       let route = this.$route.query;
+      if (route.role !== "admin") {
+        return;
+      }
+      this.loadingFull = true;
       let params = {
         type: this.type,
         examine_question_id: route.examine_question_id,
@@ -156,9 +157,20 @@ export default {
     },
     //返回考核列表
     goBack() {
-      this.$router.push({
-        path: "/kaohe/checkList",
-      });
+      let route = this.$route.query;
+      if (route.role == "admin") {
+        this.$router.push({
+          path: "/kaohe/uploadList",
+          query: {
+            type: 2,
+            id: route.examine_question_id,
+          },
+        });
+      } else {
+        this.$router.push({
+          path: "/kaohe/checkList",
+        });
+      }
     },
     //切换页码
     handleCurrentChange(e) {

+ 8 - 7
src/views/kaohe/uploadList.vue

@@ -3,11 +3,11 @@
  * @Author: 旭颖
  * @Date: 2023-03-22 10:15:16
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-03-24 16:43:40
+ * @LastEditTime: 2023-03-24 18:14:50
 -->
 <template>
   <div class="index-home" v-loading.fullscreen.lock="loadingFull">
-    <el-page-header @back="goBack" content="考核详情"> </el-page-header>
+    <el-page-header @back="goBack" content="上传人员列表"> </el-page-header>
     <el-table :data="tableData" style="width: 100%" border>
       <el-table-column label="序号" width="50" type="index" />
       <el-table-column
@@ -112,9 +112,9 @@
       </el-pagination>
     </div>
     <!-- 上传文件 -->
-    <checkOut ref="check-out" />
+    <checkOut ref="check-out" @fetch-data="getList" />
     <!-- 文件详情 -->
-    <detail ref="detail" />
+    <detail ref="detail" @fetch-data="getList" />
   </div>
 </template>
 <script>
@@ -142,7 +142,7 @@ export default {
     let route = this.$route.query;
 
     this.type = route.type;
-    this.getList(route.id);
+    this.getList();
   },
   methods: {
     //审核
@@ -181,9 +181,10 @@ export default {
       });
     },
     //学生提交列表
-    async getList(id) {
+    async getList() {
       this.loadingFull = true;
-      const { data } = await examList({ examine_question_id: id });
+      let route = this.$route.query;
+      const { data } = await examList({ examine_question_id: route.id });
       this.tableData = data.data;
       this.totalPage = data.meta.pagination.total;
       this.loadingFull = false;

+ 13 - 13
vue.config.js

@@ -35,20 +35,20 @@ module.exports = {
     overlay: {
       warnings: false,
       errors: true
-    }
+    },
 
-    // // before: require('./mock/mock-server.js')
-    // proxy: {
-    //   [process.env.VUE_APP_BASE_API]: {
-    //     target: "http://api.party.site.ximengnaikang.com",
-    //     changeOrigin: true,
-    //     ws: true,
-    //     secure: false,
-    //     pathRewrite: {
-    //       ["^" + process.env.VUE_APP_BASE_API]: "",
-    //     },
-    //   },
-    // },
+    // before: require('./mock/mock-server.js')
+    proxy: {
+      [process.env.VUE_APP_BASE_API]: {
+        target: 'http://api.party.site.ximengnaikang.com',
+        changeOrigin: true,
+        ws: true,
+        secure: false,
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_BASE_API]: ''
+        }
+      }
+    }
   },
   configureWebpack: {
     // provide the app's title in webpack's name field, so that