Browse Source

页面提交

wang_xy 3 days ago
parent
commit
63e8ede6ae

+ 1 - 1
src/api/event.js

@@ -33,7 +33,7 @@ export function eventTypesListAll() {
  */
 export function getEventList(param) {
   return request({
-    url: '/sooka-digital-construction/eventSubject/getEventList',
+    url: '/sooka-digital-construction/eventSubject/getTotalEventList',
     method: 'get',
     params: param
   })

+ 26 - 9
src/views/SenEquipmentCenter.vue

@@ -2,9 +2,16 @@
 <template>
 	<div class="visual-con hz_body">
     <div class="con_left">
-      <div class="list_tit">设备分析</div>
+      <div class="list_tit">企业设备分布</div>
       <div class="company_fx" ref="echartsByCompany"></div>
+      <div class="company_fx_text">
+        <span v-for="item in commanyInfo">
+          {{item.name}}:{{item.value}}
+        </span>
+      </div>
+      <div class="list_tit">部门设备分布</div>
       <div class="type_fx" ref="echartsByType"></div>
+      <div class="list_tit">设备在离线分析</div>
       <div class="onoff_fx" ref="echartsByOnOff"></div>
     </div>
 		<!--主体-->
@@ -122,6 +129,8 @@
 				value: '',
 				isDetailVisible:false,          // 设备弹窗显隐flag
 				detailInfo:{},                  // 设备详情信息
+
+        commanyInfo:[],
 			}
 		},
 		methods: {
@@ -130,13 +139,14 @@
           const seriesData = []
           for(let item of res.data){
             seriesData.push({name:item.brandName,value:item.count})
+            this.commanyInfo.push({name:item.brandName,value:item.count})
           }
           const echartsByCompany = echarts.init(this.$refs.echartsByCompany);
           let echartsByCompanyOption = {
             series: [
               {
                 type: 'pie',
-                radius: ['30%', '60%'],
+                radius: ['40%', '60%'],
                 avoidLabelOverlap: false,
                 padAngle: 10,
                 itemStyle: {
@@ -257,12 +267,12 @@
                 type: 'pie',
                 id: 'pie',
                 radius: '30%',
-                center: ['50%', '25%'],
+                center: ['50%', '30%'],
                 emphasis: {
                   focus: 'self'
                 },
                 label: {
-                  formatter: '{b}: {@地埋} ({d}%)'
+                  formatter: '{@地埋} ({d}%)'
                 },
               }
             ]
@@ -400,7 +410,7 @@
 
 	.tk_div{
 		width: 21%;
-		height: 36%;
+		height: 38%;
 		position: absolute;
 		top: 24%;
 		left: 32.2%;
@@ -485,18 +495,25 @@
 	}
   //图表设备分析
   .company_fx {
-    width: 100%;
-    height: 240px;
+    width: 80%;
+    height: 200px;
+  }
+  .company_fx_text{
+    width: 20%;
+    margin-left: 14rem;
+    top: 6rem;
+    position: inherit;
+    color: #a3d5da;
   }
 
   .type_fx {
     width: 100%;
-    height: 240px;
+    height: 200px;
   }
 
   .onoff_fx {
     width: 100%;
-    height: 240px;
+    height: 200px;
   }
 
   .sp_list .dt1{

+ 1 - 24
src/views/SenEventCenter.vue

@@ -35,29 +35,6 @@
       <div class="enterprise_analyze" ref="enterpriseAnalyze"></div>
 		</div>
 		<div class="con_right">
-<!--			<div class="list_tit list_tit2">应急中心<i>发起应急事件</i></div>-->
-<!--			<el-input-->
-<!--					placeholder="请输入事件名称"-->
-<!--					suffix-icon="el-icon-search"-->
-<!--          @change="getEventRight(1)"-->
-<!--					v-model="searchRight">-->
-<!--			</el-input>-->
-<!--			<dl class="sp_list yjsj_list">-->
-<!--				<dt><span class="dt1">序号</span><span class="dt2">应急事件名称</span><span class="dt3">发生时间</span></dt>-->
-<!--				<div class="hei_scroll hei64">-->
-<!--          <dd v-for="(item,index) in eventRightList">-->
-<!--            <span class="dt1">{{index+1}}</span><span class="dt2">{{item.eventTitle.length>5?item.eventTitle.substring(0,5)+'...':item.eventTitle}}</span><span class="dt3">{{item.createTime}}</span>-->
-<!--          </dd>-->
-<!--				</div>-->
-<!--			</dl>-->
-<!--			<el-pagination-->
-<!--					background-->
-<!--					layout="prev, pager, next"-->
-<!--          @prev-click="getEventRight"-->
-<!--          @next-click="getEventRight"-->
-<!--          @current-change="getEventRight"-->
-<!--					:total="rightTotal">-->
-<!--			</el-pagination>-->
       <div class="list_tit">事件列表</div>
       <div style="display: flex; gap: 10px;">
         <el-select v-model="eventType" placeholder="请选择" @change="getEventLeft(1)" style="flex: 1;">
@@ -389,7 +366,7 @@
         })
       },
       flyTo(longitude,latitude){
-        this.$parent.$refs.supermap.dropLocation(longitude * 1,latitude * 1);
+        this.$parent.$refs.supermap.dropLocation(latitude * 1,longitude * 1);
       },
       getEventRight(pageNum){
         let param = {

+ 91 - 38
src/views/SentryEmergencyCenter.vue

@@ -87,12 +87,20 @@
 			<dl class="sp_list">
 				<div class="hei_scroll hei67">
 					<dd v-for="(e,idx) in planListSearch" :key="idx" @click="dropLocation(e.latitude,e.longitude)" class="planItem">
-						<div style="width: 100%;" :title=" '预案内容:' + e.contingencyPlanContent">
+						<div style="width: 100%;">
 							<img src="@/assets/images/planIcon.png">
-							<div>
-								<div :title="e.contingencyPlanName">{{ e.contingencyPlanName }}</div>
-								<div style="height: 36%;line-height: 1;">{{ e.createTime }}</div>
-							</div>
+              <el-popover
+                placement="top-start"
+                title="预案内容"
+                width="200"
+                trigger="hover"
+                popper-class="popperClass"
+                :content="e.contingencyPlanContent">
+                <div slot="reference">
+                  <div :title="e.contingencyPlanName">{{ e.contingencyPlanName }}</div>
+                  <div style="height: 36%;line-height: 1;">{{ e.createTime }}</div>
+                </div>
+              </el-popover>
 						</div>
 					</dd>
 				</div>
@@ -113,7 +121,7 @@
             custom-class="emergencyEventDialog"
             style="margin-top: 5vh !important;"
             >
-			<div class="continueForm_contain" @click="getDescriptionByContingency">继续填写</div>
+          <button class="continueForm_contain" @click="getDescriptionByContingency">信息补充</button>
             <div class="transferBg d1">
                 <h3>事件基本信息</h3>
                 <div class="eventInfo_contain">
@@ -176,11 +184,12 @@
                     <div class="transferBg pics">
                         <h3>其他画面</h3>
 						<div class="otherPics">
-							<img
-								v-for="(e,idx) in emergencyEventDetails.attachPath ? emergencyEventDetails.attachPath : []"
-								:key="idx"
-								:src="e"
-							>
+              <router-link to="#" v-for="item in emergencyEventDetails.attachPath">
+                <el-image :src="item"
+                          :preview-src-list="assetTypeAnImage(item)"
+                          style="width:8rem; height:8rem;margin: 5px;">
+                </el-image>
+              </router-link>
 						</div>
                     </div>
                 </div>
@@ -219,27 +228,30 @@
 					<el-form-item label="纬度" prop="latitude" style="width: 350px;height: 40px;">
 						<el-input v-model="ruleForm.latitude"></el-input>
 					</el-form-item>
-					<!-- <el-form-item label="部门" prop="deptList" style="width: 350px;height: 40px;">
-						<el-select v-model="ruleForm.deptList" placeholder="选择部门" popper-class="deptDropdown" @clear="clearall" ref="mySelect clearable">
-							<el-row class="blRow">
-								<el-col>
-									<el-option :value="deptList" disabled>
-										<el-tree
-											:data="deptOptions"
-											:props="defaultProps"
-											ref="tree"
-											show-checkbox
-											check-strictly
-											:expand-on-click-node="false"
-											node-key="id"
-											check-on-click-node
-											@check-change="handleNodeClick"
-										></el-tree>
-									</el-option>
-								</el-col>
-							</el-row>
-						</el-select>
-					</el-form-item> -->
+					<el-form-item label="部门" prop="deptList" style="width: 350px;height: 40px;">
+<!--						<el-select v-model="ruleForm.deptList" placeholder="选择部门" popper-class="deptDropdown" @clear="clearall" ref="mySelect clearable">-->
+<!--							<el-row class="blRow">-->
+<!--								<el-col>-->
+<!--									<el-option :value="deptList" disabled>-->
+<!--										<el-tree-->
+<!--											:data="deptOptions"-->
+<!--											:props="defaultProps"-->
+<!--											ref="tree"-->
+<!--											show-checkbox-->
+<!--											check-strictly-->
+<!--											:expand-on-click-node="false"-->
+<!--											node-key="id"-->
+<!--											check-on-click-node-->
+<!--											@check-change="handleNodeClick"-->
+<!--										></el-tree>-->
+<!--									</el-option>-->
+<!--								</el-col>-->
+<!--							</el-row>-->
+<!--						</el-select>-->
+            <el-tree class="tree-border tree_scroll" style="height: 23vh; overflow-y:scroll" :data="deptOptionsLiandong"
+                     show-checkbox ref="LiandongDept" node-key="id" :check-strictly="true"
+                     :accordion="true" empty-text="加载中,请稍候" :props="defaultProps"></el-tree>
+					</el-form-item>
 					<el-form-item label="图片" prop="fileList" style="width: 1200px;height: 40px;">
 						<ImageUpload :fileType="['jpg', 'png','jpeg']" :limit="5" :value="fileList"  @input="getUrl"></ImageUpload>
 					     <template #label></template>
@@ -357,11 +369,13 @@
 	import {
 		selectConfigKey
 	} from "@/api/system/config";
+  import {Button} from "@/dahua/lib/iview";
 	// import * as echarts from 'echarts'
 	let echarts = require("echarts");
 	export default {
 		name:'MyChart',
 		components: {
+      Button,
 			supermap,
 			ImageUpload
 		},
@@ -379,6 +393,7 @@
 		},
 		created() {
 			// this.getListDeviceAll()
+      this.getDeptTreeselect();
 		},
 		mounted() {
 			// 初始化地图数据
@@ -398,6 +413,7 @@
 		},
 		data() {
 			return {
+        deptOptionsLiandong: [],
 				deptId:null,
 				isVisible: false, // 初始时设置为false,不显示内容
 				input:'',
@@ -490,6 +506,21 @@
 			}
 		},
 		methods: {
+      // 获取部门列表树
+      getDeptTreeselect(){
+        treeselectAll().then((response) => {
+          this.deptOptionsLiandong = response.data;
+        });
+      },
+      assetTypeAnImage(filePath) {
+        let imageList = []
+        if (filePath != null && filePath.length > 0) {
+          for (let i = 0; i < filePath.length; i++) {
+            imageList.push(filePath)
+          }
+        }
+        return imageList
+      },
 			handleInput(val){
 				this.ruleForm.contingencyDetail.eventEarlyWarning = val.replace(/[^0-9]/g, '')
 			},
@@ -527,6 +558,7 @@
 			},
             // 发起应急事件
             setEmergencyEvent(){
+              this.currentFormStatus = 0
                 this.setEventDialogVisible = true
 				setTimeout(() => {
 					this.resetForm('ruleForm')
@@ -599,8 +631,16 @@
                 this.dropLocation(latitude ,longitude)
             },
             submitForm(formName) {
-                this.$refs[formName].validate((valid) => {
+          this.$refs[formName].validate((valid) => {
 					if (valid) {
+            const deptList = [];
+            let array = this.$refs.LiandongDept.getCheckedNodes();
+            if(array!=null && array.length!=0){
+              for(let item of array){
+                deptList.push({mapDeptId:item.id,mapDeptName:item.label});
+              }
+              this.ruleForm.deptList = deptList;
+            }
 						this.reportParams = this.ruleForm
 						// 整理附件
 						let attachList = []
@@ -1118,6 +1158,9 @@
 			}
 		},
 		watch:{
+      filterText(val) {
+        this.$refs.LiandongDept.filter(val)
+      },
 			['eventParams.eventTitle'](){
 				this.getEventList()
 			},
@@ -1127,6 +1170,15 @@
 		}
 	}
 </script>
+<style lang="scss">
+  .popperClass {
+    background-color: #1c3a40 !important;
+    color: #8bc0cb !important;
+    >div{
+      color: #FFF !important;
+    }
+  }
+</style>
 <style rel="stylesheet/scss" lang="scss">
 
 	.deptDropdown{
@@ -1190,7 +1242,7 @@
 			}
 		}
 		img{
-			margin: 3% 0 0 8%;
+			margin: 2% 13px -7px 8%;
     		width: 17%;
 		}
 	}
@@ -1214,11 +1266,12 @@
         }
 		.continueForm_contain{
 			position: absolute;
+      width:8vh;
 			right: 3%;
 			top: 10%;
-			color: #2878FF;
-			text-decoration: underline;
-			cursor: pointer;
+			color: #fff;
+      background-color: #5bdddd;
+      border-radius: 10px;
 		}
         .d1{
             height: 20%;
@@ -1373,7 +1426,7 @@
 
 	.tk_div{
 		width: 21%;
-		height: 36%;
+		height: 38%;
 		position: absolute;
 		top: 24%;
 		left: 32.2%;

+ 19 - 5
src/views/SentryPage.vue

@@ -49,7 +49,7 @@
 					<h1>
 						<span :title="detailInfo.deviceName || '--'" style="display: inline-block;overflow: hidden;width: 62%;text-overflow: ellipsis;">{{ detailInfo.deviceName || '--' }}</span>
 						<i class="el-icon el-icon-close" style="margin-left: 5%;cursor: pointer;" @click="closeDetail"></i>
-						<i>{{ detailInfo.workingStatus == '1' ? '离线' : '在线' }}</i>
+            <i>{{ detailInfo.workingStatus == '1' ? '离线' : '在线' }}</i>
 					</h1>
 					<p>设备名称:{{ detailInfo.deviceName || '--' }}</p>
 					<p>设备类型:{{ detailInfo.deviceTypeText || '--' }}</p>
@@ -163,7 +163,7 @@
             </el-scrollbar>
             <div class="spsb_xx">
               <div class="spsb_xx_btn">
-                <el-tree class="tree-border tree_scroll" style="height: 31vh; overflow-y:scroll" :data="deptOptionsLiandong"
+                <el-tree class="tree-border tree_scroll" style="height: 23vh; overflow-y:scroll" :data="deptOptionsLiandong"
                          v-if="eventDetails.eventStatus=='event_confirmation'||eventDetails.eventStatus=='event_signature'"
                          show-checkbox ref="LiandongDept" node-key="id" :check-strictly="true"
                          :accordion="true" empty-text="加载中,请稍候" :props="defaultProps"></el-tree>
@@ -178,7 +178,7 @@
                 <el-button type="primary"  v-if="eventDetails.eventStatus=='event_signature'" @click="eventCompletion(eventDetails)">办结</el-button>
                 <el-button type="primary"  v-if="eventDetails.eventStatus=='event_completion'" @click="eventReview(eventDetails)">审核</el-button>
                 <el-button type="primary"  v-if="eventDetails.eventStatus=='event_archiving'" @click="eventArchiving(eventDetails)">归档</el-button>
-                <button class="spsb_fs_btn" @click="addEventLogDescription(eventDetails)">发送</button>
+                <button class="spsb_fs_btn" @click="addEventLogDescription(eventDetails)">督办</button>
               </div>
             </div>
           </div>
@@ -200,7 +200,12 @@
           <p>负责人电话:{{ areaDetailInfo.phone || '--' }}</p>
           <p>户数:{{ areaDetailInfo.houseNum || '--' }}</p>
           <p>人数:{{ areaDetailInfo.personNum || '--' }}</p>
-          <img class="area_url" v-for="(img,index) in areaDetailInfo.imageUrls" :src="img"/>
+          <router-link to="#" v-for="item in areaDetailInfo.imageUrls">
+            <el-image :src="item"
+                      :preview-src-list="assetTypeAnImage(item)"
+                      style="width:6rem; height:6rem;margin: 2px;">
+            </el-image>
+          </router-link>
         </div>
       </div>
 		</div>
@@ -306,6 +311,15 @@
 
 		},
     methods:{
+      assetTypeAnImage(filePath) {
+        let imageList = []
+        if (filePath != null && filePath.length > 0) {
+          for (let i = 0; i < filePath.length; i++) {
+            imageList.push(filePath)
+          }
+        }
+        return imageList
+      },
       openAreaDetails(param){
         this.isAreaDetailVisible = true;
         this.areaDetailInfo = param;
@@ -1256,7 +1270,7 @@
     }
   .spsb_text{
     width: 100%;
-    height: 260px;
+    height: 180px;
     margin: 10px 0px!important;
     padding: 5px;
     border-color: #1e6a78;