From 2947529037e8bb09ab2a304a86de4cfca0144a0f Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 10 Oct 2022 16:15:26 +0800
Subject: [PATCH] 事件添加标题,任务详情查询关联事件
---
src/views/taskinfo/taskinfoDetail.vue | 125 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 122 insertions(+), 3 deletions(-)
diff --git a/src/views/taskinfo/taskinfoDetail.vue b/src/views/taskinfo/taskinfoDetail.vue
index 711dde0..2ca6fe2 100644
--- a/src/views/taskinfo/taskinfoDetail.vue
+++ b/src/views/taskinfo/taskinfoDetail.vue
@@ -84,9 +84,10 @@
</el-row>
</el-form>
</el-card>
+
<!--巡检人员信息-->
<div
- style="margin-top: 70px"
+ style="margin-top: 15px"
role="tab"
aria-expanded="true"
aria-controls="el-collapse-content-823"
@@ -103,7 +104,6 @@
</div>
</div>
</div>
-
<el-card>
<el-table
ref="multipleTable"
@@ -117,6 +117,86 @@
<el-table-column prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
</el-card>
+
+ <!--事件信息-->
+ <div v-if="eventgmList.length>0">
+ <div
+ style="margin-top: 15px"
+ role="tab"
+ aria-expanded="true"
+ aria-controls="el-collapse-content-823"
+ aria-describedby="el-collapse-content-823"
+ >
+ <div
+ role="button"
+ tabindex="0"
+ class="el-collapse-item__header focusing is-active"
+ >
+ <div class="avue-group__header avue-group">
+ <i class="el-icon-s-custom avue-group__icon"></i>
+ <h1 class="avue-group__title">相关事件信息</h1>
+ </div>
+ </div>
+ </div>
+ <el-card>
+ <el-form v-for="eventgm in eventgmList"
+ :model="form"
+ label-position="right"
+ size="mini"
+ class="taskinfoForm"
+ label-width="70px"
+ style="
+ margin-top: 20px;
+ margin-left: 10px;
+ margin-right: 10px;
+ height: calc(100% - 40px);
+ width: calc(100% - 20px);
+ "
+ >
+ <el-row>
+ <el-col span="24">
+ <el-form-item label="地点">
+ <el-input disabled="true" v-model="eventgm.address" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="24">
+ <el-form-item label="事件类型">
+ <el-input disabled="true" v-model="eventgm.typeName" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="事件状态">
+ <el-input disabled="true" v-model="eventgm.stateName" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="事件来源">
+ <el-input disabled="true" v-model="eventgm.source" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col span="24">
+ <el-form-item label="内容">
+ <el-input disabled="true" v-model="eventgm.remark" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12" v-if="eventgm.no">
+ <el-form-item label="工单编号">
+ <el-input disabled="true" v-model="eventgm.no" autocomplete="off"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-divider></el-divider>
+ </el-form>
+ </el-card>
+ </div>
+
</el-card>
</div>
</el-col>
@@ -131,6 +211,9 @@
<script>
import OpenLayersMap from "@/components/OpenLayersMap/index";
import {getUser} from "@/api/system/user"
+import {getDetail} from "@/api/taskinfo/taskinfo";
+import {getDictionary} from "@/api/system/dictbiz";
+
export default {
name: "taskinfoDetail",
components: {OpenLayersMap},
@@ -139,12 +222,14 @@
return{
taskinfo:{},
form:{},
- accepterInfo:[]
+ accepterInfo:[],
+ eventgmList:[],
}
},
created() {
this.form = this.detailInfo;
this.getUser()
+ this.getEventgmList()
},
methods:{
//获取巡检人员信息
@@ -157,6 +242,40 @@
})
}
},
+ getEventgmList(){
+ getDetail(this.form.id).then(res=>{
+ if(res.data.code == 200){
+ if (res.data.data.eventgmList.length>0){
+ this.eventgmList = res.data.data.eventgmList
+ getDictionary({code:"EVENT_TYPE"}).then(res=>{
+ if(res.data.code == 200){
+
+ this.eventgmList.forEach(e=>{
+ res.data.data.forEach(k=>{
+ if (e.type == k.dictKey){
+ e.typeName = k.dictValue
+ }
+ })
+ })
+
+ }
+ })
+
+ getDictionary({code:"EVENT_STATE"}).then(res=>{
+ if(res.data.code == 200){
+ this.eventgmList.forEach(e=>{
+ res.data.data.forEach(k=>{
+ if (e.state == k.dictKey){
+ e.stateName = k.dictValue
+ }
+ })
+ })
+ }
+ })
+ }
+ }
+ })
+ },
handleBack(){
this.$emit('isDetail');
}
--
Gitblit v1.9.3