Commit 2f8c698d authored by zhangjianqian's avatar zhangjianqian

应急处置修改

parent 189d95a3
<template>
<ul class="timeline-wrapper">
<li class="timeline-item" >
<div class="timeline-box">
<div class="out-circle">
<div class="in-circle"></div>
</div>
<div class="long-line"></div>
</div>
<div class="timeline-content">
<div class="timeline-date el-form-div">
<div style="width: 180px">{{nowItem.createTime}}</div>
<div >事件发布</div>
</div>
<div class="timeline-title">{{ nowItem.eventName}}</div>
<div class="timeline-title">地址:{{ nowItem.address}}</div>
</div>
</li>
<li class="timeline-item" v-for="t in timelineList" :key="t.id">
<div class="timeline-box">
<div class="out-circle">
......@@ -8,7 +24,11 @@
<div class="long-line"></div>
</div>
<div class="timeline-content">
<div class="timeline-date">{{t.createTime}}</div>
<div class="timeline-date el-form-div">
<div style="width: 180px">{{t.createTime}}</div>
<div v-if="t.eventType==2">预案指引</div>
<div v-if="t.eventType==1">信息处置</div>
</div>
<div class="timeline-title">{{ t.management}}</div>
<div class="timeline-desc">
<span
......@@ -36,8 +56,8 @@
default: () => {
return []
}
}
},
nowItem:{}
},
methods: {
checkFile(url) {
......@@ -53,7 +73,12 @@
margin: 0;
padding: 0;
}
.el-form-div{
display:flex;
flex-direction:row;
justify-content:flex-start;
width: 100%;
}
/* 时间线 */
.timeline-item {
position: relative;
......
......@@ -21,35 +21,76 @@
v-if="(item.governmentRead==0&&userType==-2)||(item.companyRead==0&&userType!=-2)" class="massage"> (您有新消息)</span>
</div>
<div v-if="item.status==4" style="width: 80%;margin-left: 5px;">已完结</div>
<div style="height:30px;color: red;cursor:pointer;" v-if="userType==-2" @click="handleDelete(item.id)">取消事件</div>
<div style="height:30px;color: red;cursor:pointer;" v-if="userType==-2" @click="handleDelete(item.id)">关闭事件</div>
</div>
<div class="content-div el-form-div" style="margin-top: -5px;overflow:hidden;">
<div style="width: 65%; white-space:nowrap;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
overflow: hidden;">事件名称:{{item.eventName}}</div>
<div>事件分类:{{item.eventTypeName}}</div>
</div>
<div class="content-div el-form-div">
<div style="width: 65%">发生时间:{{item.inforTime}}</div>
<div>事件级别:{{item.eventGradeName}}</div>
</div>
<div class="content-div" style="margin-top: -5px;">事件名称:{{item.eventName}}</div>
<div class="content-div">发生时间:{{item.inforTime}}</div>
<div class="content-div">事件地点:{{item.address}}</div>
<div class="content-div">最新进展:</div>
<div class="el-form-div">
<div v-if="item.status==1 && userType==-2" class="button-div" @click="assignTask(item)">任务指派</div>
<div v-if="userType==-2" class="button-div" @click="showList(item.id)" >预案指引</div>
<div v-if="userType==-2" class="button-div" @click="showList(item)" >预案指引</div>
<div v-if="item.status==3 && userType==-2" class="button-div" @click="endevent(item.id)">事件结案</div>
<div v-if="userType!=-2" class="button-div" @click="showList(item.id)">信息处置</div>
<div v-if="userType!=-2" class="button-div" @click="showList(item)">信息处置</div>
<div class="button-div" @click="showDetail(item.id,item.eventName)">详情</div>
</div>
</div>
<div id = "detail" class="show-detail" style="display: none;margin-top: 15px;margin-bottom: 20px;position:fixed;right: 470px;width: 300px;
background: #ffffff;top: 110px">
background: #ffffff;top: 110px;border-right:1px solid #99a9bf">
<div class="el-form-div" style="height: 30px;">
<div class="detail-title">{{detailTitle}}</div>
<div class="detail-title">事件详情</div>
<div style="cursor: pointer;" @click="closeDetail()">
<img style="width: 20px;height: 20px;margin-top: 5px;" src="@/assets/mapImages/close.png" alt="" />
</div>
</div>
<timeline :timeline-list="handleList"></timeline>
<timeline :timeline-list="handleList" :nowItem="nowItem"></timeline>
<div style="height: 40px;">
</div>
</div>
</div>
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<div class="el-form-div" style="width: 100%;margin-bottom: 20px;overflow-y:hidden;">
<div style="width: 140px;">
<div class="el-form-div" >
<div class="num-div" @click="switchForm(nowItem,$event)">1</div>
<div v-if="handleList.length>0" class="num-line"></div>
</div>
<div class="num-title">
事件发布
</div>
<div class="num-title">
{{dataTime}}
</div>
</div>
<div v-for="(item,index) in handleList" style="width: 140px;">
<div class="el-form-div" >
<div class="num-div" @click="switchForm(item,$event)">{{index+2}}</div>
<div v-if="index<handleList.length-1" class="num-line"></div>
</div>
<div v-if="item.eventType==1" class="num-title">
处置信息
</div>
<div v-if="item.eventType==2" class="num-title">
预案指引
</div>
<div class="num-title">
{{item.createTime}}
</div>
</div>
</div>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="userType!=-2">
<el-button
......@@ -70,83 +111,52 @@
>新增预案指引</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="handleList" >
<el-table-column label="类型" align="center" prop="eventType" :formatter="getType" width="120px"/>
<el-table-column label="处置信息/指导意见" align="center" prop="management" />
<el-table-column label="处置附件/引导方案" align="center" prop="managementEvent" width="150px">
<template slot-scope="scope">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="事件名称" v-if="form.eventType==3">
<el-input v-model="form.eventName" :readonly="readonly" />
</el-form-item>
<el-form-item label="事件分类" v-if="form.eventType==3">
<el-input v-model="form.eventTypeName" :readonly="readonly"/>
</el-form-item>
<el-form-item label="事件等级" v-if="form.eventType==3">
<el-input v-model="form.eventGradeName" :readonly="readonly"/>
</el-form-item>
<el-form-item label="发生时间" v-if="form.eventType==3">
<el-input v-model="form.inforTime" :readonly="readonly"/>
</el-form-item>
<el-form-item label="发生地点" v-if="form.eventType==3">
<el-input v-model="form.address" :readonly="readonly"/>
</el-form-item>
<el-form-item label="处置信息" prop="management" v-if="form.eventType==1">
<el-input v-model="form.management" type="textarea" placeholder="请输入处置信息" />
</el-form-item>
<el-form-item label="指导意见" prop="management" v-if="form.eventType==2">
<el-input v-model="form.management" type="textarea" placeholder="请输入指导意见" />
</el-form-item>
<el-form-item label="预案附件" :style="display2" v-if="form.eventType==2">
<span
class="dbtn"
@click="checkFile(scope.row.managementEvent)"
v-if="scope.row.managementEvent != null && scope.row.managementEvent!=''"
>
@click="checkFile(form.managementEvent)"
v-if="form.managementEvent != null && form.managementEvent!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<!--<el-table-column label="指导意见" align="center" prop="guidanceOpinion" />-->
<!--<el-table-column label="指导方案" align="center" prop="planUrl" >-->
<!--<template slot-scope="scope">-->
<!--<span-->
<!--class="dbtn"-->
<!--@click="checkFile(scope.row.planUrl)"-->
<!--v-if="scope.row.planUrl != null && scope.row.planUrl!=''"-->
<!--&gt;-->
<!--<i class="el-icon el-icon-view"></i>查看/下载-->
<!--</span>-->
<!--<span v-else>-</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<!--<template slot-scope="scope">-->
<!--<span>{{ parseTime(scope.row.guidanceTime, '{y}-{m}-{d}') }}</span>-->
<!--</template>-->
</el-table-column>
<!--<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">-->
<!--<template slot-scope="scope">-->
<!--&lt;!&ndash;<el-button&ndash;&gt;-->
<!--&lt;!&ndash;size="mini"&ndash;&gt;-->
<!--&lt;!&ndash;type="text"&ndash;&gt;-->
<!--&lt;!&ndash;icon="el-icon-edit"&ndash;&gt;-->
<!--&lt;!&ndash;@click="handleUpdate(scope.row)"&ndash;&gt;-->
<!--&lt;!&ndash;v-hasPermi="['system:handle:edit']"&ndash;&gt;-->
<!--&lt;!&ndash;&gt;修改</el-button>&ndash;&gt;-->
<!--<el-button-->
<!--v-if="userType==-2"-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-edit"-->
<!--@click="handleUpdate(scope.row)"-->
<!--&gt;预案指引</el-button>-->
<!--<el-button-->
<!--v-if="userType!=-2"-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-delete"-->
<!--@click="handleDelete2(scope.row)"-->
<!--&gt;删除</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams2.pageNum"
:limit.sync="queryParams2.pageSize"
@pagination="getHandleList"
/>
</el-dialog>
<!-- 添加或修改事件处置对话框 -->
<el-dialog :title="title2" :visible.sync="open2" width="550px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="处置信息" prop="management" :style="display">
<el-input v-model="form.management" type="textarea" placeholder="请输入处置信息" />
</el-form-item>
<el-form-item label="指导意见" prop="management" :style="display2">
<el-input v-model="form.management" type="textarea" placeholder="请输入指导意见" />
<el-form-item label="处置信息附件" :style="display2" v-if="form.eventType==1">
<span
class="dbtn"
@click="checkFile(form.managementEvent)"
v-if="form.managementEvent != null && form.managementEvent!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="应急预案" prop="planId" :style="display2">
<el-form-item label="操作时间" :style="display2">
<el-input v-model="form.createTime" :readonly="readonly"/>
</el-form-item>
<el-form-item label="应急预案" prop="planId" :style="display" v-if="form.eventType==2">
<el-select v-model="form.planId" placeholder="请选择预案等级" @change="fananchange" >
<el-option
v-for = "dict in planInfoList"
......@@ -156,7 +166,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="处置附件" prop="managementEvent" :style="display">
<el-form-item label="处置附件" prop="managementEvent" :style="display" v-if="form.eventType==1">
<FileUpload
listType="picture"
:fileType="fileType"
......@@ -167,12 +177,16 @@
<el-input v-show="false" disabled v-model="form.managementEvent"></el-input>
<!--<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer" :style="display">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 添加或修改事件处置对话框 -->
</div>
</template>
......@@ -194,14 +208,15 @@ export default {
},
data() {
return {
readonly:true,
fileType:['png', 'jpg', 'jpeg',"doc", "xls", "ppt", "txt", "pdf"],
dataTime:"",
// 是否显示弹出层
open: false,
open2: false,
fileList:[],
receiveList:[],
userType:"",
readonly1:false,
display:"display:none",
display2:"",
//方案列表
......@@ -236,7 +251,10 @@ export default {
management: [
{ required: true, message: "请输入处置信息", trigger: "blur" },
],
}
},
eventTypeOptions:[],
eventGradeOptions:[],
nowItem:{},
};
},
computed:{
......@@ -244,6 +262,14 @@ export default {
"emergencyData"
]),
},
created(){
this.getDicts("event_type").then(response => {
this.eventTypeOptions = response.data;
});
this.getDicts("event_grade").then(response => {
this.eventGradeOptions = response.data;
});
},
mounted() {
// this.$nextTick(()=>{
// this.getScrollHeight();
......@@ -302,13 +328,14 @@ export default {
var newList = response.rows;
newList.forEach((model) => {
this.receiveList.forEach((item) => {
//判断登录账户等级
if(item.id == model.id){
if(this.userType==-2){
item.governmentRead =0;
item.status=3;
}else {
item.companyRead =0;
}
if(this.userType==-2){
item.governmentRead =0;
item.status=3;
}else {
item.companyRead =0;
}
}
});
});
......@@ -316,7 +343,6 @@ export default {
},
/** 查询事件接报列表 */
getList(type) {
console.log("******"+type)
listReceive(this.queryParams).then(response => {
this.receiveList = response.rows;
if(type==1){
......@@ -324,6 +350,12 @@ export default {
this.showDetail(this.$route.query.eventId,this.$route.query.eventName);
}
}
//
this.receiveList.forEach((item) => {
//console.log("ggg"+item.eventGrade, this.eventGradeOptions[item.eventGrade-1].dictLabel)
item.eventGradeName = this.eventGradeOptions[item.eventGrade-1].dictLabel;
item.eventTypeName = this.eventTypeOptions[item.eventType-1].dictLabel;
});
//this.total = response.total;
//console.log(this.receiveList)
});
......@@ -333,20 +365,26 @@ export default {
this.loading = true;
listHandle(this.queryParams2).then(response => {
this.handleList = response.rows;
this.total = response.total;
this.loading = false;
return response.total;
this.form = this.handleList[this.handleList.length-1]
this.total = response.total;
this.loading = false;
//document.getElementsByClassName("num-div")[this.handleList.length].setAttribute("class","num-div2")
});
},
showList(id) {
showList(item) {
this.closeDetail();
item.eventType=3;
this.nowItem = item;
this.dataTime = item.createTime;
this.form = item;
this.open = true;
this.title = "事件处置";
this.queryParams2.eventId= id
if(this.userType==-2){
this.queryParams2.eventType= 2;
}else {
this.queryParams2.eventType= 1;
}
this.queryParams2.eventId= item.id
// if(this.userType==-2){
// this.queryParams2.eventType= 2;
// }else {
// this.queryParams2.eventType= 1;
// }
this.getHandleList();
},
choice() {
......@@ -362,22 +400,20 @@ export default {
handleAdd() {
this.reset();
this.fileList=[]
this.readonly1=false;
this.display="";
this.form.eventType=1;
this.display2="display:none";
this.open2 = true;
this.title2 = "添加事件处置";
this.display="";
//this.title2 = "添加事件处置";
this.form.eventId = this.queryParams2.eventId
},
/** 新增预案 */
handleUpdate() {
this.reset();
this.readonly1=true;
this.display="display:none";
this.display2="";
this.display2="display:none";
this.display="";
//this.form = row;
this.open2 = true;
this.title2 = "预案指引";
// this.open2 = true;
// this.title2 = "预案指引";
this.form.eventId = this.queryParams2.eventId
this.form.eventType=2;
this.yuanList();
......@@ -416,18 +452,18 @@ export default {
},
/** 提交按钮 处置信息*/
submitForm() {
this.display2="";
this.display="display:none";
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.handleId != null) {
updateHandle(this.form).then(response => {
this.msgSuccess("修改成功");
this.open2 = false;
this.getHandleList();
});
} else {
addHandle(this.form).then(response => {
this.msgSuccess("新增成功");
this.open2 = false;
this.getHandleList();
this.upReceive(this.form.eventId);
});
......@@ -453,8 +489,10 @@ export default {
},
// 取消按钮
cancel() {
this.open2 = false;
this.display2="";
this.display="display:none";
this.reset();
this.getHandleList();
},
endevent(id){
var that = this;
......@@ -500,6 +538,13 @@ export default {
this.$parent.handleUpdate(item);
},
async showDetail(id,title){
//列表信息
this.receiveList.forEach((item) => {
if(item.id==id){
this.nowItem = item;
}
});
//详情
var that = this;
that.detailTitle=title;
that.queryParams2.eventId= id
......@@ -537,6 +582,17 @@ export default {
}
});
},
switchForm(item,$event){
if(document.getElementsByClassName("num-div2")[0]!=undefined){
document.getElementsByClassName("num-div2")[0].setAttribute("class","num-div")
}
$event.target.setAttribute("class","num-div2");
if(item!=null){
this.form = item;
}
},
//上传
getFileInfo(res){
//this.form.dealPlan = res.fileName;
......@@ -672,8 +728,13 @@ export default {
height: 100%;
width: 270px;
color: #000000;
margin-left: 20px;
margin-top: 5px;
text-align: center;
background-image: linear-gradient(
to left,
#fff,
rgb(49 151 195 / 70%) 50%,
#fff
);
}
.massage{
color: #00ffff;
......@@ -684,8 +745,52 @@ export default {
background : #112238;
border-radius: 10px;
}
.num-div{
width: 30px;
height: 30px;
border:2px solid #b0b0b0;
color: #b0b0b0;
border-radius: 15px;
text-align: center;
font-size: 18px;
line-height: 26px;
margin-left: 5px;
cursor:pointer;
}
.num-div2{
width: 30px;
height: 30px;
border:2px solid #000000;
color: #000000;
border-radius: 15px;
text-align: center;
font-size: 18px;
line-height: 26px;
margin-left: 5px;
cursor:pointer;
}
.num-line{
margin-left: 5px;
width: 100px;
height: 1px;
border:1px solid #b0b0b0;
margin-top: 14px;
}
.num-title{
width: 140px;
height: 30px;
line-height: 30px;
}
.show-detail{
overflow-y: scroll;
max-height: 800px;
}
.show-detail::-webkit-scrollbar {
width:0px;
}
::v-deep .el-dialog:not(.is-fullscreen) {
margin-top: 13vh !important;
min-height: 500px;
}
</style>
......@@ -114,9 +114,9 @@
>
<img
:src="item.imgurl"
style="margin-top: 6px;float: left; margin-right: 3px;width: 18px;height: 18px;margin-left: 10px;"
style="margin-top: 8px;float: left; margin-right: 3px;width: 18px;height: 18px;margin-left: 10px;"
/>
{{ item.name }}
{{ item.name }} ({{ item.num }})
</div>
</div>
......@@ -365,36 +365,42 @@ export default {
arr2: [
{
val: 10,
num:0,
ischeck: false,
imgurl: require("@/assets/image/yj-jydw.png"),
name: "救援队伍",
},
{
val: 11,
num:0,
ischeck: false,
imgurl: require("@/assets/image/yj-wz.png"),
name: "救援物资",
},
{
val: 12,
num:0,
ischeck: false,
imgurl: require("@/assets/image/yj-cl.png"),
name: "救援车辆",
},
{
val: 13,
num:0,
ischeck: false,
imgurl: require("@/assets/image/yj-yy.png"),
name: "医 院",
},
{
val: 15,
num:0,
ischeck: false,
imgurl: require("@/assets/image/yj-xf.png"),
name: "消防队伍",
},
{
val: 16,
num:0,
ischeck: false,
imgurl: require("@/assets/image/yj-xj.png"),
name: "巡检人员",
......@@ -536,6 +542,12 @@ export default {
listDevice(params).then(response => {
response.rows.forEach((item) => {
item.iconType = item.deviceType+9;
if(item.deviceType<5){
this.arr2[item.deviceType-1].num++;
}else {
this.arr2[item.deviceType-2].num++;
}
});
this.deviceList = response.rows;
//console.log(this.deviceList)
......@@ -1009,7 +1021,7 @@ export default {
.typelist-div {
width: 450px;
height: 50px;
z-index: 9999;
z-index: 999;
position: fixed;
top: 0;
margin-top: 80px;
......@@ -1017,16 +1029,17 @@ export default {
}
.typelist-div2{
width: 150px;
height: 50px;
z-index: 9999;
height: 230px;
z-index: 999;
position: fixed;
margin-top: 80px;
margin-left: 10px;
background: white;
margin-left: 15px;
}
.list {
z-index: 9999;
float: left;
margin-left: 15px;
color: #000000;
line-height: auto;
background: #ffffff;
......
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