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

bug

parent 4ab99df5
...@@ -371,7 +371,7 @@ var serviceLayers_conf=[ ...@@ -371,7 +371,7 @@ var serviceLayers_conf=[
'text': '党群服务', 'text': '党群服务',
'layerID': 'dqfwLayer', 'layerID': 'dqfwLayer',
"status": false, "status": false,
"http": "queryAreaphotos/3", "http": "queryAreaphotosWithname/3",
"icon": {"color":0.3,"img":"dqfwzx.png"}, "icon": {"color":0.3,"img":"dqfwzx.png"},
"event":"picture" "event":"picture"
}, { }, {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div style="width: 100%; height: 225px"> <div style="width: 100%; height: 225px">
<div class="TreeWrap"> <div class="TreeWrap">
<div style="cursor:pointer" v-for="(item2, index) in item.children"> <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" <img v-show="item2.monitor" src="/img/monitor.png" width="12px" height="12px"
@click="play(item2.monitor)"> @click="play(item2.monitor)">
</div> </div>
...@@ -129,7 +129,6 @@ module.exports = { ...@@ -129,7 +129,6 @@ module.exports = {
] ]
}], }],
ljtree_list: [ ljtree_list: [
{ {
"marktype": "31", "marktype": "31",
"text1": '廉政教育', "text1": '廉政教育',
...@@ -154,8 +153,20 @@ module.exports = { ...@@ -154,8 +153,20 @@ module.exports = {
setTimeout(() => { setTimeout(() => {
parent.vue_right.$refs.mychild.show(item); parent.vue_right.$refs.mychild.show(item);
}, 300); }, 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); parent.vue_left.showright(item);
// if (item.name == '红色网格') { // if (item.name == '红色网格') {
// parent.vue_left.showright(item); // parent.vue_left.showright(item);
...@@ -170,19 +181,27 @@ module.exports = { ...@@ -170,19 +181,27 @@ module.exports = {
$(dom.srcElement).next().css("display", "none"); $(dom.srcElement).next().css("display", "none");
} }
console.log(n); 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[0].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[1].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[2].layerID, true);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[3].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[3].layerID, !item.show);
parent.vue_top.setLayerStatusbyId(this.data_filter.data[2].layerID, true); 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[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; item.show = !item.show;
}, },
showphotos: function (item) { showphotos: function (item) {
...@@ -197,10 +216,17 @@ module.exports = { ...@@ -197,10 +216,17 @@ module.exports = {
// anim: 5, // anim: 5,
// }); // });
}, },
showphotos2: function (items) { showphotos2: function (array) {
debugger
var playsrc = { data: [] }; 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, alt:array[j].name});
}
} }
layer.photos({ layer.photos({
photos: playsrc, photos: playsrc,
......
...@@ -19,28 +19,16 @@ ...@@ -19,28 +19,16 @@
<div class="layui-collapse collaps" lay-filter="test3" lay-accordion=""> <div class="layui-collapse collaps" lay-filter="test3" lay-accordion="">
<div class="layui-colla-item" v-for="(item, index) in tree_list"> <div class="layui-colla-item" v-for="(item, index) in tree_list">
<h2 <h2 class="layui-colla-title" v-bind:style="{ backgroundColor: item.color }" @click="open(item, index, $event)" >
class="layui-colla-title"
v-bind:style="{ backgroundColor: item.color }"
@click="open(item, index, $event)"
>
{{ item.name }} {{ item.name }}
<img <img v-show="item.icon" style="height: 20px; width: 20px; margin-top: 10px; float: right" v-bind:src="item.icon" />
v-show="item.icon"
style="height: 20px; width: 20px; margin-top: 10px; float: right"
v-bind:src="item.icon"
/>
</h2> </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 style="width: 100%; height: 225px">
<div class="TreeWrap"> <div class="TreeWrap">
<div <div v-for="(item3, index1) in item.children"
v-for="(item3, index1) in item.children" style="cursor: pointer" >
style="cursor: pointer" <a @click="locate(item3) " > {{ item3.name }}</a>
>
<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> </div>
</div> </div>
</div> </div>
...@@ -205,6 +193,7 @@ module.exports = { ...@@ -205,6 +193,7 @@ module.exports = {
this.open(item, n, dom); this.open(item, n, dom);
}, },
showphotos: function (item) { showphotos: function (item) {
debugger
if(item!=null){ if(item!=null){
var playsrc={data: []}; var playsrc={data: []};
var array=item.src.split(","); var array=item.src.split(",");
...@@ -341,13 +330,13 @@ module.exports = { ...@@ -341,13 +330,13 @@ module.exports = {
getByAjax("./business/queryAreaphotos/34,35,36,37,38",function(list){ getByAjax("./business/queryAreaphotos/34,35,36,37,38",function(list){
for (var i = 0; i < that.daylist[0].children.length; i++) { 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].children[i].marktype});
console.log(tempList); console.log(tempList);
debugger
tempList.forEach(element => { tempList.forEach(element => {
let array=element.name.split(","); let array=element.name.split(",");
if(array.length>0){ if(array.length>0){
element.name=array[0]; element.name=array[0];
} else if(array.length>1){ element.name1=array[1];} }
if(array.length>1){ element.name1=array[1];}
return element; return element;
}); });
that.daylist[0].children[i].children = tempList; that.daylist[0].children[i].children = tempList;
......
<template> <template>
<div> <div>
<div <div style="
style="
height: 60px; height: 60px;
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
...@@ -10,40 +9,41 @@ ...@@ -10,40 +9,41 @@
background-color: #0071a9; background-color: #0071a9;
color: #fff; color: #fff;
line-height: 60px; line-height: 60px;
" ">
>
<span class="lib_title">{{ dataxself.title }}</span> <span class="lib_title">{{ dataxself.title }}</span>
</div> </div>
<div style="height: calc(100% - 60px); overflow-y: auto"> <div style="height: calc(100% - 60px); overflow-y: auto">
<div class="layui-collapse collaps" lay-filter="test3" lay-accordion=""> <div class="layui-collapse collaps" lay-filter="test3" lay-accordion="">
<div class="layui-colla-item" v-for="(item, index) in tree_list"> <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 }} {{ item.name }}
</h2> </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 style="width: 100%; height: 225px">
<div class="layui-colla-item" v-for="(item2, index) in item.children" > <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)" > <h2 class="layui-colla-title"
@click="item2.name == '组织设置' ? locate(item2.data) : item2.name == '五大平台' ? showphotos2(item2.data, index) : showphotos(item2, index)">
{{ item2.name }} {{ 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;"
</h2> v-bind:src="item2.icon" />
</h2>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-colla-item" v-for="(item, index) in daylist"> <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)"> <h2 class="layui-colla-title" v-bind:style="{ backgroundColor: item.color }" @click="open(item, index, $event)">
{{ item.name }} </h2> {{ 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 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-item" v-for="(item2, index) in item.children" @click="showphotos(item2, index)">
<div class="layui-colla-title" > <div class="layui-colla-title">
{{ item2.name }} {{ item2.name }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -86,7 +86,7 @@ module.exports = { ...@@ -86,7 +86,7 @@ module.exports = {
"layers": [], "layers": [],
"data": [] "data": []
}, { }, {
"marktype": "21", "marktype": "",
"text1": '测评参考', "text1": '测评参考',
"name": '测评参考', "name": '测评参考',
"color": '#ADD8E6', "color": '#ADD8E6',
...@@ -99,34 +99,34 @@ module.exports = { ...@@ -99,34 +99,34 @@ module.exports = {
}], }],
daylist: [ daylist: [
{ {
marktype: "", marktype: "51",
text1: "文明城市创建活动", text1: "文明城市创建活动",
name: "文明城市创建活动", name: "文明城市创建活动",
color: "coral", color: "coral",
show: true, show: true,
layers: [], layers: [],
children: [ children: [
{ // {
"marktype": "49", // "marktype": "49",
"text1": '2021年', // "text1": '2021年',
"name": '2021年', // "name": '2021年',
"show": true, // "show": true,
"children": [], // "children": [],
}, // },
{ // {
"marktype": "50", // "marktype": "50",
"text1": '2022年', // "text1": '2022年',
"name": '2022年', // "name": '2022年',
"show": true, // "show": true,
"children": [], // "children": [],
}, // },
{ // {
"marktype": "51", // "marktype": "51",
"text1": '2023年', // "text1": '2023年',
"name": '2023年', // "name": '2023年',
"show": true, // "show": true,
"children": [], // "children": [],
}, // },
], ],
}, },
], ],
...@@ -146,32 +146,47 @@ module.exports = { ...@@ -146,32 +146,47 @@ module.exports = {
this.open(item, n, dom); this.open(item, n, dom);
}, },
showphotos: function (item) { showphotos: function (item) {
debugger
if(item.event!=undefined){ if(item.event!=undefined){
//展示中间 //展示中间
parent.vue_left.showwmcs(item); parent.vue_left.showwmcs(item);
}else{ }else{
var playsrc={data: []}; var playsrc={data: []};
if(item.data && item.data.src!=undefined){ array=[];
array=item.data.src.split(","); 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++ ) for(var j = 0; j <array.length ; j++ )
{ {
playsrc.data.push({ src: array[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]});
}
} }
} layer.photos({
layer.photos({ photos: playsrc,
photos: playsrc, anim: 5,
anim: 5, });
});
} }
}, },
showphotos2: function (items) { showphotos2: function (array) {
debugger debugger
var playsrc={data: []}; 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({ layer.photos({
photos: playsrc, photos: playsrc,
...@@ -241,20 +256,19 @@ module.exports = { ...@@ -241,20 +256,19 @@ module.exports = {
mounted() { mounted() {
that=this; that=this;
getByAjax("./business/queryAreaphotos/18,19,21,49,50,51",function(list){ getByAjax("./business/queryAreaphotosWithname/18,19,49,50,51",function(list){
for (var i = 0; i < that.tree_list.length; i++) { 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}); let tempList = list.filter(items => {return items.typeid==that.tree_list[0].children[i].marktype});
console.log(tempList); console.log(tempList);
that.tree_list[0].children[i].data = 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].marktype});
let tempList = list.filter(items => {return items.typeid==that.daylist[0].children[i].marktype});
console.log(tempList); console.log(tempList);
that.daylist[0].children[i].children = tempList; that.daylist[0].children = tempList;
}
}); });
} }
}; };
</script> </script>
<style > <style >
......
...@@ -2047,7 +2047,13 @@ function showPicture(item, folder) { ...@@ -2047,7 +2047,13 @@ function showPicture(item, folder) {
var playsrc = { data: [] }; var playsrc = { data: [] };
array = item.src.split(","); array = item.src.split(",");
for (var j = 0; j < array.length; j++) { 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({ layer.photos({
photos: playsrc, photos: playsrc,
...@@ -2512,7 +2518,7 @@ var vue_wmcs = new Vue({ ...@@ -2512,7 +2518,7 @@ var vue_wmcs = new Vue({
mounted() { mounted() {
debugger debugger
that=this; that=this;
getByAjax("./rest/areaanddetailqueryqithNam/21/local_wmcs",function(list){ getByAjax("./rest/areaanddetailqueryWithname/21/local_wmcs",function(list){
debugger debugger
that.arr_datawmcs=list; that.arr_datawmcs=list;
}); });
......
...@@ -34,6 +34,13 @@ router.get('/queryAreaphotos/:id', function (req, res, next) { ...@@ -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) { router.get('/areafield/:typeid', function (req, res, next) {
let x = req.params.typeid; let x = req.params.typeid;
......
...@@ -395,6 +395,15 @@ router.get('/areabasequery/:typeid', function (req, res, next) { ...@@ -395,6 +395,15 @@ router.get('/areabasequery/:typeid', function (req, res, next) {
res.json(result); 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) { router.get('/queryassociateedmonitor/:id', function (req, res, next) {
let areaid = req.params.id; let areaid = req.params.id;
......
...@@ -619,7 +619,7 @@ ...@@ -619,7 +619,7 @@
<div class="hjmain-div" style="width: 100%;height:100%;position:absolute;overflow:hidden;"> <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 class="hjlfet-div" style="height:100%;overflow: auto;border-right: 1px solid #0d7be2a3;">
<div style="width: 98%;margin-left:10px;"> <div style="width: 98%;margin-left:10px;">
<table class="layui-table"> <table class="layui-table" style=" font-size: 18px;">
<thead> <thead>
<tr class="hj-th"> <tr class="hj-th">
...@@ -631,7 +631,7 @@ ...@@ -631,7 +631,7 @@
<tbody> <tbody>
<tr v-for="(item,index) in arr_datawmcs" class="hj-td"> <tr v-for="(item,index) in arr_datawmcs" class="hj-td">
<td v-text="item.dw"></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> <td><a style="cursor: pointer;text-decoration:underline;" @click="showphotos(item.src)">查看照片</a></td>
</tr> </tr>
</tbody> </tbody>
...@@ -864,7 +864,23 @@ ...@@ -864,7 +864,23 @@
</video> </video>
</body> </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="/arcgisjsapi/library/3.23/3.23/init.js"></script>
<script src="./js/mapInit.js"></script> <script src="./js/mapInit.js"></script>
<script src="./js/jquery-2.2.3.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