Răsfoiți Sursa

build——1

xvying 1 an în urmă
părinte
comite
ddd2deaa34

+ 8 - 1
.env.production

@@ -1,9 +1,16 @@
+###
+ # @FilePath: .env.production
+ # @Author: 旭颖
+ # @Date: 2022-11-21 10:57:22
+ # @LastEditors: 
+ # @LastEditTime: 2023-03-23 14:57:38
+### 
 # just a flag
 ENV = 'production'
 VUE_APP_OUTPUT='production'
 # base api
 
-VUE_APP_BASE_API = 'http://api.party.site.ximengnaikang.com‘
+VUE_APP_BASE_API = 'http://api.party.site.ximengnaikang.com'
 # VUE_APP_BASE_API = 'http://zhdj.xxjsxy.hactcm.edu.cn/api'
 
 

+ 9 - 2
.env.staging

@@ -1,11 +1,18 @@
+###
+ # @FilePath: .env.staging
+ # @Author: 旭颖
+ # @Date: 2022-11-21 11:10:28
+ # @LastEditors: 
+ # @LastEditTime: 2023-03-23 14:54:45
+### 
 
 # just a flag
 ENV = 'staging'
 
 # base api
 # VUE_APP_BASE_API = '/stage-api'
-#   VUE_APP_BASE_API = 'http://api.party.site.ximengnaikang.com'
-  VUE_APP_BASE_API ='http://party.demo.xmnk.cn'
+  VUE_APP_BASE_API = 'http://api.party.site.ximengnaikang.com'
+  # VUE_APP_BASE_API ='http://party.demo.xmnk.cn'
 
 
  

+ 51 - 2
src/App.vue

@@ -1,3 +1,10 @@
+<!--
+ * @FilePath: App.vue
+ * @Author: 旭颖
+ * @Date: 2022-10-09 11:40:36
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-22 11:25:07
+-->
 <template>
   <div id="app">
     <router-view />
@@ -6,10 +13,52 @@
 
 <script>
 export default {
-  name: "App"
+  name: "App",
 };
 </script>
-<style>
+<style lang="scss">
+.app-main[data-v-078753dd] {
+  min-height: auto !important;
+}
+.app-main {
+  margin-top: 20px;
+  padding-left: 30px;
+  padding-right: 30px;
+  padding-bottom: 50px;
+  width: 100%;
+  .search {
+    .el-input {
+      width: 300px;
+      margin-right: 20px;
+    }
+  }
+  .form-bt {
+    margin: 0 auto;
+    text-align: center;
+  }
+  .el-button {
+    // margin-top: 10px;
+  }
+  .el-button--text {
+    padding: 0;
+    margin-top: 0px;
+  }
+  .el-table {
+    margin-top: 20px;
+  }
+  .paging {
+    margin-top: 30px;
+  }
+  .el-table th,
+  .el-table tr:nth-of-type(0) {
+    background-color: #f5f5f5;
+    text-align: center;
+  }
+}
+
+.el-tree-node__content {
+  border-bottom: 1px solid #ebeef5;
+}
 .el-pagination {
   text-align: center !important;
   margin-top: 15px;

+ 41 - 43
src/api/process/index.js

@@ -1,82 +1,80 @@
-
-
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 //党员发展流程
 export function processFlow(params) {
-    return request({
-      url: '/organization-flow',
-      method: 'get',
-      params
-    })
+  return request({
+    url: "/organization-flow",
+    method: "get",
+    params,
+  });
 }
 //上传资源(管理员上传多个人员)
 export function uploadArchives(data) {
   return request({
-    url: '/organization-archives',
-    method: 'POST',
-    data
-  })
+    url: "/organization-archives",
+    method: "POST",
+    data,
+  });
 }
 //上传资源(个人)
 export function uploadDocument(data) {
   return request({
-    url: '/archives',
-    method: 'POST',
-    data
-  })
+    url: "/archives",
+    method: "POST",
+    data,
+  });
 }
 //数据列表
 export function archivesList(params) {
   return request({
-    url: '/archives',
-    method: 'get',
-    params
-  })
+    url: "/archives",
+    method: "get",
+    params,
+  });
 }
 //删除列表数据
 export function deleteArchives(params) {
   return request({
-    url: '/archives/' + params,
-    method: 'DELETE',
-  })
+    url: "/archives/" + params,
+    method: "DELETE",
+  });
 }
 //查看详情
 export function archivesDetail(params) {
   return request({
-    url: '/archives/' + params,
-    method: 'get',
-  })
+    url: "/archives/" + params,
+    method: "get",
+  });
 }
 //编辑文件
 export function putArchives(data) {
   return request({
-    url: '/archives/' + data.id,
-    method: 'put',
-    data
-  })
+    url: "/archives/" + data.id,
+    method: "put",
+    data,
+  });
 }
 //查看文件注意事项
 export function fileTips(params) {
   return request({
-    url: '/templates',
-    method: 'get',
-    params
-  })
+    url: "/templates",
+    method: "get",
+    params,
+  });
 }
 //打包下载所有文件
 export function packDownload(params) {
   return request({
-    url: '/archives/staff/package',
-    method: 'get',
-    params
-  })
+    url: "/archives/staff/package",
+    method: "get",
+    params,
+  });
 }
 //下一条,上一条
 export function nextStudent(params) {
   return request({
-    url: '/archives-next',
-    method: 'get',
-    params
-  })
-}
+    url: "/archives-next",
+    method: "get",
+    params,
+  });
+}

+ 9 - 9
src/layout/components/AppMain.vue

@@ -4,8 +4,8 @@
 -->
 <template>
   <section class="app-main">
-   <!-- <transition name="fade-transform" mode="out-in">
-      
+    <!-- <transition name="fade-transform" mode="out-in">
+
     </transition>-->
     <router-view :key="key" />
   </section>
@@ -13,16 +13,16 @@
 
 <script>
 export default {
-  name: 'AppMain',
+  name: "AppMain",
   computed: {
     key() {
-      return this.$route.path
-    }
-  }
-}
+      return this.$route.path;
+    },
+  },
+};
 </script>
 
-<style scoped>
+<style>
 .app-main {
   /*50 = navbar  */
   min-height: calc(100vh - 50px);
@@ -30,7 +30,7 @@ export default {
   position: relative;
   overflow: hidden;
 }
-.fixed-header+.app-main {
+.fixed-header + .app-main {
   padding-top: 50px;
 }
 </style>

+ 162 - 65
src/router/index.js

@@ -45,24 +45,23 @@ export const asyncRoutes = [
         meta: {
           title: "支部列表",
           icon: "danglist",
-        
-        }
+        },
       },
       {
         path: "list_details",
         name: "listDetails",
         component: () => import("@/views/organization/list_details"),
         meta: { title: "活动详情", icon: "danglist" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "detail",
         name: "detail",
         component: () => import("@/views/organization/detail"),
         meta: { title: "支部详情", icon: "model" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/kaoping",
@@ -76,24 +75,24 @@ export const asyncRoutes = [
         meta: {
           title: "支部考评",
           icon: "form",
-          roles: ["Super admin", "Admin"]
-        }
+          roles: ["Super admin", "Admin"],
+        },
       },
       {
         path: "/organization/list_details",
         name: "listDetails",
         component: () => import("@/views/organization/list_details"),
         meta: { title: "活动详情", icon: "danglist" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "/organization/detail",
         name: "detail",
         component: () => import("@/views/organization/detail"),
         meta: { title: "支部详情", icon: "model" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/users",
@@ -106,16 +105,16 @@ export const asyncRoutes = [
         path: "users_message",
         name: "usersmessage",
         component: () => import("@/views/users/users_message"),
-        meta: { title: "个人信息", icon: "geren" }
+        meta: { title: "个人信息", icon: "geren" },
       },
       {
         path: "change_message",
         name: "changemessage",
         component: () => import("@/views/users/change_message"),
         meta: { title: "完善个人信息", icon: "geren" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/active",
@@ -129,16 +128,16 @@ export const asyncRoutes = [
         path: "list",
         name: "activeList",
         component: () => import("@/views/active/list"),
-        meta: { title: "支部活动", icon: "systemset" }
+        meta: { title: "支部活动", icon: "systemset" },
       },
       {
         path: "detail",
         name: "activeListDetail",
         component: () => import("@/views/active/detail"),
         meta: { title: "活动详情", icon: "systemset" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/personnel",
@@ -148,30 +147,30 @@ export const asyncRoutes = [
     meta: {
       title: "党员管理",
       icon: "peoples",
-      roles: ["Super admin", "Admin"]
+      roles: ["Super admin", "Admin"],
     },
     children: [
       {
         path: "index",
         name: "personnelIndex",
         component: () => import("@/views/personnel/index"),
-        meta: { title: "党员管理", icon: "peoples" }
+        meta: { title: "党员管理", icon: "peoples" },
       },
       {
         path: "operation",
         name: "operation",
         component: () => import("@/views/personnel/operation"),
         meta: { title: "编辑党员信息", icon: "peoples" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "file_list",
         name: "filelist",
         component: () => import("@/views/personnel/file_list"),
         meta: { title: "党员资料列表", icon: "peoples" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/process",
@@ -181,14 +180,14 @@ export const asyncRoutes = [
     meta: {
       title: "党员流程管理",
       icon: "dang",
-      roles: ["Student", "Super admin", "Admin"]
+      roles: ["Student", "Super admin", "Admin"],
     },
     children: [
       {
         path: "apply",
         name: "apply",
         component: () => import("@/views/process/apply"),
-        meta: { title: "申请入党", icon: "apply" }
+        meta: { title: "申请入党", icon: "apply" },
       },
 
       {
@@ -196,54 +195,152 @@ export const asyncRoutes = [
         name: "application",
         component: () => import("@/views/process/application"),
         meta: { title: "上传文件", icon: "danyuan" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "apply_stu",
         name: "student",
         component: () => import("@/views/process/apply_stu"),
         meta: { title: "文件列表", icon: "danyuan" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "upload",
         name: "upload",
         component: () => import("@/views/process/upload"),
         meta: { title: "上传文件", icon: "danyuan" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "apply_list",
         name: "applylist",
         component: () => import("@/views/process/apply_list"),
         meta: { title: "文件列表", icon: "danyuan" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "activist",
         name: "activist",
         component: () => import("@/views/process/activist"),
-        meta: { title: "积极分子确定和培养", icon: "activist" }
+        meta: { title: "积极分子确定和培养", icon: "activist" },
       },
       {
         path: "develop_target",
         name: "develop_target",
         component: () => import("@/views/process/develop_target"),
-        meta: { title: "发展对象确定和考察", icon: "develop" }
+        meta: { title: "发展对象确定和考察", icon: "develop" },
       },
       {
         path: "prepare_accept",
         name: "prepare_accept",
         component: () => import("@/views/process/prepare_accept"),
-        meta: { title: "预备党员的接收", icon: "accept" }
+        meta: { title: "预备党员的接收", icon: "accept" },
       },
       {
         path: "prepare_process",
         name: "prepare_process",
         component: () => import("@/views/process/prepare_process"),
-        meta: { title: "预备党员考察和转正", icon: "process" }
-      }
-    ]
+        meta: { title: "预备党员考察和转正", icon: "process" },
+      },
+    ],
+  },
+  {
+    path: "/kaohe",
+    component: Layout,
+    redirect: "/kaohe",
+    meta: {
+      title: "党员考核",
+      icon: "dang",
+      roles: ["Student", "Super admin", "Admin"],
+    },
+    children: [
+      {
+        path: "index",
+        name: "kaohe",
+        component: () => import("@/views/kaohe/index"),
+        meta: {
+          title: "党员考核",
+          icon: "message",
+          roles: ["Student"],
+        },
+      },
+      {
+        path: "fileDetail",
+        name: "fileDetail",
+        component: () => import("@/views/kaohe/fileDetail"),
+        meta: {
+          title: "文件详情",
+          icon: "message",
+          hidden: true,
+          roles: ["Super admin", "Admin", "Student"],
+        },
+      },
+      {
+        path: "uploadList",
+        name: "uploadList",
+        component: () => import("@/views/kaohe/uploadList"),
+        meta: {
+          title: "学生上传列表",
+          icon: "message",
+          hidden: true,
+          roles: ["Super admin", "Admin"],
+        },
+      },
+      {
+        path: "rewardList",
+        name: "rewardList",
+        component: () => import("@/views/kaohe/rewardList"),
+        meta: {
+          title: "文件列表",
+          icon: "message",
+          roles: ["Student", "Super admin", "Admin"],
+        },
+      },
+
+      {
+        path: "checkList",
+        name: "checkList",
+        component: () => import("@/views/kaohe/checkList"),
+        meta: {
+          title: "党员考核审核",
+          icon: "message",
+          roles: ["Super admin", "Admin"],
+        },
+      },
+      {
+        path: "statics",
+        name: "staticsStudent",
+        component: () => import("@/views/kaohe/statics"),
+        meta: {
+          title: "党员考核统计",
+          icon: "message",
+          roles: ["Super admin", "Admin"],
+        },
+      },
+    ],
+  },
+  {
+    path: "/video",
+    component: Layout,
+    redirect: "/video",
+    meta: {
+      title: "视频学习",
+      icon: "dang",
+      roles: ["Student", "Super admin", "Admin"],
+    },
+    children: [
+      {
+        path: "index",
+        name: "videoIndex",
+        component: () => import("@/views/video/index"),
+        meta: {
+          title: "视频列表",
+          icon: "admin",
+          roles: ["Super admin", "Admin"],
+        },
+      },
+    ],
+    // Super admin
   },
   {
     path: "/administrator",
@@ -255,9 +352,9 @@ export const asyncRoutes = [
         path: "administrator",
         name: "administrator",
         component: () => import("@/views/administrator/index"),
-        meta: { title: "管理员管理", icon: "admin", roles: ["Super admin"] }
-      }
-    ]
+        meta: { title: "管理员管理", icon: "admin", roles: ["Super admin"] },
+      },
+    ],
     // Super admin
   },
   // {
@@ -286,15 +383,15 @@ export const asyncRoutes = [
         name: "system_set",
         component: () => import("@/views/setup/system_set"),
         meta: { title: "系统设置", icon: "systemset" },
-        hidden: true
+        hidden: true,
       },
       {
         path: "template_set",
         name: "template_set",
         component: () => import("@/views/setup/template_set"),
-        meta: { title: "模板设置", icon: "model" }
-      }
-    ]
+        meta: { title: "模板设置", icon: "model" },
+      },
+    ],
   },
 
   {
@@ -310,11 +407,11 @@ export const asyncRoutes = [
         meta: {
           title: "消息提醒",
           icon: "message",
-          roles: ["Super admin", "Admin"]
-        }
-      }
-    ]
-  }
+          roles: ["Super admin", "Admin"],
+        },
+      },
+    ],
+  },
 ];
 
 // 用户权限路由表
@@ -322,7 +419,7 @@ export const constantRoutes = [
   {
     path: "/login",
     component: () => import("@/views/login/index"),
-    hidden: true
+    hidden: true,
   },
   {
     path: "/",
@@ -333,9 +430,9 @@ export const constantRoutes = [
         path: "dashboard",
         name: "首页",
         component: () => import("@/views/dashboard/index"),
-        meta: { title: "首页", icon: "component" }
-      }
-    ]
+        meta: { title: "首页", icon: "component" },
+      },
+    ],
   },
   {
     path: "/users",
@@ -347,9 +444,9 @@ export const constantRoutes = [
         name: "resetpassword",
         component: () => import("@/views/users/reset_password"),
         meta: { title: "修改密码", icon: "component" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/transfer",
@@ -361,9 +458,9 @@ export const constantRoutes = [
         name: "transfer",
         component: () => import("@/views/transfer/index"),
         meta: { title: "组织转接", icon: "zhuajnie" },
-        hidden: true
-      }
-    ]
+        hidden: true,
+      },
+    ],
   },
   {
     path: "/notice",
@@ -375,10 +472,10 @@ export const constantRoutes = [
         path: "notice",
         name: "notice",
         component: () => import("@/views/notice/notice"),
-        meta: { title: "通知公告", icon: "component" }
-      }
-    ]
-  }
+        meta: { title: "通知公告", icon: "component" },
+      },
+    ],
+  },
 
   // {
   //   path: '/404',
