| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <template>
- <view class="app-content">
- <block v-if="!$util.isEmpty(list.data)">
- <t-table :headerBackgroundColor="'#F0F2F6'">
- <t-tr header>
- <t-th>日期</t-th>
- <t-th><view style="width:150upx;">事项</view></t-th>
- <t-th>人员</t-th>
- <t-th>变化前</t-th>
- <t-th>变化后</t-th>
- </t-tr>
- <view v-for="(item, index) in list.data" :key="index">
- <t-tr>
- <t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
- <t-td align="center" color="info"><view style="width:150upx;">{{ item.event }}</view></t-td>
- <t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
- <t-td align="center" color="info"><view >{{ item.beforeName }}</view></t-td>
- <t-td align="center" color="info"><view >{{ item.afterName }}</view></t-td>
- </t-tr>
- </view>
- </t-table>
- </block>
- <block v-else>
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
- </block>
- </view>
- </template>
- <script>
- import AppWrapperEmpty from "@/components/app-wrapper-empty";
- import { getMemberChange } from '@/api/member'
- import list from '@/mixins/list'
- export default {
- name: "memberChange",
- components: {
- AppWrapperEmpty
- },
- mixins:[list],
- data() {
- return {
- };
- },
- methods: {
- async init(){
- let id = this.option.id ? this.option.id : 0
- const res = await getMemberChange({ page:this.list.page,customId:id })
- if (this.$util.isEmpty(res.data.list)){
- this.completes(res)
- return
- }
- let currentList = res.data.list
- res.data.list = currentList
- this.completes(res)
- }
- },
- async onPullDownRefresh() {
- this.resetList()
- await this.init()
- uni.stopPullDownRefresh()
- },
- async onReachBottom() {
- if (!this.list.finished) {
- await this.init()
- uni.stopPullDownRefresh();;
- } else {
- uni.stopPullDownRefresh();
- }
- }
- };
- </script>
- <style lang="scss" scoped></style>
|