|
|
|
@ -5,6 +5,7 @@ import request from '@/util/http' |
|
|
|
import {useAdminStore} from "@/store/index.js"; |
|
|
|
import {storeToRefs} from "pinia"; |
|
|
|
import {permissionMapping, hasMenuPermission} from "@/utils/menuTreePermission.js" |
|
|
|
|
|
|
|
const adminStore = useAdminStore() |
|
|
|
const {adminData, menuTree} = storeToRefs(adminStore) |
|
|
|
const regeEdit = ref(false) |
|
|
|
@ -181,6 +182,7 @@ const handleEditDialogClose = () => { |
|
|
|
getAllRate() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 日期格式化 |
|
|
|
function formatDate(value) { |
|
|
|
if (!value) return '' |
|
|
|
@ -193,6 +195,7 @@ function formatDate(value) { |
|
|
|
const seconds = date.getSeconds().toString().padStart(2, '0') |
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` |
|
|
|
} |
|
|
|
|
|
|
|
// 输入框过滤 |
|
|
|
function handleInput(value) { |
|
|
|
// 检查是否使用了中文句号 |
|
|
|
@ -220,10 +223,10 @@ function handleInput(value) { |
|
|
|
ElMessage.info('整数部分最多允许六位') |
|
|
|
} |
|
|
|
// 限制小数部分最多两位 |
|
|
|
if (parts[1].length > 2) { |
|
|
|
parts[1] = parts[1].slice(0, 2) |
|
|
|
if (parts[1].length > 7) { |
|
|
|
parts[1] = parts[1].slice(0, 7) |
|
|
|
value = parts[0] + '.' + parts[1] |
|
|
|
ElMessage.info('最多允许两位小数') |
|
|
|
ElMessage.info('最多允许七位小数') |
|
|
|
} else { |
|
|
|
value = parts[0] + '.' + parts[1] |
|
|
|
} |
|
|
|
@ -245,6 +248,7 @@ function handleInput(value) { |
|
|
|
|
|
|
|
return value |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(async function () { |
|
|
|
initPermissions() |
|
|
|
await getAllRate() |
|
|
|
@ -326,6 +330,7 @@ onMounted(async function () { |
|
|
|
.card1 { |
|
|
|
background: #F3FAFE; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.el-table__header-wrapper), |
|
|
|
:deep(.el-table__body-wrapper), |
|
|
|
:deep(.el-table__cell), |
|
|
|
|