|
@@ -8,14 +8,20 @@
|
|
<v-tab :value="0">{{ $t('points.pointsDetails') }}</v-tab>
|
|
<v-tab :value="0">{{ $t('points.pointsDetails') }}</v-tab>
|
|
<v-tab :value="1">{{ $t('points.balanceDetails') }}</v-tab>
|
|
<v-tab :value="1">{{ $t('points.balanceDetails') }}</v-tab>
|
|
</v-tabs>
|
|
</v-tabs>
|
|
- <TablePage :items="dataList" :tab="tab"></TablePage>
|
|
|
|
- <CtPagination
|
|
|
|
- v-if="total > 0"
|
|
|
|
|
|
+ <CtTable
|
|
|
|
+ class="mt-3"
|
|
|
|
+ :items="dataList"
|
|
|
|
+ :headers="tab === 0 ? integralHeaders : balanceHeaders"
|
|
|
|
+ :loading="false"
|
|
|
|
+ :elevation="0"
|
|
|
|
+ :isTools="false"
|
|
|
|
+ :showPage="true"
|
|
:total="total"
|
|
:total="total"
|
|
- :page="query.pageNo"
|
|
|
|
- :limit="query.pageSize"
|
|
|
|
- @handleChange="handleChangePage"
|
|
|
|
- ></CtPagination>
|
|
|
|
|
|
+ :page-info="query"
|
|
|
|
+ itemKey="id"
|
|
|
|
+ @pageHandleChange="handleChangePage"
|
|
|
|
+ >
|
|
|
|
+ </CtTable>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -23,9 +29,9 @@
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({name: 'personal-pointsManagement-index'})
|
|
defineOptions({name: 'personal-pointsManagement-index'})
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
|
+import { timesTampChange } from '@/utils/date'
|
|
import { getUserRewardPointPage } from '@/api/integral'
|
|
import { getUserRewardPointPage } from '@/api/integral'
|
|
import { getEnterpriseAccountRecordPage } from '@/api/recruit/enterprise/member/points'
|
|
import { getEnterpriseAccountRecordPage } from '@/api/recruit/enterprise/member/points'
|
|
-import TablePage from './components/integralTable.vue'
|
|
|
|
import integralShow from '@/views/integral/pointsManagement/components/integralShow.vue'
|
|
import integralShow from '@/views/integral/pointsManagement/components/integralShow.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -44,6 +50,21 @@ const query = ref({
|
|
})
|
|
})
|
|
const dataList = ref([])
|
|
const dataList = ref([])
|
|
|
|
|
|
|
|
+const integralHeaders = [
|
|
|
|
+ { title: '标题', key: 'title', sortable: false },
|
|
|
|
+ { title: '描述', key: 'description', sortable: false },
|
|
|
|
+ { title: '积分点', key: 'point', sortable: false },
|
|
|
|
+ { title: '剩余点数', key: 'totalPoint', sortable: false },
|
|
|
|
+ { title: '发生时间', key: 'createTime', value: item => timesTampChange(item.createTime), sortable: false },
|
|
|
|
+]
|
|
|
|
+const balanceHeaders = [
|
|
|
|
+ { title: '标题', key: 'title', sortable: false },
|
|
|
|
+ { title: '描述', key: 'description', sortable: false },
|
|
|
|
+ { title: '金额', key: 'balance', sortable: false},
|
|
|
|
+ { title: '账户余额', key: 'totalBalance', sortable: false },
|
|
|
|
+ { title: '发生时间', key: 'createTime', value: item => timesTampChange(item.createTime), sortable: false },
|
|
|
|
+]
|
|
|
|
+
|
|
// 积分、签到明细
|
|
// 积分、签到明细
|
|
const getData = async () => {
|
|
const getData = async () => {
|
|
const res = props.type ? await getEnterpriseAccountRecordPage(query.value) : await getUserRewardPointPage(query.value)
|
|
const res = props.type ? await getEnterpriseAccountRecordPage(query.value) : await getUserRewardPointPage(query.value)
|