# web
**Repository Path**: wsq_device/web
## Basic Information
- **Project Name**: web
- **Description**: web管理页面,前端展示用
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-09-09
- **Last Updated**: 2026-03-07
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## 项目介绍
[jcfk1.2](https://codeup.aliyun.com/632c06241017fdb58f60800d/ArchitectureGroup/xzjx-web.git) 是基于 Vue3 + Vite4+ TypeScript5 + Element-Plus + Pinia 等后台管理系统。
项目有以下特性:
- 基于 vue2 升级到 vue3 版本,无自定义封装,易上手,减少学习成本。
- 系统管理功能齐全,包括角色管理、用户管理、字典管理、组织结构等权限管理。
- 项目还提供了基础设施支持,质量管理,安全管理,能源管理,数据大屏等功能。
## 项目预览
- **在线预览**: [http://8.142.13.106:9081/#/login](http://8.142.13.106:9081/#/login)
- **接口文档**: [http://8.142.13.106:9081/system/swagger-ui.html#/](http://8.142.13.106:9081/system/swagger-ui.html#/)
## 环境准备
| 环境 | 名称版本 | 备注 |
| --------------------- | :----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **开发工具** | VSCode | [下载地址](https://code.visualstudio.com/Download) |
| **运行环境** | Node 16.19.0+ | [下载地址](http://nodejs.cn/download) |
| **VSCode 插件(必装)** | 1. `Vue Language Features (Volar) `
2. `TypeScript Vue Plugin (Volar) `
3. 禁用 Vetur |  |
## 项目启动
```bash
# 克隆代码
git clone https://codeup.aliyun.com/632c06241017fdb58f60800d/ArchitectureGroup/xzjx-web.git
# 切换目录
cd xzjx-web
# 安装 pnpm (Node 16.19.0+)
npm install pnpm -g
# 安装依赖
pnpm install
# 启动运行
pnpm run dev
```
## 项目部署
```bash
# 项目打包
pnpm run build:dev
pnpm run build:prod
阻止打包前检测代码规范删除 vue-tsc --noEmit 即可
# 上传文件至远程服务器
将打包生成在 `dist` 目录下的文件拷贝至 `/usr/share/nginx/html` 目录
# nginx.cofig 配置
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# 反向代理配置
location /prod-api/ {
proxy_pass http://aaaa.tech/; # aaaa.tech后端API地址
}
}
```
## 注意事项
- **自动导入插件自动生成默认关闭**
模板项目的组件类型声明已自动生成。如果添加和使用新的组件,请按照图示方法开启自动生成。在自动生成完成后,记得将其设置为 `false`,避免重复执行引发冲突。

- **项目启动浏览器访问空白**
请升级浏览器尝试,低版本浏览器内核可能不支持某些新的 JavaScript 语法,比如可选链操作符 `?.`。
- **项目同步仓库更新升级**
项目同步仓库更新升级之后,建议 `pnpm install` 安装更新依赖之后启动 。
- **项目组件、函数和引用爆红**
重启 VSCode 尝试
## 提交规范
- 【feat-需求编号】详细添加功能描述...
- 【bugfix-禅道 bugID】详细修改描述...
- 【test】添加测试内容描述...
- 【style】样式修改描述...
## 技术栈
| 技术栈 | 链接 |
| ----------- | -------------------------------------------- |
| Vue3 | https://cn.vuejs.org/guide/introduction.html |
| ElementPlus | https://element-plus.org/zh-CN/ |
| Vite | https://cn.vitejs.dev/ |
| Pinia | https://pinia.web3doc.top/ |
| sass | https://www.sass.hk/ |
| UnoCSS | https://unocss.dev/interactive/ |
| VueUse | https://vueuse.netlify.app/guide/ |
## 目录
## 配置文件
- .env.development 测试环境变量文件
- .env.production 正式环境变量文件
- src/setting.ts 文字样式等公共变量存储
## 快速创建页面
**路由和页面的文件位置一致**
**组件命名规范(组件名称不重复)**
```js
// vite.config.ts
Components({
resolvers: [
// 自动导入 Element Plus 组件
ElementPlusResolver(),
// 自动注册图标组件
IconsResolver({ enabledCollections: ["ep"] }),
],
// 指定自定义组件位置(默认:src/components)
dirs: ["src/**/components"],
}),
```
**页面命名规范**
```js