소스 검색

应急修改

qinhouyu 2 년 전
부모
커밋
44af8ac60a
3개의 변경된 파일52개의 추가작업 그리고 18개의 파일을 삭제
  1. 30 3
      src/api/monitor.js
  2. 21 14
      src/views/eventLogUpload.vue
  3. 1 1
      src/views/leader.vue

+ 30 - 3
src/api/monitor.js

@@ -44,18 +44,45 @@ export function getSensorListByDeptId(deptId) {
     method: 'get',
   })
 }
+// //根据部门id查询部门及部门以下的数据,没有则默认查询所有
+// export function getDlblistBydeptId(deptId) {
+//   return request({
+//     url: '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?deptId=' + deptId,
+//     method: 'get',
+//   })
+// }
+// //根据部门id查询部门及部门以下的数据,没有则默认查询所有
+// export function getMonitorDeviceAndDataList(deptId) {
+//   return request({
+//     url: '/center-monitor/device/getMonitorDeviceAndDataList?deptId='+ deptId,
+//     method: 'get',
+//   })
+// }
+
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getDlblistBydeptId(deptId) {
+  let url = "";
+  if(deptId!=null){
+    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
+  }else{
+    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId';
+  }
   return request({
-    url: '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?deptId=' + deptId,
+    url: url,
     method: 'get',
   })
 }
+
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getMonitorDeviceAndDataList(deptId) {
+  let url = "";
+  if(deptId!=null){
+    url= '/center-monitor/device/getMonitorDeviceAndDataList?deptId=' + deptId;
+  }else{
+    url= '/center-monitor/device/getMonitorDeviceAndDataList';
+  }
   return request({
-    url: '/center-monitor/device/getMonitorDeviceAndDataList?deptId='+ deptId,
+    url: url,
     method: 'get',
   })
 }
-

+ 21 - 14
src/views/eventLogUpload.vue

@@ -123,22 +123,29 @@ export default {
   methods: {
     submitUpload() {
       let fileUrl=[]
-      if(this.fileList!=null&&this.fileList.length>0){
-        for (let i = 0; i < this.fileList.length; i++) {
-          let file={attachPath:this.fileList[i].url,fileName:this.fileList[i].webName,busIndx:  "bus_indx_forest",busSource: "PC"}
-          fileUrl.push(file)
+      if (this.fileList!=null&&this.fileList.length>0)
+      {
+        if(this.fileList!=null&&this.fileList.length>0){
+          for (let i = 0; i < this.fileList.length; i++) {
+            let file={attachPath:this.fileList[i].url,fileName:this.fileList[i].webName,busIndx:  "bus_indx_forest",busSource: "PC"}
+            fileUrl.push(file)
+          }
         }
+        let param={ eventCode:this.eventCode,operation:"bus_oper_type_2",operationType:"log_oper_type_1",fileList: fileUrl }
+        //日志文件上传
+        eventLogUpload(param).then(res => {
+          if(res.code==200){
+            this.$message.success(`上传成功!`);
+            this.showEventLogUpload = false
+            this.cancelEventLogUploadShow();
+            this.$parent.refreshEventDialog(this.eventCode)
+          }
+        })
+      }else {
+        this.$message.warning(`请先上传文件!`);
       }
-      let param={ eventCode:this.eventCode,operation:"bus_oper_type_2",operationType:"log_oper_type_1",fileList: fileUrl }
-      //日志文件上传
-      eventLogUpload(param).then(res => {
-        if(res.code==200){
-          this.$message.success(`上传成功!`);
-          this.showEventLogUpload = false
-          this.cancelEventLogUploadShow();
-          this.$parent.refreshEventDialog(this.eventCode)
-        }
-      })
+
+
     },
     eventLogUpload(eventCode) {
       this.eventCode=eventCode

+ 1 - 1
src/views/leader.vue

@@ -37,7 +37,7 @@
           <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
             <div class="this-title">
-              <span>巡检列表</span>
+              <span>巡查任务</span>
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-73">