youngsuk 2023-08-31
230831 서영석 횡단보도 상세조회 이미지
@aa83c01e7f69bd5b6d03d8555a542ff9101f709d
client/views/pages/CrosswalkManagement/CrosswalkSearch.vue
--- client/views/pages/CrosswalkManagement/CrosswalkSearch.vue
+++ client/views/pages/CrosswalkManagement/CrosswalkSearch.vue
@@ -385,13 +385,23 @@
             </button>
           </h2>
         <div class="modal_base_body">
-          <!-- <div class="flex-between">
-                <div class="img">무단횡단검지카메라 이미지</div>
-                <div class="img">무단횡단검지카메라 이미지</div>
-                <div class="img">신호연장검지카메라 이미지</div>
-                <div class="img">신호연장검지카메라 이미지</div>
-                <div class="img">우회차량검지카메라 이미지</div>
-              </div> -->
+          <div class="flex-between">
+            <div v-if="WTRMS_CAM1.file_name!=null" class="img" >무단횡단검지카메라 이미지
+              <img style="height:100px;" :src="'http://localhost:8080/download/'+WTRMS_CAM1.file_path+'/'+WTRMS_CAM1.file_name">
+            </div>
+            <div v-if="WTRMS_CAM2.file_name!=null" class="img" >무단횡단검지카메라 이미지
+              <img style="height:100px;" :src="'http://localhost:8080/download/'+WTRMS_CAM2.file_path+'/'+WTRMS_CAM1.file_name">
+            </div>
+            <div v-if="SIGNL_EXTN_CAM1.file_name!=null" class="img" >신호연장검지카메라 이미지
+              <img style="height:100px;" :src="'http://localhost:8080/download/'+SIGNL_EXTN_CAM1.file_path+'/'+WTRMS_CAM1.file_name">
+            </div>
+            <div v-if="SIGNL_EXTN_CAM2.file_name!=null" class="img" >신호연장검지카메라 이미지
+              <img style="height:100px;" :src="'http://localhost:8080/download/'+SIGNL_EXTN_CAM2.file_path+'/'+WTRMS_CAM1.file_name">
+            </div>
+            <div v-if="RITTRN_VHCLE_CAM.file_name!=null" class="img" >우회차량검지카메라 이미지
+              <img style="height:100px;" :src="'http://localhost:8080/download/'+RITTRN_VHCLE_CAM.file_path+'/'+WTRMS_CAM1.file_name">
+            </div>
+          </div>
           <h3 class="modal_base_title">횡단보도 기본정보</h3>
            <div class="de_Search">
            <table class="troubleTable mrg_b_0" >     
@@ -693,6 +703,27 @@
         { id: 3, name: "우회전 차량", isActive: false },
         { id: 4, name: "장애발생", isActive: false },
       ],
+      file_info:[],
+      RITTRN_VHCLE_CAM:{
+        file_path:null,
+        file_name:null,
+      },
+      WTRMS_CAM1:{
+        file_path:null,
+        file_name:null,
+      },
+      WTRMS_CAM2:{
+        file_path:null,
+        file_name:null,
+      },
+      SIGNL_EXTN_CAM1:{
+        file_path:null,
+        file_name:null,
+      },
+      SIGNL_EXTN_CAM2:{
+        file_path:null,
+        file_name:null,
+      },
     };
   },
   components: {
@@ -1216,6 +1247,65 @@
         }
       }
     },
+    
+
+    //횡단보도 이미지 조회
+    crosswalkImgSelect: function (item) {
+      const vm = this;
+      // console.log("crosswalkSelectOne item : ",item);
+      axios({
+        url: "/statusControl/crosswalkImgSelectList.json",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json; charset=UTF-8",
+        },
+        data: { node_id: vm.address.node_id, crslk_az: item.crslk_az },
+      }).then(function (response) {  
+          console.log("crosswalkImgSelectList response : ",response.data);
+          let cnt1=0;
+          let cnt2=0;
+          for( var i=0 ;  i<response.data.length ; i++){
+            console.log("for response i : ",i," :",response.data[i]);
+            //우회전 카메라
+            if(response.data[i].eqpmn_ty_id==='EQPMN-CAM-RITTRN_VHCLE'){
+              vm.RITTRN_VHCLE_CAM.file_name=response.data[i].file_nm;
+              vm.RITTRN_VHCLE_CAM.file_path=response.data[i].real_file_nm;
+            }
+            //무단횡단 카메라
+            if(response.data[i].eqpmn_ty_id==='EQPMN-CAM-WTRMS'){
+              console.log("for ck i : ",i," :",response.data[i]);
+              if(cnt1==0){
+                vm.WTRMS_CAM1.file_name=response.data[i].file_nm;
+                vm.WTRMS_CAM1.file_path=response.data[i].real_file_nm;
+              }
+              else{
+                vm.WTRMS_CAM2.file_name=response.data[i].file_nm;
+                vm.WTRMS_CAM2.file_path=response.data[i].real_file_nm;
+              }
+              cnt1++;
+              console.log("WTRMS_CAM1 i : ",i," :",vm.WTRMS_CAM1);
+              console.log("WTRMS_CAM2 i : ",i," :",vm.WTRMS_CAM2);
+            }
+            //신호연장 카메라
+            if(response.data[i].eqpmn_ty_id==='EQPMN-CAM-SIGNL_EXTN'){
+              if(cnt2==0){
+                vm.SIGNL_EXTN_CAM1.file_name=response.data[i].file_nm;
+                vm.SIGNL_EXTN_CAM1.file_path=response.data[i].real_file_nm;
+              }
+              else{
+                vm.SIGNL_EXTN_CAM2.file_name=response.data[i].file_nm;
+                vm.SIGNL_EXTN_CAM2.file_path=response.data[i].real_file_nm;
+              }
+              cnt2++;
+            }
+          } 
+          vm.file_info = response.data;
+        })
+        .catch(function (error) {
+          console.log("crosswalkSelectOne - error : ", error);
+          alert("횡단보도 상세조회 오류, 관리자에게 문의해주세요.");
+        });
+    },
 
     //횡단보도 상세조회
     crosswalkSelectOne: function (item) {
@@ -1264,6 +1354,8 @@
             vm.crosswalk.wtrms_crosng_eqpmn_instl_yn = false;
           }
           vm.modal_crosswalkOne = true;
+          vm.crosswalkImgSelect(item);
+
         })
         .catch(function (error) {
           console.log("crosswalkSelectOne - error : ", error);
@@ -1384,7 +1476,6 @@
   },
   computed: {},
   mounted() {   
-
     this.selectMap = emapBaseLayer;
     this.$refs.open_layers.setBaseMap(this.selectMap);
 
Add a comment
List