Commit fd998453 by liupeng

修改了上传图片

parent 304a7b68
......@@ -755,7 +755,8 @@
pageBs == 'rwbdjs' ||
pageBs == 'queryRlqbxsSH' ||
pageBs == 'queryZjcl' ||
pageBs == 'llygl'
pageBs == 'llygl' ||
pageBs == 'queryRyzp'
)
"
>修改</span
......
......@@ -605,7 +605,7 @@ export const xydx = [
{
name: "正面:",
id: "zmfile",
type: "photo",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2",
......@@ -625,7 +625,7 @@ export const xydx = [
{
name: "右侧:",
id: "ycfile",
type: "photo",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2",
......@@ -635,7 +635,7 @@ export const xydx = [
{
name: "身份证人像:",
id: "sfzrxfile",
type: "photo",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2",
......@@ -646,7 +646,7 @@ export const xydx = [
{
name: "身份证国徽:",
id: "sfzghfile",
type: "photo",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "3",
......
......@@ -22,6 +22,7 @@ export default {
},
data() {
return {
title: "",
propFormField: [
//基本信息
{
......
......@@ -69,6 +69,11 @@ export default {
isActive: true,
},
],
fileList1: [],
fileList2: [],
fileList3: [],
fileList4: [],
fileList5: [],
};
},
methods: {
......@@ -86,6 +91,8 @@ export default {
}
},
addSubmit(params, loading) {
console.log(this.formLabelAlign);
console.log(this.propFormField);
insertGzry(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
......@@ -103,7 +110,11 @@ export default {
});
},
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) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
......@@ -130,9 +141,104 @@ export default {
background: "rgba(255, 255, 255, 0.7)",
});
selectgzryZp({
glxxXxzjbh: this.$route.query.xxzjbh
glxxXxzjbh: this.$route.query.xxzjbh,
}).then((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({
xxzjbh: this.$route.query.xxzjbh,
......
......@@ -32,24 +32,29 @@ export default {
return {
cxQueryField: [
{
title: "", //如果不分小模块就删除title
id: 1,
objStr: "",
data: [
{
label: "信息编号:",
prop: "xxzjbh",
col: "3",
},
{
label: "关联信息_信息主键编号:",
label: "关联信息主键编号:",
prop: "glxxXxzjbh",
col: "3",
},
{
label: "常用证件_常用证件:",
label: "常用证件:",
prop: "cyzjCyzjdm",
col: "3",
type: "codeTree",
codeTree: "CODE_ZJ",
},
{
label: "常用证件_补充描述:",
label: "常用证件补充描述:",
prop: "cyzjDmbcms",
col: "6",
},
......@@ -59,36 +64,39 @@ export default {
col: "3",
},
{
label: "人员照片_电子文件标题:",
label: "照片文件标题:",
prop: "ryzpDzwjbt",
col: "3",
},
{
label: "人员照片_电子文件名称:",
label: "照片文件名称:",
prop: "ryzpDzwjmc",
col: "3",
},
{
label: "人员照片_电子文件格式:",
label: "照片文件格式:",
prop: "ryzpDzwjgs",
col: "3",
},
{
label: "人员照片_电子文件大小:",
label: "照片文件大小:",
prop: "ryzpDzwjdx",
col: "3",
},
{
label: "人员照片_电子文件位置:",
label: "照片文件位置:",
prop: "ryzpDzwjwz",
col: "3",
},
{
label: "人员照片_建立时间:",
label: "照片建立时间:",
prop: "ryzpJlsj",
col: "3",
},
],
},
],
pageFooterProps: [
{
label: "填表单位:",
......@@ -133,7 +141,9 @@ export default {
],
};
},
mounted() {},
mounted() {
this.getInfor();
},
methods: {
getInfor() {
let _this = this;
......@@ -141,6 +151,8 @@ export default {
xxzjbh: _this.xxzjbh,
}).then((res) => {
var result = res.data.rows;
this.pageObject = 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