Commit 3fd739cf authored by wei's avatar wei

add

parent 4ef48267
...@@ -113,8 +113,8 @@ export default { ...@@ -113,8 +113,8 @@ export default {
}, },
created() { created() {
this.planId = this.$route.params.id || sessionStorage.getItem("planId"); this.planId = this.$route.params.id || sessionStorage.getItem("planId");
this.buildingId = this.$route.params.buildingId|| sessionStorage.getItem("buildingId"); this.buildingId = this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.buildingName = this.$route.params.buildingName|| sessionStorage.getItem("buildingName"); this.buildingName = this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.getRiskList(this.planId); this.getRiskList(this.planId);
// this.postList(); // this.postList();
}, },
...@@ -134,35 +134,47 @@ export default { ...@@ -134,35 +134,47 @@ export default {
}, },
//新增固有风险 //新增固有风险
performTasks() { performTasks() {
sessionStorage.setItem('buildingId',this.buildingId) sessionStorage.setItem('buildingId', this.buildingId)
sessionStorage.setItem('planId',this.planId) sessionStorage.setItem('planId', this.planId)
sessionStorage.setItem('buildingName',this.buildingName) sessionStorage.setItem('buildingName', this.buildingName)
this.$router.push({ this.$router.push({
name: "addInherent", name: "addInherent",
params: { params: {
id: this.active, id: this.active,
planId: this.planId, planId: this.planId,
buildingId:this.buildingId, buildingId: this.buildingId,
buildingName:this.buildingName buildingName: this.buildingName
} }
}); });
}, },
//任务执行结束 //任务执行结束
endTasks() { endTasks() {
//toDo //toDo
postFun( Dialog.confirm({
`/risk/plan/submit/${this.planId}/${this.buildingId}` title: '任务执行结束',
).then(res => { message: '是否任务执行结束',
Dialog.alert({ })
title: '任务执行结束', .then(() => {
message: res.msg, postFun(
}).then(() => { `/risk/plan/submit/${this.planId}/${this.buildingId}`
this.$router.push({ ).then(res => {
name:'riskAssess' // Dialog.alert({
// title: '任务执行结束',
// message: res.msg,
// }).then(() => {
// resolve(res.data);
this.$toast.success(res.msg)
this.$router.push({
name: 'riskAssess'
})
// });
}) })
})
.catch(() => {
// on cancel
}); });
})
}, },
handadd() { handadd() {
this.$router.push({ this.$router.push({
...@@ -223,7 +235,7 @@ export default { ...@@ -223,7 +235,7 @@ export default {
async getRiskList(id) { async getRiskList(id) {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
...@@ -239,7 +251,7 @@ export default { ...@@ -239,7 +251,7 @@ export default {
}, },
async changeFloor() { async changeFloor() {
let room = await this.roomList(this.value1); let room = await this.roomList(this.value1);
let risk = await this.riskList(this.planId,this.buildingId, this.value1,this.value2); let risk = await this.riskList(this.planId, this.buildingId, this.value1, this.value2);
}, },
async changeRoom() { async changeRoom() {
let risk = await this.riskList( let risk = await this.riskList(
...@@ -261,17 +273,17 @@ export default { ...@@ -261,17 +273,17 @@ export default {
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
sessionStorage.setItem('buildingId',this.buildingId) sessionStorage.setItem('buildingId', this.buildingId)
sessionStorage.setItem('planId',this.planId) sessionStorage.setItem('planId', this.planId)
sessionStorage.setItem('buildingName',this.buildingName) sessionStorage.setItem('buildingName', this.buildingName)
sessionStorage.setItem('inherentId',data.businessId || data.id) sessionStorage.setItem('inherentId', data.businessId || data.id)
this.$router.push({ this.$router.push({
name: "addCurrent", name: "addCurrent",
params: { params: {
inherentId: data.businessId || data.id, inherentId: data.businessId || data.id,
planId: this.planId, planId: this.planId,
buildingId:this.buildingId, buildingId: this.buildingId,
buildingName:this.buildingName buildingName: this.buildingName
} }
}); });
this.showIndex = null; this.showIndex = null;
......
...@@ -3,19 +3,20 @@ ...@@ -3,19 +3,20 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<div class="section"> <div class="section">
<p>该次测评风险值为:</p> <p>该次测评风险值为:</p>
<div> <div class="resultScore">
<p style="font-weight: bold;font-size: 20px;">{{ score }}</p> <p style="font-weight: bold;font-size: 20px;">{{ this.$route.params.score }}</p>
</div> </div>
<p>本次评估结果评定为:{{ level }}</p> <p>本次评估结果评定为:{{ level }}</p>
<van-divider></van-divider> <van-divider></van-divider>
<van-field readonly label="所属模型:" placeholder="ls风险矩阵评估模型" /> <van-field readonly label="所属模型:" placeholder="ls风险矩阵评估模型" />
<van-field readonly label="风险发生可能性:" placeholder="一般情况不会发生" /> <van-field readonly label="风险发生可能性:" placeholder="一般情况不会发生" />
<van-field readonly label="后果严重程度" placeholder="轻微影响" /> <van-field readonly label="后果严重程度" placeholder="轻微影响" />
<van-field readonly label="判定标准:" placeholder="见下图" /> <van-field readonly label="判定标准:" placeholder="见下图" />
<van-image width="90vw" height="auto" :src="require('@/assets/workbench/sst.jpg')" />
</div> </div>
<div style="display: flex;margin: 10px 16px 0px; padding-bottom: 16px"> <div style="display: flex;margin: 10px 16px 0px; padding-bottom: 16px">
<van-button block type="info" @click="sureClose">确认本次测评结果</van-button> <van-button block type="info" @click="sureClose" style="margin-right: 4px;">确认本次测评结果</van-button>
<van-button block plain type="info" @click="resetClose">取消</van-button> <van-button block plain type="info" @click="resetClose" style="margin-left: 4px;">取消</van-button>
</div> </div>
</div> </div>
...@@ -24,55 +25,56 @@ ...@@ -24,55 +25,56 @@
<script> <script>
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
export default { export default {
name:'resultPage', name: 'resultPage',
components:{ components: {
LHeader LHeader
}, },
data(){ data() {
return{ return {
text:'测评结果', text: '测评结果',
score:0, score: 0,
level:'' level: ''
} }
},
created() {
this.getResult()
},
methods: {
getResult() {
getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res => {
this.level = res.data.level
this.score = res.data.max
})
}, },
created(){ resetClose() {
this.getResult() this.$router.push({
name: 'addInherent',
params: {
level: ''
}
})
}, },
methods:{ sureClose() {
getResult(){ // this.$emit('',)
getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res=>{ history.go(-1)
this.level = res.data.level // this.$router.push({
this.score = res.data.max // name:'addInherent',
}) // params:{
}, // level:this.level
resetClose(){ // }
this.$router.push({ // })
name:'addInherent',
params:{
level:''
}
})
},
sureClose(){
// this.$emit('',)
history.go(-1)
// this.$router.push({
// name:'addInherent',
// params:{
// level:this.level
// }
// })
}
} }
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.wrapper{ .wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
.section{
.section {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 10px; padding: 10px;
...@@ -80,5 +82,15 @@ import LHeader from "@/components/header.vue"; ...@@ -80,5 +82,15 @@ import LHeader from "@/components/header.vue";
background: #fff; background: #fff;
font-size: 14px; font-size: 14px;
} }
.resultScore{
width: 48px;
height: 48px;
background: #ffc600;
text-align: center;
line-height: 48px;
border-radius: 50%;
margin: 0 auto;
}
} }
</style> </style>
\ No newline at end of file
...@@ -742,7 +742,6 @@ export default { ...@@ -742,7 +742,6 @@ export default {
}, },
//风险清单列表点击 //风险清单列表点击
toRiskDetail(item) { toRiskDetail(item) {
console.log(item, "LLLL");
this.$router.push({ this.$router.push({
name: "taskDetail", name: "taskDetail",
params: { params: {
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="四色图" name="c"> <van-tab title="四色图" name="c">
<drawCanvas /> <drawCanvas :isView="true"/>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
......
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