MSI\liwei 3 жил өмнө
parent
commit
988556bc29

+ 1 - 0
public/index.html

@@ -204,6 +204,7 @@
     <script src="./html/jsWebControl-1.0.0.min.js"></script>
     <link type="text/css" rel="stylesheet" href="./ckplayer3.0x/css/ckplayer.css" />
     <script type="text/javascript" src="./ckplayer3.0x/js/ckplayer.js" charset="utf-8" data-name="ckplayer"></script>
+    <!-- <script type="text/javascript" src="./ckplayer/ckplayer.js" charset="utf-8" data-name="ckplayer"></script> -->
     <!-- <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> -->
     <link rel="stylesheet" href="./html/bootstrap.min.css">
     <script src="./html/bootstrap.bundle.min.js"></script>

+ 50 - 0
src/api/qdtl/data.js

@@ -49,6 +49,7 @@ export function getLineData() {
     })
   }
 
+
   export function documentSave(query) {
     return request({
       url: '/qdtl/document',
@@ -57,6 +58,23 @@ export function getLineData() {
     })
   }
 
+  export function documentExport(query) {
+    console.log(query);
+    return request({
+      url: '/qdtl/document/export?id='+query.id,
+      method: 'get',
+      // params:query
+    })
+  }
+
+  export function documentUpdate(query) {
+    return request({
+      url: '/qdtl/document',
+      method: 'put',
+      data: query
+    })
+  }
+
   export function getPatrolman(query) {
     return request({
       url: '/qdtl/patrolman/list',
@@ -65,6 +83,38 @@ export function getLineData() {
     })
   }
 
+  export function getTrail(query) {
+    return request({
+      url: '/qdtl/log/trail/list',
+      method: 'get',
+      params:query
+    })
+  }
+
+  // export function getPatrolman(query) {
+  //   return request({
+  //     url: '/qdtl/patrolman/list',
+  //     method: 'get',
+  //     params:query
+  //   })
+  // }
+
+  // export function getPatrolman(query) {
+  //   return request({
+  //     url: '/qdtl/patrolman/list',
+  //     method: 'get',
+  //     params:query
+  //   })
+  // }
+
+  export function getLog(query) {
+    return request({
+      url: '/qdtl/log/list',
+      method: 'get',
+      params:query
+    })
+  }
+
   // export function queryCheck(query) {
   //   console.log(query);
   //   return request({

+ 17 - 0
src/api/qdtl/document.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+export function listDocument(query) {
+    return request({
+      url: '/qdtl/document/list ',
+      method: 'get',
+      params:query
+    })
+  }
+
+  export function addDocument(query) {
+    return request({
+      url: '/qdtl/document',
+      method: 'post',
+      data:query
+    })
+  }

BIN
src/assets/images/goverce/prcent.png


+ 36 - 15
src/components/HeaderDiv/index.vue

@@ -5,23 +5,37 @@
         </div>
         <div class="mum">
             <div :class='currentindex==1?"active":""' @click="goTarget(1)">首页</div>
-            <div :class='currentindex==7?"active":""' @click="goTarget(7)">交通局简介</div>
+            <div :class='currentindex==7?"active":""' @click="goTarget(7)">
+               <!-- <div style="display:inline-flex">
+                  <div>{{menuName2}}</div>
+                  <div style="margin-left:0.5rem" @click="rightMenu" v-show="showMenu == 0"><i class="el-icon-arrow-right"></i></div>
+                   <div style="margin-left:0.5rem" @click="leftMenu" v-show="showMenu"><i class="el-icon-arrow-left"></i></div>
+                </div> -->
+                交通局简介
+            </div>
             <div :class='currentindex==2?"active":""'>
                 <div style="display:inline-flex">
                   <div>{{menuName}}</div>
-                  <div style="margin-left:0.5rem" @click="rightMenu" v-show="showMenu"><i class="el-icon-arrow-right"></i></div>
-                   <div style="margin-left:0.5rem" @click="leftMenu" v-show="!showMenu"><i class="el-icon-arrow-left"></i></div>
+                  <div style="margin-left:0.5rem" @click="rightMenu(1)" v-show="showMenu == 0"><i class="el-icon-arrow-right"></i></div>
+                   <div style="margin-left:0.5rem" @click="leftMenu(0)" v-show="showMenu == 1"><i class="el-icon-arrow-left"></i></div>
                 </div>
             </div>
-            <div  @click="goTarget(9)" v-show="!showMenu">视频监测</div>
+<!-- 
+            <div  @click="goTarget(9)" v-show="showMenu">视频监测</div>
             <div  @click="goTarget(10)" v-show="!showMenu">无人机监测</div>
             <div  @click="goTarget(11)" v-show="!showMenu">巡检监测</div>
-             <div  @click="goTarget(11)" v-show="!showMenu">巡逻电车监测</div>
+             <div  @click="goTarget(11)" v-show="!showMenu">巡逻电车监测</div> -->
+
+
+            <div  @click="goTarget(9)" v-show="showMenu == 1">视频监测</div>
+            <div  @click="goTarget(10)" v-show="showMenu == 1">无人机监测</div>
+            <div  @click="goTarget(11)" v-show="showMenu == 1">巡检监测</div>
+             <div  @click="goTarget(11)" v-show="showMenu == 1">巡逻电车监测</div>
             
-            <div :class='currentindex==6?"active":""' @click="goTarget(6)" v-show="showMenu">综合管理</div>
-            <div :class='currentindex==3?"active":""' @click="goTarget(3)" v-show="showMenu">治理态势</div>
-            <div :class='currentindex==4?"active":""' @click="goTarget(4)" v-show="showMenu">安全态势</div>
-            <div :class='currentindex==5?"active":""' @click="goTarget(5)" v-show="showMenu">公众服务</div>
+            <div :class='currentindex==6?"active":""' @click="goTarget(6)" v-show="showMenu == 0">综合管理</div>
+            <div :class='currentindex==3?"active":""' @click="goTarget(3)" v-show="showMenu == 0">治理态势</div>
+            <div :class='currentindex==4?"active":""' @click="goTarget(4)" v-show="showMenu == 0">安全态势</div>
+            <div :class='currentindex==5?"active":""' @click="goTarget(5)" v-show="showMenu == 0">公众服务</div>
         </div>
 <!-- 
         <div class="menu-dropDown">
@@ -45,6 +59,10 @@ export default {
       type: String, // 约束color值的类型
       default: "更多监测",  // color变量默认值(外部不给 我color传值,使用默认值) 
     },
+      menuNameP2:{
+      type: String, // 约束color值的类型
+      default: "交通局简介",  // color变量默认值(外部不给 我color传值,使用默认值) 
+    },
   },
   data() {
     return {
@@ -52,8 +70,9 @@ export default {
       version: "3.8.1",
       currenttime: moment().format("YYYY-MM-DD HH:mm:ss"),
       currentindex:this.currentindexP,
-      showMenu:true,
-      menuName:this.menuNameP
+      showMenu:0,
+      menuName:this.menuNameP,
+      menuName2:this.menuNameP2
     };
   },
    mounted() {
@@ -71,6 +90,8 @@ export default {
            this.$router.push('/video')
       }else if(index == 10){
            this.$router.push('/drone')
+      }else if(index == 11){
+           this.$router.push('/keepWatch')
       }else if(index == 3){
            this.$router.push('/governance')
       }else if(index == 4){
@@ -83,11 +104,11 @@ export default {
            this.$router.push('/introduction')
       }
     },
-    rightMenu(){
-         this.showMenu = false
+    rightMenu(index){
+         this.showMenu = index
     },
-    leftMenu(){
-         this.showMenu = true
+    leftMenu(index){
+         this.showMenu = index
     }
   },
 };

+ 33 - 19
src/components/map/index.vue

@@ -156,6 +156,7 @@ export default {
       pointArry:{},
       mapHashMap:{},
       deviceList:[],
+      isShowGj:false,
       Base64:require('js-base64').Base64,
       areaList:[],
       dialogVisible:false,
@@ -231,19 +232,15 @@ export default {
                                 var event = window.event;
                                 var x = event.screenX/10+5;
                                 var y = event.screenY/10-20;
-                                console.log(x+','+y);
                                 that.locationStyle='top:'+y+'rem;left:'+x+'rem'
-                                console.log(that.locationStyle);
                                 that.clickObj = tadata.data
                                 // console.log(tadata.pic);
-                               console.log(process.env.VUE_APP_IMG_URL);
                                 that.clickObj.imgsrc = process.env.VUE_APP_IMG_URL+tadata.data.pic
                                 that.isShow = true
                          }
                          if(tadata.type == 'video'){
                                 that.ccode = tadata.data.cameraIndexCode
                                 window.cameraid = that.ccode;
-                                // console.log(tadata.data);
                                 that.dialogVisible = true
                                 setTimeout(() => {
                                   that.handleOpen()
@@ -252,7 +249,6 @@ export default {
                           if(tadata.type == 'wrj'){
                               //  that.ccode = tadata.data.cameraIndexCode
                                 // window.cameraid = that.ccode;
-                                // console.log(tadata.data);
                                 that.dialogVisibleCk = true
                                 setTimeout(() => {
                                   that.loadCkplayer(tadata.data.video)
@@ -382,30 +378,25 @@ export default {
         }
      },
       loadCkplayer(url){
-        url = 'rtmp://39.104.22.45:30498/rtp/34020001001320000001_34020001001320000001'
+        // url = 'rtmp://39.104.22.45:30498/rtp/34020001001320000001_34020001001320000001'
         // console.log(url);
         url = this.Base64.encode(url);
-        console.log(url);
         getVideoHttp(url).then(data=>{
-            console.log(process.env.NODE_ENV)
-
             if(process.env.NODE_ENV === "production"){
-
               data.data = (data.data+"").replaceAll("http://58.221.168.61:9000/","http://172.24.25.2:9000/")
             }
-             console.log(data.data)
             var videoObject = {
               container: '.video', //“#”代表容器的ID,“.”或“”代表容器的class
               variable: 'player', //播放函数名称,该属性必需设置,值等于下面的new ckplayer()的对象
               autoplay:true,
               live:true,
               overspread:true,//是否让视频铺满播放器
+              // html5m3u8:true,//m3u8-hls形式播放视频
               plug:'hls.js',//设置使用hls插件
               // video: 'rtmp://58.200.131.2:1935/livetv/cctv1'//视频地址
-              // video:data.data//视频地址
-              video:'http://39.104.22.45:8089/rtp/34020001001320000001_34020001001320000001/hls.m3u8'
+              video:data.data//视频地址
+              // video:'http://39.104.22.45:8089/rtp/34020001001320000001_34020001001320000001/hls.m3u8'
             };
-            console.log(videoObject);
             window.player = new ckplayer(videoObject);
         })
     },
@@ -697,7 +688,7 @@ export default {
                         textBaseline: "middle",
                         //font: 'verdana',
                         fill: new Fill({
-                          color: "blue"
+                          color: "#ffffff"
                         }),
                         backgroundFill: new Fill({
                           color: "rgba(220,38,38,0.2)"
@@ -874,6 +865,9 @@ export default {
             if(this.isLine){
                   markerta.setVisible(true);
             }
+            if(this.isShowGj){
+                  markerta.setVisible(true);
+            }
             // markerta.setVisible(true)
 
       },
@@ -899,6 +893,10 @@ export default {
                  this.deviceList.push(linevectorLayer);
                  linevectorLayer.setVisible(false)
             }
+
+            if(this.isShowGj == true){
+                 linevectorLayer.setVisible(true)
+            }
             // else{
             //    this.mapHashMap[type]=linevectorLayer;
             //    linevectorLayer.setVisible(false)
@@ -941,11 +939,27 @@ export default {
                   if(pointObj.type == 2){
                     this.addMarker(pointObj.locations.split(','),'左侧-车站-高亮.png',0.2,'marker');
                   }
-                  if(pointObj.type == 5){
+                  else if(pointObj.type == 5){
                     this.addMarker(pointObj.locations.split(','),'专家站点.png',0.2,'marker');
                   }
-
-
+                  else if(pointObj.type == 8){
+                      this.isShowGj = true
+                      var jsonStr = '['
+                             for(var index in pointObj.data){
+                               var obj = pointObj.data[index]
+                               if(index == pointObj.data.length - 1){
+                                 var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+']'
+                               }else{
+                                 var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+'],'
+                               }
+                               jsonStr += location
+                              //  deviceArry.push(obj.fence.split(','));
+                             }
+                              jsonStr += ']'
+                             var json = JSON.parse(jsonStr);
+                    this.addPoints(pointObj.data,'device.png',0.6,'device');
+                    this.addline(json,'device');
+                  }
               }
         },
         handleClose(){
@@ -1042,7 +1056,7 @@ export default {
                               lineDash:[15,45],
                               lineCap:"butt"
                           }),
-                          zIndex:20
+                          zIndex:30
                       })
           }
              return style;

+ 6 - 0
src/router/index.js

@@ -105,6 +105,12 @@ export const constantRoutes = [{
         hidden: true,
     },
     {
+        path: "/keepWatch",
+        component: () =>
+            import ("@/views/keepWatch"),
+        hidden: true,
+    },
+    {
         path: "/video",
         component: () =>
             import ("@/views/qdtl/video/video.vue"),

+ 25 - 0
src/utils/request.js

@@ -155,4 +155,29 @@ export function download(url, params, filename) {
     })
 }
 
+export function downloadGet(url, params, filename) {
+    downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
+    return service.get(url, params, {
+        transformRequest: [(params) => { return tansParams(params) }],
+        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+        responseType: 'blob'
+    }).then(async(data) => {
+        const isLogin = await blobValidate(data);
+        if (isLogin) {
+            const blob = new Blob([data])
+            saveAs(blob, filename)
+        } else {
+            const resText = await data.text();
+            const rspObj = JSON.parse(resText);
+            const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
+            Message.error(errMsg);
+        }
+        downloadLoadingInstance.close();
+    }).catch((r) => {
+        console.error(r)
+        Message.error('下载文件出现错误,请联系管理员!')
+        downloadLoadingInstance.close();
+    })
+}
+
 export default service

+ 2 - 2
src/views/drone/index.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
      <headerdiv ref="headerDiv" :currentindexP = currentindexNew :menuNameP= itemName></headerdiv>
      <div style="display: inline-flex">
-      <div class='leftTree'>
+      <div class='droneleftTree'>
             <!-- <el-form :model="nameObj" ref="nameObj" :inline="true" label-width="68px">
                 <el-form-item label="名称" prop="name"> -->
                   <!-- <el-input
@@ -316,7 +316,7 @@ export default {
 </script>
 
 <style>
-     .leftTree{
+     .droneleftTree{
           /* float:left; */
           width:32rem;
           background-color:#04283C;

+ 44 - 3
src/views/governance/index.vue

@@ -41,7 +41,7 @@
            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">视频资源统计</div>
         </div>
 
-        <div id='videoeChart' style="width:45rem;height:25rem;margin-top: 6rem;">
+        <div id='videoeChart' style="width:45rem;height:25rem;margin-top:2rem;">
         </div>
 
         <div class="publicTitle" style="margin-top:1.5rem">
@@ -49,8 +49,36 @@
            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">当日巡检完成率</div>
         </div>
 
-        <div>
-             <div></div>
+        <div style="margin-top:2rem">
+             <div class="prcentClass">
+                     <div v-for="(item ,i) in areaList">
+                                <div style="display: inline-flex;" :class='i!=0?"isTop":""'>
+                                                <div style="font-size: 1.4rem;
+                                                                font-family: Adobe Heiti Std;
+                                                                font-weight: normal;
+                                                                color: #C5D0D4;
+                                                                ">{{item.areaName}}</div>
+                                                <div style="font-size: 1.6rem;
+                                                                font-family: Myriad Pro;
+                                                                font-weight: 400;
+                                                                color: #4AA2FF;
+                                                                margin-left:1.3rem">{{item.totalDistance}}</div>
+                                                <div style="font-size: 1.6rem;
+                                                                font-family: Myriad Pro;
+                                                                font-weight: 400;
+                                                                color: #ffffff;">公里</div>
+                                                <div style="font-size: 1.4rem;
+                                                                font-family: Adobe Heiti Std;
+                                                                font-weight: normal;
+                                                                color: #08E7E9;
+                                                                margin-left:1rem">({{item.percent}} %)</div>
+                                </div>
+                     </div>
+
+                     
+
+  
+             </div>
         </div>
        </div>
 
@@ -128,6 +156,7 @@ export default {
     data() {
         return {
               userList:[],
+              areaList:[],
               tdxjCount:111,
               tdcsCount:152,
               currentindexNew:3,
@@ -174,6 +203,7 @@ export default {
                        console.log(this.userList);
                        this.tdxjCount = data.data.xunTotalDistance;
                        this.tdcsCount = data.data.checkPointLogNum;
+                       this.areaList = data.data.areaStatics
                        this.lcChartData.typeData = []
                        this.videoChartDate.name = [];
                        this.videoChartDate.count = [];
@@ -425,6 +455,13 @@ export default {
           padding-top:0.7rem;
           display: inline-flex;
        }
+.prcentClass{
+          background: url("~@/assets/images/goverce/prcent.png") no-repeat;
+          background-size: 100% 100%;
+          width:95%;
+          height:28rem;
+          padding-left:25rem
+}
 .tdgove{
           background: url("~@/assets/images/goverce/态势1@2x.png") no-repeat;
           background-size: 100% 100%;
@@ -478,4 +515,8 @@ export default {
         line-height: 2.6rem;
 }
 
+.isTop{
+        margin-top:1.5rem
+}
+
 </style>

+ 399 - 0
src/views/keepWatch/index.vue

@@ -0,0 +1,399 @@
+<template>
+  <div class="app-container">
+     <headerdiv ref="headerDiv" :currentindexP = currentindexNew :menuNameP= itemName></headerdiv>
+     <div style="display: inline-flex">
+      <div class='leftTree'>
+            <el-input
+                placeholder="输入关键字进行过滤"
+                v-model="filterText"
+                style="margin-top:1rem">
+            </el-input>
+             <div style="height:83vh;">
+                  <el-scrollbar style="height:110%;">
+                        <el-tree
+                            :data="areaData"
+                            lazy
+                            show-checkbox
+                            :expand-on-click-node="false"
+                            node-key="id"
+                            :default-expanded-keys="expandedKeys"
+                            :props="defaultProps"
+                            :filter-node-method="filterNode"
+                            :default-expand-all= 'isExpand'
+                            ref="tree"
+                            @check-change = 'treeChange'
+                            style="background-color:#04283C;color:#C5D0D4"
+                            >
+                        </el-tree>
+               </el-scrollbar>
+            </div>
+      </div>
+
+     <div style="z-index:1000;width:150rem">
+                 <div class="divtitle">
+                     <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
+                     <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">巡检记录</div>
+                 </div>
+                 <div style="margin-top:1rem">
+                        <el-form :model="queryForm" ref="queryForm" :inline="true" label-width="10rem">
+                        <el-form-item label="时间" prop="areaCode">
+                            <el-date-picker
+                                    v-model="queryForm.dateArry"
+                                    @change='buttonChange'
+                                    type="datetimerange"
+                                    value-format="yyyy-MM-dd HH:mm:ss"
+                                    range-separator="至"
+                                    start-placeholder="开始时间"
+                                    end-placeholder="结束时间"
+                                    style="width:40rem">
+                            </el-date-picker>
+                        </el-form-item>
+                        <el-form-item label="巡检器" prop="deviceCode">
+                             <el-select v-model="queryForm.deviceCode" placeholder="请选择设备" clearable size="small"  style="width:15rem">
+                                <el-option
+                                    v-for="dict in deviceList"
+                                    :key="dict.deviceCode"
+                                    :label="dict.deviceName"
+                                    :value="dict.deviceCode"
+                                />
+                                </el-select>
+                        </el-form-item>
+                        <el-form-item label="巡检点" prop="checkpointCard">
+                            <el-select v-model="queryForm.checkpointCard" placeholder="请选择巡检点" clearable size="small"  style="width:15rem">
+                            <el-option
+                                v-for="dict in locationList"
+                                :key="dict.locationCode"
+                                :label="dict.locationName"
+                                :value="dict.locationCode"
+                            />
+                            </el-select>
+                        </el-form-item>
+                         <el-form-item label="巡检员" prop="patrolmanCard">
+                            <el-select v-model="queryForm.patrolmanCard" placeholder="请选择巡检员" clearable size="small"  style="width:15rem" @change='buttonChange'>
+                            <el-option
+                                v-for="dict in patorlmanList"
+                                :key="dict.card"
+                                :label="dict.name"
+                                :value="dict.card"
+                            />
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
+                            <el-button type="primary" icon="el-icon-search" size="mini" :disabled="buttonDisabled" @click="getTrail">轨迹</el-button>
+                            <el-button type="primary" icon="el-icon-refresh" size="mini">重置</el-button>
+                        </el-form-item>
+                        </el-form>
+                 </div>
+
+                        <!-- <el-row :gutter="10" class="mb8">
+                        <el-col :span="1.5">
+                            <el-button
+                            style="width:8rem;height:3.2rem;"
+                            type="primary"
+                            plain
+                            icon="el-icon-plus"
+                            @click="handleAdd"
+                            v-hasPermi="['qdtl:area:add']"
+                            >新增</el-button>
+                        </el-col>
+                        <el-col :span="1.5">
+                            <el-button
+                            style="width:8rem;height:3.2rem;"
+                            type="primary"
+                            plain
+                            icon="el-icon-edit"
+                            :disabled="single"
+                            @click="handleUpdate"
+                            v-hasPermi="['qdtl:area:edit']"
+                            >修改</el-button>
+                        </el-col>
+                        <el-col :span="1.5">
+                            <el-button
+                            style="width:8rem;height:3.2rem;"
+                            type="primary"
+                            plain
+                            icon="el-icon-delete"
+                            :disabled="multiple"
+                            @click="handleDelete"
+                            v-hasPermi="['qdtl:area:remove']"
+                            >删除</el-button>
+                        </el-col>
+                        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+                        </el-row> -->
+
+                        <el-table  :data="logList"  stripe
+                                    class="my_table"
+                                    :row-class-name="tableRowClassName"
+                                    :max-height="tableHeight"
+                                    :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
+                        <!-- <el-table-column type="selection" width="55" align="center" /> -->
+                                    <el-table-column type="index" width="55" align="center" label='序号'/>
+                                    <el-table-column label="巡检员" align="center" prop="patrolmanName" />
+                                    <el-table-column label="巡检点" align="center" prop="checkpointName" />
+                                    <el-table-column label="巡检点卡号" align="center" prop="checkpointCard" />
+                                    <el-table-column label="巡检器名称" align="center" prop="deviceName" />
+                                    <el-table-column label="巡检设备号" align="center" prop="deviceCode" />
+                                    <el-table-column label="所属区域" align="center" prop="areaName" />
+                                    <el-table-column label="巡检卡号" align="center" prop="patrolmanCard" />
+                                    <el-table-column label="时间" align="center" prop="createTime" />
+                        </el-table>
+
+                        <pagination
+                        style="position:fixed;top:90rem;right:5rem;"
+                        v-show="total>0"
+                        :total="total"
+                        :page.sync="queryForm.pageNum"
+                        :limit.sync="queryForm.pageSize"
+                        :layout="layout"
+                        @pagination="getList"
+                        />
+      </div>
+     </div>
+
+     <el-dialog title="查看轨迹" :visible.sync="open" width="100rem" append-to-body @open="openMap" v-if="open">
+      <div style="height:65rem">
+      <div style="height:60rem;width:95rem;">
+           <mapdiv ref='mapv' :pointObj='pointArry'></mapdiv>
+      </div>
+      <!-- <div slot="footer" class="dialog-footer" style="text-align:center">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="cancel">取 消</el-button>
+        <el-button type="primary" @click="deleteLocation">清 除</el-button>
+      </div> -->
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listVideo,queryCamera,editCamera } from "@/api/qdtl/video";
+import { getDicts } from "@/api/system/dict/data";
+import { listLocation } from "@/api/qdtl/location";
+import { listDevice } from "@/api/qdtl/device";
+import { getPatrolman,getLog,getTrail } from "@/api/qdtl/data";
+import { httpRequest } from "@/api/data/http";
+import videodiv from "@/components/Videoplayer/index.vue"
+import headerdiv from '@/components/HeaderDiv/index.vue'
+import mapdiv from "@/components/map/index.vue"
+
+export default {
+    dicts: ['tl_area_type','tl_device_type','tl_xun_area'],
+    data() {
+      return {
+        itemName:'巡检监测',
+        isExpand:true,
+        videoMap:new Map(),
+        nameObj:{
+              channel:'',
+              name:''
+        },
+        areaData:[],
+        // videoMap:new Map(),
+        expandedKeys:[],
+        videoIndex:1,
+        currentindexNew:2,
+        remarkName:false,
+        logList:[],
+        open:false,
+        locationList:[],
+        buttonDisabled:true,
+        deviceList:[],
+        patorlmanList:[],
+        data: [{
+        }],
+        defaultProps: {
+          children: 'children',
+          label: 'label',
+          id:'value'
+        },
+        filterText:'',
+        layout:"total, prev, pager, next,jumper",
+        tableHeight:600,
+        ccode:'',
+        jsonArry:[],
+        total: 0,
+        trailData:[],
+        queryForm: {
+                pageNum: 1,
+                pageSize: 10,
+                areaCode: null,
+                areaName: null,
+                areaType: null,
+                areaId:null,
+        },
+        creamData:[],
+        pointIdArry:[],
+        pointArry:[],
+        regionIndexCode:'',
+        queryParams:{
+             url:'http://2.90.220.252:9017/artemis-web/debug',
+             params:'{"httpMethod":"POST","path":"/api/resource/v1/regions","headers":{},"query":{},"parameter":{},"body":{"pageNo": 1,"pageSize": 200,"treeCode": "0"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"27794545","appSecret":"5Xi27Gl7JrbHHF1MpdaB"}'
+        },
+         videoParams:{
+             url:'http://2.90.220.252:9017/artemis-web/debug',
+            //  params:'{"httpMethod":"POST","path":"/api/resource/v1/regions/regionIndexCode/cameras","headers":{},"query":{},"parameter":{},"body":{"pageNo": 1,"pageSize": 200,"regionIndexCode": "'+this.regionIndexCode+'"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"27794545","appSecret":"5Xi27Gl7JrbHHF1MpdaB"}'
+        },
+      };
+    },
+    components:{
+      videodiv,
+      headerdiv,
+      mapdiv
+    },
+    watch: {
+      filterText(val) {
+        this.$refs.tree.filter(val);
+      }
+    },
+    created() {
+        // this.getvideo()
+        this.getTableHeight();
+    },
+    
+    mounted(){
+      this.getTree();
+      this.listLocation();
+      this.listDevice();
+      this.getPatrolman();
+      this.getList();
+    },
+    beforeDestroy(){
+    },
+    methods:{
+        getTableHeight(){
+                 var h = document.body.clientHeight;
+                 this.tableHeight = h*0.6
+                //  console.log(1111111111);
+                 console.log(this.tableHeight);
+        },
+        getTrail(){
+             var trail = {};
+             trail.areaId = this.queryForm.areaId
+             trail.patrolmanCard = this.queryForm.patrolmanCard
+             trail.deviceCode = this.queryForm.deviceCode
+             trail.checkpointCard = this.queryForm.checkpointCard
+             trail.endTime = this.queryForm.endTime
+             trail.beginTime = this.queryForm.beginTime
+             getTrail(trail).then(response=>{
+                   console.log(response);
+                   this.trailData = response.data
+                   this.pointArry.data = this.trailData;
+                   this.pointArry.type = 8
+                   this.open = true
+             })
+        },
+        getList(){
+            console.log(this.queryForm);
+            getLog(this.queryForm).then(response =>{
+                 console.log(response);
+                 this.logList = response.rows
+                 this.total = response.total
+            })
+        },
+         openMap(){
+             console.log(11111111)
+            this.pointArry.data = this.trailData;
+            this.pointArry.type = 8
+            console.log(this.pointArry);
+            },
+        getTree(){
+              var treeDate = {
+                    label:'所有',
+                    value:1
+              }
+              treeDate.children = this.dict.type.tl_xun_area
+              this.areaData.push(treeDate);
+        },
+        listLocation(){
+              listLocation().then(response =>{
+                    this.locationList = response.rows
+              })
+        },
+        listDevice(){
+              listDevice().then(response =>{
+                   this.deviceList = response.rows
+              })
+        },
+        getPatrolman(){
+              getPatrolman().then(response =>{
+                   this.patorlmanList = response.rows
+              })
+        },
+        tableRowClassName({ row, rowIndex }) {
+                if ((rowIndex + 1) % 2 === 0) {
+                    return "warning-row";
+                } else {
+                    return "success-row";
+                }
+        },  
+        filterNode(value, data) {
+                    if (!value) return true;
+                    return data.label.indexOf(value) !== -1;
+        },
+        treeChange(data, node){
+            let tree = this.$refs.tree;
+            let array = tree.getCheckedNodes().concat(tree.getHalfCheckedNodes())
+            var areaArray = []
+            for(var index in array){
+                    if(array[index].value != 1){
+                        areaArray.push(array[index].value);       
+                    }        
+            }
+            this.queryForm.areaId = areaArray.join(',')
+            this.getList();
+            // console.log(this.queryForm.areaId)
+        },
+        buttonChange(){
+            console.log(this.queryForm.dateArry != null);
+            console.log(this.queryForm.patrolmanCard != null);
+            console.log(this.queryForm.patrolmanCard != '');
+            if(this.queryForm.dateArry != null){
+                var start = this.queryForm.dateArry[0];
+                var end = this.queryForm.dateArry[1];
+                this.queryForm.beginTime = start;
+                this.queryForm.endTime = end;
+                var startDay = new Date(start).setHours(0,0,0,0);;
+                var endDay = new Date(end).setHours(0,0,0,0);;
+                if(startDay == endDay && this.queryForm.patrolmanCard != null && this.queryForm.patrolmanCard != ''){
+                        this.buttonDisabled = false
+                }else{
+                        this.buttonDisabled = true
+                }
+            }
+            console.log(this.buttonDisabled)
+        }
+    }
+};
+</script>
+
+<style>
+     .leftTree{
+          /* float:left; */
+          width:32rem;
+          background-color:#04283C;
+          padding: 10px;
+          padding-top:0 ;
+          min-height: 95vh;
+          z-index:1001;
+     }
+     .app-container{
+       padding:0
+     }
+
+      .divtitle{
+          background: url("~@/assets/images/title2@2x.png") no-repeat;
+          background-size: 100% 100%;
+          width:100%;
+          height:3.9rem;
+          padding-top:0.8rem;
+          padding-left:2rem;
+          display: inline-flex
+          /* float: left; */
+       }
+
+    .el-range-editor--medium .el-range-separator{
+        color:white
+    }
+</style>
+

+ 2 - 2
src/views/qdtl/area/index.vue

@@ -38,10 +38,10 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <el-row :gutter="10">
       <el-col :span="1.5">
         <el-button
-          style="width:8rem;height:3.2rem;"
+          style="width:10rem;height:3.2rem;"
           type="primary"
           plain
           icon="el-icon-plus"

+ 13 - 12
src/views/qdtl/device/index.vue

@@ -20,7 +20,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="设备类型" prop="deviceType">
+      <!-- <el-form-item label="设备类型" prop="deviceType">
         <el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable size="small">
           <el-option
             v-for="dict in dict.type.tl_device_type"
@@ -29,14 +29,14 @@
             :value="dict.value"
           />
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <!-- <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
         <el-button
           style="width:8rem;height:3.2rem;"
@@ -70,7 +70,7 @@
         >删除</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+    </el-row> -->
 
     <el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" stripe
       class="my_table"
@@ -79,11 +79,11 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="设备编号" align="center" prop="deviceCode" />
       <el-table-column label="设备名称" align="center" prop="deviceName" />
-      <el-table-column label="设备类型" align="center" prop="deviceType">
+      <!-- <el-table-column label="设备类型" align="center" prop="deviceType">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.tl_device_type" :value="scope.row.deviceType"/>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="经纬度" align="center" prop="lnglat" />
       <el-table-column label="所属区域" align="center" prop="areaId" />
       <el-table-column label="备注" align="center" prop="remark" />
@@ -96,13 +96,13 @@
             @click="handleUpdate(scope.row)"
             v-hasPermi="['qdtl:device:edit']"
           >修改</el-button>
-          <el-button
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['qdtl:device:remove']"
-          >删除</el-button>
+          >删除</el-button> -->
         </template>
       </el-table-column>
     </el-table>
@@ -121,12 +121,12 @@
          <div style="float:left;width:30rem">
       <el-form ref="form" :model="form" :rules="rules" label-width="8rem">
         <el-form-item label="设备编号" prop="deviceCode"  style="margin-top:2rem">
-          <el-input v-model="form.deviceCode" placeholder="请输入设备编号" />
+          <el-input v-model="form.deviceCode" placeholder="请输入设备编号" disabled="true"/>
         </el-form-item>
         <el-form-item label="设备名称" prop="deviceName"  style="margin-top:6rem">
-          <el-input v-model="form.deviceName" placeholder="请输入设备名称"  />
+          <el-input v-model="form.deviceName" placeholder="请输入设备名称"  disabled="true"/>
         </el-form-item>
-        <el-form-item label="设备类型" prop="deviceType"  style="margin-top:6rem">
+        <!-- <el-form-item label="设备类型" prop="deviceType"  style="margin-top:6rem">
           <el-select v-model="form.deviceType" placeholder="请选择设备类型" >
             <el-option
               v-for="dict in dict.type.tl_device_type"
@@ -135,7 +135,7 @@
               :value="dict.value"
             ></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="所属区域" prop="areaId"  style="margin-top:6rem">
           <el-select v-model="form.areaId" placeholder="请选择所属区域" >
             <el-option
@@ -256,6 +256,7 @@ export default {
       });
     },
      getAreaList() {
+       this.areaQueryParams.areaType=1
       listArea(this.areaQueryParams).then(response => {
         this.areaOptions = response.rows;
       });

+ 707 - 0
src/views/qdtl/document/add.vue

@@ -0,0 +1,707 @@
+<template>
+  <div class="app-container" >
+      <!-- <div style="overflow:auto;height:100rem"> -->
+        <div class="divtitle">
+             <img src="@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
+            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">页眉</div>
+        </div>
+
+        <div style='margin-top:0em'>
+             <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="10rem" >
+                  <el-row style="">
+                        <el-col :span="12" style="padding-left:10rem">
+                            <el-form-item label="文头:" prop="wenTou">
+                                    <el-input
+                                    v-model="queryParams.wenTou"
+                                    placeholder="请输入文头"
+                                    clearable
+                                    size="small"
+                                    style="width:50rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                          <el-col :span="12">
+                            <el-form-item label="标题:" prop="title">
+                                    <el-input
+                                    v-model="queryParams.title"
+                                    placeholder="请输入标题"
+                                    clearable
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                   </el-row>
+                    <el-row style="">
+                        <el-col :span="12" style="padding-left:10rem">
+                            <el-form-item label="期数:" prop="periods">
+                                <div style="font-size:1.5rem;color:white;margin-left:3rem">
+                                     第
+                                    <el-input
+                                    v-model="queryParams.periods"
+                                    clearable
+                                    size="small"
+                                    style="width:10rem;margin-left:0.3rem"
+                                    />
+                                    期
+                                </div>
+                                </el-form-item>
+                            </el-col>
+                          <el-col :span="12">
+                            <el-form-item label="副标题:" prop="secondTitle">
+                                    <el-input
+                                    v-model="queryParams.secondTitle"
+                                    placeholder="请输入副标题"
+                                    clearable
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                   </el-row>
+                    <el-row style="">
+                        <el-col :span="12" style="padding-left:10rem">
+                            <el-form-item label="发文日期:" prop="publishDate">
+                                     <el-date-picker
+                                                v-model="queryParams.publishDate"
+                                                type="date"
+                                                placeholder="选择日期"
+                                                format="yyyy 年 MM 月 dd 日"
+                                                value-format="yyyy-MM-dd"
+                                                style="margin-left:3rem">
+                                    </el-date-picker>
+                                </el-form-item>
+                            </el-col>
+                   </el-row>
+
+             </el-form>
+        </div>
+
+        <div class="divtitle">
+             <img src="@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
+            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">正文内容</div>
+        </div>
+
+        <div style="padding-left:3rem;padding-top:1rem">
+              <div>
+                        <div style="font-size: 1.6rem;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                    color: #FFFFFF;">一、市镇工作动态</div>
+                        <div>
+                                <div style='font-size: 1.6rem;
+                                            font-family: Microsoft YaHei;
+                                            font-weight: 400;
+                                            color: #FFFFFF;
+                                            margin-top:2rem'>市指挥中心动态</div>
+                                <div>
+                                    <el-input
+                                        type="textarea"
+                                        :rows="5"
+                                        placeholder="请输入200字以内的案例介绍"
+                                        v-model="queryParams.centerNews"
+                                        style="margin-top:2rem">
+                                        </el-input>
+                                </div>
+                                <div style='font-size: 1.6rem;
+                                            font-family: Microsoft YaHei;
+                                            font-weight: 400;
+                                            color: #FFFFFF;
+                                            margin-top:2rem'>区镇都动态</div>
+                                <div>
+                                    <el-input
+                                        type="textarea"
+                                        :rows="5"
+                                        placeholder="请输入200字以内的案例介绍"
+                                        v-model="queryParams.areaNews"
+                                        style="margin-top:2rem">
+                                        </el-input>
+                                </div>
+                        </div>
+              </div>
+              <div style="margin-top:2rem">
+                       <div style="font-size: 1.6rem;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                    color: #FFFFFF;">二、典型案例</div>
+                        <div style="margin-top:1rem:padding-left:10rem">
+                              <el-form :model="exampleObj" ref="exampleForm" :inline="true" label-width="68px">
+                                        <el-form-item label="所属区域" prop="areaName">
+                                            <el-input
+                                            v-model="exampleObj.areaName"
+                                            clearable
+                                            size="small"
+                                            />
+                                        </el-form-item>
+                                        <el-form-item label="内容描述" prop="content">
+                                            <el-input
+                                            v-model="exampleObj.content"
+                                            clearable
+                                            size="small"
+                                            />
+                                        </el-form-item>
+                                         <el-form-item>
+                                            <el-button type="primary" size="mini" @click="addExample">增加</el-button>
+                                        </el-form-item>
+                              </el-form>
+                        </div>
+                        <div style="margin-top:0.1rem">
+                            <el-table :data="basicExampleList"  stripe
+                                        class="my_table"
+                                        :row-class-name="tableRowClassName"
+                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
+                                        <el-table-column label="序号" align="center" type="index" />
+                                        <el-table-column label="所属区域" align="center" prop="areaName" />
+                                        <el-table-column label="内容描述" align="center" prop="content" />
+                                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                                            <template slot-scope="scope">
+                                            <!-- <el-button
+                                                size="mini"
+                                                type="text"
+                                                icon="el-icon-edit"
+                                                @click="handleUpdate(scope.row)"
+                                                v-hasPermi="['qdtl:plan:edit']"
+                                            >修改</el-button> -->
+                                            <el-button
+                                                size="mini"
+                                                type="text"
+                                                icon="el-icon-delete"
+                                                @click="exampleDelete(scope)"
+                                            >删除</el-button>
+                                            </template>
+                                        </el-table-column>
+                                </el-table>
+                         </div>
+              </div>
+
+               <div style="margin-top:2rem">
+                       <div style="font-size: 1.6rem;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                    color: #FFFFFF;">三、专职巡防员巡防打卡情况</div>
+                        <div style="margin-top:1rem:padding-left:10rem">
+                              <el-form :model="exampleObj" ref="exampleForm" :inline="true" label-width="13rem">
+                                        <el-form-item label="巡防统计周期:" prop="dateArry">
+                                            <el-date-picker
+                                                v-model="dateArry"
+                                                type="daterange"
+                                                range-separator="至"
+                                                start-placeholder="开始日期"
+                                                end-placeholder="结束日期"
+                                                value-format="yyyy-MM-dd"
+                                                style="color:white">
+                                                </el-date-picker>
+                                        </el-form-item>
+                                         <el-form-item>
+                                            <el-button type="primary" size="mini" @click="queryCheck">确定</el-button>
+                                        </el-form-item>
+                              </el-form>
+                        </div>
+                        <div style="margin-top:0.1rem">
+                            <el-table :data="checkList"  stripe
+                                        class="my_table"
+                                        :row-class-name="tableRowClassName"
+                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
+                                        <el-table-column label="序号" align="center" type="index" />
+                                        <el-table-column label="所属区域" align="center" prop="areaName" />
+                                        <el-table-column label="巡更点数" align="center" prop="locationPoint" />
+                                        <el-table-column label="打卡次数" align="center" prop="checkPoint" />
+                                        <el-table-column label="平均每日打卡次数" align="center" prop="dailyPoint" />
+                                        <el-table-column label="达标率" align="center" prop="standardPercent" :formatter='formatDataSta'/>
+                                        <el-table-column label="漏检率" align="center" prop="unStandardPercent" :formatter='formatDataUns'/>
+                                </el-table>
+                         </div>
+              </div>
+
+               <div style="margin-top:2rem">
+                       <div style="font-size: 1.6rem;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                    color: #FFFFFF;">四、存在问题</div>
+                        <div style="margin-top:1rem:padding-left:10rem">
+                              <el-form :model="questionObj" ref="exampleForm" :inline="true" label-width="68px">
+                                        <el-form-item label="所属区域" prop="areaName">
+                                            <el-input
+                                            v-model="questionObj.areaName"
+                                            clearable
+                                            size="small"
+                                            />
+                                        </el-form-item>
+                                        <el-form-item label="内容描述" prop="content">
+                                            <el-input
+                                            v-model="questionObj.content"
+                                            clearable
+                                            size="small"
+                                            />
+                                        </el-form-item>
+                                         <el-form-item>
+                                            <el-button type="primary" size="mini" @click="addQuestion">增加</el-button>
+                                        </el-form-item>
+                              </el-form>
+                        </div>
+                        <div style="margin-top:0.1rem">
+                            <el-table :data="questionList"  stripe
+                                        class="my_table"
+                                        :row-class-name="tableRowClassName"
+                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
+                                        <el-table-column label="序号" align="center" type="index" />
+                                        <el-table-column label="所属区域" align="center" prop="areaName" />
+                                        <el-table-column label="内容描述" align="center" prop="content" />
+                                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                                            <template slot-scope="scope">
+                                            <el-button
+                                                size="mini"
+                                                type="text"
+                                                icon="el-icon-edit"
+                                                @click="handleUpdate(scope.row)"
+                                                v-hasPermi="['qdtl:plan:edit']"
+                                            >修改</el-button>
+                                            <el-button
+                                                size="mini"
+                                                type="text"
+                                                icon="el-icon-delete"
+                                                @click="questionDelete(scope)"
+                                            >删除</el-button>
+                                            </template>
+                                        </el-table-column>
+                                </el-table>
+                         </div>
+              </div>
+
+               <div style="margin-top:2rem">
+                       <div style="font-size: 1.6rem;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                    color: #FFFFFF;">五、工作建议</div>
+                        <div style="margin-top:1rem:padding-left:10rem">
+                              <el-form :model="adviceObj" ref="exampleForm" :inline="true" label-width="68px">
+                                        <el-form-item label="所属区域" prop="areaName">
+                                            <el-input
+                                            v-model="adviceObj.areaName"
+                                            clearable
+                                            size="small"
+                                            />
+                                        </el-form-item>
+                                        <el-form-item label="内容描述" prop="content">
+                                            <el-input
+                                            v-model="adviceObj.content"
+                                            clearable
+                                            size="small"
+                                            />
+                                        </el-form-item>
+                                         <el-form-item>
+                                            <el-button type="primary" size="mini" @click="addAdvice">增加</el-button>
+                                        </el-form-item>
+                              </el-form>
+                        </div>
+                        <div style="margin-top:0.1rem">
+                            <el-table :data="adviceList"  stripe
+                                        class="my_table"
+                                        :row-class-name="tableRowClassName"
+                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
+                                        <el-table-column label="序号" align="center" type="index" />
+                                        <el-table-column label="所属区域" align="center" prop="areaName" />
+                                        <el-table-column label="内容描述" align="center" prop="content" />
+                                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                                            <template slot-scope="scope">
+                                            <el-button
+                                                size="mini"
+                                                type="text"
+                                                icon="el-icon-edit"
+                                                @click="handleUpdate(scope.row)"
+                                                v-hasPermi="['qdtl:plan:edit']"
+                                            >修改</el-button>
+                                            <el-button
+                                                size="mini"
+                                                type="text"
+                                                icon="el-icon-delete"
+                                                @click="adviceDelete(scope)"
+                                            >删除</el-button>
+                                            </template>
+                                        </el-table-column>
+                                </el-table>
+                         </div>
+              </div>
+
+
+              <div style="margin-top:1rem">
+                         <div style="font-size: 1.6rem;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                    color: #FFFFFF;">附件</div>
+                        <el-upload
+                                style="margin-top:1rem"
+                                class="upload-demo"
+                                :action="uploadUrl"
+                                :on-change="handleFileChange"
+                                :on-remove="handleFileRemove"
+                                :before-remove="beforeRemove"
+                                multiple
+                                :limit="3"
+                                :file-list="fileList">
+                                 <div class="upload-box" style="text-align:left;">
+                                <el-button size="small" type="primary" plain>+点击上传</el-button>
+                                <el-form-item v-if="fileList && fileList.length>0" style="text-align: left;">
+                                    <div v-for="(item,index) in fileList" :key="index" style="text-align: left;">
+                                        <div class="upload_doc">
+                                            <div @click="previewFile(base_url + item.url)">{{item.name}}</div>
+                                            <!-- <img @click="removeFile(item,index)" class="upload_doc_close" src="../../assets/image/icon_delect_red.png"/> -->
+                                        </div>
+                                    </div>
+
+                                </el-form-item>
+                                    </div>
+                        </el-upload>
+              </div>
+        </div>
+
+         <div class="divtitle" style="margin-top:2rem">
+             <img src="@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
+            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">页尾</div>
+        </div>
+
+         <div>
+             <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="14rem" >
+                  <el-row style="">
+                        <el-col :span="12" style="padding-left:10rem">
+                            <el-form-item label="报送机关:" prop="baoSong">
+                                    <el-input
+                                    v-model="queryParams.baoSong"
+                                    placeholder="请输入报送机关"
+                                    clearable
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                          <el-col :span="12">
+                            <el-form-item label="抄送机关:" prop="chaoSong">
+                                    <el-input
+                                    v-model="queryParams.chaoSong"
+                                    placeholder="请输入抄送机关"
+                                    clearable
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                   </el-row>
+                    <el-row style="">
+                        <el-col :span="12" style="padding-left:10rem">
+                            <el-form-item label="统稿人:" prop="tongGao">
+                                    <el-input
+                                    v-model="queryParams.tongGao"
+                                    clearable
+                                    placeholder="请输入统稿人"
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                          <el-col :span="12">
+                            <el-form-item label="审核人:" prop="shenHe">
+                                    <el-input
+                                    v-model="queryParams.shenHe"
+                                    placeholder="请输入审核人"
+                                    clearable
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                   </el-row>
+                    <el-row style="">
+                        <el-col :span="12" style="padding-left:10rem">
+                            <el-form-item label="签发人:" prop="qianFa">
+                                    <el-input
+                                    v-model="queryParams.qianFa"
+                                    placeholder="请输入签发人"
+                                    clearable
+                                    size="small"
+                                    style="width:30rem;margin-left:3rem"
+                                    />
+                                </el-form-item>
+                            </el-col>
+                   </el-row>
+
+             </el-form>
+        </div>
+
+        <div style="text-align:center">
+              <el-button type="primary" @click="saveDocumet">保存草稿</el-button>
+                <el-button type="primary" @click="handleExport">导出</el-button>
+              <el-button type="primary" @click="$parent.$parent.dialogVisible = false">取消</el-button>
+        </div>
+      <!-- </div> -->
+  </div>
+</template>
+
+<script>
+// import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/qdtl/device";
+// import { listArea, getArea, delArea, addArea, updateArea } from "@/api/qdtl/area";
+import { queryCheck,documentSave,documentUpdate,documentExport } from "@/api/qdtl/data";
+import { tansParams, blobValidate } from "@/utils/ruoyi";
+import mapdiv from "@/components/map/index.vue"
+
+export default {
+  name: "Device",
+  props: {
+         form:{type:Object},
+  },
+  dicts: ['tl_device_type'],
+  data() {
+    return {
+          fileList:[],
+          fileUrl:'',
+          uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+          queryParams:{},
+          basicExampleList:[
+          ],
+          questionList:[
+          ],
+          adviceList:[
+          ],
+          exampleObj:{
+              areaName:'',
+              content:''
+          },
+          questionObj:{
+              areaName:'',
+              content:''
+          },
+          adviceObj:{
+              areaName:'',
+              content:''
+          },
+          checkList:[],
+          dateArry:[],
+    };
+  },
+  created() {
+      console.log(this.form);
+      this.queryParams = this.form
+      this.adviceList = JSON.parse(this.form.advice)
+      this.questionList = JSON.parse(this.form.question)
+      this.basicExampleList = JSON.parse(this.form.basicExample)
+      if(this.form.startStatistic != null){
+            this.dateArry.push(this.form.startStatistic);
+      }
+      if(this.form.endStatistic != null){
+             this.dateArry.push(this.form.endStatistic);
+      }
+      this.fileList = JSON.parse(this.form.fileUrl)
+    //   this.fileList = this.form.fileUrl.split(',')
+    //   this.dateArry.push(this.form.startStatistic);
+    //   this.dateArry.push(this.form.endStatistic);
+      console.log(this.dateArry);
+    //   this.dateArry = 
+  },
+  components:{
+      mapdiv
+    },
+  methods: {
+       tableRowClassName({ row, rowIndex }) {
+            if ((rowIndex + 1) % 2 === 0) {
+                return "warning-row";
+            } else {
+                return "success-row";
+            }
+       },
+       addExample(){
+           this.basicExampleList.push(this.exampleObj);
+       },
+       addQuestion(){
+           this.questionList.push(this.questionObj);
+       },
+       addAdvice(){
+           this.adviceList.push(this.adviceObj);
+       },
+       queryCheck(){
+           console.log(this.dateArry);
+           var param = {
+               startDate:this.dateArry[0],
+               endDate:this.dateArry[1]
+           }
+        //    var param = '?startDate='+this.dateArry[0]+'&endDate='+this.dateArry[1]
+           console.log(param);
+           queryCheck(param).then(response =>{
+                 this.checkList = response.data
+           })
+       },
+       formatDataUns(row){
+            return row.unStandardPercent+'%'
+       },
+       formatDataSta(row){
+            return row.standardPercent+'%'
+       },
+       exampleDelete(data){
+                //console.log(data.$index); 
+                //var selectUserArry = [];
+                for(var index in this.basicExampleList){
+                    if(index == data.$index){
+                            this.basicExampleList.splice(index,1);
+                    }
+                }   
+               // this.selectUser = selectUserArry
+       },
+        questionDelete(data){
+                for(var index in this.questionList){
+                    if(index == data.$index){
+                            this.questionList.splice(index,1);
+                    }
+                }   
+               // this.selectUser = selectUserArry
+       },
+        adviceDelete(data){
+                for(var index in this.adviceList){
+                    if(index == data.$index){
+                            this.adviceList.splice(index,1);
+                    }
+                }   
+               // this.selectUser = selectUserArry
+       },
+       save(){
+               console.log(111);
+       },
+       handleFileChange(file, fileList){
+            if(file.status === 'success'){
+                let list = [];
+                for(let key in fileList){
+                    if(fileList[key].url || (fileList[key].response && fileList[key].response.fileName)){
+                        list.push({
+                            name:fileList[key].name,
+                            url:fileList[key].url || fileList[key].response.fileName
+                        })
+                    }
+                }
+                this.fileList = list
+            }
+       },
+       handleFileRemove(file, fileList){
+            if(file.status === 'success'){
+                let list = [];
+                for(let key in fileList){
+                    if(fileList[key].url || (fileList[key].response && fileList[key].response.fileName)){
+                        list.push({
+                            name:fileList[key].name,
+                            url:fileList[key].url || fileList[key].response.fileName
+                        })
+                    }
+                }
+                this.fileList = list
+            }
+        },
+        beforeRemove(file, fileList) {
+            return this.$confirm(`确定移除 ${ file.name }?`);
+        },
+       saveDocumet(){
+           this.queryParams.basicExample = this.basicExampleList;
+           this.queryParams.question = this.questionList;
+           this.queryParams.advice = this.adviceList
+           this.queryParams.startStatistic = this.dateArry[0]
+           this.queryParams.endStatistic = this.dateArry[1]
+           console.log(this.fileList);
+           this.queryParams.fileUrl = JSON.stringify(this.fileList);
+        //    console.log(this.queryParams);
+           if(this.queryParams.id != null){
+                   documentUpdate(this.queryParams).then(response=>{
+                       console.log(response);
+                       
+                })
+           }else{
+                    documentSave(this.queryParams).then(response=>{
+                         console.log(response);
+                        this.queryParams.id = response.data.id
+                       
+           })
+           }
+        //    documentSave(this.queryParams).then(response=>{
+        //                console.log(response);
+                       
+        //    })
+        //    documentSave().then(response=>{
+
+        //    })
+       },
+    //    handleUploadSuccess(res, file){
+    //          if(res.code == 200){
+    //                 this.fileList.push(res.fileName);
+    //             //    console.log(res);
+    //             //    if(this.fileUrl.length >0){
+    //             //        this.fileUrl += ';'+res.fileName
+    //             //    }else{
+    //             //        this.fileUrl = res.fileName
+    //             //    }
+    //          }
+    //    },
+       test(){
+           console.log(11111);
+           console.log(this.queryParams);
+       },
+      handleExport() {
+            //    var downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
+            //    documentExport(this.queryParams).then(async(res) => {
+            //        this.downloadUrl(res,'测试1');
+            //     })
+             var queryObj ={};
+             queryObj.id = this.queryParams.id
+
+             this.download('/qdtl/document/export', {
+                        ...queryObj
+                    }, `location_${new Date().getTime()}.docx`)
+
+               
+      },downloadUrl(res, name) {
+                const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' }) // 构造一个blob对象来处理数据
+                const fileName = name + '.docx' // 导出文件名
+                const elink = document.createElement('a') // 创建a标签
+                elink.download = fileName // a标签添加属性
+                elink.style.display = 'none'
+                elink.href = URL.createObjectURL(blob)
+                document.body.appendChild(elink)
+                elink.click() // 执行下载
+                URL.revokeObjectURL(elink.href) // 释放URL 对象
+                document.body.removeChild(elink) // 释放标签
+                }
+
+  }
+};
+</script>
+
+<style scoped>
+ .divtitle{
+          background: url("~@/assets/images/title2@2x.png") no-repeat;
+          background-size: cover;
+          width:100%;
+          height:3.9rem;
+          padding-top:0.8rem;
+          padding-left:2rem;
+          /* float: left; */
+          display: inline-flex;
+          margin-bottom: 3rem;
+       }
+ .el-textarea__inner{
+        color:white
+ }
+
+.app-container{
+      background: url("~@/assets/images/bg@2x.png") ;
+      background-size: 100% 100%;
+
+    background-repeat-y: repeat;
+    background-position: center;
+}
+
+.el-range-editor--medium .el-range-separator{
+     color: white
+}
+
+.el-upload__tip{
+     color: white
+}
+
+.el-upload-list__item{
+    color: white
+}
+</style>
+

+ 255 - 562
src/views/qdtl/document/index.vue

@@ -1,602 +1,295 @@
 <template>
-  <div class="app-container" >
-      <!-- <div style="overflow:auto;height:100rem"> -->
-        <div class="divtitle">
-             <img src="@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
-            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">页眉</div>
-        </div>
-
-        <div style='margin-top:0em'>
-             <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="10rem" >
-                  <el-row style="">
-                        <el-col :span="12" style="padding-left:10rem">
-                            <el-form-item label="文头:" prop="wenTou">
-                                    <el-input
+  <div class="app-container">
+     <!-- <headerdiv ref="headerDiv" :currentindexP = currentindexNew></headerdiv> -->
+     <div class="divtitle">
+       <img src="~@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
+       <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:1rem">{{divtitle}}</div>
+      </div>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="6.8rem" style="margin-top:1rem">
+     <el-row>
+         <el-col :span="18">
+                <el-form-item label="文头" prop="wenTou">
+                     <el-input
                                     v-model="queryParams.wenTou"
                                     placeholder="请输入文头"
                                     clearable
                                     size="small"
-                                    style="width:50rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                          <el-col :span="12">
-                            <el-form-item label="标题:" prop="title">
-                                    <el-input
-                                    v-model="queryParams.title"
-                                    placeholder="请输入标题"
-                                    clearable
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                   </el-row>
-                    <el-row style="">
-                        <el-col :span="12" style="padding-left:10rem">
-                            <el-form-item label="期数:" prop="periods">
-                                <div style="font-size:1.5rem;color:white;margin-left:3rem">
-                                     第
-                                    <el-input
-                                    v-model="queryParams.periods"
-                                    clearable
-                                    size="small"
-                                    style="width:10rem;margin-left:0.3rem"
-                                    />
-                                    期
-                                </div>
-                                </el-form-item>
-                            </el-col>
-                          <el-col :span="12">
-                            <el-form-item label="副标题:" prop="secondTitle">
-                                    <el-input
-                                    v-model="queryParams.secondTitle"
-                                    placeholder="请输入副标题"
-                                    clearable
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
+                                    style="width:30rem"
                                     />
-                                </el-form-item>
-                            </el-col>
-                   </el-row>
-                    <el-row style="">
-                        <el-col :span="12" style="padding-left:10rem">
-                            <el-form-item label="发文日期:" prop="publishDate">
-                                     <el-date-picker
-                                                v-model="queryParams.publishDate"
-                                                type="date"
-                                                placeholder="选择日期"
-                                                format="yyyy 年 MM 月 dd 日"
-                                                value-format="yyyy-MM-dd"
-                                                style="margin-left:3rem">
-                                    </el-date-picker>
-                                </el-form-item>
-                            </el-col>
-                   </el-row>
-
-             </el-form>
-        </div>
-
-        <div class="divtitle">
-             <img src="@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
-            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">正文内容</div>
-        </div>
-
-        <div style="padding-left:3rem;padding-top:1rem">
-              <div>
-                        <div style="font-size: 1.6rem;
-                                    font-family: Microsoft YaHei;
-                                    font-weight: 400;
-                                    color: #FFFFFF;">一、市镇工作动态</div>
-                        <div>
-                                <div style='font-size: 1.6rem;
-                                            font-family: Microsoft YaHei;
-                                            font-weight: 400;
-                                            color: #FFFFFF;
-                                            margin-top:2rem'>市指挥中心动态</div>
-                                <div>
-                                    <el-input
-                                        type="textarea"
-                                        :rows="5"
-                                        placeholder="请输入200字以内的案例介绍"
-                                        v-model="queryParams.centerNews"
-                                        style="margin-top:2rem">
-                                        </el-input>
-                                </div>
-                                <div style='font-size: 1.6rem;
-                                            font-family: Microsoft YaHei;
-                                            font-weight: 400;
-                                            color: #FFFFFF;
-                                            margin-top:2rem'>区镇都动态</div>
-                                <div>
-                                    <el-input
-                                        type="textarea"
-                                        :rows="5"
-                                        placeholder="请输入200字以内的案例介绍"
-                                        v-model="queryParams.areaNews"
-                                        style="margin-top:2rem">
-                                        </el-input>
-                                </div>
-                        </div>
-              </div>
-              <div style="margin-top:2rem">
-                       <div style="font-size: 1.6rem;
-                                    font-family: Microsoft YaHei;
-                                    font-weight: 400;
-                                    color: #FFFFFF;">二、典型案例</div>
-                        <div style="margin-top:1rem:padding-left:10rem">
-                              <el-form :model="exampleObj" ref="exampleForm" :inline="true" label-width="68px">
-                                        <el-form-item label="所属区域" prop="areaName">
-                                            <el-input
-                                            v-model="exampleObj.areaName"
-                                            clearable
-                                            size="small"
-                                            />
-                                        </el-form-item>
-                                        <el-form-item label="内容描述" prop="content">
-                                            <el-input
-                                            v-model="exampleObj.content"
-                                            clearable
-                                            size="small"
-                                            />
-                                        </el-form-item>
-                                         <el-form-item>
-                                            <el-button type="primary" size="mini" @click="addExample">增加</el-button>
-                                        </el-form-item>
-                              </el-form>
-                        </div>
-                        <div style="margin-top:0.1rem">
-                            <el-table :data="basicExampleList"  stripe
-                                        class="my_table"
-                                        :row-class-name="tableRowClassName"
-                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
-                                        <el-table-column label="序号" align="center" type="index" />
-                                        <el-table-column label="所属区域" align="center" prop="areaName" />
-                                        <el-table-column label="内容描述" align="center" prop="content" />
-                                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-                                            <template slot-scope="scope">
-                                            <!-- <el-button
-                                                size="mini"
-                                                type="text"
-                                                icon="el-icon-edit"
-                                                @click="handleUpdate(scope.row)"
-                                                v-hasPermi="['qdtl:plan:edit']"
-                                            >修改</el-button> -->
-                                            <el-button
-                                                size="mini"
-                                                type="text"
-                                                icon="el-icon-delete"
-                                                @click="exampleDelete(scope)"
-                                            >删除</el-button>
-                                            </template>
-                                        </el-table-column>
-                                </el-table>
-                         </div>
-              </div>
-
-               <div style="margin-top:2rem">
-                       <div style="font-size: 1.6rem;
-                                    font-family: Microsoft YaHei;
-                                    font-weight: 400;
-                                    color: #FFFFFF;">三、专职巡防员巡防打卡情况</div>
-                        <div style="margin-top:1rem:padding-left:10rem">
-                              <el-form :model="exampleObj" ref="exampleForm" :inline="true" label-width="13rem">
-                                        <el-form-item label="巡防统计周期:" prop="dateArry">
-                                            <el-date-picker
-                                                v-model="dateArry"
-                                                type="daterange"
-                                                range-separator="至"
-                                                start-placeholder="开始日期"
-                                                end-placeholder="结束日期"
-                                                value-format="yyyy-MM-dd"
-                                                style="color:white">
-                                                </el-date-picker>
-                                        </el-form-item>
-                                         <el-form-item>
-                                            <el-button type="primary" size="mini" @click="queryCheck">确定</el-button>
-                                        </el-form-item>
-                              </el-form>
-                        </div>
-                        <div style="margin-top:0.1rem">
-                            <el-table :data="checkList"  stripe
-                                        class="my_table"
-                                        :row-class-name="tableRowClassName"
-                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
-                                        <el-table-column label="序号" align="center" type="index" />
-                                        <el-table-column label="所属区域" align="center" prop="areaName" />
-                                        <el-table-column label="巡更点数" align="center" prop="locationPoint" />
-                                        <el-table-column label="打卡次数" align="center" prop="checkPoint" />
-                                        <el-table-column label="平均每日打卡次数" align="center" prop="dailyPoint" />
-                                        <el-table-column label="达标率" align="center" prop="standardPercent" :formatter='formatDataSta'/>
-                                        <el-table-column label="漏检率" align="center" prop="unStandardPercent" :formatter='formatDataUns'/>
-                                </el-table>
-                         </div>
-              </div>
-
-               <div style="margin-top:2rem">
-                       <div style="font-size: 1.6rem;
-                                    font-family: Microsoft YaHei;
-                                    font-weight: 400;
-                                    color: #FFFFFF;">四、存在问题</div>
-                        <div style="margin-top:1rem:padding-left:10rem">
-                              <el-form :model="questionObj" ref="exampleForm" :inline="true" label-width="68px">
-                                        <el-form-item label="所属区域" prop="areaName">
-                                            <el-input
-                                            v-model="questionObj.areaName"
-                                            clearable
-                                            size="small"
-                                            />
-                                        </el-form-item>
-                                        <el-form-item label="内容描述" prop="content">
-                                            <el-input
-                                            v-model="questionObj.content"
-                                            clearable
-                                            size="small"
-                                            />
-                                        </el-form-item>
-                                         <el-form-item>
-                                            <el-button type="primary" size="mini" @click="addQuestion">增加</el-button>
-                                        </el-form-item>
-                              </el-form>
-                        </div>
-                        <div style="margin-top:0.1rem">
-                            <el-table :data="questionList"  stripe
-                                        class="my_table"
-                                        :row-class-name="tableRowClassName"
-                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
-                                        <el-table-column label="序号" align="center" type="index" />
-                                        <el-table-column label="所属区域" align="center" prop="areaName" />
-                                        <el-table-column label="内容描述" align="center" prop="content" />
-                                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-                                            <template slot-scope="scope">
-                                            <el-button
-                                                size="mini"
-                                                type="text"
-                                                icon="el-icon-edit"
-                                                @click="handleUpdate(scope.row)"
-                                                v-hasPermi="['qdtl:plan:edit']"
-                                            >修改</el-button>
-                                            <el-button
-                                                size="mini"
-                                                type="text"
-                                                icon="el-icon-delete"
-                                                @click="questionDelete(scope)"
-                                            >删除</el-button>
-                                            </template>
-                                        </el-table-column>
-                                </el-table>
-                         </div>
-              </div>
-
-               <div style="margin-top:2rem">
-                       <div style="font-size: 1.6rem;
-                                    font-family: Microsoft YaHei;
-                                    font-weight: 400;
-                                    color: #FFFFFF;">五、工作建议</div>
-                        <div style="margin-top:1rem:padding-left:10rem">
-                              <el-form :model="adviceObj" ref="exampleForm" :inline="true" label-width="68px">
-                                        <el-form-item label="所属区域" prop="areaName">
-                                            <el-input
-                                            v-model="adviceObj.areaName"
-                                            clearable
-                                            size="small"
-                                            />
-                                        </el-form-item>
-                                        <el-form-item label="内容描述" prop="content">
-                                            <el-input
-                                            v-model="adviceObj.content"
-                                            clearable
-                                            size="small"
-                                            />
-                                        </el-form-item>
-                                         <el-form-item>
-                                            <el-button type="primary" size="mini" @click="addAdvice">增加</el-button>
-                                        </el-form-item>
-                              </el-form>
-                        </div>
-                        <div style="margin-top:0.1rem">
-                            <el-table :data="adviceList"  stripe
-                                        class="my_table"
-                                        :row-class-name="tableRowClassName"
-                                        :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
-                                        <el-table-column label="序号" align="center" type="index" />
-                                        <el-table-column label="所属区域" align="center" prop="areaName" />
-                                        <el-table-column label="内容描述" align="center" prop="content" />
-                                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-                                            <template slot-scope="scope">
-                                            <el-button
-                                                size="mini"
-                                                type="text"
-                                                icon="el-icon-edit"
-                                                @click="handleUpdate(scope.row)"
-                                                v-hasPermi="['qdtl:plan:edit']"
-                                            >修改</el-button>
-                                            <el-button
-                                                size="mini"
-                                                type="text"
-                                                icon="el-icon-delete"
-                                                @click="adviceDelete(scope)"
-                                            >删除</el-button>
-                                            </template>
-                                        </el-table-column>
-                                </el-table>
-                         </div>
-              </div>
+                </el-form-item>
+         </el-col>
+         <el-col :span="6">
+                <el-form-item>
+                    <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
+                    <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                    <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+                </el-form-item>
+         </el-col>
+     </el-row>
+    </el-form>
 
+    <el-table v-loading="loading" :data="documentList" @selection-change="handleSelectionChange" stripe
+      class="my_table"
+      :row-class-name="tableRowClassName"
+      :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
+                    <el-table-column label="序号" align="center" type='index' />
+                    <el-table-column label="文头" align="center" prop="wenTou" />
+                    <el-table-column label="标题" align="center" prop="title" />
+                    <el-table-column label="期数" align="center" prop="periods" />
+                    <el-table-column label="副标题" align="center" prop="secondTitle" />
+                    <el-table-column label="发文日期" align="center" prop="publishDate" />
+                    <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                                <template slot-scope="scope">
+                                        <el-button
+                                            size="mini"
+                                            type="text"
+                                            icon="el-icon-edit"
+                                            @click="handleUpdate(scope.row)"
+                                        >修改</el-button>
+                                        <el-button
+                                            size="mini"
+                                            type="text"
+                                            icon="el-icon-delete"
+                                            @click="exampleDelete(scope)"
+                                        >删除</el-button>
+                                </template>
+                    </el-table-column>
+    </el-table>
 
-              <div style="margin-top:1rem">
-                         <div style="font-size: 1.6rem;
-                                    font-family: Microsoft YaHei;
-                                    font-weight: 400;
-                                    color: #FFFFFF;">附件</div>
-                        <el-upload
-                                style="margin-top:1rem"
-                                class="upload-demo"
-                                :action="uploadUrl"
-                                :on-success="handleUploadSuccess"
-                                multiple
-                                :limit="3"
-                                :file-list="fileList">
-                                <el-button size="small" type="primary">点击上传</el-button>
-                                <div slot="tip" class="el-upload__tip">支持上传图片、word、excel文件作为正文附件,文件大小有限制</div>
-                                </el-upload>
-              </div>
-        </div>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
-         <div class="divtitle" style="margin-top:2rem">
-             <img src="@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
-            <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">页尾</div>
-        </div>
+    <el-dialog
+            :title="title"
+            :visible.sync="dialogVisible"
+            v-if='dialogVisible'
+            width="90%"
+            >
+            <div>
+               <addDocument ref='documentDiv' :form='formObj'></addDocument>
+            </div>
+            <!-- <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+            </span> -->
+            </el-dialog>
 
-         <div>
-             <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="14rem" >
-                  <el-row style="">
-                        <el-col :span="12" style="padding-left:10rem">
-                            <el-form-item label="报送机关:" prop="baoSong">
-                                    <el-input
-                                    v-model="queryParams.baoSong"
-                                    placeholder="请输入报送机关"
-                                    clearable
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                          <el-col :span="12">
-                            <el-form-item label="抄送机关:" prop="chaoSong">
-                                    <el-input
-                                    v-model="queryParams.chaoSong"
-                                    placeholder="请输入抄送机关"
-                                    clearable
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                   </el-row>
-                    <el-row style="">
-                        <el-col :span="12" style="padding-left:10rem">
-                            <el-form-item label="统稿人:" prop="tongGao">
-                                    <el-input
-                                    v-model="queryParams.tongGao"
-                                    clearable
-                                    placeholder="请输入统稿人"
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                          <el-col :span="12">
-                            <el-form-item label="审核人:" prop="shenHe">
-                                    <el-input
-                                    v-model="queryParams.shenHe"
-                                    placeholder="请输入审核人"
-                                    clearable
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                   </el-row>
-                    <el-row style="">
-                        <el-col :span="12" style="padding-left:10rem">
-                            <el-form-item label="签发人:" prop="qianFa">
-                                    <el-input
-                                    v-model="queryParams.qianFa"
-                                    placeholder="请输入签发人"
-                                    clearable
-                                    size="small"
-                                    style="width:30rem;margin-left:3rem"
-                                    />
-                                </el-form-item>
-                            </el-col>
-                   </el-row>
-
-             </el-form>
-        </div>
-
-        <div style="">
-              <el-button type="primary" @click="saveDocumet">提交</el-button>
-        </div>
-      <!-- </div> -->
   </div>
 </template>
 
 <script>
-// import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/qdtl/device";
-// import { listArea, getArea, delArea, addArea, updateArea } from "@/api/qdtl/area";
-import { queryCheck,documentSave } from "@/api/qdtl/data";
+import { getSchedule } from "@/api/qdtl/data";
+import { listDocument } from '@/api/qdtl/document'
+import headerdiv from '@/components/HeaderDiv/index.vue'
 import mapdiv from "@/components/map/index.vue"
+import addDocument from '@/views/qdtl/document/add.vue'
 
 export default {
-  name: "Device",
-  dicts: ['tl_device_type'],
+  name: "Location",
   data() {
     return {
-          fileList:[],
-          fileUrl:'',
-          uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
-          queryParams:{},
-          basicExampleList:[
-                {areaName:'汇龙镇',content:'测试内容一'},
-                {areaName:'汇龙镇',content:'测试内容二'}
-          ],
-          questionList:[
-                {areaName:'汇龙镇',content:'1测试内容一'},
-                {areaName:'汇龙镇',content:'1测试内容二'}
-          ],
-          adviceList:[
-               {areaName:'汇龙镇',content:'2测试内容一'},
-               {areaName:'汇龙镇',content:'2测试内容二'}
-          ],
-          exampleObj:{
-              areaName:'',
-              content:''
-          },
-          questionObj:{
-              areaName:'',
-              content:''
-          },
-          adviceObj:{
-              areaName:'',
-              content:''
-          },
-          checkList:[],
-          dateArry:[],
+      // 遮罩层
+      loading: false,
+
+      divtitle:'公文管理',
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 巡检点管理表格数据
+      documentList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      dialogVisible:false,
+
+      isEdit:'true',
+
+      selectUser:[],
+
+      userList:[],
+
+      dateRange:'',
+
+      dateRangeArry:[],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      // 表单参数
+      form: {},
+      
+      formObj:{},
+      
+      pointArry:{
+        locations:'',
+        type:''
+      },
+      scheduleList:[],
+      // 表单校验
+      rules: {
+      }
     };
   },
+   components:{
+      mapdiv,
+      headerdiv,
+      addDocument
+    },
   created() {
+    this.getList();
+    // this.handleAdd();
+    // this.dialogVisible = false;
+    // this.getAreaList();
   },
-  components:{
-      mapdiv
-    },
+   mounted() {
+       this.dialogVisible = true;
+       this.dialogVisible = false;
+   },
   methods: {
-       tableRowClassName({ row, rowIndex }) {
-            if ((rowIndex + 1) % 2 === 0) {
-                return "warning-row";
-            } else {
-                return "success-row";
-            }
-       },
-       addExample(){
-           this.basicExampleList.push(this.exampleObj);
-       },
-       addQuestion(){
-           this.questionList.push(this.questionObj);
-       },
-       addAdvice(){
-           this.adviceList.push(this.adviceObj);
-       },
-       queryCheck(){
-           console.log(this.dateArry);
-           var param = {
-               startDate:this.dateArry[0],
-               endDate:this.dateArry[1]
-           }
-        //    var param = '?startDate='+this.dateArry[0]+'&endDate='+this.dateArry[1]
-           console.log(param);
-           queryCheck(param).then(response =>{
-                 this.checkList = response.data
-           })
-       },
-       formatDataUns(row){
-            return row.unStandardPercent+'%'
-       },
-       formatDataSta(row){
-            return row.standardPercent+'%'
-       },
-       exampleDelete(data){
-                //console.log(data.$index); 
-                //var selectUserArry = [];
-                for(var index in this.basicExampleList){
-                    if(index == data.$index){
-                            this.basicExampleList.splice(index,1);
-                    }
-                }   
-               // this.selectUser = selectUserArry
-       },
-        questionDelete(data){
-                for(var index in this.questionList){
-                    if(index == data.$index){
-                            this.questionList.splice(index,1);
-                    }
-                }   
-               // this.selectUser = selectUserArry
-       },
-        adviceDelete(data){
-                for(var index in this.adviceList){
-                    if(index == data.$index){
-                            this.adviceList.splice(index,1);
-                    }
-                }   
-               // this.selectUser = selectUserArry
-       },
-       save(){
-               console.log(111);
-       },
-       saveDocumet(){
-           this.queryParams.basicExample = this.basicExampleList;
-           this.queryParams.question = this.questionList;
-           this.queryParams.advice = this.adviceList
-           this.queryParams.startDate = this.dateArry[0]
-           this.queryParams.endDate = this.dateArry[1]
-           console.log(this.fileList);
-           this.queryParams.fileUrl = this.fileList.join(',');
-           console.log(this.queryParams);
-        //    documentSave().then(response=>{
-
-        //    })
-       },
-       handleUploadSuccess(res, file){
-             if(res.code == 200){
-                    this.fileList.push(res.fileName);
-                //    console.log(res);
-                //    if(this.fileUrl.length >0){
-                //        this.fileUrl += ';'+res.fileName
-                //    }else{
-                //        this.fileUrl = res.fileName
-                //    }
-             }
-       }
+    /** 查询巡检点管理列表 */
+    getList() {
+    //   this.loading = true;
+     listDocument(this.queryParams).then(response =>{
+               this.documentList = response.rows
+     })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        locationCode: null,
+        locationName: null,
+        detail: null,
+        deviceIds: null,
+        areaId: null,
+        lnglat: null,
+        remark: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
 
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.formObj = {};
+      this.dialogVisible = true;
+      this.title = "新增公文";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+     this.formObj = row;
+     this.title = "修改公文";
+     this.dialogVisible = true
+    //  console.log(this.$refs.documentDiv.queryParams);
+    //   getLocation(id).then(response => {
+    //     this.form = response.data;
+    //     this.open = true;
+    //     this.title = "修改巡检点管理";
+    //     this.openMap();
+    //   });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+              if(this.$refs.mapv.locations.length > 0){
+                  this.form.lnglat = this.$refs.mapv.locations.join(',');
+              }
+            updateLocation(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+              this.form.lnglat = this.$refs.mapv.locations.join(',');
+            addLocation(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除巡检点管理编号为"' + ids + '"的数据项?').then(function() {
+        return delLocation(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('qdtl/location/export', {
+        ...this.queryParams
+      }, `location_${new Date().getTime()}.xlsx`)
+    },
+        tableRowClassName({ row, rowIndex }) {
+        if ((rowIndex + 1) % 2 === 0) {
+             return "warning-row";
+        } else {
+             return "success-row";
+        }
+    },
+   
   }
 };
 </script>
 
+
 <style scoped>
  .divtitle{
           background: url("~@/assets/images/title2@2x.png") no-repeat;
-          background-size: cover;
+          background-size: 100% 100%;
           width:100%;
           height:3.9rem;
           padding-top:0.8rem;
-          padding-left:2rem;
-          /* float: left; */
+          padding-left:3rem;
           display: inline-flex;
-          margin-bottom: 3rem;
        }
- .el-textarea__inner{
-        color:white
- }
-
-.app-container{
-      background: url("~@/assets/images/bg@2x.png") ;
-      background-size: 100% 100%;
 
-    background-repeat-y: repeat;
-    background-position: center;
-}
 
-.el-range-editor--medium .el-range-separator{
-     color: white
-}
-
-.el-upload__tip{
-     color: white
-}
-
-.el-upload-list__item{
-    color: white
-}
 </style>
-

+ 5 - 45
src/views/qdtl/location/index.vue

@@ -26,42 +26,6 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          style="width:8rem;height:3.2rem;"
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          @click="handleAdd"
-          v-hasPermi="['qdtl:location:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-           style="width:8rem;height:3.2rem;"
-          type="primary"
-          plain
-          icon="el-icon-edit"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['qdtl:location:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          style="width:8rem;height:3.2rem;"
-          type="primary"
-          plain
-          icon="el-icon-delete"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['qdtl:location:remove']"
-        >删除</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
     <el-table v-loading="loading" :data="locationList" @selection-change="handleSelectionChange" stripe
       class="my_table"
       :row-class-name="tableRowClassName"
@@ -70,8 +34,8 @@
       <el-table-column label="编号" align="center" prop="locationCode" />
       <el-table-column label="名称" align="center" prop="locationName" />
       <el-table-column label="描述" align="center" prop="detail" />
-      <el-table-column label="巡检设备" align="center" prop="deviceIds" />
-      <el-table-column label="所属区域" align="center" prop="areaId" />
+      <el-table-column label="巡检设备" align="center" prop="deviceNamesText" />
+      <el-table-column label="所属区域" align="center" prop="areaName" />
       <el-table-column label="备注" align="center" prop="remark" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -82,13 +46,6 @@
             @click="handleUpdate(scope.row)"
             v-hasPermi="['qdtl:location:edit']"
           >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['qdtl:location:remove']"
-          >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -182,6 +139,8 @@ export default {
       // 遮罩层
       loading: true,
 
+      areaQueryParams:{},
+
       divtitle:'巡检点管理',
       // 选中数组
       ids: [],
@@ -269,6 +228,7 @@ export default {
       this.resetForm("form");
     },
     getAreaList() {
+      this.areaQueryParams ={areaType:1}
       listArea(this.areaQueryParams).then(response => {
         this.areaOptions = response.rows;
       });

+ 4 - 4
src/views/qdtl/paiban/index.vue

@@ -5,7 +5,7 @@
        <img src="~@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
        <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:1rem">{{divtitle}}</div>
       </div>
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="6.8rem" style="margin-top:1rem">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="10rem" style="margin-top:1rem">
       <el-form-item label="巡更人员" prop="nickName">
          <el-select v-model="queryParams.nickName" placeholder="请选择人员" style="width:25rem">
                     <el-option
@@ -21,7 +21,7 @@
                           v-model="queryParams.startDate"
                           type="date"
                           placeholder="选择日期"
-                          style="width:15rem"
+                          style="width:20rem"
                           value-format="yyyy-MM-dd">
                         </el-date-picker>
       </el-form-item>
@@ -30,7 +30,7 @@
                           v-model="queryParams.endDate"
                           type="date"
                           placeholder="选择日期"
-                          style="width:15rem"
+                          style="width:20rem"
                           value-format="yyyy-MM-dd">
                         </el-date-picker>
       </el-form-item>
@@ -76,7 +76,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row> -->
 
-    <el-table v-loading="loading" :data="scheduleList" @selection-change="handleSelectionChange" stripe
+    <el-table :data="scheduleList" @selection-change="handleSelectionChange" stripe
       class="my_table"
       :row-class-name="tableRowClassName"
       :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">

+ 0 - 0
src/views/qdtl/video/indexVideo.vue