Commit 316d88bd authored by 夏敏伟's avatar 夏敏伟

bug

parent 4ab99df5
......@@ -371,7 +371,7 @@ var serviceLayers_conf=[
'text': '党群服务',
'layerID': 'dqfwLayer',
"status": false,
"http": "queryAreaphotos/3",
"http": "queryAreaphotosWithname/3",
"icon": {"color":0.3,"img":"dqfwzx.png"},
"event":"picture"
}, {
......
......@@ -54,7 +54,7 @@
<div style="width: 100%; height: 225px">
<div class="TreeWrap">
<div style="cursor:pointer" v-for="(item2, index) in item.children">
<a @click="item.name == '红色网格' ? locate(item2) : showphotos(item2.src)"> {{ item2.name }}</a>
<a @click=" locate2(item2)"> {{ item2.name }}</a>
<img v-show="item2.monitor" src="/img/monitor.png" width="12px" height="12px"
@click="play(item2.monitor)">
</div>
......@@ -129,7 +129,6 @@ module.exports = {
]
}],
ljtree_list: [
{
"marktype": "31",
"text1": '廉政教育',
......@@ -155,7 +154,19 @@ module.exports = {
parent.vue_right.$refs.mychild.show(item);
}, 300);
}
}, open: function (item, n, dom) {
}, locate2: function (item) {
//先画polygon,然后定位
parent.vue_left.locate(item);
parent.vue_right.currentView = 'dwzx';
parent.vue_right.widthData = item.width + 'px';
parent.vue_right.heightData = item.height + 'px';
//延迟加载以便能够保证子组件已经加载完毕再调用其方法
if(parent.vue_right.$refs!=undefined && parent.vue_right.$refs.mychild !=undefined ){
setTimeout(() => {
parent.vue_right.$refs.mychild.show(item);
}, 300);
}
},open: function (item, n, dom) {
parent.vue_left.showright(item);
// if (item.name == '红色网格') {
// parent.vue_left.showright(item);
......@@ -170,19 +181,27 @@ module.exports = {
$(dom.srcElement).next().css("display", "none");
}
console.log(n);
debugger
//其他逻辑
if (n == 0 && item.show) {
if (n ==0&& item.show) {
parent.vue_top.setLayerStatusbyId(this.data_filter.data[0].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[1].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[2].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[3].layerID, true);
}
if (n > 0) {
if (n ==1&& item.show) {
parent.vue_top.setLayerStatusbyId(this.data_filter.data[0].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[1].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[2].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[3].layerID, false);
}
if (n > 1) {
parent.vue_top.setLayerStatusbyId(this.data_filter.data[3].layerID, !item.show);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[2].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[1].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[0].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[0].layerID, false);
}
item.show = !item.show;
},
showphotos: function (item) {
......@@ -197,10 +216,17 @@ module.exports = {
// anim: 5,
// });
},
showphotos2: function (items) {
showphotos2: function (array) {
debugger
var playsrc = { data: [] };
for (var j = 0; j < items.length; j++) {
playsrc.data.push({ src: items[j].src, alt: items[j].name });
for (var j = 0; j < array.length; j++) {
if(array[j].src.indexOf("$")>0){
picsrc= array[j].src.substring(0,array[j].src.indexOf("$"));
picname=array[j].src.substring(array[j].src.indexOf("$")+1,array[j].src.lastIndexOf("."));
playsrc.data.push({ src: picsrc , alt:picname});
}else{
playsrc.data.push({ src: array[j].src, alt:array[j].name});
}
}
layer.photos({
photos: playsrc,
......
......@@ -19,28 +19,16 @@
<div class="layui-collapse collaps" lay-filter="test3" lay-accordion="">
<div class="layui-colla-item" v-for="(item, index) in tree_list">
<h2
class="layui-colla-title"
v-bind:style="{ backgroundColor: item.color }"
@click="open(item, index, $event)"
>
<h2 class="layui-colla-title" v-bind:style="{ backgroundColor: item.color }" @click="open(item, index, $event)" >
{{ item.name }}
<img
v-show="item.icon"
style="height: 20px; width: 20px; margin-top: 10px; float: right"
v-bind:src="item.icon"
/>
<img v-show="item.icon" style="height: 20px; width: 20px; margin-top: 10px; float: right" v-bind:src="item.icon" />
</h2>
<div class="layui-colla-content" style="height: 217px; margin-left: 0px" v-bind:title="item.name" >
<div style="width: 100%; height: 225px">
<div class="TreeWrap">
<div
v-for="(item3, index1) in item.children"
style="cursor: pointer"
>
<a @click="showphotos(item3.src) " > {{ item3.name }}</a>
<img v-show="item3.monitor" src="/img/monitor.png" width="12px" height="12px" @click="play(item3.monitor)">
<div v-for="(item3, index1) in item.children"
style="cursor: pointer" >
<a @click="locate(item3) " > {{ item3.name }}</a>
</div>
</div>
</div>
......@@ -205,6 +193,7 @@ module.exports = {
this.open(item, n, dom);
},
showphotos: function (item) {
debugger
if(item!=null){
var playsrc={data: []};
var array=item.src.split(",");
......@@ -342,12 +331,12 @@ module.exports = {
for (var i = 0; i < that.daylist[0].children.length; i++) {
let tempList = list.filter(items => {return items.typeid==that.daylist[0].children[i].marktype});
console.log(tempList);
debugger
tempList.forEach(element => {
let array=element.name.split(",");
if(array.length>0){
element.name=array[0];
} else if(array.length>1){ element.name1=array[1];}
}
if(array.length>1){ element.name1=array[1];}
return element;
});
that.daylist[0].children[i].children = tempList;
......
<template>
<div>
<div
style="
<div style="
height: 60px;
text-align: center;
font-size: 20px;
......@@ -10,8 +9,7 @@
background-color: #0071a9;
color: #fff;
line-height: 60px;
"
>
">
<span class="lib_title">{{ dataxself.title }}</span>
</div>
......@@ -19,15 +17,17 @@
<div class="layui-collapse collaps" lay-filter="test3" lay-accordion="">
<div class="layui-colla-item" v-for="(item, index) in tree_list">
<h2 class="layui-colla-title" v-bind:style="{ backgroundColor: item.color }" @click="open(item, index, $event)" >
<h2 class="layui-colla-title" v-bind:style="{ backgroundColor: item.color }" @click="open(item, index, $event)">
{{ item.name }}
</h2>
<div class="layui-colla-content" style="height: 217px; margin-left: 0px" v-bind:title="item.name" >
<div class="layui-colla-content" style="height: 217px; margin-left: 0px" v-bind:title="item.name">
<div style="width: 100%; height: 225px">
<div class="layui-colla-item" v-for="(item2, index) in item.children" >
<h2 class="layui-colla-title" @click="item2.name=='组织设置'?locate(item2.data):showphotos(item2, index)" >
<div class="layui-colla-item" v-for="(item2, index) in item.children">
<h2 class="layui-colla-title"
@click="item2.name == '组织设置' ? locate(item2.data) : item2.name == '五大平台' ? showphotos2(item2.data, index) : showphotos(item2, index)">
{{ item2.name }}
<img v-show="item.icon" style="height: 20px; width: 20px; margin-top: 10px; float: right;" v-bind:src="item2.icon" />
<img v-show="item.icon" style="height: 20px; width: 20px; margin-top: 10px; float: right;"
v-bind:src="item2.icon" />
</h2>
</div>
</div>
......@@ -37,10 +37,10 @@
<div class="layui-colla-item" v-for="(item, index) in daylist">
<h2 class="layui-colla-title" v-bind:style="{ backgroundColor: item.color }" @click="open(item, index, $event)">
{{ item.name }} </h2>
<div class="layui-colla-content" style="height: 217px; margin-left: 0px" v-bind:title="item.name" >
<div class="layui-colla-content" style="height: 217px; margin-left: 0px" v-bind:title="item.name">
<div style="width: 100%; height: 225px">
<div class="layui-colla-item" v-for="(item2, index) in item.children" @click="showphotos2(item2.children)" >
<div class="layui-colla-title" >
<div class="layui-colla-item" v-for="(item2, index) in item.children" @click="showphotos(item2, index)">
<div class="layui-colla-title">
{{ item2.name }}
</div>
......@@ -86,7 +86,7 @@ module.exports = {
"layers": [],
"data": []
}, {
"marktype": "21",
"marktype": "",
"text1": '测评参考',
"name": '测评参考',
"color": '#ADD8E6',
......@@ -99,34 +99,34 @@ module.exports = {
}],
daylist: [
{
marktype: "",
marktype: "51",
text1: "文明城市创建活动",
name: "文明城市创建活动",
color: "coral",
show: true,
layers: [],
children: [
{
"marktype": "49",
"text1": '2021年',
"name": '2021年',
"show": true,
"children": [],
},
{
"marktype": "50",
"text1": '2022年',
"name": '2022年',
"show": true,
"children": [],
},
{
"marktype": "51",
"text1": '2023年',
"name": '2023年',
"show": true,
"children": [],
},
// {
// "marktype": "49",
// "text1": '2021年',
// "name": '2021年',
// "show": true,
// "children": [],
// },
// {
// "marktype": "50",
// "text1": '2022年',
// "name": '2022年',
// "show": true,
// "children": [],
// },
// {
// "marktype": "51",
// "text1": '2023年',
// "name": '2023年',
// "show": true,
// "children": [],
// },
],
},
],
......@@ -146,17 +146,26 @@ module.exports = {
this.open(item, n, dom);
},
showphotos: function (item) {
debugger
if(item.event!=undefined){
//展示中间
parent.vue_left.showwmcs(item);
}else{
var playsrc={data: []};
if(item.data && item.data.src!=undefined){
array=item.data.src.split(",");
array=[];
if(item && item.data!=undefined && item.data && item.data.src!=undefined){
array=item.data.src.split(","); }
else if(item && item.src!=undefined){
array=item.src.split(",");
}
for(var j = 0; j <array.length ; j++ )
{
if(array[j].indexOf("$")>0){
picsrc= array[j].substring(0,array[j].indexOf("$"));
picname=array[j].substring(array[j].indexOf("$")+1,array[j].lastIndexOf("."));
playsrc.data.push({ src: picsrc , alt:picname});
}else{
playsrc.data.push({ src: array[j]});
}
}
......@@ -166,12 +175,18 @@ module.exports = {
});
}
},
showphotos2: function (items) {
showphotos2: function (array) {
debugger
var playsrc={data: []};
for(var j = 0; j <items.length ; j++ )
for(var j = 0; j <array.length ; j++ )
{
playsrc.data.push({ src: items[j].src,alt:items[j].name});
if(array[j].src.indexOf("$")>0){
picsrc= array[j].src.substring(0,array[j].src.indexOf("$"));
picname=array[j].src.substring(array[j].src.indexOf("$")+1,array[j].src.lastIndexOf("."));
playsrc.data.push({ src: picsrc , alt:picname});
}else{
playsrc.data.push({ src: array[j].src});
}
}
layer.photos({
photos: playsrc,
......@@ -241,18 +256,17 @@ module.exports = {
mounted() {
that=this;
getByAjax("./business/queryAreaphotos/18,19,21,49,50,51",function(list){
for (var i = 0; i < that.tree_list.length; i++) {
getByAjax("./business/queryAreaphotosWithname/18,19,49,50,51",function(list){
debugger
for (var i = 0; i < that.tree_list[0].children.length; i++) {
let tempList = list.filter(items => {return items.typeid==that.tree_list[0].children[i].marktype});
console.log(tempList);
that.tree_list[0].children[i].data = tempList;
}
for (var i = 0; i < that.daylist[0].children.length; i++) {
let tempList = list.filter(items => {return items.typeid==that.daylist[0].children[i].marktype});
let tempList = list.filter(items => {return items.typeid==that.daylist[0].marktype});
console.log(tempList);
that.daylist[0].children[i].children = tempList;
}
that.daylist[0].children = tempList;
});
}
};
......
......@@ -2047,7 +2047,13 @@ function showPicture(item, folder) {
var playsrc = { data: [] };
array = item.src.split(",");
for (var j = 0; j < array.length; j++) {
playsrc.data.push({ src: array[j] });
if(array[j] && array[j].src==undefined && array[j].indexOf("$")>0){
picsrc= array[j].substring(0,array[j].indexOf("$"));
picname=array[j].substring(array[j].indexOf("$")+1,array[j].lastIndexOf("."));
playsrc.data.push({ src: picsrc , alt:picname});
}else{
playsrc.data.push({ src: array[j]});
}
}
layer.photos({
photos: playsrc,
......@@ -2512,7 +2518,7 @@ var vue_wmcs = new Vue({
mounted() {
debugger
that=this;
getByAjax("./rest/areaanddetailqueryqithNam/21/local_wmcs",function(list){
getByAjax("./rest/areaanddetailqueryWithname/21/local_wmcs",function(list){
debugger
that.arr_datawmcs=list;
});
......
......@@ -34,6 +34,13 @@ router.get('/queryAreaphotos/:id', function (req, res, next) {
});
});
//chauxn
router.get('/queryAreaphotosWithname/:id', function (req, res, next) {
command.executesql("select a.* , (select wm_concat(domain||FOLDER||'/'||PATH||'$'||NAME) from photos b where a.id=b.areaid ) src,(select wm_concat(url) from area_monitor c ,monitor d where a.id=c.areaid and c.monitorid=d.id )monitor from area a where typeid in(" + req.params.id + ") order by cjsj ", (result) => {
res.json(result);
});
});
//多字段区域
router.get('/areafield/:typeid', function (req, res, next) {
let x = req.params.typeid;
......
......@@ -395,6 +395,15 @@ router.get('/areabasequery/:typeid', function (req, res, next) {
res.json(result);
});
});
//场所及详细信息查询
router.get('/areaanddetailqueryWithname/:id/:extenddata', function (req, res, next) {
let id = req.params.id;
let extenddata = req.params.extenddata;
let sqlstr = "select b.*, (select wm_concat(domain||FOLDER||'/'||PATH||'$'||NAME) from photos a where a.areaid=b.id ) src from " + extenddata + " b where b.id in (select id from area where typeid='" + id + "')";
command.executesql(sqlstr, (result) => {
res.json(result);
});
});
//场所关联监控查询
router.get('/queryassociateedmonitor/:id', function (req, res, next) {
let areaid = req.params.id;
......
......@@ -619,7 +619,7 @@
<div class="hjmain-div" style="width: 100%;height:100%;position:absolute;overflow:hidden;">
<div class="hjlfet-div" style="height:100%;overflow: auto;border-right: 1px solid #0d7be2a3;">
<div style="width: 98%;margin-left:10px;">
<table class="layui-table">
<table class="layui-table" style=" font-size: 18px;">
<thead>
<tr class="hj-th">
......@@ -631,7 +631,7 @@
<tbody>
<tr v-for="(item,index) in arr_datawmcs" class="hj-td">
<td v-text="item.dw"></td>
<td style="text-align: left;"><span v-html="item.zyzb"></span></td>
<td style="text-align: left; font-size: 18px;"><span v-html="item.zyzb"></span></td>
<td><a style="cursor: pointer;text-decoration:underline;" @click="showphotos(item.src)">查看照片</a></td>
</tr>
</tbody>
......@@ -864,7 +864,23 @@
</video>
</body>
<style >
/* @import "../../js/layui/css/layui.css"; */
.layui-layer-phimg:hover .layui-layer-imgbar{
display:block !important;
}
.layui-layer-imgbar{
display:block !important;
}
.layui-layer-imgtit a{
font-size:20px;
}
.layui-layer-imgtit a{
max-width:100% !important;
}
</style>
<script src="/arcgisjsapi/library/3.23/3.23/init.js"></script>
<script src="./js/mapInit.js"></script>
<script src="./js/jquery-2.2.3.js"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment