Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2021-12-23 17:53:56 +08:00
11 changed files with 80 additions and 67 deletions

View File

@@ -53,7 +53,7 @@
</div> </div>
<div class="info-flex"> <div class="info-flex">
<span class="label">网格管理员</span> <span class="label">网格管理员</span>
<span class="value">林珊珊</span> <span class="value">{{detailInfo.build.girdMemberNames}}</span>
</div> </div>
<div class="info-flex"> <div class="info-flex">
<span class="label">楼栋长</span> <span class="label">楼栋长</span>

View File

@@ -39,7 +39,7 @@
<div class="line"></div> <div class="line"></div>
<u-form-item label="图片上传 (最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top"> <u-form-item label="图片上传 (最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9"></AiUploader> <AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item> </u-form-item>
<div class="line"></div> <div class="line"></div>
@@ -135,7 +135,7 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('发布成功') this.$u.toast('发布成功')
this.flag = false this.flag = false
uni.navigateTo({ url: `./AppMarryAndDie` }) uni.navigateTo({ url: `./AppMarryAndDie?indexTabs=1` })
} }
}) })
} else { } else {
@@ -163,9 +163,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.add { .add {
height: 100%; height: 100%;
padding-bottom: 112px;
.header-description { .header-description {
padding-bottom: 112px;
::v-deep .u-form { ::v-deep .u-form {
.u-form-item { .u-form-item {
padding: 0 45px !important; padding: 0 45px !important;

View File

@@ -131,7 +131,11 @@ export default {
}, },
}, },
watch: {}, watch: {},
onLoad() { onLoad(o) {
if (o.indexTabs) {
this.currentTabs = o.indexTabs
}
this.$dict.load('marriageType', 'modeType').then(() => { this.$dict.load('marriageType', 'modeType').then(() => {
this.getList() this.getList()
this.getEchart() this.getEchart()
@@ -170,7 +174,7 @@ export default {
var option = { var option = {
xAxis: { xAxis: {
type: 'category', type: 'category',
data: data.map((v) => v.name.replace('数量', '')), data: data.map((v) => v.name.replace('数量', '').replace('和操办登记', '')),
axisLine: { axisLine: {
lineStyle: { color: '#157EFF' }, lineStyle: { color: '#157EFF' },
}, },

View File

@@ -29,7 +29,7 @@
<span>| 2</span> <span>| 2</span>
</div> </div>
<div class="areaNmae">{{ item.areaName }}</div> <div class="areaNmae">{{ item.address }}</div>
</div> </div>
<img :src="item.url[0].url" alt="" /> <img :src="item.url[0].url" alt="" />

View File

@@ -1,11 +1,11 @@
<template> <template>
<div class="AppResidentDocument"> <div class="AppResidentDocument">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs> <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj"></AiAreaPicker>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="current=1,getList"></AiAreaPicker>
<div class="line"></div> <div class="line"></div>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change"></u-tabs>
<div class="seachObj"> <div class="seachObj">
<u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false" bg-color="#F5F5F5" search-icon-color="#E2E8F1" color="#666" height="58" @search="handerSearch" @clear="handerClear"></u-search> <u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false" bg-color="#F5F5F5" search-icon-color="#E2E8F1" color="#666" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div> </div>
@@ -72,7 +72,7 @@ export default {
}, },
], ],
currentTabs: 0, currentTabs: 0,
areaId: '' areaId: '',
} }
}, },
computed: { computed: {
@@ -92,6 +92,7 @@ export default {
size: this.size, size: this.size,
current: this.current, current: this.current,
con: this.keyword, con: this.keyword,
areaId: this.areaId,
residentType: this.currentTabs == 0 ? '0' : '1', residentType: this.currentTabs == 0 ? '0' : '1',
}, },
}) })
@@ -112,6 +113,12 @@ export default {
toDetailCard(item) { toDetailCard(item) {
uni.navigateTo({ url: `./DetailCard?id=${item.id}` }) uni.navigateTo({ url: `./DetailCard?id=${item.id}` })
}, },
seachObj(e) {
this.areaId = e.id
this.current = 1
this.getList()
},
}, },
onReachBottom() { onReachBottom() {
this.current = this.current + 1 this.current = this.current + 1

View File

@@ -67,7 +67,10 @@ export default {
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
onLoad(o) { onLoad(o) {
console.log(o) console.log(o)
this.id = o.id if(o.id) {
this.id = o.id
}
this.moduleId = o.moduleId this.moduleId = o.moduleId
this.forms.areaId = this.user.areaId this.forms.areaId = this.user.areaId
this.listName = o.listName this.listName = o.listName
@@ -111,51 +114,53 @@ export default {
}, },
submit() { submit() {
if (this.flag) return if (this.flag) return
if (!this.forms.title) {
return this.$u.toast('请输入标题')
}
if (!this.forms.content) {
return this.$u.toast('请输入正文')
}
this.$refs.uForm.validate((valid) => { if(this.selectList.length && this.forms.selectIndex === '') {
if (valid) { return this.$u.toast('请选择类别')
if (!this.forms.title) { }
return this.$u.toast('请输入标题')
}
if (!this.forms.content) {
return this.$u.toast('请输入正文')
}
if(this.selectList.length && this.forms.selectIndex === '') { var imgs = []
return this.$u.toast('请选择类别') if (this.forms.fileIds.length) {
} this.forms.fileIds.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
const imgs = [] console.log(222)
if (this.forms.fileIds) { var categoryId = '', categoryName = ''
this.forms.fileIds.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
if(this.selectList.length) {
categoryId = this.selectList[this.forms.selectIndex].id
categoryName = this.selectList[this.forms.selectIndex].categoryName
}
this.$http.post(`/app/appcontentinfo/addOrUpdate`, {
title: this.forms.title,
areaId: this.forms.areaId,
content: this.forms.content,
files: imgs || [],
id: this.id,
moduleId: this.moduleId,
categoryId: categoryId,
categoryName: categoryName,
})
.then((res) => {
console.log(333)
if (res.code == 0) {
uni.$emit('update')
this.$u.toast('发布成功')
this.flag = true this.flag = true
this.$http.post(`/app/appcontentinfo/addOrUpdate`, { setTimeout(() => {
title: this.forms.title, uni.navigateBack()
areaId: this.forms.areaId, }, 600)
content: this.forms.content,
files: imgs || [],
id: this.id,
moduleId: this.moduleId,
categoryId: this.selectList[this.forms.selectIndex].id,
categoryName: this.selectList[this.forms.selectIndex].categoryName,
})
.then((res) => {
if (res.code == 0) {
uni.$emit('update')
this.$u.toast('发布成功')
this.flag = false
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
} else {
this.$u.toast('失败')
} }
}).catch((err) => {
console.log(444333)
}) })
}, },

View File

@@ -10,7 +10,7 @@
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect"></AiAreaPicker> <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect"></AiAreaPicker>
</div> </div>
<u-search class="serach_content" placeholder="请输入公开标题" :show-action="false" v-model="keyword" @clear="clearSearch" @search="search"></u-search> <u-search class="serach_content" placeholder="请输入标题" :show-action="false" v-model="keyword" @clear="clearSearch" @search="search"></u-search>
<template v-if="datas.length > 0"> <template v-if="datas.length > 0">
<AiCard v-for="(item, i) in datas" :key="i" @click.native="toAdd(item, 1)"> <AiCard v-for="(item, i) in datas" :key="i" @click.native="toAdd(item, 1)">

View File

@@ -4,8 +4,8 @@
<div class="titles">{{data.title}}</div> <div class="titles">{{data.title}}</div>
<div class="titles-bottom"> <div class="titles-bottom">
<span>类型</span> <span v-if="selectList.length">类型</span>
<span>{{selectList[data.showIndex].categoryName}}</span> <span v-if="selectList.length">{{data.categoryName}}</span>
<span class="to-left">浏览量</span> <span class="to-left">浏览量</span>
<span>{{data.viewCount}}</span> <span>{{data.viewCount}}</span>
</div> </div>
@@ -48,13 +48,6 @@ export default {
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => { this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) { if (res?.data) {
this.data = res.data this.data = res.data
if(this.selectList.length) {
this.selectList.map((item, index) => {
if(item.id == res.data.categoryId) {
this.data.showIndex = index
}
})
}
} }
}) })
}, },
@@ -63,8 +56,8 @@ export default {
if (res.code == 0) { if (res.code == 0) {
if(res.data && res.data[0].categoryList.length) { if(res.data && res.data[0].categoryList.length) {
this.selectList = res.data[0].categoryList this.selectList = res.data[0].categoryList
this.getDetail()
} }
this.getDetail()
} }
}) })
}, },

View File

@@ -388,10 +388,9 @@ export default {
}).then((res) => { }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
uni.$emit('specialPeopleList')
setTimeout(() => { setTimeout(() => {
this.$emit('change', { uni.navigateBack()
type: 'Detail',
})
}, 600) }, 600)
} }
}) })

