diff --git a/frontend/src/api/function/index.ts b/frontend/src/api/function/index.ts index 4cd5244..221aec3 100644 --- a/frontend/src/api/function/index.ts +++ b/frontend/src/api/function/index.ts @@ -3,24 +3,32 @@ import { ADMIN as rePrefix } from "@/api/config/serviceName"; import type { Function } from "@/api/function/interface"; -//获取菜单列表 -export const getFunctionList = (params: Function.ReqFunctionParams) => { - return http.post(`/function/list`, params); - }; - + +// 获取资源 +export const getFunctionList = () => { + return http.get(`/sysFunction/functionTree`) +} + + +// 获取资源不包括按钮 +export const getFunctionListNoButton = () => { + return http.get(`/sysFunction/functionTreeNoButton`) +} + + //添加菜单列表 export const addFunction = (params: Function.ResFunction) => { - return http.post(`/function/add`,params); + return http.post(`/sysFunction/add`,params); }; //删除菜单列表 - export const deleteFunction = (params: { id: string[] }) => { - return http.post(`/function/delete`, { data: params }); + export const deleteFunction = (params: Function.ResFunction) => { + return http.post(`/sysFunction/delete?id=${params.id}`); }; //编辑菜单列表 export const updateFunction = (params: Function.ResFunction) => { - return http.put(`/function/update`, params); + return http.put(`/sysFunction/update`, params); }; diff --git a/frontend/src/assets/icons/loading.svg b/frontend/src/assets/icons/loading.svg new file mode 100644 index 0000000..dad317f --- /dev/null +++ b/frontend/src/assets/icons/loading.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/components/Dialog/index.vue b/frontend/src/components/Dialog/index.vue index 46727d4..4ad927c 100644 --- a/frontend/src/components/Dialog/index.vue +++ b/frontend/src/components/Dialog/index.vue @@ -27,14 +27,13 @@ const dialogVisible = ref(false); const dialogTitle = ref(""); const openDialog = (title: string) => { dialogTitle.value = title; - console.log(dialogVisible.value); dialogVisible.value = true; }; defineExpose({ openDialog, }); onMounted(() => { - console.log(); + }); diff --git a/frontend/src/components/Grid/index.vue b/frontend/src/components/Grid/index.vue index 8749374..2b17ad9 100644 --- a/frontend/src/components/Grid/index.vue +++ b/frontend/src/components/Grid/index.vue @@ -112,7 +112,7 @@ const findIndex = () => { }, 0) if (!find) hiddenIndex.value = -1 } catch (e) { - // console.warn(e); + } } diff --git a/frontend/src/components/IpAddress/index.vue b/frontend/src/components/IpAddress/index.vue index d2ecf7c..340c20f 100644 --- a/frontend/src/components/IpAddress/index.vue +++ b/frontend/src/components/IpAddress/index.vue @@ -55,7 +55,7 @@ }) // 证明在开始阶段 if (input.selectionStart == 0) { - //console.log('鼠标设置了,', index) + markFlag.value[index].left = true } else { markFlag.value[index].left = false @@ -111,7 +111,7 @@ // 检查ip输入 const checkIpVal = (item: any) => { let val = item.value; - //console.log(val, '===========') + // 处理非数字 val = val.toString().replace(/[^0-9]/g, ""); val = parseInt(val, 10); @@ -130,7 +130,7 @@ } } item.value = val; - //console.log(item.value, '=========') + } // 判断光标左右移动位置 @@ -147,7 +147,7 @@ markFlag.value[index].left = false markFlag.value[index].right = false } else { - console.log('左键设置了,', index) + markFlag.value[index].left = true } } else { @@ -170,19 +170,19 @@ markFlag.value[index].right = false } } else if (e.keyCode === 8) { - //console.log('删除键把当前数据删除完毕后会跳转到前一个input') + // 删除键把当前数据删除完毕后会跳转到前一个input,左一不做任何处理 if (index !== 0 && e.currentTarget.selectionStart === 0) { if (markFlag.value[index].left) { ipInputRefs.value[index - 1].focus(); markFlag.value[index].left = false } else { - //console.log('左键设置了删除,', index) + markFlag.value[index].left = true } } } else if (e.keyCode === 13 || e.keyCode === 32) { - //console.log('回车键、空格键、冒号均向右跳转,右一不做任何措施') + // 回车键、空格键、冒号均向右跳转,右一不做任何措施 if (index !== 3) { ipInputRefs.value[index + 1].focus(); @@ -190,7 +190,7 @@ } else if (e.keyCode === 110 || e.keyCode === 190) { // 点 . 向右跳转,右一不做任何措施 - // console.log('点击') + if (item.value == '') { return } @@ -199,7 +199,7 @@ } } else if (item.value.toString().length === 3) { - //console.log('满3位,光标自动向下一个文本框') + // 满3位,光标自动向下一个文本框. if (index !== 3) { //ipInputRefs.value[index + 1].setSelectionRange(0, 0) @@ -221,7 +221,7 @@ } else { if (direction == 'toRight') { // 可以直接跳回 - //console.log('右键focus,', index) + markFlag.value[index].left = true // 设置光标为左边第一个 ipInputRefs.value[index].setSelectionRange(0, 0) @@ -252,7 +252,7 @@ // 监听数据变化,并初始化显示四个数据 watch(() => props.value, () => { - //console.log('变化了~', props.value); + if(flag.value){ }else{ @@ -317,7 +317,9 @@ height: 35px; padding-inline-start: 0px; padding-left: 10px; - padding-right: 10px; + padding-right: 20px; + padding-top: 0px; + padding-bottom: 0px;; box-sizing: border-box; margin: 0; } diff --git a/frontend/src/components/TimeControl/index.vue b/frontend/src/components/TimeControl/index.vue index 8ef90e9..1f27f4d 100644 --- a/frontend/src/components/TimeControl/index.vue +++ b/frontend/src/components/TimeControl/index.vue @@ -109,7 +109,7 @@ const timeUnits = ref( // 发出日期变化事件 const emitDateChange = () => { emit('update-dates', formatDate(startDate.value), formatDate(endDate.value)) - //console.log('emitDateChange', startDate.value, endDate.value) + } // 在组件挂载时更新日期范围 @@ -138,7 +138,7 @@ const updateDateRange = () => { } else if (timeUnit.value === '周') { startDate.value = getStartOfWeek(today.value) endDate.value = getEndOfWeek(today.value) - //console.log(endDate.value.toLocaleDateString()) + } else if (timeUnit.value === '月') { // 获取本月的开始和结束日期 startDate.value = new Date(today.value.getFullYear(), today.value.getMonth(), 1); @@ -167,7 +167,7 @@ const updateDateRange = () => { // // 确保结束日期不超过今天 // if (endDate.value > today.value) { - // console.log("1111") + // endDate.value = new Date(today.value); // endDate.value.setHours(23, 59, 59, 999); // 设置结束时间为今天的23:59:59.999 // } @@ -258,7 +258,7 @@ const nextPeriod = () => { updateNextButtonStatus() } const updateNextButtonStatus = () => { - //console.log(endDate.value) + // 更新下一个按钮的禁用状态 const maxDate = new Date() // 假设最新日期为今天 // 将 maxDate 设置为当天的开始时间 diff --git a/frontend/src/components/echarts/pie/default.vue b/frontend/src/components/echarts/pie/default.vue index 9c37185..f62c5f8 100644 --- a/frontend/src/components/echarts/pie/default.vue +++ b/frontend/src/components/echarts/pie/default.vue @@ -99,7 +99,7 @@ const init = () => { }, 0); }; const resizeCharts = () => { - console.log(77777); + if (chart.value) { chart.value.resize(); } diff --git a/frontend/src/directives/modules/copy.ts b/frontend/src/directives/modules/copy.ts index 47d86e2..d71310f 100644 --- a/frontend/src/directives/modules/copy.ts +++ b/frontend/src/directives/modules/copy.ts @@ -26,7 +26,7 @@ async function handleClick(this: any) { try { await navigator.clipboard.writeText(this.copyData); } catch (err) { - console.error("复制操作不被支持或失败: ", err); + } ElMessage({ type: "success", diff --git a/frontend/src/hooks/useDownload.ts b/frontend/src/hooks/useDownload.ts index 54c3700..3593d8b 100644 --- a/frontend/src/hooks/useDownload.ts +++ b/frontend/src/hooks/useDownload.ts @@ -39,6 +39,6 @@ export const useDownload = async ( document.body.removeChild(exportFile); window.URL.revokeObjectURL(blobUrl); } catch (error) { - console.log(error); + } }; diff --git a/frontend/src/hooks/useTable.ts b/frontend/src/hooks/useTable.ts index c64c5c8..9e6a497 100644 --- a/frontend/src/hooks/useTable.ts +++ b/frontend/src/hooks/useTable.ts @@ -55,7 +55,7 @@ export const useTable = ( }; }, set: (newVal: any) => { - console.log("我是分页更新之后的值", newVal); + }, }); diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 2770e5a..3d7aa48 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -93,7 +93,7 @@ export const resetRouter = () => { * */ router.onError(error => { NProgress.done() - console.warn('路由错误', error.message) + //console.warn('路由错误', error.message) }) /** diff --git a/frontend/src/views/authority/resource/components/resourcePopup.vue b/frontend/src/views/authority/resource/components/resourcePopup.vue index 26a6fd7..9f59556 100644 --- a/frontend/src/views/authority/resource/components/resourcePopup.vue +++ b/frontend/src/views/authority/resource/components/resourcePopup.vue @@ -1,6 +1,6 @@