婚丧嫁娶
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
<div v-if="currentTabs == 0" class="msg">
|
||||
<div class="box">
|
||||
<div class="card">
|
||||
<div class="card" @click="toList(0)">
|
||||
<div class="imgleft">
|
||||
<span class="titles">活动登记情况</span>
|
||||
<span class="titlesContent">查看全部活动和本月新增</span>
|
||||
@@ -13,7 +13,7 @@
|
||||
<img src="./yan.jpg" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card" @click="toList(1)">
|
||||
<div class="imgleft">
|
||||
<span class="titles">干部参与情况</span>
|
||||
<span class="titlesContent">查看全部参与操办信息和本月新增</span>
|
||||
@@ -22,7 +22,7 @@
|
||||
<img src="./yan.jpg" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card" @click="toList(2)">
|
||||
<div class="imgleft">
|
||||
<span class="titles">婚礼登记情况</span>
|
||||
<span class="titlesContent">查看全部婚礼和本月新增</span>
|
||||
@@ -31,7 +31,7 @@
|
||||
<img src="./yan.jpg" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card" @click="toList(3)">
|
||||
<div class="imgleft">
|
||||
<span class="titles">丧礼登记情况</span>
|
||||
<span class="titlesContent">查看全部丧礼和本月新增</span>
|
||||
@@ -46,16 +46,59 @@
|
||||
<div class="chart">
|
||||
<p>本年统计</p>
|
||||
|
||||
<div class="yearStatistics" id="yearStatistic" style="height: 300px"></div>
|
||||
<div class="yearStatistics" id="yearStatistic"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="currentTabs == 1" class="myReport">1</div>
|
||||
<div v-if="currentTabs == 1" class="myReport">
|
||||
<template v-if="datas.length > 0">
|
||||
<AiCard v-for="(item, i) in datas" :key="i">
|
||||
<template #custom>
|
||||
<div class="names">
|
||||
<span>事主姓名</span>
|
||||
<span class="right">{{ item.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="phones">
|
||||
<span>联系方式</span>
|
||||
<span class="right">{{ item.phone }}</span>
|
||||
</div>
|
||||
|
||||
<div class="times">
|
||||
<span>上报时间</span>
|
||||
<span class="right" v-if="item.createTime">{{ item.createTime.substring(0, item.createTime.length - 3) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="areaNames">
|
||||
<span>上报地点</span>
|
||||
<span class="right">{{ item.address }}</span>
|
||||
</div>
|
||||
|
||||
<span class="types" :style="{ background: item.type == 0 ? '#FF65B8' : item.type == 1 ? '#FF883C' : '#1AAAFF' }">
|
||||
{{ $dict.getLabel('marriageType', item.type) }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #menu>
|
||||
<div class="menu" @tap.stop="toDetele(item)">删除</div>
|
||||
</template>
|
||||
</AiCard>
|
||||
|
||||
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80" />
|
||||
</template>
|
||||
|
||||
<AiEmpty description="暂无数据" v-else></AiEmpty>
|
||||
|
||||
<div class="fixedBtn" @click="toAdd">我要上报</div>
|
||||
|
||||
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppMarryAndDie',
|
||||
@@ -64,7 +107,6 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
currentTabs: 0,
|
||||
tabList: [
|
||||
{
|
||||
@@ -75,24 +117,65 @@ export default {
|
||||
},
|
||||
],
|
||||
Echart: null,
|
||||
datas: [],
|
||||
current: 1,
|
||||
deletShow: false,
|
||||
deletId: '',
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
...mapState(['user', 'global']),
|
||||
|
||||
loadmore() {
|
||||
return this.pages <= this.current ? 'loading ' : 'nomore'
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
this.getEchart()
|
||||
this.$dict.load('marriageType', 'modeType').then(() => {
|
||||
this.getList()
|
||||
this.getEchart()
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.Echart = echarts.init(document.getElementById('yearStatistic'))
|
||||
},
|
||||
methods: {
|
||||
getList() {},
|
||||
getList() {
|
||||
this.$http
|
||||
.post('/app/appmarriagefuneralinfo/list', null, {
|
||||
params: {
|
||||
size: 6,
|
||||
current: this.current,
|
||||
// createUserId: this.user.id,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetele(item) {
|
||||
this.deletShow = true
|
||||
this.deletId = item.id
|
||||
},
|
||||
|
||||
delet() {
|
||||
this.$http.post(`/app/appmarriagefuneralinfo/queryDetailById?ids=${this.deletId}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
change(index) {
|
||||
this.keyword = ''
|
||||
this.currentTabs = index
|
||||
this.getList()
|
||||
this.getEchart()
|
||||
},
|
||||
|
||||
getEchart() {
|
||||
@@ -104,72 +187,38 @@ export default {
|
||||
},
|
||||
|
||||
initEchart(data) {
|
||||
console.log(data)
|
||||
|
||||
var option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: data.map((v) => v.name.replace('数量', '')),
|
||||
// boundaryGap: false,
|
||||
axisLine: {
|
||||
lineStyle: { color: '#157EFF' },
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
alignWithLabel: false,
|
||||
lineStyle: {
|
||||
width: 100,
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: true, //是否显示刻度标签
|
||||
interval: 0, //坐标轴刻度标签的显示间隔 0强制显示所有标签,1表示『隔一个标签显示一个标签』,如果值为 2,表示隔两个标签显示一个标签,以此类推
|
||||
rotate: 50, //x轴数据太多可以尝试旋转一定角度,不至于太难看
|
||||
//刻度标签旋转的角度,在类目轴的类目标签显示不下的时候可以通过旋转防止标签之间重叠。旋转的角度从 -90 度到 90 度
|
||||
show: true,
|
||||
interval: 0,
|
||||
},
|
||||
axisTick: {
|
||||
//坐标轴刻度相关设置
|
||||
// show: true, //是否显示坐标轴刻度。
|
||||
// inside: false, //坐标轴刻度是否朝内,默认朝外。
|
||||
// length: 7, //坐标轴刻度的长度。
|
||||
interval: 'auto',
|
||||
},
|
||||
axisLabel: { color: '#666', margin: 19 },
|
||||
// axisTick: {
|
||||
// alignWithLabel: false,
|
||||
// },
|
||||
|
||||
// splitLine: {
|
||||
// show: true,
|
||||
// lineStyle: {
|
||||
// width: 0,
|
||||
// type: 'solid',
|
||||
// color: '#f5f5f5',
|
||||
// },
|
||||
// },
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
show: true,
|
||||
interval: 0, //不间隔显示x轴上的文字,否则文字放不下时,将会自动间隔显示
|
||||
|
||||
textStyle: {
|
||||
// color: '#fff',
|
||||
},
|
||||
},
|
||||
axisLine: {
|
||||
//轴线颜色
|
||||
lineStyle: {
|
||||
color: 'rgba(255,255,255,0.2)',
|
||||
color: '#666',
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
//分割线样式
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#D8DDE6',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: true, //是否显示刻度标签
|
||||
interval: 0,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
@@ -183,6 +232,29 @@ export default {
|
||||
|
||||
option && this.Echart.setOption(option)
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
},
|
||||
|
||||
toList(num) {
|
||||
if (num == 0) {
|
||||
console.log('全部')
|
||||
uni.navigateTo({ url: `./AllActiveList` })
|
||||
}
|
||||
if (num == 1) {
|
||||
console.log('干部')
|
||||
uni.navigateTo({ url: `./CadreList` })
|
||||
}
|
||||
if (num == 2) {
|
||||
console.log('婚礼')
|
||||
uni.navigateTo({ url: `./MarryList` })
|
||||
}
|
||||
if (num == 3) {
|
||||
console.log('丧礼')
|
||||
uni.navigateTo({ url: `./FuneralList` })
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -193,8 +265,10 @@ uni-page-body {
|
||||
}
|
||||
.AppMarryAndDie {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
|
||||
.msg {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
.box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -208,6 +282,7 @@ uni-page-body {
|
||||
margin-top: 8px;
|
||||
padding: 18px 24px 34px;
|
||||
box-sizing: border-box;
|
||||
background: #f6f7f8;
|
||||
.imgleft {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -238,12 +313,89 @@ uni-page-body {
|
||||
}
|
||||
|
||||
.chart {
|
||||
p {
|
||||
padding: 26px 0 26px 32px;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.yearStatistics {
|
||||
width: 100%;
|
||||
// height: 500px;
|
||||
// background: pink;
|
||||
height: 600px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.myReport {
|
||||
background: #f3f6f9;
|
||||
padding-bottom: 112px;
|
||||
|
||||
::v-deep .AiCard {
|
||||
background: #f3f6f9;
|
||||
.start {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
padding: 32px 32px 36px 32px;
|
||||
border-radius: 16px;
|
||||
.names,
|
||||
.phones,
|
||||
.times,
|
||||
.areaNames {
|
||||
display: flex;
|
||||
.right {
|
||||
width: 76%;
|
||||
margin-left: 32px;
|
||||
font-size: 26px;
|
||||
color: #333333;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
.types {
|
||||
display: inline-block;
|
||||
margin-top: 32px;
|
||||
border-radius: 8px;
|
||||
padding: 4px 8px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.mask {
|
||||
.moreMenu {
|
||||
transform: translate(-175px, 20px);
|
||||
.menu {
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u-load-more-wrap {
|
||||
background: #f3f6f9 !important;
|
||||
margin: 0 !important;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.fixedBtn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
bottom: 0;
|
||||
background: #3975c6;
|
||||
padding: 32px 0;
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user