From 654915899e3f34e581ec288ff65b33dc39580275 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 15 Dec 2021 16:12:01 +0800
Subject: [PATCH] 保安员证修改,用户手册图片更换,保安员图片上传修改,培训报名修改
---
src/page/index/top/top-userSManual.vue | 2
src/views/securityGuard/securityGuard.vue | 83 ++++++++-----
public/securityInfo.html | 244 +++++++++++++++++++++-------------------
src/views/traincompany/index.vue | 2
4 files changed, 179 insertions(+), 152 deletions(-)
diff --git a/public/securityInfo.html b/public/securityInfo.html
index 9199529..a9b3ea8 100644
--- a/public/securityInfo.html
+++ b/public/securityInfo.html
@@ -3,102 +3,98 @@
<!-- 保安員信息 -->
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <style>
- .securityInfo {
- color: #000;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- /* background-color: rgba(42, 66, 110, 0.8); */
- background: #0ED2F7;
- /* fallback for old browsers */
- background: -webkit-linear-gradient(to left, #B2FEFA, #0ED2F7);
- /* Chrome 10-25, Safari 5.1-6 */
- background: linear-gradient(to left, #B2FEFA, #0ED2F7);
- /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
-
- width: 100%;
- height: 100%;
- }
-
- .top {
- width: 100%;
- height: 224px;
- /* background-color: aquamarine; */
-
- background: #0BB9C8;
- /* fallback for old browsers */
- background: -webkit-linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8);
- /* Chrome 10-25, Safari 5.1-6 */
- background: linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8);
- /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
-
-
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- }
-
- .avatar {
- width: 80px;
- height: 80px;
- border-radius: 50px;
- }
-
- .avatar img {
- width: 100%;
- height: 100%;
- border-radius: 50px;
- }
-
- .realName {
- margin-top: 15px;
- font-size: 16px;
- letter-spacing: 1px;
- color: #fff;
- }
-
- .content {
- margin: 5px 0;
- padding: 5px;
- width: 95%;
- background-color: rgba(65, 64, 66, 0.1);
- border-radius: 5px;
- display: flex;
- flex-direction: column;
- }
-
- .row-content {
- width: 100%;
- height: 60px;
- /* background-color: seashell; */
- display: flex;
- align-items: center;
- /* justify-content: center; */
- color: #fff;
- margin: 0 auto;
- border-bottom: 1px solid rgba(255, 255, 255, 0.5);
- }
-
- .title {
- margin-left: 6%;
- display: inline-block;
- width: 26%;
- min-width: 80px;
- }
- </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>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <style>
+ .securityInfo {
+ color: #000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ /* background-color: rgba(42, 66, 110, 0.8); */
+ background: #0ED2F7;
+ /* fallback for old browsers */
+ background: -webkit-linear-gradient(to left, #B2FEFA, #0ED2F7);
+ /* Chrome 10-25, Safari 5.1-6 */
+ background: linear-gradient(to left, #B2FEFA, #0ED2F7);
+ /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
+ width: 100%;
+ height: 100%;
+ }
+
+ .top {
+ width: 100%;
+ height: 224px;
+ /* background-color: aquamarine; */
+ background: #0BB9C8;
+ /* fallback for old browsers */
+ background: -webkit-linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8);
+ /* Chrome 10-25, Safari 5.1-6 */
+ background: linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8);
+ /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ }
+
+ .avatar {
+ width: 80px;
+ height: 80px;
+ border-radius: 50px;
+ }
+
+ .avatar img {
+ width: 100%;
+ height: 100%;
+ border-radius: 50px;
+ }
+
+ .realName {
+ margin-top: 15px;
+ font-size: 16px;
+ letter-spacing: 1px;
+ color: #fff;
+ }
+
+ .content {
+ margin: 5px 0;
+ padding: 5px;
+ width: 95%;
+ background-color: rgba(65, 64, 66, 0.1);
+ border-radius: 5px;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .row-content {
+ width: 100%;
+ height: 60px;
+ /* background-color: seashell; */
+ display: flex;
+ align-items: center;
+ /* justify-content: center; */
+ color: #fff;
+ margin: 0 auto;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ }
+
+ .title {
+ margin-left: 4%;
+ display: inline-block;
+ width: 29%;
+ min-width: 80px;
+ }
+ </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 class="securityInfo">
- <!-- <div class="top">
+ <div class="securityInfo">
+ <!-- <div class="top">
<div class="avatar">
<img src="./img/bazbj.png">
</div>
@@ -130,31 +126,31 @@
</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 decodeURI(r[2]);
- return null;
- };
- var securityNumber = getData("securityNumber");
- // var realName = getData("realName");
- // var age = getData("age");
- // var sex = getData("sex");
- // var deptName = getData("deptName");
- // var avatar = getData("avatar");
- // alert(securityNumber);
+ </div>
+ <script>
+ var getData = function(name) {
+ var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+ var r = window.location.search.substr(1).match(reg);
+ if (r != null) return decodeURI(r[2]);
+ return null;
+ };
+ var securityNumber = getData("securityNumber");
+ // var realName = getData("realName");
+ // var age = getData("age");
+ // var sex = getData("sex");
+ // var deptName = getData("deptName");
+ // var avatar = getData("avatar");
+ // alert(securityNumber);
- axios.get('http://223.82.109.183:2080/api/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function (res) {
- // axios.get('http://192.168.0.114:81/qrCode/getUserInfo?securityNumber=赣洪202100008').then(function(res) {
+ axios.get('http://223.82.109.183:2080/api/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function(res) {
+ // axios.get('http://192.168.0.114:81/qrCode/getUserInfo?securityNumber=赣洪202115423').then(function(res) {
- var data = res.data;
- console.log(data, 456);
+ var data = res.data;
+ // console.log(data, 456);
- var str = `<div class="top">
+ var str = `<div class="top">
<div class="avatar">
<img src="${data.avatar}">
</div>
@@ -197,14 +193,26 @@
<span class="title">保安证编号</span>
<span> ${data.securitynumber}</span>
</div>
+ <div class="row-content">
+ <span class="title">派遣单位名称</span>
+ <span> ${data.dispatchUnitName}</span>
+ </div>
+ <div class="row-content">
+ <span class="title">派遣开始时间</span>
+ <span> ${data.dispatchStartTime}</span>
+ </div>
+ <div class="row-content">
+ <span class="title">派遣结束时间</span>
+ <span> ${data.dispatchEndTime}</span>
+ </div>
</div>`
- var dom = $('.securityInfo');
- dom.empty();
- dom.append(str);
- });
- </script>
+ var dom = $('.securityInfo');
+ dom.empty();
+ dom.append(str);
+ });
+ </script>
</body>
-</html>
+</html>
\ No newline at end of file
diff --git a/src/page/index/top/top-userSManual.vue b/src/page/index/top/top-userSManual.vue
index 62eaa2d..5e1c97f 100644
--- a/src/page/index/top/top-userSManual.vue
+++ b/src/page/index/top/top-userSManual.vue
@@ -17,7 +17,7 @@
</el-dialog>
<span>
- <img class="imgstop" src="img/top/heard.png" alt="" style="width:20px ;height:20px">
+ <img class="imgstop" src="img/top/heard.png" alt="" style="width:20px ;height:20px" @click="open">
<!-- <i class="el-icon-mobile" @click="open" style="font-size: 20px"></i> -->
</span>
</div>
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 09e3501..73f5c27 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -41,6 +41,7 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
+ :upload-before="uploadBefore"
:defaults.sync="defaults"
:before-close="beforeClose"
>
@@ -428,31 +429,26 @@
remove,
update,
updatePlatform,
- add,
securitySave,
grant,
resetPassword,
getUserPractitionersInfo,
updatePaperTime,
- saveOrUpdateUserPractitionersInfo,
getzhiwen, //指纹
} from "@/api/system/user";
import { securityApply } from "@/api/accreditationRecords/accreditationRecords";
import { getList } from "@/api/securityGuard/securityGuard";
import { getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree, getRoleDetail } from "@/api/system/role";
-import { getPostList } from "@/api/system/post";
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
import { securityFormPageColumn } from "./data";
import { mapState } from "vuex";
import Qs from "qs";
-
+import { MessageBox } from 'element-ui';
//加载指纹类
import Client from "./Client";
-import doneVue from "../work/done.vue";
-// import func from "vue-editor-bridge";
export default {
data() {
@@ -1374,31 +1370,31 @@
var roleName = this.userInfo.role_name;
// console.log(this.userInfo,52252);
// this.userInfo.rname.forEach((roleName) => {
- if (
- roleName == "保安公司管理员" ||
- roleName == "保安" ||
- roleName == "分公司管理员"
- ) {
- //查询保安单位信息(包含子级)
- const column = this.findObject(this.option.column, "deptId");
- // column.search = false;
- //默认全部展开
- column.defaultExpandAll = true;
- column.dicUrl =
- "/api/blade-system/dept/security_lazy-tree?deptId=" +
- this.userInfo.dept_id;
- } else if (roleName == "公安管理员" || roleName == "administrator") {
- var columnDept = that.findObject(that.option.column, "deptId");
- columnDept.dicUrl =
- "/api/blade-system/dept/security_lazy-tree?jurisdiction=" +
- that.userInfo.jurisdiction;
- } else {
- //查询保安单位信息(包含子级)
- const column = this.findObject(this.option.column, "deptId");
- // column.search = false;
- //默认全部展开
- column.dicUrl = "/api/blade-system/dept/security_lazy-tree";
- }
+ if (
+ roleName == "保安公司管理员" ||
+ roleName == "保安" ||
+ roleName == "分公司管理员"
+ ) {
+ //查询保安单位信息(包含子级)
+ const column = this.findObject(this.option.column, "deptId");
+ // column.search = false;
+ //默认全部展开
+ column.defaultExpandAll = true;
+ column.dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?deptId=" +
+ this.userInfo.dept_id;
+ } else if (roleName == "公安管理员" || roleName == "administrator") {
+ var columnDept = that.findObject(that.option.column, "deptId");
+ columnDept.dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?jurisdiction=" +
+ that.userInfo.jurisdiction;
+ } else {
+ //查询保安单位信息(包含子级)
+ const column = this.findObject(this.option.column, "deptId");
+ // column.search = false;
+ //默认全部展开
+ column.dicUrl = "/api/blade-system/dept/security_lazy-tree";
+ }
// });
if (
@@ -2390,8 +2386,8 @@
this.onLoad(this.page, this.query);
},
//排序
- sortChange(value){
- console.log(value,51151515);
+ sortChange(value) {
+ console.log(value, 51151515);
},
onLoad(page, params = {}) {
params = this.search;
@@ -2563,6 +2559,27 @@
this.selectionClear();
});
},
+ //照片上传拦截
+ uploadBefore(file, done, loading, column) {
+ //如果你想修改file文件,由于上传的file是只读文件,必须复制新的file才可以修改名字,完后赋值到done函数里,如果不修改的话直接写done()即可
+ if (file.type.indexOf("image/") == -1) {
+ MessageBox.alert("上传图片格式错误,请上传图片类型,如:JPG,PNG后缀的文件。")
+ loading();
+ return false;
+ }
+ let data = window.URL.createObjectURL(new Blob([file]));
+ this.filename = file;
+ this.option.img = data;
+ //判断文件大小
+ const isLt1M = file.size >= 30*1024 && file.size <= 500*1024;
+ if (!isLt1M) {
+ MessageBox.alert("上传图片大小必须大于30KB,且小于500KB!")
+ loading();
+ return false;
+ }
+ done();
+ return isLt1M;
+ },
},
};
</script>
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index 6ac501e..2998845 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -334,6 +334,8 @@
},
(error) => {
window.console.log(error);
+ this.$refs.formTrainApply.resetFields();
+ this.dialogDisable = false;
}
);
},
--
Gitblit v1.9.3