TracSeek is a vehicle monitoring frontend built with Vue 3 + Vite + Element Plus. It is designed for JT/T 808 scenarios, including real-time positioning, track playback, device management,rule management, statistical reports, system management, and multilingual support.
git clone https://github.com/lingxcom/tracseek.git
cd tracseek
git clone https://github.com/lingxcom/tracseek-web.gitdocker compose up -dhttp://localhost:8800
Account:admin
Password:123456- Vue 3 (Composition API)
- Vite 5
- Vue Router 4
- Element Plus
- vue-i18n
- Axios
- Maptalks
- ECharts
- Router entry:
src/router/index.js - Main layout page:
/main, with child routes for business pages - Auth logic: global
beforeEachguard checkssessionStorage.isLogin === "true" - Unauthenticated access to protected routes redirects to
/login
Config file: public/static/js/config.js
- Injected into
windowat runtime:window.apiUrlwindow.wsUrlwindow.uploadUrl
- In local development (
localhost/127.0.0.1), local host addresses are auto-generated - When the host contains
5173, it defaults to127.0.0.1:8800(for frontend-backend local integration)
API wrapper: src/hooks/api.js
- Unified API call via
axios.post(window.apiUrl, JSON.stringify(params)) - Automatically injects:
lingxtoken(fromsessionStorage.token)language(current i18n locale)
code == 40001automatically redirects to logincode == 40002shows a no-permission message
Language entry: src/lang/index.js
- Multiple locales are built in (such as
zh-CN,en-US,ja-JP,ko-KR, etc.) - Locale switch options are managed by
LOCALE_OPTIONS - Element Plus locale packs are mapped by current language in
src/App.vue
When adding new copy, follow these rules:
- Do not hardcode display text in pages; always use
t('...') - Add the same key to all
src/lang/*/index.jslocale files - Key naming is recommended to be module-based, for example:
el.main.*el.report.*el.jt808.*
src/
main.js # App entry
App.vue # Global shell + Element Plus locale
router/
index.js # Routes and guards
lang/
index.js # i18n registration
*/index.js # Locale entries
hooks/
api.js # Unified API calls
lingx.js # Utility function collection
views/
Login.vue
Main.vue
Home.vue
jt808/ # Positioning, tracks, messages, etc.
report/ # Statistical reports
lingx/ # System capability pages
public/
static/js/config.js # Runtime api/ws/upload endpoint config
vite.config.js defines output naming rules:
- JS:
js/[hash].js - Assets:
[ext]/[hash].[ext]
This is helpful for static asset caching and deployment.
Check these first:
window.apiUrl/window.wsUrlgenerated bypublic/static/js/config.js- Actual request URL, status code, and certificate errors in browser Console and Network tabs
- Whether backend service ports are reachable (common in local integration: port 8800 not started)
Check whether sessionStorage.isLogin is correctly written as "true" and whether the token has expired.
- Before committing, at minimum verify: login, main menu, one JT808 page, and one report page
- Reuse the existing
lingxcomponent system when adding pages to avoid duplicate implementations - If copy text changes, sync all language files to avoid missing keys at runtime