Преглед изворни кода

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

王通 пре 2 година
родитељ
комит
90692a4644

+ 1 - 0
src/api/components/supermap.js

@@ -26,5 +26,6 @@ export const iconList = {
   //数据中心图标
   'sj-icon-map-centerdata-t-environment-prohibition-area': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata-t-environment-prohibition-area.png'),//禁烧区
   'sj-icon-map-centerdata-t-environment-source-pollution': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata-t-environment-source-pollution.png'),//污染源
+  'sj-icon-map-centerdata_t_environment_sewage_outlet': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_environment_sewage_outlet.png'),//排污口
   'sj-icon-map-centerdata-t-environment-key-enterprise': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata-t-environment-key-enterprise.png'),//重点企业
 }

+ 9 - 1
src/api/monitor.js

@@ -43,7 +43,7 @@ export function rotation(lng,lat,list) {
   // lng = '124.41986560821533';
   // lat = '43.08817137032747';
   return request({
-    url: '/center-fire/VisuForestMonitorCenterController/rotation',
+    url: '/center-environment/VisuForestMonitorCenterController/rotation',
     method: 'post',
     data:{
       lng:lng,
@@ -52,6 +52,14 @@ export function rotation(lng,lat,list) {
     }
   })
 }
+
+//根据部门ID获取具有查看权限的摄像头
+export function getCamerasByDeptId(deptId) {
+  return request({
+    url: '/center-environment/VisuForestMonitorCenterController/getCamerasByDeptId?deptId=' + deptId,
+    method: 'get',
+  })
+}
 /***********************************和上面方法目前一样只是入参不一样以后可能有不一样的地方 start  所以下面三个方法暂时没用到**********************/
 // // 获取环保污染源设备列表
 // export function selectListDevice(param) {

+ 539 - 0
src/assets/iconfont/demo.css

@@ -0,0 +1,539 @@
+/* Logo 字体 */
+@font-face {
+  font-family: "iconfont logo";
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
+}
+
+.logo {
+  font-family: "iconfont logo";
+  font-size: 160px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+/* tabs */
+.nav-tabs {
+  position: relative;
+}
+
+.nav-tabs .nav-more {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  height: 42px;
+  line-height: 42px;
+  color: #666;
+}
+
+#tabs {
+  border-bottom: 1px solid #eee;
+}
+
+#tabs li {
+  cursor: pointer;
+  width: 100px;
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  font-size: 16px;
+  border-bottom: 2px solid transparent;
+  position: relative;
+  z-index: 1;
+  margin-bottom: -1px;
+  color: #666;
+}
+
+
+#tabs .active {
+  border-bottom-color: #f00;
+  color: #222;
+}
+
+.tab-container .content {
+  display: none;
+}
+
+/* 页面布局 */
+.main {
+  padding: 30px 100px;
+  width: 960px;
+  margin: 0 auto;
+}
+
+.main .logo {
+  color: #333;
+  text-align: left;
+  margin-bottom: 30px;
+  line-height: 1;
+  height: 110px;
+  margin-top: -50px;
+  overflow: hidden;
+  *zoom: 1;
+}
+
+.main .logo a {
+  font-size: 160px;
+  color: #333;
+}
+
+.helps {
+  margin-top: 40px;
+}
+
+.helps pre {
+  padding: 20px;
+  margin: 10px 0;
+  border: solid 1px #e7e1cd;
+  background-color: #fffdef;
+  overflow: auto;
+}
+
+.icon_lists {
+  width: 100% !important;
+  overflow: hidden;
+  *zoom: 1;
+}
+
+.icon_lists li {
+  width: 100px;
+  margin-bottom: 10px;
+  margin-right: 20px;
+  text-align: center;
+  list-style: none !important;
+  cursor: default;
+}
+
+.icon_lists li .code-name {
+  line-height: 1.2;
+}
+
+.icon_lists .icon {
+  display: block;
+  height: 100px;
+  line-height: 100px;
+  font-size: 42px;
+  margin: 10px auto;
+  color: #333;
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
+  transition: font-size 0.25s linear, width 0.25s linear;
+}
+
+.icon_lists .icon:hover {
+  font-size: 100px;
+}
+
+.icon_lists .svg-icon {
+  /* 通过设置 font-size 来改变图标大小 */
+  width: 1em;
+  /* 图标和文字相邻时,垂直对齐 */
+  vertical-align: -0.15em;
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
+  fill: currentColor;
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
+      normalize.css 中也包含这行 */
+  overflow: hidden;
+}
+
+.icon_lists li .name,
+.icon_lists li .code-name {
+  color: #666;
+}
+
+/* markdown 样式 */
+.markdown {
+  color: #666;
+  font-size: 14px;
+  line-height: 1.8;
+}
+
+.highlight {
+  line-height: 1.5;
+}
+
+.markdown img {
+  vertical-align: middle;
+  max-width: 100%;
+}
+
+.markdown h1 {
+  color: #404040;
+  font-weight: 500;
+  line-height: 40px;
+  margin-bottom: 24px;
+}
+
+.markdown h2,
+.markdown h3,
+.markdown h4,
+.markdown h5,
+.markdown h6 {
+  color: #404040;
+  margin: 1.6em 0 0.6em 0;
+  font-weight: 500;
+  clear: both;
+}
+
+.markdown h1 {
+  font-size: 28px;
+}
+
+.markdown h2 {
+  font-size: 22px;
+}
+
+.markdown h3 {
+  font-size: 16px;
+}
+
+.markdown h4 {
+  font-size: 14px;
+}
+
+.markdown h5 {
+  font-size: 12px;
+}
+
+.markdown h6 {
+  font-size: 12px;
+}
+
+.markdown hr {
+  height: 1px;
+  border: 0;
+  background: #e9e9e9;
+  margin: 16px 0;
+  clear: both;
+}
+
+.markdown p {
+  margin: 1em 0;
+}
+
+.markdown>p,
+.markdown>blockquote,
+.markdown>.highlight,
+.markdown>ol,
+.markdown>ul {
+  width: 80%;
+}
+
+.markdown ul>li {
+  list-style: circle;
+}
+
+.markdown>ul li,
+.markdown blockquote ul>li {
+  margin-left: 20px;
+  padding-left: 4px;
+}
+
+.markdown>ul li p,
+.markdown>ol li p {
+  margin: 0.6em 0;
+}
+
+.markdown ol>li {
+  list-style: decimal;
+}
+
+.markdown>ol li,
+.markdown blockquote ol>li {
+  margin-left: 20px;
+  padding-left: 4px;
+}
+
+.markdown code {
+  margin: 0 3px;
+  padding: 0 5px;
+  background: #eee;
+  border-radius: 3px;
+}
+
+.markdown strong,
+.markdown b {
+  font-weight: 600;
+}
+
+.markdown>table {
+  border-collapse: collapse;
+  border-spacing: 0px;
+  empty-cells: show;
+  border: 1px solid #e9e9e9;
+  width: 95%;
+  margin-bottom: 24px;
+}
+
+.markdown>table th {
+  white-space: nowrap;
+  color: #333;
+  font-weight: 600;
+}
+
+.markdown>table th,
+.markdown>table td {
+  border: 1px solid #e9e9e9;
+  padding: 8px 16px;
+  text-align: left;
+}
+
+.markdown>table th {
+  background: #F7F7F7;
+}
+
+.markdown blockquote {
+  font-size: 90%;
+  color: #999;
+  border-left: 4px solid #e9e9e9;
+  padding-left: 0.8em;
+  margin: 1em 0;
+}
+
+.markdown blockquote p {
+  margin: 0;
+}
+
+.markdown .anchor {
+  opacity: 0;
+  transition: opacity 0.3s ease;
+  margin-left: 8px;
+}
+
+.markdown .waiting {
+  color: #ccc;
+}
+
+.markdown h1:hover .anchor,
+.markdown h2:hover .anchor,
+.markdown h3:hover .anchor,
+.markdown h4:hover .anchor,
+.markdown h5:hover .anchor,
+.markdown h6:hover .anchor {
+  opacity: 1;
+  display: inline-block;
+}
+
+.markdown>br,
+.markdown>p>br {
+  clear: both;
+}
+
+
+.hljs {
+  display: block;
+  background: white;
+  padding: 0.5em;
+  color: #333333;
+  overflow-x: auto;
+}
+
+.hljs-comment,
+.hljs-meta {
+  color: #969896;
+}
+
+.hljs-string,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-strong,
+.hljs-emphasis,
+.hljs-quote {
+  color: #df5000;
+}
+
+.hljs-keyword,
+.hljs-selector-tag,
+.hljs-type {
+  color: #a71d5d;
+}
+
+.hljs-literal,
+.hljs-symbol,
+.hljs-bullet,
+.hljs-attribute {
+  color: #0086b3;
+}
+
+.hljs-section,
+.hljs-name {
+  color: #63a35c;
+}
+
+.hljs-tag {
+  color: #333333;
+}
+
+.hljs-title,
+.hljs-attr,
+.hljs-selector-id,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo {
+  color: #795da3;
+}
+
+.hljs-addition {
+  color: #55a532;
+  background-color: #eaffea;
+}
+
+.hljs-deletion {
+  color: #bd2c00;
+  background-color: #ffecec;
+}
+
+.hljs-link {
+  text-decoration: underline;
+}
+
+/* 代码高亮 */
+/* PrismJS 1.15.0
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: black;
+  background: none;
+  text-shadow: 0 1px white;
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+
+  -moz-tab-size: 4;
+  -o-tab-size: 4;
+  tab-size: 4;
+
+  -webkit-hyphens: none;
+  -moz-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+
+pre[class*="language-"]::-moz-selection,
+pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection,
+code[class*="language-"] ::-moz-selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+
+pre[class*="language-"]::selection,
+pre[class*="language-"] ::selection,
+code[class*="language-"]::selection,
+code[class*="language-"] ::selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+
+@media print {
+
+  code[class*="language-"],
+  pre[class*="language-"] {
+    text-shadow: none;
+  }
+}
+
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: .5em 0;
+  overflow: auto;
+}
+
+:not(pre)>code[class*="language-"],
+pre[class*="language-"] {
+  background: #f5f2f0;
+}
+
+/* Inline code */
+:not(pre)>code[class*="language-"] {
+  padding: .1em;
+  border-radius: .3em;
+  white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: slategray;
+}
+
+.token.punctuation {
+  color: #999;
+}
+
+.namespace {
+  opacity: .7;
+}
+
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #905;
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #690;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+  color: #9a6e3a;
+  background: hsla(0, 0%, 100%, .5);
+}
+
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+  color: #07a;
+}
+
+.token.function,
+.token.class-name {
+  color: #DD4A68;
+}
+
+.token.regex,
+.token.important,
+.token.variable {
+  color: #e90;
+}
+
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+
+.token.italic {
+  font-style: italic;
+}
+
+.token.entity {
+  cursor: help;
+}

