diff --git a/.env.development b/.env.development index 09b500a..cf77dd5 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ -VITE_API_BASE_URL = "https://dcapi.homilychart.com/prod/deepchart" +VITE_API_BASE_URL = "https://dbqb.legu168.cn/adminApi" VITE_API_BASE_URL_LINK = "http://39.101.133.168:8828" \ No newline at end of file diff --git a/src/utils/myAxios.js b/src/utils/myAxios.js index 499164e..9b21b9b 100644 --- a/src/utils/myAxios.js +++ b/src/utils/myAxios.js @@ -46,8 +46,8 @@ myAxios.interceptors.response.use( router.push('/login') } // 错误提示(根据后端消息提示,或自定义) - ElMessage.error(res.message || '操作失败') - return Promise.reject(new Error(res.message || 'Error')) + ElMessage.error(res.msg || '操作失败') + return Promise.reject(new Error(res.msg || 'Error')) } else { // 只返回数据部分(过滤响应体中的其他字段) return res.data diff --git a/src/views/UserPermissions/LogDeepExplore.vue b/src/views/UserPermissions/LogDeepExplore.vue index 9ed799b..c4df678 100644 --- a/src/views/UserPermissions/LogDeepExplore.vue +++ b/src/views/UserPermissions/LogDeepExplore.vue @@ -15,7 +15,7 @@ class="table-rounded" :loading="tableLoading" > - + @@ -42,7 +42,7 @@ @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" - :page-sizes="[15, 20, 50, 100]" + :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="datatotal" @@ -77,7 +77,7 @@ const datatotal = ref(0); // 分页参数 const currentPage = ref(1); -const pageSize = ref(15); +const pageSize = ref(10); // 获取表格数据 const logTableData = async (dccode) => { @@ -172,6 +172,7 @@ const handleSortChange = (sort) => { border-radius: 12px !important; overflow: hidden !important; border: 1px solid #e4e7ed !important; + min-height: 800px; } .table-header { diff --git a/src/views/UserPermissions/LogDeepMate.vue b/src/views/UserPermissions/LogDeepMate.vue index 0ff938d..b10907b 100644 --- a/src/views/UserPermissions/LogDeepMate.vue +++ b/src/views/UserPermissions/LogDeepMate.vue @@ -15,7 +15,7 @@ class="table-rounded" :loading="tableLoading" > - + @@ -33,7 +33,7 @@ @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" - :page-sizes="[15, 20, 50, 100]" + :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="datatotal" @@ -74,7 +74,7 @@ const datatotal = ref(0); // 分页参数 const currentPage = ref(1); -const pageSize = ref(15); +const pageSize = ref(10); // 获取表格数据 const logTableData = async (dccode) => { @@ -158,6 +158,7 @@ const handleSortChange = (sort) => { border-radius: 12px !important; overflow: hidden !important; border: 1px solid #e4e7ed !important; + min-height: 800px; } .table-header { diff --git a/src/views/UserPermissions/LogMarket.vue b/src/views/UserPermissions/LogMarket.vue index bb07ecd..2a3d021 100644 --- a/src/views/UserPermissions/LogMarket.vue +++ b/src/views/UserPermissions/LogMarket.vue @@ -15,7 +15,7 @@ class="table-rounded" :loading="tableLoading" > - + @@ -42,7 +42,7 @@ @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" - :page-sizes="[15, 20, 50, 100]" + :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="datatotal" @@ -77,7 +77,7 @@ const datatotal = ref(0); // 分页参数 const currentPage = ref(1); -const pageSize = ref(15); +const pageSize = ref(10); // 获取表格数据 const logTableData = async (dccode) => { @@ -171,6 +171,7 @@ const handleSortChange = (sort) => { border-radius: 12px !important; overflow: hidden !important; border: 1px solid #e4e7ed !important; + min-height: 800px; } .table-header { diff --git a/src/views/UserPermissions/Market.vue b/src/views/UserPermissions/Market.vue index 662527d..72ce497 100644 --- a/src/views/UserPermissions/Market.vue +++ b/src/views/UserPermissions/Market.vue @@ -68,7 +68,7 @@ class="table-rounded" :loading="tableLoading" > - + @@ -95,7 +95,7 @@ @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" - :page-sizes="[15, 20, 50, 100]" + :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total= "datatotal" @@ -211,7 +211,7 @@ const datatotal = ref(0) // 分页参数 const currentPage = ref(1); -const pageSize = ref(15); +const pageSize = ref(10); // 地区下拉框 const regionList = ref([]); @@ -323,10 +323,18 @@ const checkRemark = () => { return true; }; +// 防抖 +const Noshake = ref(false) + // 提交表单 const submitForm = async () => { + // 防抖 + if (Noshake.value) return; + Noshake.value = true; + // 表单校验 if (!checkHlids() || !checkTime() || !checkRemark()) { + Noshake.value = false; return; } @@ -366,6 +374,8 @@ const submitForm = async () => { fetchTableData(); } catch (error) { ElMessage.error('添加权限失败,请重试'); + } finally { + Noshake.value = false; } }; @@ -482,7 +492,7 @@ const resetBn = () => { sortProp.value = null; sortOrder.value = null; currentPage.value = 1; - pageSize.value = 15; + pageSize.value = 10; fetchTableData(); }; @@ -519,7 +529,7 @@ const handleSortChange = (sort) => { const { prop, order } = sort; // 仅允许注册时间和到期时间排序 - if (!['created_at', 'expire_time'].includes(prop)) return; + if (!['regtime', 'expire_time'].includes(prop)) return; // 覆盖排序状态(实现二选一) sortProp.value = prop; // 保存当前排序字段 @@ -576,6 +586,7 @@ const handleSortChange = (sort) => { text-align: left; color: #333; margin-top: 13px; + font-family: "SimHei", "Heiti SC", "Microsoft YaHei", sans-serif !important; } /* 按钮组 */ @@ -598,6 +609,7 @@ const handleSortChange = (sort) => { border-radius: 12px !important; overflow: hidden !important; border: 1px solid #e4e7ed !important; + min-height: 750px; } .table-header { diff --git a/src/views/UserPermissions/Module.vue b/src/views/UserPermissions/Module.vue index f286d79..b0bc3d9 100644 --- a/src/views/UserPermissions/Module.vue +++ b/src/views/UserPermissions/Module.vue @@ -90,7 +90,7 @@ class="table-rounded" :loading="tableLoadingDM" > - + @@ -276,10 +276,10 @@ header-cell-class-name="table-header" @sort-change="handleSortChangeDE" :default-sort="{ prop: null, order: null }" - class="table-rounded" + class="table-roundedDE" :loading="tableLoadingDE" > - + @@ -707,10 +707,18 @@ const checkTokenNum = () => { return true; }; +// 防抖 +const NoshakeDM = ref(false) + // DeepMate提交表单 const submitFormDM = async () => { + // 防抖 + if (NoshakeDM.value) return; + NoshakeDM.value = true; + // 表单校验 if (!checkHlids() || !checkTokenNum()) { + NoshakeDM.value = false; return; } @@ -740,6 +748,8 @@ const submitFormDM = async () => { DMTableData(); } catch (error) { ElMessage.error('添加权限失败,请重试'); + } finally { + NoshakeDM.value = false; } }; @@ -1037,10 +1047,18 @@ const checkRemark = () => { return true; }; +// 防抖 +const NoshakeDE = ref(false) + // 提交表单 const submitFormDE = async () => { + // 防抖 + if (NoshakeDE.value) return; + NoshakeDE.value = true; + // 表单校验 if (!checkHlidsDE() || !checkmodel() || !checkTime() || !checkRemark()) { + NoshakeDE.value = false; return; } @@ -1081,6 +1099,8 @@ const submitFormDE = async () => { DETableData(); } catch (error) { ElMessage.error('添加权限失败,请重试'); + } finally { + NoshakeDE.value = false; } }; @@ -1172,6 +1192,7 @@ const openDetail = async(dccode) => { text-align: left; color: #333; margin-top: 13px; + font-family: "SimHei", "Heiti SC", "Microsoft YaHei", sans-serif !important; } /* 按钮组 */ @@ -1194,6 +1215,14 @@ const openDetail = async(dccode) => { border-radius: 12px !important; overflow: hidden !important; border: 1px solid #e4e7ed !important; + min-height: 700px; +} + +.table-roundedDE { + border-radius: 12px !important; + overflow: hidden !important; + border: 1px solid #e4e7ed !important; + min-height: 650px; } .table-header { @@ -1379,7 +1408,8 @@ const openDetail = async(dccode) => { font-size: 15px; text-align: left; color: #333; - margin-top: 0; + margin-top: 0; + font-family: "SimHei", "Heiti SC", "Microsoft YaHei", sans-serif !important; } /* 按钮组(深度探索) */