فهرست منبع

任务列表,查看详情

彭宇 2 سال پیش
والد
کامیت
b653a99c83
4فایلهای تغییر یافته به همراه330 افزوده شده و 55 حذف شده
  1. 8 0
      src/api/forest.js
  2. 46 6
      src/components/v-fastmenu.vue
  3. 270 46
      src/components/vBottomMenu.vue
  4. 6 3
      src/views/eventdetailsdialog.vue

+ 8 - 0
src/api/forest.js

@@ -151,3 +151,11 @@ export function listResourceByWz(param) {
     data:param
   })
 }
+// 任务领取部门
+export function selectTaskDtpts(param) {
+  return request({
+    url: '/center-fire/VisuForestCloudMapController/selectTaskDtpts',
+    method: 'post',
+    data:param
+  })
+}

+ 46 - 6
src/components/v-fastmenu.vue

@@ -13,14 +13,14 @@
 						<img src="@/assets/images/user-photo.png" />
 						<div class="user-info">
 							<div class="user-name">
-								<h2>张三</h2><span>某某部门</span>
+								<h2>{{ nickName }}</h2><span>{{ deptNames }}</span>
 							</div>
-							<div class="phone-number">18686688888</div>
+							<div class="phone-number">{{ phonenumber }}</div>
 						</div>
 					</div>
 					<div style="margin-bottom: 1rem;">
-						<el-button type="primary" size="small">修改密码</el-button>
-						<el-button type="warning" size="small">退出登录</el-button>
+						<el-button type="primary" size="small" @click="resetPwd">修改密码</el-button>
+						<el-button type="warning" size="small" @click="logout">退出登录</el-button>
 					</div>
 					<a href="#" style="border-top: 1px solid #334780;"><i class="el-icon-s-home"></i>返回首页</a>
 					<a href="#"><i class="el-icon-monitor"></i>管理系统</a>
@@ -30,14 +30,25 @@
 				</div>
 			</el-popover>
 		</div>
+    <el-dialog title="修改密码" :visible.sync="isResetPwd" v-if="isResetPwd" width="50%" append-to-body>
+      <resetPwd :user="user" />
+    </el-dialog>
 	</div>
 </template>
 
 <script>
+import resetPwd from "../views/system/user/profile/resetPwd";
+import { getUserProfile } from "@/api/system/user";
 	export default {
+    components: {resetPwd },
 		data() {
 			return {
-				visible: false
+        user: {},
+				visible: false,
+        isResetPwd: false,
+        nickName:null,
+        deptNames:null,
+        phonenumber:null,
 				// fastMenu: [{
 				// 		name: '返回首页',
 				// 		path: '/',
@@ -54,7 +65,25 @@
 
 			}
 		},
+    created() {
+      this.getUser()
+    },
 		methods: {
+      getUser(){
+        getUserProfile().then(response => {
+          this.nickName=response.data.nickName
+          this.deptNames=response.data.deptNames
+          this.phonenumber=response.data.phonenumber
+        });
+      },
+      resetPwd(){
+        getUserProfile().then(response => {
+          this.user = response.data;
+          this.roleGroup = response.roleGroup;
+          this.postGroup = response.postGroup;
+          this.isResetPwd=true
+        });
+      },
 			backToMainPage() {
 				let href = window.location.href
 				let protacal = href.substr(0, href.indexOf("://") + 3)
@@ -64,6 +93,17 @@
 				let toUrl = url + ":15001/index58"
 				window.location.href = toUrl
 			},
+      async logout() {
+        this.$confirm('确定注销并退出系统吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$store.dispatch('LogOut').then(() => {
+            location.href = '/index';
+          })
+        }).catch(() => {});
+      }
 		},
 		computed: {},
 
@@ -157,7 +197,7 @@
 	}
 	.el-popover{
 		background:#0c1327;
-		border:1px solid #334780; 
+		border:1px solid #334780;
 		box-shadow:$shadowListHover;
 		border-radius: 1rem;
 	}

+ 270 - 46
src/components/vBottomMenu.vue