@@ -394,7 +491,7 @@ const createRouter = () =>
     // mode: 'history', // require service support
     scrollBehavior: () => ({ y: 0 }),
     routes: constantRoutes,
-    mode: "history"
+    mode: "history",
   });
 
 const router = createRouter();

+ 9 - 9
src/settings.js

@@ -1,9 +1,9 @@
 /*
  * @Author: xvying 1615026511@qq.com
  * @Date: 2022-10-09 11:40:36
- * @LastEditors: xvying 1615026511@qq.com
- * @LastEditTime: 2022-11-21 14:04:44
- * @FilePath: /party/src/settings.js
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-22 10:09:14
+ * @FilePath: settings.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
 module.exports = {
@@ -18,13 +18,13 @@ module.exports = {
    * @description Whether show the logo in sidebar
    */
   sidebarLogo: true, //设置是否显示logo
-  SidebarTitle: "党员管理系统", //左侧导航栏标题
-  title: "党员管理", //浏览器导航栏显示标题
-  loginTitle: "智慧党建管理系统", //登录页
+  // SidebarTitle: "党员管理系统", //左侧导航栏标题
+  // title: "党员管理", //浏览器导航栏显示标题
+  // loginTitle: "智慧党建管理系统", //登录页
   //SidebarTitle:"党员管理系统",//左侧导航栏标题
   //title: '党员管理',//浏览器导航栏显示标题
   //loginTitle:'信息技术学院 智慧党建信息管理系统',//登录页
-  //  SidebarTitle:"本草云党建",//左侧导航栏标题
-  //  title: '本草云党建',//浏览器导航栏显示标题
-  //  loginTitle:'本草云党建',//登录页
+  SidebarTitle: "本草云党建", //左侧导航栏标题
+  title: "本草云党建", //浏览器导航栏显示标题
+  loginTitle: "本草云党建", //登录页
 };

+ 7 - 7
src/utils/request.js

@@ -7,14 +7,14 @@ import Item from "@/layout/components/Sidebar/Item.vue";
 axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
 // create an axios instance
 const service = axios.create({
-  // baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
+  baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
   // withCredentials: true, // send cookies when cross-domain requests
-  baseURL:
-    process.env.ENV === "development"
-      ? "http://api.party.site.ximengnaikang.com" // 开发地址
-      : process.env.ENV === "production"
-      ? "http://party.demo.xmnk.cn/api" // 生产地址
-      : "http://party.demo.xmnk.cn/api", // 测试地址
+  // baseURL:
+  //   process.env.ENV === "development"
+  //     ? "http://api.party.site.ximengnaikang.com" // 开发地址
+  //     : process.env.ENV === "production"
+  //     ? "http://party.demo.xmnk.cn/api" // 生产地址
+  //     : "http://party.demo.xmnk.cn/api", // 测试地址
   timeout: 5000, // request timeout
 });
 

+ 48 - 52
src/views/administrator/student.vue

@@ -125,7 +125,7 @@
             :key="index"
             v-model="editPassword.role"
           >
