企迹(qiji) 政企周报管理系统 — v0.1

后端: FastAPI + SQLAlchemy 2.0 (async) + Alembic + MinIO + Casdoor + 企微
前端: Vue 3 + Vite + TypeScript + Element Plus + Pinia

功能清单:
- 8 张数据表自动建表 / Casdoor OIDC 登录 / 企微静默登录
- 双布局: 移动端(填报) + PC端(汇总管理)
- 拜访记录 CRUD + MinIO 照片直传 + 缩略图预览 + 同访人草稿
- 今日纪要 (6 分类) / 工作计划 / 小微商机 / 要客拜访 CRUD
- 客户档案: 备注/收支费用/联系人/归属分配/批量转移
- 客户导入导出 + 模板下载 + 搜索/分页/筛选
- 仪表盘: 四卡统计 + 填报进度 (拜访+纪要双维度)
- 周报详情: 五 Tab + 按人/客户筛选 + 时间轴
- 用户管理 / 客户经理 PC 端工作台
- 企微: 催办/公告/定时提醒 / 时区修正
- Docker 部署配置

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-23 01:35:46 +08:00
parent 2a8225c31f
commit a1886074dd
97 changed files with 8830 additions and 0 deletions
+106
View File
@@ -0,0 +1,106 @@
<script setup lang="ts">
import { ref, onMounted, computed } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
import { todayStr } from '@/utils'
import api from '@/api/index'
const router = useRouter()
const route = useRoute()
const isEdit = computed(() => !!route.params.id)
const submitLoading = ref(false)
const categories = ['行政事务', '合同整理', '发票处理', '内部会议', '培训学习', '其他']
const form = ref({
note_date: todayStr(),
category: '其他',
content: '',
time_range: '',
})
onMounted(async () => {
if (isEdit.value) {
try {
const res = await api.get(`/daily-notes/${route.params.id}`)
const n = res.data
form.value = {
note_date: n.note_date,
category: n.category,
content: n.content || '',
time_range: n.time_range || '',
}
} catch (_) {}
}
})
async function handleSubmit() {
if (!form.value.content.trim()) { ElMessage.warning('请输入纪要内容'); return }
submitLoading.value = true
try {
if (isEdit.value) {
await api.put(`/daily-notes/${route.params.id}`, form.value)
ElMessage.success('纪要已更新')
} else {
await api.post('/daily-notes/', form.value)
ElMessage.success('纪要已提交')
}
router.push('/m')
} catch (e: any) {
ElMessage.error('提交失败: ' + (e.response?.data?.detail || e.message))
} finally { submitLoading.value = false }
}
async function handleDelete() {
try {
await ElMessageBox.confirm('确定删除这条纪要?', '确认', { type: 'warning' })
await api.delete(`/daily-notes/${route.params.id}`)
ElMessage.success('已删除')
router.push('/m')
} catch (e: any) {
if (e !== 'cancel') ElMessage.error('删除失败')
}
}
</script>
<template>
<div class="form-page">
<div class="form-header">
<el-button text @click="router.back()"> 返回</el-button>
<h3>{{ isEdit ? '编辑纪要' : '今日纪要' }}</h3>
<span style="width:60px"></span>
</div>
<el-form label-position="top">
<el-form-item label="日期">
<el-date-picker v-model="form.note_date" type="date" style="width:100%" />
</el-form-item>
<el-form-item label="分类">
<div class="category-grid">
<el-button
v-for="c in categories" :key="c"
:type="form.category === c ? 'primary' : ''"
size="small"
@click="form.category = c"
>{{ c }}</el-button>
</div>
</el-form-item>
<el-form-item label="时间范围(可选)">
<el-input v-model="form.time_range" placeholder="如 9:00-11:00" />
</el-form-item>
<el-form-item label="工作内容" required>
<el-input v-model="form.content" type="textarea" :rows="5" placeholder="今天做了什么..." />
</el-form-item>
<div style="margin-top:24px; display:flex; gap:12px">
<el-button type="primary" size="large" :loading="submitLoading" @click="handleSubmit" style="flex:1">提交</el-button>
<el-button v-if="isEdit" type="danger" size="large" @click="handleDelete">删除</el-button>
</div>
</el-form>
</div>
</template>
<style scoped>
.form-page { max-width: 500px; margin: 0 auto; }
.form-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.form-header h3 { margin: 0; }
.category-grid { display: flex; flex-wrap: wrap; gap: 8px; }
</style>