View File

@@ -95,6 +95,11 @@ export default {
this.getStatisticMon() this.getStatisticMon()
this.getUserList() this.getUserList()
uni.setNavigationBarTitle({title: '特殊人群管理'}) uni.setNavigationBarTitle({title: '特殊人群管理'})
uni.$on('specialPeopleList', () => {
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
}, },
methods: { methods: {

View File

@@ -6,7 +6,7 @@
<u-input v-model="forms.title" placeholder="请输入标题" maxlength="30" /> <u-input v-model="forms.title" placeholder="请输入标题" maxlength="30" />
</u-form-item> </u-form-item>
<u-form-item label="发布单位" prop="publishUnitName" required :border-bottom="false" class="phones"> <u-form-item label="发布组织" prop="publishUnitName" required :border-bottom="false" class="phones">
<u-input v-model="forms.publishUnitName" placeholder="请输入发布单位" maxlength="16" /> <u-input v-model="forms.publishUnitName" placeholder="请输入发布单位" maxlength="16" />
</u-form-item> </u-form-item>
@@ -79,7 +79,7 @@ export default {
return this.$u.toast('请输入标题') return this.$u.toast('请输入标题')
} }
if (!this.forms.publishUnitName) { if (!this.forms.publishUnitName) {
return this.$u.toast('请输入发布单位') return this.$u.toast('请输入发布组织')
} }
const imgs = [] const imgs = []