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

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

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