# mold_web **Repository Path**: hello101105/mold_web ## Basic Information - **Project Name**: mold_web - **Description**: 模具管理系统前端 - **Primary Language**: NodeJS - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-25 - **Last Updated**: 2026-10-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mold_web — PC Front-end of the Mold Management System PC management console of the LiZhong Mold Management System, built with Vue 3 + Vite + TypeScript + Element Plus on top of the Songzhi front-end framework. ## Tech Stack | Category | Technology | |----------|------------| | Core | Vue 3.4 / TypeScript / Vite 5.3 | | UI | Element Plus 2.7 (auto-imported via unplugin-vue-components) | | State / routing | Pinia 2 / Vue Router 4 | | i18n | vue-i18n 9 (zh-CN / en-US / es-ES / th-TH, 689 keys × 4 languages for mold pages) | | Charts | ECharts 5 | | Process design | bpmn-js (approval flow visualization) | | Others | axios, tinymce, wangeditor, monaco-editor | ## Business Pages (src/views/mold, 22 pages) - **Master data**: mold ledger, machines, factories/locations, spare-part catalog, user-factory authorization - **Maintenance**: repair work orders (report → dispatch → part replacement → labor hours → acceptance), PM tasks, inspections, molding trials - **Bills**: IO bills, transfer bills (approval flow), check tasks (freeze / variance / adjustment), scrap - **New mold**: progress, validation, open plans (approval flow) - **Spare parts**: stock query, IO, safety-stock alerts - **Alerts**: lifespan, stagnant mold, spare safety stock - **Analysis & dashboard**: availability, MTBF, lifespan progress, molding-trial pass rate, capacity - **Knowledge base**: cases linked to work orders - System management reuses framework features (user/role/menu/dict/param/notice/log) ## Requirements - Node.js 16+ (18 recommended) - A running backend (see `../mold_server/README.md`) ## Quick Start ```bash # 1. Install dependencies npm install # 2. Point to the backend (.env.development) # VITE_APP_API=http://localhost:8080/songzhi-admin # VITE_APP_SOCKET=ws://localhost:8080/songzhi-admin/websocket # 3. Start the dev server npm run dev # 4. Production build (includes vue-tsc type check) npm run build ``` ## Scripts | Command | Description | |---------|-------------| | `npm run dev` | Start dev server | | `npm run build` | Production build (`vue-tsc --noEmit` first) | | `npm run serve` | Build and preview locally | | `npm run lint` | ESLint check & fix for `src/**/*.{vue,ts}` | > **Type-check note**: this project uses TypeScript 4.6.3. If `npx vue-tsc` hits compatibility issues, invoke it directly via `./node_modules/.bin/vue-tsc --noEmit`. ## i18n & Factory Isolation - **Supported languages**: Simplified Chinese (zh-CN), English (en-US), Spanish (es-ES), Thai (th-TH); the language dropdown lists all registered locales automatically - **Language pack layout**: - Framework level: `src/i18n/lang/{locale}.ts` (theme/login/router etc., 72 keys) - Common pages: `src/i18n/page/{locale}.ts` (498 keys) - Business pages: `src/i18n/page/mold/{locale}.ts` (689 keys) - `page/**` is auto-scanned via `import.meta.glob`; the file name is the locale code - **Adding a new language (3 steps)**: ① create `lang/xx-XX.ts` and `page/xx-XX.ts` (copy the English pack first, translate progressively); ② register one line in `LANG_REGISTRY` of `i18n/index.ts` (display name + Element Plus locale); ③ missing keys fall back to the default locale (zh-CN) automatically — no other code changes needed - Factory switcher: after selecting a factory in the top bar, requests automatically carry the `X-Factory-Code` header, working with the backend factory isolation mechanism ## Related Docs - Prototypes & design notes: `../docs/` - Backend overview: `../mold_server/README.md`