|
@@ -7,7 +7,7 @@
|
|
|
:placeholder="t('Custom.PaymentHistory.StatusPlaceholder')" />
|
|
:placeholder="t('Custom.PaymentHistory.StatusPlaceholder')" />
|
|
|
</view>
|
|
</view>
|
|
|
<cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
|
|
<cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
|
|
|
- :queryParams="search" :api="listApi" @go-pages="goPages" :isPages="true">
|
|
|
|
|
|
|
+ :queryParams="search" :api="listApi" @go-pages="goPages" :isPages="true" :immediate="true">
|
|
|
<template #status="{ row }">
|
|
<template #status="{ row }">
|
|
|
<text class="status-tag" :class="getStatusColor(row.read)">{{readOptions.find(item => item.value === row.read)?.text}}</text>
|
|
<text class="status-tag" :class="getStatusColor(row.read)">{{readOptions.find(item => item.value === row.read)?.text}}</text>
|
|
|
</template>
|
|
</template>
|
|
@@ -21,7 +21,12 @@ import { computed, ref, watch } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
const { t, locale } = useI18n();
|
|
const { t, locale } = useI18n();
|
|
|
import { newsApi } from '@/service/news';
|
|
import { newsApi } from '@/service/news';
|
|
|
|
|
+import {
|
|
|
|
|
+ onShow,
|
|
|
|
|
+ onHide
|
|
|
|
|
+} from '@dcloudio/uni-app'
|
|
|
import useRouter from "@/hooks/useRouter";
|
|
import useRouter from "@/hooks/useRouter";
|
|
|
|
|
+
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const search = ref({
|
|
const search = ref({
|
|
|
read: null,
|
|
read: null,
|
|
@@ -41,6 +46,12 @@ watch(locale, () => {
|
|
|
watch(search, (newVal) => {
|
|
watch(search, (newVal) => {
|
|
|
tableRef.value?.reload()
|
|
tableRef.value?.reload()
|
|
|
}, { immediate: true, deep: true })
|
|
}, { immediate: true, deep: true })
|
|
|
|
|
+
|
|
|
|
|
+onShow(()=>{
|
|
|
|
|
+ // console.log('show')
|
|
|
|
|
+ // console.log(tableRef.value)
|
|
|
|
|
+ tableRef.value?.reload()
|
|
|
|
|
+})
|
|
|
// 表格列配置(支持插槽和格式化)
|
|
// 表格列配置(支持插槽和格式化)
|
|
|
const columns = computed(() => [
|
|
const columns = computed(() => [
|
|
|
{
|
|
{
|
|
@@ -104,6 +115,7 @@ const getStatusColor = (value) => {
|
|
|
return classMap[value] || ''
|
|
return classMap[value] || ''
|
|
|
}
|
|
}
|
|
|
const goPages = (e) => {
|
|
const goPages = (e) => {
|
|
|
|
|
+ // tableRef.value?.refreshTable()
|
|
|
router.push({
|
|
router.push({
|
|
|
path: '/pages/analytics/detail',
|
|
path: '/pages/analytics/detail',
|
|
|
query: {
|
|
query: {
|
|
@@ -111,7 +123,7 @@ const goPages = (e) => {
|
|
|
type: 7
|
|
type: 7
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- tableRef.value?.reload()
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
const listApi = ref(null)
|
|
const listApi = ref(null)
|
|
|
listApi.value = newsApi.newsNoticeList
|
|
listApi.value = newsApi.newsNoticeList
|