123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <template>
- <view>
- <uni-card>
- <uni-search-bar :radius="100" @confirm="search" placeholder="请输入姓名搜索" v-model="form.lrZjhm"></uni-search-bar>
- <uni-list>
- <uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
- :to="'/pages/lr/info?id='+ item.id"
- :thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.lrCydh" thumbSize="lg" :showArrow="false">
- <template v-slot:footer>
- <view v-if="item.lzzt == '0'"
- style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/caogao.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
- <text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
- <text v-else>{{item.createTime.substring(0,8) }}</text>
- <text>{{item.lrSpyj || '无'}}</text>
- </view>
- <view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'"
- style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/daishenhe.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
- <text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
- <text v-else>{{item.createTime.substring(0,8) }}</text>
- <text>{{item.lrSpyj || '无'}}</text>
- </view>
- <view v-else-if="item.lzzt == '3'"
- style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/tongguo.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
- <text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
- <text v-else>{{item.createTime.substring(0,8) }}</text>
- <text>{{item.lrSpyj || '无'}}</text>
- </view>
- <view v-else-if="item.lzzt == '4'"
- style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/jujue.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
- <text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
- <text v-else>{{item.createTime.substring(0,8) }}</text>
- <text>{{item.lrSpyj || '无'}}</text>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
- </uni-card>
- </view>
- </template>
- <script>
- import {
- getToken,
- getUser
- } from '@/common/auth.js'
- import {
- ListKhjbxx
- } from '@/api/kh.js'
- import {
- decryptRowData_ECB
- } from '@/common/sm4.js'
- export default {
- components: {},
- data() {
- return {
- status: 'more',
- form: {
- pageNum: 1,
- pageSize: 10,
- // createUserId: ''
- },
- dataList: [],
- total: 0,
- }
- },
- mounted() {
- this.userInfo = getUser()
- if (this.userInfo.userType != '07') {
- // this.form.createUserId = this.userInfo.userId
- }
- this.getList()
- },
- created() {},
- onLoad: function(options) {
- // setTimeout(function() {
- // console.log('start pulldown');
- // }, 1000);
- // uni.startPullDownRefresh();
- },
- onPullDownRefresh() {
- this.dataList = []
- this.form.pageNum = 1
- this.form.pageSize = 10
- this.getList()
- },
- onReachBottom() {
- if (this.dataList.length < this.total) {
- this.form.pageNum += 1
- this.getList()
- }
- },
- methods: {
- search() {
- this.dataList = []
- this.form.pageNum = 1
- this.form.pageSize = 10
- this.getList()
- },
- clickLoadMore(e) {
- this.status = 'loading'
- if (this.dataList.length < this.total) {
- this.form.pageNum += 1
- this.getList()
- } else {
- this.status = 'no-more'
- }
- },
- getList() {
- ListKhjbxx(this.form).then(res => {
- if (res.code == 200) {
- this.total = res.total
- let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
- "lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
- "yhzh", "khmc"
- ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
- this.dataList.push(...list)
- uni.stopPullDownRefresh();
- if (this.dataList.length < this.total) {
- this.status = 'more'
- } else if (this.dataList.length == this.total) {
- this.status = 'no-more'
- }
- }
- })
- }
- },
- watch: {},
- }
- </script>
- <style>
- </style>
|