From 12bc59425ac3859f24957e647be04ad0db0daac9 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 01 Dec 2023 16:54:38 +0800
Subject: [PATCH] 保安员详情信息新增,修改,查询修改
---
src/views/securityGuard/securityGuard.vue | 292 +++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 177 insertions(+), 115 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 96c421b..ee3c5a3 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -1042,14 +1042,11 @@
label: "企业名称",
prop: "deptId",
type: "tree",
- // dicUrl:
- // "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
props: {
label: "title",
value: "id"
},
- // disabled: true,
+ labelWidth: 120,
rules: [
{
required: true,
@@ -1062,6 +1059,7 @@
label: "姓名",
prop: "realName",
disabled: false,
+ labelWidth: 120,
rules: [
{
required: true,
@@ -1075,41 +1073,6 @@
}
]
}
- // {
- // label: "登录账号",
- // prop: "account",
- // editDisabled: true,
- // rules: [
- // {
- // required: true,
- // message: "请输入登录账号",
- // trigger: "blur",
- // },
- // ],
- // // disabled: true,
- // },
- // {
- // label: "密码",
- // prop: "password",
- // type: "password",
- // hide: true,
- // editDisplay: false,
- // viewDisplay: false,
- // rules: [
- // { required: true, validator: validatePass, trigger: "blur" },
- // ],
- // },
- // {
- // label: "确认密码",
- // prop: "password2",
- // type: "password",
- // hide: true,
- // editDisplay: false,
- // viewDisplay: false,
- // rules: [
- // { required: true, validator: validatePass2, trigger: "blur" },
- // ],
- // },
]
},
{
@@ -1123,6 +1086,7 @@
prop: "cardid",
hide: true,
overHidden: true,
+ labelWidth: 120,
rules: [
{
required: true,
@@ -1140,6 +1104,7 @@
label: "手机号码",
prop: "phone",
overHidden: true,
+ labelWidth: 120,
rules: [
{
required: true,
@@ -1153,14 +1118,11 @@
}
]
},
- // {
- // label: "昵称",
- // prop: "name",
- // },
{
label: "个人照片",
type: "upload",
listType: "picture-img",
+ labelWidth: 120,
propsHttp: {
res: "data",
url: "url"
@@ -1194,24 +1156,6 @@
// row: true,
prop: "fingerprint"
},
- // {
- // label: "指纹信息",
- // type: "upload",
- // listType: "picture-img",
- // propsHttp: {
- // res: "data",
- // url: "url",
- // },
- // canvasOption: {
- // text: " ",
- // ratio: 0.1,
- // },
- // action: "/api/blade-resource/oss/endpoint/put-files",
- // tip: "只能上传jpg/png指纹信息,且不超过500kb",
- // span: 12,
- // // row: true,
- // prop: "fingerprint",
- // },
{
label: "是否持证",
prop: "hold",
@@ -1251,24 +1195,6 @@
}
]
},
- // {
- // label: "保安证书照片",
- // prop: "email",
- // type: "upload",
- // listType: "picture-img",
- // display: true,
- // propsHttp: {
- // res: "data",
- // url: "url"
- // },
- // canvasOption: {
- // text: " ",
- // ratio: 1.0
- // },
- // action: "/api/blade-resource/oss/endpoint/put-files",
- // tip: "上传jpg,png格式图片,大小不超过2M",
- // span: 12
- // },
{
label: "民族",
prop: "nation"
@@ -1290,14 +1216,6 @@
label: "政治面貌",
prop: "politicaloutlook"
},
- // {
- // label: "健康状态",
- // prop: "healstats"
- // },
- // {
- // label: "身高",
- // prop: "height"
- // },
{
label: "联系地址",
prop: "address"
@@ -1358,10 +1276,6 @@
label: "女",
value: 2
}
- // {
- // label: "未知",
- // value: 3,
- // },
],
rules: [
{
@@ -1370,14 +1284,100 @@
trigger: "blur"
}
]
- }
- // {
- // label: "生日",
- // type: "date",
- // prop: "birthday",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd",
- // },
+ },
+ {
+ label: "婚姻状态",
+ prop: "marriageStatus",
+ type: "select",
+ dicUrl:
+ "/api/blade-system/dict-biz/dictionary?code=marriageStatusType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ hide:true,
+ },
+ {
+ label: "报考等级",
+ prop: "signLevel",
+ type: "select",
+ dicUrl:
+ "/api/blade-system/dict-biz/dictionary?code=signLevelType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ hide:true,
+ },
+ {
+ label: "户籍地址",
+ prop: "permanentResidenceAddress",
+ hide:true,
+ },
+ {
+ label: "居住地址",
+ prop: "dwellAddress",
+ hide:true,
+ },
+ {
+ label: "家庭主要成员及联系方式",
+ prop: "memberOfFamily",
+ type: "textarea",
+ span:24,
+ hide:true,
+ },
+ {
+ label: "教育经历",
+ prop: "educationExperience",
+ type: "textarea",
+ span:24,
+ hide:true,
+ },
+ {
+ label: "工作经历",
+ prop: "workExperience",
+ type: "textarea",
+ span:24,
+ hide:true,
+ },
+ {
+ label: "健康状况图片(健康证)",
+ prop: "healthCertificateUrl",
+ type: "upload",
+ listType: "picture-img",
+ propsHttp: {
+ res: "data",
+ url: "url"
+ },
+ canvasOption: {
+ text: " ",
+ ratio: 1.0
+ },
+ action: "/api/blade-resource/oss/endpoint/put-files",
+ span: 12,
+ hide:true,
+ labelWidth: 120,
+ },
+ {
+ label: "无犯罪记录图片",
+ prop: "noCriminalRecordProveUrl",
+ type: "upload",
+ listType: "picture-img",
+ propsHttp: {
+ res: "data",
+ url: "url"
+ },
+ canvasOption: {
+ text: " ",
+ ratio: 1.0
+ },
+ action: "/api/blade-resource/oss/endpoint/put-files",
+ span: 12,
+ hide:true,
+ labelWidth: 120,
+ },
]
}
]
@@ -2283,16 +2283,8 @@
});
},
rowSave(row, done, loading) {
- // var dom = document.getElementById("zhiwenOur");
- // window.frames["iframe的name值"].document.getElementById("iframe中控件的ID").click();
var winzhiwen = document.getElementById("zhiwen").contentWindow;
let zhiwen = winzhiwen.outZhiwenData();
- // console.log(zhiwen);
- // for (let k in zhiwen) {
- // console.log(k);
- // console.log(zhiwen[k]);
- // }
- // return;
if (row.deptId) {
row.deptId = row.deptId;
}
@@ -2336,7 +2328,19 @@
rtime: row.rtime,
securitynumber: row.securitynumber,
sex: row.sex,
- guncode: row.guncode
+ guncode: row.guncode,
+ unitName: row.unitName
+ },
+ userDetail:{
+ marriageStatus:row.marriageStatus,
+ signLevel:row.signLevel,
+ permanentResidenceAddress:row.permanentResidenceAddress,
+ dwellAddress:row.dwellAddress,
+ memberOfFamily:row.memberOfFamily,
+ educationExperience:row.educationExperience,
+ workExperience:row.workExperience,
+ healthCertificateUrl:row.healthCertificateUrl,
+ noCriminalRecordProveUrl:row.noCriminalRecordProveUrl
}
};
@@ -2385,10 +2389,8 @@
rowUpdate(row, index, done, loading) {
row.deptId = row.deptId;
row.roleId = row.roleId.join(",");
- row.postId = row.postId.join(",");
+ // row.postId = row.postId.join(",");
//值替换,education 放在页面会卡死
- row.education = row.education1;
-
var winzhiwen = document.getElementById("zhiwen").contentWindow;
let zhiwen = winzhiwen.outZhiwenData();
// console.log(zhiwen);
@@ -2401,7 +2403,55 @@
if (row.cell != "2") {
row["cell"] = this.nowCell;
}
- update(row).then(
+ const userMap = {
+ user: {
+ id:row.id,
+ //是否是身份证自动识别进入
+ cell: row.cell,
+ //指纹↓
+ fingerprint: row.fingerprint, //图
+ myPicture: row.myPicture, //特征
+ //指纹↑
+ account: row.account,
+ avatar: row.avatar,
+ healstats: row.healstats,
+ address: row.address,
+ birthday: row.birthday,
+ cardid: row.cardid,
+ deptId: row.deptId,
+ education: row.education1,
+ email: row.email,
+ height: row.height,
+ hold: row.hold,
+ jurisdiction: row.jurisdiction,
+ name: row.name,
+ nation: row.nation,
+ nativeplace: row.nativeplace,
+ phone: row.phone,
+ politicaloutlook: row.politicaloutlook,
+ realName: row.realName,
+ registered: row.registered,
+ rtime: row.rtime,
+ securitynumber: row.securitynumber,
+ sex: row.sex,
+ guncode: row.guncode,
+ unitName: row.unitName
+ },
+ userDetail:{
+ id:row.userDetailId,
+ userId:row.id,
+ marriageStatus:row.marriageStatus,
+ signLevel:row.signLevel,
+ permanentResidenceAddress:row.permanentResidenceAddress,
+ dwellAddress:row.dwellAddress,
+ memberOfFamily:row.memberOfFamily,
+ educationExperience:row.educationExperience,
+ workExperience:row.workExperience,
+ healthCertificateUrl:row.healthCertificateUrl,
+ noCriminalRecordProveUrl:row.noCriminalRecordProveUrl
+ }
+ };
+ update(userMap).then(
res => {
this.initFlag = false;
this.onLoad(this.page);
@@ -2789,6 +2839,18 @@
...this.form,
...d
};
+ if (this.form.userDetail) {
+ this.form.userDetailId = this.form.userDetail.id;
+ this.form.marriageStatus = this.form.userDetail.marriageStatus;
+ this.form.signLevel = this.form.userDetail.signLevel;
+ this.form.permanentResidenceAddress = this.form.userDetail.permanentResidenceAddress;
+ this.form.dwellAddress = this.form.userDetail.dwellAddress;
+ this.form.memberOfFamily = this.form.userDetail.memberOfFamily;
+ this.form.educationExperience = this.form.userDetail.educationExperience;
+ this.form.workExperience = this.form.userDetail.workExperience;
+ this.form.healthCertificateUrl = this.form.userDetail.healthCertificateUrl;
+ this.form.noCriminalRecordProveUrl = this.form.userDetail.noCriminalRecordProveUrl;
+ }
// this.from["education1"] = res.data.data.education;
if (this.form.hasOwnProperty("deptId")) {
this.form.deptId = this.form.deptId;
@@ -2796,9 +2858,9 @@
if (this.form.hasOwnProperty("roleId")) {
this.form.roleId = this.form.roleId.split(",");
}
- if (this.form.hasOwnProperty("postId")) {
- this.form.postId = this.form.postId.split(",");
- }
+ // if (this.form.hasOwnProperty("postId")) {
+ // this.form.postId = this.form.postId.split(",");
+ // }
var userInfo = res.data.data;
//获取用户从业信息
getUserPractitionersInfo(userInfo.id).then(res1 => {
--
Gitblit v1.9.3