新增地区筛选需求
This commit is contained in:
@@ -2,6 +2,16 @@
|
|||||||
<div class="commentList">
|
<div class="commentList">
|
||||||
<!-- tab栏 -->
|
<!-- tab栏 -->
|
||||||
<div style="position: fixed; top: 0; left: 0;width: 100%;">
|
<div style="position: fixed; top: 0; left: 0;width: 100%;">
|
||||||
|
<div style="display:flex;justify-content:space-between; padding: 0 18px;height: 40px; line-height: 40px;background: #FFFF;">
|
||||||
|
<div>区域选择</div>
|
||||||
|
<div>
|
||||||
|
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="changeArea" :name.sync="areaName">
|
||||||
|
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
|
||||||
|
<span v-else>请选择</span>
|
||||||
|
<u-icon name="arrow-right" color="#666" size="28" style="margin-left: 4px" />
|
||||||
|
</AiAreaPicker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="tab-select">
|
<div class="tab-select">
|
||||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,13 +38,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else style="padding-top: 100px;"></AiEmpty>
|
<AiEmpty description="暂无数据" class="emptyWrap" v-else style="padding-top: 150px;"></AiEmpty>
|
||||||
<u-select v-model="showType" :list="list" label-name="dictName" value-name="dictValue"
|
<u-select v-model="showType" :list="list" label-name="dictName" value-name="dictValue"
|
||||||
@confirm="confirmTypeSelect"/>
|
@confirm="confirmTypeSelect"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'commentList',
|
name: 'commentList',
|
||||||
data () {
|
data () {
|
||||||
@@ -47,10 +58,14 @@ export default {
|
|||||||
topic: '',
|
topic: '',
|
||||||
topicType: '',
|
topicType: '',
|
||||||
data: [],
|
data: [],
|
||||||
list:[]
|
list:[],
|
||||||
|
areaId: '',
|
||||||
|
areaName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.areaId = this.user.areaId
|
||||||
|
this.areaName = this.user.areaName
|
||||||
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
|
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
|
||||||
this.getList()
|
this.getList()
|
||||||
uni.$on('update',()=>{
|
uni.$on('update',()=>{
|
||||||
@@ -61,6 +76,9 @@ export default {
|
|||||||
let all = [{ dictName: '全部', dictValue: '', dictColor: null }]
|
let all = [{ dictName: '全部', dictValue: '', dictColor: null }]
|
||||||
this.list = [...all, ...this.$dict.getDict('villagerCircleTopic')]
|
this.list = [...all, ...this.$dict.getDict('villagerCircleTopic')]
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user'])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tabClick(index) {
|
tabClick(index) {
|
||||||
this.tabIndex = index
|
this.tabIndex = index
|
||||||
@@ -70,7 +88,10 @@ export default {
|
|||||||
this.data = [],
|
this.data = [],
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
changeArea(e) {
|
||||||
|
this.areaId = e,
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
confirmTypeSelect(e) {
|
confirmTypeSelect(e) {
|
||||||
this.topic = e[0].value,
|
this.topic = e[0].value,
|
||||||
this.topicType = e[0].label
|
this.topicType = e[0].label
|
||||||
@@ -86,7 +107,7 @@ export default {
|
|||||||
topic:this.topic,
|
topic:this.topic,
|
||||||
content: this.content,
|
content: this.content,
|
||||||
auditType: this.tabIndex==0? '': this.tabIndex==1? 0 : 1,
|
auditType: this.tabIndex==0? '': this.tabIndex==1? 0 : 1,
|
||||||
|
areaId: this.areaId,
|
||||||
}
|
}
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
@@ -116,7 +137,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
line-height: 96px;
|
line-height: 96px;
|
||||||
background: #3975C6;
|
background: #FFF;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.item{
|
.item{
|
||||||
@@ -124,18 +145,20 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
color: #CDDCF0;
|
color: #333;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active{
|
.active{
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #fff;
|
color: #3975C6;
|
||||||
span{
|
span{
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: #FFF;
|
background: #3975C6;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 14px;
|
bottom: 14px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -174,7 +197,7 @@ export default {
|
|||||||
|
|
||||||
.card-list {
|
.card-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 200px 32px 20px 32px;
|
padding: 280px 32px 20px 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
<div class="infoList">
|
<div class="infoList">
|
||||||
<!-- tab栏 -->
|
<!-- tab栏 -->
|
||||||
<div style="position: fixed; top: 0; left: 0;width: 100%;">
|
<div style="position: fixed; top: 0; left: 0;width: 100%;">
|
||||||
|
<div style="display:flex;justify-content:space-between; padding: 0 18px;height: 40px; line-height: 40px;background: #FFFF;">
|
||||||
|
<div>区域选择</div>
|
||||||
|
<div>
|
||||||
|
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="changeArea" :name.sync="areaName">
|
||||||
|
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
|
||||||
|
<span v-else>请选择</span>
|
||||||
|
<u-icon name="arrow-right" color="#666" size="28" style="margin-left: 4px" />
|
||||||
|
</AiAreaPicker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="tab-select">
|
<div class="tab-select">
|
||||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,13 +36,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty description="暂无数据" class="emptyWrap" style="padding-top:100px" v-else></AiEmpty>
|
<AiEmpty description="暂无数据" class="emptyWrap" style="padding-top:150px" v-else></AiEmpty>
|
||||||
<u-select v-model="showType" :list="list" label-name="dictName" value-name="dictValue"
|
<u-select v-model="showType" :list="list" label-name="dictName" value-name="dictValue"
|
||||||
@confirm="confirmTypeSelect"/>
|
@confirm="confirmTypeSelect"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'infoList',
|
name: 'infoList',
|
||||||
data () {
|
data () {
|
||||||
@@ -47,9 +58,16 @@ export default {
|
|||||||
topic: '',
|
topic: '',
|
||||||
topicType: '',
|
topicType: '',
|
||||||
list: [],
|
list: [],
|
||||||
|
areaId: '',
|
||||||
|
areaName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user'])
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.areaId = this.user.areaId
|
||||||
|
this.areaName = this.user.areaName
|
||||||
this.getList()
|
this.getList()
|
||||||
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
|
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
|
||||||
uni.$on('update',()=>{
|
uni.$on('update',()=>{
|
||||||
@@ -69,13 +87,19 @@ export default {
|
|||||||
this.villagerList = [],
|
this.villagerList = [],
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
changeArea(e) {
|
||||||
|
console.log(e);
|
||||||
|
this.areaId = e
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.$http.post('app/appvillagercircleinfo/list',null,{
|
this.$http.post('app/appvillagercircleinfo/list',null,{
|
||||||
params: {
|
params: {
|
||||||
current: this.current,
|
current: this.current,
|
||||||
auditType: this.tabIndex == 0 ? '': this.tabIndex == 1 ? 0 : 1,
|
auditType: this.tabIndex == 0 ? '': this.tabIndex == 1 ? 0 : 1,
|
||||||
topic: this.topic,
|
topic: this.topic,
|
||||||
content: this.content
|
content: this.content,
|
||||||
|
areaId: this.areaId
|
||||||
}
|
}
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
@@ -113,26 +137,28 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
line-height: 96px;
|
line-height: 96px;
|
||||||
background: #3975C6;
|
background: #FFFFFF;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
|
||||||
.item{
|
.item{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
color: #CDDCF0;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active{
|
.active{
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #fff;
|
color: #3975C6;
|
||||||
span{
|
span{
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: #FFF;
|
background: #3975C6;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 14px;
|
bottom: 14px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -171,7 +197,7 @@ export default {
|
|||||||
|
|
||||||
.card-list {
|
.card-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 200px 32px 20px 32px;
|
padding: 280px 32px 20px 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user