This commit is contained in:
花有清香月有阴
2021-12-24 17:57:58 +08:00
parent 8d873171fe
commit c142b0a568
5 changed files with 181 additions and 46 deletions

View File

@@ -1,7 +1,6 @@
<template>
<div class="AppMarryAndDie">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6"
inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<div v-show="currentTabs == 0" class="msg">
<div class="box">
@@ -11,7 +10,7 @@
<span class="titlesContent">查看全部活动和本月新增</span>
</div>
<img src="./img/1.png" alt=""/>
<img src="./img/1.png" alt="" />
</div>
<div class="card" @click="toList(1)">
@@ -20,7 +19,7 @@
<span class="titlesContent">查看全部参与操办信息和本月新增</span>
</div>
<img src="./img/2.png" alt=""/>
<img src="./img/2.png" alt="" />
</div>
<div class="card" @click="toList(2)">
@@ -29,7 +28,7 @@
<span class="titlesContent">查看全部婚礼和本月新增</span>
</div>
<img src="./img/3.png" alt=""/>
<img src="./img/3.png" alt="" />
</div>
<div class="card" @click="toList(3)">
@@ -38,7 +37,7 @@
<span class="titlesContent">查看全部丧礼和本月新增</span>
</div>
<img src="./img/4.png" alt=""/>
<img src="./img/4.png" alt="" />
</div>
</div>
@@ -67,9 +66,7 @@
<div class="times">
<span>上报时间</span>
<span class="right" v-if="item.createTime">{{
item.createTime.substring(0, item.createTime.length - 3)
}}</span>
<span class="right" v-if="item.createTime">{{ item.createTime.substring(0, item.createTime.length - 3) }}</span>
</div>
<div class="areaNames">
@@ -83,13 +80,16 @@
</div>
<div class="imgs">
<img :src="e.url" alt="" v-for="(e, i) in item.files" :key="i"/>
<img :src="e.url" alt="" v-for="(e, i) in item.files" :key="i" />
</div>
<span class="types"
:style="{ background: item.type == 0 ? '#FF65B8' : item.type == 1 ? '#FF883C' : '#1AAAFF' }">
<span class="types" :style="{ background: item.type == 0 ? '#FF65B8' : item.type == 1 ? '#FF883C' : '#1AAAFF' }">
{{ $dict.getLabel('marriageType', item.type) }}
</span>
<span class="types" :style="{ background: item.modeType == 0 ? '#42D784' : '#1AAAFF' }" style="margin-left: 16px">
{{ $dict.getLabel('modeType', item.modeType) }}
</span>
</template>
<template #menu>
@@ -97,22 +97,21 @@
</template>
</AiCard>
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80"/>
<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>
<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'
import { mapState } from 'vuex'
export default {
name: 'AppMarryAndDie',
@@ -161,27 +160,27 @@ export default {
})
},
onShow() {
document.title = "婚丧嫁娶"
document.title = '婚丧嫁娶'
},
mounted() {
this.Echart = echarts.init(document.getElementById('yearStatistic'))
this.Echart = echarts.init(document.getElementById('yearStatistic', 'modeType'))
},
methods: {
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
}
})
.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
}
})
},
getEchart() {
@@ -198,7 +197,7 @@ export default {
type: 'category',
data: data.map((v) => v.name.replace('数量', '').replace('和操办登记', '')),
axisLine: {
lineStyle: {color: '#157EFF'},
lineStyle: { color: '#157EFF' },
},
tooltip: {
show: true,
@@ -271,21 +270,21 @@ export default {
},
toAdd() {
uni.navigateTo({url: `./Add`})
uni.navigateTo({ url: `./Add` })
},
toList(num) {
if (num == 0) {
uni.navigateTo({url: `./AllActiveList`})
uni.navigateTo({ url: `./AllActiveList` })
}
if (num == 1) {
uni.navigateTo({url: `./CadreList`})
uni.navigateTo({ url: `./CadreList` })
}
if (num == 2) {
uni.navigateTo({url: `./MarryList`})
uni.navigateTo({ url: `./MarryList` })
}
if (num == 3) {
uni.navigateTo({url: `./FuneralList`})
uni.navigateTo({ url: `./FuneralList` })
}
},