Commit dc2277f7 authored by 罗新东's avatar 罗新东

修改了视屏文件不能回显名称的bug

parent f9807f1e
Pipeline #7546 passed with stage
in 12 seconds
......@@ -672,6 +672,7 @@ export default {
return {
...item,
url: item.filePath,
file:new File([],item['fileName'],{})
};
}
);
......
......@@ -154,7 +154,7 @@
/> -->
<van-field
v-show="setRank=='其他定级方式'"
v-show="setRank == '其他定级方式'"
v-model="setRankMode"
name="setRankMode"
label="定级方式"
......@@ -164,7 +164,11 @@
placeholder="请输入"
/>
<van-field name="setRankModeFile" label=" " v-show="setRank=='其他定级方式'">
<van-field
name="setRankModeFile"
label=" "
v-show="setRank == '其他定级方式'"
>
<template #input>
<van-uploader
multiple
......@@ -193,7 +197,9 @@
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
......@@ -312,7 +318,9 @@
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
......@@ -357,7 +365,9 @@
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
......@@ -403,7 +413,9 @@
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
......@@ -595,9 +607,8 @@ export default {
}
},
onSubmit(values) {
let formdata = new FormData();
formdata.append('id',this.id);
formdata.append("id", this.id);
formdata.append("pId", this.projectId);
formdata.append("riskFactor", this.factor);
formdata.append("riskSource", this.source);
......@@ -614,7 +625,7 @@ export default {
formdata.append("emergencyMeasure", this.urgent);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
console.log(values)
console.log(values);
values.setRankModeFile.forEach((item) => {
// 定级方式
formdata.append("risk4[]", item.file);
......@@ -693,7 +704,7 @@ export default {
.then((res) => {
let data = res.data.riskMain;
let data1 = res.data.ResponsibilityMember;
this.id=data.id;
this.id = data.id;
this.projectId = data.pId;
this.riskRank = data.riskLevel;
this.factor = data.riskFactor;
......@@ -713,46 +724,58 @@ export default {
// urgentImg administrationImg technologyImg setRankModeImg
// 定级方式
this.urgentImg = (res.data.imgsysFiles2 || []).map(item=>{return {...item,url:item.filePath}});
this.administrationImg = (res.data.imgsysFiles1 || []).map(item=>{return {...item,url:item.filePath}});
this.technologyImg = (res.data.imgsysFiles0 || []).map(item=>{return {...item,url:item.filePath}});
this.setRankModeImg = (res.data.imgsysFiles3 || []).map(item=>{return {...item,url:item.filePath}});
this.urgentImg = (res.data.imgsysFiles2 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
this.administrationImg = (res.data.imgsysFiles1 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
this.technologyImg = (res.data.imgsysFiles0 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
this.setRankModeImg = (res.data.imgsysFiles3 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
// this.technologyFile = res.data.riskFileList1.map(() => {
// return {
// ...item,
// url: item.filePath,
// };
// });
// this.urgentImg = data.riskFileList4.map(() => {
// console.log(111)
// return {
// ...item,
// url: item.filePath,
// };
// });
// this.administrationImg = data.riskFileList3.map(() => {
// return {
// ...item,
// url: item.filePath,
// };
// });
// this.technologyImg = data.riskFileList2.map(() => {
// return {
// ...item,
// url: item.filePath,
// };
// });
console.log("结果");
// 请求人员列表
let formdata = new FormData();
formdata.append("organizationId", data.responsibilityDept);
postHdPeople(`/riskMain/getUserList`, formdata).then((res) => {
postHdPeople(`/riskMain/getUserList`, formdata).then(
(res) => {
this.columnsMainDutyPeopLe = res.data;
this.mainDutyPeopLe = this.columnsMainDutyPeopLe.filter((item) => {
return item["userId"] == data.responsibilityMember;
this.mainDutyPeopLe =
this.columnsMainDutyPeopLe.filter((item) => {
return (
item["userId"] ==
data.responsibilityMember
);
})[0]["userName"];
});
}
);
// console.log(data)
this.$toast.clear();
this.returnCause = res.data.reason;
......@@ -783,9 +806,11 @@ export default {
this.source = "";
this.trouble = "";
// 请求风险源
postHdSource(`/riskMain/showSourceName/${this.factor}`).then((res) => {
postHdSource(`/riskMain/showSourceName/${this.factor}`).then(
(res) => {
this.columnsSource = res.data;
});
}
);
},
// 风险源
onConSource(value) {
......
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