# 物流 **Repository Path**: xhyKeyNG/logistics ## Basic Information - **Project Name**: 物流 - **Description**: 111111111111111111 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-06-01 - **Last Updated**: 2025-03-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Introduction - 技术栈: Vue3 + Vite2 + Pinia - UI: Ant Design ## Getting started ```bash npm install # 安装依赖 npm dev # 本地开发 npm build # 打包 npm preview # 本地打包并预览打包后的页面 npm run lint # 修复代码格式问题 ``` This will automatically open http://localhost:8080 ## File Directory .config # 配置文件 .vscode # vscode 当前工作空间配置目录 src layout # 布局文件 xxxLayoug assets # 静态资源目录 common # 通用 Map、Enum、正则表达式 map.ts enum.ts components # 组件目录 FilterTable # 文件夹[大驼峰命名] FilterTable.vue router # 路由 layouts # 页面布局 BasicLayout ...Layout store # 按模块存储状态文件 modules index.ts service # 接口相关文件 fetch.ts user.ts styles # 全局的样式或变量 theme # 全局换肤样式变量 atom.less # 原子性 CSS 样式 utils # 工具函数 views # 存储具体页面 user # 业务模块 userList.vue # 页面[小驼峰命名] ## 命名规范 - component 命名:大驼峰 FilterTable - views 文件页面:小驼峰 changePassword - class:header-content - function:小驼峰 formatDate - antd 引入: - 自定义组件引入:大驼峰 ## Services services 具体模块按照与 views 文件夹对应 ## Components 组件 ## 样式书写 style 目录下 theme 文件夹 less 变量样式文件已注册成全局变量,需要使用时无需引入可以直接使用 例如: ```bash #常用变量,更多请参考theme1.less文件 @primary-color #全局主题色 @border-color-base #边框色 @font-size-base #文字字号 #使用如下 color:@primary-color border-color:@border-color-base font-size:@font-size-base ``` ## 路由结构定义 ```bash { path #路由路径(必填) component #路由组件(必填) name #路由名称,如用setup语法糖形式编写路由组件,必须与路由组件文件名称保持一致(必填) redirect #路由重定向路径,如点击对应一级菜单,跳转对应子菜单路径(选填) meta:{ title #路由页面标题(必填) icon #菜单icon,如此路由需要显示在菜单导航栏此项必填,参考assets/fontIcon文件夹下图标命名(选填) id #菜单唯一id,如此路由需要展示在菜单栏此项必填,id以后端接口返回菜单id为参考(选填) fullPath #子路由全路径(children内子路由必填) backPath #当前页面关闭返回路径和菜单高亮路径,通常添加于列表添加、编辑、查看页.....(选填) affix #此路由需要固定在路由tag栏(选填) noAddTag #此路由加载时无需添加到路由tag栏(选填) } } ``` ## 通用按钮权限 ``` - 表格操作列权限 const ret: Operatoin[] = [ { label: "查看", operation: AccessBankOperation.Display, permissionCode: "1564555503009398784", }, ]; - 通用按钮权限 审核通过 ``` ## 下载文件 ``` 通用下载方法:downloadFile import { downloadFile } from "~shared/"; - blob形式 downloadFile(blob) - url形式 import { useFileService } from "~utils/hooks/upload"; const useFile = useFileService(); useFile.download.fromUrl(fileInfo.fileUrl, fileInfo.fileName); ``` ## 通用枚举 & tag ``` - 通用枚举 import { resourceStageMap } from "~/common/map"; - 通用tag枚举 import { receiptStatusTagStyle } from "~/common/tagStyleMap"; - 通用tag 颜色(目前共4种) import { orangeStyle, blueStyle, redStyle, greenStyle, } from "~/common/tagStyle"; ``` ## Customize configuration - [eslint-plugin-vue](https://eslint.vuejs.org/rules/)