Разлика између датотеке није приказан због своје велике величине
+ 1961 - 0
src/assets/iconfont/demo_index.html


Разлика између датотеке није приказан због своје велике величине
+ 88 - 20
src/assets/iconfont/iconfont.css


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 134 - 15
src/assets/iconfont/iconfont.json

@@ -6,6 +6,125 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "10083087",
+      "name": "GIS-图例、图层icon_排污井",
+      "font_class": "paiwukou",
+      "unicode": "e63c",
+      "unicode_decimal": 58940
+    },
+    {
+      "icon_id": "2121726",
+      "name": "旅游",
+      "font_class": "lvyou",
+      "unicode": "e637",
+      "unicode_decimal": 58935
+    },
+    {
+      "icon_id": "10164896",
+      "name": "警察",
+      "font_class": "jingcha",
+      "unicode": "e662",
+      "unicode_decimal": 58978
+    },
+    {
+      "icon_id": "19657701",
+      "name": "商城管理",
+      "font_class": "shangchengguanli",
+      "unicode": "e638",
+      "unicode_decimal": 58936
+    },
+    {
+      "icon_id": "31461858",
+      "name": "土地",
+      "font_class": "tudi",
+      "unicode": "100e7",
+      "unicode_decimal": 65767
+    },
+    {
+      "icon_id": "33191314",
+      "name": "重点服务企业",
+      "font_class": "centerdata-t-firecontrol-fire-key-places",
+      "unicode": "e66f",
+      "unicode_decimal": 58991
+    },
+    {
+      "icon_id": "21053689",
+      "name": "传感器",
+      "font_class": "centerdata-t-firecontrol-fire-pressure-sensor",
+      "unicode": "e674",
+      "unicode_decimal": 58996
+    },
+    {
+      "icon_id": "21492584",
+      "name": "5饲料",
+      "font_class": "farmenterprise_2",
+      "unicode": "e67a",
+      "unicode_decimal": 59002
+    },
+    {
+      "icon_id": "1486836",
+      "name": "生鲜",
+      "font_class": "farmenterprise_1",
+      "unicode": "e639",
+      "unicode_decimal": 58937
+    },
+    {
+      "icon_id": "2116698",
+      "name": "规模化畜禽养殖场",
+      "font_class": "filingslivestock",
+      "unicode": "e63a",
+      "unicode_decimal": 58938
+    },
+    {
+      "icon_id": "4670127",
+      "name": "农业",
+      "font_class": "protectinfo",
+      "unicode": "e63b",
+      "unicode_decimal": 58939
+    },
+    {
+      "icon_id": "5387788",
+      "name": "人工改站_o",
+      "font_class": "complexmodification",
+      "unicode": "eb56",
+      "unicode_decimal": 60246
+    },
+    {
+      "icon_id": "11831137",
+      "name": "菜刀",
+      "font_class": "farmenterprise_3",
+      "unicode": "e731",
+      "unicode_decimal": 59185
+    },
+    {
+      "icon_id": "6308127",
+      "name": "疑问说明",
+      "font_class": "yiwenshuoming",
+      "unicode": "e693",
+      "unicode_decimal": 59027
+    },
+    {
+      "icon_id": "11799014",
+      "name": "移动端",
+      "font_class": "yidongduan",
+      "unicode": "e653",
+      "unicode_decimal": 58963
+    },
+    {
+      "icon_id": "15718632",
+      "name": "工具",
+      "font_class": "gongju",
+      "unicode": "e6cf",
+      "unicode_decimal": 59087
+    },
+    {
+      "icon_id": "35419040",
+      "name": "泡沫液-copy",
+      "font_class": "centerdata-t-firecontrol-foam-liquid-copy",
+      "unicode": "100e8",
+      "unicode_decimal": 65768
+    },
+    {
       "icon_id": "33526953",
       "name": "禁烧区",
       "font_class": "area",
@@ -36,28 +155,28 @@
     {
       "icon_id": "33526964",
       "name": "其他联动力量",
-      "font_class": "otherlinkageforce",
+      "font_class": "centerdata-t-firecontrol-other-linkage-force",
       "unicode": "e633",
       "unicode_decimal": 58931
     },
     {
       "icon_id": "33526965",
       "name": "泡沫液",
-      "font_class": "liquid",
+      "font_class": "centerdata-t-firecontrol-foam-liquid",
       "unicode": "e634",
       "unicode_decimal": 58932
     },
     {
       "icon_id": "33526966",
       "name": "基本联动力量",
-      "font_class": "linkageforce",
+      "font_class": "centerdata-t-firecontrol-basic-linkage-force",
       "unicode": "e635",
       "unicode_decimal": 58933
     },
     {
       "icon_id": "33526967",
       "name": "消防力量",
-      "font_class": "fireforce",
+      "font_class": "centerdata-t-firecontrol-fire-force",
       "unicode": "e636",
       "unicode_decimal": 58934
     },
@@ -71,7 +190,7 @@
     {
       "icon_id": "765262",
       "name": "首页",
-      "font_class": "xubao",
+      "font_class": "farmlivestock",
       "unicode": "e629",
       "unicode_decimal": 58921
     },
@@ -85,14 +204,14 @@
     {
       "icon_id": "8353896",
       "name": "三农补助",
-      "font_class": "buzhu",
+      "font_class": "greenhousefilm",
       "unicode": "e62a",
       "unicode_decimal": 58922
     },
     {
       "icon_id": "12875287",
       "name": "农机农具",
-      "font_class": "nongji",
+      "font_class": "machineryinfo",
       "unicode": "e62c",
       "unicode_decimal": 58924
     },
@@ -113,7 +232,7 @@
     {
       "icon_id": "18262823",
       "name": "畜禽养殖粪污处理情况30",
-      "font_class": "yangzhi",
+      "font_class": "excrementdispose",
       "unicode": "e82e",
       "unicode_decimal": 59438
     },
@@ -127,14 +246,14 @@
     {
       "icon_id": "21432644",
       "name": "农民合作社",
-      "font_class": "hezuoshe",
+      "font_class": "agriculturalcooperatives",
       "unicode": "e62e",
       "unicode_decimal": 58926
     },
     {
       "icon_id": "26393477",
       "name": "icon_盾、保护",
-      "font_class": "baohu",
+      "font_class": "agriculturalsupervise",
       "unicode": "e64c",
       "unicode_decimal": 58956
     },
@@ -232,7 +351,7 @@
     {
       "icon_id": "30787117",
       "name": "防火检查站",
-      "font_class": "checkpoint",
+      "font_class": "centerdata-t-firecontrol-fulltime-station",
       "unicode": "e601",
       "unicode_decimal": 58881
     },
@@ -295,14 +414,14 @@
     {
       "icon_id": "30787127",
       "name": "林场",
-      "font_class": "farm",
+      "font_class": "level",
       "unicode": "e60a",
       "unicode_decimal": 58890
     },
     {
       "icon_id": "30787128",
       "name": "取水口",
-      "font_class": "waterintake",
+      "font_class": "centerdata-t-forest-waterintake",
       "unicode": "e60b",
       "unicode_decimal": 58891
     },
@@ -358,7 +477,7 @@
     {
       "icon_id": "30787137",
       "name": "消火栓",
-      "font_class": "firehydrant",
+      "font_class": "centerdata-t-forest-firehydrant",
       "unicode": "e614",
       "unicode_decimal": 58900
     },
@@ -372,7 +491,7 @@
     {
       "icon_id": "30787139",
       "name": "水鹤",
-      "font_class": "watercrane",
+      "font_class": "centerdata-t-forest-watercrane",
       "unicode": "e616",
       "unicode_decimal": 58902
     },

Разлика између датотеке није приказан због своје велике величине
+ 49 - 15
src/assets/iconfont/iconfont.svg


BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2


BIN
src/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_environment_sewage_outlet.png


+ 3 - 3
src/assets/styles/base.scss

@@ -83,12 +83,12 @@ $date-state3: #d6333b;
 //视频摄像头预览弹层样式
 .videoCustomWidth {
   width: 1070px !important;
-  height: 700px !important;
+  height: 750px !important;
 }
 //电视墙视频摄像头预览弹层样式
 .TVWallCustomWidth {
-  width: 1150px !important;
-  height: 700px !important;
+  width: 1200px !important;
+  height: 800px !important;
 }
 
 

+ 24 - 8
src/components/TVWall.vue

@@ -283,7 +283,7 @@ export default {
       }
     },
     //火点联动电视墙调用
