办事进度

This commit is contained in:
花有清香月有阴
2022-03-01 09:29:32 +08:00
parent 7f7dbcdc11
commit 6f43e40510
3 changed files with 17 additions and 15 deletions

View File

@@ -6,6 +6,7 @@
<input placeholder="请输入需要搜索的内容" placeholder-style="color:rgba(255,255,255,0.5)" v-model="param" @confirm="reset" :focus="focus" confirm-type="search" /> <input placeholder="请输入需要搜索的内容" placeholder-style="color:rgba(255,255,255,0.5)" v-model="param" @confirm="reset" :focus="focus" confirm-type="search" />
</div> </div>
</div> </div>
<div class="progressList-list"> <div class="progressList-list">
<div class="item" v-for="(item, index) in list" :key="index" hover-class="bg-hover" @click="$linkTo('./progressDetail?id=' + item.id)"> <div class="item" v-for="(item, index) in list" :key="index" hover-class="bg-hover" @click="$linkTo('./progressDetail?id=' + item.id)">
<div class="top"> <div class="top">
@@ -29,7 +30,8 @@
<span :style="{ color: mapColor(item.approvalStatus) }">{{ $dict.getLabel('approvalStatus', item.approvalStatus) }}</span> <span :style="{ color: mapColor(item.approvalStatus) }">{{ $dict.getLabel('approvalStatus', item.approvalStatus) }}</span>
</div> </div>
</div> </div>
<AiEmpty v-if="!list.length"></AiEmpty>
<AiEmpty description="暂无数据" v-if="!list.length"></AiEmpty>
<!-- <u-loadmore :status="loadingStatus" :margin-top="30" :margin-bottom="30" color="#999" font-size="26"/> --> <!-- <u-loadmore :status="loadingStatus" :margin-top="30" :margin-bottom="30" color="#999" font-size="26"/> -->
</div> </div>
@@ -38,7 +40,7 @@
<script> <script>
export default { export default {
name: 'myPlan', name: 'AppMyPlan',
appName: '办事进度', appName: '办事进度',
data() { data() {
return { return {
@@ -49,7 +51,7 @@ export default {
focus: false, focus: false,
param: '', param: '',
list: [], list: [],
loadingStatus: 'loadmore', // loadingStatus: 'loadmore',
iconList: { iconList: {
0: 'icon1', 0: 'icon1',
1: 'icon2', 1: 'icon2',
@@ -73,7 +75,7 @@ export default {
methods: { methods: {
reset() { reset() {
this.current = 0 this.current = 0
this.loadingStatus = 'loading' // this.loadingStatus = 'loading'
this.$nextTick(() => { this.$nextTick(() => {
this.getList() this.getList()
@@ -89,9 +91,9 @@ export default {
}, },
getList() { getList() {
if (this.loadingStatus === 'nomore') return // if (this.loadingStatus === 'nomore') return
this.loadingStatus = 'loading' // this.loadingStatus = 'loading'
this.$instance this.$instance
.post(`/app/approv-alapply-info/xcx-list`, null, { .post(`/app/approv-alapply-info/xcx-list`, null, {
params: { params: {
@@ -102,11 +104,11 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.code === 0) { if (res.code === 0) {
if (!res.data.records.length) { // if (!res.data.records.length) {
if (this.current === 0) this.list = [] // if (this.current === 0) this.list = []
this.loadingStatus = 'nomore' // this.loadingStatus = 'nomore'
return false // return false
} // }
const data = res.data.records.map((item) => { const data = res.data.records.map((item) => {
return item return item
@@ -116,11 +118,11 @@ export default {
this.list.push(...data) this.list.push(...data)
this.current = this.current + 1 this.current = this.current + 1
this.loadingStatus = 'loadmore' // this.loadingStatus = 'loadmore'
if (this.list.length < 10) { // if (this.list.length < 10) {
this.loadingStatus = 'nomore' // this.loadingStatus = 'nomore'
} // }
} }
}) })
}, },