From 35561f8d95a610d0be66c784e8781730f00512d0 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 07 Mar 2022 17:24:05 +0800
Subject: [PATCH] axios 拦截修改,保安员新增,修改响应修改
---
src/views/securityGuard/securityGuard.vue | 72 ++++++++++++++++++++++++++----------
1 files changed, 52 insertions(+), 20 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 404b043..fef5bb3 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -1542,7 +1542,7 @@
"securitynumber"
);
// var emailcolumn = this.findObject(this.option.group, "email");
- console.log(val,1234);
+ console.log(val, 1234);
if (val == 1) {
securitynumbercolumn.display = true;
securitynumbercolumn.rules = [
@@ -2204,14 +2204,14 @@
this.formSecurityCheckApply = {
id: null,
realName: row.realName,
- userId:row.id
+ userId: row.id,
};
this.securityCheckApplyvisible = true;
},
//证件核实申请提交
submitSecurityCheckApply(row, done, loading) {
var that = this;
- row['createUser'] = this.userInfo.Id;
+ row["createUser"] = this.userInfo.Id;
add(row).then(() => {
that.$refs.formSecurityCheckApply.resetFields();
this.$message({
@@ -2336,19 +2336,36 @@
};
securitySave(userMap).then(
- () => {
+ (res) => {
+ // console.log(res.data,111111111111111111);
this.initFlag = false;
- this.$alert("账号为身份证号码,密码为身份证后六位", "温馨提示", {
- confirmButtonText: "确定",
- callback: (action) => {
- this.$message({
- type: "success",
- message: `操作成功`,
- });
- this.onLoad(this.page);
- done();
- },
- });
+ if (res.data.code == 200) {
+ this.$alert("账号为身份证号码,密码为身份证后六位", "温馨提示", {
+ confirmButtonText: "确定",
+ callback: (action) => {
+ this.$message({
+ type: "success",
+ message: `操作成功`,
+ });
+ this.onLoad(this.page);
+ done();
+ },
+ });
+ }
+ //保安员证编号不匹配的情况
+ if (res.data.code == 201) {
+ this.$alert("用户新增成功!账号为身份证号码,密码为身份证后六位!注:当前保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!", "温馨提示", {
+ confirmButtonText: "确定",
+ callback: (action) => {
+ this.$message({
+ type: "success",
+ message: `操作成功`,
+ });
+ this.onLoad(this.page);
+ done();
+ },
+ });
+ }
},
(error) => {
window.console.log(error);
@@ -2376,13 +2393,28 @@
row["cell"] = this.nowCell;
}
update(row).then(
- () => {
+ (res) => {
this.initFlag = false;
this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
+ if (res.data.code == 200) {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ }
+ if (res.data.code == 201) {
+ this.$alert("修改成功!注:当前保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!", "温馨提示", {
+ confirmButtonText: "确定",
+ callback: (action) => {
+ this.$message({
+ type: "success",
+ message: `操作成功`,
+ });
+ this.onLoad(this.page);
+ done();
+ },
+ });
+ }
done();
},
(error) => {
--
Gitblit v1.9.3