-    showTVWall1(longitude,latitude,tvListJson) {
+    showTVWall1(longitude, latitude, tvListJson) {
       // let that=this;
       /** ----------------------------------大华摄像头预览开始------------------------------------- */
       this.ws.addEventListener('connectStateChange', data => {
@@ -411,7 +411,12 @@ export default {
       rotation(lng,lat,list).then(res => {
       })
     },
-    showTVWall() {
+    showTVWall(tvListJson, bfArray) {
+      if(tvListJson){
+        this.preview(tvListJson, bfArray);
+        this.TVWallVisible = true;
+        return;
+      }
       // let that=this;
       /** ----------------------------------大华摄像头预览开始------------------------------------- */
       this.ws.addEventListener('connectStateChange', data => {
@@ -460,7 +465,7 @@ export default {
       this.$modal.msgWarning('请重新安装客户端')
     },
     /** 预览按钮操作 */
-    preview() {
+    preview(tvListJson, bfArray) {
       getTVWallList().then(newres => {
         getDahuaVideoServer().then(newResponse => {
           this.ws.detectConnectQt().then(res => {
@@ -484,7 +489,7 @@ export default {
                 if (res) {
                   this.alertLoginSuccess()
                   this.activePanel = 'key2'
-                  this.create(newres.data)
+                  this.create(tvListJson?tvListJson:newres.data, bfArray);
                 } else {
                   this.alertLoginFailed()
                 }
@@ -497,7 +502,7 @@ export default {
       })
     },
 
-    create(tvListJson) { // 调用创建控件接口
+    create(tvListJson, bfArray) { // 调用创建控件接口
       debugger
       let _this = this
       const params = [
@@ -519,9 +524,20 @@ export default {
       ]
       this.setPos()
       this.customizeTree(tvListJson);
-      setTimeout(function () {
-        _this.ws.createCtrl(params);
-      }, 3000);
+      _this.ws.createCtrl(params);
+      _this.playRealMonitorVideo(bfArray);
+    },
+    playRealMonitorVideo(array) { // 自定义设备树自动播放指定通道编码视频
+      const config = this.ws.config
+      const { loginIp, userCode } = config
+      this.ws.postMessage('playRealMonitorVideo', {
+        loginIp,
+        userCode,
+        params: {
+          ctrlCode: "ctrl1",
+          array: array
+        }
+      })
     },
     setPos() {
       let target = document.getElementById(this.domId)

+ 757 - 0
src/components/TVWalls.vue

@@ -0,0 +1,757 @@
+<template>
+  <div>
+    <el-dialog title="电视墙" :visible.sync="TVWallVisible" v-if="TVWallVisible" customClass="TVWallCustomWidth"
+               @close="cancelEventLocationShow()">
+      <!--<div @click="findCameraByEventCoordinate()">视频联动</div>-->
+      <!--<div class="forthis" style="width: 22%; position: absolute;left: 0;z-index: 9999999999999;">-->
+      <!--<div class="i-list-con" style="height: 46vh; overflow-y: scroll;">-->
+      <!--<span v-for="(item,index) in cameraList" :key="index">-->
+      <!--<div class="d-l-con" @click="playhk(item.channelCode)">-->
+      <!--<div class="d-l-l-text">-->
+      <!--<i class="i-small"></i>-->
+      <!--<h4>{{ item.cameraName }}</h4>-->
+      <!--</div>-->
+      <!--</div>-->
+      <!--</span>-->
+      <!--</div>-->
+      <!--</div>-->
+      <!--<div style="width:70%;height:400px;position:absolute;">-->
+      <!--&lt;!&ndash;视频窗口展示-&#45;&#45;大华&ndash;&gt;-->
+      <!--<div id="dom1" class="dom1"></div>-->
+      <!--&lt;!&ndash;视频窗口展示-&#45;&#45;海康&ndash;&gt;-->
+      <!--<div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>-->
+      <!--</div>-->
+
+      <div id="dom1" class="dom1"></div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+/** ----------------------------------摄像头预览开始------------------------------------- */
+import {getDahuaVideoServer, getTVWallList} from '@/api/dahua/dahua'
+import {tvCameraList} from '@/api/haikang/haikang'
+import {findCameraByEventCoordinate, rotation} from '@/api/monitor'
+import DHWs from '@/dahua/lib/DHWs'
+
+/** ----------------------------------摄像头预览结束------------------------------------- */
+export default {
+  dicts: ['event_source'],
+  components: {},
+  data() {
+    return {
+      tvListJson: [
+        {
+          'switchTab': '1',
+          'treeLabels': [
+            {
+              'labelCode': '123456',
+              'labelName': '视频场景',
+              'parentLabelCode': null
+            },
+            {
+              'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa',
+              'labelName': '标签2',
+              'parentLabelCode': 123456
+            },
+            {
+              'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
+              'labelName': '标签1',
+              'parentLabelCode': 123456
+            }
+          ],
+          'labelChannels': [{
+            'channelDates': [{
+              'channelCode': '6044981090191552',
+              'channelName': '复兴大桥中段-交通事故',
+              'channelSn': null,
+              'cameraType': 0,
+              'online': 1
+            },
+              {
+                'channelCode': 'ZgVzqsjwA1DTF561VGHK5E',
+                'channelName': '北京7青羊东二路77号2通道1',
+                'channelSn': null,
+                'cameraType': 1,
+                'online': 1
+              }
+            ],
+            'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
+          },
+            {
+              'channelDates': [{
+                'channelCode': 'ZgVzqsjwA1DTF561VGHKK7',
+                'channelName': '北京7青羊东二路77号2通道2',
+                'channelSn': null,
+                'cameraType': 2,
+                'online': 0
+              }],
+              'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa'
+            }
+          ]
+        },
+        {
+          'switchTab': '2',
+          'labelChannels': [{
+            'channelDates': [{
+              'channelCode': 'ZgVzqsjwA1DTF561VGHK5E',
+              'channelName': '北京7青羊东二路77号2通道1',
+              'channelSn': null,
+              'cameraType': 1,
+              'online': 1
+            },
+              {
+                'channelCode': 'ZgVzqsjwA1DTF561VGHKK7',
+                'channelName': '北京7青羊东二路77号2通道2',
+                'channelSn': null,
+                'cameraType': 2,
+                'online': 0
+              }
+            ]
+          }]
+        }
+      ],
+      TVWallVisible: false,
+      activeName: 'tv',
+      channelId: ['ZgVzqsjwA1DTF561VHG69F'],
+      /** ----------------------------------摄像头预览开始------------------------------------- */
+      showModal: true,
+      activePanel: 'key1',
+      isLogin: false,
+      loginType: '1',
+      token: '',
+      ctrlType: 'playerWin',
+      https: 1,
+      httpsList: [
+        {
+          value: 0,
+          label: 0
+        },
+        {
+          value: 1,
+          label: 1
+        }
+      ],
+      ctrlTypeList: [{
+        value: 'playerWin',
+        label: '播放控件'
+      }, {
+        value: 'realMonitorUI',
+        label: '带设备树实时预览控件'
+      }, {
+        value: 'playbackUI',
+        label: '带设备树视频回放控件'
+      }, {
+        value: 'TVWallUI',
+        label: '视频上墙'
+      }],
+      ctrlList: [
+        {
+          value: 'ctrl1',
+          label: '控件1'
+        },
+        {
+          value: 'ctrl2',
+          label: '控件2'
+        },
+        {
+          value: 'ctrl3',
+          label: '控件3'
+        }
+      ],
+      splitList: [
+        {
+          value: 1,
+          label: '1 * 1'
+        },
+        {
+          value: 4,
+          label: '2 * 2'
+        },
+        {
+          value: 9,
+          label: '3 * 3'
+        }
+      ],
+      displayModeList: [
+        {
+          value: 1,
+          label: '播放器预览模式'
+        },
+        {
+          value: 2,
+          label: '播放器回放模式'
+        }
+      ],
+      mixedVideoDisplayModeList: [
+        {
+          value: 1,
+          label: '播放实时视频'
+        },
+        {
+          value: 2,
+          label: '播放回放视频'
+        }
+      ],
+      ctrl: 'ctrl1',
+      splitNum: 1,
+      displayMode: 1,
+      displayTimeRange: [],
+      modalDisplayTimeRange: [],
+      mixedVideoTime: null,
+      recordPath: 'C:\\DSS LightWeight\\DSS LightWeight Client\\Record\\',
+      downloadName: '',
+      downTimeRange: [],
+      downloadFormat: 0,
+      downloadFormatList: [{
+        value: 0,
+        label: 'dav'
+      },
+        {
+          value: 1,
+          label: 'avi'
+        }, {
+          value: 2,
+          label: 'mp4'
+        }],
+      downloadSource: 3,
+      downloadSourceList: [
+        {
+          value: 3,
+          label: '中心录像'
+        }, {
+          value: 2,
+          label: '设备录像'
+        }],
+      showDownloadStreamType: false,
+      downloadStreamType: 1,
+      downloadStreamTypeList: [{
+        value: 1,
+        label: '主码流'
+      },
+        {
+          value: 2,
+          label: '辅码流'
+        },
+        {
+          value: 3,
+          label: '三码流'
+        }],
+      downloadIsShow: true,
+      downloadIsShowList: [{
+        value: true,
+        label: '是'
+      },
+        {
+          value: false,
+          label: '否'
+        }],
+      crtPosX: 0,
+      crtPosY: 0,
+      crtWidth: 1148,
+      crtHeight: 650,
+      domId: 'dom1',
+      mixedVideoDisplayMode: 2,
+      isShowTipe: true,
+      autoList: [],
+      stringList: [],
+      data: null,
+      /** ----------------------------------摄像头预览结束------------------------------------- */
+      cameraList: [],
+      initCount: 0,
+      pubKey: '',
+      oWebControl: null
+    }
+  },
+  created() {
+    const DHWsInstance = DHWs.getInstance()
+    this.ws = DHWsInstance
+  },
+  methods: {
+    cancelEventLocationShow() {
+      // this.activeName = 'tv'
+      this.TVWallVisible = false
+      this.destroy()
+
+      if (this.oWebControl != null) {
+        this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
+        this.oWebControl.JS_Disconnect().then(function () {  // 断开与插件服务连接成功
+          },
+          function () {  // 断开与插件服务连接失败
+          })
+      }
+    },
+    showTVWall(data, val) {
+      this.tvListJson = data
+      this.data = val
+      this.autoList = []
+      this.stringList = []
+      let length = data[0].treeLabels.length >= 4 ? 5 : data[0].treeLabels.length
+      for (let i = 1; i < length; i++) {
+        this.autoList.push({"channelId": data[0].treeLabels[i].labelCode})
+        this.stringList.push(data[0].treeLabels[i].labelCode)
+      }
+      console.log("this.autoList",this.autoList);
+      console.log("this.stringList",this.stringList);
+      // let that=this;
+      /** ----------------------------------大华摄像头预览开始------------------------------------- */
+      this.ws.addEventListener('connectStateChange', data => {
+        if (data) {
+          console.log('连接成功')
+        } else {
+          console.log('连接失败,下载客户端')
+          this.alertReinstall()
+          this.isShowTipe && this.$modal.confirm({
+            title: '下载客户端',
+            content: '检测到您未安装部分插件,将影响部分功能使用,请下载后使用?',
+            onOk: () => {
+              //这里写下载方法
+              this.isShowTipe = false
+            },
+            onCancel: () => {
+              this.isShowTipe = false
+            }
+          });
+        }
+      })
+      this.preview()
+      /** ----------------------------------大华摄像头预览结束------------------------------------- */
+      /** ----------------------------------海康摄像头预览开始------------------------------------- */
+      // tvCameraList().then(response => {
+      //   this.cameraList=response.data
+      // })
+      // that.initPlugin()
+      // setTimeout(function() {
+      //   that.playhk();
+      // }, 5000)
+      // /** ----------------------------------海康摄像头预览结束------------------------------------- */
+      this.TVWallVisible = true
+    },
+    /** ----------------------------------大华摄像头预览开始------------------------------------- */
+    alertLogin: function () {
+      this.$modal.msg('登录中....')
+    },
+    alertLoginSuccess: function () {
+      this.$modal.msgSuccess('登录成功!')
+    },
+    alertLoginFailed: function () {
+      this.$modal.msgError('登陆失败!')
+    },
+    alertReinstall: function () {
+      this.$modal.msgWarning('请重新安装客户端')
+    },
+    /** 预览按钮操作 */
+    preview() {
+      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,
+              // loginIp: '192.168.100.100',
+              // loginPort: 8314,
+              // userName: 'system',
+              // userPwd: 'Admin@123',
+              token: '',
+              https: 1
+            })
+            this.ws.on('loginState', (res) => {
+              this.isLogin = res
+              console.log('---res-----', res)
+              if (res) {
+                this.alertLoginSuccess()
+                this.activePanel = 'key2'
+                this.create(this.tvListJson)
+              } else {
+                this.alertLoginFailed()
+              }
+            })
+          } else { // 连接客户端失败
+            this.alertReinstall()
+          }
+        })
+      })
+    },
+    playRealMonitorVideo() { // 自定义设备树自动播放指定通道编码视频
+      const config = this.ws.config
+      const {loginIp, userCode} = config
+      this.ws.postMessage('playRealMonitorVideo', {
+        loginIp,
+        userCode,
+        params: {
+          ctrlCode: "ctrl1",
+          array: this.autoList
+        }
+      })
+    },
+    create(tvListJson) { // 调用创建控件接口
+      let _this = this
+      const params = [
+        {
+          'ctrlType': 'realMonitorUI',
+          'ctrlCode': 'ctrl1',
+          'ctrlProperty': {
+            'displayMode': 1,
+            'splitNum': 1,
+            'channelList': [
+              {
+                'channelId': ''
+              }
+            ]
+          },
+          'visible': true,
+          'domId': 'dom1'
+        }
+      ]
+      this.setPos()
+      this.customizeTree(tvListJson);
+      _this.ws.createCtrl(params);
+      _this.playRealMonitorVideo();
+      if (_this.data != undefined && _this.data != null) {
+        setTimeout( _this.rotation(_this.data.longitude, _this.data.latitude, _this.stringList),5000)
+      }
+    },
+    rotation(lng,lat,list){
+      rotation(lng,lat,list);
+    },
+    setPos() {
+      let target = document.getElementById(this.domId)
+      console.log(target, 'target')
+      target.style.right = `${this.crtPosX}px`
+      target.style.top = `${this.crtPosY}px`
+      target.style.width = `${this.crtWidth}px`
+      target.style.height = `${this.crtHeight}px`
+      if (document.createEvent) {
+        var event = document.createEvent('HTMLEvents')
+        event.initEvent('resize', true, true)
+        window.dispatchEvent(event)
+      } else if (document.createEventObject) {
+        window.fireEvent('onresize')
+      }
+    },
+    destroy() { // 调用销毁控件接口
+      if (!this.isLogin) {
+        this.$modal.msgWarning('正在登陆客户端,请稍等......')
+        return false
+      }
+      const ctrls = this.ws.ctrls.map(i => {
+        if (i.ctrlCode === this.ctrl) {
+          return i.ctrlCode
+        }
+      })
+      this.ws.destroyCtrl(ctrls)
+    },
+    customizeTree(tvListJson) { // 调用控件接口树
+      const config = this.ws.config
+      const {loginIp, userCode} = config
+      this.ws.postMessage('customizeTree', {
+        loginIp,
+        userCode,
+        params: {
+          array: tvListJson
+        }
+      })
+    },
+    /** ----------------------------------大华摄像头预览结束------------------------------------- */
+    /** ----------------------------------海康摄像头预览开始------------------------------------- */
+    // 创建播放实例
+    initPlugin() {
+      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', 850, 615).then(function () { //JS_CreateWnd创建视频播放窗口,宽高可设定
+              that.init()  // 创建播放实例成功后初始化
+            })
+          }, 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()
+            }, 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
+        }
+      })
+    },
+    //初始化
+    init() {
+      let that = this
+      this.getPubKey(function () {
+        ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
+        var appkey = '24699060'                           //综合安防管理平台提供的appkey,必填
+        var secret = that.setEncrypt('tt1pMbsrlwGZUWucdAPw')   //综合安防管理平台提供的secret,必填
+        var ip = '36.49.108.22'                           //综合安防管理平台IP地址,必填
+        var playMode = 0                                  //初始播放模式:0-预览,1-回放
+        var port = 1443                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+        var snapDir = 'D:\\SnapDir'                       //抓图存储路径
+        var videoDir = 'D:\\VideoDir'                     //紧急录像或录像剪辑存储路径
+        var layout = '3x3'                                //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(850, 615)  // 初始化后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()
+        }
+        125
+      })
+    },
+//RSA加密
+    setEncrypt(value) {
+      var encrypt = new JSEncrypt()
+      encrypt.setPublicKey(this.pubKey)
+      return encrypt.encrypt(value)
+    },
+    //播放海康摄像头
+    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                                     //可指定播放窗口
+        })
+      })
+    }
+    /** ----------------------------------海康摄像头预览结束------------------------------------- */
+  }
+}
+
+// 推送消息
+function cbIntegrationCallBack(oData) {
+  console.log(JSON.stringify(oData.responseMsg))
+}
+</script>
+
+<style rel="stylesheet/scss" lang="scss" scoped>
+@import '@/assets/styles/base.scss';
+
+.event-info-con {
+  width: 100%;
+  display: flex;
+
+  .e-left {
+    width: 32%;
+  }
+
+  .e-center {
+    width: 30%;
+    margin-left: 1%;
+
+    .img-company {
+      width: 100%;
+      height: 18.3vh;
+
+      img {
+      }
+    }
+  }
+
+  .e-right {
+    margin-left: 1%;
+    width: 45%;
+  }
+
+  .e-location-left {
+    width: 28%;
+    margin-top: 1rem;
+  }
+
+  .e-location-right {
+    width: 71%;
+    margin-top: 1.3rem;
+    margin-left: 1rem;
+  }
+}
+
+.el-dialog:not(.is-fullscreen) {
+  margin-top: 5.5vh !important;
+}
+
+.bottom-menu-normal {
+  max-width: 90%;
+  padding: 0 3rem;
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: 0;
+  z-index: 100000;
+  border-radius: 5px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: url(../assets/images/integrated/btm-menu.png) center no-repeat;
+  background-size: cover;
+  overflow: hidden;
+
+  .btm-m-con {
+    position: relative;
+    color: $inBlue;
+    font-size: .5rem;
+    padding: 1rem 1.5rem;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    -webkit-transform: translateY(0);
+    transform: translateY(0);
+    transition: all 0.2s ease-in-out;
+    cursor: pointer;
+    white-space: nowrap;
+
+    i {
+      font-size: 1rem;
+      color: $inBlue;
+      text-shadow: 0 0 10px rgba($color: $inBlue, $alpha: .6);
+      margin-right: 0.2rem;
+    }
+  }
+
+  .btm-m-con:hover {
+    text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
+    filter: brightness(2.3);
+    -webkit-transform: translateX(0.2rem);
+    transform: translateX(0.2rem);
+    transition: all 0.2s ease-in-out;
+
+    i {
+      color: $inBlueHover;
+      text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
+    }
+  }
+
+  .m-l-none {
+    .el-input__inner {
+      margin-left: 0 !important;
+    }
+  }
+
+}
+
+/*海康*/
+html, body {
+  padding: 0;
+  margin: 0;
+}
+
+.playWnd {
+  margin: -13px 0 0 255px;
+  width: 850px; /*播放容器的宽和高设定*/
+  height: 615px;
+  border: 1px solid red;
+}
+
+.operate {
+  margin-top: 24px;
+}
+
+.operate::after {
+  content: '';
+  display: block;
+  clear: both;
+}
+
+.module {
+  float: left;
+  width: 340px;
+  /*min-height: 320px;*/
+  margin-left: 16px;
+  padding: 16px 8px;
+  box-sizing: border-box;
+  border: 1px solid #e5e5e5;
+}
+
+.module .item {
+  margin-bottom: 4px;
+}
+
+.module input[type="text"] {
+  box-sizing: border-box;
+  display: inline-block;
+  vertical-align: middle;
+  margin-left: 0;
+  width: 150px;
+  min-height: 20px;
+}
+
+.module .btn {
+  min-width: 80px;
+  min-height: 24px;
+  margin-top: 100px;
+  margin-left: 80px;
+}
+</style>

