Commit 9b0978d9 by liyuhang19990520

Merge branch 'dev_xzeq' of http://47.92.108.28/changchao/founder_vue into dev_xzeq

parents c6a7a347 84642ed4
......@@ -38,23 +38,23 @@ export default {
},
{
label: "性别:",
prop: "xbdm",
prop: "xbdmText",
col: "3",
},{
label: "身份证号:",
prop: "Zjhm",
prop: "zjhm",
col: "3",
},{
label: "民族:",
prop: "mzdm",
prop: "mzdmText",
col: "3",
},{
label: "户籍地区划:",
prop: "xzqhdm",
prop: "xzqhdmText",
col: "3",
},{
label: "案件类别:",
prop: "ajlbCode",
prop: "ajlbCodeText",
col: "3",
},{
label: "人员标签:",
......
......@@ -218,7 +218,6 @@ export default {
params.append("id", this.id);
console.log(params);
infoAddZdry(params).then((res) => {
console.log(res);
var result = res.data.data;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
......@@ -231,7 +230,7 @@ export default {
axios
.get(`JsonData/${i.codeTree}.json`)
.then((codRes) => {
console.log(codRes, 111111111);
console.log(codRes);
let value = this.queryTree(codRes.data.rows, fieldVale)[0];
console.log(value);
i.codeOptions = [{ id: fieldVale, name: value }];
......
......@@ -11,7 +11,8 @@
<script>
import formCompontent from "@c/form.vue";
import { insertZdcyryxx, updateZdcyryxx, infoZdcyryxx } from "@/api/zdxx/zdcyryxx.js";
import axios from "@/utils/http.js";
import { insertZdcyryxx, updateZdcyryxx, infoZdcyryxx, } from "@/api/zdxx/zdcyryxx.js";
export default {
name: "addYhkxs",
components: {
......@@ -43,33 +44,119 @@ export default {
placeholder: "请输入",
col: "2",
},
// {
// name: "联系电话:",
// id: "lxdh",
// type: "text",
// value: "",
// placeholder: "请输入",
// col: "2",
// },
{
name: "国籍名称:",
id: "gjmc",
type: "text",
type: "codeTree",
codeTree: "CODE_GJ",
value: "",
placeholder: "请输入",
placeholder: "请选择",
col: "2",
},
// {
// name: "户籍地:",
// id: "hjddm",
// type: "codeTree",
// value: "",
// codeOptions: [],
// codeTree: "CODE_XZQH",
// placeholder: "请输入",
// col: "2",
// },
// {
// name: "现住址名称:",
// id: "xzzdm",
// type: "codeTree",
// value: "",
// codeOptions: [],
// codeTree: "CODE_XZQH",
// placeholder: "请输入",
// col: "2",
// },
// {
// name: "特殊身份:",
// id: "tssf",
// type: "text",
// value: "",
// placeholder: "请输入",
// col: "2",
// },
// {
// name: "出生地行政区划代码:",
// id: "csdXzqhdm",
// type: "codeTree",
// value: "",
// codeOptions: [],
// codeTree: "CODE_XZQH",
// placeholder: "请输入",
// col: "2",
// },
// {
// name: "职业类别代码:",
// id: "csdXzqhdm",
// type: "codeTree",
// value: "",
// codeOptions: [],
// codeTree: "CODE_XYLB",
// placeholder: "请输入",
// col: "2",
// },
{
name: "婚姻:",
id: "hyzkdmStr",
type: "text",
name: "学历代码:",
id: "xldm",
type: "codeTree",
value: "",
codeOptions: [],
codeTree: "CODE_WHCD",
placeholder: "请输入",
col: "2",
},
// {
// name: "出生日期:",
// id: "csrq",
// type: "dates",
// value: "",
// placeholder: "请输入",
// col: "2",
// },
// {
// name: "从业时间:",
// id: "cysj",
// type: "dates",
// value: "",
// placeholder: "请输入",
// col: "2",
// },
// {
// name: "是否换岗:",
// id: "sfhgPdbz",
// type: "radio",
// value: "0",
// placeholder: "请输入",
// col: "2",
// radioData: [
// { name: "是", value: "1" },
// { name: "否", value: "0" },
// ],
// },
{
name: "学历:",
id: "xldmStr",
type: "text",
name: "婚姻:",
id: "hyzkdmStr",
type: "codeTree",
value: "",
placeholder: "请输入",
codeTree: "CODE_HYZK",
col: "2",
},
]
],
},
],
formLabelAlign: {},
......@@ -155,17 +242,46 @@ export default {
}
});
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = [];
stark = stark.concat(tree);
while (stark.length) {
const temp = stark.shift();
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children]);
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label];
}
}
return "";
},
getshuju() {
var self = this;
infoZdcyryxx({
xxzjbh: this.xxzjbh,
}).then((res) => {
let params = new FormData()
params.append('xxzjbh',this.xxzjbh)
infoZdcyryxx(params).then((res) => {
var result = res.data.rows;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
if (i.type == "text") {
this.$set(this.formLabelAlign, i.id, result[i.id]);
} else if (i.type == "codeTree") {
var fieldVale;
fieldVale = result[i.id];
axios
.get(`JsonData/${i.codeTree}.json`)
.then((codRes) => {
console.log(codRes);
let value = this.queryTree(codRes.data.rows, fieldVale)[0];
console.log(value);
i.codeOptions = [{ id: fieldVale, name: value }];
})
.catch((err) => {});
self.$set(self.formLabelAlign, i.id, fieldVale);
}
});
}
......@@ -179,8 +295,6 @@ export default {
self.loading = false;
}, 1000);
},
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
......
......@@ -70,9 +70,9 @@ export default {
mounted() {},
methods: {
getInfor() {
infoZdcyryxx({
xxzjbh: this.id,
}).then((res) => {
let params = new FormData()
params.append('xxzjbh',this.id)
infoZdcyryxx(params).then((res) => {
if (res.success && res.code == 200) {
this.pageObject = res.data.rows;
}
......
......@@ -158,10 +158,10 @@ export default {
},
getshuju() {
var self = this;
infoZdjyhd({
xxzjbh: this.xxzjbh,
}).then((res) => {
var result = res.data.rows;
let params = new FormData()
params.append('xxzjbh',this.id)
infoZdjyhd(params).then((res) => {
var result = res.data.rows.jyhd;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
......
......@@ -33,7 +33,7 @@ export default {
cxQueryField: [
{
label: "交易地点:",
prop: "jyddXzqhdmStr",
prop: "jyddXzqhmc",
col: "3",
},
{
......@@ -89,23 +89,23 @@ export default {
},
],
pageObject: {},
id: "",
xxzjbh: "",
};
},
mounted() {},
methods: {
getInfor() {
infoZdjyhd({
xxzjbh: this.id,
}).then((res) => {
let params = new FormData()
params.append('xxzjbh',this.xxzjbh)
infoZdjyhd(params).then((res) => {
if (res.success && res.code == 200) {
this.pageObject = res.data.rows;
this.pageObject = res.data.rows.jyhd.assign(res.data.rows.xgry[0],res.data.rows.xgry[1]);
}
});
},
},
created() {
this.id = this.$route.query.id;
this.xxzjbh = this.$route.query.xxzjbh;
this.getInfor();
},
};
......
......@@ -178,10 +178,11 @@ export default {
console.log(scope.row.xxzjbh);
},
toInfor(data) {
console.log(data);
this.$router.push({
path: "/detailZdjyhd",
query: {
id: data.xxzjbh,
xxzjbh: data.xxzjbh,
},
});
},
......
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