This commit is contained in:
liuye
2021-12-24 11:29:07 +08:00
6 changed files with 42 additions and 41 deletions

View File

@@ -66,6 +66,7 @@ export default {
}, },
watch: {}, watch: {},
onLoad() { onLoad() {
uni.setNavigationBarTitle({ title: '居民列表' })
this.areaId = this.user.areaId this.areaId = this.user.areaId
this.getList() this.getList()
}, },

View File

@@ -65,6 +65,7 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
onLoad(o) { onLoad(o) {
uni.setNavigationBarTitle({ title: '居民档案' })
this.id = o.id this.id = o.id
this.$dict.load('householdRelation', 'fileStatus').then(() => { this.$dict.load('householdRelation', 'fileStatus').then(() => {
this.getDetail() this.getDetail()

View File

@@ -121,6 +121,7 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
onLoad(o) { onLoad(o) {
uni.setNavigationBarTitle({ title: '家庭成员信息' })
this.id = o.id this.id = o.id
this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => { this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => {
this.getDetail() this.getDetail()

View File

@@ -47,6 +47,7 @@ export default {
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
onLoad(o) { onLoad(o) {
uni.setNavigationBarTitle({ title: '新增小程序公告' })
this.id = o.id this.id = o.id
this.getDetail() this.getDetail()
}, },

View File

@@ -1,7 +1,6 @@
<template> <template>
<div class="AppUniMsg"> <div class="AppUniMsg">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<template v-if="datas.length > 0"> <template v-if="datas.length > 0">
<AiCard v-for="(item, i) in datas" :ref="item.id" :key="i" @click.native="toAdd(item, 1)"> <AiCard v-for="(item, i) in datas" :ref="item.id" :key="i" @click.native="toAdd(item, 1)">
@@ -21,8 +20,7 @@
</div> </div>
<div class="imgs"> <div class="imgs">
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3" <img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3" @click.stop="previewImage(item.images, items.url)" />
@click.stop="previewImage(item.images, items.url)"/>
</div> </div>
</template> </template>
@@ -32,22 +30,21 @@
</template> </template>
</AiCard> </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> </template>
<AiEmpty description="暂无数据" v-else></AiEmpty> <AiEmpty description="暂无数据" v-else></AiEmpty>
<AiFixedBtn> <AiFixedBtn>
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()"/> <div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
</AiFixedBtn> </AiFixedBtn>
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" <u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
:show-title="false" @confirm="delet"></u-modal>
</div> </div>
</template> </template>
<script> <script>
import {mapState} from 'vuex' import { mapState } from 'vuex'
export default { export default {
name: 'AppUniMsg', name: 'AppUniMsg',
@@ -81,11 +78,10 @@ export default {
}, },
watch: {}, watch: {},
onLoad() { onLoad() {
uni.setNavigationBarTitle({ title: '小程序公告' })
this.getList() this.getList()
}, },
onShow() { onShow() {},
document.title= "小程序公告"
},
methods: { methods: {
getList() { getList() {
this.$http this.$http
@@ -118,13 +114,13 @@ export default {
this.$refs?.[item.id]?.[0]?.handleClose() this.$refs?.[item.id]?.[0]?.handleClose()
} }
if (type == '1') { if (type == '1') {
uni.navigateTo({url: `./Detail?id=${item.id}`}) uni.navigateTo({ url: `./Detail?id=${item.id}` })
} }
if (type == '2') { if (type == '2') {
uni.navigateTo({url: `./Add?id=${item.id}`}) uni.navigateTo({ url: `./Add?id=${item.id}` })
} }
if (type == null) { if (type == null) {
uni.navigateTo({url: `./Add`}) uni.navigateTo({ url: `./Add` })
} }
}, },
@@ -150,8 +146,8 @@ export default {
previewImage(images, img) { previewImage(images, img) {
uni.previewImage({ uni.previewImage({
urls: images.map(v => v.url), urls: images.map((v) => v.url),
current: img current: img,
}) })
}, },
}, },

View File

@@ -33,6 +33,7 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
onLoad(o) { onLoad(o) {
uni.setNavigationBarTitle({ title: '公告详情' })
this.id = o.id this.id = o.id
this.getDetail() this.getDetail()
}, },
@@ -48,10 +49,10 @@ export default {
} }
}) })
}, },
previewImage (images, img) { previewImage(images, img) {
uni.previewImage({ uni.previewImage({
urls: images.map(v => v.url), urls: images.map((v) => v.url),
current: img current: img,
}) })
}, },
}, },