+ 5 - 5
src/components/vBottomMenu.vue

@@ -432,11 +432,11 @@
 						icon: 'iconfont sj-icon-sjdw',
 						click: 'eventLocation'
 					},
-					{
-						name: '图层切换',
-						icon: 'iconfont sj-icon-tcqh',
-						click: 'layerSwitching'
-					},
+					// {
+					// 	name: '图层切换',
+					// 	icon: 'iconfont sj-icon-tcqh',
+					// 	click: 'layerSwitching'
+					// },
 					{
 						name: '测量工具',
 						icon: 'iconfont sj-icon-clgj',

+ 62 - 0
src/views/datacenter.vue

@@ -425,6 +425,37 @@ export default {
                 '                </span>' +
                 '<span>' +
                 '</div>'
+            } else if (resourceTable == 'centerdata_t_environment_sewage_outlet') { //排污口
+              markersMap.icon = 'sj-icon-map-centerdata_t_environment_sewage_outlet'
+              markersMap.lng = res.data.resourceList[i].longitude
+              markersMap.lat = res.data.resourceList[i].latitude
+              markersMap.bindPopupHtml = '<div class="map-tip">' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
+                  .data.resourceList[i].latitude + '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>排污口名称:' + res.data.resourceList[i].name +
+                '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>地址:' + res.data.resourceList[i].address +
+                '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '</div>'
             }
             that.markersList.push(markersMap)
           }
