Commit 7d967fa4 by 叶富雄

人像模块

parent a9279d0e
......@@ -20,3 +20,11 @@ export const saveRxbzrw = params =>
postform(`${base.alyIP}/Rxbzrw/saveRxbzrw`, params);
export const selectJglist = params =>
post(`${base.alyIP}/Rxbzrw/selectJglist`, params);
export const deleteRxbz = params =>
post(`${base.alyIP}/rxbz/deleteRxbz`, params);
export const insertRxbz = params =>
postform(`${base.alyIP}/rxbz/insertRxbz`, params);
export const queryByXxzjbh = params =>
postform(`${base.alyIP}/rxbz/queryByXxzjbh`, params);
export const updateRxbz = params =>
postform(`${base.alyIP}/rxbz/updateRxbz`, params);
......@@ -112,6 +112,14 @@ const menuLayouts = [
},
component: () => import("@/views/dswtzxx/dnaxx/adddna.vue")
},
{
path: "/bdjgAddRx",
name: "bdjgAddRx",
meta: {
title: '新增人像比对信息'
},
component: () => import("@/views/dswtzxx/bdjg/addRx.vue")
},
];
export default {
......
<template>
<div >
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
@removePhoto="removePhoto"
pageBs="addsqfbzl"
ref="formCompontent"
:base64Transform="true"
:fileBase64="fileBase64"
@onBase64Transform="onBase64Transform"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import { queryByXxzjbh,insertRxbz,updateRxbz } from "@/api/dswtz/bzxx";
export default {
name: "addryxx",
props:{
info:{}
},
components: {
formCompontent,
},
data() {
return {
loading: true,
fileBase64:{},
title: "添加人像比中",
propFormField: [
{
title: "",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "比中人员姓名:",
id: "bzrXm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "比中人员证件号码:",
id: "bzrGmsfhm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "与源图片的相似度:",
id: "similarity",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案事件编号:",
id: "asjbh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "嫌疑人姓名:",
id: "xyrXm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "嫌疑人证件号码:",
id: "xyrZjhm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "人员编号:",
id: "rybh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "比中时间:",
id: "bzsjStr",
type: "datas",
value: "",
placeholder: "请输入",
col: "2",
},
],
},
],
formLabelAlign: {
file:''
},
type: "",
xxzjbh: "",
result: "",
removeFileXxzjbh: [],
};
},
methods: {
onBase64Transform(p){
this.fileBase64 = p
},
removePhoto(item) {
let loading = this.$loading({
lock: true,
text: "正在删除...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
let id= item.id
this.$set(this.formLabelAlign, id, '');
loading.close();
},
submit(params) {
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
if(this.$route.query.glxxzjbh){
params.append('glxxzjbh',this.$route.query.glxxzjbh)
insertRxbz(params).then(res=>{
if(res.code){
loading.close()
this.$router.push({
path:'/bzxxRx'
})
}
})
}
else {
params.append('xxzjbh',this.$route.query.xxzjbh)
updateRxbz(params).then(res=>{
if(res.code){
loading.close()
this.$router.push({
path:'/bzxxRx'
})
}
})
}
},
handleRemove(val) {
this.removeFileXxzjbh.push(val.xxzjbh);
},
getshuju() {
let loading = this.$loading({
lock: true,
text: "正在加载...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
var self = this;
let params = new FormData();
params.append("xxzjbh", this.xxzjbh);
queryByXxzjbh(params).then((res) => {
var result = res.data.rxbz;
this.result = result;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
this.$set(this.formLabelAlign, i.id, result[i.id]);
});
}
this.$forceUpdate();
});
loading.close();
});
},
},
created() {
if (this.$route.query.xxzjbh) {
this.title = "添加人像比中";
this.xxzjbh = this.$route.query.xxzjbh;
this.getshuju();
}
},
};
</script>
<style scoped lang="scss">
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment