From 9ca36901bf15c4daf89baf7d9cd1fd487bce8a96 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期五, 28 一月 2022 11:17:12 +0800
Subject: [PATCH] 比对库同时修改bug
---
src/scripts/validate.ts | 3 -
src/pages/vindicate/views/updateSettings.vue | 2
src/pages/library/components/personList.vue | 103 ++++++++++++++++++++++-----------------------------
src/pages/settings/views/generalSettings.vue | 4 +
src/pages/shuohuangMonitorAnalyze/components/memberManage.vue | 7 ---
5 files changed, 48 insertions(+), 71 deletions(-)
diff --git a/src/pages/library/components/personList.vue b/src/pages/library/components/personList.vue
index e4a530d..64e0936 100644
--- a/src/pages/library/components/personList.vue
+++ b/src/pages/library/components/personList.vue
@@ -202,7 +202,7 @@
<span
class="iconfont iconbianjixinxi-09"
style="font-size: 24px; cursor: pointer"
- @click="handleClick(scope.row)"
+ @click="editRow(scope.row)"
></span>
</el-tooltip>
</fTemplate>
@@ -424,7 +424,7 @@
<el-drawer title="淇敼淇℃伅" :modal="false" :visible.sync="showInfoDrawer">
<el-form
ref="formForEdit"
- :model="form"
+ :model="inputPersonForm"
label-width="100px"
:rules="rules"
>
@@ -459,8 +459,8 @@
</div>
</div>
<img
- v-if="`httpImage/` + form.personPicUrl"
- :src="`/httpImage/` + form.personPicUrl"
+ v-if="`httpImage/` + inputPersonForm.personPicUrl"
+ :src="`/httpImage/` + inputPersonForm.personPicUrl"
style="
max-height: 100px;
width: 100px;
@@ -476,7 +476,7 @@
<el-form-item label="ID" style="width: 100%; margin-bottom: 20px">
<el-input
size="small"
- v-model="form.id"
+ v-model="inputPersonForm.id"
disabled
placeholder="璇疯緭鍏�"
></el-input>
@@ -492,7 +492,7 @@
>
<el-input
size="small"
- v-model="form.picDesc"
+ v-model="inputPersonForm.picDesc"
placeholder="璇疯緭鍏�"
></el-input>
</el-form-item>
@@ -503,7 +503,7 @@
<el-form-item label="濮撳悕" style="width: 100%; margin-bottom: 20px">
<el-input
size="small"
- v-model="form.personName"
+ v-model="inputPersonForm.personName"
placeholder="璇疯緭鍏�"
></el-input>
</el-form-item>
@@ -516,7 +516,7 @@
prop="sex"
style="width: 100%; margin-bottom: 20px; text-align: left"
>
- <el-radio-group v-model="form.sex" class="mt10">
+ <el-radio-group v-model="inputPersonForm.sex" class="mt10">
<el-radio label="鐢�"></el-radio>
<el-radio label="濂�"></el-radio>
</el-radio-group>
@@ -526,12 +526,13 @@
<el-row>
<el-col :span="20">
<el-form-item
- label="韬唤璇佸彿" prop="idCard"
+ label="韬唤璇佸彿"
+ prop="idCard"
style="width: 100%; margin-bottom: 20px"
>
<el-input
size="small"
- v-model="form.idCard"
+ v-model="inputPersonForm.idCard"
placeholder="璇疯緭鍏�"
></el-input>
</el-form-item>
@@ -541,11 +542,12 @@
<el-col :span="20">
<el-form-item
label="鎵嬫満鍙�"
+ prop="phoneNum"
style="width: 100%; margin-bottom: 20px"
>
<el-input
size="small"
- v-model="form.phoneNum"
+ v-model="inputPersonForm.phoneNum"
placeholder="璇疯緭鍏�"
></el-input>
</el-form-item>
@@ -560,7 +562,7 @@
>
<el-select
size="small"
- v-model="form.monitorLevel"
+ v-model="inputPersonForm.monitorLevel"
placeholder="璇烽�夋嫨"
style="width: 100%"
>
@@ -582,7 +584,7 @@
>
<el-input
size="small"
- v-model="form.fromServerId"
+ v-model="inputPersonForm.fromServerId"
disabled
></el-input>
</el-form-item>
@@ -596,7 +598,7 @@
>
<el-input
size="small"
- v-model="form.createTime"
+ v-model="inputPersonForm.createTime"
disabled
></el-input>
</el-form-item>
@@ -607,7 +609,7 @@
<el-form-item label="鍏朵粬" style="width: 100%; margin-bottom: 20px">
<el-input
size="small"
- v-model="form.reserved"
+ v-model="inputPersonForm.reserved"
placeholder="璇疯緭鍏�"
></el-input>
</el-form-item>
@@ -615,6 +617,7 @@
</el-row>
</el-form>
<div class="dialog-footer">
+ <!-- {{BaseManageData.personList[1].idCard}} -->
<el-button
size="small"
class="cancel-btn"
@@ -867,7 +870,7 @@
} from "@/api/baseLibrary";
import { getCameraFaceData } from "@/api/es";
// import { checkIDCard } from "@/api/utils";
-import { isIDCard } from "../../../scripts/validate";
+import { isIDCard, isPhone } from "../../../scripts/validate";
import axios from "axios";
import UploadBtn from "./upload";
@@ -898,7 +901,6 @@
return fmt;
};
-
export default {
data() {
return {
@@ -922,7 +924,6 @@
},
cameraDetailData: [],
cameraDetailVisible: false,
- dialogFormVisible: false,
copyVisiabled: false,
moveVisiabled: false,
buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
@@ -937,25 +938,14 @@
visible: false,
showInfoDrawer: false,
selectedRowKeys: [],
- form: {
- id: "",
- sex: "鐢�",
- personName: "鍛靛懙鍛�",
- tableId: "",
- picDesc: "",
- idCard: "12312938102143253",
- phoneNum: "18712766787",
- monitorLevel: "one",
- faceUrl: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg",
- enable: 0,
- reserved: "",
- },
+ inputPersonForm: {},
rules: {
picDesc: [
- { required: true, message: "璇疯緭鍏ョ収鐗囨爣璇�", trigger: "change" }
+ { required: true, message: "璇疯緭鍏ョ収鐗囨爣璇�", trigger: "change" },
],
sex: [{ required: true, message: "璇峰嬀閫夋�у埆", trigger: "change" }],
- idCard:[{ validator: isIDCard, trigger: 'blur' }],
+ idCard: [{ validator: isIDCard, trigger: "blur" }],
+ phoneNum: [{ validator: isPhone, trigger: "blur" }],
monitorLevel: [
{ required: true, message: "璇烽�夋嫨浜哄憳绛夌骇", trigger: "change" },
],
@@ -1154,10 +1144,10 @@
async getPersonList() {
this.$nextTick(() => {
if (this.baseObject.id && this.baseObject.id !== undefined) {
- this.BaseManageData.tableId = this.baseObject.id;
- this.setLoadSearch(this.BaseManageData.queryPersonList());
- }
- })
+ this.BaseManageData.tableId = this.baseObject.id;
+ this.setLoadSearch(this.BaseManageData.queryPersonList());
+ }
+ });
},
changeDialog(data) {
data.erFileList.map((item, index) => {
@@ -1182,41 +1172,36 @@
this.BaseManageData.size = val;
this.getPersonList();
},
- handleClick(row) {
- this.form = row;
+ editRow(row) {
+ debugger;
+ this.inputPersonForm = { ...row };
this.showInfoDrawer = true;
},
async submit() {
this.$refs["formForEdit"].validate(async (valid) => {
if (valid) {
- let { ...json } = this.form;
+ let { ...json } = this.inputPersonForm;
delete json["compareScore"];
let res = await updateBasePerson(json);
if (res.success) {
- this.$notify({
- type: "success",
- message: "浜哄憳淇敼鎴愬姛锛�",
- });
+ this.$notify.success("浜哄憳淇敼鎴愬姛锛�");
this.showInfoDrawer = false;
} else {
- this.$notify({
- type: "error",
- message: "浜哄憳淇敼澶辫触锛岃閲嶈瘯锛侊紒",
- });
+ this.$notify.error("浜哄憳淇敼澶辫触锛岃閲嶈瘯锛�");
}
} else {
return false;
}
});
},
- confirm() {
- this.$confirm({
- title: "Confirm",
- content: "Bla bla ...",
- okText: "纭",
- cancelText: "鍙栨秷",
- });
- },
+ // confirm() {
+ // this.$confirm({
+ // title: "Confirm",
+ // content: "Bla bla ...",
+ // okText: "纭",
+ // cancelText: "鍙栨秷",
+ // });
+ // },
async enable(item) {
let res = await updateBasePerson({
id: item.id,
@@ -1283,7 +1268,7 @@
async updateFace(param) {
const fd = new FormData();
fd.append("file", param.file);
- fd.append("id", this.form.id);
+ fd.append("id", this.inputPersonForm.id);
let res = await axios({
method: "post",
url: `/data/api-v/dbperson/updateFace`,
@@ -1295,8 +1280,8 @@
data: fd,
});
if (res.data.success) {
- this.form.persoasyncnPicUrl = res.data.data.personPicUrl;
- this.form.faceFeature = res.data.data.faceFeature;
+ this.inputPersonForm.persoasyncnPicUrl = res.data.data.personPicUrl;
+ this.inputPersonForm.faceFeature = res.data.data.faceFeature;
}
},
uploadSuccess() {},
diff --git a/src/pages/settings/views/generalSettings.vue b/src/pages/settings/views/generalSettings.vue
index 77107e7..c84b4c1 100644
--- a/src/pages/settings/views/generalSettings.vue
+++ b/src/pages/settings/views/generalSettings.vue
@@ -381,8 +381,10 @@
});
const url = this.curUser.backgroundpic;
this.activeIcons = this.curUser.useIconType-1
+ this.universalColor = this.colorList.findIndex((x) => {
+ return x.color == localStorage.getItem("--colorCard")
+ })
if (url) {
- // const arr = url.split("/");
this.activeBg = this.tableBGList.findIndex((x) => {
return x.url == url;
});
diff --git a/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue b/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue
index cf6d449..6435d24 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue
@@ -373,13 +373,6 @@
}
return callback(new Error("杈撳叆鐨勬墜鏈哄彿閿欒"));
}
- // if (value.trim()) {
- // var pattern = /^1[345789]\d{9}$/
- // if (pattern.test(value)) {
- // return callback()
- // }
- // return callback(new Error('杈撳叆鐨勬墜鏈哄彿閿欒'))
- // }
},
nodeContextMenu(e, data, node, comp) {
this.showMenu = true;
diff --git a/src/pages/vindicate/views/updateSettings.vue b/src/pages/vindicate/views/updateSettings.vue
index 4ec1f9b..dec75d5 100644
--- a/src/pages/vindicate/views/updateSettings.vue
+++ b/src/pages/vindicate/views/updateSettings.vue
@@ -374,7 +374,7 @@
value: item.val,
}).then((res) => {
if (res.code == 200) {
- this.$notify.success("鏇存柊鎴愬姛");
+ this.$notify.success("閰嶇疆鎴愬姛");
}
});
},
diff --git a/src/scripts/validate.ts b/src/scripts/validate.ts
index 402cda1..bd50caa 100644
--- a/src/scripts/validate.ts
+++ b/src/scripts/validate.ts
@@ -58,9 +58,6 @@
}
export function isIDCard(rule, idcode, callback) {
- // if (!value) {
- // return callback(new Error('杈撳叆涓嶅彲浠ヤ负绌�'));
- // }
var weight_factor = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];
var check_code = ['1', '0', 'X' , '9', '8', '7', '6', '5', '4', '3', '2'];
--
Gitblit v1.8.0