@@ -568,6 +599,37 @@ export default {
                 '                </span>' +
                 '<span>' +
                 '</div>'
+            } else if (that.resourceTable == 'centerdata_t_environment_sewage_outlet') { //排污口
+              markersMap.icon = 'sj-icon-map-centerdata_t_environment_sewage_outlet'
+              markersMap.lng = res.data.resourceList[i].longitude
+              markersMap.lat = res.data.resourceList[i].latitude
+              markersMap.bindPopupHtml = '<div class="map-tip">' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
+                  .data.resourceList[i].latitude + '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>排污口名称:' + res.data.resourceList[i].name +
+                '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>地址:' + res.data.resourceList[i].address +
+                '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '</div>'
             }
             that.markersList.push(markersMap)
           }

+ 13 - 24
src/views/forest.vue

@@ -464,6 +464,7 @@
   import Firespread from "./firespread";
   import chart from "./from/dvCapsuleChart.vue";
 
+  import {selectConfigKey} from "@/api/system/config";
   let echarts = require('echarts')
   export default {
     components: {
@@ -502,17 +503,6 @@
       /** ----------------------------------weosocket开始------------------------------------- */
       // this.initWebSocket()
       /** ----------------------------------weosocket结束------------------------------------- */
-      setInterval(() => {
-        if (this.calendarDay == this.getCurrentDataStr()) {
-          this.getTodayEvents(this.getCurrentDataStr(), true);
-          this.getDeptEventCount(this.getCurrentDataStr(), true);
-          // this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum, '', true);
-          this.getEventByEventType(this.getCurrentDataStr(), true);
-          this.getEventByReportorOrder(this.getCurrentDataStr(), true);
-          this.getExposureStage(this.getCurrentDataStr(), true);
-          // this.getSupermap(this.getCurrentDataStr(), true);
-        }
-      }, 30000)
 
       this.bottomMenuList() //获取底部公共组件消息和任务
     },
@@ -1148,12 +1138,14 @@
       },
       /** ----------------------------------weosocket开始------------------------------------- */
       initWebSocket(userId, eventTypeDl, eventType) {        //初始化weosocket
-        const wsuri = 'ws://127.0.0.1:10003/eventPush/' + userId + '/' + eventTypeDl + '/' + eventType
+        selectConfigKey('KSH_SOCKET').then(res => {
+        const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
         this.websock = new WebSocket(wsuri)
         console.log('建立websocket连接')
         this.websock.onopen = this.websocketonopen
         this.websock.onmessage = this.websocketonmessage
         this.websock.onerror = this.websocketonerror
+      })
       },
       websocketonopen() { //连接建立之后执行send方法发送数据
         console.log('websocket连接成功')
@@ -1166,19 +1158,18 @@
       websocketonmessage(e) { //数据接收
         console.log('接收数据', e.data)
         // let data = "{\"fromId\":\"forest\",\"fromUserId\":\""+Cookies.get('username')+"\",\"toUserId\":\""+Cookies.get('username')+"\"}";
-        let data = "{\"fromId\":\"forest\",\"fromUserId\":\"admin\",\"toUserId\":\"admin\"}";
+        let data = "{\"fromId\":\"environment\"}";
         if (this.calendarDay == this.getCurrentDataStr() && data != e.data) {
           // 处理收到的消息
           this.handleWebSoceketEvent(e.data)
 
-          // this.getEventListNew();
-          // this.getTodayEvents(this.getCurrentDataStr());
-          // this.getDeptEventCount(this.getCurrentDataStr());
-          // this.getEventByEventType(this.getCurrentDataStr());
-          // this.getEventByReportorOrder(this.getCurrentDataStr());
-
-          // this.$refs.bottomMenu.updateAlert();
-          // this.$refs.up.play();
+          this.getTodayEvents(this.getCurrentDataStr(), true);
+          this.getDeptEventCount(this.getCurrentDataStr(), true);
+          this.getEventByEventType(this.getCurrentDataStr(), true);
+          this.getEventByReportorOrder(this.getCurrentDataStr(), true);
+          this.getExposureStage(this.getCurrentDataStr(), true);
+          this.$refs.bottomMenu.updateAlert();
+          this.$refs.up.play();
           // thes.$refs.up.pause();//停止播放音乐
         }
       },
@@ -1218,9 +1209,7 @@
        * @param {string} ping 心跳名称 默认字符串ping
        */
       sendPing(time = 60000, ping = {
-        'fromId': 'forest',
-        'fromUserId': Cookies.get('username'),
-        'toUserId': Cookies.get('username')
+        'fromId': 'environment'
       }) {
         clearInterval(this.setIntervalWesocketPush)
         this.setIntervalWesocketPush = setInterval(() => {

+ 452 - 427
src/views/leader.vue

@@ -1,78 +1,86 @@
 <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-25">
-							<div id="personnel-chart" style="width: 100%;height:12vh;"></div>
-							<div class="d-l-con-icon">
-								<div class="icon-con w-50" :class="{on:iconCurrentIndex1==item.jobValue}"
-									v-for="(item,index) in visuForestCloudRYBO"
-									@click="getForestLeader(item.jobValue,item.jobType)">
-									<div class="icon icon-mid el-icon-user"></div>
-									<div class="icon-text">
-										<h5>{{ item.job }}</h5>
-										<h6>{{ item.number }}</h6>
-									</div>
-								</div>
-								<!-- <div class="icon-con w-50  m-btm-no" :class="{on:listCurrentIndex1==item.jobType}" v-for="(item,index) in visuForestCloudRYBO" v-if="index%2!=0" @click="getForestLeader(item.jobValue,item.jobType)">
+  <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-25">
+              <div id="personnel-chart" style="width: 100%;height:12vh;"></div>
+              <div class="d-l-con-icon">
+                <div class="icon-con w-50" :class="{on:iconCurrentIndex1==item.jobValue}"
+                     v-for="(item,index) in visuForestCloudRYBO"
+                     @click="getForestLeader(item.jobValue,item.jobType)">
+                  <div class="icon icon-mid el-icon-user"></div>
+                  <div class="icon-text">
+                    <h5>{{ item.job }}</h5>
+                    <h6>{{ item.number }}</h6>
+                  </div>
+                </div>
+                <!-- <div class="icon-con w-50  m-btm-no" :class="{on:listCurrentIndex1==item.jobType}" v-for="(item,index) in visuForestCloudRYBO" v-if="index%2!=0" @click="getForestLeader(item.jobValue,item.jobType)">
                 <div class="icon icon-mid el-icon-user"></div>
                 <div class="icon-text">
                   <h5>{{item.job}}</h5>
                   <h6>{{item.number}}</h6>
                 </div>
               </div> -->
-							</div>
-						</div>
-					</dv-border-box-13>
-				</div>
-				<!--        avatar: ""-->
-				<!--        deptName: "锦程社区第一网格"-->
-				<!--        nickName: "李猛"-->
-				<!--        userId: 102-->
-				<!--        userName: "limeng"-->
-				<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="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 peopleList" @click="getPlanList(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-73">
-							<div class="h-73 overflow-y">
+              </div>
+            </div>
+          </dv-border-box-13>
+        </div>
+        <!--        avatar: ""-->
+        <!--        deptName: "锦程社区第一网格"-->
+        <!--        nickName: "李猛"-->
+        <!--        userId: 102-->
+        <!--        userName: "limeng"-->
+        <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="i-list-con h-27">
+              <el-input
+                v-model="nickName"
+                placeholder="请输入姓名"
+                clearable
+                size="small"
+                prefix-icon="el-icon-search"
+                style="margin-bottom: 20px"
+              />
+              <div class="d-l-con-icon">
+                <div class="icon-con" :class="{on:listCurrentIndex1==item.userId}"
+                     v-for="(item,index) in peopleList2" @click="getPlanList(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-73">
+              <div class="h-73 overflow-y">
                 <el-collapse accordion>
                   <el-collapse-item v-for="(item,index) in xunLinListOne">
                     <template slot="title">
@@ -83,10 +91,10 @@
                                       style="width:10rem ;" :disabled="(item.taskName.length <= 20)">
                             <div slot="content">
                               <h4 class="collapse-title" style="width: 200px;">
-                                {{ item.taskName}}</h4>
+                                {{ item.taskName }}</h4>
                             </div>
                             <h4 class="collapse-title" style="width: 100px;">
-                              {{ item.taskName | ellipsis20}}</h4>
+                              {{ item.taskName | ellipsis20 }}</h4>
                           </el-tooltip>
                         </div>
                         <div class="d-l-l-count">({{ item.recordCount }}/{{ item.planCount }})
@@ -96,7 +104,7 @@
                     <div class="d-l-con this-child sj-collapse" @click="getPointList(child.id)"
                          v-for="(child,index) in recordList">
                       <div class="d-l-l-text">
-                        <h4>{{child.beginTime}} - {{child.endTime}}</h4>
+                        <h4>{{ child.beginTime }} - {{ child.endTime }}</h4>
                       </div>
                       <!--<div class="d-l-l-count">{{index}}</div>-->
                     </div>
@@ -108,7 +116,7 @@
                     </div>
                   </el-collapse-item>
                 </el-collapse>
-								<!--<div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
+                <!--<div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
                      v-for="(item,index) in xunLinListOne"
                      @click="setConnectList(item.planLine,item.planName)">
                   <div class="d-l-l-text">
@@ -116,385 +124,402 @@
                     <h4>{{ item.planName }}</h4>
                   </div>
                 </div>-->
-							</div>
-						</div>
-					</dv-border-box-13>
-				</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>
+      </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 {
-		getForestLeader,
-		getPlanList,
-		getRecordList,
-		getPointList,
-		getRy
-	} from '@/api/leader'
+import {
+  getForestLeader,
+  getPlanList,
+  getRecordList,
+  getPointList,
+  getRy
+} from '@/api/leader'
 
-	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' //电视墙弹窗
+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,
-				visuForestCloudRYBO: [], //人员类型列表
-        personId: null, //人员
-        peopleList: [], //人员列表
-        connectList: [], //画线
-        patrolTrajectory: null, //任务画线
-				xunLinListOne: [], //巡查任务
-				recordList: [], //巡查记录
-				showNothing: false, //暂无信息
-				zrs: 0, //总人数
-				zxrs: 0 //在线人数
-			}
-		},
-		created() {
-			this.getInit()
-			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
-			window.showDialog = this.showDialog
-			window.choseLayerSwitching = this.choseLayerSwitching
-			window.choseLayerSwitchingList = this.choseLayerSwitchingList
-      window.choseLayerSwitchingList_Data = this.choseLayerSwitchingList_Data
-			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
-		},
-    mounted(){
-      this.bottomMenuList() //获取底部公共组件消息和任务
+let echarts = require('echarts')
+export default {
+  components: {
+    supermap,
+    vheader,
+    vBottomMenu,
+    eventLocation,
+    TVWall
+  },
+  data() {
+    return {
+      iconCurrentIndex1: '1',
+      listCurrentIndex1: '',
+      listCurrentIndex2: '',
+      //左右缩进
+      indentStyle: '',
+      indentleft: '',
+      indentright: '',
+      indentText: '收起左右栏',
+      indentdisabled: false,
+      visuForestCloudRYBO: [], //人员类型列表
+      personId: null, //人员
+      peopleList: [], //人员列表
+      nickName: '',
+      peopleList2: [], //人员列表
+      connectList: [], //画线
+      patrolTrajectory: null, //任务画线
+      xunLinListOne: [], //巡查任务
+      recordList: [], //巡查记录
+      showNothing: false, //暂无信息
+      zrs: 0, //总人数
+      zxrs: 0 //在线人数
+    }
+  },
+  created() {
+    this.getInit()
+    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    window.showDialog = this.showDialog
+    window.choseLayerSwitching = this.choseLayerSwitching
+    window.choseLayerSwitchingList = this.choseLayerSwitchingList
+    window.choseLayerSwitchingList_Data = this.choseLayerSwitchingList_Data
+    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+  },
+  mounted() {
+    this.bottomMenuList() //获取底部公共组件消息和任务
+  },
+  watch:
+    {
+      nickName(val) {
+        this.peopleList2 = [];
+
+        for (let i in this.peopleList) {
+          if (this.peopleList[i].nickName.indexOf(val) != -1) {
+            this.peopleList2.push(this.peopleList[i]);
+          }
+        }
+        console.log(this.peopleList2)
+      }
+    },
+  methods: {
+    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    bottomMenuList() {
+      this.$refs.bottomMenu.selectTaskList()//获取任务列表
+      this.$refs.bottomMenu.selectMessageList()//获取消息列表
     },
-		methods: {
-			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
-      bottomMenuList() {
-        this.$refs.bottomMenu.selectTaskList()//获取任务列表
-        this.$refs.bottomMenu.selectMessageList()//获取消息列表
-      },
-			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
-					}
-				}
+    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)
-			},
-      //选择图层(传递数组)  带数据
-      choseLayerSwitchingList_Data(urlList) {
-        this.$refs.supermap.layerSwitchingList_Data(urlList)
-      },
-			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
+    },
+    //选择图层
+    choseLayerSwitching(url, isClear) {
+      this.$refs.supermap.layerSwitching(url, isClear)
+    },
+    //选择图层(传递数组)
+    choseLayerSwitchingList(urlList) {
+      this.$refs.supermap.layerSwitchingList(urlList)
+    },
+    //选择图层(传递数组)  带数据
+    choseLayerSwitchingList_Data(urlList) {
+      this.$refs.supermap.layerSwitchingList_Data(urlList)
+    },
+    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
 
-			//初始化
-			getInit() {
-				let that = this
-				this.iconCurrentIndex1 = '1'
-				this.listCurrentIndex1 = ''
-				this.listCurrentIndex2 = ''
-				//获取左侧菜单列表
-				getRy().then(res => {
-					that.visuForestCloudRYBO = res.data.visuForestCloudRYBO
-					that.zrs = res.data.visuForestCloudRyZxBO.zrs
-					that.zxrs = res.data.visuForestCloudRyZxBO.zxrs
-					this.personnelChart()
-				})
-			},
-			//获取左侧人员列表
-			getForestLeader(linJob, linType) {
-				this.listCurrentIndex1 = ''
-				this.listCurrentIndex2 = ''
-				this.iconCurrentIndex1 = linJob
-				this.peopleList = []
-				getForestLeader(linJob, linType).then(res => {
-					this.peopleList = res.data
-				})
-        this.connectList = []
-        this.personId = null;
-        this.xunLinListOne = [];
-        this.patrolTrajectory = null;
-        this.$refs.supermap.clearC()
-			},
-			//点击左侧人员列表获取 巡查计划
-			getPlanList(personId) {
-        if(this.personId == personId){//当前人员已经被点击一次 不再重复加载
-          return;
-        }
-        this.personId = personId;
-				this.showNothing = false;
-				this.recordList = [];
-				getPlanList(personId).then(res => {
-					this.xunLinListOne = res.data;
-				})
+    //初始化
+    getInit() {
+      let that = this
+      this.iconCurrentIndex1 = '1'
+      this.listCurrentIndex1 = ''
+      this.listCurrentIndex2 = ''
+      //获取左侧菜单列表
+      getRy().then(res => {
+        that.visuForestCloudRYBO = res.data.visuForestCloudRYBO
+        that.zrs = res.data.visuForestCloudRyZxBO.zrs
+        that.zxrs = res.data.visuForestCloudRyZxBO.zxrs
+        this.personnelChart()
+      })
+    },
+    //获取左侧人员列表
+    getForestLeader(linJob, linType) {
+      this.listCurrentIndex1 = ''
+      this.listCurrentIndex2 = ''
+      this.iconCurrentIndex1 = linJob
+      this.peopleList = []
+      this.peopleList2 = []
+      getForestLeader(linJob, linType).then(res => {
+        this.peopleList = res.data
+        this.peopleList2 = res.data
+      })
+      this.connectList = []
+      this.personId = null;
+      this.xunLinListOne = [];
+      this.patrolTrajectory = null;
+      this.$refs.supermap.clearC()
+    },
+    //点击左侧人员列表获取 巡查计划
+    getPlanList(personId) {
+      if (this.personId == personId) {//当前人员已经被点击一次 不再重复加载
+        return;
+      }
+      this.personId = personId;
+      this.showNothing = false;
+      this.recordList = [];
+      getPlanList(personId).then(res => {
+        this.xunLinListOne = res.data;
+      })
+      this.patrolTrajectory = null;
+      this.$refs.supermap.clearC();
+    },
+    //点击右侧巡查计划获取 巡查记录
+    getRecordList(id, patrolTrajectory) {
+      this.showNothing = false;
+      this.recordList = [];
+      getRecordList(id).then(res => {
+        this.recordList = res.data;
+      })
+      this.$refs.supermap.clearC();
+      this.setTaskPointList(patrolTrajectory);
+    },
+    //点击右侧巡查记录获取 巡查轨迹
+    getPointList(id) {
+      getPointList(id).then(res => {
+        // console.log("落点",res.data);
+        this.setPointList(res);
+      })
+    },
+    //点击巡查人员 巡查任务落点
+    setTaskPointList(patrolTrajectory) {
+      console.log("巡查任务落点", typeof JSON.parse(patrolTrajectory));
+      if (this.patrolTrajectory == patrolTrajectory) {
         this.patrolTrajectory = null;
+      } else {
+        this.patrolTrajectory = patrolTrajectory;
+        this.drawTaskPoint(this.patrolTrajectory);
+      }
+    },
+    // 巡查任务落点
+    drawTaskPoint(patrolTrajectory) {
+      setTimeout(() => {
         this.$refs.supermap.clearC();
-			},
-			//点击右侧巡查计划获取 巡查记录
-			getRecordList(id, patrolTrajectory) {
-				this.showNothing = false;
-				this.recordList = [];
-				getRecordList(id).then(res => {
-					this.recordList = res.data;
-				})
-        this.$refs.supermap.clearC();
-        this.setTaskPointList(patrolTrajectory);
-			},
-			//点击右侧巡查记录获取 巡查轨迹
-			getPointList(id) {
-				getPointList(id).then(res => {
-					// console.log("落点",res.data);
-					this.setPointList(res);
-				})
-			},
-      //点击巡查人员 巡查任务落点
-      setTaskPointList(patrolTrajectory) {
-        console.log("巡查任务落点", typeof JSON.parse(patrolTrajectory));
-        if(this.patrolTrajectory == patrolTrajectory){
-          this.patrolTrajectory = null;
-        }else {
-          this.patrolTrajectory = patrolTrajectory;
-          this.drawTaskPoint(this.patrolTrajectory);
+        this.$refs.supermap.setConnectList(JSON.parse(patrolTrajectory), '#04f');
+      }, 1000)
+    },
+    //点击巡查轨迹时段 巡查轨迹落点
+    setPointList(res) {
+      let that = this;
+      this.connectList = [];
+      console.log("落点", res.data)
+      if (res.data != null && res.data.length > 0) {
+        for (let i = 0; i < res.data.length; i++) {
+          let latlng = {
+            lat: res.data[i].latitude,
+            lng: res.data[i].longitude
+          }
+          this.connectList.push(latlng)
         }
-      },
-      // 巡查任务落点
-      drawTaskPoint(patrolTrajectory) {
         setTimeout(() => {
-          this.$refs.supermap.clearC();
-          this.$refs.supermap.setConnectList(JSON.parse(patrolTrajectory), '#04f');
+          // that.$refs.supermap.clearC()
+          that.$refs.supermap.setConnectList(this.connectList, '#f40')
         }, 1000)
-      },
-			//点击巡查轨迹时段 巡查轨迹落点
-			setPointList(res) {
-				let that = this;
-				this.connectList = [];
-				console.log("落点", res.data)
-				if (res.data != null && res.data.length > 0) {
-					for (let i = 0; i < res.data.length; i++) {
-						let latlng = {
-							lat: res.data[i].latitude,
-							lng: res.data[i].longitude
-						}
-						this.connectList.push(latlng)
-					}
-					setTimeout(() => {
-						// that.$refs.supermap.clearC()
-						that.$refs.supermap.setConnectList(this.connectList, '#f40')
-					}, 1000)
-				} else {
-					that.$refs.supermap.clearC()
-				}
-			},
-			setConnectList(points, planName) {
-				this.listCurrentIndex2 = planName
-				this.connectList = []
-				if (points != null && points != '') {
-					this.connectList = JSON.parse(points)
-					this.$refs.supermap.setConnectTwoList(this.connectList, 'red')
-				}
-			},
+      } else {
+        that.$refs.supermap.clearC()
+      }
+    },
+    setConnectList(points, planName) {
+      this.listCurrentIndex2 = planName
+      this.connectList = []
+      if (points != null && points != '') {
+        this.connectList = JSON.parse(points)
+        this.$refs.supermap.setConnectTwoList(this.connectList, 'red')
+      }
+    },
 
-			//吉祥物收起左右框
-			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 = '收起左右栏'
-				}
-			},
-			//人员chart
-			personnelChart() {
-				// 基于准备好的dom,初始化echarts实例
-				let myChart = echarts.init(document.getElementById('personnel-chart'))
-				// 绘制图表
-				const handred = this.zrs
-				let point = this.zxrs
-				myChart.setOption({
-					title: [{
-						text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',
-						x: '48%',
-						y: '25%',
-						textStyle: {
-							fontWeight: 'normal',
-							color: '#02d6fc',
-							fontSize: '14'
-						}
-					}],
-					series: [{
-						name: 'circle',
-						type: 'pie',
-						center: ['22%', '50%'],
-						radius: ['60%', '70%'],
-						clockWise: true,
-						label: {
-							normal: {
-								position: 'center'
+    //吉祥物收起左右框
+    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 = '收起左右栏'
+      }
+    },
+    //人员chart
+    personnelChart() {
+      // 基于准备好的dom,初始化echarts实例
+      let myChart = echarts.init(document.getElementById('personnel-chart'))
+      // 绘制图表
+      const handred = this.zrs
+      let point = this.zxrs
+      myChart.setOption({
+        title: [{
+          text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',
+          x: '48%',
+          y: '25%',
+          textStyle: {
+            fontWeight: 'normal',
+            color: '#02d6fc',
+            fontSize: '14'
+          }
+        }],
+        series: [{
+          name: 'circle',
+          type: 'pie',
+          center: ['22%', '50%'],
+          radius: ['60%', '70%'],
+          clockWise: true,
+          label: {
+            normal: {
+              position: 'center'
 
-							}
-						},
-						itemStyle: {
-							normal: {
-								label: {
-									show: false
-								},
-								labelLine: {
-									show: false
-								}
-							}
-						},
-						data: [{
-							value: point,
-							name: '当前在线',
-							label: {
-								show: true, //单独显示该数据项
-								formatter: '{c}人',
-								labelLayout: {
-									top: '50%'
-								},
-								textStyle: {
-									color: '#02d6fc',
-									fontSize: 14
-								}
-							},
-							itemStyle: {
-								normal: {
-									color: { // 完成的圆环的颜色
-										colorStops: [{
-											offset: 0,
-											color: '#02d6fc' // 0% 处的颜色
-										}, {
-											offset: 1,
-											color: '#367bec' // 100% 处的颜色
-										}]
-									},
-									label: {
-										show: false
-									},
-									labelLine: {
-										show: false
-									}
-								}
-							}
-						}, {
-							value: handred - point,
-							itemStyle: {
-								color: '#666'
-							}
-						}]
-					}]
-				})
-			}
+            }
+          },
+          itemStyle: {
+            normal: {
+              label: {
+                show: false
+              },
+              labelLine: {
+                show: false
+              }
+            }
+          },
+          data: [{
+            value: point,
+            name: '当前在线',
+            label: {
+              show: true, //单独显示该数据项
+              formatter: '{c}人',
+              labelLayout: {
+                top: '50%'
+              },
+              textStyle: {
+                color: '#02d6fc',
+                fontSize: 14
+              }
+            },
+            itemStyle: {
+              normal: {
+                color: { // 完成的圆环的颜色
+                  colorStops: [{
+                    offset: 0,
+                    color: '#02d6fc' // 0% 处的颜色
+                  }, {
+                    offset: 1,
+                    color: '#367bec' // 100% 处的颜色
+                  }]
+                },
+                label: {
+                  show: false
+                },
+                labelLine: {
+                  show: false
+                }
+              }
+            }
+          }, {
+            value: handred - point,
+            itemStyle: {
+              color: '#666'
+            }
+          }]
+        }]
+      })
+    }
 
 
-		},
-		//过滤器
+  },
+  //过滤器
 
