From e5c313534d5ad4bfd97cb7930c7e54f0826a7e97 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 03 Sep 2021 17:31:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/lang/zh.js                                       |  209 ++++----
 src/page/login/index.vue                             |   47 +
 src/views/applyexam/index.vue                        |   29 +
 src/views/trainingRegistration/data.js               |   44 +
 src/api/zc/zc.js                                     |   57 ++
 src/views/securityGuard/securityGuard.vue            |   52 ++
 src/views/traincompany/index.vue                     |   95 +--
 src/api/trainingRegistration/trainingRegistration.js |    3 
 src/views/trainApply/index.vue                       |    5 
 src/views/applyexam/papers.vue                       |   13 
 src/views/trainingRegistration/index.vue             |   48 +
 src/api/system/dept.js                               |   16 
 src/api/examapi/applyexam.js                         |    3 
 public/papersTrain.html                              |  222 +++++++++
 src/views/zc/zc.vue                                  |  275 +++++++++++
 src/page/login/codelogin.vue                         |  280 ++++++++++-
 16 files changed, 1,153 insertions(+), 245 deletions(-)

diff --git a/public/papersTrain.html b/public/papersTrain.html
new file mode 100644
index 0000000..7b2095c
--- /dev/null
+++ b/public/papersTrain.html
@@ -0,0 +1,222 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <style>
+        #table {
+            color: #000;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            flex-direction: column;
+        }
+        /* .print-header {
+            width: 100%;
+            text-align: center;
+        } */
+        
+        .print {
+            position: relative;
+            left: 47%;
+            margin-top: 30px;
+            width: 7%;
+            height: 30px;
+            border: 0px;
+            border-radius: 6px;
+            color: #fff;
+            background-color: #1D5CE4;
+            letter-spacing: 4px;
+        }
+        
+        .user-info-table {
+            margin-top: 30px;
+            width: 90%;
+            height: 60%;
+            border: 1px solid #000;
+            background-color: #fff;
+        }
+        
+        .user-info-tr {
+            height: 50px;
+        }
+        
+        .avatar {
+            width: 140px;
+            height: 190px;
+        }
+        
+        .title {
+            margin-top: 20px;
+        }
+        
+        .avatar {
+            width: 140px;
+            height: 190px;
+        }
+        
+        .my-picture {
+            width: 150px;
+            /* height: 200px; */
+        }
+    </style>
+    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
+</head>
+
+
+<body>
+    <div>
+
+        <!--startprint-->
+        <div id="table">
+            <!-- <span class="title">准考证信息</span>
+            <table class="user-info-table" border="1px" align="center" cellspacing="0" cellpadding="10">
+                <tr class="user-info-tr">
+                    <td width="150px">姓名</td>
+                    <td width="150px"></td>
+                    <td width="150px">身份证号</td>
+                    <td width="150px"></td>
+                    <td rowspan="4" align="center" width="150px" v-if="data.avatar == ''">
+                        照片
+                    </td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>准考证号</td>
+                    <td></td>
+                    <td width="150px">性别</td>
+                    <td width="150px" v-if="data.sex == 1">男</td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>考点名称</td>
+                    <td colspan="3"></td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>考点地址</td>
+                    <td colspan="3"></td>
+                </tr>
+
+                <tr class="user-info-tr" style="height:5px">
+                    <td colspan="5"></td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>考试名称</td>
+                    <td>考试类型</td>
+                    <td>考试时间</td>
+                    <td>考场号</td>
+                    <td>座位号</td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>{{data.examName}}</td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                </tr>
+
+            </table>-->
+        </div>
+        <!--endprint-->
+
+
+        <div class="print-header">
+            <button onclick="preview(1)" class="print">打印</button>
+        </div>
+    </div>
+    <script>
+        var getData = function(name) {
+            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+            var r = window.location.search.substr(1).match(reg);
+            if (r != null) return unescape(r[2]);
+            return null;
+        };
+        var id = JSON.parse(getData("data")).id;
+        var examType = JSON.parse(getData("data")).examType;
+        // console.log(JSON.parse(getData("data")), 111);
+
+        axios.get('http://223.82.109.183:2080/api/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
+            // axios.get('http://localhost:81/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
+            var data = res.data.data;
+            var str = `<span class="title">${data.examName}</span>
+                    <span class="title">准考证信息</span>
+                    <table class="user-info-table" border="1px" align="center" cellspacing="0" cellpadding="10">
+                        <tr class="user-info-tr">
+                            <td width="150px">姓名</td>
+                            <td width="150px">${data.realName}</td>
+                            <td width="150px">身份证号</td>
+                            <td width="150px">${data.idCardNo}</td>
+                            <td rowspan="4" align="center" width="150px"">
+                                <img class="my-picture" src="${data.myPicture}" />
+                            </td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>准考证号</td>
+                            <td>${data.candidateNo}</td>
+                            <td width="150px">性别</td>
+                            <td width="150px">${data.sex==1?"男":(data.sex==2?"女":"")}</td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>考点名称</td>
+                            <td colspan="3">${data.company}</td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>考点地址</td>
+                            <td colspan="3">${data.address}</td>
+                        </tr>
+
+                        <tr class="user-info-tr" style="height:5px">
+                            <td colspan="5"></td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td colspan="2">考试名称</td>
+                            <td width="120px">考试类型</td>
+                            <td width="180px" colspan="2">考试时间</td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td colspan="2">${data.examName}</td>
+                            <td width="120px">培训考试</td>
+                            <td width="180px" colspan="2">${data.stringTime}</td>
+                        </tr>
+
+                    </table>`
+
+            var dom = $('#table');
+            dom.empty();
+            dom.append(str);
+        })
+
+        function preview(oper) {
+            if (oper < 10) {
+                bdhtml = window.document.body.innerHTML;
+                // 打印开始的标志
+                sprnstr = "<!--startprint-->";
+                // 打印结束的标志
+                eprnstr = "<!--endprint-->";
+                // 从打印开始的位置截取到末尾
+                prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
+                // 从开始截取到打印结束的位置
+                prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
+                // 替换html
+                window.document.body.innerHTML = prnhtml;
+                // 打印
+                window.print();
+                window.document.body.innerHTML = bdhtml;
+            } else {
+                window.print();
+            }
+        }
+    </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/api/examapi/applyexam.js b/src/api/examapi/applyexam.js
index 7f6700f..5200c39 100644
--- a/src/api/examapi/applyexam.js
+++ b/src/api/examapi/applyexam.js
@@ -60,7 +60,7 @@
     })
 }
 
