epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
3.6 KiB

2 years ago
<template>
2 years ago
<div class="m-subbox m-sq12345">
2 years ago
<div class="table" v-if="pmList.length > 0">
2 years ago
<div class="tr">
<div class="th">排名</div>
<div class="th">社区</div>
<div class="th">事件数</div>
<div class="th">处理中</div>
<div class="th">已办结</div>
</div>
<div style="overflow: hidden">
2 years ago
<div ref="animation4">
<div class="tr" v-for="(item, index) in pmList" :key="index">
<div :class="index - 0 + 1 < 4 ? `td tdbg${index - 0 + 1}` : 'td'">
{{ index - 0 + 1 }}
</div>
<div class="td">{{ item.orgName }}</div>
<div class="td">{{ item.sumNum }}</div>
<div class="td td-or">{{ item.processNum }}</div>
<div class="td td-gr">{{ item.closedNum }}</div>
</div>
<!-- 无缝滚动 -->
<div v-if="pmList.length > 7">
<div class="tr" v-for="(item, index) in pmList" :key="index">
2 years ago
<div
:class="index - 0 + 1 < 4 ? `td tdbg${index - 0 + 1}` : 'td'"
>
{{ index - 0 + 1 }}
</div>
<div class="td">{{ item.orgName }}</div>
<div class="td">{{ item.sumNum }}</div>
<div class="td td-or">{{ item.processNum }}</div>
<div class="td td-gr">{{ item.closedNum }}</div>
</div>
</div>
2 years ago
</div>
</div>
</div>
2 years ago
<div
v-else
style="
width: 100%;
height: 100%;
text-align: center;
padding-top: 100px;
color: #ffffff;
"
>
<img
width="268px"
height="128px"
src="~@/assets/images/overview/zanwu.png"
/>
<div class="zanwuText">暂无数据</div>
</div>
2 years ago
</div>
2 years ago
</template>
<script>
export default {
name: "sq12345",
2 years ago
props: {
currentLevelData: {
type: Object,
default: {},
},
2 years ago
date: {
type: String,
default: "",
},
2 years ago
},
2 years ago
data() {
return {
2 years ago
org: this.$store.state.chooseArea.chooseName,
pmList: [],
2 years ago
};
},
2 years ago
watch: {
currentLevelData(val) {
2 years ago
if (val.orgId) {
this.getList(val);
2 years ago
}
},
date() {
this.getList(this.currentLevelData);
},
2 years ago
},
mounted() {
if (this.currentLevelData.orgId) {
this.getList(this.currentLevelData);
2 years ago
}
},
methods: {
getList(item) {
2 years ago
this.$http
.get(
"/actual/base/streetOverview/eventAgencyGroup?month=" +
this.date +
"&level=" +
item.orgLevel +
"&orgId=" +
item.orgId
)
.then(({ data: { data } }) => {
this.pmList = data;
if (this.pmList.length > 7) {
this.$nextTick(() => {
const aniHeight =
this.$refs.animation4.querySelector(".tr").offsetHeight *
this.pmList.length;
console.log(aniHeight);
2 years ago
this.$refs.animation4.style.animation = `move4 ${this.pmList.length}s linear infinite`;
2 years ago
document.styleSheets[0].insertRule(
`@keyframes move4{0% {transform: translateY(0px);}100% {transform: translateY(-${aniHeight}px);}`,
0
);
});
} else {
this.$refs.animation4.style.animation = null;
}
});
},
},
2 years ago
};
</script>
2 years ago
<style
lang="scss"
src="@/assets/scss/dataBoard/overview/index.scss"
scoped
></style>
2 years ago
<style lang="scss" scoped>
.zanwuText {
margin-top: -34px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 500;
color: #a3b9da;
}
</style>