@@ -109,26 +109,26 @@
             <div class="btm-r-pop-info-con">
               <div class="btm-r-pop-info-list">
                 <div class="btm-r-pop-info-list-name">标题</div>
-                <div class="btm-r-pop-info-list-text">四平阿斯利康大姐夫啊路上的风景可丽金啊水电分离家</div>
+                <div class="btm-r-pop-info-list-text">{{ item.taskTitle }}</div>
               </div>
               <div class="btm-r-pop-info-list">
                 <div class="btm-r-pop-info-list-name">发起人</div>
-                <div class="btm-r-pop-info-list-text">张三</div>
+                <div class="btm-r-pop-info-list-text">{{ item.sendPersonName }}</div>
               </div>
               <div class="btm-r-pop-info-list">
                 <div class="btm-r-pop-info-list-name">发起时间</div>
-                <div class="btm-r-pop-info-list-text">2022-09-05 12:12:15</div>
+                <div class="btm-r-pop-info-list-text">{{ item.taskSendTime }}</div>
               </div>
               <div class="btm-r-pop-info-list">
                 <div class="btm-r-pop-info-list-name">关联事件</div>
-                <div class="btm-r-pop-info-list-text">啊萨杜拉副科级啊萨杜拉副科级</div>
+                <div class="btm-r-pop-info-list-text">{{ item.eventName }}</div>
               </div>
             </div>
             <div class="btm-r-pop-info-btm">
-              <el-link type="success">查看详情</el-link>
+              <el-link type="success" @click="showEventDialog( item.eventCode )">查看详情</el-link>
               <div class="btm-r-pop-info-btm-btn">
-                <el-button type="danger">拒绝</el-button>
-                <el-button type="primary">领取</el-button>
+                <el-button type="danger" @click="selectTaskDtpts(item.taskId,'jj')">拒绝</el-button>
+                <el-button type="primary" @click="selectTaskDtpts(item.taskId,'lq')">领取</el-button>
               </div>
             </div>
           </div>
@@ -182,30 +182,180 @@
         <el-button size="small" icon="el-icon-refresh-right" @click="refresh">刷新</el-button>
       </el-badge>
     </div>