-export const addExam = (ids, examTime, startTime, endTime) => {
+export const addExam = (ids, examTime, startTime, number, endTime) => {
     return request({
         url: '/api/apply/batchExam',
         method: 'post',
@@ -68,6 +68,7 @@
             ids,
             examTime,
             startTime,
+            number,
             endTime
         }
     })
diff --git a/src/api/system/dept.js b/src/api/system/dept.js
index d6d3f47..2b8b1bf 100644
--- a/src/api/system/dept.js
+++ b/src/api/system/dept.js
@@ -88,4 +88,18 @@
             parentId
         }
     })
-}
\ No newline at end of file
+}
+
+export const ss = () => {
+  return request({
+    url: '/api/blade-system/dept/selectInfo',
+    method: 'get',
+  })
+}
+
+export const rs = () => {
+  return request({
+    url: '/api/blade-system/role/selectRole',
+    method: 'get',
+  })
+}
diff --git a/src/api/trainingRegistration/trainingRegistration.js b/src/api/trainingRegistration/trainingRegistration.js
index 9b93056..46ec956 100644
--- a/src/api/trainingRegistration/trainingRegistration.js
+++ b/src/api/trainingRegistration/trainingRegistration.js
@@ -57,7 +57,7 @@
 }
 
 
-export const addExam = (ids, examTime, startTime, endTime) => {
+export const addExam = (ids, examTime, startTime, number, endTime) => {
     return request({
         url: '/api/trainingRegistration/batchExam',
         method: 'post',
@@ -65,6 +65,7 @@
             ids,
             examTime,
             startTime,
+            number,
             endTime
         }
     })
diff --git a/src/api/zc/zc.js b/src/api/zc/zc.js
new file mode 100644
index 0000000..9201feb
--- /dev/null
+++ b/src/api/zc/zc.js
@@ -0,0 +1,57 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/zc/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/zc/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/zc/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/zc/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/zc/update',
+    method: 'post',
+    data: row
+  })
+}
+
+export const inster = (row) => {
+  return request({
+    url: '/api/zc/inster',
+    method: 'post',
+    data: row
+  })
+}
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 0e17b06..2e4e965 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -1,108 +1,113 @@
 export default {
-    tip: '提示',
-    title: '保安服务企业管理',
-    logoutTip: '退出系统, 是否继续?',
-    submitText: '确定',
-    cancelText: '取消',
-    search: '请输入搜索内容',
-    menuTip: '没有发现菜单',
-    wel: {
-        info: '早安,Smallwei,Avuex一款超乎你想象的框架!',
-        dept: '我是avue团队下的一个部门-哈皮部门-哈皮职位',
-        team: '团队内排名',
-        project: '项目访问',
-        count: '项目数',
-        data: {
-            subtitle: '实时',
-            column1: '分类统计',
-            column2: '附件统计',
-            column3: '文章统计',
-            key1: '分',
-            key2: '附',
-            key3: '评',
-            text1: '当前分类总记录数',
-            text2: '当前上传的附件数',
-            text3: '评论次数'
-        },
-        data2: {
-            column1: '今日注册',
-            column2: '今日登录',
-            column3: '今日订阅',
-            column4: '今日评论'
-        },
-        data3: {
-            column1: '转化率(日同比 28%)',
-            column2: '签到率(日同比 11%)',
-            column3: '签到率(日同比 11%)'
-        },
-        data4: {
-            column1: '错误日志',
-            column2: '数据展示',
-            column3: '权限管理',
-            column4: '用户管理'
-        },
-        table: {
-            rw: '工作任务',
-            nr: '工作内容',
-            sj: '工作时间'
-        }
+  tip: '提示',
+  title: '保安服务企业管理',
+  logoutTip: '退出系统, 是否继续?',
+  submitText: '确定',
+  cancelText: '取消',
+  search: '请输入搜索内容',
+  menuTip: '没有发现菜单',
+  wel: {
+    info: '早安,Smallwei,Avuex一款超乎你想象的框架!',
+    dept: '我是avue团队下的一个部门-哈皮部门-哈皮职位',
+    team: '团队内排名',
+    project: '项目访问',
+    count: '项目数',
+    data: {
+      subtitle: '实时',
+      column1: '分类统计',
+      column2: '附件统计',
+      column3: '文章统计',
+      key1: '分',
+      key2: '附',
+      key3: '评',
+      text1: '当前分类总记录数',
+      text2: '当前上传的附件数',
+      text3: '评论次数'
     },
-    route: {
-        info: '个人信息',
-        website: 'bladex官网',
-        avuexwebsite: 'avuex官网',
-        dashboard: '首页',
-        more: '更多',
-        tags: '标签',
-        store: '本地存储',
-        api: '全局函数',
-        logs: '日志监控',
-        table: '表格',
-        form: '表单',
-        top: '返回顶部',
-        data: '数据展示',
-        permission: '权限',
-        error: '异常页面',
-        test: '测试页面'
+    data2: {
+      column1: '今日注册',
+      column2: '今日登录',
+      column3: '今日订阅',
+      column4: '今日评论'
     },
-    login: {
-        title: '登录 ',
-        info: '保安服务企业管理',
-        tenantId: '请输入保安单位ID',
-        username: '请输入账号',
-        password: '请输入密码',
-        wechat: '微信',
-        qq: 'QQ',
-        github: 'github',
-        gitee: '码云',
-        phone: '请输入手机号',
-        code: '请输入验证码',
-        submit: '登录',
-        userLogin: '账号密码登录',
-        phoneLogin: '手机号登录',
-        thirdLogin: '第三方系统登录',
-        msgText: '发送验证码',
-        msgSuccess: '秒后重发',
+    data3: {
+      column1: '转化率(日同比 28%)',
+      column2: '签到率(日同比 11%)',
+      column3: '签到率(日同比 11%)'
     },
-    navbar: {
-        logOut: '退出登录',
-        userinfo: '个人信息',
-        dashboard: '首页',
-        lock: '锁屏',
-        bug: '没有错误日志',
-        bugs: '条错误日志',
-        screenfullF: '退出全屏',
-        screenfull: '全屏',
-        language: '中英文',
-        notice: '消息通知',
-        theme: '主题',
-        color: '换色'
+    data4: {
+      column1: '错误日志',
+      column2: '数据展示',
+      column3: '权限管理',
+      column4: '用户管理'
     },
-    tagsView: {
-        search: '搜索',
-        menu: '更多',
-        clearCache: '清除缓存',
-        closeOthers: '关闭其它',
-        closeAll: '关闭所有'
+    table: {
+      rw: '工作任务',
+      nr: '工作内容',
+      sj: '工作时间'
     }
-}
\ No newline at end of file
+  },
+  route: {
+    info: '个人信息',
+    website: 'bladex官网',
+    avuexwebsite: 'avuex官网',
+    dashboard: '首页',
+    more: '更多',
+    tags: '标签',
+    store: '本地存储',
+    api: '全局函数',
+    logs: '日志监控',
+    table: '表格',
+    form: '表单',
+    top: '返回顶部',
+    data: '数据展示',
+    permission: '权限',
+    error: '异常页面',
+    test: '测试页面'
+  },
+  login: {
+    title: '登录 ',
+    info: '保安服务企业管理',
+    tenantId: '请输入保安单位ID',
+    username: '请输入账号',
+    password: '请输入密码',
+    password2: '请再次输入密码',
+    name: '请输入姓名',
+    wechat: '微信',
+    cardid: '请输入身份证号',
+    qq: 'QQ',
+    zc: '注册',
+    gb: '关闭',
+    github: 'github',
+    gitee: '码云',
+    phone: '请输入手机号',
+    code: '请输入验证码',
+    submit: '登录',
+    userLogin: '账号密码登录',
+    phoneLogin: '账号注册',
+    thirdLogin: '第三方系统登录',
+    msgText: '发送验证码',
+    msgSuccess: '秒后重发',
+  },
+  navbar: {
+    logOut: '退出登录',
+    userinfo: '个人信息',
+    dashboard: '首页',
+    lock: '锁屏',
+    bug: '没有错误日志',
+    bugs: '条错误日志',
+    screenfullF: '退出全屏',
+    screenfull: '全屏',
+    language: '中英文',
+    notice: '消息通知',
+    theme: '主题',
+    color: '换色'
+  },
+  tagsView: {
+    search: '搜索',
+    menu: '更多',
+    clearCache: '清除缓存',
+    closeOthers: '关闭其它',
+    closeAll: '关闭所有'
+  }
+}
diff --git a/src/page/login/codelogin.vue b/src/page/login/codelogin.vue
index 79022c3..92ed3a5 100644
--- a/src/page/login/codelogin.vue
+++ b/src/page/login/codelogin.vue
@@ -5,80 +5,146 @@
            ref="loginForm"
            :model="loginForm"
            label-width="0">
-    <el-form-item prop="phone">
+    <el-form-item prop="username">
       <el-input size="small"
                 @keyup.enter.native="handleLogin"
-                v-model="loginForm.phone"
+                v-model="loginForm.username"
                 auto-complete="off"
-                :placeholder="$t('login.phone')">
-        <i slot="prefix"
-           class="icon-shouji"/>
+                :placeholder="$t('login.username')">
+        <i slot="prefix" class="icon-yonghu"/>
       </el-input>
     </el-form-item>
-    <el-form-item prop="code">
+    <el-form-item prop="password">
       <el-input size="small"
                 @keyup.enter.native="handleLogin"
-                v-model="loginForm.code"
+                v-model="loginForm.password"
                 auto-complete="off"
-                :placeholder="$t('login.code')">
-        <i slot="prefix"
-           class="icon-yanzhengma"
-           style="margin-top:6px;"/>
-        <template slot="append">
-          <span @click="handleSend"
-                class="msg-text"
-                :class="[{display:msgKey}]">{{msgText}}</span>
-        </template>
+                show-password
+                :placeholder="$t('login.password')">
+        <i slot="prefix" class="icon-mima"/>
       </el-input>
     </el-form-item>
-    <el-form-item>
+    <el-form-item prop="password2">
+      <el-input size="small"
+                @keyup.enter.native="handleLogin"
+                v-model="loginForm.password2"
+                auto-complete="off"
+                show-password
+                :placeholder="$t('login.password2')">
+        <i slot="prefix" class="icon-mima"/>
+      </el-input>
+    </el-form-item>
+    <el-form-item prop="sname">
+      <el-input size="small"
+                @keyup.enter.native="handleLogin"
+                v-model="loginForm.sname"
+                auto-complete="off"
+                :placeholder="$t('login.name')">
+        <i slot="prefix" class="icon-yonghu"/>
+      </el-input>
+    </el-form-item>
+    <el-form-item prop="cardid">
+      <el-input size="small"
+                v-model="loginForm.cardid"
+                auto-complete="off"
+                :placeholder="$t('login.cardid')">
+        <i slot="prefix" class="icon-shouji"/>
+      </el-input>
+    </el-form-item>
+    <avue-input-tree style="width:580px !important" :defaultExpandAll="loginForm.defaultFlag" v-model="loginForm.deptid" placeholder="请选择部门"
+                     type="tree"
+                     :dic="dic"></avue-input-tree>
+    <el-form-item class="z-login-submit-prv">
       <el-button size="small"
                  type="primary"
                  @click.native.prevent="handleLogin"
-                 class="login-submit">{{$t('login.submit')}}</el-button>
+                 class="z-login-submit">{{ $t('login.zc') }}
+      </el-button>
+      <el-button size="small"
+                 @click.native.prevent="gbs"
+                 class="z-login-submit">{{ $t('login.gb') }}
+      </el-button>
     </el-form-item>
   </el-form>
 </template>
 
 <script>
-import { isvalidatemobile } from "@/util/validate";
-import { mapGetters } from "vuex";
+import {isvalidatemobile} from "@/util/validate";
+import {inster} from "@/api/zc/zc";
+import {ss, rs} from "@/api/system/dept";
+import {mapGetters} from "vuex";
+
 export default {
   name: "codelogin",
   data() {
-    const validatePhone = (rule, value, callback) => {
-      if (isvalidatemobile(value)[0]) {
-        callback(new Error(isvalidatemobile(value)[1]));
+    const validatePass = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('请输入密码'));
       } else {
         callback();
       }
     };
-    const validateCode = (rule, value, callback) => {
-      if (value.length !== 4) {
-        callback(new Error("请输入4位数的验证码"));
+    const validatePass2 = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('请再次输入密码'));
+      } else if (value !== this.loginForm.password) {
+        callback(new Error('两次输入密码不一致!'));
+      } else {
+        callback();
+      }
+    };
+    const validateIdNo = (rule, value, callback) => {
+      let id18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+      let id15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$/;
+      if (!id18.test(this.loginForm.cardid) && !id15.test(this.loginForm.cardid)) {
+        callback(new Error("请输入正确的身份证号格式"));
       } else {
         callback();
       }
     };
     return {
+
       msgText: "",
       msgTime: "",
+      dic: [],
+      dicr: [],
       msgKey: false,
       loginForm: {
-        phone: "",
-        code: ""
+        defaultFlag: false,
+        cardid: "",
+        username: "",
+        sname: "",
+        password: "",
+        deptid: '',
+        roleid: '',
+        password2: ""
       },
+      value: '',
+      options: [],
       loginRules: {
-        phone: [{ required: true, trigger: "blur", validator: validatePhone }],
-        code: [{ required: true, trigger: "blur", validator: validateCode }]
-      }
+        cardid: [{required: true, trigger: "blur", validator: validateIdNo}],
+        password: [{required: true, validator: validatePass, trigger: 'blur'}],
+        password2: [{required: true, validator: validatePass2, trigger: 'blur'}],
+        username: [
+          {required: true, message: "请输入用户名", trigger: "blur"}
+        ],
+      },
+      passwordType: "password",
+      passwordTypes: "password2"
     };
   },
   created() {
     this.msgText = this.config.MSGINIT;
     this.msgTime = this.config.MSGTIME;
+    defaultFlag
   },
-  mounted() {},
+  mounted() {
+    var that = this;
+    ss().then(res => {
+      console.log(that.ergodicData(res.data.data), 898989)
+      that.dic = that.ergodicData(res.data.data)
+    });
+  },
   computed: {
     ...mapGetters(["tagWel"]),
     config() {
@@ -91,6 +157,109 @@
   },
   props: [],
   methods: {
+    ergodicData(val) {
+      var arr = []
+
+      val.forEach((item, index) => {
+
+        arr.push({label: item.title, value: item.value, id: item.id, parent_id: item.parent_id})
+
+
+        if (item.hasChildren == true) {
+
+          var arrOne = []
+
+          if (item.children && item.children.length > 0) {
+
+            item.children.forEach((childItem, childIndex) => {
+
+              arrOne.push({
+                label: childItem.title,
+                value: childItem.value,
+                id: childItem.id,
+                parent_id: childItem.parent_id
+              })
+
+
+              if (childItem.hasChildren == true) {
+
+                var arrTwo = []
+
+                if (childItem.children && childItem.children.length > 0) {
+
+                  childItem.children.forEach((findItem, findIndex) => {
+
+                    arrTwo.push({
+                      label: findItem.title,
+                      value: findItem.value,
+                      id: findItem.id,
+                      parent_id: findItem.parent_id
+                    })
+
+                  })
+
+                }
+
+                arrOne[childIndex].children = arrTwo
+
+              }
+
+            })
+
+          }
+
+          arr[index].children = arrOne
+
+        }
+
+
+      })
+
+      return arr;
+    },
+
+    clearValidate(formName) {
+      this.$refs[formName].clearValidate();
+    },
+    async allmedia() {
+      ss().then(res => {
+        console.log(res, 1323)
+        res.data.data.forEach(element => {
+          this.options.push({deptname: element.dept_name, deptid: element.deptid});
+        })
+      });
+    },
+    refreshCode(row) {
+      inster(row).then(res => {
+        this.loginForm.cardid = ""
+        this.loginForm.username = ""
+        this.loginForm.sname = ""
+        this.loginForm.password = ""
+        this.loginForm.password2 = ""
+        this.loginForm.deptid = ""
+        this.loginForm.defaultFlag = false
+        this.$notify({
+          title: '注册成功,待审核',
+          type: 'warning'
+        });
+      })
+      var z = document.querySelector('.z');
+      z.style.display = 'none';
+      this.clearValidate('loginForm')
+      this.clearValidate('loginForm')
+    },
+    gb() {
+      this.loginForm.cardid = ""
+      this.loginForm.username = ""
+      this.loginForm.sname = ""
+      this.loginForm.password = ""
+      this.loginForm.password2 = ""
+      this.loginForm.deptid = ""
+      this.loginForm.defaultFlag = false
+      var zs = document.querySelector('.z');
+      zs.style.display = 'none';
+      this.clearValidate('loginForm')
+    },
     handleSend() {
       if (this.msgKey) return;
       this.msgText = this.msgTime + this.config.MSGSCUCCESS;
@@ -106,16 +275,30 @@
         }
       }, 1000);
     },
+    showPassword() {
+      this.passwordType === ""
+        ? (this.passwordType = "password")
+        : (this.passwordType = "");
+    },
+    showPasswords() {
+      this.passwordType === ""
+        ? (this.passwordType = "password2")
+        : (this.passwordType = "");
+    },
     handleLogin() {
       this.$refs.loginForm.validate(valid => {
         if (valid) {
-          this.$store.dispatch("LoginByPhone", this.loginForm).then(() => {
-            this.$router.push({ path: this.tagWel.value });
-          });
+          this.refreshCode(this.loginForm);
+          this.message('dahsiofhiusa');
+          return Promise.reject(new Error("注册成功,待审核"));
         }
       });
+    },
+    gbs() {
+      this.gb();
     }
   }
