- {{ item.createUserName }}
+ {{ item.title }}
- 财务公开
- 2021-12-16
+ {{item.categoryName}}
+ {{item.createTime.substring(0, 10)}}
- 1111
+ {{item.viewCount}}
人看过
@@ -66,7 +71,11 @@ export default {
pages: 0,
deletShow: false,
deletId: '',
- moduleId: ''
+ moduleId: '',
+ listName: '',
+ tabs: [],
+ tabIndex: 0,
+ categoryId: ''
}
},
computed: {
@@ -80,27 +89,47 @@ export default {
onLoad(o) {
this.areaId = this.user.areaId
this.moduleId = o.moduleId
+ this.listName = o.listName
+ this.getType()
this.getList()
},
mounted() {},
methods: {
- getList() {
- this.$http
- .post('/app/appvisitvondolence/list', null, {
- params: {
- size: 6,
- current: this.current,
- areaId: this.areaId,
- title: this.keyword,
- moduleId: this.moduleId
- },
- })
- .then((res) => {
- if (res.code == 0) {
- this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
- this.pages = res.data.pages
+ getType() {
+ this.$http.post(`/app/appcontentmoduleinfo/listByName?names=${this.listName}`).then((res) => {
+ if (res.code == 0) {
+ if(res.data && res.data[0].categoryList.length) {
+ var all = [{
+ categoryName: '全部',
+ id: '',
+ showIndex: 0,
+ }]
+ this.tabs = [...all, ... res.data[0].categoryList]
}
- })
+ }
+ })
+ },
+ tabClick(row) {
+ this.tabIndex = row.showIndex
+ this.categoryId = row.id
+ },
+ getList() {
+ this.$http.post('/app/appcontentinfo/list', null, {
+ params: {
+ size: 6,
+ current: this.current,
+ areaId: this.areaId,
+ title: this.keyword,
+ moduleId: this.moduleId,
+ categoryId: this.categoryId
+ },
+ })
+ .then((res) => {
+ if (res.code == 0) {
+ this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
+ this.pages = res.data.pages
+ }
+ })
},
areaSelect(e) {
@@ -111,15 +140,15 @@ export default {
toAdd(item, type) {
if (type == '1') {
console.log('详情')
- uni.navigateTo({ url: `./Detail?id=${item.id}` })
+ uni.navigateTo({ url: `./Detail?id=${item.id}&listName=${this.listName}` })
}
if (type == '2') {
console.log('编辑')
- uni.navigateTo({ url: `./Add?id=${item.id}` })
+ uni.navigateTo({ url: `./Add?id=${item.id}&moduleId=${this.moduleId}&listName=${this.listName}` })
}
if (type == null) {
console.log('添加')
- uni.navigateTo({ url: `./Add?moduleId=${this.moduleId}` })
+ uni.navigateTo({ url: `./Add?moduleId=${this.moduleId}&listName=${this.listName}` })
}
},
@@ -148,6 +177,41 @@ export default {
uni-page-body {
height: 100%;
}
+::v-deep .content{
+ padding: 0!important;
+}
+.tab-select{
+ width: 100%;
+ height: 96px;
+ line-height: 96px;
+ background: #3975C6;
+ display: flex;
+ .item{
+ flex: 1;
+ text-align: center;
+ font-size: 28px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ color: #CDDCF0;
+ }
+ .active{
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ position: relative;
+ color: #fff;
+ span{
+ width: 48px;
+ height: 4px;
+ background: #FFF;
+ position: absolute;
+ bottom: 14px;
+ left: 50%;
+ margin-left: -24px;
+ }
+ }
+}
+.iconfont-iconMore{
+ margin-top: 8px;
+}
.AppServicePublic {
height: 100%;
diff --git a/src/apps/AppServicePublic/Detail.vue b/src/apps/AppServicePublic/Detail.vue
index d7528ddf..d2b9cbd7 100644
--- a/src/apps/AppServicePublic/Detail.vue
+++ b/src/apps/AppServicePublic/Detail.vue
@@ -1,20 +1,22 @@
@@ -26,26 +28,41 @@ export default {
props: {},
data() {
return {
- data: [],
+ data: {},
id: '',
+ listName: '',
+ selectList: []
}
},
computed: {},
watch: {},
onLoad(o) {
this.id = o.id
- this.$dict.load('realityStatus').then(() => {
- // this.getDetail()
- })
+ this.listName = o.listName
+ this.getType()
},
mounted() {},
methods: {
getDetail() {
- this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
+ this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = res.data
- if (this.data.images) {
- this.data.images = JSON.parse(this.data.images || '[]')
+ if(this.selectList.length) {
+ this.selectList.map((item, index) => {
+ if(item.id == res.data.categoryId) {
+ this.data.showIndex = index
+ }
+ })
+ }
+ }
+ })
+ },
+ getType() {
+ this.$http.post(`/app/appcontentmoduleinfo/listByName?names=${this.listName}`).then((res) => {
+ if (res.code == 0) {
+ if(res.data && res.data[0].categoryList.length) {
+ this.selectList = res.data[0].categoryList
+ this.getDetail()
}
}
})
@@ -92,5 +109,13 @@ uni-page-body {
height: 486px;
}
}
+
+ .img-list{
+ img{
+ width: 204px;
+ height: 204px;
+ margin: 0 8px 8px 0;
+ }
+ }
}