<template>
|
<div
|
class="
|
page-container page-safety-report-detail page-safety-dispatch-report
|
colorfff
|
"
|
>
|
<div class="nav">
|
<img
|
class="nav-icon"
|
:src="require('@/assets/safety/location.png')"
|
alt=""
|
/>
|
<div class="nav-content">
|
<span>安全管理 </span>
|
<i class="el-icon el-icon-arrow-right"></i>
|
<span> 事故通报详情</span>
|
</div>
|
</div>
|
<div class="content">
|
<div class="detail-wrap">
|
<div class="title">
|
<span class="title-text">事故通报详情</span>
|
</div>
|
|
<div class="table">
|
<div class="row">
|
<div class="row">
|
<div class="label"><span>时间</span>:</div>
|
<div class="value">
|
{{ getTime(detail.accidentTime) }}
|
</div>
|
</div>
|
<div class="row">
|
<div class="label"><span>分公司</span>:</div>
|
<div class="value">{{ detail.companyName }}</div>
|
</div>
|
<div class="row">
|
<div class="label"><span>事故类型</span>:</div>
|
<div class="value">{{ typeMap[detail.type] }}</div>
|
</div>
|
<div class="row">
|
<div class="label"><span>事故线路</span>:</div>
|
<div class="value">{{ detail.lineName }}</div>
|
</div>
|
</div>
|
<div class="row">
|
<div class="row">
|
<div class="label"><span>车牌号</span>:</div>
|
<div class="value">{{ detail.plateNum }}</div>
|
</div>
|
<div class="row">
|
<div class="label"><span>安全员</span>:</div>
|
<div class="value"></div>
|
</div>
|
</div>
|
<div class="row" style="width: 100%">
|
<div class="label"><span>事故描述</span>:</div>
|
<div class="value" style="padding-right: 30px">
|
{{ detail.describe }}
|
</div>
|
</div>
|
</div>
|
|
<div class="action-bar" v-if="getAuthBtn('assistant:safety:audit') && detail.status == 1">
|
<div class="action-item orange pointer" @click="ignore">忽略</div>
|
<div class="action-item blue pointer" @click="dispatch">
|
下发通报
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="mask" v-if="showDialog"></div>
|
<div class="dialog" v-if="showDialog">
|
<div class="title row">
|
<img
|
class="title-icon"
|
:src="require('@/assets/safety/icon_select.png')"
|
alt=""
|
/>
|
<span class="title-text" style="line-height: 54px">请选择下发单位</span>
|
</div>
|
<img
|
class="icon-close"
|
:src="require('@/assets/safety/icon_close_n.png')"
|
alt=""
|
@click="showDialog = false"
|
/>
|
|
<div class="tree-wrap">
|
<el-tree
|
:data="deptList"
|
show-checkbox
|
node-key="id"
|
:props="{ label: 'name' }"
|
:default-expanded-keys="['1']"
|
:indent="0"
|
>
|
</el-tree>
|
</div>
|
|
<div class="action-bar">
|
<div class="action-item orange pointer" @click="showDialog = false">
|
取消
|
</div>
|
<div class="action-item blue pointer">确认</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import moment from 'moment'
|
|
export default {
|
name: "accidentReportDetail",
|
data() {
|
return {
|
id: "",
|
detail: {},
|
deptList: [],
|
defaultProps: {
|
children: "children",
|
label: "label",
|
},
|
showDialog: false,
|
typeMap: {
|
1: '直行事故',
|
2: '追尾事故',
|
3: '超车事故',
|
4: '左转弯事故',
|
5: '右转弯事故'
|
},
|
authButton: []
|
};
|
},
|
created() {
|
// this.getDept();
|
this.getAuth();
|
},
|
activated() {
|
this.id = this.$route.query.id;
|
this.getDetail();
|
},
|
methods: {
|
getAuth() {
|
this.$axios.get(this.$Interface.auth).then(res => {
|
console.log(res)
|
if (res.data && res.data.length > 0) {
|
this.authButton = res.data.map(item => item.permissions);
|
} else {
|
this.authButton = []
|
}
|
})
|
},
|
getAuthBtn(type) {
|
return this.authButton.includes(type);
|
},
|
goBack() {
|
this.$router.go(-1);
|
},
|
ignore() {
|
this.$confirm('确认忽略此事故通报?', '操作确认', {
|
type: 'warning'
|
}).then(res => {
|
this.$axios
|
.put(this.$Interface.accident.update, {
|
id: this.id,
|
status: 2,
|
})
|
.then((res) => {
|
this.$message({
|
type: "success",
|
message: "事故已忽略",
|
});
|
this.$router.go(-1);
|
});
|
}).catch(cancel => {
|
|
})
|
},
|
dispatch() {
|
this.$confirm('确认完成此通报审核并下发?', '操作确认', {
|
type: 'warning'
|
}).then(res => {
|
this.$axios
|
.put(this.$Interface.accident.update, {
|
id: this.$route.query.id,
|
status: 3,
|
})
|
.then((res) => {
|
this.$message({
|
type: "success",
|
message: "下发成功",
|
});
|
this.$router.go(-1);
|
});
|
}).catch(cancel => {
|
|
})
|
|
},
|
getDetail() {
|
this.$axios
|
.get(this.$Interface.accident.detail + this.id, {
|
params: {},
|
})
|
.then((res) => {
|
this.detail = res.data;
|
});
|
},
|
getDept() {
|
this.$axios.get(this.$Interface.deptList).then((_res) => {
|
this.deptList = _res.data;
|
});
|
},
|
getTime(value) {
|
return moment(value).format('yyyy-MM-DD HH:mm:ss')
|
}
|
},
|
};
|
</script>
|
|
<style lang="less" scoped>
|
@import url("../../assets/css/common.css");
|
|
@orange: #1cd1d3;
|
@blue: #3e89d3;
|
.row {
|
display: flex;
|
}
|
|
.pointer {
|
cursor: pointer;
|
}
|
|
.page-container {
|
padding: 25px 30px;
|
padding-bottom: 0;
|
|
.nav {
|
display: flex;
|
font-size: 14px;
|
width: 100%;
|
height: 20px;
|
align-items: center;
|
|
.nav-icon {
|
width: 18px;
|
margin-left: 11px;
|
flex-shrink: 0;
|
margin-right: 11px;
|
}
|
|
.nav-content {
|
flex: 1;
|
}
|
}
|
|
.content {
|
margin-top: 30px;
|
|
.detail-wrap {
|
width: 98vw;
|
height: calc(100vh - 300px);
|
border: 2px solid #415788;
|
backdrop-filter: blur(2px);
|
margin: auto;
|
position: relative;
|
|
.title {
|
background: #090f1d;
|
padding: 17px 20px;
|
|
.title-text {
|
display: block;
|
margin-right: 8px;
|
width: 120px;
|
height: 29px;
|
background: #0c1a35;
|
border: 1px solid #47598f;
|
border-radius: 4px;
|
line-height: 29px;
|
text-align: center;
|
}
|
}
|
|
.icon-close {
|
position: absolute;
|
top: 0;
|
right: -3px;
|
width: 42px;
|
cursor: pointer;
|
}
|
|
.row {
|
margin: 0 4px;
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
}
|
|
.table {
|
// margin-top: 23px;
|
> .row {
|
font-size: 14px;
|
display: flex;
|
align-items: center;
|
padding: 10px 0;
|
|
> div {
|
width: 25%;
|
}
|
|
.label {
|
width: 100px;
|
text-align: right;
|
padding: 16px 0;
|
color: #a3b0d1;
|
line-height: 0;
|
flex-shrink: 0;
|
|
span {
|
display: inline-block;
|
width: 60px;
|
text-align: justify;
|
text-justify: inter-ideograph;
|
vertical-align: top;
|
}
|
|
span:after {
|
content: "";
|
display: inline-block;
|
width: 100%;
|
}
|
}
|
|
.value {
|
padding-left: 24px;
|
line-height: 35px;
|
}
|
|
.row {
|
width: 22vw;
|
border-bottom: 0;
|
margin-right: 30px;
|
flex-shrink: 0;
|
}
|
}
|
}
|
|
.action-bar {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
color: #fff;
|
font-size: 14px;
|
margin-top: 313px;
|
|
.action-item:first-child {
|
margin-right: 96px;
|
}
|
|
.action-item {
|
padding: 8px 30px;
|
border-left: 2px solid;
|
border-right: 2px solid;
|
opacity: 0.8;
|
}
|
|
.orange {
|
border-color: @orange;
|
background-color: rgba(28, 209, 211, 0.1);
|
}
|
|
.blue {
|
border-color: @blue;
|
background-color: rgba(62, 137, 211, 0.1);
|
}
|
}
|
}
|
}
|
|
.mask {
|
position: fixed;
|
top: 0;
|
left: 0;
|
z-index: 10;
|
width: 100vw;
|
height: 100vh;
|
background: rgba(0, 0, 0, 0.8);
|
}
|
|
.dialog {
|
width: 690px;
|
height: 768px;
|
opacity: 1;
|
z-index: 100;
|
background: linear-gradient(180deg, #06203f, #08141c);
|
border: 2px solid #2a488a;
|
margin: auto;
|
position: fixed;
|
top: 130px;
|
left: 0;
|
right: 0;
|
|
.title {
|
.title-icon {
|
margin: 17px 20px;
|
margin-right: 8px;
|
width: 20px;
|
}
|
}
|
|
.icon-close {
|
position: absolute;
|
top: 0;
|
right: -3px;
|
width: 42px;
|
cursor: pointer;
|
}
|
|
.tree-wrap {
|
margin: 62px 92px;
|
margin-bottom: 0;
|
|
/deep/ .el-icon-caret-right:before {
|
content: "" !important;
|
}
|
}
|
|
.action-bar {
|
position: absolute;
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
color: #fff;
|
font-size: 14px;
|
margin-top: 113px;
|
bottom: 60px;
|
|
.action-item:first-child {
|
margin-right: 96px;
|
}
|
|
.action-item {
|
padding: 8px 30px;
|
border-left: 2px solid;
|
border-right: 2px solid;
|
opacity: 0.8;
|
}
|
|
.orange {
|
border-color: @orange;
|
background-color: rgba(28, 209, 211, 0.1);
|
}
|
|
.blue {
|
border-color: @blue;
|
background-color: rgba(62, 137, 211, 0.1);
|
}
|
}
|
}
|
}
|
</style>
|
<style lang="less">
|
.page-safety-dispatch-report {
|
.tree-wrap {
|
.el-tree {
|
background: none !important;
|
color: #fff;
|
}
|
|
.el-tree > .el-tree-node:after {
|
border-top: none;
|
}
|
|
.el-tree-node {
|
position: relative;
|
padding-left: 16px;
|
}
|
|
//节点有间隙,隐藏掉展开按钮就好了,如果觉得空隙没事可以删掉
|
.el-tree-node__expand-icon.is-leaf {
|
display: none;
|
}
|
|
.el-tree-node__children {
|
padding-left: 10px;
|
}
|
|
.el-tree-node :last-child:before {
|
height: 38px;
|
}
|
|
.el-tree > .el-tree-node:before {
|
border-left: none;
|
}
|
|
.el-tree > .el-tree-node:after {
|
border-top: none;
|
}
|
|
.el-tree-node:before {
|
content: "";
|
left: -4px;
|
position: absolute;
|
right: auto;
|
border-width: 1px;
|
}
|
|
.el-tree-node:after {
|
content: "";
|
left: -4px;
|
position: absolute;
|
right: auto;
|
border-width: 1px;
|
}
|
|
.el-tree-node:before {
|
border-left: 1px dashed #4386c6;
|
bottom: 0px;
|
height: 100%;
|
top: -26px;
|
width: 1px;
|
}
|
|
.el-tree-node:after {
|
border-top: 1px dashed #4386c6;
|
height: 20px;
|
top: 12px;
|
width: 24px;
|
}
|
|
.el-tree-node__content > .el-tree-node__expand-icon {
|
padding: 0px;
|
}
|
|
.el-tree-node__content:hover {
|
background: none !important;
|
}
|
|
.el-tree-node.is-focusable .el-tree-node__content,
|
.el-tree-node.is-current .el-tree-node__content {
|
background: none !important;
|
}
|
|
.el-tree-node.is-focusable {
|
padding-left: 20px !important;
|
}
|
}
|
}
|
</style>
|