-            <el-radio :label="index" style="margin-right:20px;">{{
+            <el-radio :label="index" style="margin-right: 20px">{{
               item
             }}</el-radio>
           </el-radio-group>
@@ -168,7 +168,7 @@ import {
   putUsers,
   changeUserPwd,
   changeUserRole,
-  usersDetail
+  usersDetail,
 } from "@/api/administrator/index";
 import { fatherLists } from "@/api/organizationList/index";
 
@@ -189,67 +189,67 @@ export default {
         status: 1,
         password: "",
         organization_ids: [],
-        role: "2"
+        role: "2",
       },
       editPassword: {
         name: "",
         account: "",
-        password: ""
+        password: "",
       },
       organizationIds: "",
       roles: [],
       status: [
         {
           value: 0,
-          name: "暂停"
+          name: "暂停",
         },
         {
           value: 1,
-          name: "正常"
-        }
+          name: "正常",
+        },
       ],
       searchParams: {
         name: "",
         account: "",
         is_admin: 0,
         limit: 15, //每页显示条数
-        page: 1 //当前页码
+        page: 1, //当前页码
       }, //搜索框数据
       totalPage: 0, //总页码
       isAdmin: [
         {
           value: "",
-          label: "全部"
+          label: "全部",
         },
         {
           value: 0,
-          label: "学生"
+          label: "学生",
         },
         {
           value: 1,
-          label: "管理员"
+          label: "管理员",
         },
         {
           value: 2,
-          label: "超级管理员"
-        }
+          label: "超级管理员",
+        },
       ],
       treeList: [
         {
           pid: 0,
           id: 0,
-          name: "未选择"
-        }
+          name: "未选择",
+        },
       ], //支部列表
       rules: {
         name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
         account: [{ required: true, message: "请输入账号", trigger: "blur" }],
         password: [{ required: true, message: "请输入密码", trigger: "blur" }],
         organization_ids: [
-          { required: true, message: "请选择组织", trigger: "change" }
+          { required: true, message: "请选择组织", trigger: "change" },
         ],
-        role: [{ required: true, message: "请选择角色", trigger: "change" }]
-      }
+        role: [{ required: true, message: "请选择角色", trigger: "change" }],
+      },
     };
   },
   created() {
@@ -257,7 +257,7 @@ export default {
     let allStatus = JSON.parse(sessionStorage.getItem("status"));
     this.roles = { 2: "管理员", 3: "超级管理员" };
     //获取父级组织列表
-    fatherLists().then(res => {
+    fatherLists().then((res) => {
       console.log(res, "llllll");
       this.treeList = res.data;
 
@@ -273,13 +273,13 @@ export default {
     async usersLists(params) {
       this.loadingFull = true;
       await usersLists(params)
-        .then(res => {
+        .then((res) => {
           console.log(res, "人员列表");
           this.userTable = res.data.data;
           this.loadingFull = false;
           this.totalPage = res.data.meta.pagination.total;
         })
-        .catch(err => {
+        .catch((err) => {
           this.loadingFull = false;
         });
     },
@@ -287,12 +287,12 @@ export default {
     getDetail(id) {
       this.loadingFull = true;
       usersDetail(id)
-        .then(res => {
+        .then((res) => {
           this.detailList = res.data;
           this.detailVisible = true;
           this.loadingFull = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.loadingFull = false;
         });
     },
@@ -302,20 +302,20 @@ export default {
       this.$confirm("此操作将删除管理员账号, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
-          deleteUsers(id).then(res => {
+          deleteUsers(id).then((res) => {
             if (!res.code) {
               this.$message({
                 type: "success",
-                message: "删除成功!"
+                message: "删除成功!",
               });
               this.usersLists(this.searchParams);
             } else {
               this.$message({
                 type: "error",
-                message: "删除失败!"
+                message: "删除失败!",
               });
             }
           });
@@ -323,7 +323,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
@@ -332,25 +332,25 @@ export default {
       this.$confirm("此操作将禁用该账号, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           const data = {
             id: id,
-            status: 0
+            status: 0,
           };
           putUsers(data)
-            .then(res => {
+            .then((res) => {
               this.$message({
                 type: "success",
-                message: "禁用成功!"
+                message: "禁用成功!",
               });
               this.usersLists(this.searchParams);
             })
-            .catch(err => {
+            .catch((err) => {
               this.$message({
                 type: "error",
-                message: "禁用失败!"
+                message: "禁用失败!",
               });
               this.usersLists(this.searchParams);
             });
@@ -358,7 +358,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
@@ -373,7 +373,7 @@ export default {
         status: 1,
         password: row.password,
         organization_ids: this.organizationIds,
-        role: "2"
+        role: "2",
       };
     },
     //修改密码
@@ -384,7 +384,7 @@ export default {
         id: row.id,
         name: row.nickname,
         account: row.account,
-        password: ""
+        password: "",
       };
     },
     //修改用户角色
@@ -395,7 +395,7 @@ export default {
         id: row.id,
         name: row.nickname,
         account: row.account,
-        role: ""
+        role: "",
       };
       if (row.is_admin == 0) {
         this.editPassword.role = "1";
@@ -405,36 +405,36 @@ export default {
     },
     sureRole() {
       changeUserRole(this.editPassword)
-        .then(res => {
+        .then((res) => {
           this.$message({
             type: "success",
-            message: "身份修改成功"
+            message: "身份修改成功",
           });
           this.usersLists(this.searchParams);
           this.passwordVisible = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.$message({
             type: "error",
-            message: "修改失败"
+            message: "修改失败",
           });
           this.passwordVisible = false;
         });
     },
     surePwd() {
       changeUserPwd(this.editPassword)
-        .then(res => {
+        .then((res) => {
           this.$message({
             type: "success",
-            message: "密码修改成功"
+            message: "密码修改成功",
           });
           this.usersLists(this.searchParams);
           this.passwordVisible = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.$message({
             type: "error",
-            message: "修改失败"
+            message: "修改失败",
           });
           this.passwordVisible = false;
         });
@@ -452,15 +452,11 @@ export default {
       this.searchParams.page = e;
       const data = this.searchParams;
       this.usersLists(data);
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>
-@import "@/assets/styles/content.scss";
-.index-home {
-  margin: 0 30px;
-}
 .demo-ruleForm {
   width: 50%;
   margin: 0 auto;

+ 64 - 128
src/views/dashboard/old_index.vue

@@ -1,32 +1,19 @@
 <template>
   <div class="index-home">
-    <div v-if="roles=='Super admin' ||  roles=='Admin'">
-      <el-row
-        :gutter="40"
-        class="panel-group"
-      >
-        <el-col
-          :xs="12"
-          :sm="12"
-          :lg="8"
-          class="card-panel-col"
-        >
-          <div
-            class="card-panel"
-            @click="handleSetLineChartData('newVisitis')"
-          >
+    <div v-if="roles == 'Super admin' || roles == 'Admin'">
+      <el-row :gutter="40" class="panel-group">
+        <el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
+          <div class="card-panel" @click="handleSetLineChartData('newVisitis')">
             <div class="card-panel-icon-wrapper icon-people">
               <img
                 src="@/assets/image/user.png"
                 alt=""
                 srcset=""
                 class="card-img"
-              >
+              />
             </div>
             <div class="card-panel-description">
-              <div class="card-panel-text">
-                总用户数
-              </div>
+              <div class="card-panel-text">总用户数</div>
               <count-to
                 :start-val="0"
                 :end-val="indexDate.user_nums"
@@ -35,29 +22,18 @@
             </div>
           </div>
         </el-col>
-        <el-col
-          :xs="12"
-          :sm="12"
-          :lg="8"
-          class="card-panel-col"
-        >
-          <div
-            class="card-panel"
-            @click="handleSetLineChartData('messages')"
-          >
+        <el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
+          <div class="card-panel" @click="handleSetLineChartData('messages')">
             <div class="card-panel-icon-wrapper icon-message">
               <img
                 src="@/assets/image/zhibu.png"
                 alt=""
                 srcset=""
                 class="card-img"
-              >
-
+              />
             </div>
             <div class="card-panel-description">
-              <div class="card-panel-text">
-                支部数
-              </div>
+              <div class="card-panel-text">支部数</div>
               <count-to
                 :start-val="0"
                 :end-val="indexDate.organization_nums"
@@ -67,28 +43,18 @@
             </div>
           </div>
         </el-col>
-        <el-col
-          :xs="12"
-          :sm="12"
-          :lg="8"
-          class="card-panel-col"
-        >
-          <div
-            class="card-panel"
-            @click="handleSetLineChartData('purchases')"
-          >
+        <el-col :xs="12" :sm="12" :lg="8" class="card-panel-col">
+          <div class="card-panel" @click="handleSetLineChartData('purchases')">
             <div class="card-panel-icon-wrapper icon-money">
               <img
                 src="@/assets/image/dangyuan.png"
                 alt=""
                 srcset=""
                 class="card-img"
-              >
+              />
             </div>
             <div class="card-panel-description">
-              <div class="card-panel-text">
-                正式党员数
-              </div>
+              <div class="card-panel-text">正式党员数</div>
               <count-to
                 :start-val="0"
                 :end-val="indexDate.dy_nums"
@@ -96,34 +62,19 @@
               />
             </div>
           </div>
-
         </el-col>
-
       </el-row>
       <el-row :gutter="32">
-        <el-col
-          :xs="24"
-          :sm="24"
-          :lg="8"
-        >
-
+        <el-col :xs="24" :sm="24" :lg="8">
           <div class="chart-wrapper">
             <pie-chart />
           </div>
         </el-col>
-        <el-col
-          :xs="24"
-          :sm="24"
-          :lg="8"
-        >
+        <el-col :xs="24" :sm="24" :lg="8">
           <div class="chart-wrapper">
             <div class="list">
               <div class="left">
-                <img
-                  class="icon"
-                  src="@/assets/image/nv.png"
-                  alt=""
-                >
+                <img class="icon" src="@/assets/image/nv.png" alt="" />
               </div>
               <div class="right">
                 <el-progress
@@ -136,11 +87,7 @@
             </div>
             <div class="list">
               <div class="left">
-                <img
-                  class="icon"
-                  src="@/assets/image/nan.png"
-                  alt=""
-                >
+                <img class="icon" src="@/assets/image/nan.png" alt="" />
               </div>
               <div class="right">
                 <el-progress
@@ -152,13 +99,10 @@
             </div>
           </div>
         </el-col>
-
       </el-row>
     </div>
     <div v-else>
-      <div class="stu-title">
-        中国共产党发展党员流程图
-      </div>
+      <div class="stu-title">中国共产党发展党员流程图</div>
       <div class="super-flow-base-demo">
         <super-flow
           ref="superFlow"
@@ -174,22 +118,17 @@
             >
               <header class="ellipsis">{{ meta.idx }}.{{ meta.name }}</header>
               <section v-if="meta.child.length > 0">
-                <div v-for="(item, index) in meta.child" :key='index'>
-                  <div v-for="(item1 , index1) in item.child" :key='index1'>{{item1.name}}</div>
-                  <div
-                    class="child"
-                    @click.stop="clickList(item)"
-                  >
+                <div v-for="(item, index) in meta.child" :key="index">
+                  <div v-for="(item1, index1) in item.child" :key="index1">
+                    {{ item1.name }}
+                  </div>
+                  <div class="child" @click.stop="clickList(item)">
                     ▶ {{ item.name }}
                   </div>
                 </div>
               </section>
               <section v-else>
-                <div
-                  else
-                  class="child"
-                  @click.stop="clickList(meta)"
-                >
+                <div else class="child" @click.stop="clickList(meta)">
                   ▶ {{ meta.name }}
                 </div>
               </section>
@@ -202,7 +141,6 @@
         @childData="getChildDate"
       />-->
     </div>
-
   </div>
 </template>
 
@@ -224,7 +162,7 @@ export default {
     PieChart,
     RaddarChart,
     Flow,
-    SuperFlow
+    SuperFlow,
   },
   data() {
     return {
@@ -237,18 +175,18 @@ export default {
       nodeList: [],
       linkList: [],
       flowDate: "",
-      loadingFull: false
+      loadingFull: false,
     };
   },
   created() {
-    processFlow().then(res => {
+    processFlow().then((res) => {
       this.loadingFull = true;
       console.log(res.data, "数据流程");
       this.flowDate = res.data;
       this.dataList();
       sessionStorage.setItem("flowDate", JSON.stringify(res.data));
     }),
-      statistics().then(res => {
+      statistics().then((res) => {
         this.indexDate = res.data;
         let total = res.data.user_nums;
         let boy = res.data.sex_group[0].nums;
@@ -267,9 +205,9 @@ export default {
       let nodelist = [];
       let data = [];
       let data1 = [];
-      this.flowDate.map(item => {
+      this.flowDate.map((item) => {
         data.push(item.child);
-        item.child.map(item1 => {
+        item.child.map((item1) => {
           console.log(item1, "---------------------------------------item1");
           data1.push(item1);
         });
@@ -290,7 +228,7 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -298,14 +236,14 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [160, 40],
               endAt: [0, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -313,7 +251,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [160, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           }
         } else if (i >= 4 && i < 8) {
@@ -324,7 +262,7 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -332,14 +270,14 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [0, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -347,7 +285,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [-160, 40],
               endAt: [-160, 40],
-              meta: null
+              meta: null,
             });
           }
         } else if (i >= 8 && i < 12) {
@@ -358,7 +296,7 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -366,14 +304,14 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [160, 40],
               endAt: [0, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -381,7 +319,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [160, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           }
         } else if (i >= 12 && i < 16) {
@@ -392,22 +330,22 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
               startId: nodelist[i].key,
               endId: nodelist[i + 1].key,
-                  startAt: [0, 40],
+              startAt: [0, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -415,7 +353,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [-160, 40],
               endAt: [-160, 40],
-              meta: null
+              meta: null,
             });
           }
         } else if (i >= 16 && i < 20) {
@@ -426,7 +364,7 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -434,14 +372,14 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [160, 40],
               endAt: [0, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -449,7 +387,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [160, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           }
         } else if (i >= 20 && i < 24) {
@@ -460,7 +398,7 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -468,14 +406,14 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [0, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -483,7 +421,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [-160, 40],
               endAt: [-160, 40],
-              meta: null
+              meta: null,
             });
           }
         } else if (i >= 24 && i < 28) {
@@ -494,7 +432,7 @@ export default {
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -502,14 +440,14 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [0, 40],
               endAt: [160, 40],
-              meta: null
+              meta: null,
             });
           } else {
             arr.push({
               idx: nodelist[i].idx,
               id: nodelist[i].key,
               coordinate: [clientX, clientY],
-              meta: nodelist[i]
+              meta: nodelist[i],
             });
             list.push({
               id: nodelist[i].idx,
@@ -517,7 +455,7 @@ export default {
               endId: nodelist[i + 1].key,
               startAt: [-160, 40],
               endAt: [-160, 40],
-              meta: null
+              meta: null,
             });
           }
         }
@@ -550,7 +488,7 @@ export default {
       console.log(store, "storestore");
       let roles = store.getters.roles;
       console.log(roles, "roles");
-      roles.map(item => {
+      roles.map((item) => {
         console.log(item, "itemitem");
         if (item == "Super admin" || item == "admin") {
           this.$router.push({ name: "applylist", query: {} });
@@ -558,14 +496,12 @@ export default {
           this.$router.push({ name: "student", query: {} });
         }
       });
-    }
-  }
+    },
+  },
 };
 </script>
 
 <style lang="scss" scoped>
-.index-home{
-margin: 0 30px;}
 .stu-title {
   height: 100px;
   line-height: 100px;
@@ -712,7 +648,7 @@ margin: 0 30px;}
   height: 800px;
   margin: 0 auto;
   background-color: #ffffff;
-  
+
   .super-flow__node {
     border-radius: 10px;
     min-width: 220px !important;

+ 76 - 0
src/views/kaohe/api/index.js

@@ -0,0 +1,76 @@
+/*
+ * @FilePath: index.js
+ * @Author: 旭颖
+ * @Date: 2023-03-22 13:49:36
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 19:46:30
+ */
+
+import request from "@/utils/request";
+
+//获取人员列表
+
+export function geteExamines(params) {
+  return request({
+    url: "/examine/lists",
+    method: "get",
+    params,
+  });
+}
+//文件上传
+export function formUpload(data) {
+  return request({
+    url: "/examine/store",
+    method: "post",
+    data,
+  });
+}
+//考核结果列表
+export function examList(params) {
+  return request({
+    url: "/examine/results",
+    method: "get",
+    params,
+  });
+}
+//考核结果列表
+export function examStatics(params) {
+  return request({
+    url: "/examines",
+    method: "get",
+    params,
+  });
+}
+//审核列表
+export function getExamineAdmin(params) {
+  return request({
+    url: "/examine/examine-admin",
+    method: "get",
+    params,
+  });
+}
+//单个类型文件审核
+export function checkOut(data) {
+  return request({
+    url: "/examine/check-question",
+    method: "post",
+    data,
+  });
+}
+//学生查看已上传的文件列表
+
+export function fileDetailStu(data) {
+  return request({
+    url: "/examine/examine-detail",
+    method: "post",
+    data,
+  });
+}
+//查看每个资料详情
+export function examineDetail(data) {
+  return request({
+    url: "/examine/check-detail",
+    method: "post",
+    data,
+  });
+}

+ 93 - 0
src/views/kaohe/checkList.vue

@@ -0,0 +1,93 @@
+<!--
+ * @FilePath: checkList.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 10:15:16
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 16:02:44
+-->
+<template>
+  <div class="index-home" v-loading.fullscreen.lock="loadingFull">
+    <el-table :data="list" style="width: 100%" border>
+      <el-table-column label="序号" width="50" type="index" />
+
+      <el-table-column prop="name" label="考核项" min-width="200">
+      </el-table-column>
+      <el-table-column
+        prop="examine.upload_nums"
+        label="上传人数"
+        min-width="100"
+        align="center"
+      >
+        <template #default="{ row }">
+          <span v-if="row.type == 1">
+            {{ row.examine.upload_nums }}
+          </span>
+          <span v-else>
+            {{ row.examine.upload_nums.length }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="address"
+        label="操作"
+        min-width="150"
+        align="center"
+      >
+        <template #default="{ row }">
+          <el-button type="primary" plain size="mini" @click="lookDetail(row)">学生列表</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 上传文件 -->
+    <uploadFile ref="upload-file" @fetch-data="geteExamines" />
+    <Detail ref="details"></Detail>
+  </div>
+</template>
+<script>
+import uploadFile from "./components/uploadFile";
+import Detail from "./components/detail";
+
+import { getExamineAdmin } from "./api/index";
+export default {
+  components: {
+    uploadFile,
+    Detail,
+  },
+  data() {
+    return {
+      loadingFull: true,
+      list: [],
+    };
+  },
+  created() {
+    this.geteExamines();
+  },
+  methods: {
+    lookDetail(row) {
+      this.$router.push({
+        path: "/kaohe/uploadList",
+        query: {
+          id: row.id,
+          type:row.type
+        },
+      });
+    },
+    lookDetailList(row){
+      this.$router.push({
+        path: "/kaohe/rewardList",
+        query: {
+          id: row.id,
+        },
+      });
+    },
+    //考核列表
+    async geteExamines() {
+      this.loadingFull = true;
+      const { data } = await getExamineAdmin();
+      this.list = data.examine;
+      this.loadingFull = false;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 99 - 0
src/views/kaohe/components/checkOut.vue

@@ -0,0 +1,99 @@
+<!--
+ * @FilePath: checkOut.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 11:54:21
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 20:24:03
+-->
+<template>
+  <el-dialog
+    title="材料审核"
+    :visible.sync="dialogVisible"
+    width="700px"
+    append-to-body
+    :before-close="handleClose"
+  >
+    <el-form label-width="120px" ref="form" :model="form" :rules="rules">
+      <el-form-item label="审核意见:" prop="check_status">
+        <el-radio v-model="form.check_status" :label="2">通过</el-radio>
+        <el-radio v-model="form.check_status" :label="3">驳回</el-radio>
+      </el-form-item>
+      <el-form-item label="项目得分:" prop="check_point">
+        <el-input-number
+          v-model="form.check_point"
+          :min="0"
+          label="请输入分值"
+          style="width: 50%"
+        />
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="sureCheck">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import { checkOut } from "../api/index";
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      form: { id: "", examine_question_id: "", check_status: 2 },
+      id: "",
+      type: 1,
+      rules: {
+        check_status: [
+          {
+            required: true,
+            message: "请选择审核状态",
+            trigger: "change",
+          },
+        ],
+        check_point: [{ required: true, message: "审核分支", trigger: "blur" }],
+      },
+    };
+  },
+  methods: {
+    showEdit(row) {
+      let route = this.$route.query;
+      if (row.type == 2) {
+        this.type = row.type;
+        this.id = row.examine_id;
+        this.form.examine_question_id = route.id;
+        this.form.id = row.examine_id;
+        this.dialogVisible = true;
+      } else {
+        this.form.examine_question_id = route.examine_question_id;
+        this.type = route.type;
+        this.form.check_point = row.point;
+        this.form.id = row.examine_id;
+        this.dialogVisible = true;
+      }
+    },
+    sureCheck() {
+      this.$refs["form"].validate(async (valid) => {
+        if (this.type == 2) {
+          let obj = {
+            id: this.id,
+            check_point: this.form.check_point,
+            check_status: this.form.check_status,
+          };
+          this.form.examine_lists = [obj];
+          delete this.form.check_point;
+          // delete this.form.check_status;
+        }
+        if (valid) {
+          const { message } = await checkOut(this.form);
+          this.handleClose();
+          this.$emit("fetch-data");
+          this.$emit("handle-close");
+        }
+      });
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+  },
+};
+</script>

+ 101 - 0
src/views/kaohe/components/detail.vue

@@ -0,0 +1,101 @@
+<!--
+ * @FilePath: detail.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 11:54:21
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 20:20:02
+-->
+<template>
+  <el-drawer
+    title="材料详情"
+    :visible.sync="dialogVisible"
+    size="900px"
+    :before-close="handleClose"
+  >
+    <div class="tab-body" style="overflow: auto">
+      <iframe :src="fileList[0].url" height="900px" width="100%" />
+
+      <div class="button" @click="doCheck" v-if="detail.check_status == 1">
+        审核
+      </div>
+    </div>
+    <checkOut ref="check-out" @handle-close="handleClose" />
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+    </span>
+  </el-drawer>
+</template>
+<script>
+import checkOut from "./checkOut";
+
+export default {
+  components: {
+    checkOut,
+  },
+  data() {
+    return {
+      activeName: "tab0",
+      dialogVisible: false,
+      form: {},
+      fileData: {
+        file_type: "file",
+      },
+      examine_id: "",
+      detail: {},
+      point: 0,
+      fileList: [],
+    };
+  },
+  methods: {
+    //审核
+    doCheck() {
+      this.$refs["check-out"].showEdit({
+        type: 2,
+        examine_id: this.examine_id,
+        point: this.point,
+      });
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+    async showEdit(row) {
+      this.examine_id = row.id;
+      this.detail = row;
+      let data1 = row.resources;
+      this.point = row.point;
+      let arr = [];
+      for (let key in data1) {
+        arr.push({
+          id: key,
+          url: data1[key],
+        });
+      }
+
+      this.fileList = arr;
+      this.dialogVisible = true;
+    },
+  },
+};
+</script>
+<style lang="scss">
+.tab-body {
+  width: 90%;
+  margin: 0 auto;
+}
+.button {
+  position: fixed;
+  bottom: 15vh;
+  right: 30px;
+  height: 70px;
+  width: 70px;
+  line-height: 70px;
+  z-index: 9999999;
+  color: #fff;
+  font-weight: 550;
+  font-size: 16px;
+  border-radius: 50%;
+  background-color: rgb(230, 88, 22);
+  text-align: center;
+}
+</style>

+ 170 - 0
src/views/kaohe/components/uploadFile.vue

@@ -0,0 +1,170 @@
+<!--
+ * @FilePath: uploadFile.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 11:54:21
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 20:04:39
+-->
+<template>
+  <el-dialog
+    title="上传文件"
+    :visible.sync="dialogVisible"
+    width="700px"
+    :before-close="handleClose"
+  >
+    <el-form label-width="120px" ref="form" :model="form" :rules="rules">
+      <el-form-item
+        v-for="(item, index) in formList"
+        :key="index"
+        :label="item.name + ':'"
+        :prop="item.key == 'resource_ids' ? '' : item.key"
+      >
+        <div class="star" v-if="item.key == 'resource_ids'">*</div>
+        <el-input-number
+          v-if="item.key == 'point'"
+          v-model="form[item.key]"
+          :min="0"
+          :label="'请输入' + item.name"
+          style="width: 80%"
+        />
+        <el-upload
+          v-else-if="item.key == 'resource_ids'"
+          class="upload-demo"
+          :action="base_url + '/upload'"
+          :auto-upload="true"
+          :on-success="uploadSuccess"
+          :on-error="uploadError"
+          :multiple="false"
+          :data="fileData"
+          accept=".pdf,.jpg,.png"
+          :file-list="fileList"
+        >
+          <el-button size="small" type="primary" @click="clickUpload"
+            >点击上传</el-button
+          >
+          <div slot="tip" class="el-upload__tip">
+            请将材料转换成pdf格式进行上传
+          </div>
+        </el-upload>
+
+        <el-select
+          v-else-if="item.key == 'grade_id'"
+          v-model="form[item.key]"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="(item, index) in gradeList"
+            :key="index"
+            :label="item"
+            :value="index"
+          >
+          </el-option>
+        </el-select>
+        <el-input
+          v-else
+          v-model="form[item.key]"
+          type="text"
+          :label="'请输入' + item.name"
+          style="width: 80%"
+        />
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="sureSubmit">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import store from "@/store";
+import { formUpload } from "../api/index";
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      form: {},
+      formList: [],
+      fileList: [],
+      fileData: {
+        file_type: "file",
+      },
+      rules: {},
+      ids: [],
+    };
+  },
+  methods: {
+    showEdit(row) {
+      let data = Object.assign({}, row);
+      this.gradeList = data.extra.position_grade;
+      if (data.verification) {
+        let arr = [];
+        data.verification.map((item) => {
+          arr.push({ key: item.key, name: item.name });
+          let rule = item.rule.substring(0, 8);
+          this.rules[item.key] = [
+            {
+              required: rule == "required" ? true : false,
+              trigger: "blur",
+              message: item.name + "不能为空",
+            },
+          ];
+        });
+        this.formList = arr;
+      }
+      this.form.examine_question_id = data.id;
+      this.form.staff_id = store.getters.staff_id;
+      this.dialogVisible = true;
+    },
+    handleClose() {
+      this.formList = [];
+      this.fileList = [];
+      this.rules = {};
+      this.form = {};
+      this.dialogVisible = false;
+    },
+    //确定添加
+    sureSubmit() {
+      if (this.ids.length == 0) {
+        this.$message({
+          message: "请上传附件!",
+          type: "warning",
+        });
+        return;
+      }
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          const { message } = await formUpload(this.form);
+          this.handleClose();
+          this.$emit("fetch-data");
+        }
+      });
+    },
+    clickUpload() {
+      this.fileList = [];
+      this.ids = [];
+    },
+    //上传成功
+    uploadSuccess(response) {
+      if (response.code == 200) {
+        this.ids = [response.data.id];
+        this.form.resource_ids = this.ids;
+      }
+    },
+    //上传事变
+    uploadError(e) {
+      this.$message({
+        message: "附件上传失败",
+        type: "error",
+      });
+    },
+  },
+};
+</script>
+<style>
+.star {
+  position: absolute;
+  left: -55px;
+  color: red;
+  font-weight: 550;
+}
+</style>

+ 170 - 0
src/views/kaohe/fileDetail.vue

@@ -0,0 +1,170 @@
+<!--
+ * @FilePath: fileDetail.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 11:54:21
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 20:06:09
+-->
+<template>
+  <div class="tab-body" style="overflow: auto">
+    <div class="title">{{ name }}</div>
+    <div class="tips">
+      <span>姓名:{{ detail.staff ? detail.staff.true_name : "--" }}</span>
+      <span>学号:{{ detail.staff ? detail.staff.no : "--" }}</span>
+      <span>班级::{{ detail.staff ? detail.staff.class : "--" }}</span>
+      <span>支部:{{ detail.staff ? detail.staff.class : "--" }}</span>
+      <span>分支:{{ detail.staff ? detail.staff.class : "--" }}</span>
+    </div>
+    <div class="check">
+      <span
+        >审核状态:<el-tag
+          v-if="detail.check_status == 0"
+          type="primary"
+          size="mini"
+          >待审核</el-tag
+        ><el-tag v-if="detail.check_status == 2" type="success" size="mini"
+          >审核通过</el-tag
+        ><el-tag v-if="detail.check_status == 3" type="danger" size="mini"
+          >审核失败</el-tag
+        >
+      </span>
+
+      <span
+        >审核人:{{ detail.check_admin ? detail.check_admin.name : "--" }}</span
+      >
+      <span>审核时间:{{ detail.check_time || "--" }}</span>
+      <span v-if="detail.check_status == 2"
+        >最终得分:<span style="color: red">{{
+          detail.check_point || "0"
+        }}</span>
+      </span>
+    </div>
+
+    <iframe :src="fileList[0].url" height="900px" width="100%" />
+
+    <!-- v-if="detail.check_status == 1" -->
+    <div class="button" @click="doCheck">审核</div>
+    <checkOut ref="check-out" @handle-close="handleClose" />
+  </div>
+</template>
+<script>
+import checkOut from "./components/checkOut";
+import { fileDetailStu, examineDetail } from "./api/index";
+
+export default {
+  components: {
+    checkOut,
+  },
+  data() {
+    return {
+      activeName: "tab0",
+      dialogVisible: false,
+      form: {},
+      fileData: {
+        file_type: "file",
+      },
+      examine_id: "",
+      detail: {},
+      point: 0,
+      fileList: [], //文件列表
+      name: "",
+      examine_question_id: "",
+      id: "",
+    };
+  },
+  created() {
+    let route = this.$route.query;
+    this.name = route.name;
+    this.type = route.type;
+    console.log(route, "routerouterouteroute");
+    this.id = route.id;
+    this.examine_question_id = route.examine_question_id;
+    if (this.type == 1) {
+      this.getDetail(route.examine_question_id);
+    } else {
+      let data = {
+        type: route.type,
+        examine_question_id: route.examine_question_id,
+        examine_id: route.id,
+      };
+      this.getDetailStu(route.id);
+    }
+  },
+  methods: {
+    //审核
+    doCheck() {
+      this.$refs["check-out"].showEdit({
+        type: this.type,
+        examine_id: this.examine_id,
+        point: this.point,
+      });
+    },
+    handleClose() {
+      this.getDetail(this.examine_question_id);
+    },
+    async getDetail(id) {
+      const { data } = await fileDetailStu({ examine_question_id: id });
+      this.detail = data;
+      this.examine_id = data.id;
+      let data1 = data.resources;
+      this.point = data.point;
+      let arr = [];
+      for (let key in data1) {
+        arr.push({
+          id: key,
+          url: data1[key],
+        });
+      }
+      this.fileList = arr;
+      console.log(data, "shujushushsu");
+    },
+    async getDetailStu(id) {
+      const { data } = await examineDetail({ id: id });
+      console.log(data, "llll");
+    },
+  },
+};
+</script>
+<style lang="scss">
+.tab-body {
+  width: 90%;
+  margin: 0 auto;
+  .title {
+    text-align: center;
+    padding: 15px;
+    font-size: 24px;
+    font-weight: 550;
+  }
+  .tips {
+    color: #727272;
+    font-size: 14px;
+    text-align: center;
+    margin-bottom: 10px;
+  }
+  .check {
+    background-color: #ffe4e4ea;
+    color: #727272;
+    font-size: 14px;
+    padding: 10px 0;
+    text-align: center;
+    span {
+      margin-right: 20px;
+    }
+  }
+  .button {
+    position: fixed;
+    bottom: 15vh;
+    right: 30px;
+    height: 70px;
+    width: 70px;
+    line-height: 70px;
+    z-index: 999;
+    color: #fff;
+    font-weight: 550;
+    font-size: 16px;
+    border-radius: 50%;
+    background-color: rgb(230, 88, 22);
+    text-align: center;
+  }
+}
+</style>

+ 174 - 0
src/views/kaohe/index.vue

@@ -0,0 +1,174 @@
+<!--
+ * @FilePath: index.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 10:15:16
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 19:23:15
+-->
+<template>
+  <div class="index-home" v-loading.fullscreen.lock="loadingFull">
+    <el-table :data="list" style="width: 100%" border>
+      <el-table-column label="序号" width="50" type="index" />
+
+      <el-table-column prop="name" label="考核项" min-width="200">
+      </el-table-column>
+
+      <el-table-column
+        prop="address"
+        label="是否上传"
+        min-width="100"
+        align="center"
+      >
+        <template #default="{ row }">
+          <span v-if="row.is_one == 1">
+            <el-tag type="success" v-if="row.examine">已上传</el-tag>
+            <el-tag type="warning" v-else>未上传</el-tag></span
+          >
+          <span v-else>
+            <el-tag type="success" v-if="row.examine && row.examine.length > 0"
+              >已上传</el-tag
+            >
+            <el-tag type="warning" v-else>未上传</el-tag>
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="name"
+        label="审核状态"
+        min-width="100"
+        align="center"
+      >
+        <template #default="{ row }">
+          <span v-if="row.is_one == 1">
+            <el-tag type="info" v-if="!row.examine">待上传</el-tag>
+            <el-tag type="primary" v-if="row.examine.check_status == 1"
+              >待审核</el-tag
+            >
+            <el-tag type="success" v-if="row.examine.check_status == 2"
+              >审核成功</el-tag
+            >
+            <el-tag type="danger" v-if="row.examine.check_status == 3"
+              >审核失败</el-tag
+            >
+          </span>
+          <span v-else>
+            <el-tag type="success" v-if="row.examine && row.examine.length > 0"
+              >已上传</el-tag
+            >
+            <el-tag type="warning" v-else>未上传</el-tag>
+          </span>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
+        prop="address"
+        label="上传人数"
+        min-width="100"
+        align="center"
+      > -->
+      <!-- </el-table-column> -->
+      <el-table-column
+        prop="address"
+        label="操作"
+        min-width="150"
+        align="center"
+      >
+        <template #default="{ row }">
+          <el-button
+            type="success"
+            plain
+            size="mini"
+            @click="uploadFileStu(row)"
+            >上传文件</el-button
+          >
+          <!-- <el-button type="primary" plain size="mini" @click="uploadList(row)"
+            >审核</el-button
+          > -->
+          <el-button
+            type="primary"
+            v-if="row.type == 1"
+            plain
+            size="mini"
+            @click="lookDetail(row)"
+            >查看</el-button
+          >
+          <el-button
+            type="primary"
+            v-if="row.type == 2"
+            plain
+            size="mini"
+            @click="lookDetail(row)"
+            >查看</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 上传文件 -->
+    <uploadFile ref="upload-file" @fetch-data="geteExamines" />
+    <Detail ref="details"></Detail>
+  </div>
+</template>
+<script>
+import uploadFile from "./components/uploadFile";
+import Detail from "./components/detail";
+
+import { geteExamines } from "./api/index";
+export default {
+  components: {
+    uploadFile,
+    Detail,
+  },
+  data() {
+    return {
+      loadingFull: true,
+      list: [],
+    };
+  },
+  created() {
+    this.geteExamines();
+  },
+  methods: {
+    //学生上传文件
+    uploadFileStu(row) {
+      this.$refs["upload-file"].showEdit(row);
+    },
+    lookDetail(row) {
+      // this.$refs["details"].showEdit(row.examine, row.id);
+      if (row.type == 1) {
+        this.$router.push({
+          path: "/kaohe/fileDetail",
+          query: {
+            examine_question_id: row.id,
+            name: row.name,
+            type: row.type,
+          },
+        });
+      } else {
+        this.$router.push({
+          path: "/kaohe/rewardList",
+          query: {
+            id: row.id,
+          },
+        });
+      }
+    },
+    lookDetailList(row) {},
+    //学生上传列表
+    uploadList(row) {
+      this.$router.push({
+        path: "/kaohe/uploadList",
+        query: {
+          id: row.id,
+        },
+      });
+    },
+    //考核列表
+    async geteExamines() {
+      this.loadingFull = true;
+      const { data } = await geteExamines();
+      this.list = data.examine;
+      this.loadingFull = false;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 160 - 0
src/views/kaohe/rewardList.vue

@@ -0,0 +1,160 @@
+<!--
+ * @FilePath: rewardList.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 10:15:16
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 20:13:07
+-->
+<template>
+  <div class="index-home" v-loading.fullscreen.lock="loadingFull">
+    <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
+        prop="name"
+        label="奖项名称"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="grade_name"
+        label="奖项等级"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="ranking"
+        label="获奖名次"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="unit"
+        label="颁发单位"
+        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="check_status"
+        label="审核状态"
+        min-width="100"
+        align="center"
+      >
+        <template #default="{ row }">
+          <el-tag type="primary" v-if="row.check_status == 1">待审核</el-tag>
+          <el-tag type="success" v-if="row.check_status == 2">审核成功</el-tag>
+          <el-tag type="danger" v-if="row.check_status == 3">审核失败</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="address"
+        label="操作"
+        min-width="150"
+        align="center"
+      >
+        <template #default="{ row }">
+          <el-button type="primary" size="mini" @click="lookDetail(row)"
+            >查看</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 上传文件 -->
+    <checkOut ref="check-out" />
+    <!-- 文件详情 -->
+    <detail ref="detail" />
+  </div>
+</template>
+<script>
+import { fileDetailStu } from "./api/index";
+import checkOut from "./components/checkOut";
+import detail from "./components/detail";
+export default {
+  components: {
+    checkOut,
+    detail,
+  },
+  data() {
+    return {
+      type: 1,
+      totalPage: 0,
+      searchParams: {
+        page: 1,
+        per_page: 15,
+      },
+      loadingFull: true,
+      tableData: [],
+      examine_question_id: "",
+    };
+  },
+  created() {
+    let route = this.$route.query;
+    console.log(route, "routerouterouteroute");
+    this.type = 2;
+    this.examine_question_id = route.id;
+    this.getList(route.id);
+  },
+  methods: {
+    //审核
+    checkOutStu() {
+      this.$refs["check-out"].showEdit({
+        type: 2,
+        examine_id: row.id,
+        point: row.point,
+      });
+    },
+    //查看详情
+    lookDetail(row) {
+      this.$refs["detail"].showEdit(row);
+      // this.$router.push({
+      //   path: "/kaohe/fileDetail",
+      //   query: {
+      //     id: row.id,
+      //     name: row.name,
+      //     type: 2,
+      //     examine_question_id: this.examine_question_id,
+      //   },
+      // });
+    },
+    //学生提交列表
+    async getList(id) {
+      this.loadingFull = true;
+      const { data } = await fileDetailStu({ examine_question_id: id });
+      this.tableData = data;
+      // this.totalPage = data.meta.pagination.total;
+
+      this.loadingFull = false;
+    },
+    //返回考核列表
+    goBack() {
+      this.$router.push({
+        path: "/kaohe/checkList",
+      });
+    },
+    //切换页码
+    handleCurrentChange(e) {
+      this.searchParams.page = e;
+      this.getList();
+    },
+    //切换每页显示数量
+    handleSizeChange(e) {
+      this.searchParams.limit = e;
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 183 - 0
src/views/kaohe/statics.vue

@@ -0,0 +1,183 @@
+<!--
+ * @FilePath: statics.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 10:15:16
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 15:58:49
+-->
+<template>
+  <div class="index-home" v-loading.fullscreen.lock="loadingFull">
+    <el-table :data="list" style="width: 100%" border>
+      <el-table-column label="序号" width="50" type="index" align="center" />
+      <el-table-column
+        prop="staff.no"
+        label="学号"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="staff.name"
+        label="姓名"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="staff.class"
+        label="班级"
+        min-width="130"
+        align="center"
+      />
+      <el-table-column
+        prop="organization.name"
+        label="所属支部"
+        min-width="180"
+        align="center"
+      >
+        <template #default="{ row }">
+          {{ row.organization ? row.organization.name : "--" }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="total_point"
+        label="总得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_1_point"
+        label="思想政治得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_2_point"
+        label="组织生活得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_3_point"
+        label="学生干部得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_4_point"
+        label="学业状况得分"
+        min-width="100"
+        align="center"
+      />
+
+      <el-table-column
+        prop="xm_5_point"
+        label="考察期间所获荣誉证书得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_6_point"
+        label="志愿服务得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_7_point"
+        label="青年大学习得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_8_point"
+        label="”五个一百“工程得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_9_point"
+        label="群众基础得分"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="xm_10_point"
+        label="突出事迹得分"
+        min-width="100"
+        align="center"
+      />
+    </el-table>
+    <!--分页-->
+    <div class="paging">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="searchParams.page"
+        background
+        :page-sizes="[15, 20, 30, 50, 100, 200]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="totalPage"
+      >
+      </el-pagination>
+    </div>
+
+    <!-- <Detail ref="details"></Detail> -->
+  </div>
+</template>
+<script>
+// import Detail from "./components/detail";
+
+import { examStatics } from "./api/index";
+export default {
+  data() {
+    return {
+      loadingFull: true,
+      list: [],
+      searchParams: {
+        page: 1,
+        per_page: 15,
+      },
+      totalPage: 0,
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    //学生上传文件
+    uploadFileStu(row) {
+      this.$refs["upload-file"].showEdit(row);
+    },
+    lookDetail() {
+      this.$refs["details"].showEdit(row);
+    },
+    //学生上传列表
+    uploadList(row) {
+      this.$router.push({
+        path: "/kaohe/uploadList",
+        query: {
+          id: row.id,
+          type:row.type
+        },
+      });
+    },
+    //考核列表
+    async getList() {
+      this.loadingFull = true;
+      const { data } = await examStatics();
+      this.list = data.data;
+      this.totalPage = data.meta.pagination.total;
+      this.loadingFull = false;
+    },
+    //切换页码
+    handleCurrentChange(e) {
+      this.searchParams.page = e;
+      this.getList();
+    },
+    //切换每页显示数量
+    handleSizeChange(e) {
+      this.searchParams.limit = e;
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 180 - 0
src/views/kaohe/uploadList.vue

@@ -0,0 +1,180 @@
+<!--
+ * @FilePath: uploadList.vue
+ * @Author: 旭颖
+ * @Date: 2023-03-22 10:15:16
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-03-23 18:26:18
+-->
+<template>
+  <div class="index-home" v-loading.fullscreen.lock="loadingFull">
+    <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
+        prop="staff.no"
+        label="学号"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="staff.true_name"
+        label="学生姓名"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="staff.class"
+        label="班级"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="staff.class"
+        label="组织"
+        min-width="100"
+        align="center"
+      >
+        <template #default="{ row }">
+          {{ row.organization ? row.organization.name : "--" }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="point"
+        label="分值"
+        min-width="100"
+        align="center"
+      />
+      <el-table-column
+        prop="check_status"
+        label="审核状态"
+        min-width="100"
+        align="center"
+      >
+        <template #default="{ row }">
+          <el-tag type="primary" v-if="row.check_status == 1">待审核</el-tag>
+          <el-tag type="success" v-if="row.check_status == 2">审核成功</el-tag>
+          <el-tag type="danger" v-if="row.check_status == 3">审核失败</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="address"
+        label="操作"
+        min-width="150"
+        align="center"
+      >
+        <template #default="{ row }">
+          <el-button
+            type="primary"
+            v-if="type == 1"
+            plain
+            size="mini"
+            @click="lookDetail(row)"
+            >查看附件</el-button
+          >
+          <el-button
+            type="primary"
+            v-if="type == 2"
+            plain
+            size="mini"
+            @click="lookDetail(row)"
+            >查看</el-button
+          >
+          <el-button
+            v-if="row.check_status == 1"
+            type="warning"
+            plain
+            size="mini"
+            @click="checkOutStu(row)"
+            >审核</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!--分页-->
+    <div class="paging">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="searchParams.page"
+        background
+        :page-sizes="[15, 20, 30, 50, 100, 200]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="totalPage"
+      >
+      </el-pagination>
+    </div>
+    <!-- 上传文件 -->
+    <checkOut ref="check-out" />
+    <!-- 文件详情 -->
+    <detail ref="detail" />
+  </div>
+</template>
+<script>
+import { examList } from "./api/index";
+import checkOut from "./components/checkOut";
+import detail from "./components/detail";
+export default {
+  components: {
+    checkOut,
+    detail,
+  },
+  data() {
+    return {
+      type: 1,
+      totalPage: 0,
+      searchParams: {
+        page: 1,
+        per_page: 15,
+      },
+      loadingFull: true,
+      tableData: [],
+    };
+  },
+  created() {
+    let route = this.$route.query;
+    console.log(route, "routerouterouteroute");
+    this.type = route.type;
+    this.getList(route.id);
+  },
+  methods: {
+    //审核
+    checkOutStu() {
+      this.$refs["check-out"].showEdit({
+        type: this.type,
+        examine_id: row.id,
+        point: row.point,
+      });
+    },
+    //查看详情
+    lookDetail(row) {
+      this.$refs["detail"].showEdit(row);
+    },
+    //学生提交列表
+    async getList(id) {
+      this.loadingFull = true;
+      const { data } = await examList({ examine_question_id: id });
+      this.tableData = data.data;
+      this.totalPage = data.meta.pagination.total;
+
+      this.loadingFull = false;
+    },
+    //返回考核列表
+    goBack() {
+      this.$router.push({
+        path: "/kaohe/checkList",
+      });
+    },
+    //切换页码
+    handleCurrentChange(e) {
+      this.searchParams.page = e;
+      this.getList();
+    },
+    //切换每页显示数量
+    handleSizeChange(e) {
+      this.searchParams.limit = e;
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 1 - 5
src/views/kaoping/index.vue

@@ -437,11 +437,7 @@ export default {
   height: 400px;
   padding-top: 20px;
   box-shadow: 4px 4px 40px rgb(0 0 0 / 5%);
-}
-.organization-list {
-  margin: 0 20px;
-}
-.card-img {
+}.card-img {
   height: 40px;
 }
 

+ 3 - 3
src/views/login/index.vue

@@ -70,7 +70,7 @@
           @click.native.prevent="handleLogin"
           >登录</el-button
         >
-
+        <!--
         <div class="tips">
           <div>
             <span style="margin-right: 20px">管理员账号: admin</span>
@@ -96,7 +96,7 @@
         </div>
         <div style="font-size: 14px; margin-bottom: 20px; color: #ff002d">
           如有需要请联系我们:17638192817
-        </div>
+        </div> -->
       </el-form>
     </div>
   </div>
@@ -216,7 +216,7 @@ $bg: #283443;
 /*$bg:#e2291d;*/
 $light_gray: #fff;
 $cursor: #fff;
-/* 
+/*
 @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
   .login-container .el-input input {
     color: $cursor;

+ 68 - 73
src/views/organization/detail.vue

@@ -150,7 +150,7 @@
     </div>
     <div class="second">
       <div class="left">
-        <div class="title" style="text-algin:left">支部活动记录</div>
+        <div class="title" style="text-algin: left">支部活动记录</div>
         <div class="search">
           <el-form
             ref="searchParams"
@@ -334,13 +334,12 @@
             <div class="right_1">支部宣传委员:{{ recDetails.zb_xcwy }}</div>
           </div>
           <div class="det">
-            <div class="left_1" style="flex:0 0 20%">其他任职人员:</div>
+            <div class="left_1" style="flex: 0 0 20%">其他任职人员:</div>
             <div class="right_1">
               <div
                 v-for="(item, index1) in recDetails.zb_qtry"
                 :key="index1"
-                style="height:40px;
-                line-height:50px;"
+                style="height: 40px; line-height: 50px"
               >
                 <span>{{ item.name }}</span> <span>({{ item.job }})</span>
               </div>
@@ -379,7 +378,7 @@
               v-model="setupForm.category_id"
               filterable
               placeholder="请选择活动分类"
-              style="width:100%"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in activeSortList"
@@ -469,7 +468,7 @@
               v-model="setupForm.type"
               filterable
               placeholder="请选择活动类型(线上、线下)"
-              style="width:100%"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in activeType"
@@ -524,12 +523,8 @@ import {
   setupRecord,
   updateRecord,
   deleteRecord,
-  danganList,
-  creatDocument,
-  lookUpDetail,
-  deleteFile,
   activeSort,
-  activeStatistics
+  activeStatistics,
 } from "@/api/organizationDetail/index";
 
 import Tinymce from "@/components/Tinymce";
@@ -552,45 +547,45 @@ export default {
       queryForm: {
         page: 1,
         per_page: 15,
-        title: ""
+        title: "",
       },
       searchParams: {
         name: "", //支部名称
         type: "",
         zb_sj: "",
         limit: 15, //每页显示条数
-        page: 1 //当前页码
+        page: 1, //当前页码
       }, //搜索框数据
       setupForm: {
         organization_id: "", //当前支部id
         status: 1,
         category_id: "",
         type: "线下活动",
-        day: ""
+        day: "",
       },
       status: [
         {
           value: 0,
-          name: "暂停"
+          name: "暂停",
         },
         {
           value: 1,
-          name: "正常"
-        }
+          name: "正常",
+        },
       ],
       fileType: [
         {
           value: 0,
-          name: "富文本"
+          name: "富文本",
         },
         {
           value: 1,
-          name: "图片"
+          name: "图片",
         },
         {
           value: 2,
-          name: "文件"
-        }
+          name: "文件",
+        },
       ], //文件类型选择列表
       fileDetail: "",
       type: "", //类型1为新增 2为编辑
@@ -603,76 +598,76 @@ export default {
         name: "",
         status: 1,
         self_point: "",
-        body: ""
+        body: "",
       }, //
       rules: {
         title: [
           {
             required: true,
             message: "请输入标题",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
         ],
         category_id: [
           {
             required: true,
             message: "请选择活动分类",
-            trigger: "change"
-          }
+            trigger: "change",
+          },
         ],
         day: [
           {
             required: true,
             message: "请选择日期",
-            trigger: "change"
-          }
+            trigger: "change",
+          },
         ],
         type: [
           {
             required: true,
             message: "请选择活动类型",
-            trigger: "change"
-          }
+            trigger: "change",
+          },
         ],
         self_point: [
           {
             required: true,
             message: "请填写活动自评分数",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
         ],
         address: [
           {
             required: true,
             message: "请填写活动地址",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
         ],
         compere: [
           {
             required: true,
             message: "请填写主持人员",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
         ],
         participant: [
           {
             required: true,
             message: "请填写参与人员",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
         ],
         status: [
           {
             required: true,
             message: "请选择状态",
-            trigger: "change"
-          }
-        ]
+            trigger: "change",
+          },
+        ],
       }, //表格验证规则
       activeName: "image",
       fileData: {
-        file_type: "img"
+        file_type: "img",
       },
       fileList: [], //上传挡案文件列表
       resourceIds: [], //文件id
@@ -682,15 +677,15 @@ export default {
         {
           index: "",
           name: "",
-          job: ""
-        }
+          job: "",
+        },
       ],
       bigImage: "",
       activeType: ["线下活动", "线上活动"],
       total: 0,
       layout: "total, sizes, prev, pager, next, jumper",
       activeSortList: [], //活动分类列表
-      statisticsList: [] //活动统计列表
+      statisticsList: [], //活动统计列表
     };
   },
   components: { Tinymce, CountTo },
@@ -717,8 +712,8 @@ export default {
         path: "/personnel/index",
         query: {
           politics_status: type,
-          organization_id: this.id
-        }
+          organization_id: this.id,
+        },
       });
     },
     //上传入党志愿书人数
@@ -727,8 +722,8 @@ export default {
         path: "/personnel/index",
         query: {
           organization_id: this.id,
-          is_rdsqs: 1
-        }
+          is_rdsqs: 1,
+        },
       });
     },
     //获取活动分类
@@ -739,7 +734,7 @@ export default {
         console.log(key, data[key], "pppp");
         this.activeSortList.push({
           value: key,
-          label: data[key]
+          label: data[key],
         });
       }
     },
@@ -749,7 +744,7 @@ export default {
       var y = date.getFullYear();
       let params = {
         organization_id: this.id,
-        year: y
+        year: y,
       };
       const { data } = await activeStatistics(params);
       this.statisticsList = data;
@@ -777,7 +772,7 @@ export default {
     //组织信息
     async detail(id) {
       this.loadingFull = true;
-      await organizaDetail(id).then(res => {
+      await organizaDetail(id).then((res) => {
         this.organDetail = res.data;
         this.loadingFull = false;
       });
@@ -786,7 +781,7 @@ export default {
     async searchRecord() {
       this.queryForm.page = 1;
       this.loadingFull = true;
-      await changeRecords(this.queryForm).then(res => {
+      await changeRecords(this.queryForm).then((res) => {
         this.changeRecord = res.data.data;
         this.loadingFull = false;
       });
@@ -794,7 +789,7 @@ export default {
     //组织换届记录列表
     async record(id) {
       this.loadingFull = true;
-      await changeRecords(this.queryForm).then(res => {
+      await changeRecords(this.queryForm).then((res) => {
         this.loadingFull = false;
         console.log(res, "res");
         this.changeRecord = res.data.data;
@@ -808,12 +803,12 @@ export default {
         path: "/organization/list_details",
         query: {
           id: id,
-          organization_id: this.$route.query.id
-        }
+          organization_id: this.$route.query.id,
+        },
       });
     },
     //编辑换届记录
-    editDetail: function(row) {
+    editDetail: function (row) {
       this.formType = 1;
       this.recordVisible = true;
       this.setupForm = Object.assign({}, row);
@@ -822,12 +817,12 @@ export default {
     },
     //saveEdit保存编辑
     async saveEdit(formName) {
-      this.$refs[formName].validate(async valid => {
+      this.$refs[formName].validate(async (valid) => {
         if (valid) {
-          await updateRecord(this.setupForm).then(res => {
+          await updateRecord(this.setupForm).then((res) => {
             this.$message({
               message: "编辑成功",
-              type: "success"
+              type: "success",
             });
             this.recordVisible = false;
             this.loadingFull = false;
@@ -842,7 +837,7 @@ export default {
       this.$confirm("此操作将删除此换届记录, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           this.sureDeleteRecord(id);
@@ -850,49 +845,49 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
     async sureDeleteRecord(id) {
-      await deleteRecord(id).then(res => {
+      await deleteRecord(id).then((res) => {
         if (!res.code) {
           this.$message({
             message: "删除成功",
-            type: "success"
+            type: "success",
           });
           this.record(this.id);
         } else {
           this.$message({
             message: "删除失败",
-            type: "error"
+            type: "error",
           });
         }
       });
     },
     //创建换届记录
     submitForm(formName) {
-      this.$refs[formName].validate(async valid => {
+      this.$refs[formName].validate(async (valid) => {
         if (valid) {
           var reg = new RegExp("^(\\d|[1-9]\\d|100)$");
           if (!reg.test(this.setupForm.self_point)) {
             this.$message({
               message: "请输入0-100的整数!",
-              type: "warning"
+              type: "warning",
             });
             return;
           }
           if (!this.setupForm.cover) {
             this.$message({
               type: "error",
-              message: "请上传封面图!"
+              message: "请上传封面图!",
             });
             return;
           }
           if (!this.setupForm.body) {
             this.$message({
               type: "error",
-              message: "请填写活动内容!"
+              message: "请填写活动内容!",
             });
             return;
           }
@@ -904,7 +899,7 @@ export default {
     },
     async setup(formName) {
       // this.setupForm.zb_qtry=this.setupForm.zb_qtry.toString()
-      await setupRecord(this.setupForm).then(res => {
+      await setupRecord(this.setupForm).then((res) => {
         this.loadingFull = false;
         this.recordVisible = false;
         this.$refs[formName].resetFields();
@@ -947,11 +942,11 @@ export default {
       this.otherPerson.push({
         name: "",
         index: this.index,
-        job: ""
+        job: "",
       });
       this.setupForm.zb_qtry = this.otherPerson;
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 0 - 2
src/views/organization/list.vue

@@ -691,9 +691,7 @@ export default {
     }
   }
 }
-@import "@/assets/styles/content.scss";
 .organization-list {
-  margin: 0 30px;
   .creatform {
     width: 60%;
     margin: 0 auto;

+ 294 - 294
src/views/personnel/file_list.vue

@@ -1,294 +1,294 @@
-<template>
-  <div class="student_file_list">
-    <div v-loading.fullscreen.lock="loadingFull" />
-
-    <div class="search">
-      <el-form ref="searchParams" :model="searchParams" label-width="80px">
-        <el-input
-          v-model="searchParams.name"
-          placeholder="文件名称"
-          clearable
-        ></el-input>
-        <el-select v-model="searchParams.key" placeholder="请选择步骤">
-          <el-option
-            v-for="item in steps"
-            :key="item.key"
-            :label="item.name"
-            :value="item.key"
-          >
-          </el-option>
-        </el-select>
-        <el-button type="primary" @click="searchFile" icon="el-icon-search"
-          >搜索</el-button
-        >
-        <el-button type="primary" @click="editFile">添加</el-button>
-        <el-button type="primary" @click="packDownload">打包下载</el-button>
-      </el-form>
-    </div>
-    <el-table :data="filList" border align="center" style="width: 100%">
-      <el-table-column prop="name" label="文件名称" align="center">
-      </el-table-column>
-      <el-table-column prop="key_name.name" label="步骤名" align="center">
-      </el-table-column>
-      <el-table-column prop="organization.name" label="所属支部" align="center">
-      </el-table-column>
-      <el-table-column
-        prop="staff.name"
-        label="姓名"
-        width="180"
-        align="center"
-      >
-      </el-table-column>
-      <el-table-column prop="staff.no" label="学号" width="180" align="center">
-      </el-table-column>
-      <el-table-column label="操作" align="center" width="180">
-        <template slot-scope="{ row }">
-          <el-button plain type="primary" size="mini" @click="lookDetail(row)"
-            >查看</el-button
-          >
-          <el-button plain type="primary" size="mini" @click="editFile(row)"
-            >编辑</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-    <!--分页-->
-    <div class="paging">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="searchParams.page"
-        background
-        :page-sizes="[15, 20, 30, 50, 100, 200]"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="totalPage"
-      >
-      </el-pagination>
-    </div>
-    <!--资源详情-->
-    <el-dialog :visible.sync="dialogVisible" width="50%" center>
-      <div class="detail-con">
-        <div class="detail-title">{{ detailList.name }}</div>
-        <div class="title1">({{ detailList.is_branch_text }})</div>
-
-        <div class="edit-image">
-          <div
-            class="img-list"
-            @click="imageDetail(item)"
-            v-for="(item, index) in detailList.resource"
-          >
-            <img :src="item" alt="" />
-          </div>
-
-          <div
-            class="big-img"
-            v-show="imgDetaildialogVisible"
-            @click="closeBigImg"
-          >
-            <div class="img-border">
-              <img :src="bigImage" alt="" />
-            </div>
-          </div>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dialogVisible = false"
-          >关 闭</el-button
-        >
-      </span>
-    </el-dialog>
-    <FileEdit ref="edit" @fetch-data="archivesList"></FileEdit>
-  </div>
-</template>
-<script>
-import { archivesList, selectSteps } from "@/api/personnel/index";
-import { packDownload } from "@/api/process/index";
-import FileEdit from "./components/FileEdit";
-import "jquery";
-export default {
-  components: {
-    FileEdit
-  },
-  data() {
-    return {
-      filList: [],
-      loadingFull: false,
-      dialogVisible: false,
-      searchParams: {
-        name: "", //上传人员
-        limit: 15, //每页显示条数
-        page: 1 //当前页码
-      }, //搜索框数据
-      totalPage: 0, //总页码
-      detailList: [],
-      staffId: "",
-      steps: "",
-      bigImage: "",
-      imgDetaildialogVisible: false
-    };
-  },
-  created() {
-    this.staffId = this.$route.query.staff_id;
-    console.log(this.$route.query, "staffyyyyyyyyyyy");
-
-    this.searchParams.staff_id=this.staffId
-    this.archivesList();
-    this.selectSteps();
-  },
-  methods: {
-    editFile(row) {
-      if (row.id) {
-        let data = row;
-        this.$refs["edit"].showEdit(data, 0);
-      } else {
-        let data = {
-          staff_id: this.$route.query.staff_id,
-          organization_id: this.$route.query.organization_id
-        };
-        this.$refs["edit"].showEdit(data, 1);
-      }
-    },
-    //关闭大图
-    closeBigImg() {
-      this.imgDetaildialogVisible = false;
-    },
-    //查看大图
-    imageDetail(item) {
-      this.imgDetaildialogVisible = true;
-      this.bigImage = item;
-    },
-
-    //获取资源步骤
-    async selectSteps() {
-      const params = {
-        type: 1
-      };
-      await selectSteps(params).then(res => {
-        this.steps = res;
-      });
-    },
-    //资源详情列表
-    async archivesList() {
-      this.loadingFull = true;
-
-      await archivesList(this.searchParams).then(res => {
-        console.log(res);
-        this.filList = res.data.data;
-        this.totalPage = res.data.meta.pagination.total;
-        this.loadingFull = false;
-      });
-    },
-    //查看详情
-    lookDetail(row) {
-      this.dialogVisible = true;
-      this.detailList = row;
-    },
-    //打包下载
-
-    async packDownload() {
-      let url =
-        this.base_url + "/archives/staff/package?staff_id=" + this.staffId;
-      let a = document.createElement("a");
-      a.style.display = "none";
-      console.log(this.staffId, "--------------");
-      a.href = url;
-      document.body.appendChild(a);
-      //  let triggerDownload = $(a).attr("href", url)
-      //    .attr("download", "人员名单");
-      // triggerDownload[0].click();
-      a.click();
-      document.body.removeChild(a);
-    },
-    //搜索
-    searchFile() {
-      // this.searchParams.staff_id = this.staffId;
-      //搜索框数据
-      console.log(this.searchParams,'上传')
-      this.archivesList();
-    },
-    //切换页码
-    handleSizeChange(e) {
-      console.log(e, "切换页码");
-      this.searchParams.limit = e;
-      const data = this.searchParams;
-      this.archivesList(data);
-    },
-    //切换每页显示数量
-    handleCurrentChange(e) {
-      console.log(e, "当前页码");
-      this.searchParams.page = e;
-      const data = this.searchParams;
-      this.archivesList(data);
-    }
-  }
-};
-</script>
-<style lang="scss">
-.student_file_list {
-  .search {
-    .el-input {
-      width: 250px !important;
-    }
-    .el-select > .el-input {
-      width: 250px !important;
-    }
-  }
-
-  .edit-image {
-    text-align: center;
-    display: flex;
-    flex-flow: row wrap;
-  }
-  .detail-title {
-    height: 70px;
-    line-height: 70px;
-    font-size: 28px;
-    font-weight: bold;
-    text-align: center;
-  }
-  .title1 {
-    height: 50px;
-    line-height: 50px;
-    font-size: 16px;
-    text-align: center;
-  }
-  .img-list {
-    flex: 0 0 200px;
-    height: 200px;
-    width: 200px;
-    margin: 20px 5px 5px;
-    overflow: hidden;
-    img {
-      border: 1px solid #ccc;
-      border-radius: 5px;
-      height: 200px;
-      width: 200px;
-    }
-  }
-  .big-img {
-    position: fixed;
-    z-index: 99999;
-    width: 100%;
-    height: 100%;
-    top: 0;
-    left: 0;
-    background-color: rgba(0, 0, 0, 0.6);
-    overflow: hidden;
-    .img-border {
-      height: 90vh;
-      width: 50%;
-      min-width: 500px;
-      margin: 0 auto;
-      margin-top: 5vh;
-      background-color: #ffffff;
-      overflow: auto;
-      text-align: center;
-      line-height: 80vh;
-    }
-    img {
-      /* margin-top: 3%; */
-      width: 100%;
-    }
-  }
-}
-</style>
+<template>
+  <div class="student_file_list">
+    <div v-loading.fullscreen.lock="loadingFull" />
+
+    <div class="search">
+      <el-form ref="searchParams" :model="searchParams" label-width="80px">
+        <el-input
+          v-model="searchParams.name"
+          placeholder="文件名称"
+          clearable
+        ></el-input>
+        <el-select v-model="searchParams.key" placeholder="请选择步骤">
+          <el-option
+            v-for="item in steps"
+            :key="item.key"
+            :label="item.name"
+            :value="item.key"
+          >
+          </el-option>
+        </el-select>
+        <el-button type="primary" @click="searchFile" icon="el-icon-search"
+          >搜索</el-button
+        >
+        <el-button type="primary" @click="editFile">添加</el-button>
+        <el-button type="primary" @click="packDownload">打包下载</el-button>
+      </el-form>
+    </div>
+    <el-table :data="filList" border align="center" style="width: 100%">
+      <el-table-column prop="name" label="文件名称" align="center">
+      </el-table-column>
+      <el-table-column prop="key_name.name" label="步骤名" align="center">
+      </el-table-column>
+      <el-table-column prop="organization.name" label="所属支部" align="center">
+      </el-table-column>
+      <el-table-column
+        prop="staff.name"
+        label="姓名"
+        width="180"
+        align="center"
+      >
+      </el-table-column>
+      <el-table-column prop="staff.no" label="学号" width="180" align="center">
+      </el-table-column>
+      <el-table-column label="操作" align="center" width="180">
+        <template slot-scope="{ row }">
+          <el-button plain type="primary" size="mini" @click="lookDetail(row)"
+            >查看</el-button
+          >
+          <el-button plain type="primary" size="mini" @click="editFile(row)"
+            >编辑</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!--分页-->
+    <div class="paging">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="searchParams.page"
+        background
+        :page-sizes="[15, 20, 30, 50, 100, 200]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="totalPage"
+      >
+      </el-pagination>
+    </div>
+    <!--资源详情-->
+    <el-dialog :visible.sync="dialogVisible" width="50%" center>
+      <div class="detail-con">
+        <div class="detail-title">{{ detailList.name }}</div>
+        <div class="title1">({{ detailList.is_branch_text }})</div>
+
+        <div class="edit-image">
+          <div
+            class="img-list"
+            @click="imageDetail(item)"
+            v-for="(item, index) in detailList.resource"
+          >
+            <img :src="item" alt="" />
+          </div>
+
+          <div
+            class="big-img"
+            v-show="imgDetaildialogVisible"
+            @click="closeBigImg"
+          >
+            <div class="img-border">
+              <img :src="bigImage" alt="" />
+            </div>
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="dialogVisible = false"
+          >关 闭</el-button
+        >
+      </span>
+    </el-dialog>
+    <FileEdit ref="edit" @fetch-data="archivesList"></FileEdit>
+  </div>
+</template>
+<script>
+import { archivesList, selectSteps } from "@/api/personnel/index";
+import { packDownload } from "@/api/process/index";
+import FileEdit from "./components/FileEdit";
+import "jquery";
+export default {
+  components: {
+    FileEdit,
+  },
+  data() {
+    return {
+      filList: [],
+      loadingFull: false,
+      dialogVisible: false,
+      searchParams: {
+        name: "", //上传人员
+        limit: 15, //每页显示条数
+        page: 1, //当前页码
+      }, //搜索框数据
+      totalPage: 0, //总页码
+      detailList: [],
+      staffId: "",
+      steps: "",
+      bigImage: "",
+      imgDetaildialogVisible: false,
+    };
+  },
+  created() {
+    this.staffId = this.$route.query.staff_id;
+    console.log(this.$route.query, "staffyyyyyyyyyyy");
+
+    this.searchParams.staff_id = this.staffId;
+    this.archivesList();
+    this.selectSteps();
+  },
+  methods: {
+    editFile(row) {
+      if (row.id) {
+        let data = row;
+        this.$refs["edit"].showEdit(data, 0);
+      } else {
+        let data = {
+          staff_id: this.$route.query.staff_id,
+          organization_id: this.$route.query.organization_id,
+        };
+        this.$refs["edit"].showEdit(data, 1);
+      }
+    },
+    //关闭大图
+    closeBigImg() {
+      this.imgDetaildialogVisible = false;
+    },
+    //查看大图
+    imageDetail(item) {
+      this.imgDetaildialogVisible = true;
+      this.bigImage = item;
+    },
+
+    //获取资源步骤
+    async selectSteps() {
+      const params = {
+        type: 1,
+      };
+      await selectSteps(params).then((res) => {
+        this.steps = res;
+      });
+    },
+    //资源详情列表
+    async archivesList() {
+      this.loadingFull = true;
+
+      await archivesList(this.searchParams).then((res) => {
+        console.log(res);
+        this.filList = res.data.data;
+        this.totalPage = res.data.meta.pagination.total;
+        this.loadingFull = false;
+      });
+    },
+    //查看详情
+    lookDetail(row) {
+      this.dialogVisible = true;
+      this.detailList = row;
+    },
+    //打包下载
+
+    async packDownload() {
+      let url =
+        this.base_url + "/archives/staff/package?staff_id=" + this.staffId;
+      let a = document.createElement("a");
+      a.style.display = "none";
+      console.log(this.staffId, "--------------");
+      a.href = url;
+      document.body.appendChild(a);
+      //  let triggerDownload = $(a).attr("href", url)
+      //    .attr("download", "人员名单");
+      // triggerDownload[0].click();
+      a.click();
+      document.body.removeChild(a);
+    },
+    //搜索
+    searchFile() {
+      // this.searchParams.staff_id = this.staffId;
+      //搜索框数据
+      console.log(this.searchParams, "上传");
+      this.archivesList();
+    },
+    //切换页码
+    handleSizeChange(e) {
+      console.log(e, "切换页码");
+      this.searchParams.limit = e;
+      const data = this.searchParams;
+      this.archivesList(data);
+    },
+    //切换每页显示数量
+    handleCurrentChange(e) {
+      console.log(e, "当前页码");
+      this.searchParams.page = e;
+      const data = this.searchParams;
+      this.archivesList(data);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.student_file_list {
+  .search {
+    .el-input {
+      width: 250px !important;
+    }
+    .el-select > .el-input {
+      width: 250px !important;
+    }
+  }
+
+  .edit-image {
+    text-align: center;
+    display: flex;
+    flex-flow: row wrap;
+  }
+  .detail-title {
+    height: 70px;
+    line-height: 70px;
+    font-size: 28px;
+    font-weight: bold;
+    text-align: center;
+  }
+  .title1 {
+    height: 50px;
+    line-height: 50px;
+    font-size: 16px;
+    text-align: center;
+  }
+  .img-list {
+    flex: 0 0 200px;
+    height: 200px;
+    width: 200px;
+    margin: 20px 5px 5px;
+    overflow: hidden;
+    img {
+      border: 1px solid #ccc;
+      border-radius: 5px;
+      height: 200px;
+      width: 200px;
+    }
+  }
+  .big-img {
+    position: fixed;
+    z-index: 99999;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    background-color: rgba(0, 0, 0, 0.6);
+    overflow: hidden;
+    .img-border {
+      height: 90vh;
+      width: 50%;
+      min-width: 500px;
+      margin: 0 auto;
+      margin-top: 5vh;
+      background-color: #ffffff;
+      overflow: auto;
+      text-align: center;
+      line-height: 80vh;
+    }
+    img {
+      /* margin-top: 3%; */
+      width: 100%;
+    }
+  }
+}
+</style>

+ 75 - 80
src/views/personnel/index.vue

@@ -139,7 +139,7 @@
               @change="handleCheckAllChange"
               >全选</el-checkbox
             >
-            <div style="margin: 15px 0;"></div>
+            <div style="margin: 15px 0"></div>
             <el-checkbox-group
               v-model="checkedCities"
               @change="handleCheckedCitiesChange"
@@ -195,7 +195,7 @@
             >
             <div class="model">
               <div class="import-msg">
-                <p style="margin-bottom:5px;">注意:</p>
+                <p style="margin-bottom: 5px">注意:</p>
                 <p>1.请严格按照模板中提供的数据案例格式进行填写;</p>
                 <p>
                   2.其中姓名、学号、班级、支部名必须填写;其中支部名必须是已经存在的支部完整名称,否则数据不能导入;
@@ -496,9 +496,7 @@
           </el-form>
           <span slot="footer" class="dialog-footer">
             <el-button @click="partyShow = false">取 消</el-button>
-            <el-button type="primary" @click="resetParty"
-              >确 定</el-button
-            >
+            <el-button type="primary" @click="resetParty">确 定</el-button>
           </span>
         </el-dialog>
       </div>
@@ -517,7 +515,7 @@ import {
   batchPolitics,
   batchParty,
   fileGuidang,
-  getNationList
+  getNationList,
 } from "@/api/personnel/index";
 import { classLists } from "@/api/organizationList/index";
 import { getToken } from "@/utils/auth";
@@ -547,7 +545,7 @@ const cityOptions = [
   "性别",
   "民族",
   "联系电话",
-  "政治面貌"
+  "政治面貌",
 ];
 
 export default {
@@ -565,12 +563,12 @@ export default {
       resetPasswordVisible: false,
       importVisible: false,
       resetPoliticsVisible: false,
-      partyShow:false,
+      partyShow: false,
       importFieldsVisible: false, // 选择需要导出的字段
       classList: "",
       resetPassword: {
         staff_id: "",
-        password: ""
+        password: "",
       }, //重置密码
       fileList: [], //上传文件列表
       fileName: "", //文件名称
@@ -582,49 +580,49 @@ export default {
         is_graduate: 0,
         politics_status: "",
         organization_id: "", //组织id
-        is_rdsqs: '',
+        is_rdsqs: "",
         limit: 15, //每页显示条数
-        page: 1 //当前页码
+        page: 1, //当前页码
       }, //搜索框数据
       rdsqs_list: [
         {
           value: 0,
-          label: "未上传入党申请书"
+          label: "未上传入党申请书",
         },
         {
           value: 1,
-          label: "已上传入党申请书"
-        }
+          label: "已上传入党申请书",
+        },
       ],
 
       politics: {
         ids: [],
-        politics_status: ""
+        politics_status: "",
       },
       politics_status: [
         {
           id: "",
-          name: ""
-        }
+          name: "",
+        },
       ],
       politicsIndex: "", //选中身份索引
       totalPage: 0, //总页码
       tableList: [], //人员列表
       personnelDetails: {
         organization: {
-          name: ""
-        }
+          name: "",
+        },
       }, //人员详情
       nationList: [], //民族liebiao
       sex: [
         {
           value: 1,
-          label: "男"
+          label: "男",
         },
         {
           value: 2,
-          label: "女"
-        }
+          label: "女",
+        },
       ],
       nation: [],
       //政治面貌
@@ -637,15 +635,15 @@ export default {
       graduate: [
         {
           value: 1,
-          label: "已归档"
+          label: "已归档",
         },
         {
           value: 0,
-          label: "未归档"
-        }
+          label: "未归档",
+        },
       ],
       modelUrl: "http://api.party.site.ximengnaikang.com/学生导入模板.xlsx",
-      partyArr:[]
+      partyArr: [],
     };
   },
 
@@ -659,12 +657,12 @@ export default {
     this.getNationList();
     this.getTreeLists();
     //获取班级列表
-    classLists().then(res => {
+    classLists().then((res) => {
       this.classList = res;
     });
     console.log(token, "token");
     this.importHeader = {
-      Authorization: "Bearer " + token
+      Authorization: "Bearer " + token,
     };
 
     this.politics_status = [
@@ -672,7 +670,7 @@ export default {
       { id: 3, name: "积极分子" },
       { id: 4, name: "中共预备党员" },
       { id: 5, name: "中共党员" },
-      { id: 6, name: "发展对象" }
+      { id: 6, name: "发展对象" },
     ];
   },
   methods: {
@@ -700,11 +698,11 @@ export default {
     ceshi(e) {
       console.log(this.searchParams.is_graduate, "ceshi");
     },
-    cancelSelectField: function() {
+    cancelSelectField: function () {
       this.fieldSelect = [];
       this.importFieldsVisible = false;
     },
-    sureSelectField: function() {
+    sureSelectField: function () {
       if (this.fieldSelect.length == 0) {
         this.$message.error("请选择需要导出的字段");
       } else {
@@ -717,7 +715,7 @@ export default {
           //到出选择项
           let arr = [];
           let selection = this.selection;
-          selection.forEach(item => {
+          selection.forEach((item) => {
             item.id;
             arr.push(item.id);
             return arr;
@@ -729,7 +727,7 @@ export default {
           //导出当前页
           let arr = [];
           let selection = this.tableList;
-          selection.forEach(item => {
+          selection.forEach((item) => {
             item.id;
             arr.push(item.id);
             console.log(arr);
@@ -759,7 +757,7 @@ export default {
       console.log(value, "----------------");
       let arr = [];
 
-      value.map(item => {
+      value.map((item) => {
         let index = this.cities.indexOf(item) + 1;
         arr.push(index);
         console.log(index, "++++++++++++K++++++++++++++");
@@ -778,15 +776,15 @@ export default {
     getFileList(row) {
       this.$router.push({
         name: "filelist",
-        query: { staff_id: row.id, organization_id: row.organization_id }
+        query: { staff_id: row.id, organization_id: row.organization_id },
       });
     },
     //获取组织树状列表
     async getTreeLists() {
       this.loadingFull = true;
-      await treeOrganizationList().then(res => {
+      await treeOrganizationList().then((res) => {
         this.treeList = this.treeList.concat(res.data);
-        this.partyArr = res.data
+        this.partyArr = res.data;
         console.log(res, "获取组织树状列表");
         this.personnelList();
       });
@@ -797,7 +795,7 @@ export default {
       if (this.searchParams.organization_id == 0) {
         this.searchParams.organization_id = "";
       }
-      await personnelList(this.searchParams).then(res => {
+      await personnelList(this.searchParams).then((res) => {
         console.log(res, "获取人员列表");
         this.tableList = res.data.data;
         this.totalPage = res.data.meta.pagination.total;
@@ -813,24 +811,24 @@ export default {
     //选中政治面貌
     async resetChangePolics(e) {
       await batchPolitics(this.politics)
-        .then(res => {
+        .then((res) => {
           console.log(res, "piliangxiiugai ");
           this.$message.success("批量修改成功");
           this.resetPoliticsVisible = false;
           this.personnelList();
         })
-        .catch(err => {});
+        .catch((err) => {});
     },
     //选中党组织
-    async resetParty(){
+    async resetParty() {
       await batchParty(this.politics)
-        .then(res => {
+        .then((res) => {
           console.log(res, "piliangxiiugai ");
           this.$message.success("批量修改成功");
           this.partyShow = false;
           this.personnelList();
         })
-        .catch(err => {});
+        .catch((err) => {});
     },
     //批量修改政治面貌
     batchRevise() {
@@ -841,7 +839,7 @@ export default {
         console.log(this.selection, "selection");
         let arr = [];
         let selection = this.selection;
-        selection.forEach(item => {
+        selection.forEach((item) => {
           item.id;
           arr.push(item.id);
           return arr;
@@ -852,7 +850,7 @@ export default {
       }
     },
     //修改党组织
-    partyOrganization(){
+    partyOrganization() {
       if (this.selection.length == 0) {
         this.$message.error("请先选择需要修改的人员");
       } else {
@@ -860,7 +858,7 @@ export default {
         console.log(this.partyArr, "selection");
         let arr = [];
         let selection = this.selection;
-        selection.forEach(item => {
+        selection.forEach((item) => {
           item.id;
           arr.push(item.id);
           return arr;
@@ -878,7 +876,7 @@ export default {
         console.log(this.selection, "selection");
         let arr = [];
         let selection = this.selection;
-        selection.forEach(item => {
+        selection.forEach((item) => {
           item.id;
           arr.push(item.id);
           return arr;
@@ -886,12 +884,12 @@ export default {
         let ids = arr;
         const date = {
           ids: arr,
-          is_graduate: 1
+          is_graduate: 1,
         };
         this.$confirm("此操作将选中人员移入历史党员档案, 是否继续?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
+          type: "warning",
         })
           .then(() => {
             this.fileGuidang(date);
@@ -899,14 +897,14 @@ export default {
           .catch(() => {
             this.$message({
               type: "info",
-              message: "已取消删除"
+              message: "已取消删除",
             });
             this.selection = [];
           });
       }
     },
     async fileGuidang(date) {
-      await fileGuidang(date).then(res => {
+      await fileGuidang(date).then((res) => {
         this.personnelList();
       });
     },
@@ -924,7 +922,7 @@ export default {
       //this.$refs.upload.submit();
       console.log(file, "filr");
       this.importVisible = false;
-      setTimeout(function() {
+      setTimeout(function () {
         that.personnelList();
         this.loadingFull = false;
       }, 1000);
@@ -943,31 +941,30 @@ export default {
         method: "get",
         url: "/staffs/export",
         headers: {
-          Authorization: "Bearer " + getToken()
+          Authorization: "Bearer " + getToken(),
         },
         params: {
           ids: arr,
           fields: this.fieldSelect,
           politics_status: this.searchParams.politics_status,
-          organization_id: this.searchParams.organization_id
+          organization_id: this.searchParams.organization_id,
         },
-        responseType: "blob"
-      }).then(response => {
+        responseType: "blob",
+      }).then((response) => {
         this.convertRes2Blob(response);
       });
     },
 
     convertRes2Blob(response) {
       // 提取文件名
-      const fileNameList = response.headers["content-disposition"].match(
-        /filename=(.*)(.*)/
-      );
+      const fileNameList =
+        response.headers["content-disposition"].match(/filename=(.*)(.*)/);
       console.log(fileNameList, "Mead");
       const fileName = fileNameList[1];
 
       // 将二进制流转为blob
       const blob = new Blob([response.data], {
-        type: "application/vnd.ms-excel"
+        type: "application/vnd.ms-excel",
       });
       if (typeof window.navigator.msSaveBlob !== "undefined") {
         // 兼容IE,window.navigator.msSaveBlob:以本地方式保存文件
@@ -1002,8 +999,8 @@ export default {
     //导出
     async exportPersonnel(params) {
       await exportPersonnel(params)
-        .then(res => {})
-        .catch(e => {
+        .then((res) => {})
+        .catch((e) => {
           this.loadingFull = false;
         });
     },
@@ -1025,9 +1022,9 @@ export default {
         is_graduate: 0,
         politics_status: "",
         organization_id: "", //组织id
-        is_rdsqs: '',
+        is_rdsqs: "",
         limit: 15, //每页显示条数
-        page: 1 //当前页码
+        page: 1, //当前页码
       }; //搜索框数据
       this.searchParams.is_graduate = 0;
       this.searchParams.organization_id = e.id;
@@ -1036,13 +1033,13 @@ export default {
     //查看详情
     getDetail(id) {
       const params = {
-        id: id
+        id: id,
       };
       this.personnelDetail(params);
     },
     async personnelDetail(params) {
       this.loadingFull = true;
-      await personnelDetail(params).then(res => {
+      await personnelDetail(params).then((res) => {
         console.log(res, "人员详情");
         this.personnelDetails = res.data;
         this.dialogVisible = true;
@@ -1058,7 +1055,7 @@ export default {
       this.$confirm("此操作将永久删除该人员信息, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           this.deletePersonnelList(id);
@@ -1066,23 +1063,23 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
     async deletePersonnelList(id) {
-      await deletePersonnelList(id).then(res => {
+      await deletePersonnelList(id).then((res) => {
         if (!res.code) {
           this.$message({
             type: "success",
-            message: "删除成功"
+            message: "删除成功",
           });
 
           this.personnelList();
         } else {
           this.$message({
             type: "error",
-            message: "删除失败"
+            message: "删除失败",
           });
         }
       });
@@ -1096,12 +1093,12 @@ export default {
     resetPwd() {
       this.loadingFull = true;
       remarkPwd(this.resetPassword)
-        .then(res => {
+        .then((res) => {
           this.$message.success("重置密码成功");
           this.resetPasswordVisible = false;
           this.loadingFull = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.$message.error("重置密码失败");
           this.loadingFull = false;
         });
@@ -1118,15 +1115,12 @@ export default {
       this.searchParams.page = e;
 
       this.personnelList();
-    }
-  }
+    },
+  },
 };
 </script>
-<style lang="scss">
-@import "@/assets/styles/content.scss";
+<style lang="scss" scoped>
 .app-main {
-  padding-left: 10px !important;
-  padding-bottom: 0 !important;
   .el-checkbox {
     line-height: 40px;
   }
@@ -1169,7 +1163,8 @@ export default {
       flex: 1;
       padding-bottom: 50px;
       margin-left: 20px;
-      width: 83%;
+      width: calc(100% - 300px);
+      // margin-right: 10px;
       .upload-import {
         text-align: center;
       }

+ 1 - 4
src/views/reminder/index.vue

@@ -497,10 +497,7 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-@import "@/assets/styles/content.scss";
-.index-home {
-  margin: 0 30px;
-}
+
 .demo-ruleForm {
   margin: 0 50px;
 }

+ 0 - 0
src/views/video/api/index.js


+ 0 - 0
src/views/video/index.vue


+ 54 - 54
vue.config.js

@@ -1,19 +1,19 @@
-"use strict";
-const path = require("path");
-const defaultSettings = require("./src/settings.js");
-const webpack = require("webpack");
+'use strict'
+const path = require('path')
+const defaultSettings = require('./src/settings.js')
+const webpack = require('webpack')
 function resolve(dir) {
-  return path.join(__dirname, dir);
+  return path.join(__dirname, dir)
 }
 
-const name = defaultSettings.title || "vue Admin Template"; // page title
+const name = defaultSettings.title || 'vue Admin Template' // page title
 
 // If your port is set to 80,
 // use administrator privileges to execute the command line.
 // For example, Mac: sudo npm run
 // You can change the port by the following methods:
 // port = 9528 npm run dev OR npm run dev --port = 9528
-const port = process.env.port || process.env.npm_config_port || 9528; // dev port
+const port = process.env.port || process.env.npm_config_port || 9528 // dev port
 
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -24,18 +24,18 @@ module.exports = {
    * In most cases please use '/' !!!
    * Detail: https://cli.vuejs.org/config/#publicpath
    */
-  publicPath: "/",
-  outputDir: process.env.VUE_APP_OUTPUT ? process.env.VUE_APP_OUTPUT : "dist",
-  assetsDir: "static",
-  lintOnSave: process.env.NODE_ENV === "development",
+  publicPath: '/',
+  outputDir: process.env.VUE_APP_OUTPUT ? process.env.VUE_APP_OUTPUT : 'dist',
+  assetsDir: 'static',
+  lintOnSave: process.env.NODE_ENV === 'development',
   productionSourceMap: false,
   devServer: {
     port: port,
     open: true,
     overlay: {
       warnings: false,
-      errors: true,
-    },
+      errors: true
+    }
 
     // // before: require('./mock/mock-server.js')
     // proxy: {
@@ -56,81 +56,81 @@ module.exports = {
     name: name,
     resolve: {
       alias: {
-        "@": resolve("src"),
-      },
+        '@': resolve('src')
+      }
     },
     plugins: [
       new webpack.ProvidePlugin({
-        jQuery: "jquery",
-        $: "jquery",
-      }),
-    ],
+        jQuery: 'jquery',
+        $: 'jquery'
+      })
+    ]
   },
   chainWebpack(config) {
     // it can improve the speed of the first screen, it is recommended to turn on preload
-    config.plugin("preload").tap(() => [
+    config.plugin('preload').tap(() => [
       {
-        rel: "preload",
+        rel: 'preload',
         // to ignore runtime.js
         // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
         fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
-        include: "initial",
-      },
-    ]);
+        include: 'initial'
+      }
+    ])
 
     // when there are many pages, it will cause too many meaningless requests
-    config.plugins.delete("prefetch");
+    config.plugins.delete('prefetch')
 
     // set svg-sprite-loader
-    config.module.rule("svg").exclude.add(resolve("src/icons")).end();
+    config.module.rule('svg').exclude.add(resolve('src/icons')).end()
     config.module
-      .rule("icons")
+      .rule('icons')
       .test(/\.svg$/)
-      .include.add(resolve("src/icons"))
+      .include.add(resolve('src/icons'))
       .end()
-      .use("svg-sprite-loader")
-      .loader("svg-sprite-loader")
+      .use('svg-sprite-loader')
+      .loader('svg-sprite-loader')
       .options({
-        symbolId: "icon-[name]",
+        symbolId: 'icon-[name]'
       })
-      .end();
+      .end()
 
-    config.when(process.env.NODE_ENV !== "development", (config) => {
+    config.when(process.env.NODE_ENV !== 'development', (config) => {
       config
-        .plugin("ScriptExtHtmlWebpackPlugin")
-        .after("html")
-        .use("script-ext-html-webpack-plugin", [
+        .plugin('ScriptExtHtmlWebpackPlugin')
+        .after('html')
+        .use('script-ext-html-webpack-plugin', [
           {
             // `runtime` must same as runtimeChunk name. default is `runtime`
-            inline: /runtime\..*\.js$/,
-          },
+            inline: /runtime\..*\.js$/
+          }
         ])
-        .end();
+        .end()
       config.optimization.splitChunks({
-        chunks: "all",
+        chunks: 'all',
         cacheGroups: {
           libs: {
-            name: "chunk-libs",
+            name: 'chunk-libs',
             test: /[\\/]node_modules[\\/]/,
             priority: 10,
-            chunks: "initial", // only package third parties that are initially dependent
+            chunks: 'initial' // only package third parties that are initially dependent
           },
           elementUI: {
-            name: "chunk-elementUI", // split elementUI into a single package
+            name: 'chunk-elementUI', // split elementUI into a single package
             priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
-            test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
+            test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
           },
           commons: {
-            name: "chunk-commons",
-            test: resolve("src/components"), // can customize your rules
+            name: 'chunk-commons',
+            test: resolve('src/components'), // can customize your rules
             minChunks: 3, //  minimum common number
             priority: 5,
-            reuseExistingChunk: true,
-          },
-        },
-      });
+            reuseExistingChunk: true
+          }
+        }
+      })
       // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
-      config.optimization.runtimeChunk("single");
-    });
-  },
-};
+      config.optimization.runtimeChunk('single')
+    })
+  }
+}