|
@@ -1,7 +1,31 @@
|
|
|
<template>
|
|
|
<van-tabs v-model:active="activeName">
|
|
|
<van-tab title="个贷待办" name="personal">
|
|
|
- <h1>个贷待办</h1>
|
|
|
+ <van-search v-model="personalListQuery.keyword" placeholder="请输入搜索关键词" @search="onPersonalSearch()" />
|
|
|
+ <van-pull-refresh v-model="loading" @refresh="onPersonalRefresh()">
|
|
|
+ <van-list v-model:loading="loading" :finished="finished" finished-text="没有待办了" @load="personalTodoList()">
|
|
|
+ <div class="card" v-for="item in personalListData" :key="item.id">
|
|
|
+ <h3>
|
|
|
+ <van-icon name="link-o" />
|
|
|
+ {{ item.orderId }}
|
|
|
+ </h3>
|
|
|
+ <p class="projectName">
|
|
|
+ <van-icon name="location-o" />
|
|
|
+ {{ item.location }}
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ <van-icon name="contact-o" />
|
|
|
+ {{ item.clientName }}-{{ item.clientSubName}}
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ <van-tag type="primary" size="medium">{{ item.nodeName }}</van-tag>
|
|
|
+ <van-tag type="success" size="medium">{{ item.clientManager }}</van-tag>
|
|
|
+ <van-tag color="#969799" size="medium">{{ item.created }}</van-tag>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </van-list>
|
|
|
+ </van-pull-refresh>
|
|
|
+ <van-back-top right="10vw" bottom="10vh" />
|
|
|
</van-tab>
|
|
|
<van-tab title="大中型待办" name="major">
|
|
|
<h1>大中型待办</h1>
|
|
@@ -13,14 +37,78 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default {
|
|
|
+import { getPersonalTodoList } from '@/api/personal';
|
|
|
+
|
|
|
+export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: 'personal',
|
|
|
+ personalListData: [],
|
|
|
+ // 加载状态
|
|
|
+ loading: false,
|
|
|
+ // 加载完成状态
|
|
|
+ finished: false,
|
|
|
+ personalListQuery: {
|
|
|
+ // 当前页数
|
|
|
+ current: 1,
|
|
|
+ // 查询关键字
|
|
|
+ keyword: null,
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.personalTodoList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 个贷待办列表刷新
|
|
|
+ onPersonalRefresh() {
|
|
|
+ this.personalListQuery.current = 1;
|
|
|
+ this.finished = false;
|
|
|
+ this.personalListData = [];
|
|
|
+ this.personalTodoList();
|
|
|
+ },
|
|
|
+ // 个贷待办列表关键字搜索
|
|
|
+ onPersonalSearch() {
|
|
|
+ this.personalListQuery.current = 1;
|
|
|
+ this.finished = false;
|
|
|
+ this.personalListData = [];
|
|
|
+ this.personalTodoList();
|
|
|
+ },
|
|
|
+ // 获取个贷待办
|
|
|
+ personalTodoList() {
|
|
|
+ this.loading = true;
|
|
|
+ getPersonalTodoList(this.personalListQuery).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (res.data.records) {
|
|
|
+ this.personalListData = this.personalListData.concat(res.data.records);
|
|
|
+ }
|
|
|
+ // 判断是否还有下一页
|
|
|
+ if (res.data.pages > this.personalListQuery.current) { // 服务端返回的总页数大于当前页数, 将当前页数+1
|
|
|
+ this.personalListQuery.current++;
|
|
|
+ }else { // 反之停止加载
|
|
|
+ this.finished = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.card {
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 12px;
|
|
|
+ box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.1);
|
|
|
+ padding: 16px;
|
|
|
+ margin: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.projectName {
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
</style>
|