diff --git a/.env.development b/.env.development index 4bb7cf9..536731e 100644 --- a/.env.development +++ b/.env.development @@ -5,4 +5,4 @@ VITE_APP_TITLE = 代理管理系统 VITE_APP_ENV = 'development' # 代理管理系统/开发环境 -VITE_APP_BASE_API = '/ff-api' +VITE_APP_BASE_API = '/dev-api' diff --git a/dist.rar b/dist.rar new file mode 100644 index 0000000..1e24af7 Binary files /dev/null and b/dist.rar differ diff --git a/src/components/TenantSelect/index.vue b/src/components/TenantSelect/index.vue new file mode 100644 index 0000000..6e2a06f --- /dev/null +++ b/src/components/TenantSelect/index.vue @@ -0,0 +1,114 @@ + + + + + + + + + + {{ loadingMore ? "加载中..." : "加载更多" }} + + + + + + + + \ No newline at end of file diff --git a/src/views/agent/index.vue b/src/views/agent/index.vue index f22ba7c..61ba5b0 100644 --- a/src/views/agent/index.vue +++ b/src/views/agent/index.vue @@ -333,6 +333,7 @@ function submitForm() { tenantType: form.value.tenantType, timeZone: form.value.timeZone, scoreRatio: form.value.scoreRatio, + googleCode: form.value.googleCode, } createAgent(dataObj).then(response => { loadingButton.value = false; diff --git a/src/views/betting/gameRecords/index.vue b/src/views/betting/gameRecords/index.vue index 8f6671f..43986a5 100644 --- a/src/views/betting/gameRecords/index.vue +++ b/src/views/betting/gameRecords/index.vue @@ -3,15 +3,7 @@ - - - + - + { + showLodings.value = true; + }) dateRange.value = []; operateTimeType.value = "day"; searchDateRef.value.timeTypeChange(operateTimeType.value) diff --git a/src/views/cashFlowAudit/merchantFlow/index.vue b/src/views/cashFlowAudit/merchantFlow/index.vue index d7c2c88..f94e781 100644 --- a/src/views/cashFlowAudit/merchantFlow/index.vue +++ b/src/views/cashFlowAudit/merchantFlow/index.vue @@ -3,7 +3,41 @@ - + + + + + + + + + + {{ loadingMore ? "加载中..." : "加载更多" }} + + + + @@ -116,6 +150,8 @@ import DictText from '@/components/DictText' import SelectInputForm from '@/components/SelectInputForm'; import Crontab from '@/components/Crontab' + import auth from '@/plugins/auth'; + import { superTenantList } from "@/api/super/tenant"; import { parseTime } from '@/utils/ruoyi'; // 时间格式化 const router = useRouter(); const { proxy } = getCurrentInstance(); @@ -139,6 +175,49 @@ }]) const { queryParams, form, rules } = toRefs(data); const dateRange = ref([]),operateTimeType = ref("day"); + + const agentListSelect = ref([]) + + +const loadingSelect = ref(false) + +const loadingMore = ref(false) + +const hasMore = ref(true) + +const queryParamSelect = ref({ + pageNum: 1, + pageSize: 10, + tenantKey: "" +}) + +// 加载第一页(搜索) +const loadOptions = async (query) => { + queryParamSelect.value.pageNum = 1 + queryParamSelect.value.tenantKey = query + loadingSelect.value = true + try { + const res = await superTenantList(queryParamSelect.value) + agentListSelect.value = res.rows || [] + hasMore.value = agentListSelect.value.length < (res.total || 0) + } finally { + loadingSelect.value = false + } +} + +// 加载更多(分页) +const loadMore = async () => { + if (!hasMore.value) return + queryParamSelect.value.pageNum++ + loadingMore.value = true + try { + const res = await superTenantList(queryParamSelect.value) + agentListSelect.value = [...agentListSelect.value, ...(res.rows || [])] + hasMore.value = agentListSelect.value.length < (res.total || 0) + } finally { + loadingMore.value = false + } +} /** 查询列表 */ function getList() { loading.value = true; @@ -174,6 +253,9 @@ onMounted(() => { getList(); getSuperCommonOperationTypes(); + if (auth.hasPermi('super:tenant:list') == true){ + loadOptions(''); + } }); diff --git a/src/views/fedback/index.vue b/src/views/fedback/index.vue index 63045b3..aa85614 100644 --- a/src/views/fedback/index.vue +++ b/src/views/fedback/index.vue @@ -123,7 +123,10 @@ const data = reactive({ ], content:[ { required: true, message: "请输入内容", trigger: "change" }, - ] + ], + replyContent:[ + { required: true, message: "请输入回复内容", trigger: "change" }, + ], } }); @@ -217,8 +220,9 @@ function submitForm1() { form.value.replyContent = ''; getList(); + }).catch(() => { + loadingButton.value = false; }); - } }); } diff --git a/src/views/finance/prepaymentRecord/index.vue b/src/views/finance/prepaymentRecord/index.vue index db18548..85b7a41 100644 --- a/src/views/finance/prepaymentRecord/index.vue +++ b/src/views/finance/prepaymentRecord/index.vue @@ -3,15 +3,7 @@ - - - + @@ -219,6 +211,7 @@ import CustomSelect from '@/components/CustomSelect' import TableSearchDate from '@/components/TableSearchDate' import Crontab from '@/components/Crontab' + import TenantSelect from '@/components/TenantSelect'; import { parseTime } from '@/utils/ruoyi'; // 时间格式化 import { nextTick, onMounted } from "vue"; const router = useRouter(); diff --git a/src/views/member/member/index.vue b/src/views/member/member/index.vue index 06e67d0..20534d6 100644 --- a/src/views/member/member/index.vue +++ b/src/views/member/member/index.vue @@ -3,15 +3,7 @@ - - - + - - + - + reserve-keyword + placeholder="请输入商户账号搜索" + :remote-method="loadOptions" + :loading="loadingSelect" + style="width: 240px" + > + + + + + + + {{ loadingMore ? "加载中..." : "加载更多" }} + + + + @@ -235,7 +260,8 @@ import CustomSelect from '@/components/CustomSelect' import CopyIcon from '@/components/CopyIcon' import NumberInput from '@/components/NumberInput'; - import Crontab from '@/components/Crontab' + import Crontab from '@/components/Crontab'; + import auth from '@/plugins/auth'; import { Search } from '@element-plus/icons-vue' import { parseTime } from '@/utils/ruoyi'; // 时间格式化 import { get } from "@vueuse/core"; @@ -294,8 +320,51 @@ currencySelectArr.value = res.map(item => { pwd: "", }); const openReset = ref(false); + const agentListSelect = ref([]) + + +const loadingSelect = ref(false) + +const loadingMore = ref(false) + +const hasMore = ref(true) + +const queryParamSelect = ref({ + pageNum: 1, + pageSize: 10, + tenantKey: "" +}) + +// 加载第一页(搜索) +const loadOptions = async (query) => { + queryParamSelect.value.pageNum = 1 + queryParamSelect.value.tenantKey = query + loadingSelect.value = true + try { + const res = await superTenantList(queryParamSelect.value) + agentListSelect.value = res.rows || [] + hasMore.value = agentListSelect.value.length < (res.total || 0) + } finally { + loadingSelect.value = false + } +} + +// 加载更多(分页) +const loadMore = async () => { + if (!hasMore.value) return + queryParamSelect.value.pageNum++ + loadingMore.value = true + try { + const res = await superTenantList(queryParamSelect.value) + agentListSelect.value = [...agentListSelect.value, ...(res.rows || [])] + hasMore.value = agentListSelect.value.length < (res.total || 0) + } finally { + loadingMore.value = false + } +} /** 查询列表 */ function getList() { + console.log('getList') loading.value = true; let query={ pageNum: 1, @@ -718,15 +787,15 @@ const searchPlatformCode = ref(''); const searchCurrencyCode = ref(''); // 搜索平台 const searchSystemPlatforms = (platformCode) => { - const keyword = platformCode?.trim(); + const keyword = platformCode?.trim().toLowerCase(); // 转小写 if (!keyword) { form.value.tenantSystemPlatforms = PlatformRatioAll.value; return; } - // 找出所有 platformCode 中包含关键字的项 + // 找出所有 platformCode 中包含关键字的项(忽略大小写) const matchedCodes = PlatformRatioAll.value - .filter(item => item.platformCode?.includes(keyword)) + .filter(item => item.platformCode?.toLowerCase().includes(keyword)) .map(item => item.platformCode); // 如果有匹配,就取出所有属于这些 platformCode 的数据 @@ -771,8 +840,13 @@ function submitForm() { } }); } - - getList(); + onMounted(() => { + console.log('onMounted'); + getList(); + if (auth.hasPermi('super:tenant:list') == true){ + loadOptions(''); + } + })