From 22f874069a88f7c203e77c36de135d85e7535b37 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 03 Sep 2021 14:57:48 +0800
Subject: [PATCH] 培训考试准考证打印修改,培训报名修改
---
src/views/trainingRegistration/data.js | 44 ++++--
src/views/traincompany/index.vue | 93 +++++-------
public/papersTrain.html | 222 +++++++++++++++++++++++++++++++
src/views/trainApply/index.vue | 5
src/views/applyexam/papers.vue | 13 +
src/views/trainingRegistration/index.vue | 2
6 files changed, 302 insertions(+), 77 deletions(-)
diff --git a/public/papersTrain.html b/public/papersTrain.html
new file mode 100644
index 0000000..7b2095c
--- /dev/null
+++ b/public/papersTrain.html
@@ -0,0 +1,222 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <style>
+ #table {
+ color: #000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ }
+ /* .print-header {
+ width: 100%;
+ text-align: center;
+ } */
+
+ .print {
+ position: relative;
+ left: 47%;
+ margin-top: 30px;
+ width: 7%;
+ height: 30px;
+ border: 0px;
+ border-radius: 6px;
+ color: #fff;
+ background-color: #1D5CE4;
+ letter-spacing: 4px;
+ }
+
+ .user-info-table {
+ margin-top: 30px;
+ width: 90%;
+ height: 60%;
+ border: 1px solid #000;
+ background-color: #fff;
+ }
+
+ .user-info-tr {
+ height: 50px;
+ }
+
+ .avatar {
+ width: 140px;
+ height: 190px;
+ }
+
+ .title {
+ margin-top: 20px;
+ }
+
+ .avatar {
+ width: 140px;
+ height: 190px;
+ }
+
+ .my-picture {
+ width: 150px;
+ /* height: 200px; */
+ }
+ </style>
+ <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+ <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
+</head>
+
+
+<body>
+ <div>
+
+ <!--startprint-->
+ <div id="table">
+ <!-- <span class="title">准考证信息</span>
+ <table class="user-info-table" border="1px" align="center" cellspacing="0" cellpadding="10">
+ <tr class="user-info-tr">
+ <td width="150px">姓名</td>
+ <td width="150px"></td>
+ <td width="150px">身份证号</td>
+ <td width="150px"></td>
+ <td rowspan="4" align="center" width="150px" v-if="data.avatar == ''">
+ 照片
+ </td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>准考证号</td>
+ <td></td>
+ <td width="150px">性别</td>
+ <td width="150px" v-if="data.sex == 1">男</td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>考点名称</td>
+ <td colspan="3"></td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>考点地址</td>
+ <td colspan="3"></td>
+ </tr>
+
+ <tr class="user-info-tr" style="height:5px">
+ <td colspan="5"></td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>考试名称</td>
+ <td>考试类型</td>
+ <td>考试时间</td>
+ <td>考场号</td>
+ <td>座位号</td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>{{data.examName}}</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+
+ </table>-->
+ </div>
+ <!--endprint-->
+
+
+ <div class="print-header">
+ <button onclick="preview(1)" class="print">打印</button>
+ </div>
+ </div>
+ <script>
+ var getData = function(name) {
+ var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+ var r = window.location.search.substr(1).match(reg);
+ if (r != null) return unescape(r[2]);
+ return null;
+ };
+ var id = JSON.parse(getData("data")).id;
+ var examType = JSON.parse(getData("data")).examType;
+ // console.log(JSON.parse(getData("data")), 111);
+
+ axios.get('http://223.82.109.183:2080/api/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
+ // axios.get('http://localhost:81/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
+ var data = res.data.data;
+ var str = `<span class="title">${data.examName}</span>
+ <span class="title">准考证信息</span>
+ <table class="user-info-table" border="1px" align="center" cellspacing="0" cellpadding="10">
+ <tr class="user-info-tr">
+ <td width="150px">姓名</td>
+ <td width="150px">${data.realName}</td>
+ <td width="150px">身份证号</td>
+ <td width="150px">${data.idCardNo}</td>
+ <td rowspan="4" align="center" width="150px"">
+ <img class="my-picture" src="${data.myPicture}" />
+ </td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>准考证号</td>
+ <td>${data.candidateNo}</td>
+ <td width="150px">性别</td>
+ <td width="150px">${data.sex==1?"男":(data.sex==2?"女":"")}</td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>考点名称</td>
+ <td colspan="3">${data.company}</td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td>考点地址</td>
+ <td colspan="3">${data.address}</td>
+ </tr>
+
+ <tr class="user-info-tr" style="height:5px">
+ <td colspan="5"></td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td colspan="2">考试名称</td>
+ <td width="120px">考试类型</td>
+ <td width="180px" colspan="2">考试时间</td>
+ </tr>
+
+ <tr class="user-info-tr">
+ <td colspan="2">${data.examName}</td>
+ <td width="120px">培训考试</td>
+ <td width="180px" colspan="2">${data.stringTime}</td>
+ </tr>
+
+ </table>`
+
+ var dom = $('#table');
+ dom.empty();
+ dom.append(str);
+ })
+
+ function preview(oper) {
+ if (oper < 10) {
+ bdhtml = window.document.body.innerHTML;
+ // 打印开始的标志
+ sprnstr = "<!--startprint-->";
+ // 打印结束的标志
+ eprnstr = "<!--endprint-->";
+ // 从打印开始的位置截取到末尾
+ prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
+ // 从开始截取到打印结束的位置
+ prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
+ // 替换html
+ window.document.body.innerHTML = prnhtml;
+ // 打印
+ window.print();
+ window.document.body.innerHTML = bdhtml;
+ } else {
+ window.print();
+ }
+ }
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/views/applyexam/papers.vue b/src/views/applyexam/papers.vue
index 7c54248..b87c038 100644
--- a/src/views/applyexam/papers.vue
+++ b/src/views/applyexam/papers.vue
@@ -8,13 +8,18 @@
export default {
data() {
return {
- url: "/papers.html",
+ url: "/papers.html"
};
},
created(){
- var d = this.$route.query;
- this.url += "?data=" + JSON.stringify(d);
- // console.log(d);
+ var data = this.$route.query;
+
+ if(data.examType==1){
+ this.url += "?data=" + JSON.stringify(data);
+ }
+ if(data.examType==2){
+ this.url = "/papersTrain.html?data=" + JSON.stringify(data);
+ }
},
mounted() {
var flag = false,
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 231f28f..44b500b 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -494,11 +494,6 @@
this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id
}
-
-
-
-
-
},
mounted() {
var flag = false,
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index c1846be..ae0f2a9 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -116,7 +116,7 @@
display: false,
},
{
- label: "法定代表人",
+ label: "校长",
prop: "representative",
display: false,
search: true,
@@ -125,37 +125,18 @@
width: 120,
},
{
- label: "注册时间",
- prop: "establishtime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- mock: {
- type: "datetime",
- format: "yyyy-MM-dd",
- },
- display: false,
- width: 180,
+ label: "负责人",
+ prop: "contacts",
+ display: false
},
{
- label: "注册资金",
- prop: "registeredcapital",
+ label: "联系方式",
+ prop: "contactscell",
display: false,
width: 130,
},
{
- label: "实缴资金",
- prop: "capital",
- display: false,
- width: 130,
- },
- {
- label: "公司类型",
- prop: "enterprises",
- display: false,
- },
- {
- label: "注册地址",
+ label: "联系地址",
prop: "address",
display: false,
width: 280,
@@ -318,34 +299,40 @@
},
//未持证保安人员报名
handleTrainApply(row,done,loading){
- row['userId'] = this.userInfo.user_id;
- row['trainingUnitId'] = row.departmentid;
- adddata(row).then(
- (res) => {
- // this.onLoad(this.page);
- if(res.data.data==201){
- this.$message({
- type: "warning",
- message:"已报名,不能重复报名",
- });
- }else if(res.data.data==201){
- this.$message({
- type: "warning",
- message:"报名失败",
- });
- }else{
- this.$message({
- type: "success",
- message:"报名成功",
- });
+ this.$confirm("是否确定报名?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row['userId'] = this.userInfo.user_id;
+ row['trainingUnitId'] = row.departmentid;
+ adddata(row).then(
+ (res) => {
+ // this.onLoad(this.page);
+ if(res.data.data==201){
+ this.$message({
+ type: "warning",
+ message:"已报名,不能重复报名",
+ });
+ }else if(res.data.data==201){
+ this.$message({
+ type: "warning",
+ message:"报名失败",
+ });
+ }else{
+ this.$message({
+ type: "success",
+ message:"报名成功",
+ });
+ }
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
}
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
+ );
+ })
},
//关闭窗口清除数据
closeDialog(){
diff --git a/src/views/trainingRegistration/data.js b/src/views/trainingRegistration/data.js
index f08ae3d..3178237 100644
--- a/src/views/trainingRegistration/data.js
+++ b/src/views/trainingRegistration/data.js
@@ -135,20 +135,36 @@
label: "考试证件",
prop: "applyCard"
},
- // {
- // label: "报名状态",
- // prop: "cancel",
- // // search: true,
- // dicData: DIC1,
- // props: {
- // label: "label",
- // value: "value"
- // },
- // editDisplay: false,
- // addDisplay: false,
- // searchSpan: 4,
- // width: 100,
- // },
+ {
+ label: "审核状态",
+ prop: "auditStatus",
+ // search: true,
+ dicData: [{
+ label: '审核通过',
+ value: 1,
+ },
+ {
+ label: '审核不通过',
+ value: 2,
+ },
+ {
+ label: '审核中',
+ value: 3,
+ },
+ {
+ label: '待审核',
+ value: 4,
+ }
+ ],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ editDisplay: false,
+ addDisplay: false,
+ searchSpan: 4,
+ width: 100,
+ },
// {
// label: "确认截止时间",
// prop: "remainingTime",
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index 99fba9f..9775b39 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -445,7 +445,7 @@
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
- params['cancel'] = 111;
+ // params['cancel'] = 111;
this.loading = true;
getdata(
page.currentPage,
--
Gitblit v1.9.3