Commit 3fd739cf authored by wei's avatar wei

add

parent 4ef48267
......@@ -113,8 +113,8 @@ export default {
},
created() {
this.planId = this.$route.params.id || sessionStorage.getItem("planId");
this.buildingId = this.$route.params.buildingId|| sessionStorage.getItem("buildingId");
this.buildingName = this.$route.params.buildingName|| sessionStorage.getItem("buildingName");
this.buildingId = this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.buildingName = this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.getRiskList(this.planId);
// this.postList();
},
......@@ -134,35 +134,47 @@ export default {
},
//新增固有风险
performTasks() {
sessionStorage.setItem('buildingId',this.buildingId)
sessionStorage.setItem('planId',this.planId)
sessionStorage.setItem('buildingName',this.buildingName)
sessionStorage.setItem('buildingId', this.buildingId)
sessionStorage.setItem('planId', this.planId)
sessionStorage.setItem('buildingName', this.buildingName)
this.$router.push({
name: "addInherent",
params: {
id: this.active,
planId: this.planId,
buildingId:this.buildingId,
buildingName:this.buildingName
buildingId: this.buildingId,
buildingName: this.buildingName
}
});
},
//任务执行结束
endTasks() {
//toDo
Dialog.confirm({
title: '任务执行结束',
message: '是否任务执行结束',
})
.then(() => {
postFun(
`/risk/plan/submit/${this.planId}/${this.buildingId}`
).then(res => {
Dialog.alert({
title: '任务执行结束',
message: res.msg,
}).then(() => {
// Dialog.alert({
// title: '任务执行结束',
// message: res.msg,
// }).then(() => {
// resolve(res.data);
this.$toast.success(res.msg)
this.$router.push({
name:'riskAssess'
name: 'riskAssess'
})
});
// });
})
})
.catch(() => {
// on cancel
});
},
handadd() {
this.$router.push({
......@@ -239,7 +251,7 @@ export default {
},
async changeFloor() {
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() {
let risk = await this.riskList(
......@@ -261,17 +273,17 @@ export default {
},
// 详情
goDetail(data) {
sessionStorage.setItem('buildingId',this.buildingId)
sessionStorage.setItem('planId',this.planId)
sessionStorage.setItem('buildingName',this.buildingName)
sessionStorage.setItem('inherentId',data.businessId || data.id)
sessionStorage.setItem('buildingId', this.buildingId)
sessionStorage.setItem('planId', this.planId)
sessionStorage.setItem('buildingName', this.buildingName)
sessionStorage.setItem('inherentId', data.businessId || data.id)
this.$router.push({
name: "addCurrent",
params: {
inherentId: data.businessId || data.id,
planId: this.planId,
buildingId:this.buildingId,
buildingName:this.buildingName
buildingId: this.buildingId,
buildingName: this.buildingName
}
});
this.showIndex = null;
......
......@@ -3,8 +3,8 @@
<LHeader :text="text"></LHeader>
<div class="section">
<p>该次测评风险值为:</p>
<div>
<p style="font-weight: bold;font-size: 20px;">{{ score }}</p>
<div class="resultScore">
<p style="font-weight: bold;font-size: 20px;">{{ this.$route.params.score }}</p>
</div>
<p>本次评估结果评定为:{{ level }}</p>
<van-divider></van-divider>
......@@ -12,10 +12,11 @@
<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 style="display: flex;margin: 10px 16px 0px; padding-bottom: 16px">
<van-button block type="info" @click="sureClose">确认本次测评结果</van-button>
<van-button block plain type="info" @click="resetClose">取消</van-button>
<van-button block type="info" @click="sureClose" style="margin-right: 4px;">确认本次测评结果</van-button>
<van-button block plain type="info" @click="resetClose" style="margin-left: 4px;">取消</van-button>
</div>
</div>
......@@ -24,37 +25,37 @@
<script>
import { getFun, postFun } from "@/service/table.js";
import LHeader from "@/components/header.vue";
export default {
name:'resultPage',
components:{
export default {
name: 'resultPage',
components: {
LHeader
},
data(){
return{
text:'测评结果',
score:0,
level:''
data() {
return {
text: '测评结果',
score: 0,
level: ''
}
},
created(){
created() {
this.getResult()
},
methods:{
getResult(){
getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res=>{
methods: {
getResult() {
getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res => {
this.level = res.data.level
this.score = res.data.max
})
},
resetClose(){
resetClose() {
this.$router.push({
name:'addInherent',
params:{
level:''
name: 'addInherent',
params: {
level: ''
}
})
},
sureClose(){
sureClose() {
// this.$emit('',)
history.go(-1)
// this.$router.push({
......@@ -65,14 +66,15 @@ import LHeader from "@/components/header.vue";
// })
}
}
}
}
</script>
<style lang="less" scoped>
.wrapper{
.wrapper {
width: 100%;
height: 100%;
.section{
.section {
width: 100%;
height: 100%;
padding: 10px;
......@@ -80,5 +82,15 @@ import LHeader from "@/components/header.vue";
background: #fff;
font-size: 14px;
}
.resultScore{
width: 48px;
height: 48px;
background: #ffc600;
text-align: center;
line-height: 48px;
border-radius: 50%;
margin: 0 auto;
}
}
</style>
\ No newline at end of file
......@@ -742,7 +742,6 @@ export default {
},
//风险清单列表点击
toRiskDetail(item) {
console.log(item, "LLLL");
this.$router.push({
name: "taskDetail",
params: {
......
......@@ -51,7 +51,7 @@
</div>
</van-tab>
<van-tab title="四色图" name="c">
<drawCanvas />
<drawCanvas :isView="true"/>
</van-tab>
</van-tabs>
</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