|
@ -1,62 +1,101 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="warning-table"> |
|
|
<div class="warning-table"> |
|
|
<div class="table"> |
|
|
<div class="table"> |
|
|
<div class="table-header"> |
|
|
<div class="table-header"> |
|
|
<div class="table-header-th" v-for="(item,index) in headerList" :key='item.title' :style="headerStyle[index]">{{item.title}}</div> |
|
|
<div |
|
|
|
|
|
class="table-header-th" |
|
|
|
|
|
v-for="(item, index) in headerList" |
|
|
|
|
|
:key="item.title" |
|
|
|
|
|
:style="headerStyle[index]" |
|
|
|
|
|
> |
|
|
|
|
|
{{ item.title }} |
|
|
</div> |
|
|
</div> |
|
|
<div class="table-body"> |
|
|
</div> |
|
|
<div class="table-body-tr" v-for="(value,index) in tableData" :key='index'> |
|
|
<div class="table-body"> |
|
|
<div class="td" v-for="(item,indexs) in value" :key="indexs" :style="tableContentStyle[indexs]">{{item}} |
|
|
<div |
|
|
<span v-if="(indexs+1==value.length) && item.length>8" class="more" @click="onClickMorePop(index)" ref='morePop'> |
|
|
class="table-body-tr" |
|
|
更多> |
|
|
v-for="(value, index) in tableData" |
|
|
<span class="more-pop" v-if="visiblePopList[index]"> |
|
|
:key="index" |
|
|
<!-- 李佳琪、刘阳、赵欣、丁一、嘉敏、李岩、何嘉慧 |
|
|
> |
|
|
|
|
|
<div |
|
|
|
|
|
class="td" |
|
|
|
|
|
v-for="(item, indexs) in value" |
|
|
|
|
|
:key="indexs" |
|
|
|
|
|
:style="tableContentStyle[indexs]" |
|
|
|
|
|
> |
|
|
|
|
|
{{ item }} |
|
|
|
|
|
<span |
|
|
|
|
|
v-if="indexs + 1 == value.length && item.length > 8" |
|
|
|
|
|
class="more" |
|
|
|
|
|
@click.stop="onClickMorePop(index)" |
|
|
|
|
|
ref="morePop" |
|
|
|
|
|
> |
|
|
|
|
|
更多> |
|
|
|
|
|
<span class="more-pop" v-if="visiblePopList[index]"> |
|
|
|
|
|
<!-- 李佳琪、刘阳、赵欣、丁一、嘉敏、李岩、何嘉慧 |
|
|
李易峰、赵敏、何军、曲树惠 --> |
|
|
李易峰、赵敏、何军、曲树惠 --> |
|
|
{{item}} |
|
|
{{ item }} |
|
|
</span> |
|
|
|
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</span> |
|
|
</div> |
|
|
|
|
|
<screen-loading v-if="visibleLoading">加载中</screen-loading> |
|
|
|
|
|
<div class="no-data" v-if="tableData.length==0 && !visibleLoading"> |
|
|
|
|
|
<img src="../../../../../../assets/img/modules/visual/noData.png" alt="" srcset="" class="no-data-img"> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<screen-loading v-if="visibleLoading">加载中</screen-loading> |
|
|
|
|
|
<div class="no-data" v-if="tableData.length == 0 && !visibleLoading"> |
|
|
|
|
|
<img |
|
|
|
|
|
src="../../../../../../assets/img/modules/visual/noData.png" |
|
|
|
|
|
alt="" |
|
|
|
|
|
srcset="" |
|
|
|
|
|
class="no-data-img" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import ScreenLoading from '../screen-loading/index' |
|
|
import ScreenLoading from "../screen-loading/index"; |
|
|
import Vue from 'vue' |
|
|
import Vue from "vue"; |
|
|
export default { |
|
|
export default { |
|
|
name: 'warning-table', |
|
|
name: "warning-table", |
|
|
components:{ |
|
|
components: { |
|
|
ScreenLoading |
|
|
ScreenLoading, |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
headerList: { |
|
|
headerList: { |
|
|
type: Array, |
|
|
type: Array, |
|
|
required: false, |
|
|
required: false, |
|
|
default: () => { |
|
|
default: () => { |
|
|
return [ |
|
|
return [ |
|
|
{ title: '序号' }, |
|
|
{ title: "序号" }, |
|
|
{ title: '所属网格'}, |
|
|
{ title: "所属网格" }, |
|
|
{ title: '所属小区'}, |
|
|
{ title: "所属小区" }, |
|
|
{ title: '楼号'}, |
|
|
{ title: "楼号" }, |
|
|
{ title: '姓名' }, |
|
|
{ title: "姓名" }, |
|
|
] |
|
|
]; |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
tableData: { |
|
|
tableData: { |
|
|
type: Array, |
|
|
type: Array, |
|
|
required: false, |
|
|
required: false, |
|
|
default: () => { |
|
|
default: () => { |
|
|
return [ |
|
|
return [ |
|
|
[1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], |
|
|
// [ |
|
|
[2,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], |
|
|
// 1, |
|
|
] |
|
|
// "商丘路社区第一网格", |
|
|
} |
|
|
// "商丘路小区", |
|
|
|
|
|
// "2号楼", |
|
|
|
|
|
// "杨颖、王平、刘佳敏、丁辉、杨萍", |
|
|
|
|
|
// ], |
|
|
|
|
|
// [ |
|
|
|
|
|
// 2, |
|
|
|
|
|
// "商丘路社区第一网格", |
|
|
|
|
|
// "商丘路小区", |
|
|
|
|
|
// "2号楼", |
|
|
|
|
|
// "杨颖、王平、刘佳敏、丁辉、杨萍", |
|
|
|
|
|
// ], |
|
|
|
|
|
]; |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
// 单独给头部设置样式 |
|
|
// 单独给头部设置样式 |
|
|
headerStyle: { |
|
|
headerStyle: { |
|
@ -70,8 +109,8 @@ props: { |
|
|
// { |
|
|
// { |
|
|
// width:'200px' |
|
|
// width:'200px' |
|
|
// } |
|
|
// } |
|
|
] |
|
|
]; |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
// 单独给内容设置样式 |
|
|
// 单独给内容设置样式 |
|
|
tableContentStyle: { |
|
|
tableContentStyle: { |
|
@ -85,13 +124,13 @@ props: { |
|
|
// { |
|
|
// { |
|
|
// width:'200px' |
|
|
// width:'200px' |
|
|
// } |
|
|
// } |
|
|
] |
|
|
]; |
|
|
} |
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
visibleLoading: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: true, |
|
|
}, |
|
|
}, |
|
|
visibleLoading:{ |
|
|
|
|
|
type:Boolean, |
|
|
|
|
|
default:true |
|
|
|
|
|
} |
|
|
|
|
|
// // 表格平均分的份数 |
|
|
// // 表格平均分的份数 |
|
|
// ava: { |
|
|
// ava: { |
|
|
// type: Number, |
|
|
// type: Number, |
|
@ -110,145 +149,162 @@ props: { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
visiblePopList:[false,false,false,false,false,false,false,false,false,false], |
|
|
visiblePopList: [ |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
false, |
|
|
|
|
|
], |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
watch: { |
|
|
// window.addEventListener('click', e => { |
|
|
tableData(arr) { |
|
|
// if (this.$refs.morePop && !this.$refs.morePop.contains(e.target)) { |
|
|
if (Array.isArray(arr)) { |
|
|
// this.visiblePopList.forEach((item,indexs)=>{ |
|
|
this.visiblePopList = new Array(arr.length).fill(false); |
|
|
// Vue.set(this.visiblePopList, indexs, false) |
|
|
} |
|
|
// }) |
|
|
}, |
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
window.addEventListener("click", (e) => { |
|
|
|
|
|
this.visiblePopList = new Array(this.visiblePopList.length).fill(false); |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
created() {}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
onClickMorePop(index) { |
|
|
onClickMorePop(index) { |
|
|
this.visiblePopList.forEach((item,indexs)=>{ |
|
|
this.visiblePopList.forEach((item, indexs) => { |
|
|
if(index==indexs){ |
|
|
if (index == indexs) { |
|
|
Vue.set(this.visiblePopList, index, true) |
|
|
Vue.set(this.visiblePopList, index, true); |
|
|
}else{ |
|
|
} else { |
|
|
Vue.set(this.visiblePopList, indexs, false) |
|
|
Vue.set(this.visiblePopList, indexs, false); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
.warning-table{ |
|
|
.warning-table { |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
.table { |
|
|
.table { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
&-header { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 50px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: space-around; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
background: rgba(8, 37, 134, 0.85); |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
|
|
|
|
|
|
&-th { |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
width: calc(100% / 5); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-body { |
|
|
|
|
|
box-sizing: border-box; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: calc(100% - 50px); |
|
|
&-header { |
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
|
|
|
|
|
|
&-tr { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 50px; |
|
|
height: 50px; |
|
|
|
|
|
// height: calc(100% / 10); |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-around; |
|
|
justify-content: space-around; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
background: rgba(8, 37, 134, 0.85); |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
|
|
|
|
|
|
&-th { |
|
|
.td { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
width: calc(100% / 5); |
|
|
width: calc(100% / 5); |
|
|
} |
|
|
.more { |
|
|
} |
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
color: #e4dc00; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
|
&-body { |
|
|
&-pop { |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
width: 100%; |
|
|
display: block; |
|
|
height: calc(100% - 50px); |
|
|
box-sizing: border-box; |
|
|
font-size: 18px; |
|
|
width: 215px; |
|
|
font-weight: 400; |
|
|
height: auto; |
|
|
color: #FFFFFF; |
|
|
line-height: 20px; |
|
|
|
|
|
border: 1px solid red; |
|
|
&-tr { |
|
|
position: absolute; |
|
|
width: 100%; |
|
|
right: -100%; |
|
|
height: 50px; |
|
|
top: 150%; |
|
|
// height: calc(100% / 10); |
|
|
background: #06186d; |
|
|
display: flex; |
|
|
border: 1px solid #1a64cc; |
|
|
justify-content: space-around; |
|
|
border-radius: 5px; |
|
|
align-items: center; |
|
|
font-size: 9px; |
|
|
|
|
|
|
|
|
.td { |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
width: calc(100% / 5); |
|
|
|
|
|
.more { |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 400; |
|
|
font-weight: 400; |
|
|
color: #E4DC00; |
|
|
color: #ffffff; |
|
|
position: relative; |
|
|
padding: 16px 8px 10px 9px; |
|
|
|
|
|
z-index: 1; |
|
|
&-pop{ |
|
|
cursor: default; |
|
|
box-sizing: border-box; |
|
|
// &::after{ |
|
|
display: block; |
|
|
// position: absolute; |
|
|
box-sizing: border-box; |
|
|
// left: 30%; |
|
|
width: 215px; |
|
|
// top: -30%; |
|
|
height: auto; |
|
|
// display: flex; |
|
|
line-height: 20px; |
|
|
// content:''; |
|
|
border: 1px solid red; |
|
|
// width: 0; |
|
|
position: absolute; |
|
|
// height: 0; |
|
|
left: -100%; |
|
|
// border-width: 13px; |
|
|
top: 150%; |
|
|
// border-style: solid; |
|
|
background: #06186D; |
|
|
// border-color: transparent transparent rgba(26, 100, 204,0.5) transparent; |
|
|
border: 1px solid #1A64CC; |
|
|
// // border-color: transparent transparent red transparent; |
|
|
border-radius: 5px; |
|
|
// transform: translate(-50%,0); |
|
|
font-size: 9px; |
|
|
// } |
|
|
font-weight: 400; |
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
padding:16px 8px 10px 9px; |
|
|
|
|
|
z-index: 1; |
|
|
|
|
|
// &::after{ |
|
|
|
|
|
// position: absolute; |
|
|
|
|
|
// left: 30%; |
|
|
|
|
|
// top: -30%; |
|
|
|
|
|
// display: flex; |
|
|
|
|
|
// content:''; |
|
|
|
|
|
// width: 0; |
|
|
|
|
|
// height: 0; |
|
|
|
|
|
// border-width: 13px; |
|
|
|
|
|
// border-style: solid; |
|
|
|
|
|
// border-color: transparent transparent rgba(26, 100, 204,0.5) transparent; |
|
|
|
|
|
// // border-color: transparent transparent red transparent; |
|
|
|
|
|
// transform: translate(-50%,0); |
|
|
|
|
|
// } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
&-tr:nth-child(2n) { |
|
|
&-tr:nth-child(2n) { |
|
|
background: rgba(16, 75, 164, 0.24); |
|
|
background: rgba(16, 75, 164, 0.24); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&-tr:hover { |
|
|
&-tr:hover { |
|
|
background: url('../../../../../../assets/img/modules/visual/hover-bac.png') no-repeat center; |
|
|
background: url("../../../../../../assets/img/modules/visual/hover-bac.png") |
|
|
background-size: 100% 100%; |
|
|
no-repeat center; |
|
|
} |
|
|
background-size: 100% 100%; |
|
|
// 暂无数据 |
|
|
} |
|
|
.no-data{ |
|
|
// 暂无数据 |
|
|
width: 100%; |
|
|
.no-data { |
|
|
height: calc(100% - 50px); |
|
|
width: 100%; |
|
|
display: flex; |
|
|
height: calc(100% - 50px); |
|
|
align-items: center; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
&-img{ |
|
|
justify-content: center; |
|
|
width: 249px; |
|
|
&-img { |
|
|
height: 172px; |
|
|
width: 249px; |
|
|
} |
|
|
height: 172px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|