-		filters: {
+  filters: {
 
-			//标题截取前20
-			ellipsis20(value) {
-				if (!value) return '';
-				if (value.length > 20) {
-					return value.slice(0, 20) + '...'
-				}
-				return value
-			}
-		},
+    //标题截取前20
+    ellipsis20(value) {
+      if (!value) return '';
+      if (value.length > 20) {
+        return value.slice(0, 20) + '...'
+      }
+      return value
+    }
+  },
 
-	}
+}
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
-	@import '@/assets/styles/base.scss';
+@import '@/assets/styles/base.scss';
 
-	.h-27 {
-		height: 27rem;
-	}
+.h-27 {
+  height: 27rem;
+}
 </style>

+ 64 - 6
src/views/monitor.vue

@@ -152,6 +152,7 @@
     </div>
     <eventLocation ref="eventLocation"></eventLocation>
     <TVWall ref="TVWall"></TVWall>
+    <TVWalls ref="TVWalls"></TVWalls>
     <el-dialog :title="cameraTitle" :visible.sync="cameraVisible" v-if="cameraVisible" customClass="videoCustomWidth"
                @close="cancelEventLocationShow()">
       <div style="width:1020px;height:625px;position:relative;">
@@ -167,6 +168,7 @@ import {
   selectDeviceType,
   selectCameraByDeptId,
   selectKeyAreaList,
+  getCamerasByDeptId,
   getRegionalFlag
 } from '@/api/monitor'
 import { treeselect } from '@/api/system/dept'
