Commit a1241bcf by 叶富雄

只需第一条数据

parent 19f53e5a
...@@ -62,7 +62,6 @@ Vue.use(VueRouter); ...@@ -62,7 +62,6 @@ Vue.use(VueRouter);
const mainRouters = [ const mainRouters = [
...indexRoutes, ...indexRoutes,
rwddRoutes,
zdxxRoutes, zdxxRoutes,
sfRoutes, sfRoutes,
xxtkRoutes, xxtkRoutes,
......
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
pageBs="addsqfbzl"
ref="formCompontent"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import { insertZwbzjg,selectRyxxById, updateDnabzjg} from "@/api/dswtzxx.js";
export default {
name: "addryxx",
components: {
formCompontent,
},
data() {
return {
title: "指纹比中结果",
propFormField: [
{
title: "",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "比对目标_信息主键编号:",
id: "bdmbXxzjbh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "比对源_信息主键编号:",
id: "bdyXxzjbh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "比中时间:",
id: "bzsj",
type: "DateVal",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案事件编号:",
id: "asjbh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "现勘编号:",
id: "xkbh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案件名称:",
id: "ajmc",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案件类别:",
id: "ajlbdm",
type: "codeTree",
value: "",
placeholder: "请选择",
col: "2",
codeOptions: [],
codeTree: "CODE_AJLB",
},
{
name: "案件发生时间:",
id: "ajfssj",
type: "DateVal",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案件发生地点:",
id: "ajfsdd",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "比中单位_公安机关名称:",
id: "bzdwGajgmc",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "比中人_姓名:",
id: "bzrXm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "嫌疑人证件号码:",
id: "xyrZjhm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "嫌疑人姓名:",
id: "xyrXm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
],
},
],
formLabelAlign: {},
type: "",
xxzjbh: "",
result: "",
removeFileXxzjbh: [],
};
},
methods: {
submit(params) {
if(this.$route.query.rybh){
updateDnabzjg(params).then(res=>{
if (res.success && res.code == 200) {
this.$router.push("bzxxZw");
}
})
}
else {
insertZwbzjg(params).then(res=>{
if (res.success && res.code == 200) {
this.$router.push("bzxxZw");
}
})
}
},
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();
let params1 = new FormData();
params.append("rybh", this.rybh);
params1.append("asjxgrybh", this.rybh);
selectRyxxById(params).then((res) => {
var result = res.data.rows;
this.result = result;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
if (i.id == "R_ZMZP_File") {
if (res.data.fjlist && res.data.fjlist.length > 0) {
console.log(9999);
let arr = res.data.fjlist.map((i) => ({
name: i.dzwjmc,
url: i.dzwjwz,
xxzjbh: i.xxzjbh,
}));
this.$set(this.formLabelAlign, i.id, arr);
}
} else if (i.id == "zljsdwdm") {
this.$set(this.formLabelAlign, i.id, result[i.id].split(","));
} else {
this.$set(this.formLabelAlign, i.id, result[i.id]);
}
});
}
this.$forceUpdate();
});
self.$set(self.formLabelAlign, "editing", true);
self.$forceUpdate();
setTimeout(() => {
loading.close();
}, 500);
});
},
},
created() {
for(let j of this.propFormField[0].data){
if(j.type==="photo"){
this.fileBase64[j.type]
}
}
if (this.$route.query.type) {
this.type = this.$route.query.type;
}
if (this.$route.query.rybh) {
this.rybh = this.$route.query.rybh;
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