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 { ...@@ -38,23 +38,23 @@ export default {
}, },
{ {
label: "性别:", label: "性别:",
prop: "xbdm", prop: "xbdmText",
col: "3", col: "3",
},{ },{
label: "身份证号:", label: "身份证号:",
prop: "Zjhm", prop: "zjhm",
col: "3", col: "3",
},{ },{
label: "民族:", label: "民族:",
prop: "mzdm", prop: "mzdmText",
col: "3", col: "3",
},{ },{
label: "户籍地区划:", label: "户籍地区划:",
prop: "xzqhdm", prop: "xzqhdmText",
col: "3", col: "3",
},{ },{
label: "案件类别:", label: "案件类别:",
prop: "ajlbCode", prop: "ajlbCodeText",
col: "3", col: "3",
},{ },{
label: "人员标签:", label: "人员标签:",
......
...@@ -218,7 +218,6 @@ export default { ...@@ -218,7 +218,6 @@ export default {
params.append("id", this.id); params.append("id", this.id);
console.log(params); console.log(params);
infoAddZdry(params).then((res) => { infoAddZdry(params).then((res) => {
console.log(res);
var result = res.data.data; var result = res.data.data;
self.propFormField.forEach((fieldItem) => { self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) { if (fieldItem.data && fieldItem.data.length > 0) {
...@@ -231,7 +230,7 @@ export default { ...@@ -231,7 +230,7 @@ export default {
axios axios
.get(`JsonData/${i.codeTree}.json`) .get(`JsonData/${i.codeTree}.json`)
.then((codRes) => { .then((codRes) => {
console.log(codRes, 111111111); console.log(codRes);
let value = this.queryTree(codRes.data.rows, fieldVale)[0]; let value = this.queryTree(codRes.data.rows, fieldVale)[0];
console.log(value); console.log(value);
i.codeOptions = [{ id: fieldVale, name: value }]; i.codeOptions = [{ id: fieldVale, name: value }];
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
<script> <script>
import formCompontent from "@c/form.vue"; 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 { export default {
name: "addYhkxs", name: "addYhkxs",
components: { components: {
...@@ -43,33 +44,119 @@ export default { ...@@ -43,33 +44,119 @@ export default {
placeholder: "请输入", placeholder: "请输入",
col: "2", col: "2",
}, },
// {
// name: "联系电话:",
// id: "lxdh",
// type: "text",
// value: "",
// placeholder: "请输入",
// col: "2",
// },
{ {
name: "国籍名称:", name: "国籍名称:",
id: "gjmc", id: "gjmc",
type: "text", type: "codeTree",
codeTree: "CODE_GJ",
value: "", value: "",
placeholder: "请输入", placeholder: "请选择",
col: "2", 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: "婚姻:", name: "学历代码:",
id: "hyzkdmStr", id: "xldm",
type: "text", type: "codeTree",
value: "", value: "",
codeOptions: [],
codeTree: "CODE_WHCD",
placeholder: "请输入", placeholder: "请输入",
col: "2", 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: "学历:", name: "婚姻:",
id: "xldmStr", id: "hyzkdmStr",
type: "text", type: "codeTree",
value: "", value: "",
placeholder: "请输入", placeholder: "请输入",
codeTree: "CODE_HYZK",
col: "2", col: "2",
}, },
],
]
}, },
], ],
formLabelAlign: {}, formLabelAlign: {},
...@@ -155,17 +242,46 @@ export default { ...@@ -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() { getshuju() {
var self = this; var self = this;
infoZdcyryxx({ let params = new FormData()
xxzjbh: this.xxzjbh, params.append('xxzjbh',this.xxzjbh)
}).then((res) => { infoZdcyryxx(params).then((res) => {
var result = res.data.rows; var result = res.data.rows;
self.propFormField.forEach((fieldItem) => { self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) { if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => { fieldItem.data.forEach((i) => {
if (i.type == "text") { if (i.type == "text") {
this.$set(this.formLabelAlign, i.id, result[i.id]); 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 { ...@@ -179,8 +295,6 @@ export default {
self.loading = false; self.loading = false;
}, 1000); }, 1000);
}, },
}, },
created() { created() {
this.$store.commit("user/SET_Menu", this.Menu); this.$store.commit("user/SET_Menu", this.Menu);
......
...@@ -70,9 +70,9 @@ export default { ...@@ -70,9 +70,9 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
getInfor() { getInfor() {
infoZdcyryxx({ let params = new FormData()
xxzjbh: this.id, params.append('xxzjbh',this.id)
}).then((res) => { infoZdcyryxx(params).then((res) => {
if (res.success && res.code == 200) { if (res.success && res.code == 200) {
this.pageObject = res.data.rows; this.pageObject = res.data.rows;
} }
......
...@@ -158,10 +158,10 @@ export default { ...@@ -158,10 +158,10 @@ export default {
}, },
getshuju() { getshuju() {
var self = this; var self = this;
infoZdjyhd({ let params = new FormData()
xxzjbh: this.xxzjbh, params.append('xxzjbh',this.id)
}).then((res) => { infoZdjyhd(params).then((res) => {
var result = res.data.rows; var result = res.data.rows.jyhd;
self.propFormField.forEach((fieldItem) => { self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) { if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => { fieldItem.data.forEach((i) => {
......
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
cxQueryField: [ cxQueryField: [
{ {
label: "交易地点:", label: "交易地点:",
prop: "jyddXzqhdmStr", prop: "jyddXzqhmc",
col: "3", col: "3",
}, },
{ {
...@@ -89,23 +89,23 @@ export default { ...@@ -89,23 +89,23 @@ export default {
}, },
], ],
pageObject: {}, pageObject: {},
id: "", xxzjbh: "",
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
getInfor() { getInfor() {
infoZdjyhd({ let params = new FormData()
xxzjbh: this.id, params.append('xxzjbh',this.xxzjbh)
}).then((res) => { infoZdjyhd(params).then((res) => {
if (res.success && res.code == 200) { 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() { created() {
this.id = this.$route.query.id; this.xxzjbh = this.$route.query.xxzjbh;
this.getInfor(); this.getInfor();
}, },
}; };
......
...@@ -178,10 +178,11 @@ export default { ...@@ -178,10 +178,11 @@ export default {
console.log(scope.row.xxzjbh); console.log(scope.row.xxzjbh);
}, },
toInfor(data) { toInfor(data) {
console.log(data);
this.$router.push({ this.$router.push({
path: "/detailZdjyhd", path: "/detailZdjyhd",
query: { 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