Commit a6d50d92 authored by 夏敏伟's avatar 夏敏伟

修改文明创建模块

parent 38cd2298
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<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 }" > <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" v-bind:style="{ backgroundColor: item2.color }" @click="item.name=='组织设置'?locate(item):showphotos(item, index)" > <h2 class="layui-colla-title" @click="item2.name=='组织设置'?locate(item2):showphotos2(item2.data, 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;" v-bind:src="item2.icon" />
</h2> </h2>
...@@ -34,7 +34,20 @@ ...@@ -34,7 +34,20 @@
</div> </div>
</div> </div>
<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 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" >
{{ item2.name }}
</div>
</div>
</div>
</div>
</div>
</div> </div>
...@@ -61,7 +74,7 @@ module.exports = { ...@@ -61,7 +74,7 @@ module.exports = {
"name": '组织设置', "name": '组织设置',
"color": '#ADD8E6', "color": '#ADD8E6',
"show": true, "show": true,
event: "showright", "event": "showright",
"layers": [], "layers": [],
"data": [] "data": []
}, { }, {
...@@ -78,7 +91,7 @@ module.exports = { ...@@ -78,7 +91,7 @@ module.exports = {
"name": '测评参考', "name": '测评参考',
"color": '#ADD8E6', "color": '#ADD8E6',
"show": true, "show": true,
event: "showmiddle", "event": "showmiddle",
"layers": [], "layers": [],
"data": [] "data": []
} }
...@@ -122,33 +135,48 @@ module.exports = { ...@@ -122,33 +135,48 @@ module.exports = {
props: ["dataxself"], props: ["dataxself"],
methods: { methods: {
locate: function (item) { locate: function (item) {
if(item.name=='组织设置'){
item.name='兴卫村社区新时代文明实践站'; item2=JSON.parse(JSON.stringify(item));
if(item2.name=='组织设置'){
item2.name='兴卫村社区新时代文明实践站';
} }
parent.vue_left.locate(item); parent.vue_left.locate(item2);
}, },
showright: function (item,n, dom) { showright: function (item,n, dom) {
parent.vue_left.showright(item); parent.vue_left.showright(item);
this.open(item, n, dom); this.open(item, n, dom);
}, },
showphotos: function (item) { showphotos: function (item) {
debugger
if(item.event!=undefined){
//展示中间
parent.vue_left.showwmcs(item);
}else{
if(item.event!=undefined){ var playsrc={data: []};
//展示中间 if(item.data && item.data.src!=undefined){
parent.vue_left.showwmcs(item); array=item.data.src.split(",");
}else{ for(var j = 0; j <array.length ; j++ )
{
playsrc.data.push({ src: array[j]});
}
}
layer.photos({
photos: playsrc,
anim: 5,
});
}
},
showphotos2: function (items) {
var playsrc={data: []}; var playsrc={data: []};
array=item.split(","); for(var j = 0; j <items.length ; j++ )
for(var j = 0; j <array.length ; j++ )
{ {
playsrc.data.push({ src: array[j]}); playsrc.data.push({ src: items[j].src,alt:items[j].name});
} }
layer.photos({ layer.photos({
photos: playsrc, photos: playsrc,
anim: 5, anim: 5,
}); });
}
}, },
play: function (url) { play: function (url) {
...@@ -213,11 +241,17 @@ module.exports = { ...@@ -213,11 +241,17 @@ module.exports = {
mounted() { mounted() {
that=this; that=this;
getByAjax("./business/queryAreaphotos/18,19,20,21",function(list){ getByAjax("./business/queryAreaphotos/18,19,21,49,50,51",function(list){
for (var i = 0; i < that.tree_list.length; i++) { for (var i = 0; i < that.tree_list.length; i++) {
let tempList = list.filter(items => {return items.typeid==that.tree_list[i].marktype}); 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});
console.log(tempList); console.log(tempList);
that.tree_list[i].children = tempList; that.daylist[0].children[i].children = tempList;
} }
}); });
} }
......
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