+    <!-- 事件详情弹层 -->
+    <el-dialog title="事件详情" :visible.sync="eventDialog" v-if="eventDialog" width="95%" append-to-body
+               @close="cancelEventShow()">
+      <div class="dia-event-info">
+        <el-row>
+          <!-- 左侧 -->
+          <el-col :span="18" class="dia-left">
+            <div ref="imageTofile" style="height: 75vh;">
+              <!-- 应急预案 -->
+              <div class="dia-left-top">
+                <div class="dia-left-top-tit">应急预案</div>
+                <div class="dia-left-top-carousel">
+                  <el-carousel height="30px" direction="vertical" :interval="2000">
+                    <el-carousel-item v-for="item in 3" :key="item">
+                      <a href="#">这是一条应急预案</a>
+                    </el-carousel-item>
+                  </el-carousel>
+                </div>
+              </div>
+              <!-- 应急预案end -->
+              <!-- 地图 -->
+              <supermapTaskDialog ref="supermapTaskDialog"
+                                  style="position: absolute; top:0;left: 0;"
+                                  :mapDiv="'taskDialogSuperMap'"
+                                  :mapSite="{zoom:12,doubleClickZoom:false,dragging:false,scrollWheelZoom:false}"
+                                  :codes="['9fa5']"
+                                  :isSideBySide="false"
+                                  :isdynamicPlotting="false"/>
+              <!-- 地图end -->
+            </div>
+          </el-col>
+          <!-- 左侧end -->
+          <!-- 右侧 -->
+          <el-col :span="6" class="dia-right" >
+            <div class="e-right" style="height: 75vh;!important;">
+              <div class="forthis" style="height: 75vh;!important;">
+                <dv-border-box-7 backgroundColor="#040b1f" :color="['#25335d', '#5baffd']"
+                                 style="padding-bottom:1rem ;height: 75vh;!important;">
+                  <div class="i-list-con" style="height: 75vh;!important;">
+                    <div class="this-con" style="height: 75vh;!important;">
+                      <div class="z-info-list" style="margin-top: 0;height: 75vh;!important;">
+                        <el-timeline  style="height: 75vh;!important;">
+                          <el-timeline-item color="#2bacf7" :timestamp="item.createTime"
+                                            placement="top" v-for="(item,index) in eventLogList">
+                            <el-card style="width: 40vh">
+                              <div class="z-info-list-con">
+                                <div class="user-and-time flex-d">
+                                  <span>{{ item.createName }}</span><span><i
+                                  class="el-icon-location"></i> 定位</span>
+                                </div>
+                                <div class="z-info">
+                                  <div class="this-con-list-info">
+                                    {{ item.logContent }}
+                                  </div>
+                                  <div>
+                                    <el-image :src="itemfile" v-if="isAssetTypeAnImage(itemfile)"
+                                              :preview-src-list="item.attachs"
+                                              style="width:3rem; height:3rem;margin: 2px;"
+                                              v-for="(itemfile,index1) in item.attachs">
+                                    </el-image>
+                                    <el-link :href="itemfile" :underline="false" target="_blank"
+                                             v-for="(itemfile,index1) in item.attachs"
+                                             v-if="!isAssetTypeAnImage(itemfile)">
+                                      <span class="el-icon-document"> {{ getFileName(itemfile) }} </span>
+                                    </el-link>
+                                  </div>
+                                </div>
+                              </div>
+                            </el-card>
+                          </el-timeline-item>
+                        </el-timeline>
+                      </div>
+                    </div>
+                  </div>
+                </dv-border-box-7>
+              </div>
+<!--              <div class="forthis">-->
+<!--                <dv-border-box-7 backgroundColor="#040b1f" :color="['#25335d', '#5baffd']">-->
+<!--                  <div class="i-list-con">-->
+<!--                    <div class="this-con h-25 no-padding">-->
+<!--                      <div class="z-info-list" style="margin-top: 0;">-->
+<!--                        <div class="z-info-btm-grp">-->
+<!--                          <div class="z-info-btm-grp-top">-->
+<!--                            <div class="z-info-btm-grp-left">-->
+<!--                              &lt;!&ndash;                                <el-button size="small" icon="el-icon-s-flag">责任制&ndash;&gt;-->
+<!--                              &lt;!&ndash;                                </el-button>&ndash;&gt;-->
+<!--                              <el-button size="small" icon="el-icon-upload" @click="showEventLogUpload()">上传-->
+<!--                              </el-button>-->
+<!--                              <el-button size="small" icon="el-icon-download" @click="toImage()">保存-->
+<!--                              </el-button>-->
+<!--                            </div>-->
+<!--                            <div class="z-info-btm-grp-right">-->
+<!--                              <el-button size="small" icon="el-icon-mic">会议-->
+<!--                              </el-button>-->
+<!--                            </div>-->
+<!--                          </div>-->
+<!--                        </div>-->
+<!--                      </div>-->
+<!--                    </div>-->
+<!--                  </div>-->
+<!--                </dv-border-box-7>-->
+<!--              </div>-->
+            </div>
+
+          </el-col>
+          <!-- 左侧end -->
+        </el-row>
+      </div>
+    </el-dialog>
+    <!-- 任务选择领取部门弹层 -->
+    <el-dialog title="选择部门" :visible.sync="showDeptConfirm" v-if="showDeptConfirm" width="80%" append-to-body
+               @close="cancelEventConfirm()">
+      <el-form label-width="80px">
+        <el-form-item label="选择部门">
+          <el-select v-model="sendDeptName" clearable placeholder="请选择部门" class="m-r-1rem" @change="setValue">
+            <el-option
+              v-for="item in deptOptions"
+              :key="item.deptId"
+              :label="item.deptName"
+              :value="{value:item.deptId,label:item.deptName}"><!--:disabled="item.eventStatus=='未处理' ? false:true"-->
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-button size="mini" type="primary" v-if="taskStatusButton=='lq'"
+                   @click="updateCentereventTEventcatalogueStatus('ld',true)">领取
+        </el-button>
+        <el-button size="mini" type="primary" v-if="taskStatusButton=='jj'"
+                   @click="updateCentereventTEventcatalogueStatus('ld',true)">拒绝
+        </el-button>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import {
-  selectTaskBO,
+  selectTaskBO,getEventDetail,selectTaskDtpts
 } from '@/api/forest'
