Browse Source

Merge remote-tracking branch 'origin/visu_resources' into visu_resources

wangzhe 2 years ago
parent
commit
0ff9d398cf

+ 2 - 2
.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 通榆县乡村振兴监管平台
+VUE_APP_TITLE = 四平市态势感知平台
 
 # 开发环境配置
 ENV = 'development'
 
-# 通榆县乡村振兴监管平台/开发环境
+# 四平市态势感知平台/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 1 - 1
.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 通榆县乡村振兴监管平台
+VUE_APP_TITLE = 四平市态势感知平台
 
 # 生产环境配置
 ENV = 'production'

+ 1 - 1
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 通榆县乡村振兴监管平台
+VUE_APP_TITLE = 四平市态势感知平台
 
 NODE_ENV = production
 

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.4.0",
-  "description": "通榆县乡村振兴监管平台",
+  "description": "四平市态势感知平台",
   "author": "若依",
   "license": "MIT",
   "scripts": {

+ 1 - 1
src/api/login.js

@@ -73,7 +73,7 @@ export function getCodeImg() {
 //获取登录页基本信息
 export function fontConfig() {
   return request({
-    url: '/system/fontConfig/getSysFontConfig/Forest',
+    url: '/system/fontConfig/getSysFontConfig/Resources',
     method: 'get',
   })
 }

+ 25 - 0
src/api/meeting.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 查询该事件是否有会议
+export function hasConferences(eventId) {
+  return request({
+    url: '/center-event/hwMeeting/hasConferences?eventId=' + eventId,
+    method: 'post'
+  })
+}
+
+// 根据事件ID和标题创建会议
+export function createConferences(eventId, subject) {
+  return request({
+    url: '/center-event/hwMeeting/createConferences?eventId='+eventId+'&subject='+subject,
+    method: 'post'
+  })
+}
+
+// 获取登录人信息
+export function getUserInfo() {
+  return request({
+    url: '/center-event/hwMeeting/getUserInfo',
+    method: 'get'
+  })
+}

+ 8 - 0
src/api/system/config.js

@@ -58,3 +58,11 @@ export function refreshCache() {
     method: 'delete'
   })
 }
+
+//获取配置信息
+export function selectConfigKey(configKey) {
+  return request({
+    url: '/system/config/selectConfigKey/' + configKey,
+    method: 'get'
+  })
+}

+ 9 - 0
src/api/tianzhangzhi.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+// 获取左侧田长列表
+export function getTianzhangList() {
+  return request({
+    url: '/center-resources/VisuForestTianzhangzhiController/selectTianzhangList',
+    method: 'post',
+  })
+}

+ 203 - 44
src/components/eventLocation.vue

@@ -77,6 +77,12 @@
                             归档
                           </div>
                         </div>
+                        <div v-if="item.eventStatusValue=='forest_event_status_7'" class="event-state-qr">
+                          <i class="el-icon-caret-left"></i>
+                          <div class="event-list-state-qr">
+                            确认
+                          </div>
+                        </div>
                         <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
                         <div class="bgt-info-place">
                           <ul>
@@ -315,7 +321,7 @@ export default {
         isAggregation: false
       }]
       let that = this