+
 };
 </script>
 
@@ -127,7 +310,34 @@
   text-align: center;
   cursor: pointer;
 }
+
 .msg-text.display {
   color: #ccc;
 }
+
+.z-login-submit-prv {
+  margin-top: 25px;
+  padding: 0 10%;
+  box-sizing: border-box;
+}
+
+.z-login-submit-prv > div {
+  width: 80%;
+  display: flex;
+}
+
+.z-login-submit {
+  flex: 1;
+  height: 45px;
+  border: 1px solid #409EFF;
+  background: none;
+  font-size: 18px;
+  letter-spacing: 2px;
+  font-weight: 300;
+  color: #409EFF;
+  cursor: pointer;
+  font-family: "neo";
+  -webkit-transition: 0.25s;
+  transition: 0.25s;
+}
 </style>
diff --git a/src/page/login/index.vue b/src/page/login/index.vue
index a1aa03f..9c90ce4 100644
--- a/src/page/login/index.vue
+++ b/src/page/login/index.vue
@@ -15,19 +15,23 @@
         <div class="login-main">
           <h4 class="login-title">
             {{ $t('login.title') }}
-<!--            <top-lang></top-lang>-->
+            <!--            <top-lang></top-lang>-->
           </h4>
-          <userLogin v-if="activeName==='user'"></userLogin>
-          <codeLogin v-else-if="activeName==='code'"></codeLogin>
-          <thirdLogin v-else-if="activeName==='third'"></thirdLogin>
+          <h4 class="login-title-child">IoT security cloud service platform</h4>
+          <userLogin></userLogin>
+          <!-- <codeLogin v-else-if="activeName==='code'"></codeLogin>-->
+          <!--    <thirdLogin v-else-if="activeName==='third'"></thirdLogin>-->
           <div class="login-menu">