+import supermapTaskDialog from '@/components/supermap' //超图
 
 export default {
+  components: {
+    supermapTaskDialog
+  },
   data() {
     return {
-      taskCount:0,//任务数量
-      taskList:0,//任务列表
+      eventId: null,
+      eventCode: null,
+      longitude: null,
+      latitude: null,
+      eventLogList: [],//事件详情日志
+      eventDialog: false,//事件详情弹层
+      taskStatusButton: null,//任务按钮
+
+      showDeptConfirm:false,//任务领取选择部门弹窗
+      deptOptions: [],//任务领取部门
+      sendDeptId: null,//任务领取部门
+      sendDeptName: null,//任务领取部门
+
+
+      taskCount: 0,//任务数量
+      taskList: 0,//任务列表
 
       btmTipIndent: '', //图例收起弹出
       eventLocationVisible: false,
       showChild: false,
       showBanChild: false, //林斑
       showChangChild: false, //林场
-      fastMenu: [{
-        name: '事件定位',
-        icon: 'iconfont sj-icon-sjdw',
-        click: 'eventLocation'
-      },
+      fastMenu: [
+        {
+          name: '事件定位',
+          icon: 'iconfont sj-icon-sjdw',
+          click: 'eventLocation'
+        },
         {
           name: '图层切换',
           icon: 'iconfont sj-icon-tcqh',
@@ -233,41 +383,42 @@ export default {
           click: 'TVWall'
         }
       ],
-      data: [{
-        label: '一级 1',
-        children: [{
-          label: '二级 1-1',
-          children: [{
-            label: '三级 1-1-1'
-          }]
-        }]
-      }, {
-        label: '一级 2',
-        children: [{
-          label: '二级 2-1',
+      data: [
+        {
+          label: '一级 1',
           children: [{
-            label: '三级 2-1-1'
+            label: '二级 1-1',
+            children: [{
+              label: '三级 1-1-1'
+            }]
           }]
         }, {
-          label: '二级 2-2',
-          children: [{
-            label: '三级 2-2-1'
-          }]
-        }]
-      }, {
-        label: '一级 3',
-        children: [{
-          label: '二级 3-1',
+          label: '一级 2',
           children: [{
-            label: '三级 3-1-1'
+            label: '二级 2-1',
+            children: [{
+              label: '三级 2-1-1'
+            }]
+          }, {
+            label: '二级 2-2',
+            children: [{
+              label: '三级 2-2-1'
+            }]
           }]
         }, {
-          label: '二级 3-2',
+          label: '一级 3',
           children: [{
-            label: '三级 3-2-1'
+            label: '二级 3-1',
+            children: [{
+              label: '三级 3-1-1'
+            }]
+          }, {
+            label: '二级 3-2',
+            children: [{
+              label: '三级 3-2-1'
+            }]
           }]
-        }]
-      }],
+        }],
 
       defaultProps: {
         children: 'children',
@@ -280,15 +431,88 @@ export default {
     }
   },
   methods: {
-    refreshTaskList(){
+    setValue(event) {
+      //签收选择部门
+      this.sendDeptName = event.label
+      this.sendDeptId = event.value
+    },
+    selectTaskDtpts(taskId,state){
+      selectTaskDtpts({taskId: taskId}).then(res => {
+        //任务领取部门
+        if (res.code == 200) {
+          this.deptOptions = res.data
+          this.taskStatusButton=state
+          this.showDeptConfirm=true
+        }
+      })
+    },
+    cancelEventShow() {
+      console.log('关闭事件弹窗')
+      this.eventLogList = []
+    },
+    cancelEventConfirm() {
+      console.log('关闭任务选择部门')
+      this.deptOptions = []
+      this.sendDeptId = null
+      this.sendDeptName = null
+    },
+    showEventDialog(eventCode) {
+      this.eventCode = eventCode
+      let that = this
+      //获取事件详情
+      getEventDetail({ eventCode: eventCode }).then(res => {
+        this.eventDialog = true
+        this.eventLogList = res.data.eventlog
+        if (res.data.catalogue != null && res.data.catalogue.length > 0) {
+          this.eventType = res.data.catalogue[0].eventType
+          this.eventId = res.data.catalogue[0].id
+          this.longitude = res.data.catalogue[0].longitude
+          this.latitude = res.data.catalogue[0].latitude
+          let markersMap = {
+            lng: 124.59,
+            lat: 43.02,
+            icon: 'marker',
+            bindPopupHtml: '',
+            click: '',
+            parameter: '',
+            keepBindPopup: false,
+            isAggregation: false,
+            radius: 0
+          }
+
+          if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_1') {
+            markersMap.icon = 'sj-icon-map-wcl'
+            markersMap.isAggregation = false
+          } else if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_2' || res.data.catalogue[0].eventStatusValue == 'forest_event_status_3' || res.data.catalogue[0].eventStatusValue == 'forest_event_status_4' || res.data.catalogue[0].eventStatusValue == 'forest_event_status_5') {
+            markersMap.icon = 'sj-icon-map-clz'
+          } else if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_6') {
+            markersMap.icon = 'sj-icon-map-ywc'
+          } else {
+            markersMap.icon = 'sj-icon-map-clz'
+          }
+          markersMap.lng = res.data.catalogue[0].longitude
+          markersMap.lat = res.data.catalogue[0].latitude
+          if (res.data.eventdetail != null && res.data.eventdetail.length > 0 && res.data.eventdetail[0].fireRadius != null && res.data.eventdetail[0].fireRadius != '' && res.data.eventdetail[0].fireRadius > 0) {
+            markersMap.radius = res.data.eventdetail[0].fireRadius
+          }
+          setTimeout(() => {
+            // that.$refs.supermapTaskDialog.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
+            that.$refs.supermapTaskDialog.clearM(false)
+            that.$refs.supermapTaskDialog.setMarkersRadius([markersMap])
+            that.$refs.supermapTaskDialog.dropLocation(res.data.catalogue[0].latitude, res.data.catalogue[0].longitude)
+          }, 1000)
+        }
+      })
+    },
+    refreshTaskList() {
       //刷新任务列表
       this.selectTaskList()
     },
-    selectTaskList: async function(){
+    selectTaskList: async function() {
       //获取任务列表
       selectTaskBO().then(res => {
-        this.taskList=res.data
-        this.taskCount=res.data.length
+        this.taskList = res.data
+        this.taskCount = res.data.length
       })
     },
     handleCheckedCitiesChangeBan(value) {

+ 6 - 3
src/views/eventdetailsdialog.vue

@@ -151,7 +151,7 @@
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
                                 </el-button>
                               </div>
-                              <div class="z-info-btm-input-btn" v-if="eventStatusValue=='forest_event_status_2'">
+                              <div class="z-info-btm-input-btn" v-else-if="eventStatusValue=='forest_event_status_2'">
                                 <div>
                                   <el-button size="small"
                                              icon="el-icon-question"
@@ -174,11 +174,10 @@
                                     办结
                                   </el-button>
                                 </div>
-
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
                                 </el-button>
                               </div>
-                              <div class="z-info-btm-input-btn" v-if="eventStatusValue=='forest_event_status_5'">
+                              <div class="z-info-btm-input-btn" v-else-if="eventStatusValue=='forest_event_status_5'">
                                 <el-button size="small"
                                            icon="el-icon-success" style="text-align:left"
                                            @click="updateCentereventTEventcatalogueStatus('gd',false)">
@@ -187,6 +186,10 @@
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
                                 </el-button>
                               </div>
+                              <div class="z-info-btm-input-btn" v-else>
+                                <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
+                                </el-button>
+                              </div>
                             </div>
                           </div>
                         </div>