chore: 从 git 中移除 backend/target 目录
- 使用 git rm --cached 从版本控制中删除 target 目录 - .gitignore 已配置忽略 target 和 node_modules - 本地文件保留,仅从 git 索引中删除 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
934b8aad40
commit
ea8f8390da
99 files changed
+3551
-724
No files matched your search
@@ -3,7 +3,12 @@
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>报备管理</span>
|
||||
<div>
|
||||
<span>报备管理</span>
|
||||
<el-tag type="info" size="small" style="margin-left: 10px">
|
||||
保护期:{{ protectDays }} 天
|
||||
</el-tag>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleAdd" v-if="!userStore.isAdmin">
|
||||
<el-icon><Plus /></el-icon>
|
||||
提交报备
|
||||
@@ -49,7 +54,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="protectEndDate" label="保护期截止" width="180">
|
||||
<template #default="{ row }">
|
||||
{{ row.protectEndDate || '-' }}
|
||||
{{ formatDate(row.protectEndDate) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createdAt" label="创建时间" width="180" />
|
||||
@@ -83,6 +88,8 @@
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@size-change="fetchData"
|
||||
@current-change="fetchData"
|
||||
style="margin-top: 20px; justify-content: flex-end"
|
||||
@@ -157,10 +164,13 @@ import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'elem
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { getReportPage, createReport, auditReport, withdrawReport } from '@/api/report'
|
||||
import { searchCustomerByName } from '@/api/customer'
|
||||
import { getConfigValue } from '@/api/system'
|
||||
import type { Report, ReportForm } from '@/types'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const protectDays = ref<number>(90)
|
||||
|
||||
const loading = ref(false)
|
||||
const tableData = ref<Report[]>([])
|
||||
const total = ref(0)
|
||||
@@ -193,6 +203,12 @@ const rules: FormRules = {
|
||||
customerId: [{ required: true, message: '请选择客户', trigger: 'change' }]
|
||||
}
|
||||
|
||||
// 格式化日期,去掉时分秒
|
||||
const formatDate = (dateStr: string | null | undefined) => {
|
||||
if (!dateStr) return '-'
|
||||
return dateStr.split(' ')[0] // 只保留日期部分,去掉时间
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
const fetchData = async () => {
|
||||
loading.value = true
|
||||
@@ -251,7 +267,7 @@ const handleView = (row: Report) => {
|
||||
<p><strong>报备说明:</strong>${row.description || '-'}</p>
|
||||
<p><strong>状态:</strong>${row.statusDesc}</p>
|
||||
<p><strong>驳回原因:</strong>${row.rejectReason || '-'}</p>
|
||||
<p><strong>保护期:</strong>${row.protectStartDate || '-'} ~ ${row.protectEndDate || '-'}</p>
|
||||
<p><strong>保护期:</strong>${formatDate(row.protectStartDate)} ~ ${formatDate(row.protectEndDate)}</p>
|
||||
</div>
|
||||
`,
|
||||
'报备详情',
|
||||
@@ -273,7 +289,15 @@ const handleAudit = (row: Report) => {
|
||||
// 撤回按钮
|
||||
const handleWithdraw = async (row: Report) => {
|
||||
try {
|
||||
await ElMessageBox.confirm('确定要撤回该报备吗?', '提示', { type: 'warning' })
|
||||
await ElMessageBox.confirm(
|
||||
'确定要撤回该报备吗?',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
await withdrawReport(row.id)
|
||||
ElMessage.success('撤回成功')
|
||||
fetchData()
|
||||
@@ -326,7 +350,18 @@ const handleDialogClose = () => {
|
||||
customerOptions.value = []
|
||||
}
|
||||
|
||||
// 获取保护期配置
|
||||
const fetchProtectDays = async () => {
|
||||
try {
|
||||
const res = await getConfigValue('report.protect.days')
|
||||
protectDays.value = parseInt(res) || 90
|
||||
} catch (error) {
|
||||
console.error('获取配置失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchProtectDays()
|
||||
fetchData()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user