Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_enterprises
43 files modified
10 files added
| New file |
| | |
| | | <!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> |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | |
| | | export const getExamPaymentList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/examPayment/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/examPayment/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/examPayment/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/examPayment/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const getExamPayment = (id) => { |
| | | return request({ |
| | | url: '/api/examPayment/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const addExam = (ids, examTime, startTime, endTime) => { |
| | | export const addExam = (params) => { |
| | | return request({ |
| | | url: '/api/apply/batchExam', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | examTime, |
| | | startTime, |
| | | endTime |
| | | } |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/examScore/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/examScore/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/examScore/updateExamScore', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/examScore/updateExamScore', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const updateAbsent = (row) => { |
| | | return request({ |
| | | url: '/api/examScore/updateAbsent', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | parentId |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | 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', |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | export const getListByDeptId = (deptId) => { |
| | | export const getListByDeptId = (deptId, status) => { |
| | | return request({ |
| | | url: '/api/blade-user/page-security-units', |
| | | method: 'get', |
| | | params: { |
| | | deptId, |
| | | status |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const cancelTrainAudit = (row) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/cancelTrainAudit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const auditSucess = (row) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/auditSucess', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/update', |
| | |
| | | } |
| | | |
| | | |
| | | export const addExam = (ids, examTime, startTime, endTime) => { |
| | | export const addExam = (params) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/batchExam', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | examTime, |
| | | startTime, |
| | | endTime |
| | | } |
| | | data: params |
| | | }) |
| | | } |
| New file |
| | |
| | | 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 |
| | | }) |
| | | } |
| | |
| | | value: '/securityUnit/localCompany', |
| | | imgs: 'url(/img/gldw.jpg)' |
| | | }, { |
| | | label: '统计分析', |
| | | label: '智能分析', |
| | | value: '/securityAnalysis/index', |
| | | imgs: 'url(/img/glgz.jpg)' |
| | | },] |
| | |
| | | value: '/expression/index', |
| | | imgs: 'url(/img/tongji.jpg)' |
| | | },] |
| | | }, |
| | | { |
| | | userName: '未持证保安', |
| | | list: [ |
| | | { |
| | | label: '保安员信息', |
| | | value: '/securityMan/index', |
| | | imgs: 'url(/img/yijianbaoj.jpg)' |
| | | }, { |
| | | label: '派遣记录', |
| | | value: '/dispatchChildoperableSee/index', |
| | | imgs: 'url(/img/fangyi.jpg)' |
| | | }, { |
| | | label: '从业记录', |
| | | value: '/job/index', |
| | | imgs: 'url(/img/anjian.jpg)' |
| | | }, { |
| | | label: '工作汇报', |
| | | value: '/workreport/workreport', |
| | | imgs: 'url(/img/tiwen.jpg)' |
| | | }, { |
| | | label: '表现记录', |
| | | value: '/expression/index', |
| | | imgs: 'url(/img/tongji.jpg)' |
| | | },] |
| | | }, |
| | | { |
| | | userName: '保安公司管理员', |
| | | list: [ |
| | | { |
| | | label: '智能分析', |
| | | value: '/securityAnalysis/index', |
| | | imgs: 'url(/img/glgz.jpg)' |
| | | }, { |
| | | label: '保安员管理', |
| | | value: '/securityGuard/index', |
| | | imgs: 'url(/img/glba.jpg)' |
| | | }, { |
| | | label: '单位信息', |
| | | value: '/securityUnitChild/index', |
| | | imgs: 'url(/img/gldw.jpg)' |
| | | }, { |
| | | label: '派遣记录', |
| | | value: '/dispatch/dispatchChildoperable', |
| | | imgs: 'url(/img/glgj.jpg)' |
| | | }, { |
| | | label: '通知公告', |
| | | value: '/desk/index', |
| | | imgs: 'url(/img/gltz.jpg)' |
| | | },] |
| | | }, { |
| | | userName: '公安管理员', |
| | | list: [ |
| | | { |
| | | label: '智能分析', |
| | | value: '/securityAnalysis/index', |
| | | imgs: 'url(/img/glgz.jpg)' |
| | | }, { |
| | | label: '保安员管理', |
| | | value: '/securityGuard/index', |
| | | imgs: 'url(/img/glba.jpg)' |
| | | }, { |
| | | label: '公司管理', |
| | | value: '/securityUnit/index', |
| | | imgs: 'url(/img/gldw.jpg)' |
| | | }, { |
| | | label: '通知公告', |
| | | value: '/desk/index', |
| | | imgs: 'url(/img/gltz.jpg)' |
| | | }, { |
| | | label: '工作汇报', |
| | | value: '/workreport/workreply', |
| | | imgs: 'url(/img/glgj.jpg)' |
| | | }] |
| | | } |
| | | ], |
| | | |
| | |
| | | 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: '工作时间' |
| | | } |
| | | } |
| | | }, |
| | | 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: '关闭所有' |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="avue-tags" |
| | | v-if="showTag"> |
| | | <div class="avue-tags" v-if="showTag"> |
| | | <!-- tag盒子 --> |
| | | <div v-if="contextmenuFlag" |
| | | class="avue-tags__contentmenu" |
| | | :style="{left:contentmenuX+'px',top:contentmenuY+'px'}"> |
| | | <div class="item" |
| | | @click="clearCacheTags">{{$t('tagsView.clearCache')}} |
| | | <div |
| | | v-if="contextmenuFlag" |
| | | class="avue-tags__contentmenu" |
| | | :style="{ left: contentmenuX + 'px', top: contentmenuY + 'px' }" |
| | | > |
| | | <div class="item" @click="clearCacheTags"> |
| | | {{ $t("tagsView.clearCache") }} |
| | | </div> |
| | | <div class="item" |
| | | @click="closeOthersTags">{{$t('tagsView.closeOthers')}} |
| | | <div class="item" @click="closeOthersTags"> |
| | | {{ $t("tagsView.closeOthers") }} |
| | | </div> |
| | | <div class="item" |
| | | @click="closeAllTags">{{$t('tagsView.closeAll')}} |
| | | <div class="item" @click="closeAllTags"> |
| | | {{ $t("tagsView.closeAll") }} |
| | | </div> |
| | | </div> |
| | | <div class="avue-tags__box" |
| | | :class="{'avue-tags__box--close':!website.isFirstPage}"> |
| | | <el-tabs v-model="active" |
| | | type="card" |
| | | @contextmenu.native="handleContextmenu" |
| | | :closable="tagLen!==1" |
| | | @tab-click="openTag" |
| | | @edit="menuTag"> |
| | | <el-tab-pane :key="item.value" |
| | | v-for="item in tagList" |
| | | :label="generateTitle(item)" |
| | | :name="item.value"> |
| | | <div |
| | | class="avue-tags__box" |
| | | :class="{ 'avue-tags__box--close': !website.isFirstPage }" |
| | | > |
| | | <el-tabs |
| | | v-model="active" |
| | | type="card" |
| | | @contextmenu.native="handleContextmenu" |
| | | :closable="tagLen !== 1" |
| | | @tab-click="openTag" |
| | | @edit="menuTag" |
| | | > |
| | | <el-tab-pane |
| | | :key="item.value" |
| | | v-for="item in tagList" |
| | | :label="generateTitle(item)" |
| | | :name="item.value" |
| | | > |
| | | </el-tab-pane> |
| | | |
| | | </el-tabs> |
| | | <el-dropdown class="avue-tags__menu"> |
| | | <el-button type="primary" |
| | | size="mini"> |
| | | {{$t('tagsView.menu')}} |
| | | <el-button type="primary" size="mini"> |
| | | {{ $t("tagsView.menu") }} |
| | | <i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item @click.native="$parent.isSearch=true">{{$t('tagsView.search')}}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="closeOthersTags">{{$t('tagsView.closeOthers')}}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="closeAllTags">{{$t('tagsView.closeAll')}}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="clearCacheTags">{{$t('tagsView.clearCache')}}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="$parent.isSearch = true">{{ |
| | | $t("tagsView.search") |
| | | }}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="closeOthersTags">{{ |
| | | $t("tagsView.closeOthers") |
| | | }}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="closeAllTags">{{ |
| | | $t("tagsView.closeAll") |
| | | }}</el-dropdown-item> |
| | | <el-dropdown-item @click.native="clearCacheTags">{{ |
| | | $t("tagsView.clearCache") |
| | | }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {mapGetters, mapState} from "vuex"; |
| | | import {clearCache} from "@/api/user"; |
| | | import { mapGetters, mapState } from "vuex"; |
| | | import { clearCache } from "@/api/user"; |
| | | import { getTopMenu, getRoutes } from "@/api/system/menu"; |
| | | |
| | | export default { |
| | | name: "tags", |
| | | data() { |
| | | return { |
| | | active: "", |
| | | contentmenuX: "", |
| | | contentmenuY: "", |
| | | contextmenuFlag: false |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | export default { |
| | | name: "tags", |
| | | data() { |
| | | return { |
| | | active: "", |
| | | contentmenuX: "", |
| | | contentmenuY: "", |
| | | contextmenuFlag: false, |
| | | }; |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.setActive(); |
| | | this.tagList.forEach((item, index) => { |
| | | if (item.label == "首页" && this.userInfo.role_name == "培训公司管理员") { |
| | | this.tagList.splice(index, 1); |
| | | this.$store.commit("set_hideHome", true); |
| | | // getRoutes().then((res) => { |
| | | // const data = res.data.data; |
| | | // var child = {}, |
| | | // findchild = (data) => { |
| | | // if (data.children != undefined) { |
| | | // findchild(data.children[0]); |
| | | // } else { |
| | | // child = data; |
| | | // } |
| | | // }; |
| | | // findchild(data[0]); |
| | | // this.$router.push({ path: child.path }); |
| | | // }); |
| | | var d = this.$router.options.routes, |
| | | path = ""; |
| | | for (var k in d) { |
| | | if (d[k].peixun == true) { |
| | | // console.log(d[k]); |
| | | path = d[k].path; |
| | | } |
| | | } |
| | | this.$router.push({ path: path }); |
| | | } else { |
| | | this.$store.commit("set_hideHome", false); |
| | | } |
| | | }); |
| | | }, |
| | | watch: { |
| | | tag() { |
| | | this.setActive(); |
| | | }, |
| | | watch: { |
| | | tag() { |
| | | this.setActive(); |
| | | }, |
| | | contextmenuFlag() { |
| | | window.addEventListener("mousedown", this.watchContextmenu); |
| | | contextmenuFlag() { |
| | | window.addEventListener("mousedown", this.watchContextmenu); |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagWel", "tagList", "tag", "website", "userInfo", "menu"]), |
| | | ...mapState({ |
| | | showTag: (state) => state.common.showTag, |
| | | }), |
| | | tagLen() { |
| | | return this.tagList.length || 0; |
| | | }, |
| | | }, |
| | | methods: { |
| | | generateTitle(item) { |
| | | return this.$router.$avueRouter.generateTitle( |
| | | item.label, |
| | | (item.meta || {}).i18n |
| | | ); |
| | | }, |
| | | watchContextmenu(event) { |
| | | if (!this.$el.contains(event.target) || event.button !== 0) { |
| | | this.contextmenuFlag = false; |
| | | } |
| | | window.removeEventListener("mousedown", this.watchContextmenu); |
| | | }, |
| | | handleContextmenu(event) { |
| | | let target = event.target; |
| | | // 解决 https://github.com/d2-projects/d2-admin/issues/54 |
| | | let flag = false; |
| | | if (target.className.indexOf("el-tabs__item") > -1) flag = true; |
| | | else if (target.parentNode.className.indexOf("el-tabs__item") > -1) { |
| | | target = target.parentNode; |
| | | flag = true; |
| | | } |
| | | if (flag) { |
| | | event.preventDefault(); |
| | | event.stopPropagation(); |
| | | this.contentmenuX = event.clientX; |
| | | this.contentmenuY = event.clientY; |
| | | this.tagName = target.getAttribute("aria-controls").slice(5); |
| | | this.contextmenuFlag = true; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagWel", "tagList", "tag", "website"]), |
| | | ...mapState({ |
| | | showTag: state => state.common.showTag |
| | | }), |
| | | tagLen() { |
| | | return this.tagList.length || 0; |
| | | //激活当前选项 |
| | | setActive() { |
| | | this.active = this.tag.value; |
| | | }, |
| | | menuTag(value, action) { |
| | | if (action === "remove") { |
| | | let { tag, key } = this.findTag(value); |
| | | this.$store.commit("DEL_TAG", tag); |
| | | if (tag.value === this.tag.value) { |
| | | tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个 |
| | | this.openTag(tag); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | generateTitle(item) { |
| | | return this.$router.$avueRouter.generateTitle( |
| | | item.label, |
| | | (item.meta || {}).i18n |
| | | ); |
| | | }, |
| | | watchContextmenu(event) { |
| | | if (!this.$el.contains(event.target) || event.button !== 0) { |
| | | this.contextmenuFlag = false; |
| | | } |
| | | window.removeEventListener("mousedown", this.watchContextmenu); |
| | | }, |
| | | handleContextmenu(event) { |
| | | let target = event.target; |
| | | // 解决 https://github.com/d2-projects/d2-admin/issues/54 |
| | | let flag = false; |
| | | if (target.className.indexOf("el-tabs__item") > -1) flag = true; |
| | | else if (target.parentNode.className.indexOf("el-tabs__item") > -1) { |
| | | target = target.parentNode; |
| | | flag = true; |
| | | } |
| | | if (flag) { |
| | | event.preventDefault(); |
| | | event.stopPropagation(); |
| | | this.contentmenuX = event.clientX; |
| | | this.contentmenuY = event.clientY; |
| | | this.tagName = target.getAttribute("aria-controls").slice(5); |
| | | this.contextmenuFlag = true; |
| | | } |
| | | }, |
| | | //激活当前选项 |
| | | setActive() { |
| | | this.active = this.tag.value; |
| | | }, |
| | | menuTag(value, action) { |
| | | if (action === "remove") { |
| | | let {tag, key} = this.findTag(value); |
| | | this.$store.commit("DEL_TAG", tag); |
| | | if (tag.value === this.tag.value) { |
| | | tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个 |
| | | this.openTag(tag); |
| | | } |
| | | } |
| | | }, |
| | | openTag(item) { |
| | | let tag; |
| | | if (item.name) { |
| | | tag = this.findTag(item.name).tag; |
| | | } else { |
| | | tag = item; |
| | | } |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath({ |
| | | openTag(item) { |
| | | let tag; |
| | | if (item.name) { |
| | | tag = this.findTag(item.name).tag; |
| | | } else { |
| | | tag = item; |
| | | } |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath( |
| | | { |
| | | name: tag.label, |
| | | src: tag.value |
| | | }, tag.meta), |
| | | query: tag.query |
| | | src: tag.value, |
| | | }, |
| | | tag.meta |
| | | ), |
| | | query: tag.query, |
| | | }); |
| | | }, |
| | | closeOthersTags() { |
| | | this.contextmenuFlag = false; |
| | | this.$store.commit("DEL_TAG_OTHER"); |
| | | }, |
| | | findTag(value) { |
| | | let tag, key; |
| | | this.tagList.map((item, index) => { |
| | | if (item.value === value) { |
| | | tag = item; |
| | | key = index; |
| | | } |
| | | }); |
| | | return { tag: tag, key: key }; |
| | | }, |
| | | closeAllTags() { |
| | | this.contextmenuFlag = false; |
| | | this.$store.commit("DEL_ALL_TAG"); |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath({ |
| | | src: this.tagWel.value, |
| | | }), |
| | | query: this.tagWel.query, |
| | | }); |
| | | }, |
| | | clearCacheTags() { |
| | | this.$confirm("是否需要清除缓存?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | clearCache().then(() => { |
| | | this.contextmenuFlag = false; |
| | | this.$message.success("清除完毕"); |
| | | }); |
| | | }, |
| | | closeOthersTags() { |
| | | this.contextmenuFlag = false; |
| | | this.$store.commit("DEL_TAG_OTHER"); |
| | | }, |
| | | findTag(value) { |
| | | let tag, key; |
| | | this.tagList.map((item, index) => { |
| | | if (item.value === value) { |
| | | tag = item; |
| | | key = index; |
| | | } |
| | | }); |
| | | return {tag: tag, key: key}; |
| | | }, |
| | | closeAllTags() { |
| | | this.contextmenuFlag = false; |
| | | this.$store.commit("DEL_ALL_TAG"); |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath({ |
| | | src: this.tagWel.value |
| | | }), |
| | | query: this.tagWel.query |
| | | }); |
| | | }, |
| | | clearCacheTags() { |
| | | this.$confirm("是否需要清除缓存?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | clearCache().then(() => { |
| | | this.contextmenuFlag = false; |
| | | this.$message.success('清除完毕'); |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
| | |
| | | <template> |
| | | <div class="top-menu"> |
| | | <el-menu :default-active="activeIndex" |
| | | mode="horizontal" |
| | | text-color="#333"> |
| | | <el-menu-item index="0" @click.native="openHome(itemHome)" key="0"> |
| | | <el-menu :default-active="activeIndex" mode="horizontal" text-color="#333"> |
| | | <el-menu-item |
| | | index="0" |
| | | @click.native="openHome(itemHome)" |
| | | key="0" |
| | | v-if="!hideHome" |
| | | > |
| | | <template slot="title"> |
| | | <i :class="itemHome.source"></i> |
| | | <span>{{generateTitle(itemHome)}}</span> |
| | | <span>{{ generateTitle(itemHome) }}</span> |
| | | </template> |
| | | </el-menu-item> |
| | | <template v-for="(item,index) in items"> |
| | | <el-menu-item :index="item.id+''" @click.native="openMenu(item)" :key="index"> |
| | | <template v-for="(item, index) in items"> |
| | | <el-menu-item |
| | | :index="item.id + ''" |
| | | @click.native="openMenu(item)" |
| | | :key="index" |
| | | > |
| | | <template slot="title"> |
| | | <i :class="item.source" style="padding-right: 5px;"></i> |
| | | <span>{{generateTitle(item)}}</span> |
| | | <i :class="item.source" style="padding-right: 5px"></i> |
| | | <span>{{ generateTitle(item) }}</span> |
| | | </template> |
| | | </el-menu-item> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | name: "top-menu", |
| | | data() { |
| | | return { |
| | | itemHome: { |
| | | name: '首页', |
| | | source: 'el-icon-menu', |
| | | }, |
| | | activeIndex: "0", |
| | | items: [], |
| | | }; |
| | | export default { |
| | | name: "top-menu", |
| | | data() { |
| | | return { |
| | | itemHome: { |
| | | name: "首页", |
| | | source: "el-icon-menu", |
| | | }, |
| | | activeIndex: "0", |
| | | items: [], |
| | | }; |
| | | }, |
| | | inject: ["index"], |
| | | created() { |
| | | this.getMenu(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagCurrent", "menu", "hideHome"]), |
| | | }, |
| | | methods: { |
| | | openHome(itemHome) { |
| | | this.index.openMenu(itemHome); |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath( |
| | | { name: itemHome.name, src: "" }, |
| | | {} |
| | | ), |
| | | }); |
| | | }, |
| | | inject: ["index"], |
| | | created() { |
| | | this.getMenu(); |
| | | openMenu(item) { |
| | | this.index.openMenu(item); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagCurrent", "menu"]) |
| | | getMenu() { |
| | | this.$store.dispatch("GetTopMenu").then((res) => { |
| | | this.items = res; |
| | | }); |
| | | }, |
| | | methods: { |
| | | openHome(itemHome) { |
| | | this.index.openMenu(itemHome); |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath({name: itemHome.name, src: ''}, {}) |
| | | }); |
| | | }, |
| | | openMenu(item) { |
| | | this.index.openMenu(item) |
| | | }, |
| | | getMenu() { |
| | | this.$store.dispatch("GetTopMenu").then(res => { |
| | | this.items = res; |
| | | }); |
| | | }, |
| | | generateTitle(item) { |
| | | return this.$router.$avueRouter.generateTitle( |
| | | item.name, |
| | | (item.meta || {}).i18n |
| | | ); |
| | | }, |
| | | } |
| | | }; |
| | | generateTitle(item) { |
| | | return this.$router.$avueRouter.generateTitle( |
| | | item.name, |
| | | (item.meta || {}).i18n |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <el-form class="login-form" |
| | | status-icon |
| | | :rules="loginRules" |
| | | ref="loginForm" |
| | | :model="loginForm" |
| | | label-width="0"> |
| | | <el-form-item prop="phone"> |
| | | <el-input size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.phone" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.phone')"> |
| | | <i slot="prefix" |
| | | class="icon-shouji"/> |
| | | <el-form |
| | | class="login-form" |
| | | status-icon |
| | | :rules="loginRules" |
| | | ref="loginForm" |
| | | :model="loginForm" |
| | | label-width="0" |
| | | > |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.username" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.username')" |
| | | > |
| | | <i slot="prefix" class="icon-yonghu" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="code"> |
| | | <el-input size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.code" |
| | | 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> |
| | | <el-form-item prop="password"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.password" |
| | | auto-complete="off" |
| | | show-password |
| | | :placeholder="$t('login.password')" |
| | | > |
| | | <i slot="prefix" class="icon-mima" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" |
| | | type="primary" |
| | | @click.native.prevent="handleLogin" |
| | | class="login-submit">{{$t('login.submit')}}</el-button> |
| | | <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="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 { 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: "" |
| | | 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() { |
| | | return { |
| | | MSGINIT: this.$t("login.msgText"), |
| | | MSGSCUCCESS: this.$t("login.msgSuccess"), |
| | | MSGTIME: 60 |
| | | MSGTIME: 60, |
| | | }; |
| | | } |
| | | }, |
| | | }, |
| | | 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; |
| | |
| | | } |
| | | }, 1000); |
| | | }, |
| | | showPassword() { |
| | | this.passwordType === "" |
| | | ? (this.passwordType = "password") |
| | | : (this.passwordType = ""); |
| | | }, |
| | | showPasswords() { |
| | | this.passwordType === "" |
| | | ? (this.passwordType = "password2") |
| | | : (this.passwordType = ""); |
| | | }, |
| | | handleLogin() { |
| | | this.$refs.loginForm.validate(valid => { |
| | | 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> |
| | | |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | 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> |
| | |
| | | // import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun') |
| | | // }] |
| | | // }, |
| | | // { |
| | | // path: '/trainingRegistration', |
| | | // component: Layout, |
| | | // redirect: '/trainingRegistration/index', |
| | | // children: [{ |
| | | // path: 'index', |
| | | // name: '保安培训报名', |
| | | // meta: { |
| | | // i18n: 'dict' |
| | | // }, |
| | | // component: () => |
| | | // import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index') |
| | | // }] |
| | | // }, |
| | | { |
| | | path: '/trainingRegistration', |
| | | component: Layout, |
| | | peixun: true, |
| | | redirect: '/trainingRegistration/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '培训报名列表', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index') |
| | | }] |
| | | }, |
| | | // { |
| | | // path: '/trainExam', |
| | | // component: Layout, |
| | |
| | | roles: state => state.user.roles, |
| | | permission: state => state.user.permission, |
| | | menu: state => state.user.menu, |
| | | hideHome: state => state.user.hideHome, |
| | | menuId: state => state.user.menuId, |
| | | menuAll: state => state.user.menuAll, |
| | | logsList: state => state.logs.logsList, |
| | |
| | | import {setToken, setRefreshToken, removeToken, removeRefreshToken} from '@/util/auth' |
| | | import {Message} from 'element-ui' |
| | | import {setStore, getStore} from '@/util/store' |
| | | import {isURL, validatenull} from '@/util/validate' |
| | | import {deepClone} from '@/util/util' |
| | | import { setToken, setRefreshToken, removeToken, removeRefreshToken } from '@/util/auth' |
| | | import { Message } from 'element-ui' |
| | | import { setStore, getStore } from '@/util/store' |
| | | import { isURL, validatenull } from '@/util/validate' |
| | | import { deepClone } from '@/util/util' |
| | | import website from '@/config/website' |
| | | import {loginByUsername, loginBySocial, getUserInfo, logout, refreshToken, getButtons} from '@/api/user' |
| | | import {getTopMenu, getRoutes} from '@/api/system/menu' |
| | | import { loginByUsername, loginBySocial, getUserInfo, logout, refreshToken, getButtons } from '@/api/user' |
| | | import { getTopMenu, getRoutes } from '@/api/system/menu' |
| | | import md5 from 'js-md5' |
| | | |
| | | |
| | |
| | | |
| | | const user = { |
| | | state: { |
| | | tenantId: getStore({name: 'tenantId'}) || '', |
| | | userInfo: getStore({name: 'userInfo'}) || [], |
| | | permission: getStore({name: 'permission'}) || {}, |
| | | tenantId: getStore({ name: 'tenantId' }) || '', |
| | | userInfo: getStore({ name: 'userInfo' }) || [], |
| | | permission: getStore({ name: 'permission' }) || {}, |
| | | roles: [], |
| | | menuId: {}, |
| | | menu: getStore({name: 'menu'}) || [], |
| | | menuAll: getStore({name: 'menuAll'}) || [], |
| | | token: getStore({name: 'token'}) || '', |
| | | refreshToken: getStore({name: 'refreshToken'}) || '', |
| | | menu: getStore({ name: 'menu' }) || [], |
| | | menuAll: getStore({ name: 'menuAll' }) || [], |
| | | token: getStore({ name: 'token' }) || '', |
| | | refreshToken: getStore({ name: 'refreshToken' }) || '', |
| | | hideHome: false, |
| | | }, |
| | | actions: { |
| | | //根据用户名登录 |
| | | LoginByUsername({commit}, userInfo) { |
| | | LoginByUsername({ commit }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type, userInfo.key, userInfo.code).then(res => { |
| | | const data = res.data; |
| | |
| | | }) |
| | | }, |
| | | //根据手机号登录 |
| | | LoginByPhone({commit}, userInfo) { |
| | | LoginByPhone({ commit }, userInfo) { |
| | | return new Promise((resolve) => { |
| | | loginByUsername(userInfo.phone, userInfo.code).then(res => { |
| | | const data = res.data.data; |
| | |
| | | }) |
| | | }, |
| | | //根据第三方信息登录 |
| | | LoginBySocial({commit}, userInfo) { |
| | | LoginBySocial({ commit }, userInfo) { |
| | | return new Promise((resolve) => { |
| | | loginBySocial(userInfo.tenantId, userInfo.source, userInfo.code, userInfo.state).then(res => { |
| | | const data = res.data; |
| | |
| | | }) |
| | | }, |
| | | //获取用户信息 |
| | | GetUserInfo({commit}) { |
| | | GetUserInfo({ commit }) { |
| | | return new Promise((resolve, reject) => { |
| | | getUserInfo().then((res) => { |
| | | const data = res.data.data; |
| | |
| | | }) |
| | | }, |
| | | //刷新token |
| | | refreshToken({state, commit}) { |
| | | refreshToken({ state, commit }) { |
| | | window.console.log('handle refresh token') |
| | | return new Promise((resolve, reject) => { |
| | | refreshToken(state.refreshToken, state.tenantId).then(res => { |
| | |
| | | }) |
| | | }, |
| | | // 登出 |
| | | LogOut({commit}) { |
| | | LogOut({ commit }) { |
| | | return new Promise((resolve, reject) => { |
| | | logout().then(() => { |
| | | commit('SET_TOKEN', ''); |
| | |
| | | }) |
| | | }, |
| | | //注销session |
| | | FedLogOut({commit}) { |
| | | FedLogOut({ commit }) { |
| | | return new Promise(resolve => { |
| | | commit('SET_TOKEN', ''); |
| | | commit('SET_MENU_ALL_NULL', []); |
| | |
| | | }) |
| | | }, |
| | | //获取系统菜单 |
| | | GetMenu({commit, dispatch}, topMenuId) { |
| | | GetMenu({ commit, dispatch }, topMenuId) { |
| | | return new Promise(resolve => { |
| | | getRoutes(topMenuId).then((res) => { |
| | | const data = res.data.data |
| | |
| | | }) |
| | | }, |
| | | //获取系统按钮 |
| | | GetButtons({commit}) { |
| | | GetButtons({ commit }) { |
| | | return new Promise((resolve) => { |
| | | getButtons().then(res => { |
| | | const data = res.data.data; |
| | |
| | | }, |
| | | }, |
| | | mutations: { |
| | | set_hideHome: (state, val) => { |
| | | state.hideHome = val; |
| | | }, |
| | | SET_TOKEN: (state, token) => { |
| | | setToken(token); |
| | | state.token = token; |
| | | setStore({name: 'token', content: state.token}) |
| | | setStore({ name: 'token', content: state.token }) |
| | | }, |
| | | SET_MENU_ID(state, menuId) { |
| | | state.menuId = menuId; |
| | |
| | | SET_REFRESH_TOKEN: (state, refreshToken) => { |
| | | setRefreshToken(refreshToken) |
| | | state.refreshToken = refreshToken; |
| | | setStore({name: 'refreshToken', content: state.refreshToken}) |
| | | setStore({ name: 'refreshToken', content: state.refreshToken }) |
| | | }, |
| | | SET_TENANT_ID: (state, tenantId) => { |
| | | state.tenantId = tenantId; |
| | | setStore({name: 'tenantId', content: state.tenantId}) |
| | | setStore({ name: 'tenantId', content: state.tenantId }) |
| | | }, |
| | | SET_USER_INFO: (state, userInfo) => { |
| | | if (validatenull(userInfo.avatar)) { |
| | | userInfo.avatar = "/img/bg/img-logo.png"; |
| | | } |
| | | state.userInfo = userInfo; |
| | | setStore({name: 'userInfo', content: state.userInfo}) |
| | | setStore({ name: 'userInfo', content: state.userInfo }) |
| | | }, |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles; |
| | |
| | | result.forEach(ele => { |
| | | state.permission[ele] = true; |
| | | }); |
| | | setStore({name: 'permission', content: state.permission}) |
| | | setStore({ name: 'permission', content: state.permission }) |
| | | } |
| | | } |
| | | |
| | |
| | | questionBankOnLoad(page, params = {}) { |
| | | // debugger; |
| | | params["examId"] = this.$route.query.id; |
| | | // params["applyStatus"] = 2; |
| | | this.questionBankLoading = false; |
| | | getApplyList( |
| | | page.currentPage, |
| | |
| | | } from "@/api/examapi/applyexam"; |
| | | import { mapState } from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | var DIC = { |
| | | applyStatus: [ |
| | | { |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "考试人数", |
| | | prop: "number", |
| | | type: 'number', |
| | | span: 12, |
| | | 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, |
| | | }, |
| | | { |
| | | label: "序号开始", |
| | | prop: "serialStart", |
| | | span: 6, |
| | | value:1, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入序号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "序号结束", |
| | | prop: "serialEnd", |
| | | span: 6, |
| | | value:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入序号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | | prop: "startTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd HH:mm", |
| | | valueFormat: "yyyy-MM-dd HH:mm", |
| | | startPlaceholder: "考试开始时间", |
| | | endPlaceholder: "考试结束时间", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | span: 12, |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd HH:mm", |
| | | valueFormat: "yyyy-MM-dd HH:mm", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择考试时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 12, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: true, |
| | | selection: false, |
| | | menu: true, |
| | | // 导出按钮 |
| | | // excelBtn: true, |
| | |
| | | // overHidden: true, |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // label: "报名状态", |
| | | // search: true, |
| | | // type: "select", |
| | | // searchSpan: 4, |
| | | // prop: "applyStatus", |
| | | // searchValue: 2, |
| | | // dicData: [{ |
| | | // label: '全部', |
| | | // value: 0, |
| | | // }, |
| | | // { |
| | | // label: '已报名', |
| | | // value: 2, |
| | | // }, |
| | | // { |
| | | // label: '已取消', |
| | | // value: 4, |
| | | // } |
| | | // ], |
| | | // props: { |
| | | // label: "label", |
| | | // value: "value" |
| | | // }, |
| | | // editDisplay: false, |
| | | // addDisplay: false, |
| | | // width: 100, |
| | | // }, |
| | | ], |
| | | }, |
| | | questionBankSearch: {}, |
| | |
| | | if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) { |
| | | this.examPersission = true; |
| | | } |
| | | |
| | | this.questionBankSearch['applyStatus'] = 2; |
| | | }, |
| | | mounted() {}, |
| | | computed: { |
| | |
| | | }); |
| | | }, |
| | | questionBankOnLoad(page, params = {}) { |
| | | params = this.questionBankSearch; |
| | | this.questionBankLoading = false; |
| | | params["applyStatus"] = 1; |
| | | getApplyList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.questionBankQuery) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | this.questionBankLoading = false; |
| | | this.questionBankSelectionClear(); |
| | | }); |
| | | this.loading = true; |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的报名信息 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | getApplyList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.questionBankQuery) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | this.questionBankLoading = false; |
| | | this.questionBankSelectionClear(); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |
| | |
| | | //生成考试 |
| | | submitExamApply(row, done, loading) { |
| | | var that = this; |
| | | var startTime = row.startTime + ":00"; |
| | | // var endTime = row.examTime[1]; |
| | | // var examTime = JSON.stringify(row.examTime); |
| | | // console.log(this.ids,111); |
| | | addExam(this.ids, null, startTime, null).then( |
| | | row.startTime = row.startTime + ":00"; |
| | | row.endTime = row.endTime + ":00"; |
| | | if(row.number!=((row.serialEnd-row.serialStart)+1)){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试人数与序号不匹配!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | |
| | | var s = new Date(row.startTime); |
| | | var e = new Date(row.endTime); |
| | | if(s>e){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | addExam(Object.assign(row, this.questionBankSearch)).then( |
| | | () => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | |
| | | 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, |
| | |
| | | size="small" |
| | | icon="el-icon-folder-checked" |
| | | v-if="row.isApply != 1 && permission.company_add" |
| | | :disabled="row.examinationType=='1'" |
| | | @click="questionBankRowSave(row)" |
| | | >报名 |
| | | </el-button> |
| | |
| | | value: "id", |
| | | }, |
| | | // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`, |
| | | dicUrl: `/api/blade-user/page-security-units?deptId={{key}}`, |
| | | dicUrl: `/api/blade-user/page-security-units?status=1&deptId={{key}}`, |
| | | dicData: [], |
| | | rules: [ |
| | | { |
| | |
| | | this.onLoad1(this.page1, this.query1); |
| | | }, |
| | | |
| | | // beforeOpen(done, type) { |
| | | // var that = this; |
| | | // if (["add", "edit", "view"].includes(type)) { |
| | | // if (this.userInfo.role_name == "保安公司管理员") { |
| | | // getListByDeptId(that.userInfo.dept_id).then((res) => { |
| | | // const userColumn = that.findObject(this.option1.column, "userIds"); |
| | | // userColumn.dicData = res.data.data; |
| | | // }); |
| | | // } |
| | | // } |
| | | // this.initFlag = true; |
| | | // done(); |
| | | // }, |
| | | beforeOpen(done, type) { |
| | | this.initFlag = true; |
| | | done(); |
| | | }, |
| | | |
| | | getStartTime() { |
| | | if ( |
| | |
| | | ); |
| | | dispatcherUnitIdColumn.dicData = res.data.data; |
| | | }); |
| | | getListByDeptId(that.userInfo.dept_id).then((res) => { |
| | | getListByDeptId(that.userInfo.dept_id,1).then((res) => { |
| | | const userIdsColumn = that.findObject(this.option1.column, "userIds"); |
| | | userIdsColumn.dicData = res.data.data; |
| | | }); |
| New file |
| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-07-18 19:44:47 |
| | | * menu-name 考试缴费管理 |
| | | */ |
| | | <template> |
| | | <el-row class="morpheus-box"> |
| | | <el-col :span="24" class="recruitmentManagement"> |
| | | <el-card> |
| | | <div class="exam-card-body"> |
| | | <avue-crud |
| | | v-model="obj" |
| | | class="company-box" |
| | | :option="questionBankOption" |
| | | :permission="permissionList" |
| | | :search.sync="questionBankSearch" |
| | | :table-loading="questionBankLoading" |
| | | :data="questionBankData" |
| | | ref="questionBankCrud" |
| | | :page.sync="questionBankPage" |
| | | @on-load="questionBankOnLoad" |
| | | @selection-change="questionBankSelectionChange" |
| | | @search-change="questionBankSearchChange" |
| | | @search-reset="questionBankSearchReset" |
| | | @current-change="questionBankCurrentChange" |
| | | @size-change="questionBankSizeChange" |
| | | @row-del="rowDel" |
| | | @row-update="questionBankRowUpdate" |
| | | > |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | <el-tag v-if="row.sex == 1">男</el-tag> |
| | | <el-tag v-if="row.sex == 2">女</el-tag> |
| | | </template> |
| | | |
| | | <!-- 自定义按钮 --> |
| | | <template slot="menuLeft"> |
| | | <!-- <el-button type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">新增 |
| | | </el-button> --> |
| | | <!-- <el-button type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">删除 |
| | | </el-button> --> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="permission.performance_import" |
| | | @click="handleImport" |
| | | >缴费凭证批量上传 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | | <el-button |
| | | style="display:none" |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | v-if="permission.performance_print" |
| | | :disabled="row.qualified==1" |
| | | @click="securityPrint(row)" |
| | | >保安证打印 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="缴费凭证批量上传" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | </avue-form> |
| | | </el-dialog> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getExamPaymentList, update,remove } from "@/api/exam/examPayment"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | obj: { |
| | | name: "张三", |
| | | }, |
| | | excelBox: false, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: false, |
| | | viewBtn: true, |
| | | // title: '成绩', |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | index: true, |
| | | indexLabel: "序号", |
| | | dialogClickModal: false, |
| | | // 操作栏宽度 |
| | | menu: true, |
| | | menuWidth: 186, |
| | | labelWidth: 120, |
| | | |
| | | column: [ |
| | | // { |
| | | // label: "缴费类型", |
| | | // prop: "type", |
| | | // dicData:[ |
| | | // { |
| | | // label:"公司缴费", |
| | | // value: 1 |
| | | // }, |
| | | // { |
| | | // label:"个人缴费", |
| | | // value: 2 |
| | | // } |
| | | // ], |
| | | // searchSpan: 4, |
| | | // search: true, |
| | | // type: "select", |
| | | // }, |
| | | { |
| | | label: "缴费人", |
| | | prop: "realName", |
| | | search:true, |
| | | searchSpan:4, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "idCardNo", |
| | | search:true, |
| | | searchSpan:4, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | slot:true, |
| | | dicData: [ |
| | | { |
| | | label:"男", |
| | | value:1 |
| | | }, |
| | | { |
| | | label:"女", |
| | | value:2 |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | }, |
| | | { |
| | | label: "所在单位", |
| | | prop: "deptName", |
| | | search:true, |
| | | searchSpan:6, |
| | | }, |
| | | // { |
| | | // label: "缴费状态", |
| | | // prop: "paymentStatus", |
| | | // searchSpan: 4, |
| | | // search: true, |
| | | // dicData: [ |
| | | // { |
| | | // label:"已缴费", |
| | | // value:1 |
| | | // }, |
| | | // { |
| | | // label:"未缴费", |
| | | // value:2 |
| | | // }, |
| | | // { |
| | | // label:"部分缴费", |
| | | // value:3 |
| | | // }, |
| | | // ], |
| | | // type: "select", |
| | | // }, |
| | | { |
| | | label: "缴费凭证", |
| | | prop: "certificateUrl", |
| | | overHidden: true, |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | }, |
| | | { |
| | | label: "缴费时间", |
| | | prop: "paymentTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | labelWidth: 120, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | questionBankSearch: {}, |
| | | questionBankLoading: true, |
| | | questionBankData: [], |
| | | questionBankPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 16, |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [], |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 zip 压缩文件", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-exam-payment-zip", |
| | | } |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.notice_view, false), |
| | | delBtn: this.vaildData(this.permission.notice_delete, false), |
| | | editBtn: this.vaildData(this.permission.performance__edit, false), |
| | | excelBtn: this.vaildData(this.permission.performance_export, false), |
| | | }; |
| | | }, |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | methods: { |
| | | questionBankOnLoad(page, params = {}) { |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 1; |
| | | getExamPaymentList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | that.questionBankPage.total = data.total; |
| | | that.questionBankData = data.records; |
| | | that.questionBankLoading = false; |
| | | that.questionBankSelectionClear(); |
| | | }); |
| | | }) |
| | | }); |
| | | |
| | | }, |
| | | |
| | | rowDel(row) { |
| | | this.$confirm("确定删除当前缴费数据?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | }, |
| | | questionBankSelectionChange(list) { |
| | | this.questionBankSelectionList = list; |
| | | }, |
| | | questionBankSearchChange(params, done) { |
| | | this.questionBankQuery = params; |
| | | this.questionBankPage.currentPage = 1; |
| | | this.questionBankOnLoad(this.questionBankPage, params); |
| | | done(); |
| | | }, |
| | | questionBankSearchReset() { |
| | | this.questionBankQuery = {}; |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankCurrentChange(currentPage) { |
| | | this.questionBankPage.currentPage = currentPage; |
| | | }, |
| | | questionBankSizeChange(pageSize) { |
| | | this.questionBankPage.pageSize = pageSize; |
| | | }, |
| | | |
| | | questionBankRowUpdate(row, index, done, loading) { |
| | | // debugger; |
| | | update({ |
| | | theoryGrade: row.theoryGrade, |
| | | learnGrade: row.learnGrade, |
| | | examId: row.examId, |
| | | id: row.id, |
| | | }).then( |
| | | () => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | refreshChange() { |
| | | this.questionBankOnLoad(this.page, this.query); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
| | |
| | | * @Author: liu |
| | | * @Date: 2021-08-26 17:00:55 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-08-27 19:26:20 |
| | | * @Last Modified time: 2021-09-06 08:52:18 |
| | | */ |
| | | |
| | | |
| | |
| | | ref="licence" |
| | | > |
| | | <div class="licence" id="licence" v-if="dialogVisible"> |
| | | <div class="licence-head">备案证</div> |
| | | <div class="licence-head">备案回执</div> |
| | | <div class="head-tid"> |
| | | 洪公保服务 |
| | | 编号 |
| | | <span class="fontStyle">{{ |
| | | licenceData.row.organizationcode |
| | | }}</span> |
| | | 号 |
| | | <!-- 号 --> |
| | | </div> |
| | | <div class="licence-main"> |
| | | <div |
| | |
| | | <span class="l-m-r-once">{{ item }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="licence-bottom">发证机关(南昌市公安局)</div> |
| | | <div class="licence-bottom">(公安机关印章)</div> |
| | | <div class="l-bottom"> |
| | | 发证日期 |
| | | <!-- 发证日期 --> |
| | | <span class="l-b-t">{{ |
| | | licenceData.row.permitime.slice(0, 4) |
| | | }}</span |
| | |
| | | |
| | | viewLicense(row) { |
| | | //查看许可证 |
| | | console.log(row, 34); |
| | | this.licenceData.row = row; |
| | | this.licenceData.chiden = {}; |
| | | this.licenceData.chiden["名称"] = row.enterprisename; |
| | | this.licenceData.chiden["住所"] = row.address; |
| | | this.licenceData.chiden["地址"] = row.address; |
| | | this.licenceData.chiden["服务区域"] = row.industry; |
| | | this.licenceData.chiden["法定代表人"] = row.representative; |
| | | this.licenceData.chiden["服务范围"] = row.industry; |
| | | this.licenceData.chiden["注册资本"] = row.registeredcapital; |
| | | this.licenceData.chiden["批准文号"] = row.registrationnumber; |
| | | this.licenceData.chiden["备案时间"] = row.officetime; |
| | | this.licenceData.chiden["备案内容"] = "设立分公司备案"; |
| | | // this.licenceData.chiden["注册资本"] = row.registeredcapital; |
| | | // this.licenceData.chiden["批准文号"] = row.registrationnumber; |
| | | |
| | | console.log(this.licenceData); |
| | | this.dialogVisible = true; |
| | |
| | | * @Author:liu |
| | | * @Date: 2021-08-26 16:59:35 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-08-27 19:36:17 |
| | | * @Last Modified time: 2021-09-06 09:19:32 |
| | | */ |
| | | |
| | | |
| | |
| | | ref="licence" |
| | | > |
| | | <div class="licence" id="licence" v-if="dialogVisible"> |
| | | <div class="licence-head">备案证</div> |
| | | <div class="licence-head">备案回执</div> |
| | | <div class="head-tid"> |
| | | 洪公保服务 |
| | | 编号 |
| | | <span class="fontStyle">{{ |
| | | licenceData.row.organizationcode |
| | | }}</span> |
| | | 号 |
| | | <!-- 号 --> |
| | | </div> |
| | | <div class="licence-main"> |
| | | <div |
| | |
| | | <span class="l-m-r-once">{{ item }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="licence-bottom">发证机关(南昌市公安局)</div> |
| | | <div class="licence-bottom">(公安机关印章)</div> |
| | | <div class="l-bottom"> |
| | | 发证日期 |
| | | <!-- 发证日期 --> |
| | | <span class="l-b-t">{{ |
| | | licenceData.row.permitime.slice(0, 4) |
| | | }}</span |
| | |
| | | this.licenceData.row = row; |
| | | this.licenceData.chiden = {}; |
| | | this.licenceData.chiden["名称"] = row.enterprisename; |
| | | this.licenceData.chiden["住所"] = row.address; |
| | | this.licenceData.chiden["地址"] = row.address; |
| | | this.licenceData.chiden["服务区域"] = row.industry; |
| | | this.licenceData.chiden["法定代表人"] = row.representative; |
| | | this.licenceData.chiden["服务范围"] = row.industry; |
| | | this.licenceData.chiden["注册资本"] = row.registeredcapital; |
| | | this.licenceData.chiden["批准文号"] = row.registrationnumber; |
| | | this.licenceData.chiden["备案时间"] = row.officetime; |
| | | this.licenceData.chiden["备案内容"] = "跨区域经营备案"; |
| | | // this.licenceData.chiden["注册资本"] = row.registeredcapital; |
| | | // this.licenceData.chiden["批准文号"] = row.registrationnumber; |
| | | |
| | | console.log(this.licenceData); |
| | | this.dialogVisible = true; |
| | |
| | | * @Author: liu |
| | | * @Date: 2021-08-26 16:57:58 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-08-27 19:35:04 |
| | | * @Last Modified time: 2021-09-06 09:10:46 |
| | | */ |
| | | |
| | | |
| | |
| | | ref="licence" |
| | | > |
| | | <div class="licence" id="licence" v-if="dialogVisible"> |
| | | <div class="licence-head">备案证</div> |
| | | <div class="licence-head">备案回执</div> |
| | | <div class="head-tid"> |
| | | 洪公保服务 |
| | | 编号 |
| | | <span class="fontStyle">{{ |
| | | licenceData.row.organizationcode |
| | | }}</span> |
| | | 号 |
| | | <!-- 号 --> |
| | | </div> |
| | | <div class="licence-main"> |
| | | <div |
| | |
| | | <span class="l-m-r-once">{{ item }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="licence-bottom">发证机关(南昌市公安局)</div> |
| | | <div class="licence-bottom">(公安机关印章)</div> |
| | | <div class="l-bottom"> |
| | | 发证日期 |
| | | <!-- 发证日期 --> |
| | | <span class="l-b-t">{{ |
| | | licenceData.row.permitime.slice(0, 4) |
| | | }}</span |
| | |
| | | }, |
| | | viewLicense(row) { |
| | | //查看许可证 |
| | | console.log(row, 34); |
| | | this.licenceData.row = row; |
| | | this.licenceData.chiden = {}; |
| | | this.licenceData.chiden["名称"] = row.enterprisename; |
| | | this.licenceData.chiden["住所"] = row.address; |
| | | this.licenceData.chiden["地址"] = row.address; |
| | | this.licenceData.chiden["服务区域"] = row.industry; |
| | | this.licenceData.chiden["法定代表人"] = row.representative; |
| | | this.licenceData.chiden["服务范围"] = row.industry; |
| | | this.licenceData.chiden["注册资本"] = row.registeredcapital; |
| | | this.licenceData.chiden["批准文号"] = row.registrationnumber; |
| | | this.licenceData.chiden["备案时间"] = row.officetime; |
| | | this.licenceData.chiden["备案内容"] = "自招保安单位备案"; |
| | | // this.licenceData.chiden["注册资本"] = row.registeredcapital; |
| | | // this.licenceData.chiden["批准文号"] = row.registrationnumber; |
| | | |
| | | console.log(this.licenceData); |
| | | this.dialogVisible = true; |
| | |
| | | * @Author: liu |
| | | * @Date: 2021-08-26 16:55:25 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-08-27 11:45:56 |
| | | * @Last Modified time: 2021-09-06 09:27:21 |
| | | */ |
| | | |
| | | |
| | |
| | | ref="licence" |
| | | > |
| | | <div class="licence" id="licence" v-if="dialogVisible"> |
| | | <div class="licence-head">保安服务许可证</div> |
| | | <div class="licence-head">保安培训许可证</div> |
| | | <div class="head-tid"> |
| | | 洪公保服务 |
| | | <span class="fontStyle">{{ |
| | |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload2" |
| | | @click="handleUpload" |
| | | >上 传 |
| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | |
| | | type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)" |
| | | >下载 |
| | | </el-button> |
| | |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload2" |
| | | @click="handleUpload" |
| | | >上 传 |
| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | |
| | | type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)" |
| | | >下载 |
| | | </el-button> |
| | |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload2" |
| | | @click="handleUpload" |
| | | >上 传 |
| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | |
| | | type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)" |
| | | >下载 |
| | | </el-button> |
| | |
| | | }) |
| | | .catch((res) => { |
| | | var b = that.changedata([], "cz", "wcz", "持证", "未持证"); |
| | | that.setEC1(b); |
| | | that.setEC2(b); |
| | | }); |
| | | }, |
| | | setEC2(data) { |
| | |
| | | }) |
| | | .catch((res) => { |
| | | var b = that.changedata([], "pnum", "wpnum", "已派遣", "未派遣"); |
| | | that.setEC1(b); |
| | | that.setEC5(b); |
| | | }); |
| | | }, |
| | | setEC5(d) { |
| | |
| | | "已缴纳社保", |
| | | "未缴纳社保" |
| | | ); |
| | | that.setEC1(b); |
| | | that.setEC6(b); |
| | | }); |
| | | }, |
| | | setEC6(d) { |
| | |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | labelWidth:110, |
| | | labelWidth: 110, |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | // console.log(params.deptId); |
| | | if (this.fromDeptId != undefined) { |
| | | params["deptId"] = this.fromDeptId; |
| | | this.option.column[4].search = false; |
| | | this.option.column[6].search = false; |
| | | this.option.column[6].hide = true; |
| | | this.option.column[6].addDisplay = false; |
| | | this.option.column[6].editDisplay = false; |
| | | for (let k in this.option.column) { |
| | | if (this.option.column[k].prop == "deptId") { |
| | | this.option.column[k].search = false; |
| | | this.option.column[k].hide = true; |
| | | this.option.column[k].addDisplay = false; |
| | | this.option.column[k].editDisplay = false; |
| | | } |
| | | } |
| | | // this.option.column[4]. = false; |
| | | // this.option.column[6].search = false; |
| | | // this.option.column[6].hide = true; |
| | | // this.option.column[6].addDisplay = false; |
| | | // this.option.column[6].editDisplay = false; |
| | | } else { |
| | | this.option.column[4].search = true; |
| | | this.option.column[6].search = true; |
| | | this.option.column[6].hide = false; |
| | | this.option.column[6].addDisplay = true; |
| | | this.option.column[6].editDisplay = true; |
| | | for (let k in this.option.column) { |
| | | if (this.option.column[k].prop == "deptId") { |
| | | this.option.column[k].search = true; |
| | | this.option.column[k].hide = false; |
| | | this.option.column[k].addDisplay = true; |
| | | this.option.column[k].editDisplay = true; |
| | | } |
| | | } |
| | | // this.option.column[4].search = true; |
| | | // this.option.column[6].search = true; |
| | | // this.option.column[6].hide = false; |
| | | // this.option.column[6].addDisplay = true; |
| | | // this.option.column[6].editDisplay = true; |
| | | } |
| | | getdata( |
| | | page.currentPage, |
| New file |
| | |
| | | <template> |
| | | <div class="securityCertificate"> |
| | | <div class="security_main"> |
| | | <div class="security_m_left"> |
| | | <div class="security_m_l_up"> |
| | | <span class="security_m_l_u_fixed">{{ data.realName }}</span> |
| | | 经国家保安员考试审查合格。特颁此证。 |
| | | </div> |
| | | <div class="security_m_l_center"> |
| | | 发证公安机关 (印章)<br /> |
| | | 发证日期 {{ data.paperTime.slice(0, 10) }} |
| | | </div> |
| | | <div class="security_m_l_down"> |
| | | 证件编号 {{ data.securitynumber }} |
| | | </div> |
| | | </div> |
| | | <div class="security_m_right"> |
| | | <div class="security_m_r_img"> |
| | | <div v-if="!data.avatar">暂无照片</div> |
| | | <img :src="data.avatar" alt="" v-else /> |
| | | </div> |
| | | <div class="security_m_r_once"> |
| | | <span class="security_m_r_o_left">姓名</span> |
| | | <span class="security_m_r_o_right">{{ data.realName }}</span> |
| | | </div> |
| | | <div class="security_m_r_once"> |
| | | <span class="security_m_r_o_left">出生年月</span> |
| | | <span class="security_m_r_o_right">{{ data.birthday }}</span> |
| | | </div> |
| | | <div class="security_m_r_once security_m_r_odizhi"> |
| | | <span class="security_m_r_o_left security_m_r_o_l_ups">地址</span> |
| | | <span class="security_m_r_o_right security_m_r_o_l_r"> |
| | | {{ data.address }} |
| | | </span> |
| | | </div> |
| | | <div class="security_m_r_once"> |
| | | <div class="security_m_r_o_left">公民身份证号码</div> |
| | | <div class="security_m_r_o_right">{{ data.cardid }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: ["data"], |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | //保安证 本子 |
| | | .securityCertificate { |
| | | width: 100%; |
| | | height: 90%; |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .security_main { |
| | | width: 800px; |
| | | height: 560px; |
| | | // border: 1px solid rgba($color: #a5a5a5, $alpha: 0.5); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | background-image: url(/img/securityCertificate/123.png); |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | } |
| | | .security_m_left, |
| | | .security_m_right { |
| | | width: 380px; |
| | | height: 540px; |
| | | // background-color: rgb(226, 226, 226); |
| | | padding: 70px 40px; |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | // background-image: url(/img/securityCertificate/bj2.jpeg); |
| | | // background-size: 100% 100%; |
| | | // background-repeat: no-repeat; |
| | | } |
| | | .security_m_left { |
| | | padding-left: 70px; |
| | | padding-right: 10px; |
| | | } |
| | | .security_m_l_up { |
| | | font-size: 22px; |
| | | width: 100%; |
| | | margin-bottom: 150px; |
| | | text-indent: 12rem; |
| | | letter-spacing: 0.5rem; |
| | | line-height: 2.5rem; |
| | | // height: ; |
| | | } |
| | | .security_m_l_u_fixed { |
| | | position: absolute; |
| | | width: auto; |
| | | left: -80px; |
| | | } |
| | | .security_m_l_center { |
| | | font-size: 18px; |
| | | margin-bottom: 20px; |
| | | line-height: 40px; |
| | | } |
| | | .security_m_l_down { |
| | | font-size: 22px; |
| | | } |
| | | .security_m_r_img { |
| | | width: 100%; |
| | | height: 210px; |
| | | display: flex; |
| | | // align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .security_m_r_img img { |
| | | width: 125px; |
| | | height: 160px; |
| | | } |
| | | .security_m_r_once { |
| | | position: relative; |
| | | widows: 100%; |
| | | font-size: 20px; |
| | | margin-bottom: 10px; |
| | | height: auto; |
| | | } |
| | | .security_m_r_o_left { |
| | | width: 100px; |
| | | height: auto; |
| | | display: inline-block; |
| | | text-align: justify; |
| | | text-align-last: justify; |
| | | margin-right: 10px; |
| | | // display: flex; |
| | | // justify-content: space-around; |
| | | } |
| | | .security_m_r_o_right { |
| | | width: 190px; |
| | | height: auto; |
| | | display: inline-block; |
| | | } |
| | | .security_m_r_o_l_ups { |
| | | position: absolute; |
| | | // bottom: 1.7rem; |
| | | // height: 3rem; |
| | | } |
| | | .security_m_r_o_l_r { |
| | | position: relative; |
| | | left: 110px; |
| | | } |
| | | .security_m_r_odizhi { |
| | | height: 60px; |
| | | overflow: hidden; |
| | | } |
| | | // .security_m_r_o_left:after { |
| | | // display: inline-block; |
| | | // content: ""; |
| | | // padding-left: 100%; |
| | | // } |
| | | </style> |
| | |
| | | >批量导入 |
| | | </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" |
| | |
| | | </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> |
| | |
| | | return { |
| | | securityid: "", |
| | | excelBox1: false, |
| | | excelBox2: false, |
| | | isSecurity: true, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | |
| | | 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", |
| | | } |
| | | ], |
| | | }, |
| | | |
| | |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | 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) { |
| | |
| | | <div class="baz-m-body" ref="baoanzheng"> |
| | | <div class="bmb-heard">保安员证</div> |
| | | <div class="img"> |
| | | <div v-if="!obj0.myPicture">暂无照片</div> |
| | | <img :src="obj0.myPicture" alt="" v-else /> |
| | | <div v-if="!obj0.avatar">暂无照片</div> |
| | | <img :src="obj0.avatar" alt="" v-else /> |
| | | </div> |
| | | <div class="imgs"> |
| | | <div v-if="erweima == ''">暂无二维码</div> |
| | |
| | | </div> |
| | | </div> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab5'"> |
| | | <securityCertificate :data="obj0"></securityCertificate> |
| | | </span> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | updateExperience, |
| | | getExperienceDetail, |
| | | experienceRemove, |
| | | getExperienceList |
| | | getExperienceList, |
| | | } from "@/api/experience/experience"; |
| | | |
| | | import { |
| | |
| | | } from "@/api/performance/performance"; |
| | | |
| | | // import vueQr from "vue-qr"; |
| | | import securityCertificate from "./securityCertificate.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | securityCertificate: securityCertificate, |
| | | }, |
| | | data() { |
| | | return { |
| | | typeTABS: {}, //标签页 |
| | |
| | | // icon: "el-icon-info", |
| | | label: "保安员证", |
| | | prop: "tab4", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "保安员证书", |
| | | prop: "tab5", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }; |
| | | //获取用户从业信息 |
| | | console.log(this.id, "cid"); |
| | | getExperienceList(this.current, this.size,param).then((res1) => { |
| | | getExperienceList(this.current, this.size, param).then((res1) => { |
| | | const data = res1.data.data; |
| | | this.page1.total = data.total; |
| | | this.data1 = data.records; |
| | |
| | | this.loading2 = false; |
| | | }); |
| | | }, |
| | | |
| | | |
| | | rowSave2(form, done, loading) { |
| | | form.securityid = this.id; |
| | |
| | | <div class="businessLicense"> |
| | | <el-container> |
| | | <el-main> |
| | | <avue-form :option="option" v-model="form" :upload-after="uploadAfter"> |
| | | <avue-form |
| | | :option="option" |
| | | v-model="form" |
| | | :upload-after="uploadAfter" |
| | | :upload-delete="uploadDelete" |
| | | > |
| | | </avue-form |
| | | ></el-main> |
| | | </el-container> |
| | |
| | | this.form.imgUrl = this.row.businessLicense; |
| | | } |
| | | }, |
| | | uploadDelete(column, file) { |
| | | this.row.businessLicense = ""; |
| | | return update(this.row) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | // done(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "删除照片失败,再重试!", |
| | | }); |
| | | // done(); |
| | | }); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | // this.row.businessLicense = ""; |
| | | this.row.businessLicense = res.url; |
| | |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "添加成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | |
| | | var w = 160, |
| | | s = 12; |
| | | export var column = [{ |
| | | label: "", |
| | | labelWidth: 20, |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | label: "", |
| | | labelWidth: 20, |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "enterprisename", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | // { |
| | | // label: "统一社会信用代码", |
| | | // prop: "creditcode", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "法定代表人", |
| | | prop: "representative", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, { |
| | | label: "法定代表人电话", |
| | | prop: "representativecell", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "联系人", |
| | | prop: "contacts", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "contactscell", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | // { |
| | | // label: "注册时间", |
| | | // prop: "establishtime", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "注册资本", |
| | | // prop: "registeredcapital", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "实缴资本", |
| | | // prop: "capital", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "组织机构代码", |
| | | // prop: "organizationcode", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "工商注册号", |
| | | // prop: "registrationnumber", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "纳税人识别号", |
| | | // prop: "identificationnumber", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "企业类型", |
| | | prop: "stats", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "enterprisename", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "注册地址", |
| | | prop: "address", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | // search: true, |
| | | }, |
| | | // { |
| | | // label: "所属辖区", |
| | | // prop: "region", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // width: 110, |
| | | // overHidden: true, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "所属辖区", |
| | | prop: "region", |
| | | // multiple: true, |
| | | type: "tree", |
| | | dicUrl: "/api/jurisdiction/lazy-tree", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | { |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "法定代表人", |
| | | prop: "representative", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, { |
| | | label: "法定代表人电话", |
| | | prop: "representativecell", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "联系人", |
| | | prop: "contacts", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "contactscell", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "注册时间", |
| | | prop: "establishtime", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "注册资本", |
| | | prop: "registeredcapital", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "实缴资本", |
| | | prop: "capital", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "组织机构代码", |
| | | prop: "organizationcode", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "工商注册号", |
| | | prop: "registrationnumber", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | prop: "identificationnumber", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "企业类型", |
| | | prop: "stats", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "注册地址", |
| | | prop: "address", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | // search: true, |
| | | }, |
| | | span: 11, |
| | | labelWidth: 130, |
| | | width: 110, |
| | | overHidden: true, |
| | | disabled: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择所属辖区", |
| | | trigger: "click", |
| | | },], |
| | | }, |
| | | { |
| | | label: "所属行业", |
| | | prop: "industry", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "registration", |
| | | // span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | span: 11, |
| | | }, |
| | | { |
| | | label: "经营范围", |
| | | prop: "business", |
| | | span: 24, |
| | | labelWidth: 130, |
| | | width: 110, |
| | | // overHidden: true, |
| | | type: 'textarea', |
| | | showWordLimit: true, |
| | | disabled: true, |
| | | } |
| | | ] |
| | | export var column11 = [{ |
| | | label: "", |
| | | labelWidth: 20, |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, |
| | | // { |
| | | // label: "企业名称", |
| | | // prop: "enterprisename", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | // { |
| | | // label: "法定代表人", |
| | | // prop: "representative", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "法定代表人电话", |
| | | // prop: "representativecell", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "联系人", |
| | | // prop: "contacts", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, { |
| | | // label: "联系电话", |
| | | // prop: "contactscell", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "注册时间", |
| | | prop: "establishtime", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "注册资本", |
| | | prop: "registeredcapital", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | // { |
| | | // label: "实缴资本", |
| | | // prop: "capital", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "组织机构代码", |
| | | prop: "organizationcode", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "工商注册号", |
| | | prop: "registrationnumber", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | prop: "identificationnumber", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | // { |
| | | // label: "企业类型", |
| | | // prop: "stats", |
| | | // type: "tree", |
| | | // dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats", |
| | | // props: { |
| | | // label: "dictValue", |
| | | // value: "dictKey" |
| | | // }, |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "注册地址", |
| | | // prop: "address", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // // search: true, |
| | | // }, |
| | | // { |
| | | // label: "所属辖区", |
| | | // prop: "region", |
| | |
| | | // overHidden: true, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "所属辖区", |
| | | prop: "region", |
| | | // multiple: true, |
| | | type: "tree", |
| | | dicUrl: "/api/jurisdiction/lazy-tree", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | span: 11, |
| | | labelWidth: 130, |
| | | width: 110, |
| | | overHidden: true, |
| | | disabled: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择所属辖区", |
| | | trigger: "click", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "所属行业", |
| | | prop: "industry", |
| | | span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "registration", |
| | | // span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | span: 11, |
| | | }, |
| | | { |
| | | label: "经营范围", |
| | | prop: "business", |
| | | span: 24, |
| | | labelWidth: 130, |
| | | width: 110, |
| | | // overHidden: true, |
| | | type: 'textarea', |
| | | showWordLimit: true, |
| | | disabled: true, |
| | | } |
| | | ] |
| | | |
| | | export var column1 = [{ |
| | | label: "id", |
| | | prop: "id", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | |
| | | }, { |
| | | label: "股东", |
| | | prop: "shareholder", |
| | | searchLabelWidth: 55, |
| | | search: true, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "持股比例(%)", |
| | | prop: "shareholdingratio", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, |
| | | // { |
| | | // label: "最终受益股份", |
| | | // prop: "beneficial", |
| | | // { |
| | | // label: "所属辖区", |
| | | // prop: "region", |
| | | // // multiple: true, |
| | | // type: "tree", |
| | | // dicUrl: "/api/jurisdiction/lazy-tree", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // width: 110, |
| | | // overHidden: true, |
| | | // disabled: true, |
| | | // rules: [{ |
| | | // required: false, |
| | | // message: "请选择所属辖区", |
| | | // trigger: "click", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | label: "出资金额(万元)", |
| | | prop: "capital", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "出资时间", |
| | | prop: "capitaltime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "身份证", |
| | | prop: "cardid", |
| | | labelWidth: w, |
| | | span: s, |
| | | search: true |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "cell", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, |
| | | // { |
| | | // label: "所属行业", |
| | | // prop: "industry", |
| | | // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // }, |
| | | // { |
| | | // label: "登记机关", |
| | | // prop: "registration", |
| | | // // span: 11, |
| | | // labelWidth: 130, |
| | | // disabled: true, |
| | | // span: 11, |
| | | // }, |
| | | // { |
| | | // label: "经营范围", |
| | | // prop: "business", |
| | | // span: 24, |
| | | // labelWidth: 130, |
| | | // width: 110, |
| | | // // overHidden: true, |
| | | // type: 'textarea', |
| | | // showWordLimit: true, |
| | | // disabled: true, |
| | | // } |
| | | ] |
| | | export var column1 = [{ |
| | | label: "id", |
| | | prop: "id", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | |
| | | }, { |
| | | label: "股东", |
| | | prop: "shareholder", |
| | | searchLabelWidth: 55, |
| | | search: true, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "持股比例(%)", |
| | | prop: "shareholdingratio", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, |
| | | // { |
| | | // label: "最终受益股份", |
| | | // prop: "beneficial", |
| | | // }, |
| | | { |
| | | label: "出资金额(万元)", |
| | | prop: "capital", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "出资时间", |
| | | prop: "capitaltime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "身份证", |
| | | prop: "cardid", |
| | | labelWidth: w, |
| | | span: s, |
| | | search: true |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "cell", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, |
| | | ] |
| | | |
| | | export var column2 = [{ |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "id", |
| | | prop: "id", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "姓名", |
| | | prop: "name", |
| | | search: true, |
| | | labelWidth: w, |
| | | searchLabelWidth: 55, |
| | | span: s, |
| | | }, { |
| | | label: "职务", |
| | | prop: "post", |
| | | search: true, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "身份证", |
| | | prop: "cardid", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "cell", |
| | | labelWidth: w, |
| | | span: s, |
| | | } |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "id", |
| | | prop: "id", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "姓名", |
| | | prop: "name", |
| | | search: true, |
| | | labelWidth: w, |
| | | searchLabelWidth: 55, |
| | | span: s, |
| | | }, { |
| | | label: "职务", |
| | | prop: "post", |
| | | search: true, |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "身份证", |
| | | prop: "cardid", |
| | | labelWidth: w, |
| | | span: s, |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "cell", |
| | | labelWidth: w, |
| | | span: s, |
| | | } |
| | | // , { |
| | | // label: "持股比例(%)", |
| | | // prop: "shareholdingratio", |
| | |
| | | </avue-form> |
| | | </basic-container> |
| | | </span> |
| | | <span v-if="typeTABS.prop === 'tab11'" class="tab"> |
| | | <!-- <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud>--> |
| | | <!-- 表单组件 --> |
| | | <basic-container> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option01" |
| | | @submit="submit0" |
| | | > |
| | | <!-- <template slot-scope="scope" slot="menuForm"> |
| | | <el-button @click="tip">自定义按钮</el-button> |
| | | </template> --> |
| | | </avue-form> |
| | | </basic-container> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab2'" class="tab"> |
| | | <!-- <span v-if="typeTABS.prop === 'tab2'"> --> |
| | | <basic-container> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { column, column1, column2 } from "./data"; |
| | | import { column11, column, column1, column2 } from "./data"; |
| | | import { |
| | | getOncedata, |
| | | // getdata, |
| | |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/car/import-examSubject", |
| | | action: "/api/shareholder/import-share", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/examSubjectChoices/import-examSubject", |
| | | action: "/api/member/import-member", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | |
| | | // icon: "el-icon-info", |
| | | label: "保安单位基本信息", |
| | | prop: "tab1", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "工商信息", |
| | | prop: "tab11", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | |
| | | submitText: "保存", |
| | | gutter: 30, |
| | | column: column, |
| | | }, |
| | | |
| | | option01: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | submitText: "保存", |
| | | gutter: 30, |
| | | column: column11, |
| | | }, |
| | | |
| | | loading1: true, //派遣记录 |
| | |
| | | update(row).then( |
| | | () => { |
| | | // this.onLoad(this.page); |
| | | this.onloads(); |
| | | // this.onloads(); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | this.refreshChange1(); |
| | | done(); |
| | | }, |
| | | handleTemplate() { |
| | | window.open(`/api/car/export-template`); |
| | | window.open(`/api/shareholder/export-template`); |
| | | }, |
| | | |
| | | handleImport1() { |
| | |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | this.refreshChange2(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | window.open(`/api/member/export-template`); |
| | | }, |
| | | |
| | | handleChangeTABS(column) { |
| | |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | var d = that.option0.column; |
| | | var e = that.option01.column; |
| | | // console.log(roleAlias); |
| | | if (roleAlias == "保安公司管理员") { |
| | | that.option0.submitBtn = true; |
| | | that.option01.submitBtn = true; |
| | | for (var k in d) { |
| | | // if (d[k].label != "企业类型") { |
| | | d[k].disabled = false; |
| | | // } |
| | | } |
| | | for (var n in e) { |
| | | // if (d[k].label != "企业类型") { |
| | | e[n].disabled = false; |
| | | // } |
| | | } |
| | | } else { |
| | | that.option0.submitBtn = false; |
| | | that.option01.submitBtn = false; |
| | | for (var k in d) { |
| | | d[k].disabled = true; |
| | | } |
| | | for (var n in e) { |
| | | e[n].disabled = true; |
| | | } |
| | | } |
| | | getdatas(roleAlias); |
| | | }); |
| | |
| | | <div class="License"> |
| | | <el-container> |
| | | <el-main> |
| | | <avue-form :option="option" v-model="form" :upload-after="uploadAfter"> |
| | | <avue-form |
| | | :option="option" |
| | | v-model="form" |
| | | :upload-after="uploadAfter" |
| | | :upload-delete="uploadDelete" |
| | | > |
| | | </avue-form |
| | | ></el-main> |
| | | </el-container> |
| | |
| | | this.form.imgUrl = this.row.licence; |
| | | } |
| | | }, |
| | | uploadDelete(column, file) { |
| | | this.row.licence = ""; |
| | | return update(this.row) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | // done(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "删除照片失败,再重试!", |
| | | }); |
| | | // done(); |
| | | }); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | this.row.licence = res.url; |
| | | update(this.row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "添加成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | |
| | | props: ["deptid"], |
| | | data() { |
| | | var deptid = this.deptid; |
| | | |
| | | if (this.deptid == undefined) { |
| | | // deptid = this.userInfo |
| | | // console.log(this.$store.getters.userInfo.dept_id); |
| | | deptid = this.$store.getters.userInfo.dept_id; |
| | | } |
| | | return { |
| | | do: 0, |
| | | form: { cardid: "" }, |
| | | |
| | | query: {}, |
| | |
| | | }, |
| | | methods: { |
| | | changes(val) { |
| | | this.do++; |
| | | if (this.do >= 2) { |
| | | if (val.value != "") { |
| | | getuseList(val.value).then((res) => { |
| | | // console.log(res); |
| | | var d = res.data.data; |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | params['status'] = 1; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | :disabled="row.candidateNo==''" |
| | | :disabled="row.candidateNo=='' || row.cancel==2" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-refresh-left" |
| | | :disabled="row.cancel==2" |
| | | @click="revoke(row)" |
| | | >取消报名 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-circle-check" |
| | | :disabled="row.auditStatus==1" |
| | | @click="auditSucess(row)" |
| | | >审核通过 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | |
| | | <script> |
| | | |
| | | import {getdata,adddata,remove} from "@/api/trainingRegistration/trainingRegistration"; |
| | | import {getdata,adddata, cancelTrainAudit,auditSucess,remove} from "@/api/trainingRegistration/trainingRegistration"; |
| | | |
| | | import { mapState } from 'vuex' |
| | | |
| | |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "报名状态", |
| | | prop: "cancel", |
| | | type:"select", |
| | | search:true, |
| | | hide:true, |
| | | searchSpan:4, |
| | | searchValue:1, |
| | | dicData:[ |
| | | { |
| | | label: '已报名', |
| | | value: 1 |
| | | }, { |
| | | label: '已取消', |
| | | value: 2 |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "准考证号", |
| | | prop: "candidateNo", |
| | | slot: true, |
| | |
| | | ? "0" + new Date().getSeconds() |
| | | : new Date().getSeconds())), |
| | | |
| | | width: 160 |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 160 |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | | search: true, |
| | | searchLabelWidth: 110, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | prop: "auditStatus", |
| | | searchValue: 4, |
| | | dicData: [{ |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '审核通过', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: '审核不通过', |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: '已提交审核', |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: '未提交审核', |
| | | value: 4, |
| | | } |
| | | ], |
| | | props: { |
| | | label: "label", |
| | | value: "value" |
| | | }, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // label: "报名状态", |
| | |
| | | this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.questionBankSearch['cancel'] = 1; |
| | | this.questionBankSearch['auditStatus'] = 0; |
| | | }, |
| | | mounted() { |
| | | var flag = false, |
| | |
| | | }); |
| | | }, |
| | | questionBankOnLoad (page, params = {}) { |
| | | // debugger; |
| | | params = this.questionBankSearch; |
| | | params['examId'] = this.$route.query.id; |
| | | this.questionBankLoading = false; |
| | | getdata(page.currentPage, page.pageSize, Object.assign(params, this.questionBankQuery)).then(res => { |
| | |
| | | questionBankSizeChange (pageSize) { |
| | | this.questionBankPage.pageSize = pageSize; |
| | | }, |
| | | //取消报名 |
| | | revoke(row, done, loading) { |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | row.cancel = 2; |
| | | cancelTrainAudit(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "取消报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | //审核通过 |
| | | auditSucess(row, done, loading) { |
| | | this.$confirm("确定审核通过?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | row.cancel = 1; |
| | | auditSucess(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | |
| | | // 新增 |
| | | questionBankRowSave (row, done, loading) { |
| | |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | v-if="permission.trainExam_trainPapers" |
| | | @click="startExam(row)" |
| | | >报名清册 |
| | | </el-button> |
| | |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainExam_check" |
| | | @click="handleAudit(row)" |
| | | >审核 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainExam_index_examScoreViews" |
| | | @click="examScoreViews(row)" |
| | | >成绩查看 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | updateAudit, |
| | | } from "@/api/examapi/examination"; |
| | | import { auditColumn } from "./data"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | computed: { |
| | | ids() { |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | }, |
| | | watch: {}, |
| | |
| | | }); |
| | | } |
| | | }, |
| | | examScoreViews(row){ |
| | | //模拟考试 |
| | | if (row.examType == 2) { |
| | | this.$router.push({ |
| | | path: `/trainExam/singleperformance`, |
| | | query: row, |
| | | }); |
| | | } |
| | | }, |
| | | // 新增 |
| | | questionBankRowSave(row, done, loading) { |
| | | row.startTime = row.startTime + ":00"; |
| | |
| | | {{ row.allGrade == -1 ? "" : row.allGrade }} |
| | | </template> |
| | | <template slot-scope="{ row }" slot="qualified"> |
| | | {{ row.qualified == -1 ? "" : row.qualified==0?"合格":row.qualified==1?"不合格":'' }} |
| | | {{ row.qualified == -1 ? "" : row.qualified==0?"合格":row.qualified==1?"不合格":row.qualified==3?"缺考,成绩无效":'' }} |
| | | </template> |
| | | |
| | | <!-- 自定义按钮 --> |
| | |
| | | @click="handleImport" |
| | | >实操成绩导入 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-s-flag" |
| | | @click="absent(row)" |
| | | :size="size" |
| | | :type="type" |
| | | >缺考标记</el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, update } from "@/api/examapi/performance"; |
| | | import { getList, update,updateAbsent } from "@/api/examapi/performance"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | export default { |
| | |
| | | label: "暂未录实操成绩", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "缺考,成绩无效", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 2; |
| | |
| | | }); |
| | | |
| | | }, |
| | | //缺考标记 |
| | | absent(row, done, loading) { |
| | | this.$confirm("确定缺考标记?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | row.qualified = 3; |
| | | updateAbsent(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | |
| | | {{ row.learnGrade == -1 ? "" : row.allGrade }} |
| | | </template> |
| | | <template slot-scope="{ row }" slot="qualified"> |
| | | {{ row.learnGrade == -1 ? "" : row.qualified == 0?"合格":row.qualified==1?"不合格":'' }} |
| | | {{ row.qualified == -1 ? "" : row.qualified==0?"合格":row.qualified==1?"不合格":row.qualified==3?"缺考,成绩无效":'' }} |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 5, |
| | | slot: true, |
| | | viewDisplay:false, |
| | | // 表单新增时是否禁止 |
| | |
| | | type: "select", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | dicData: [ |
| | | { |
| | | label: "发布成绩", |
| | |
| | | type: "select", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | dicData: [ |
| | | { |
| | | label: "合格", |
| | |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | // console.log(this.$route.query,111); |
| | | this.questionBankSearch['examName'] = this.$route.query.examName; |
| | | }, |
| | | mounted() {}, |
| | | computed:{ |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | params = this.questionBankSearch; |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 2; |
| | | getList( |
| | |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | v-if="permission.traincompany_addTrain" |
| | | :disabled="auditStatus" |
| | | @click="handleTrainApply(row)" |
| | | >报名 |
| | | </el-button> |
| | |
| | | import {adddata,batchTrain} from "@/api/trainingRegistration/trainingRegistration"; |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from 'vuex'; |
| | | |
| | | import {getUser} from "@/api/system/user"; |
| | | export default { |
| | | |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | auditStatus:false, |
| | | formTrainApply: {}, |
| | | query: {}, |
| | | deptId:null, |
| | |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "法定代表人", |
| | | label: "校长", |
| | | prop: "representative", |
| | | display: false, |
| | | search: true, |
| | |
| | | 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, |
| | |
| | | }, |
| | | 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; |
| | | |
| | | this.getUserDetail(); |
| | | }, |
| | | methods: { |
| | | //获取用户信息 |
| | | getUserDetail(){ |
| | | var that = this; |
| | | getUser(this.userInfo.Id).then((res)=>{ |
| | | var status = res.data.data.examinationType; |
| | | if(status=='1'){ |
| | | that.auditStatus = true; |
| | | } |
| | | console.log(that.auditStatus,3333); |
| | | }) |
| | | }, |
| | | //保安公司批量报名 |
| | | handleTrainApplyBatch(row){ |
| | | this.dialogDisable = true; |
| | |
| | | }, |
| | | //未持证保安人员报名 |
| | | 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(){ |
| | |
| | | }], |
| | | searchSpan: 4, |
| | | searchLabelWidth: 110, |
| | | width: 200, |
| | | }, { |
| | | label: "姓名", |
| | | prop: "userId", |
| | |
| | | message: "请输入单位名称", |
| | | trigger: "blur" |
| | | }], |
| | | |
| | | }, |
| | | { |
| | | label: "考试名称", |
| | | prop: "trainExamName" |
| | | prop: "trainExamName", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "考试证件", |
| | | prop: "applyCard" |
| | | }, |
| | | // { |
| | | // label: "报名状态", |
| | | // prop: "cancel", |
| | | // // search: true, |
| | | // dicData: DIC1, |
| | | // props: { |
| | | // label: "label", |
| | | // value: "value" |
| | | // }, |
| | | // editDisplay: false, |
| | | // addDisplay: false, |
| | | // searchSpan: 4, |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | label: "审核状态", |
| | | search: true, |
| | | searchLabelWidth: 110, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | prop: "auditStatus", |
| | | searchValue: 4, |
| | | dicData: [{ |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '审核通过', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: '审核不通过', |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: '已提交审核', |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: '未提交审核', |
| | | value: 4, |
| | | } |
| | | ], |
| | | props: { |
| | | label: "label", |
| | | value: "value" |
| | | }, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "报名状态", |
| | | search: true, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | prop: "cancel", |
| | | searchValue: 1, |
| | | dicData: [{ |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '已报名', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: '已取消', |
| | | value: 2, |
| | | } |
| | | ], |
| | | props: { |
| | | label: "label", |
| | | value: "value" |
| | | }, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // label: "确认截止时间", |
| | | // prop: "remainingTime", |
| | |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :search.sync="search" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | v-model="form" |
| | |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.trainingRegistration_cancel" |
| | | :disabled="row.cancel==2" |
| | | >取消报名</el-button |
| | | > |
| | | <el-button |
| | |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | v-if="permission.trainingRegistration_print" |
| | | :disabled="row.candidateNo == ''" |
| | | :disabled="row.candidateNo == '' || row.cancel==2" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | |
| | | addExam, |
| | | } from "@/api/trainingRegistration/trainingRegistration"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | excelBox: false, |
| | | dialogExamFormVisible: false, |
| | | search:{}, |
| | | optionExamApply: { |
| | | height: "auto", |
| | | filterBtn: true, |
| | |
| | | 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: 12, |
| | | 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, |
| | | }, |
| | | { |
| | | label: "序号开始", |
| | | prop: "serialStart", |
| | | span: 6, |
| | | value:1, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入序号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "序号结束", |
| | | prop: "serialEnd", |
| | | span: 6, |
| | | value:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入序号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | | prop: "startTime", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | span: 12, |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd HH:mm", |
| | | valueFormat: "yyyy-MM-dd HH:mm", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择考试时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 12, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | labelWidth: "120", |
| | | menuWidth: 200, |
| | | align: "center", |
| | | selection: true, |
| | | selection: false, |
| | | column: column, |
| | | delBtn: false, |
| | | editBtn: false, |
| | |
| | | editBtn: this.vaildData(this.permission.notice_edit, false), |
| | | }; |
| | | }, |
| | | |
| | | }, |
| | | created(){ |
| | | this.search['cancel'] = 1; |
| | | this.search['auditStatus'] = 4; |
| | | }, |
| | | methods: { |
| | | //准考证查看 |
| | |
| | | }); |
| | | }, |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | this.page.pageSize = val; |
| | | this.getData(); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange(val) { |
| | | this.page1.currentPage = val; |
| | | this.page.currentPage = val; |
| | | this.getData(); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | var that = this; |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | // console.log(row); |
| | | |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | params = this.search; |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainingUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | |
| | | //生成考试 |
| | | submitExamApply(row, done, loading) { |
| | | var that = this; |
| | | var startTime = row.startTime + ":00"; |
| | | // var endTime = row.examTime[1]; |
| | | // var examTime = JSON.stringify(row.examTime); |
| | | // console.log(this.ids,111); |
| | | addExam(this.ids, null, startTime, null).then( |
| | | row.startTime = row.startTime + ":00"; |
| | | row.endTime = row.endTime + ":00"; |
| | | if(row.number!=((row.serialEnd-row.serialStart)+1)){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试人数与序号不匹配!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | |
| | | var s = new Date(row.startTime); |
| | | var e = new Date(row.endTime); |
| | | if(s>e){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | |
| | | addExam(Object.assign(row, this.search)).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.$refs.formExamApply.resetFields(); |
| | | that.dialogExamFormVisible = false; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | |
| | | closeDialog() { |
| | | this.$refs.formExamApply.resetFields(); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // this.Ourdata = data; |
| | | // this.getData(); |
| | | // this.onLoad(this.page); |
| | | // var dept_id = JSON.parse( |
| | | // window.localStorage.getItem("saber-userInfo") |
| | | // ).content.dept_id; |
| | | }, |
| | | }; |
| | | </script> |
| New file |
| | |
| | | <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, |
| | | search: true, |
| | | disabled:true, |
| | | prop: "username", |
| | | }, |
| | | { |
| | | label: "密码", |
| | | hide: true, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "password", |
| | | }, |
| | | { |
| | | label: "姓名", |
| | | display: false, |
| | | search: true, |
| | | searchSpan:4, |
| | | disabled:true, |
| | | prop: "sname", |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | disabled:true, |
| | | search: true, |
| | | display: false, |
| | | prop: "cardid", |
| | | }, |
| | | { |
| | | label: "部门", |
| | | editDisplay: false, |
| | | prop: "deptName", |
| | | }, |
| | | { |
| | | label: "角色", |
| | | prop: "parentId", |
| | | hide: true, |
| | | dicData: [], |
| | | type: "tree", |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | }, |
| | | { |
| | | 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: { |
| | | initData(){ |
| | | getRoleTree().then(res => { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |
| | | handleEdit (row, index) { |
| | | this.initData(); |
| | | 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> |