-      getNearEvent(that.longitude, that.latitude).then(res => {
+      getNearEvent(that.longitude, that.latitude,'').then(res => {
         that.markersList = []
         that.eventList = res.data
         if (that.eventList != null && that.eventList.length > 0) {
@@ -351,6 +357,9 @@ export default {
             } else if (that.eventList[i].eventStatusValue == 'forest_event_status_6') {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-guidang'
+            } else if (that.eventList[i].eventStatusValue == 'forest_event_status_7') {
+              markersMap.click = 'showEventDialog'
+              markersMap.icon = 'sj-icon-map-queren'
             }
             markersMap.parameter = that.eventList[i].eventCode
             markersMap.lng = that.eventList[i].longitude
@@ -393,7 +402,7 @@ export default {
             that.$refs.eventLocationSupermap.clearM(false)
             that.$refs.eventLocationSupermap.clearM(true)
             that.$refs.eventLocationSupermap.setMarkers(that.markersList)
-              that.$refs.eventLocationSupermap.setMarkers(marker)
+            that.$refs.eventLocationSupermap.setMarkers(marker)
           }, 1000)
         } else {
           setTimeout(() => {
@@ -436,10 +445,17 @@ export default {
                 icon: 'camera',
                 bindPopupHtml: '',
                 click: 'preview',
-                parameter: res.data[i].cameraCode,
                 keepBindPopup: false,
                 isAggregation: false
               }
+              if (res.data[i].cameraCode != null) {
+                markersMap.parameter = {
+                  code: res.data[i].cameraCode,
+                  type: res.data[i].cameraFactory
+                }
+              } else {
+                markersMap.parameter = []
+              }
               if (res.data.length > 50) {
                 markersMap.isAggregation = true
               }
@@ -489,7 +505,7 @@ export default {
               that.$refs.eventLocationSupermap.setMarkersRadius(that.cameraMarkersList)
               that.$refs.eventLocationSupermap.setMarkers(marker)
             }, 1000)
-          }else{
+          } else {
             setTimeout(() => {
               that.$refs.eventLocationSupermap.clearM(true)
               that.$refs.eventLocationSupermap.clearM(false)
@@ -520,50 +536,58 @@ export default {
     alertReinstall: function() {
       this.$modal.msgWarning('请重新安装客户端')
     },
+    cancelEventLocationShow() {
+      if (this.oWebControl != null) {
+        this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
+        this.oWebControl.JS_Disconnect().then(function() {  // 断开与插件服务连接成功
+          },
+          function() {  // 断开与插件服务连接失败
+          })
+      }
+    },
     /** 预览按钮操作 */
-    preview(cameraCode) {
-      let that = this
-      // getDahuaVideoServer().then(newResponse => {
-      //   console.log(newResponse)
-      //   this.ws.detectConnectQt().then(res => {
-      //     if (res) { // 连接客户端成功
-      //       this.alertLogin()
-      //       this.ws.login({
-      //         loginIp: newResponse.loginIp,
-      //         loginPort: newResponse.loginPort,
-      //         userName: newResponse.userName,
-      //         userPwd: newResponse.userPwd,
-      //         token: '',
-      //         https: 1
-      //       })
-      //       this.ws.on('loginState', (res) => {
-      //         this.isLogin = res
-      //         console.log('---res-----', res)
-      //         if (res) {
-      //           this.alertLoginSuccess()
-      //           this.activePanel = 'key2'
-      //           this.realTimeVideoDialog(channelCode)
-      //         } else {
-      //           this.alertLoginFailed()
-      //         }
-      //       })
-      //     } else { // 连接客户端失败
-      //       this.alertReinstall()
-      //     }
-      //   })
-      // })
-      that.cameraVisible = true
-      getHaiKangVideoServer({ cameraCode: cameraCode }).then(newResponse => {
-        that.cameraTitle = '摄像头-' + newResponse.data.cameraName
-        that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret, newResponse.data.loginPort)
-        that.$nextTick(() => {
-          console.log(that.oWebControl)
+    preview(cameraParam) {
+      if (cameraParam.type == '大华') {
+        getDahuaVideoServer().then(newResponse => {
+          console.log(newResponse)
+          this.ws.detectConnectQt().then(res => {
+            if (res) { // 连接客户端成功
+              this.alertLogin()
+              this.ws.login({
+                loginIp: newResponse.loginIp,
+                loginPort: newResponse.loginPort,
+                userName: newResponse.userName,
+                userPwd: newResponse.userPwd,
+                token: '',
+                https: 0
+              })
+              this.ws.on('loginState', (res) => {
+                this.isLogin = res
+                console.log('---res-----', res)
+                if (res) {
+                  this.alertLoginSuccess()
+                  this.activePanel = 'key2'
+                  this.realTimeVideoDialog(cameraParam.code)
+                } else {
+                  this.alertLoginFailed()
+                }
+              })
+            } else { // 连接客户端失败
+              this.alertReinstall()
+            }
+          })
+        })
+      } else if (cameraParam.type == '海康') {
+        let that = this
+        that.cameraVisible = true
+        getHaiKangVideoServer({ cameraCode: cameraParam.code }).then(newResponse => {
+          that.cameraTitle = '摄像头-' + newResponse.data.cameraName
+          that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret, newResponse.data.loginPort)
           setTimeout(function() {
-            console.log(that.oWebControl)
             that.playhk(newResponse.data.channelCode)
           }, 5000)
         })
-      })
+      }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
@@ -571,10 +595,144 @@ export default {
         this.$Message.info('正在登陆客户端,请稍等......')
         return false
       }
-      this.ws.openVideo(cameraParams)
+      const params = [cameraParams]
+      this.ws.openVideo(params)
     },
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
+
+    /** ----------------------------------海康摄像头预览开始------------------------------------- */
+    // 创建播放实例
+    initPlugin(newappkey, newloginIp, newsecret, newloginPort) {
+      let that = this
+      that.oWebControl = new WebControl({
+        szPluginContainer: 'playWnd',                       // 指定容器id
+        iServicePortStart: 15900,                           // 指定起止端口号,建议使用该值
+        iServicePortEnd: 15909,
+        szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11',   // 用于IE10使用ActiveX的clsid
+        cbConnectSuccess: function() {                     // 创建WebControl实例成功
+          that.oWebControl.JS_StartService('window', {         // WebControl实例创建成功后需要启动服务
+            dllPath: './VideoPluginConnect.dll'         // 值"./VideoPluginConnect.dll"写死
+          }).then(function() {                           // 启动插件服务成功
+            that.oWebControl.JS_SetWindowControlCallback({   // 设置消息回调
+              cbIntegrationCallBack: cbIntegrationCallBack
+            })
+
+            that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
+              that.init(newappkey, newloginIp, newsecret, newloginPort)  // 创建播放实例成功后初始化
+            })
+          }, function() { // 启动插件服务失败
+          })
+        },
+        cbConnectError: function() { // 创建WebControl实例失败
+          that.oWebControl = null
+          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
+          WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
+          initCount++
+          if (initCount < 3) {
+            setTimeout(function() {
+              that.initPlugin(newappkey, newloginIp, newsecret, newloginPort)
+            }, 3000)
+          } else {
+            $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
+          }
+        },
+        cbConnectClose: function(bNormalClose) {
+          // 异常断开:bNormalClose = false
+          // JS_Disconnect正常断开:bNormalClose = true
+          console.log('cbConnectClose')
+          that.oWebControl = null
+        }
+      })
+    },
+    //播放海康摄像头
+    playhk(channelCode) {
+      var cameraIndexCode = channelCode     //获取输入的监控点编号值,必填
+      var streamMode = 0                                     //主子码流标识:0-主码流,1-子码流
+      var transMode = 1                                      //传输协议:0-UDP,1-TCP
+      var gpuMode = 0                                        //是否启用GPU硬解,0-不启用,1-启用
+      var wndId = -1                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
+
+      cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
+      cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
+
+      this.oWebControl.JS_RequestInterface({
+        funcName: 'startPreview',
+        argument: JSON.stringify({
+          cameraIndexCode: cameraIndexCode,                //监控点编号
+          streamMode: streamMode,                         //主子码流标识
+          transMode: transMode,                           //传输协议
+          gpuMode: gpuMode,                               //是否开启GPU硬解
+          wndId: wndId                                     //可指定播放窗口
+        })
+      })
+    },
+    //初始化
+    init(newappkey, newloginIp, newsecret, newloginPort) {
+      let that = this
+      that.getPubKey(function() {
+        ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
+        var appkey = newappkey                           //综合安防管理平台提供的appkey,必填
+        var secret = that.setEncrypt(newsecret)   //综合安防管理平台提供的secret,必填
+        var ip = newloginIp                           //综合安防管理平台IP地址,必填
+        var playMode = 0                                  //初始播放模式:0-预览,1-回放
+        var port = Number(newloginPort)                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+        var snapDir = 'D:\\SnapDir'                       //抓图存储路径
+        var videoDir = 'D:\\VideoDir'                     //紧急录像或录像剪辑存储路径
+        var layout = '1x1'                                //playMode指定模式的布局
+        var enableHTTPS = 1                               //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
+        var encryptedFields = 'secret'					   //加密字段,默认加密领域为secret
+        var showToolbar = 1                               //是否显示工具栏,0-不显示,非0-显示
+        var showSmart = 1                                 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
+        var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769'  //自定义工具条按钮
+        ////////////////////////////////// 请自行修改以上变量值	////////////////////////////////////
+
+        that.oWebControl.JS_RequestInterface({
+          funcName: 'init',
+          argument: JSON.stringify({
+            appkey: appkey,                            //API网关提供的appkey
+            secret: secret,                            //API网关提供的secret
+            ip: ip,                                    //API网关IP地址
+            playMode: playMode,                        //播放模式(决定显示预览还是回放界面)
+            port: port,                                //端口
+            snapDir: snapDir,                          //抓图存储路径
+            videoDir: videoDir,                        //紧急录像或录像剪辑存储路径
+            layout: layout,                            //布局
+            enableHTTPS: enableHTTPS,                  //是否启用HTTPS协议
+            encryptedFields: encryptedFields,          //加密字段
+            showToolbar: showToolbar,                  //是否显示工具栏
+            showSmart: showSmart,                      //是否显示智能信息
+            buttonIDs: buttonIDs                       //自定义工具条按钮
+          })
+        }).then(function(oData) {
+          that.oWebControl.JS_Resize(1020, 600)  // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
+        })
+      })
+    },
+    //获取公钥
+    getPubKey(callback) {
+      let that = this
+      that.oWebControl.JS_RequestInterface({
+        funcName: 'getRSAPubKey',
+        argument: JSON.stringify({
+          keyLength: 1024
+        })
+      }).then(function(oData) {
+        console.log(oData)
+        if (oData.responseMsg.data) {
+          that.pubKey = oData.responseMsg.data
+          callback()
+        }
+      })
+    },
+//RSA加密
+    setEncrypt(value) {
+      var encrypt = new JSEncrypt()
+      encrypt.setPublicKey(this.pubKey)
+      return encrypt.encrypt(value)
+    },
+    /** ----------------------------------海康摄像头预览结束------------------------------------- */
+
     /** ----------------------------------事件弹窗开始------------------------------------- */
     editableLayers(processedState) {
       if (processedState == 'notProcessedSupermap') {
@@ -767,6 +925,7 @@ export default {
     /** ----------------------------------海康摄像头预览结束------------------------------------- */
   }
 }
+
 // 推送消息
 function cbIntegrationCallBack(oData) {
   console.log(JSON.stringify(oData.responseMsg))

+ 4 - 8
src/components/v-fastmenu.vue

@@ -39,6 +39,7 @@
 <script>
 import resetPwd from "../views/system/user/profile/resetPwd";
 import { getUserProfile } from "@/api/system/user";
+import { selectConfigKey } from "@/api/system/config";
 	export default {
     components: {resetPwd },
 		data() {
@@ -70,14 +71,9 @@ import { getUserProfile } from "@/api/system/user";
     },
 		methods: {
       backToMainPage(){
-        let href = window.location.href
-        let protacal = href.substr(0,href.indexOf("://")+3)
-        let mo = href.lastIndexOf(":") > 6  ? href.lastIndexOf(":") : href.lastIndexOf("/")
-        let ip = href.substr(href.indexOf("://")+3,mo);
-        let url =href.substr(0,mo)
-        // let toUrl = url +":15001/newpage"
-        let toUrl = "http://10.6.52.1:15001/newpage"
-        window.location.href = toUrl
+        selectConfigKey('backToMainPage').then(res => {
+          window.location.href = res.data;
+        })
       },
       getUser(){
         getUserProfile().then(response => {

+ 11 - 2
src/components/v-header.vue

@@ -5,7 +5,7 @@
 		<!--中间LOGO -->
 		<div class="title">
 			<!-- <img src="@/assets/images/integrated/bigdata-header-nav-left2.png" /> -->
-			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />通榆县乡村振兴监管平台 {{titlename}}
+			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />{{systemTitle.title}} {{titlename}}
 			</h3>
 			<!-- <img src="@/assets/images/integrated/bigdata-header-nav-right2.png" /> -->
 		</div>
@@ -28,6 +28,7 @@
 	import {constantRoutes} from '@/router/index'//navbar导航引用了router路由的数组
 	import Clock from '@/components/clock.vue' // 时钟+天气
 	import VfastMenu from '@/components/v-fastmenu.vue' // 头部右侧菜单
+  import {fontConfig } from "@/api/login";
 	export default{
 		components:{
 			VfastMenu,
@@ -36,15 +37,23 @@
 		},
 		created(){
 			this.navbar
+      this.fontConfig();
 		},
 		data(){
 			return{
-
+        systemTitle:{
+          title:'',  //标题
+        },
 			}
 		},
 		methods:{
 		},
 		computed:{
+      fontConfig(){
+        fontConfig().then(res => {
+          this.systemTitle.title = res.data.fontTitle;
+        })
+      },
 			titlename(){
 				return this.$route.meta.title
 			},

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -35,7 +35,7 @@ export default {
   },
   data() {
     return {
-      title: '通榆县乡村振兴监管平台',
+      title: '四平市态势感知平台',
       logo: logoImg
     }
   }

+ 16 - 64
src/router/index.js

@@ -60,14 +60,6 @@ export const constantRoutes = [{
 			title: '监控中心'
 		}
 	},
-  // {
-	// 	path: '/disaster',
-	// 	name: 'disaster',
-	// 	component: () => import('@/views/disaster'),
-	// 	meta: {
-	// 		title: '灾后评估'
-	// 	}
-	// },
   {
 		path: '/leader',
 		name: 'leader',
@@ -76,30 +68,14 @@ export const constantRoutes = [{
 			title: '网格化'
 		}
 	},
-  // {
-	// 	path: '/afforestation',
-	// 	name: 'afforestation',
-	// 	component: () => import('@/views/afforestation'),
-	// 	meta: {
-	// 		title: '植树造林'
-	// 	}
-	// },
-  // {
-  //   path: '/',
-  //   name: '',
-  //   component: () => import('@/views/animal'),
-  //   meta: {
-  //     title: '动物保护'
-  //   }
-  // },
-  // {
-  //   path: '/',
-  //   name: '',
-  //   component: () => import('@/views/animal'),
-  //   meta: {
-  //     title: '珍惜古树'
-  //   }
-  // },
+  {
+		path: '/tianzhangzhi',
+		name: 'tianzhangzhi',
+		component: () => import('@/views/tianzhangzhi'),
+		meta: {
+			title: '田长制'
+		}
+	},
   {
     path: '/bigdata',
     name: 'bigdata',
@@ -144,14 +120,6 @@ export const constantRoutesNew = [{
 			title: '监控中心'
 		}
 	},
-	// {
-	// 	path: '/disaster',
-	// 	name: 'disaster',
-	// 	component: () => import('@/views/disaster'),
-	// 	meta: {
-	// 		title: '灾后评估'
-	// 	}
-	// },
 	{
 		path: '/leader',
 		name: 'leader',
@@ -160,30 +128,14 @@ export const constantRoutesNew = [{
 			title: '网格化'
 		}
 	},
-	// {
-	// 	path: '/afforestation',
-	// 	name: 'afforestation',
-	// 	component: () => import('@/views/afforestation'),
-	// 	meta: {
-	// 		title: '植树造林'
-	// 	}
-	// },
-  // {
-  //   path: '/',
-  //   name: '',
-  //   component: () => import('@/views/animal'),
-  //   meta: {
-  //     title: '动物保护'
-  //   }
-  // },
-  // {
-  //   path: '/',
-  //   name: '',
-  //   component: () => import('@/views/animal'),
-  //   meta: {
-  //     title: '珍惜古树'
-  //   }
-  // },
+  {
+    path: '/tianzhangzhi',
+    name: 'tianzhangzhi',
+    component: () => import('@/views/tianzhangzhi'),
+    meta: {
+      title: '田长制'
+    }
+  },
   {
     path: '/bigdata',
     name: 'bigdata',

+ 21 - 18
src/views/bigdata/bigdata.vue

@@ -5,7 +5,7 @@
     <div class="header">
       <!-- title -->
       <div class="header-left"><img class="logo" src="@/assets/images/integrated/logo-small.png"/>
-        <h3 class="title">通榆县乡村振兴监管平台-数字林业-统计分析</h3>
+        <h3 class="title">{{systemTitle.title}}-{{systemTitle.subTitle}}-统计分析</h3>
       </div>
       <div class="bignav">
         <img src="@/assets/images/integrated/bigdata-header-nav-left.png"/>
@@ -170,6 +170,9 @@ import chartPitG5 from './chart-farmtype' //21 偷钓偷捕事件分析、、
 import chartPitG6 from './chart-waterTotal' //22 分析、、
 
 import {getRlt} from '@/api/bigdata'
+import {
+  fontConfig
+} from '@/api/login'
 
 export default {
   components: {
@@ -196,6 +199,10 @@ export default {
   data() {
 
     return {
+      systemTitle:{
+        title:'',  //标题
+        subTitle:''  ,//副标题 数字资源
+      },
       visited: '',
       navbar: [
         {
@@ -213,26 +220,14 @@ export default {
           path: '/monitor',
           name: '监控中心'
         },
-        // {
-        //   path: '/disaster',
-        //   name: '灾后评估'
-        // },
         {
           path: '/leader',
           name: '网格化'
         },
-        // {
-        //   path: '/afforestation',
-        //   name: '植树造林'
-        // },
-        // {
-        //   path: '/',
-        //   name: '动物保护'
-        // },
-        // {
-        //   path: '/',
-        //   name: '珍惜古树'
-        // },
+        {
+          path: '/tianzhangzhi',
+          name: '田长制'
+        },
         {
           path: '/bigdata',
           name: '统计分析'
@@ -244,8 +239,16 @@ export default {
 
     }
   },
-
+  created(){
+    this.fontConfig();
+  },
   methods:{
+    fontConfig(){
+      fontConfig().then(res => {
+        this.systemTitle.title = res.data.fontTitle;
+        this.systemTitle.subTitle = res.data.subTitle;
+      })
+    },
     rlt() {
       let that = this
       getRlt().then(resp => {

+ 0 - 70
src/views/forest.vue

@@ -420,16 +420,8 @@ import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
 import TVWall from '@/components/TVWall.vue' //电视墙弹窗
 import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
 import firespread from '@/views/firespread.vue' //事件详情弹窗
-
-/** ----------------------------------摄像头预览开始------------------------------------- */
-import {
-  getDahuaVideoServer
-} from '@/api/dahua/dahua'
-// import DHWs from '@/dahua/lib/DHWs'
 import Firespread from "./firespread";
 
-/** ----------------------------------摄像头预览结束------------------------------------- */
-
 let echarts = require('echarts')
 export default {
   components: {
@@ -446,11 +438,6 @@ export default {
     firespread
   },
   created() {
-    /** ----------------------------------摄像头预览开始------------------------------------- */
-    // const DHWsInstance = DHWs.getInstance()
-    // this.ws = DHWsInstance
-    /** ----------------------------------摄像头预览结束------------------------------------- */
-
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
     window.showDialog = this.showDialog
     window.choseLayerSwitching = this.choseLayerSwitching
@@ -1269,63 +1256,6 @@ export default {
       this.$refs.supermap.layerSwitchingList(urlList)
     },
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
-
-    /** ----------------------------------事件弹窗开始------------------------------------- */
-
-
-
-    /** ----------------------------------事件弹窗结束------------------------------------- */
-    /** ----------------------------------摄像头预览开始------------------------------------- */
-    alertLogin: function() {
-      this.$modal.msg('登录中....')
-    },
-    alertLoginSuccess: function() {
-      this.$modal.msgSuccess('登录成功!')
-    },
-    alertLoginFailed: function() {
-      this.$modal.msgError('登陆失败!')
-    },
-    alertReinstall: function() {
-      this.$modal.msgWarning('请重新安装客户端')
-    },
-    /** 预览按钮操作 */
-    preview(channelCode) {
-      getDahuaVideoServer().then(newResponse => {
-        this.ws.detectConnectQt().then(res => {
-          if (res) { // 连接客户端成功
-            this.alertLogin()
-            this.ws.login({
-              loginIp: newResponse.loginIp,
-              loginPort: newResponse.loginPort,
-              userName: newResponse.userName,
-              userPwd: newResponse.userPwd,
-              token: '',
-              https: 1
-            })
-            this.ws.on('loginState', (res) => {
-              this.isLogin = res
-              if (res) {
-                this.alertLoginSuccess()
-                this.activePanel = 'key2'
-                this.realTimeVideoDialog(channelCode)
-              } else {
-                this.alertLoginFailed()
-              }
-            })
-          } else { // 连接客户端失败
-            this.alertReinstall()
-          }
-        })
-      })
-    },
-    realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
-      if (!this.isLogin) {
-        this.$Message.info('正在登陆客户端,请稍等......')
-        return false
-      }
-      this.ws.openVideo(cameraParams)
-    }
-    /** ----------------------------------摄像头预览结束------------------------------------- */
   }
 }
 </script>

+ 12 - 2
src/views/system/login-sp.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="login">
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">通榆县乡村振兴监管平台</h3>
+      <h3 class="title">{{systemTitle.title}}</h3>
       <div class="login-container">
         <h4>请登录</h4>
         <el-form-item prop="username">
@@ -42,7 +42,7 @@
 
 <script>
   import {
-    getCodeImg
+    getCodeImg,fontConfig
   } from '@/api/login'
   import Cookies from 'js-cookie'
   import {
@@ -54,6 +54,10 @@
     name: 'Login',
     data() {
       return {
+        systemTitle:{
+          title:'',  //标题
+          subTitle:''  ,//副标题 数字资源
+        },
         codeUrl: '',
         loginForm: {
           username: 'admin',
@@ -98,8 +102,14 @@
     created() {
       this.getCode()
       this.getCookie()
+      this.fontConfig();
     },
     methods: {
+      fontConfig(){
+        fontConfig().then(res => {
+          this.systemTitle.title = res.data.fontTitle;
+        })
+      },
       getCode() {
         getCodeImg().then(res => {
           this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff

+ 2 - 2
src/views/system/login.vue

@@ -70,8 +70,8 @@
 			return {
         backgroudImg:'', //背景图片
         systemTitle:{
-          title:'通榆县乡村振兴综合监管平台',  //标题
-          subTitle:'数字资源'  ,//副标题
+          title:'',  //标题
+          subTitle:''  ,//副标题 数字资源
         },
 				codeUrl: '',
 				loginForm: {

+ 12 - 2
src/views/system/register.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="register">
     <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
-      <h3 class="title">通榆县乡村振兴监管平台</h3>
+      <h3 class="title">{{systemTitle.title}}</h3>
       <el-form-item prop="username">
         <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
@@ -67,7 +67,7 @@
 </template>
 
 <script>
-import { getCodeImg, register } from "@/api/login";
+import { getCodeImg, register,fontConfig } from "@/api/login";
 
 export default {
   name: "Register",
@@ -80,6 +80,10 @@ export default {
       }
     };
     return {
+      systemTitle:{
+        title:'',  //标题
+        subTitle:''  ,//副标题 数字资源
+      },
       codeUrl: "",
       registerForm: {
         username: "",
@@ -109,8 +113,14 @@ export default {
   },
   created() {
     this.getCode();
+    this.fontConfig();
   },
   methods: {
+    fontConfig(){
+      fontConfig().then(res => {
+        this.systemTitle.title = res.data.fontTitle;
+      })
+    },
     getCode() {
       getCodeImg().then(res => {
         this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;

+ 258 - 0
src/views/tianzhangzhi.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="visual-con">
+    <!--头部-->
+    <vheader></vheader>
+    <!--主体-->
+    <div class="visual-body">
+      <!-- 左侧 -->
+      <div class="leftbar" :class="indentleft" ref="left">
+        <div class="forthis">
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
+            <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
+            <div class="this-title">
+              <span>田长列表</span>
+              <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
+            </div>
+            <div class="i-list-con h-27">
+              <div class="d-l-con-icon">
+                <div class="icon-con" :class="{on:listCurrentIndex1==item.userId}"
+                     v-for="(item,index) in visuTianzhangList" @click="getLeaderTrack(item.id)">
+                  <div class="icon icon-mid el-icon-user"></div>
+                  <div class="icon-text personnel-name">
+                    <h6>姓名:{{ item.tianName }}</h6>
+                    <h6>电话:{{ item.tianPhone }}</h6>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </dv-border-box-13>
+        </div>
+        <div class="forthis">
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
+            <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
+            <div class="this-title">
+              <span>网格长</span>
+              <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
+            </div>
+            <div class="i-list-con h-27">
+              <div class="d-l-con-icon">
+                <div class="icon-con" :class="{on:listCurrentIndex1==item.userId}"
+                     v-for="(item,index) in visuTianzhangList" @click="getLeaderTrack(item.userId)">
+                  <div class="icon icon-mid el-icon-user"></div>
+                  <div class="icon-text personnel-name">
+                    <h6>{{ item.nickName }}</h6>
+                    <h5>{{ item.deptName }}</h5>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </dv-border-box-13>
+        </div>
+      </div>
+      <!-- 地图 -->
+      <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"
+                :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
+      <!-- 右侧 -->
+      <div class="rightbar" :class="indentright" ref="right">
+        <div class="forthis">
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
+            <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
+            <div class="this-title">
+              <span>田长列表</span>
+              <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
+            </div>
+            <div class="i-list-con h-27">
+              <div class="h-19 overflow-y">
+                <div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
+                     v-for="(item,index) in visuTianzhangList"
+                     @click="getPointList(item.id)">
+                  <div class="d-l-l-text">
+                    <i class="i-small"></i>
+                    <h4>{{ item.timeBegin }} - {{ item.timeEnd }}</h4>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </dv-border-box-13>
+        </div>
+        <div class="forthis">
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
+            <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
+            <div class="this-title">
+              <span>巡查时段</span>
+              <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
+            </div>
+            <div class="i-list-con h-27">
+              <div class="h-19 overflow-y">
+                <div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
+                     v-for="(item,index) in visuTianzhangList"
+                     @click="getPointList(item.id)">
+                  <div class="d-l-l-text">
+                    <i class="i-small"></i>
+                    <h4>{{ item.timeBegin }} - {{ item.timeEnd }}</h4>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </dv-border-box-13>
+        </div>
+
+      </div>
+      <vBottomMenu ref="bottomMenu"></vBottomMenu>
+<!--      <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
+<!--        <div class="mascot" ref="mascot" :class="indentStyle" @click="indent">-->
+<!--          <img src="@/assets/images/mascot.png"/>-->
+<!--        </div>-->
+<!--      </el-tooltip>-->
+    </div>
+    <eventLocation ref="eventLocation"></eventLocation>
+    <TVWall ref="TVWall"></TVWall>
+  </div>
+</template>
+
+<script>
+import {
+  getTianzhangList,
+} from '@/api/tianzhangzhi'
+
+import supermap from '@/components/supermap' //超图
+import vheader from '@/components/v-header.vue' //一体化共用头部
+import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
+import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
+import TVWall from '@/components/TVWall.vue' //电视墙弹窗
+
+let echarts = require('echarts')
+export default {
+  components: {
+    supermap,
+    vheader,
+    vBottomMenu,
+    eventLocation,
+    TVWall
+  },
+  data() {
+    return {
+      iconCurrentIndex1: '1',
+      listCurrentIndex1: '',
+      listCurrentIndex2: '',
+      //左右缩进
+      indentStyle: '',
+      indentleft: '',
+      indentright: '',
+      indentText: '收起左右栏',
+      indentdisabled: false,
+      visuTianzhangList: [], //人员类型列表
+    }
+  },
+  created() {
+    this.getInit()
+    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    window.showDialog = this.showDialog
+    window.choseLayerSwitching = this.choseLayerSwitching
+    window.choseLayerSwitchingList = this.choseLayerSwitchingList
+    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+  },
+  methods: {
+    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    showDialog(click) {
+      if (click == 'eventLocation') {
+        this.$refs.eventLocation.showEventLocation()
+        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showChild = false
+        this.$refs.bottomMenu.showBanChild = false
+        this.$refs.bottomMenu.showChangChild = false
+      } else if (click == 'editableLayers') {
+        this.$refs.bottomMenu.showChild = false
+        this.$refs.bottomMenu.showBanChild = false
+        this.$refs.bottomMenu.showChangChild = false
+        if (!this.$refs.supermap.isEditableLayers) {
+          this.$refs.supermap.isEditableLayers = true
+        } else {
+          this.$refs.supermap.isEditableLayers = false
+        }
+      } else if (click == 'layerSwitching') {
+        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showBanChild = false
+        this.$refs.bottomMenu.showChangChild = false
+        if (!this.$refs.bottomMenu.showChild) {
+          this.$refs.bottomMenu.showChild = true
+        } else {
+          this.$refs.bottomMenu.showChild = false
+        }
+      } else if (click == 'TVWall') {
+        this.$refs.TVWall.showTVWall()
+        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showChild = false
+        this.$refs.bottomMenu.showBanChild = false
+        this.$refs.bottomMenu.showChangChild = false
+      } else if (click == 'forestban') {
+        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showChild = false
+        this.$refs.bottomMenu.showChangChild = false
+        if (!this.$refs.bottomMenu.showBanChild) {
+          this.$refs.bottomMenu.showBanChild = true
+        } else {
+          this.$refs.bottomMenu.showBanChild = false
+        }
+      } else if (click == 'forestchang') {
+        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showBanChild = false
+        this.$refs.bottomMenu.showChild = false
+        if (!this.$refs.bottomMenu.showChangChild) {
+          this.$refs.bottomMenu.showChangChild = true
+        } else {
+          this.$refs.bottomMenu.showChangChild = false
+        }
+      }
+
+    },
+    //选择图层
+    choseLayerSwitching(url, isClear) {
+      this.$refs.supermap.layerSwitching(url, isClear)
+    },
+    //选择图层(传递数组)
+    choseLayerSwitchingList(urlList) {
+      this.$refs.supermap.layerSwitchingList(urlList)
+    },
+    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+
+    //初始化
+    getInit() {
+      let that = this
+      this.iconCurrentIndex1 = '1'
+      this.listCurrentIndex1 = ''
+      this.listCurrentIndex2 = ''
+      //获取田长列表
+      getTianzhangList().then(res => {
+        that.visuTianzhangList = res.data
+      })
+    },
+
+    //吉祥物收起左右框
+    indent() {
+      let list = document.getElementsByClassName('el-tooltip__popper')
+      list[list.length - 1].style.display = 'none'
+      if (this.indentStyle == '') {
+        this.indentStyle = 'indent-style'
+        this.indentleft = 'indent-left'
+        this.indentright = 'indent-right'
+        this.indentText = '展开左右栏'
+      } else if (this.indentText == '展开左右栏') {
+        this.indentStyle = ''
+        this.indentleft = ''
+        this.indentright = ''
+        this.indentText = '收起左右栏'
+      }
+    },
+  }
+
+}
+</script>
+
+<style rel="stylesheet/scss" lang="scss" scoped>
+@import '@/assets/styles/base.scss';
+
+.h-27 {
+  height: 27rem;
+}
+</style>

+ 3 - 9
vue.config.js

@@ -48,17 +48,11 @@ module.exports = {
      * 寻找附件-有缘人@阿弥陀佛
      * @param attach_ids
      */
-
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://192.168.2.118:3031`,
-        //  target: `http://117.78.49.164:3031`,
-         // target: `http://192.168.1.122:3031`,
-         target: `http://127.0.0.1:3031`,
-         // target: `http://192.168.1.137:3031`,
-         // target: `https://117.78.49.164:3031`,
-         // target: `https://36.49.108.22:3031`,
+        // target: `http://127.0.0.1:3031`,
+        target: `http://121.36.228.66:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
@@ -70,7 +64,7 @@ module.exports = {
   css: {
     loaderOptions: {
       sass: {
-        sassOptions: { outputStyle: 'expanded' }
+        sassOptions: {outputStyle: 'expanded'}
       }
     }
   },