Loading src/views/danger/addDanger/addDanger.vue +1 −0 Original line number Diff line number Diff line Loading @@ -672,6 +672,7 @@ export default { return { ...item, url: item.filePath, file:new File([],item['fileName'],{}) }; } ); Loading src/views/risk/riskAdd/index.vue +864 −839 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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> Loading Loading @@ -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> Loading Loading @@ -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> Loading Loading @@ -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> Loading Loading @@ -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); Loading @@ -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); Loading Loading @@ -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; Loading Loading @@ -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) { Loading Loading
src/views/danger/addDanger/addDanger.vue +1 −0 Original line number Diff line number Diff line Loading @@ -672,6 +672,7 @@ export default { return { ...item, url: item.filePath, file:new File([],item['fileName'],{}) }; } ); Loading
src/views/risk/riskAdd/index.vue +864 −839 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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> Loading Loading @@ -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> Loading Loading @@ -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> Loading Loading @@ -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> Loading Loading @@ -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); Loading @@ -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); Loading Loading @@ -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; Loading Loading @@ -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) { Loading