提交 docker 部署
This commit is contained in:
1 parent
e706c48d23
commit
4eefc9fca6
16 files changed
+3023
-117
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import { http } from '@/utils/request'
|
||||
|
||||
export interface DashboardStatistics {
|
||||
customerCount: number
|
||||
@@ -11,8 +11,5 @@ export interface DashboardStatistics {
|
||||
* 获取首页统计数据
|
||||
*/
|
||||
export function getStatistics() {
|
||||
return request<DashboardStatistics>({
|
||||
url: '/dashboard/statistics',
|
||||
method: 'get'
|
||||
})
|
||||
return http.get<DashboardStatistics>('/dashboard/statistics')
|
||||
}
|
||||
@@ -1,44 +1,30 @@
|
||||
import request from '@/utils/request'
|
||||
import { http } from '@/utils/request'
|
||||
import type { SystemConfig } from '@/types'
|
||||
|
||||
/**
|
||||
* 获取所有系统配置(管理员)
|
||||
*/
|
||||
export function getAllConfigs() {
|
||||
return request<SystemConfig[]>({
|
||||
url: '/system/config',
|
||||
method: 'get'
|
||||
})
|
||||
return http.get<SystemConfig[]>('/system/config')
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定配置值
|
||||
*/
|
||||
export function getConfigValue(configKey: string) {
|
||||
return request<string>({
|
||||
url: `/system/config/value/${configKey}`,
|
||||
method: 'get'
|
||||
})
|
||||
return http.get<string>(`/system/config/value/${configKey}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
*/
|
||||
export function updateConfig(configKey: string, configValue: string) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'put',
|
||||
data: { configKey, configValue }
|
||||
})
|
||||
return http.put('/system/config', { configKey, configValue })
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新配置
|
||||
*/
|
||||
export function batchUpdateConfigs(configs: Record<string, string>) {
|
||||
return request({
|
||||
url: '/system/config/batch',
|
||||
method: 'put',
|
||||
data: configs
|
||||
})
|
||||
return http.put('/system/config/batch', configs)
|
||||
}
|
||||
@@ -54,7 +54,7 @@ const router = createRouter({
|
||||
})
|
||||
|
||||
// 路由守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
router.beforeEach((to, _from, next) => {
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 设置页面标题
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from 'vue'
|
||||
import { login as loginApi, getUserInfo, logout as logoutApi } from '@/api/auth'
|
||||
import { login as loginApi, getUserInfo } from '@/api/auth'
|
||||
import type { LoginRequest, User } from '@/types'
|
||||
|
||||
export const useUserStore = defineStore(
|
||||
|
||||
@@ -168,7 +168,6 @@ const dialogVisible = ref(false)
|
||||
const dialogTitle = computed(() => (formData.id ? '编辑客户' : '新增客户'))
|
||||
const formRef = ref<FormInstance>()
|
||||
const schoolSearchLoading = ref(false)
|
||||
const schoolOptions = ref<School[]>([])
|
||||
|
||||
const queryForm = reactive({
|
||||
current: 1,
|
||||
@@ -339,7 +338,7 @@ const handleDialogClose = () => {
|
||||
const fetchProtectDays = async () => {
|
||||
try {
|
||||
const res = await getConfigValue('report.protect.days')
|
||||
protectDays.value = parseInt(res) || 90
|
||||
protectDays.value = parseInt(res, 10) || 90
|
||||
} catch (error) {
|
||||
console.error('获取配置失败', error)
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ const rules: FormRules = {
|
||||
contactPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
||||
password: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
validator: (_rule, value, callback) => {
|
||||
// 密码可选,如果填写则校验长度
|
||||
if (value && (value.length < 6 || value.length > 20)) {
|
||||
callback(new Error('密码长度必须在6-20位之间'))
|
||||
@@ -210,7 +210,7 @@ const resetPasswordRules: FormRules = {
|
||||
confirmPassword: [
|
||||
{ required: true, message: '请再次输入新密码', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
validator: (_rule, value, callback) => {
|
||||
if (value !== resetPasswordForm.newPassword) {
|
||||
callback(new Error('两次输入的密码不一致'))
|
||||
} else {
|
||||
|
||||
@@ -144,7 +144,7 @@ const passwordRules: FormRules = {
|
||||
confirmPassword: [
|
||||
{ required: true, message: '请再次输入新密码', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
validator: (_rule, value, callback) => {
|
||||
if (value !== passwordForm.newPassword) {
|
||||
callback(new Error('两次输入的密码不一致'))
|
||||
} else {
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
<!-- 审核对话框 -->
|
||||
<el-dialog v-model="auditDialogVisible" title="审核报备" width="600px">
|
||||
<el-form ref="auditFormRef" :model="auditForm" label-width="100px">
|
||||
<el-form :model="auditForm" label-width="100px">
|
||||
<el-form-item label="审核结果">
|
||||
<el-radio-group v-model="auditForm.approved">
|
||||
<el-radio :label="true">通过</el-radio>
|
||||
@@ -178,7 +178,6 @@ const dialogVisible = ref(false)
|
||||
const auditDialogVisible = ref(false)
|
||||
const auditReportId = ref<number>()
|
||||
const formRef = ref<FormInstance>()
|
||||
const auditFormRef = ref<FormInstance>()
|
||||
const searchLoading = ref(false)
|
||||
const customerOptions = ref<Array<{ id: number; name: string }>>([])
|
||||
|
||||
|
||||
Reference in new issue
Block a user