@@ -175,6 +177,7 @@ 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' //电视墙弹窗
+import TVWalls from '@/components/TVWalls.vue' //电视墙弹窗
 
 /** ----------------------------------摄像头预览开始------------------------------------- */
 import {
@@ -195,6 +198,7 @@ export default {
     vheader,
     vBottomMenu,
     eventLocation,
+    TVWalls,
     TVWall
   },
   created() {
@@ -212,8 +216,8 @@ export default {
   mounted() {
     this.selectDeviceType(-1)
     this.selectKeyAreaList()
-    this.bottomMenuList() //获取底部公共组件消息和任务
     this.getTreeselect()
+    this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
     return {
@@ -280,6 +284,44 @@ export default {
     }
   },
   methods: {
+    /* 电视墙替换开始 */
+    showTVWall(channelCode, channelName) {
+      // let channelCode = '6044981090191552';
+      // let channelName = '复兴大桥中段-交通事故';
+      let tvListJson = [
+        {
+          'switchTab': '1',
+          'treeLabels': [
+            {
+              'labelCode': '123456',
+              'labelName': '视频场景',
+              'parentLabelCode': null
+            },
+            {
+              'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
+              'labelName': channelName,
+              'parentLabelCode': 123456
+            }
+          ],
+          'labelChannels': [{
+            'channelDates': [{
+              'channelCode': channelCode,
+              'channelName': channelName,
+              'channelSn': null,
+              'cameraType': 1,
+              'online': 1
+            }],
+            'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
+          }]
+        }
+      ]
+      this.$refs.TVWall.showTVWall(tvListJson, [{"channelId": channelCode}]);
+      this.$refs.supermap.isEditableLayers = false;
+      this.$refs.bottomMenu.showChild = false;
+      this.$refs.bottomMenu.showBanChild = false;
+      this.$refs.bottomMenu.showChangChild = false;
+    },
+    /* 电视墙替换结束 */
     /** 部门树*/
 // 查询部门下拉树结构
     getTreeselect() {
@@ -295,8 +337,13 @@ export default {
     },
 // 节点单击事件
     handleNodeClick(data) {
+      let that = this
+      console.log("节点单击事件",data);
       // this.findCameraByDept(data.id)
-      this.selectCameraByDeptId(data.id);
+      that.selectCameraByDeptId(data.id);
+      getCamerasByDeptId(data.id).then(res => {
+        that.$refs.TVWalls.showTVWall(res.data, {longitude: data.deptLongitude, latitude: data.deptLatitude});
+      })
     },
     selectKeyAreaList() {
       this.keyAreaList=[]
@@ -432,8 +479,11 @@ export default {
               isAggregation: false
             }
             if (res.data.visuForestCloudCameraBOList[i].channelCode != null) {
-              markersMap.parameter = {code:res.data.visuForestCloudCameraBOList[i].cameraCode,
-                type:res.data.visuForestCloudCameraBOList[i].cameraFactory}
+              markersMap.parameter = {
+                code:res.data.visuForestCloudCameraBOList[i].cameraCode,
+                name:res.data.visuForestCloudCameraBOList[i].cameraName,
+                type:res.data.visuForestCloudCameraBOList[i].cameraFactory
+              }
             } else {
               markersMap.parameter = []
             }
@@ -526,8 +576,11 @@ export default {
               isAggregation: false
             }
             if (res.data[i].channelCode != null) {
-              markersMap.parameter = {code:res.data[i].cameraCode,
-                type:res.data[i].cameraFactory}
+              markersMap.parameter = {
+                code:res.data[i].cameraCode,
+                name:res.data[i].cameraName,
+                type:res.data[i].cameraFactory
+              }
             } else {
               markersMap.parameter = []
             }
@@ -633,6 +686,11 @@ export default {
     },
     /** 预览按钮操作 */
     preview(cameraParam) {
+      this.showTVWall(cameraParam.code, cameraParam.name);
+    },
+
+    /** 预览按钮操作 */
+    preview_废弃(cameraParam) {
       if(cameraParam.type=='1'){
         getDahuaVideoServer().then(newResponse => {
           console.log(newResponse)

+ 2 - 2
vue.config.js

@@ -51,8 +51,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-         target: `http://121.36.228.66:3031`,
-        // target: `http://127.0.0.1:3031`,
+         // target: `http://121.36.228.66:3031`,
+        target: `http://127.0.0.1:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''