完成基础信息页面开发

This commit is contained in:
2026-03-19 15:55:37 +08:00
parent 8d8a7db748
commit 71357f9621
1768 changed files with 217566 additions and 693615 deletions

View File

@@ -8,7 +8,6 @@
Vue 3 SPA with custom composables for data fetching. Element Plus for UI.
## Structure
```
cloud-ui/src/
├── api/ # API modules (one per entity)
@@ -24,16 +23,15 @@ cloud-ui/src/
## Key Hooks
| Hook | Purpose |
| ----------------------------------- | ---------------------------- |
| `useDict(type1, type2)` | Dictionary data with caching |
| `useTable({ pageList, queryForm })` | Table + pagination |
| `useMessage()` | Toast notifications |
| `useMessageBox()` | Confirm dialogs |
| `useParam(type)` | System parameters |
| Hook | Purpose |
|------|---------|
| `useDict(type1, type2)` | Dictionary data with caching |
| `useTable({ pageList, queryForm })` | Table + pagination |
| `useMessage()` | Toast notifications |
| `useMessageBox()` | Confirm dialogs |
| `useParam(type)` | System parameters |
## API Pattern
```typescript
import request from '/@/utils/request';
@@ -45,7 +43,6 @@ export const delObj = (id) => request.post('/module/entity/delete', id);
```
## Hooks Usage
```typescript
// Dictionary
const { dict } = useDict('sex', 'status');
@@ -53,8 +50,8 @@ const { dict } = useDict('sex', 'status');
// Table
const { tableData, loading, getData, pagination } = useTable({
pageList: fetchList,
queryForm: reactive({ name: '' }),
pageList: fetchList,
queryForm: reactive({ name: '' })
});
// Message
@@ -68,17 +65,16 @@ await msgBoxConfirm('确定删除?');
## Constraints
| Rule | Details |
| --------------- | --------------------------------------------- |
| **Hardcoding** | NO hardcoded strings. Define constants first. |
| **Line width** | 150 chars (Prettier) |
| **Indentation** | Tabs (Prettier) |
| **Quotes** | Single quotes |
| **API updates** | POST /edit (NOT PUT) |
| **API deletes** | POST /delete (NOT DELETE) |
| Rule | Details |
|------|---------|
| **Hardcoding** | NO hardcoded strings. Define constants first. |
| **Line width** | 150 chars (Prettier) |
| **Indentation** | Tabs (Prettier) |
| **Quotes** | Single quotes |
| **API updates** | POST /edit (NOT PUT) |
| **API deletes** | POST /delete (NOT DELETE) |
## Commands
```bash
npm run dev # Development server
npm run build # Production build
@@ -88,18 +84,17 @@ npm run prettier # Format code
## Non-Standard
| Location | Issue |
| ------------------------------------ | ----------------------------- |
| `src/composables/` + `src/hooks/` | Both exist (prefer hooks/) |
| `src/directive/` + `src/directives/` | Both exist |
| `src/const/` | Named "const" not "constants" |
| Location | Issue |
|----------|-------|
| `src/composables/` + `src/hooks/` | Both exist (prefer hooks/) |
| `src/directive/` + `src/directives/` | Both exist |
| `src/const/` | Named "const" not "constants" |
## ESLint Relaxed Rules
Many TypeScript rules are OFF:
- `@typescript-eslint/no-explicit-any`: OFF
- `@typescript-eslint/explicit-function-return-type`: OFF
- `vue/require-default-prop`: OFF
Follow existing patterns in codebase.
Follow existing patterns in codebase.