-            <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>
-            <!--<a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>-->
-<!--            <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>-->
+            <!--    <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>-->
+            <a href="#" @click.stop="zShow">{{ $t('login.phoneLogin') }}</a>
+            <!--   <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>-->
           </div>
         </div>
 
       </div>
+    </div>
+    <div class="z" v-show="activeName == 'code'">
+      <codeLogin></codeLogin>
     </div>
   </div>
 </template>
@@ -109,11 +113,40 @@
             loading.close();
           });
         }
+      },
+      zShow() {
+        document.querySelector('.z').style.display = 'block';
       }
     }
   };
 </script>
 
 <style lang="scss">
+.z {
+  position: fixed;
+  margin: auto;
+  padding: 10px;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 80px;
+  width: 600px;
+  height: 500px;
+  background-color: #fff;
+  box-sizing: border-box;
+  box-shadow: 6px 6px 5px #909090;
+}
+
+.company-jx {
+  position: fixed;
+  margin: auto;
+  top: auto;
+  left: 0px;
+  right: 0px;
+  bottom: 120px;
+  text-align: center;
+  color: #fff;
+  font-size: 15px;
+}
   @import "@/styles/login.scss";
 </style>
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index fb6545d..e0be230 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -299,6 +299,31 @@
         dialogClickModal: false,
         column: [
           {
+            label: "考试人数",
+            prop: "number",
+            type: 'number',
+            span: 6,
+            precision:0,
+            step:50,
+            mock:{
+              type:'number',
+              max:1000,
+              min:0,
+              precision:0
+            },
+            rules: [
+              {
+                required: true,
+                message: "请输入考试人数",
+                trigger: "blur",
+              },
+            ],
+            minRows: 0,
+            maxRows: 1000,
+            value:50,
+            row:true,
+          },
+          {
             label: "考试时间",
             prop: "startTime",
             type: "datetime",
@@ -334,7 +359,7 @@
         delBtn: false,
         editBtn: false,
         addBtn: false,
-        selection: true,
+        selection: false,
         menu: true,
         // 导出按钮
         // excelBtn: true,
@@ -872,7 +897,7 @@
       // var endTime = row.examTime[1];
       // var examTime = JSON.stringify(row.examTime);
       // console.log(this.ids,111);
-      addExam(this.ids, null, startTime, null).then(
+      addExam(this.ids, null, startTime,row.number, null).then(
         () => {
           this.questionBankOnLoad(this.questionBankPage);
           this.$message({
diff --git a/src/views/applyexam/papers.vue b/src/views/applyexam/papers.vue
index 7c54248..b87c038 100644
--- a/src/views/applyexam/papers.vue
+++ b/src/views/applyexam/papers.vue
@@ -8,13 +8,18 @@
 export default {
   data() {
     return {
-      url: "/papers.html",
+      url: "/papers.html"
     };
   },
   created(){
-      var d = this.$route.query;
-      this.url += "?data=" + JSON.stringify(d);
-    //   console.log(d);
+      var data = this.$route.query;
+
+      if(data.examType==1){
+          this.url += "?data=" + JSON.stringify(data);
+      }
+      if(data.examType==2){
+          this.url = "/papersTrain.html?data=" + JSON.stringify(data);
+      }
   },
   mounted() {
     var flag = false,
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index d1609ba..0a53084 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -49,6 +49,15 @@
               >批量导入
             </el-button>
             <el-button
+              type="success"
+              size="small"
+              plain
+              icon="el-icon-upload2"
+              v-if="permission.securityGuard_import"
+              @click="handleImport2"
+              >个人照片批量上传
+            </el-button>
+            <el-button
               type="danger"
               style="display: none"
               size="small"
@@ -250,6 +259,19 @@
             </template>
           </avue-form>
         </el-dialog>
+        <el-dialog
+          title="个人照片批量上传"
+          append-to-body
+          :visible.sync="excelBox2"
+          width="555px"
+        >
+          <avue-form
+            :option="excelOption2"
+            v-model="excelForm2"
+            :upload-after="uploadAfter2"
+          >
+          </avue-form>
+        </el-dialog>
       </basic-container>
     </el-col>
   </el-row>
@@ -300,6 +322,7 @@
     return {
       securityid: "",
       excelBox1: false,
+      excelBox2: false,
       isSecurity: true,
       excelForm1: {},
       excelOption1: {
@@ -325,6 +348,26 @@
             formslot: true,
             span: 24,
           },
+        ],
+      },
+      excelForm2: {},
+      excelOption2: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "文件上传",
+            prop: "file",
+            type: "upload",
+            drag: true,
+            loadText: "文件上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data",
+            },
+            tip: "请上传 zip 压缩文件",
+            action: "/api/blade-resource/oss/endpoint/put-file-zip",
+          }
         ],
       },
 
@@ -867,6 +910,15 @@
     handleTemplate1() {
       window.open(`/api/blade-user/export-template-security`);
     },
+    handleImport2() {
+      this.excelBox2 = true;
+    },
+    uploadAfter2(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox2 = false;
+      // this.refreshChange();
+      done();
+    },
 
     //行点击事件
     rowClick(row) {
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 231f28f..44b500b 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -494,11 +494,6 @@
         this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id
 
       }
-
-
-       
-
-
     },
     mounted() {
         var flag = false,
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index 86882d7..ae0f2a9 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -116,7 +116,7 @@
             display: false,
           },
           {
-            label: "法定代表人",
+            label: "校长",
             prop: "representative",
             display: false,
             search: true,
@@ -125,37 +125,18 @@
             width: 120,
           },
           {
-            label: "注册时间",
-            prop: "establishtime",
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-            mock: {
-              type: "datetime",
-              format: "yyyy-MM-dd",
-            },
-            display: false,
-            width: 180,
+            label: "负责人",
+            prop: "contacts",
+            display: false
           },
           {
-            label: "注册资金",
-            prop: "registeredcapital",
+            label: "联系方式",
+            prop: "contactscell",
             display: false,
             width: 130,
           },
           {
-            label: "实缴资金",
-            prop: "capital",
-            display: false,
-            width: 130,
-          },
-          {
-            label: "公司类型",
-            prop: "enterprises",
-            display: false,
-          },
-          {
-            label: "注册地址",
+            label: "联系地址",
             prop: "address",
             display: false,
             width: 280,
@@ -271,7 +252,7 @@
   },
   created() {
       this.optionTrainApply.column[1].dicUrl =
-        "/api/blade-user/security-apply-tree?deptId=" +
+        "/api/blade-user/security-apply-tree?examType=2&deptId=" +
         this.userInfo.dept_id;
   },
   methods: {
@@ -318,34 +299,40 @@
     },
     //未持证保安人员报名
     handleTrainApply(row,done,loading){
-      row['userId'] = this.userInfo.user_id;
-      row['trainingUnitId'] = row.departmentid;
-      adddata(row).then(
-        (res) => {
-          // this.onLoad(this.page);
-          if(res.data.data==201){
-              this.$message({
-                type: "warning",
-                message:"已报名,不能重复报名",
-              });
-          }else if(res.data.data==201){
-              this.$message({
-                type: "warning",
-                message:"报名失败",
-              });
-          }else{
-              this.$message({
-                type: "success",
-                message:"报名成功",
-              });
+      this.$confirm("是否确定报名?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        row['userId'] = this.userInfo.user_id;
+        row['trainingUnitId'] = row.departmentid;
+        adddata(row).then(
+          (res) => {
+            // this.onLoad(this.page);
+            if(res.data.data==201){
+                this.$message({
+                  type: "warning",
+                  message:"已报名,不能重复报名",
+                });
+            }else if(res.data.data==201){
+                this.$message({
+                  type: "warning",
+                  message:"报名失败",
+                });
+            }else{
+                this.$message({
+                  type: "success",
+                  message:"报名成功",
+                });
+            }
+            done();
+          },
+          (error) => {
+            window.console.log(error);
+            loading();
           }
-          done();
-        },
-        (error) => {
-          window.console.log(error);
-          loading();
-        }
-      );
+        );
+      })
     },
     //关闭窗口清除数据
     closeDialog(){
diff --git a/src/views/trainingRegistration/data.js b/src/views/trainingRegistration/data.js
index f08ae3d..3178237 100644
--- a/src/views/trainingRegistration/data.js
+++ b/src/views/trainingRegistration/data.js
@@ -135,20 +135,36 @@
         label: "考试证件",
         prop: "applyCard"
     },
-    // {
-    //     label: "报名状态",
-    //     prop: "cancel",
-    //     // search: true,
-    //     dicData: DIC1,
-    //     props: {
-    //         label: "label",
-    //         value: "value"
-    //     },
-    //     editDisplay: false,
-    //     addDisplay: false,
-    //     searchSpan: 4,
-    //     width: 100,
-    // },
+    {
+        label: "审核状态",
+        prop: "auditStatus",
+        // search: true,
+        dicData: [{
+                label: '审核通过',
+                value: 1,
+            },
+            {
+                label: '审核不通过',
+                value: 2,
+            },
+            {
+                label: '审核中',
+                value: 3,
+            },
+            {
+                label: '待审核',
+                value: 4,
+            }
+        ],
+        props: {
+            label: "label",
+            value: "value"
+        },
+        editDisplay: false,
+        addDisplay: false,
+        searchSpan: 4,
+        width: 100,
+    },
     //  {
     //     label: "确认截止时间",
     //     prop: "remainingTime",
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index 8005c94..9775b39 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -145,27 +145,36 @@
         index: true,
         stripe: true,
         viewBtn: true,
-        selection: true,
+        selection: false,
         excelBtn: false,
         menuWidth: 380,
         dialogClickModal: false,
         column: [
-          // {
-          //   label: "考试人数",
-          //   prop: "number",
-          //   type: 'number',
-          //   span: 6,
-          //   precision:2,
-          //   mock:{
-          //     type:'number',
-          //     max:500,
-          //     min:50,
-          //     precision:50
-          //   },
-          //   minRows: 0,
-          //   maxRows: 3,
-          //   row:true,
-          // },
+          {
+            label: "考试人数",
+            prop: "number",
+            type: 'number',
+            span: 6,
+            precision:0,
+            step:50,
+            mock:{
+              type:'number',
+              max:1000,
+              min:0,
+              precision:0
+            },
+            rules: [
+              {
+                required: true,
+                message: "请输入考试人数",
+                trigger: "blur",
+              },
+            ],
+            minRows: 0,
+            maxRows: 1000,
+            value:50,
+            row:true,
+          },
           {
             label: "考试时间",
             prop: "startTime",
@@ -239,7 +248,7 @@
         labelWidth: "120",
         menuWidth: 200,
         align: "center",
-        selection: true,
+        selection: false,
         column: column,
         delBtn: false,
         editBtn: false,
@@ -436,6 +445,7 @@
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
+      // params['cancel'] = 111;
       this.loading = true;
       getdata(
         page.currentPage,
@@ -478,7 +488,7 @@
       // var endTime = row.examTime[1];
       // var examTime = JSON.stringify(row.examTime);
       // console.log(this.ids,111);
-      addExam(this.ids, null, startTime, null).then(
+      addExam(this.ids, null, startTime,row.number, null).then(
         () => {
           this.onLoad(this.page);
           this.$message({
diff --git a/src/views/zc/zc.vue b/src/views/zc/zc.vue
new file mode 100644
index 0000000..92df91e
--- /dev/null
+++ b/src/views/zc/zc.vue
@@ -0,0 +1,275 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.zc_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    <template slot-scope="{row}" slot="type">
+        <el-tag>{{row.type==='0'?'未审核':row.type==='1'?'审核通过':'审核未通过'}}</el-tag>
+      </template>
+
+      <template slot-scope="{row}"
+                slot="roleName">
+        <el-tag>{{row.roleName}}</el-tag>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button icon="el-icon-check" size="small"  @click.stop="handleEdit(scope.row,scope.index)">审核</el-button>
+      </template>
+    </avue-crud>
+
+
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/zc/zc";
+  import {getRoleTree} from "@/api/system/role";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 54,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 4,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          headerAlign: 'center',
+          align: 'center',
+          dialogClickModal: false,
+          column: [
+            {
+              label: "账号",
+              searchSpan:4,
+              display: false,
+              disabled:true,
+              prop: "username",
+            },
+            {
+              label: "密码",
+              hide: true,
+              editDisplay: false,
+              viewDisplay: false,
+              prop: "password",
+            },
+            {
+              label: "姓名",
+              display: false,
+              searchSpan:4,
+              disabled:true,
+              prop: "sname",
+            },
+            {
+              label: "身份证号",
+              disabled:true,
+              display: false,
+              prop: "cardid",
+            },
+            {
+              label: "部门",
+              editDisplay: false,
+              prop: "deptid",
+            },
+            {
+              label: "审核状态",
+              prop: "type",
+              search: true,
+              slot: true,
+              searchSpan:4,
+              type: "select",
+              dicData: [
+                {
+                  label: "未审核",
+                  value: "0"
+                },
+                {
+                  label: "审核通过",
+                  value: "1"
+                },
+                {
+                  label: "审核不通过",
+                  value: "2"
+                }
+
+              ],
+            }
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+         addBtn: this.vaildData(this.permission.zc_add, false),
+          viewBtn: this.vaildData(this.permission.zc_view, true),
+          delBtn: this.vaildData(this.permission.zc_delete, false),
+          editBtn: this.vaildData(this.permission.zc_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      handleEdit (row, index) {
+        this.$refs.crud.rowEdit(row, index);
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+
+</style>

--
Gitblit v1.9.3