Commit fd998453 by liupeng

修改了上传图片

parent 304a7b68
...@@ -755,7 +755,8 @@ ...@@ -755,7 +755,8 @@
pageBs == 'rwbdjs' || pageBs == 'rwbdjs' ||
pageBs == 'queryRlqbxsSH' || pageBs == 'queryRlqbxsSH' ||
pageBs == 'queryZjcl' || pageBs == 'queryZjcl' ||
pageBs == 'llygl' pageBs == 'llygl' ||
pageBs == 'queryRyzp'
) )
" "
>修改</span >修改</span
......
...@@ -605,7 +605,7 @@ export const xydx = [ ...@@ -605,7 +605,7 @@ export const xydx = [
{ {
name: "正面:", name: "正面:",
id: "zmfile", id: "zmfile",
type: "photo", type: "file",
value: "", value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save", requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2", col: "2",
...@@ -625,7 +625,7 @@ export const xydx = [ ...@@ -625,7 +625,7 @@ export const xydx = [
{ {
name: "右侧:", name: "右侧:",
id: "ycfile", id: "ycfile",
type: "photo", type: "file",
value: "", value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save", requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2", col: "2",
...@@ -635,7 +635,7 @@ export const xydx = [ ...@@ -635,7 +635,7 @@ export const xydx = [
{ {
name: "身份证人像:", name: "身份证人像:",
id: "sfzrxfile", id: "sfzrxfile",
type: "photo", type: "file",
value: "", value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save", requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2", col: "2",
...@@ -646,7 +646,7 @@ export const xydx = [ ...@@ -646,7 +646,7 @@ export const xydx = [
{ {
name: "身份证国徽:", name: "身份证国徽:",
id: "sfzghfile", id: "sfzghfile",
type: "photo", type: "file",
value: "", value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save", requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "3", col: "3",
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
}, },
data() { data() {
return { return {
title: "",
propFormField: [ propFormField: [
//基本信息 //基本信息
{ {
......
...@@ -69,6 +69,11 @@ export default { ...@@ -69,6 +69,11 @@ export default {
isActive: true, isActive: true,
}, },
], ],
fileList1: [],
fileList2: [],
fileList3: [],
fileList4: [],
fileList5: [],
}; };
}, },
methods: { methods: {
...@@ -86,6 +91,8 @@ export default { ...@@ -86,6 +91,8 @@ export default {
} }
}, },
addSubmit(params, loading) { addSubmit(params, loading) {
console.log(this.formLabelAlign);
console.log(this.propFormField);
insertGzry(params).then((res) => { insertGzry(params).then((res) => {
if (res.success && res.code == 200) { if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", { this.$alert("保存成功!", "提示", {
...@@ -103,7 +110,11 @@ export default { ...@@ -103,7 +110,11 @@ export default {
}); });
}, },
editSubmit(params, loading) { editSubmit(params, loading) {
params.append("xzgzrybh", this.xxzjbh); console.log(this.propFormField[0].data);
console.log(this.formLabelAlign);
console.log(this.propFormField);
console.log(params);
// params.append("xzgzrybh", this.xxzjbh);
updateGzry(params).then((res) => { updateGzry(params).then((res) => {
if (res.success && res.code == 200) { if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", { this.$alert("保存成功!", "提示", {
...@@ -130,9 +141,104 @@ export default { ...@@ -130,9 +141,104 @@ export default {
background: "rgba(255, 255, 255, 0.7)", background: "rgba(255, 255, 255, 0.7)",
}); });
selectgzryZp({ selectgzryZp({
glxxXxzjbh: this.$route.query.xxzjbh glxxXxzjbh: this.$route.query.xxzjbh,
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
//文件上传反显
var result = res.data.rows;
console.log(result);
self.propFormField[0].data.forEach((fieldItem) => {
//遍历配置文件,拿到数据返回来的xs实体。
var fieldVale;
if (fieldItem.type == "file") {
console.log(fieldItem);
console.log(231);
console.log(result);
self.$set(self.formLabelAlign, fieldItem.id, []);
result.map(item => {
if(item.zpbw == "1" && fieldItem.id == "sfzrxfile") {
const fileObj1 = {
name: item.ryzpDzwjmc,
url: item.ryzpDzwjnr,
};
console.log(fileObj1);
self.$set(
self.formLabelAlign[fieldItem.id],
0,
fileObj1
);
console.log(self.formLabelAlign[fieldItem.id],12123123);
self.$forceUpdate();
}else if(item.zpbw == "2" && fieldItem.id == "zmfile") {
const fileObj2 = {
name: item.ryzpDzwjmc,
url: item.ryzpDzwjnr,
};
console.log(fileObj2);
self.$set(
self.formLabelAlign[fieldItem.id],
0,
fileObj2
);
self.$forceUpdate();
}else if(item.zpbw == "3" && fieldItem.id == "zcfile") {
const fileObj3 = {
name: item.ryzpDzwjmc,
url: item.ryzpDzwjnr,
};
console.log(fileObj3);
self.$set(
self.formLabelAlign[fieldItem.id],
0,
fileObj3
);
self.$forceUpdate();
}else if(item.zpbw == "4" && fieldItem.id == "ycfile") {
const fileObj4 = {
name: item.ryzpDzwjmc,
url: item.ryzpDzwjnr,
};
console.log(fileObj4);
self.$set(
self.formLabelAlign[fieldItem.id],
0,
fileObj4
);
self.$forceUpdate();
}else if(item.zpbw == "5" && fieldItem.id == "sfzghfile") {
const fileObj5 = {
name: item.ryzpDzwjmc,
url: item.ryzpDzwjnr,
};
console.log(fileObj5);
self.$set(
self.formLabelAlign[fieldItem.id],
0,
fileObj5
);
self.$forceUpdate(self.formLabelAlign);
}
})
console.log(self.formLabelAlign);
self.$forceUpdate(self.formLabelAlign);
if (result[fieldItem.id]) {
console.log(result,result[fieldItem.id]);
result[fieldItem.id].forEach((fileItem, fileIndex) => {
const fileObj = {
name: fileItem.ryzpDzwjmc,
url: fileItem.ryzpDzwjnr,
};
self.$set(
self.formLabelAlign[fieldItem.id],
fileIndex,
fileObj
);
});
}
}
});
}); });
selectGzryById({ selectGzryById({
xxzjbh: this.$route.query.xxzjbh, xxzjbh: this.$route.query.xxzjbh,
......
...@@ -31,25 +31,30 @@ export default { ...@@ -31,25 +31,30 @@ export default {
data() { data() {
return { return {
cxQueryField: [ cxQueryField: [
{ {
title: "", //如果不分小模块就删除title
id: 1,
objStr: "",
data: [
{
label: "信息编号:", label: "信息编号:",
prop: "xxzjbh", prop: "xxzjbh",
col: "3", col: "3",
}, },
{ {
label: "关联信息_信息主键编号:", label: "关联信息主键编号:",
prop: "glxxXxzjbh", prop: "glxxXxzjbh",
col: "3", col: "3",
}, },
{ {
label: "常用证件_常用证件:", label: "常用证件:",
prop: "cyzjCyzjdm", prop: "cyzjCyzjdm",
col: "3", col: "3",
type: "codeTree", type: "codeTree",
codeTree: "CODE_ZJ", codeTree: "CODE_ZJ",
}, },
{ {
label: "常用证件_补充描述:", label: "常用证件补充描述:",
prop: "cyzjDmbcms", prop: "cyzjDmbcms",
col: "6", col: "6",
}, },
...@@ -59,35 +64,38 @@ export default { ...@@ -59,35 +64,38 @@ export default {
col: "3", col: "3",
}, },
{ {
label: "人员照片_电子文件标题:", label: "照片文件标题:",
prop: "ryzpDzwjbt", prop: "ryzpDzwjbt",
col: "3", col: "3",
}, },
{ {
label: "人员照片_电子文件名称:", label: "照片文件名称:",
prop: "ryzpDzwjmc", prop: "ryzpDzwjmc",
col: "3", col: "3",
}, },
{ {
label: "人员照片_电子文件格式:", label: "照片文件格式:",
prop: "ryzpDzwjgs", prop: "ryzpDzwjgs",
col: "3", col: "3",
}, },
{ {
label: "人员照片_电子文件大小:", label: "照片文件大小:",
prop: "ryzpDzwjdx", prop: "ryzpDzwjdx",
col: "3", col: "3",
}, },
{ {
label: "人员照片_电子文件位置:", label: "照片文件位置:",
prop: "ryzpDzwjwz", prop: "ryzpDzwjwz",
col: "3", col: "3",
}, },
{ {
label: "人员照片_建立时间:", label: "照片建立时间:",
prop: "ryzpJlsj", prop: "ryzpJlsj",
col: "3", col: "3",
}, },
],
},
], ],
pageFooterProps: [ pageFooterProps: [
{ {
...@@ -133,7 +141,9 @@ export default { ...@@ -133,7 +141,9 @@ export default {
], ],
}; };
}, },
mounted() {}, mounted() {
this.getInfor();
},
methods: { methods: {
getInfor() { getInfor() {
let _this = this; let _this = this;
...@@ -141,6 +151,8 @@ export default { ...@@ -141,6 +151,8 @@ export default {
xxzjbh: _this.xxzjbh, xxzjbh: _this.xxzjbh,
}).then((res) => { }).then((res) => {
var result = res.data.rows; var result = res.data.rows;
this.pageObject = result;
_this.filterTreeCode(result); _this.filterTreeCode(result);
}); });
}, },
......
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