This commit is contained in:
shuhongfan
2023-09-04 16:40:17 +08:00
commit cf5ac25c14
8267 changed files with 1305066 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

View File

@@ -0,0 +1,17 @@
# just a flag
ENV = 'development'
NODE_ENV = development
VUE_APP_NODE_ENV=dev
# base api
VUE_APP_BASE_URL = 'http://god-express-gateway-t.itheima.net/manager'
VUE_APP_URL = 'http://god-express-gateway-t.itheima.net/manager'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
# This configuration can significantly increase the speed of hot updates,
# when you have a large number of pages.
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -0,0 +1,9 @@
# just a flag
ENV = 'production'
NODE_ENV = production
VUE_APP_NODE_ENV=prod
# base api
VUE_APP_BASE_URL = 'https://slwl-geteway.itheima.net/manager'
VUE_APP_URL = 'http://slwl-geteway.itheima.net'

View File

@@ -0,0 +1,8 @@
# just a flag
ENV = 'development'
NODE_ENV = development
VUE_APP_NODE_ENV=prod:stu
# base api
VUE_APP_BASE_URL = 'http://api.sl-express.com/manager'

View File

@@ -0,0 +1,14 @@
# just a flag
ENV = 'production'
NODE_ENV = production
VUE_APP_NODE_ENV=prod:uat
# base api
# VUE_APP_BASE_API = '/prod-api'
# VUE_APP_BASE_URL_LOCAL = 'http://68.79.7.219:8080/tms/api/'
# VUE_APP_BASE_URL_LOCAL = 'http://172.17.0.60:8080/tms/api/'
VUE_APP_BASE_URL_LOCAL = 'http://pinda.itheima.net/tms/api/'
VUE_APP_BASE_URL = '/api1'
VUE_APP_BASE_API = './api'
VUE_APP_BASE_API1 = ''

View File

@@ -0,0 +1,8 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'

View File

@@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

View File

@@ -0,0 +1,115 @@
{
// "extends": [
// "plugin:@typescript-eslint/recommended",
// "eslint-config-airbnb-base",
// "@vue/typescript/recommended",
// // "plugin:vue/vue3-recommended",
// "plugin:vue-scoped-css/base",
// "plugin:prettier/recommended"
// ],
"env": {
// 浏览器全局变量
"browser": true,
"node": true,
"jest": true,
// 启用 ES6 语法支持以及新的 ES6 全局变量或类型
"es6": true
},
"globals": {
"defineProps": "readonly",
"defineEmits": "readonly"
},
"plugins": ["vue", "@typescript-eslint"],
"parserOptions": {
// parser指定解析器默认的为espree。babel-eslint是一个Babel parser的包装器这个包装器使得 Babel parser 可以和 ESLint 协调工作
"parser": "babel-eslint",
// 指定来源的类型,'script' (默认) 或 'module'(如果你的代码是 ECMAScript 模块)
"sourceType": "module",
"allowImportExportEverywhere": true,
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"rules": {
"no-console": "off",
"no-continue": "off",
"no-restricted-syntax": "off",
"no-plusplus": "off",
"no-param-reassign": "off",
"no-shadow": "off",
"guard-for-in": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"import/first": "off", // https://github.com/vuejs/vue-eslint-parser/issues/58
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"vue/first-attribute-linebreak": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"class-methods-use-this": "off" // 因为AxiosCancel必须实例化而能静态化所以加的规则如果有办法解决可以取消
},
"overrides": [
{
"files": ["*.vue"],
"rules": {
// "vue/component-name-in-template-casing": [2, "kebab-case"],//模板中是否将组件名称强制转化成横杠连接的命名
"vue/require-default-prop": 0,
"vue/multi-word-component-names": 0,
"vue/no-reserved-props": 0,
"vue/no-v-html": 0,
"vue-scoped-css/enforce-style-type": ["error", { "allows": ["scoped"] }],
}
},
{
"files": ["*.ts", "*.tsx"], // https://github.com/typescript-eslint eslint-recommended
"rules": {
"constructor-super": "off", // ts(2335) & ts(2377)
"getter-return": "off", // ts(2378)
"no-const-assign": "off", // ts(2588)
// 禁止function定义中出现重名参数
"no-dupe-args": "off", // ts(2300)
"no-dupe-class-members": "off", // ts(2393) & ts(2300)
"no-dupe-keys": "off", // ts(1117)
"no-func-assign": "off", // ts(2539)
"no-import-assign": "off", // ts(2539) & ts(2540)
"no-new-symbol": "off", // ts(2588)
"no-obj-calls": "off", // ts(2349)
"no-redeclare": "off", // ts(2451)
"no-setter-return": "off", // ts(2408)
"no-this-before-super": "off", // ts(2376)
"no-undef": "off", // ts(2304)
//禁止在return、throw、continue、break语句之后出现不可达代码
"no-unreachable": "off", // ts(7027)
"no-unsafe-negation": "off", // ts(2365) & ts(2360) & ts(2358)
"no-var": "error", // ts transpiles let/const to var, so no need for vars any more
"prefer-const": "error", // ts provides better types with const
"prefer-rest-params": "error", // ts provides better types with rest args over arguments
"prefer-spread": "error", // ts transpiles spread to apply, so no need for manual apply
"valid-typeof": "off" // ts(2367)
}
}
]
}

16
project-slwl-admin-vue/.gitignore vendored Normal file
View File

@@ -0,0 +1,16 @@
.DS_Store
node_modules/
# dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

View File

@@ -0,0 +1,43 @@
stages:
- build
# sonar_preview:
# stage: sonar
# script:
# - ci/sonar_preview.sh
# tags:
# - centos-aliyun-158
# only:
# - master
sonar_analyze:
stage: sonar
script:
- |
sonar-scanner -X \
-Dsonar.projectKey=gitlab:$CI_COMMIT_REF_NAME:$CI_PROJECT_NAME \
-Dsonar.projectName=gitlab:$CI_COMMIT_REF_NAME:$CI_PROJECT_NAME \
-Dsonar.projectVersion=1.0.$CI_PIPELINE_ID \
-Dsonar.sources=src \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.issuesReport.html.enable=true \
-Dsonar.gitlab.project_id=$CI_PROJECT_ID \
-Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA \
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
tags:
- sonar
only:
- huangxu-0817
build:
stage: build
script:
- yarn --registry https://registry.npm.taobao.org
- yarn build:prod
- sudo rm -rf /data/nginx/html/${CI_PROJECT_NAME}/*
- sudo cp -rf ./dist/* /data/nginx/html/${CI_PROJECT_NAME}/
- sudo chown nginx.nginx -R /data/nginx/html/${CI_PROJECT_NAME}
tags:
- aliyun-kubernetes
only:
- master

View File

@@ -0,0 +1,9 @@
{
"spaceBeforeFunctionParen": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "none",
"eslintIntegration": true,
"singleQuote": true,
"semi": false
}

View File

@@ -0,0 +1,7 @@
FROM nginx
COPY ./dist /usr/share/nginx/html/
RUN chmod -R 777 /usr/share/nginx/html/
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017-present PanJiaChen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,60 @@
<p align="center">
<img width="200" src="./README/img/logo.png" alt="Vue logo">
</p>
<p align="center">
[管理后台](./README/ADMIN.md) | [用户端](./README/YONGHU.md) | [快递员端](./README/KUAIDIYUAN.md) | [司机端](./README/SIJI.md)
</p>
#### 项目简介
> 物流项目体系包含四个端:管理后台、用户端、司机端以及快递员端
#### 项目展示
<img width="406" src="./README/img/admin.gif" alt="Vue logo">
<img width="100" src="./README/img/siji.gif" alt="Vue logo">
<img width="100" src="./README/img/kuaidiyuan.gif" alt="Vue logo">
<img width="100" src="./README/img/yonghuduan.gif" alt="Vue logo">
#### 产品原型及设计
- 管理后台
- [原型 吕珊:](https://codesign.qq.com/s/QmlyZwQxAQ9WRA1/preview/prototype/XMx86jzWVE9brz3)
- [设计图 王静:](https://codesign.qq.com/s/QmlyZwQxAQ9WRA1/JMwy0bRnNRq0O6L/inspect)
- 用户端:
- [原型 李芳华](https://codesign.qq.com/app/design/zm5q0XPwgM0RBb6/axure/O6ym7ZRM8K0AYED)
- [设计图 李芳华](https://codesign.qq.com/s/gRxnjPPr4EjLmqr/18zdZAgr4WM9nRK/inspect)
- 司机端
- [原型 李芳华](https://codesign.qq.com/s/7VXl9Obbb8j8WRA/preview/prototype/3JG2mj7B74ZVKdM)
- [设计图 李芳华](https://codesign.qq.com/s/7VXl9Obbb8j8WRA/zKaDZdEGYokj2GP/inspect)
- 快递员端
- [原型 转转](https://codesign.qq.com/app/design/1JyMjoK6MJjLbAV/axure/qwKrMZeQxLZk1md)
- [设计图 转转](https://codesign.qq.com/app/design/1JyMjoK6MJjLbAV/board)
- 研发 - 前端
- 快递员端 git - 娄江华: http://git.itcast.cn/development/project-wl-kuaidiyuan-uniapp-vue3
- 司机端 git - 李小刚http://git.itcast.cn/development/project-wl-siji-uniapp-vue3
- 用户端 git - 司文强: http://git.itcast.cn/development/project-wl-yonghuduan-uniapp-vue3
- 管理后台 git - 司文强: http://git.itcast.cn/development/project-pdwl-admin-vue/tree/siwenqiang-0609
- 后端java 张志军、张家乐、王小兵
- 网关git: http://git.itcast.cn/sl-express/sl-express-gateway
- 快递员端 git - 张家乐http://git.itcast.cn/sl-express/sl-express-ms-web/sl-express-ms-web-courier
- 司机端 git - 张家乐: http://git.itcast.cn/sl-express/sl-express-ms-web/sl-express-ms-web-driver
- 用户端 git -王小兵: http://git.itcast.cn/sl-express/sl-express-ms-web/sl-express-ms-web-customer
- 管理后台 git - 管理后台:王小兵 http://git.itcast.cn/sl-express/sl-express-ms-web/sl-express-ms-web-manager
- 后端全部微服务 githttp://git.itcast.cn/sl-express
#### 访问地址
- 管理后台http://slwl-admin-t.itheima.net
- 用户端:小程序
- 管理端git库提供.apk 文件下载安装
- 司机端git库提供.apk 文件下载安装
- apk路径unpackage/release/apk/xxx.apk

View File

@@ -0,0 +1,133 @@
# 神领物流 - 管理后台PC端
#### 项目简介
管理后台:该后台包括了从收到订单开始,通过仓库拣货发货,再通过分拨进行运输、末端配送,然后进行考核、结算等功能
#### 项目迭代日志:
- v1 - 涉及主流程
- 后台管理端包含:
- 基础数据数据
- 车型管理
- 车辆管理
- 司机管理
- 排班管理
- 运费管理
- 营业部管理
- 快递员管理
- 快递作业管理
- 机构作业管理
- 机构管理
- 货品类型管理
- 业务管理
- 订单管理
- 运单管理
- 调度管理
- 运输任务管理
- 线路管理
#### 技术栈
vue2+vuex+axios
#### 外网展示
> 部署说明:目前是 git 上传代码后在 jekenis 上自动部署
- http://slwl-admin-t.itheima.net/#/login
#### 开发环境
- windows 版本 windows 10 企业版
- 开发工具 vscode
- node 版本 v14.19.1
- npm 版本 v6.14.16
#### 运行程序
```sh
1. 安装 cnpm 工具,国内加速
npm install -g cnpm --registry=https://registry.npm.taobao.org
2. 安装依赖包
cnpm i
3. 运行程序
npm run dev
4. 浏览器打开
http://localhost:9528/
```
#### 工程结构解析
```
├── public # 静态资源 (会被直接复制)
│ │── favicon.ico # favicon图标
│ │── manifest.json # PWA 配置文件
│ │── img # 静态图片存放
│ └── index.html # html模板
├── src # 源代码
│ ├── api # 所有请求
│ ├── assets # 主题 字体等静态资源 (由 webpack 处理加载)
│ ├── components # 全局组件
│ ├── icons # svg 图标
│ ├── layout # 全局布局
│ ├── router # 路由
│ ├── store # 全局 vuex store
│ ├── styles # 全局样式
│ ├── utils # 全局方法
│ ├── views # 所有页面
│ └── ├── branches # 货品类型管理,机构管理,机构作业范围,快递作业管理,快递员管理(营业部管理)
│ ├── dashboard # 首页()
│ ├── login # 菜品管理、添加菜品
│ ├── order-manage # 订单管理
│ ├── transit # 车型管理,车辆管理,司机管理,排班管理,运费管理(基础数据管理)
│ ├── transport # 运输任务管理,线路管理(调度管理)
│ ├── waybill # 运单管理
│ └── 404.vue # 404报错页面
│ ├── App.vue # 入口页面
│ ├── main.js # 入口文件 加载组件 初始化等
│ ├── permission.ts # 权限管理
│ └── shims-vue.d.ts # 模块注入
├── dist # 打包文件夹(可删除重新打包)
├── tests # 测试
├── .circleci/ # 自动化 CI 配置
├── .browserslistrc # browserslistrc 配置文件 (用于支持 Autoprefixer)
├── .editorconfig # 编辑相关配置
├── .env.xxx # 环境变量配置
├── .eslintrc.js # eslint 配置
├── babel.config.js # babel-loader 配置
├── cypress.json # e2e 测试配置
├── jest.config.js # jest 单元测试配置
├── package.json # package.json 依赖
├── postcss.config.js # postcss 配置
├── tsconfig.json # typescript 配置
└── vue.config.js # vue-cli 配置
```
#### 相关资料
前端 负责人: 司文强
siwenqiang-0609 分支 神领物流一期 - 前端
git 地址http://git.itcast.cn/development/project-wl-yonghuduan-uniapp-vue3
后端 负责人:王小兵,张家乐
接口http://sl-express-gateway.yjy-public-slwl-java.svc.cluster.local:8080/manager/doc.html#/home
git 地址http://git.itcast.cn/sl-express/sl-express-ms-web/sl-express-ms-web-manager
设计 负责人:王静
设计稿地址https://codesign.qq.com/s/QmlyZwQxAQ9WRA1/JMwy0bRnNRq0O6L/inspect
原型 负责人:吕杉
原型地址https://codesign.qq.com/s/QmlyZwQxAQ9WRA1/preview/prototype/XMx86jzWVE9brz3
#### 涉及到第三方库
- [vue-baidu-map] (https://dafrok.github.io/vue-baidu-map/#/zh/guide/painting)
- [vue-treeselect:] (https://www.vue-treeselect.cn/)
- [element] (https://element.eleme.cn/#/zh-CN/)
#### 文档参考
- vue[https://cn.vuejs.org/v2/guide/]

View File

@@ -0,0 +1,125 @@
# 神领物流 - 快递员端安卓APP
#### 技术栈
- vue3+uniapp
#### 项目简介
> 快递员端:快递员端要主要包含取件派件、运费计算、微信支付宝收款、地图线路等功能
#### 项目迭代日志:
- v1 - 涉及主流程
- 快递员端包含:
- 用户登录 - 用户名密码登录
- 取件 - 包含 筛选、去取件、取消订单、转单、打印、拨打电话、发信息、收款
- 消息 - 包含 公告、公告详情、系统通知(寄件相关、签收提醒、快件取消)
- 派件 - 包含 去派件、拨打电话、发信息、收款、订单跟踪
- 历史派送 - 包含 日期筛选、取件派件列表搜索
- 运费查询 - 查询运费
- 我的 - 包含 我的详情
- 目前遗留问题:
- 订单追踪 - 未调试 (地图页面未实现)
- 搜索:各个模块搜索功能
- 打印:取件、派件打印
- 运单详情:地图路线图
- 我的:二维码弹出专属、作业范围
- 手机登录
- 电话拨打、发信息
#### 运行环境 - 初始开发环境及工具
- 安卓手机、MuMu模拟器版本 2.2.3x86,桌面启动器版本 2.3.2
- 安装包 luj
- unpackage/release/apk
- XXX.apk 文件为安装文件
- MuMu模拟器安装包
- windows--
- MACmumu-mac.dmg
#### 开发环境
- 系统windows 版本 windows 10 企业版
- 工具HbuilderX 3.4.7.20220422
- node 16.14.2
#### 安装运行
- 本项目为uniapp架构 需要依赖 HBuilderX编辑器
- 下载地址https://www.dcloud.io/hbuilderx.html
##### 依赖安装
- 依赖安装
- HBuilderX为集成编辑器所有依赖都已经集成好了
- 运行
- 点击编辑器上的运行按钮 可使用手机或模拟器(默认可以使用浏览器直接预览)
- 使用手机或者模拟器 请阅读文件:
- [真机运行](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#%E8%BF%90%E8%A1%8C%E5%85%A5%E5%8F%A3)
- [安装模拟器](https://uniapp.dcloud.net.cn/tutorial/run/installSimulator.html#simulator)
- [常见问题](https://uniapp.dcloud.net.cn/tutorial/run/run-app-faq.html)
- 打包
- 点击编辑器的发行 - 云打包 会生成对应的安装包 (打包后控制台会展示打包后的路径) 默认路径为unpackage/release/apk/xxx.apk 文件
#### 项目目录结构
```html
├── unpackage 编译结果目录
├── static icon目录
├── pages.js 路由
├── styles 共用样式
├── store vuex
├── pages 页面文件目录
| ├── api api接口
| | ├── common.js 公用
| | ├── freight.js 运费计算
| | ├── index.js 取件派件
| | ├── news.js 消息
| | ├── user.js 用户信息
| ├── start 引导文件夹
| ├── login 登录文件夹
| | ├── user.vue 用户页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── index 首页文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── cancel 取消取件文件夹
| | ├── index.vue 页面逻辑
| | ├── cause.vue 取消原因
| ├── delivery 派件文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── pickup 取件文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── details 详情文件夹
| | ├── index.vue 去取件页面逻辑
| | ├── orderMap.vue 订单追踪
| | ├── waybill.vue 去派件、运单详情
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── search 搜索
| ├── news 消息页文件夹
| | ├── index.vue 页面逻辑
| | ├── system.vue 系统通知页
| | ├── detail.vue 公告详情页
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── history 历史取派文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── freight 运费查询文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── my 我的文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── pay 收款文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
└── package.json
```
#### 相关资料
- [Vue3:](https://cn.vuejs.org/guide/introduction.html)
- [uniapp](https://uniapp.dcloud.net.cn/tutorial/)
#### 参考文档(项目开发过程中用到的所有技术难点 涉及到的相关参考)
- [vite配置:](https://vitejs.dev/config/)

View File

@@ -0,0 +1,74 @@
# 神领物流 - 司机端安卓APP
#### 技术栈
- vue3+uniapp
#### 项目简介
> 司机端:主要为司机提供:提货 交货及车辆信息上报等功能
#### 项目迭代日志:
- v1 - 涉及主流程
- 司机端包含:
- 用户登录 - 用户名密码登录
- 任务 - 包含 提货、在途、已完成
- 信息 - 包含 公告、系统通知
- 我的 - 车辆信息、任务数据、系统设置
- 目前遗留问题:- 接口未实现 二期补
- 上报异常 - 未调试 (地图定位页面未实现)
- 系统设置:换绑手机、修改密码、消息通知设置功能 - 未调试
#### 运行环境 - 初始开发环境及工具
- 安卓手机、MuMu模拟器版本 2.2.3x86,桌面启动器版本 2.3.2
- 安装包 luj
- unpackage/release/apk
- XXX.apk 文件为安装文件
- MuMu模拟器安装包
- windows--
- MACmumu-mac.dmg
#### 开发环境
- 系统MacOs
- 工具HbuilderX 3.4.18.20220630
- node 16.8.0
#### 安装运行
- 本项目为uniapp架构 需要依赖 HBuilderX编辑器
- 下载地址https://www.dcloud.io/hbuilderx.html
##### 依赖安装
- 依赖安装
- HBuilderX为集成编辑器所有依赖都已经集成好了
- 运行
- 点击编辑器上的运行按钮 可使用手机或模拟器(默认可以使用浏览器直接预览)
- 使用手机或者模拟器 请阅读文件:
- [真机运行](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#%E8%BF%90%E8%A1%8C%E5%85%A5%E5%8F%A3)
- [安装模拟器](https://uniapp.dcloud.net.cn/tutorial/run/installSimulator.html#simulator)
- [常见问题](https://uniapp.dcloud.net.cn/tutorial/run/run-app-faq.html)
- 打包
- 点击编辑器的发行 - 云打包 会生成对应的安装包 (打包后控制台会展示打包后的路径) 默认路径为unpackage/release/apk/xxx.apk 文件
#### 项目结构
```html
├── unpackage 编译结果目录
├── static icon目录
├── pages.js 路由
├── styles 共用样式
├── store vuex
├── pages 页面文件目录
| ├── api api接口
| ├── start 引导文件夹
| ├── login 登录文件夹
| ├── index 首页文件夹
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
| ├── search 搜索
| └── news 消息页文件夹
| └── history 历史取派
| └── freight 运费查询
├── manifest.json 所有App相关配置都在这个文件里
└── package.json
```
#### 相关资料
- [Vue3:](https://cn.vuejs.org/guide/introduction.html)
- [uniapp](https://uniapp.dcloud.net.cn/tutorial/)
#### 参考文档(项目开发过程中用到的所有技术难点 涉及到的相关参考)
- [vite配置:](https://vitejs.dev/config/)

View File

@@ -0,0 +1,84 @@
# 神领物流 - 用户端(小程序)
### 项目简介
用户端: 主要承担了用户登录,下单,查询订单的功能
### 技术栈
vue3+uniapp
### 项目迭代日志:
- v1 - 涉及主流程
- 用户端包含:
- 用户微信快捷登录
- 首页
- 下单
- 订单详情
- 订单取消
- 下单成功
- 实名认证
- 电子存根
### 外部环境
[启动文档](https://www.tapd.cn/33055819/personal_documents/show/1133055819001004909)
- 开发环境
- 1、申请开发权限
- 2、git拉代码
- 3、启动微信开发者工具
- 4、导入项目并启动
#### 运行环境 - 初始开发环境及工具
- 微信开发者工具(版本 1.06.2206090
- HbuilderX (版本3.5.3.20220729)
- 开发版本1.2.3
- [下载地址](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html)
#### 开发环境
- windows 版本 windows 10 企业版
- 开发工具 vscode
- node 版本 v14.19.1
- npm 版本 v6.14.16
##### 依赖安装
- 依赖安装
- HBuilderX为集成编辑器所有依赖都已经集成好了
- 运行
- 开启开发者工具(需要有对应的开发权限 - 如果是没有请使用测试账号流程 [操作文档](./img/test.docx)
- 点击编辑器上的运行按钮 选择 微信开发者工具 会自动打开该项目
- [参考](https://uniapp.dcloud.net.cn/tutorial/debug/debug-mp.html#mp-debug)
- 打包
- 点击编辑器的发行 - 云打包 会生成对应的安装包 (打包后控制台会展示打包后的路径) 默认路径为unpackage/release/apk/xxx.apk 文件
- #### 项目目录结构
```html
├── unpackage 编译结果目录
├── static icon目录
├── pages.js 路由
├── styles 共用样式
├── store vuex
├── components 公用组件
├── pages 页面文件目录
| ├── api api接口
| ├── address 地址簿
| ├── express-delivery 寄快递
| ├── goodsInfo 物品信息
| ├── login 登录
| ├── my 我的页
| ├── index 首页
| | ├── index.vue 页面逻辑
| | ├── index.scss 页面样式
| | ├── components 页面组件
├── subPages 页面文件目录
| ├── account-rules 计费规则
| ├── address-info 地址详情
| ├── authentication-success 认证成功
| ├── electronic-stub 电子存根
| ├── order-cancel 订单取消
| ├── order-info 订单详情
| ├── order-success 下单成功
| ├── realName-authentication 实名认证
└── package.json
└── util
```
### 涉及到第三方库
- [uniapp] (https://uniapp.dcloud.net.cn/api/window/window.html#getcurrentpages)
- [微信开发者文档] (https://developers.weixin.qq.com/miniprogram/dev/framework/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}

View File

@@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}

View File

@@ -0,0 +1,24 @@
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}

View File

@@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators":true,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}

View File

@@ -0,0 +1,66 @@
import Mock from 'mockjs'
import { param2Obj } from '../src/utils'
import user from './user'
import table from './table'
const mocks = [
...user,
...table
]
// for front mock
// please use it cautiously, it will redefine XMLHttpRequest,
// which will cause many of your third-party libraries to be invalidated(like progress event).
export function mockXHR() {
// mock patch
// https://github.com/nuysoft/Mock/issues/300
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function () {
if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false
if (this.responseType) {
this.custom.xhr.responseType = this.responseType
}
}
this.proxy_send(...arguments)
}
function XHR2ExpressReqWrap(respond) {
return function (options) {
let result = null
if (respond instanceof Function) {
const { body, type, url } = options
// https://expressjs.com/en/4x/api.html#req
result = respond({
method: type,
body: JSON.parse(body),
query: param2Obj(url)
})
} else {
result = respond
}
return Mock.mock(result)
}
}
for (const i of mocks) {
Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
}
}
// for mock server
const responseFake = (url, type, respond) => {
return {
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
type: type || 'get',
response(req, res) {
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}
}
export default mocks.map(route => {
return responseFake(route.url, route.type, route.response)
})

View File

@@ -0,0 +1,68 @@
const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
const mockDir = path.join(process.cwd(), 'mock')
function registerRoutes(app) {
let mockLastIndex
const { default: mocks } = require('./index.js')
for (const mock of mocks) {
app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length
}
const mockRoutesLength = Object.keys(mocks).length
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength
}
}
function unregisterRoutes() {
Object.keys(require.cache).forEach(i => {
if (i.includes(mockDir)) {
delete require.cache[require.resolve(i)]
}
})
}
module.exports = app => {
// es6 polyfill
require('@babel/register')
// parse app.body
// https://expressjs.com/en/4x/api.html#req.body
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({
extended: true
}))
const mockRoutes = registerRoutes(app)
var mockRoutesLength = mockRoutes.mockRoutesLength
var mockStartIndex = mockRoutes.mockStartIndex
// watch files, hot reload mock server
chokidar.watch(mockDir, {
ignored: /mock-server/,
ignoreInitial: true
}).on('all', (event, path) => {
if (event === 'change' || event === 'add') {
try {
// remove mock routes stack
app._router.stack.splice(mockStartIndex, mockRoutesLength)
// clear routes cache
unregisterRoutes()
const mockRoutes = registerRoutes(app)
mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
} catch (error) {
console.log(chalk.redBright(error))
}
}
})
}

View File

@@ -0,0 +1,29 @@
import Mock from 'mockjs'
const data = Mock.mock({
'items|30': [{
id: '@id',
title: '@sentence(10, 20)',
'status|1': ['published', 'draft', 'deleted'],
author: 'name',
display_time: '@datetime',
pageviews: '@integer(300, 5000)'
}]
})
export default [
{
url: '/vue-admin-template/table/list',
type: 'get',
response: config => {
const items = data.items
return {
code: 20000,
data: {
total: items.length,
items: items
}
}
}
}
]

View File

@@ -0,0 +1,84 @@
const tokens = {
admin: {
token: 'admin-token'
},
editor: {
token: 'editor-token'
}
}
const users = {
'admin-token': {
roles: ['admin'],
introduction: 'I am a super administrator',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Super Admin'
},
'editor-token': {
roles: ['editor'],
introduction: 'I am an editor',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Normal Editor'
}
}
export default [
// user login
{
url: '/vue-admin-template/user/login',
type: 'post',
response: config => {
const { username } = config.body
const token = tokens[username]
// mock error
if (!token) {
return {
code: 60204,
message: 'Account and password are incorrect.'
}
}
return {
code: 20000,
data: token
}
}
},
// get user info
{
url: '/vue-admin-template/user/info\.*',
type: 'get',
response: config => {
const { token } = config.query
const info = users[token]
// mock error
if (!info) {
return {
code: 50008,
message: 'Login failed, unable to get user details.'
}
}
return {
code: 20000,
data: info
}
}
},
// user logout
{
url: '/vue-admin-template/user/logout',
type: 'post',
response: _ => {
return {
code: 20000,
data: 'success'
}
}
}
]

View File

@@ -0,0 +1,79 @@
{
"name": "pinda",
"version": "4.2.1",
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build --mode production",
"build:test": "vue-cli-service build --mode development",
"build:uat": "vue-cli-service build --mode production.uat",
"build:stu": "vue-cli-service build --mode production.stu",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
"@riophae/vue-treeselect": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"axios": "0.18.1",
"echarts": "^4.9.0",
"echarts-liquidfill": "^2.0.6",
"element-ui": "2.13.2",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue-scoped-css": "^2.4.0",
"jquery": "^3.5.1",
"js-cookie": "2.2.0",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"typescript": "^4.9.5",
"vue": "2.6.10",
"vue-baidu-map": "^0.21.22",
"vue-i18n": "^8.15.4",
"vue-property-decorator": "^9.1.2",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.6.0",
"@vue/cli-plugin-eslint": "^3.9.1",
"@vue/cli-plugin-unit-jest": "3.6.3",
"@vue/cli-service": "3.6.0",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"chalk": "2.4.2",
"connect": "3.6.6",
"eslint": "^5.15.3",
"eslint-plugin-vue": "5.2.2",
"html-webpack-plugin": "3.2.0",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.9.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "2.6.10"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

View File

@@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
'plugins': {
// to edit target browsers: use "browserslist" field in package.json
'autoprefixer': {}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it
to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,48 @@
<template>
<div
id="app"
>
<el-scrollbar
ref="main"
style="height: 100%; width: 100%"
>
<router-view />
</el-scrollbar>
</div>
</template>
<script>
export default {
name: 'App',
computed: {
key() {
return this.$route.name !== undefined
? this.$route.name + new Date()
: this.$route + new Date()
}
},
watch: {
// 解决页面跳转后无法回到新页面顶部的问题
$route() {
const main = this.$refs.main
main.wrap.scrollTop = 0
}
},
methods: {
goJobsArea() {
this.$router.push('/organization/institutions-jobs-area')
},
goOperational() {
this.$router.push('/branches/operational')
}
}
}
</script>
<style lang="scss" scoped>
#app {
/* min-width: 1620px; */
/deep/ .el-scrollbar__wrap {
overflow-x: hidden;
}
}
</style>

View File

@@ -0,0 +1,14 @@
[
{
"id": 1,
"name": "一级转运中心"
},
{
"id": 2,
"name": "二级转运中心"
},
{
"id": 3,
"name": "营业部"
}
]

View File

@@ -0,0 +1,18 @@
[
{
"agencyType": 1,
"agencyTypeName": "分公司"
},
{
"agencyType": 2,
"agencyTypeName": "一级转运中心"
},
{
"agencyType": 3,
"agencyTypeName": "二级转运中心"
},
{
"agencyType": 4,
"gencyTypeName": "网点"
}
]

View File

@@ -0,0 +1,43 @@
/*
* @Author: zhangyanxin
* @Date: 2020-02-10
*
* 网点管理
*/
import { createAPI } from '@/utils/request'
// 获取货物类型分页数据
export const goodsTypeList = data => createAPI(`/goodsType/page`, 'get', data)
// 添加货物类型数据
export const goodsTypeAdd = data => createAPI(`/goodsType`, 'post', data)
// 删除货物类型
export const goodsTypeDel = data => createAPI(`/goodsType/${data}`, 'delete', data)
// 获取货物类型详情数据
export const goodsTypeDetail = data => createAPI(`/goodsType/${data}`, 'get', data)
// 更新货物类型数据
export const goodsTypeUpdate = (id, data) => createAPI(`/goodsType/${id}`, 'put', data)
// 获取快递员分页数据
export const courierList = data => createAPI(`/business-hall/courier/page`, 'get', data)
// 获取快递员详情
export const courierDetail = data => createAPI(`/business-hall/courier/${data}`, 'get', data)
// 获取快递员/机构作业范围,type(1:机构,2:快递员)
export const courierScopeList = (data, type) => createAPI(`/business-hall/scope/${data}/${type}`, 'get', data)
// 保存机构范围/快递员详情
export const courierAdd = data => createAPI(`/business-hall/scope`, 'post', data)
// 取、派件任务分页查询接口
export const pickupTaskList = data => createAPI(`/pickup-dispatch-task-manager/page`, 'post', data)
// 更新取派件任务
export const pickupTaskUpdate = (id, courierId, data) => createAPI(`/pickup-dispatch-task-manager/${id}/${courierId}`, 'put', data)
// 删除快递员作业范围接口
export const deleteCourierScope = (id, type) => createAPI(`/business-hall/scope/${id}/${type}`, 'delete')
// 回车登记列表接口
export const carRegisterList = data => createAPI(`/truck-return-register/pageQuery`, 'post', data)
// 回车登记详情接口
export const carRegisterInfo = data => createAPI(`/truck-return-register/detail/${data}`, 'get', data)
// 给快递员分配作业
export const dispatchTaskForCourier = data => createAPI(`/pickup-dispatch-task-manager/${data.courierId}`, 'put', data.ids)

View File

@@ -0,0 +1,18 @@
/*
* @Author: zhangyanxin
* @Date: 2020-03-03
*
* 货品管理
*/
import { createAPI } from '@/utils/request'
// 获取货物分页数据
export const carGoList = data => createAPI(`/order-manager/cargo`, 'get', data)
// 添加货物分页数据
export const carGoAdd = data => createAPI(`/order-manager/cargo`, 'post', data)
// 删除货物
export const carGoDel = data => createAPI(`/order-manager/cargo/${data}`, 'delete', data)
// 编辑货物
export const carGoEdit = (data, id) => createAPI(`/order-manager/cargo/${id}`, 'put', data)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
/*
* @Author: zhangyanxin
* @Date: 2020-02-19
*
* 公共信息接口
*/
import { createAPI } from '@/utils/request'
// 获取线路类型数据
export const lineTypeCommonList = data => createAPI(`/web-manager/common/transportLineType/simple`, 'get', data)
// 获取车辆类型数据
export const truckTypeCommonList = data => createAPI(`/truckType/simple`, 'get', data)
// 获取负责人数据
export const principalCommonList = data => createAPI(`/common/user/simple`, 'get', data)
// 获取车队数据
export const fleetCommonList = data => createAPI(`/web-manager/common/fleet/simple`, 'get', data)
// 获取货物类型数据
export const goodsTypeCommonList = data => createAPI(`/goodsType/simple`, 'get', data)
// 获取行政区域简要信息列表
export const areaList = data => createAPI(`/areas/children`, 'get', data)
// 登录成功后的回调,记录登录日志,最后登录时间等
export const dictionaryEnums = data => createAPI(`/gate/dictionary/enums`, 'get', data)
// 获取工作台数据
export const dashboardData = data => createAPI(`/workspace`, 'get', data)

View File

@@ -0,0 +1,18 @@
[
{
"id": 1,
"name": "待提货"
},
{
"id": 2,
"name": "在途"
},
{
"id": 4,
"name": "已交付"
},
{
"id": 5,
"name": "已作废"
}
]

View File

@@ -0,0 +1,54 @@
/*
* @Author: zhangyanxin
* @Date: 2020-02-04
*
* 机构管理
*/
import { createAPI } from '@/utils/request'
// 获取树状机构信息
export const agencyList = data => createAPI(`/business-hall/tree`, 'get', data)
// 获取组织机构详情
export const detail = data => createAPI(`/business-hall/${data}`, 'get', data)
// 获取组织机构下的员工分页数据
export const getuserByAgency = data => createAPI(`/business-hall/user/page`, 'get', data)
// 添加机构
export const add = data => createAPI(`/web-manager/agency`, 'post', data)
// 更新机构
export const update = (data) => createAPI(`/business-hall`, 'post', data)
// 删除机构
export const deleteAgency = data => createAPI(`/web-manager/agency/${data}/disable`, 'put', data)
// 获取机构业务范围
export const agencyScopelist = data => createAPI(`/web-manager/agency/${data}/scope`, 'get', data)
// 保存机构业务范围
export const addAgencyScope = data => createAPI(`/web-manager/agency/scope`, 'post', data)
// 获取机员工信息
export const agencyUserList = data => createAPI(`/web-manager/agency/user/page`, 'get', data)
// 获取机员工详情
export const agencyUserDetail = data => createAPI(`/web-manager/agency/user/${data}`, 'get', data)
// 添加机构员工
export const agencyAdduser = data => createAPI(`/web-manager/agency/user`, 'post', data)
// 更新机构员工
export const updateAgencyUser = (id, data) => createAPI(`/web-manager/agency/user/${id}`, 'put', data)
// 删除机构-员工
export const delAgencyUser = data => createAPI(`/web-manager/agency/user/${data}`, 'delete', data)
// 启用/禁用机构-员工
export const forbiddenUser = (id, data) => createAPI(`/web-manager/agency/user/${id}/usability`, 'put', data)
// 获取角色分页数据
export const agencyRolelist = data => createAPI(`/web-manager/agency/role`, 'get', data)
// 添加角色
export const agencyRoleAdd = data => createAPI(`/web-manager/agency/role`, 'post', data)
// 获取角色详情
export const roleDetail = data => createAPI(`/web-manager/agency/role/${data}`, 'get', data)
// 更新角色详情
export const updateRole = (id, data) => createAPI(`/web-manager/agency/role/${id}`, 'put', data)
// 删除角色
export const delRole = data => createAPI(`/web-manager/agency/role/${data}`, 'delete', data)
// 保存机构业务范围
export const addMapScope = data => createAPI(`/agency/scope`, 'post', data)
// 获取作业范围分配
export const getMapScope = data => createAPI(`/business-hall/courier/scope/${data}`, 'get', data)

View File

@@ -0,0 +1,20 @@
/*
* @Author: siwenqiang
* @Date: 2022-06-14
*
* 登录相关接口
*/
import { createAPI } from '@/utils/request'
// 获取登录页面验证码图片
export const getCaptcha = data => createAPI('/captcha' + `?key=${data}`, 'get', data, 'arraybuffer')
// 登录
export const login = data => createAPI(`/login`, 'post', data)
// 获取权限路由
export const getRouter = data => createAPI(`/menus`, 'get', data)
// 获取登录信息
export const loginLog = (data, msg) => createAPI(`/apiLogin/authority/loginLog/anno/login/${data}`, 'get', { description: msg })

View File

@@ -0,0 +1,15 @@
/*
* @Author: zhangyanxin
* @Date: 2020-03-04
*
* 个人中心接口
*/
import { createAPI } from '@/utils/request'
// 获取个人信息
export const infoList = data => createAPI(`/web-manager/userCenter/info`, 'get', data)
// 更新个人信息
export const updateInfoList = data => createAPI(`/web-manager/userCenter/info`, 'put', data)
// 获取通知通告
export const notieList = data => createAPI(`/web-manager/userCenter/message`, 'get', data)

View File

@@ -0,0 +1,14 @@
[
{
"id": 1,
"name": "新任务"
},
{
"id": 2,
"name": "已完成"
},
{
"id": 3,
"name": "已取消"
}
]

View File

@@ -0,0 +1,17 @@
/*
* @Author: zhangyanxin
* @Date: 2020-02-20
*
* 订单管理
*/
import { createAPI } from '@/utils/request'
// 获取订单分页数据
export const orderList = data => createAPI(`/order-manager/order/page`, 'post', data)
// 获取订单详情数据
export const orderDetail = data => createAPI(`/order-manager/order/${data}`, 'get', data)
// 更新订单
export const updateOrder = (id, data) => createAPI(`/order-manager/order/${id}`, 'post', data)
// 获取订单轨迹
export const getOrderTrackApi = (id) => createAPI(`transport-order-manager/track/${id}`, 'get')

View File

@@ -0,0 +1,34 @@
[
{
"id": 23000,
"name": "待取件"
},
{
"id": 23001,
"name": "已取件"
},
{
"id": 23005,
"name": "运输中"
},
{
"id": 23008,
"name": "派送中"
},
{
"id": 23009,
"name": "已签收"
},
{
"id": 23010,
"name": "拒收"
},
{
"id": 230011,
"name": "已取消"
},
{
"id": 0,
"name": "全部"
}
]

View File

@@ -0,0 +1,10 @@
[
{
"id": 1,
"name": "网点自寄"
},
{
"id": 2,
"name": "上门取件"
}
]

View File

@@ -0,0 +1,23 @@
/*
* @Author: zhangyanxin
* @Date: 2020-04-22
*
* 调度任务管理
*/
import { createAPI } from '@/utils/request'
// 查询任务接口
export const dispatchList = data => createAPI(`/web-dispatch/schedule/dispatch/${data}`, 'get', data)
// 保存任务接口
export const dispatchAdd = data => createAPI(`/web-dispatch/schedule/dispatch`, 'POST', data)
// 运行任务
export const dispatchRun = data => createAPI(`/web-dispatch/schedule/run/${data}`, 'PUT', data)
// 恢复任务
export const dispatchResume = data => createAPI(`/web-dispatch/schedule/resume/${data}`, 'PUT', data)
// 运暂停任务
export const dispatchPause = data => createAPI(`/web-dispatch/schedule/pause/${data}`, 'PUT', data)
// 日志列表
export const scheduleLogList = data => createAPI(`/web-dispatch/scheduleLog/page`, 'get', data)
// 日志详情
export const scheduleLogDetail = data => createAPI(`/web-dispatch/scheduleLog/${data}`, 'get', data)

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/vue-admin-template/table/list',
method: 'get',
params
})
}

View File

@@ -0,0 +1,155 @@
/*
* @Author: zhangyanxin
* @Date: 2020-02-10
*
* 转运中心-业务信息管理
*/
import { createAPI } from '@/utils/request'
// 获取统计车辆
export const getCarTypeStatics = data => createAPI(`/count`, 'get', data)
// 获取车辆类型下拉
export const getCarTypeList = data => createAPI(`/truckType/simple`, 'get', data)
// 获取车辆类型分页数据
export const list = data => createAPI(`/truckType/page`, 'get', data)
// 获取车辆详情
export const detail = data => createAPI(`/truckType/${data}`, 'get', data)
// 添加车辆类型
export const add = data => createAPI(`/truckType`, 'post', data)
// 更新车辆类型
export const update = (id, data) => createAPI(`/truckType/${id}`, 'put', data)
// 删除车辆类型
export const del = data => createAPI(`/truckType/${data}`, 'delete', data)
// 根据车辆获取绑定司机
export const getDriverListByCar = data => createAPI(`/bindingDrivers/${data}`, 'get', data)
// 获取司机分页数据
export const driverList = data => createAPI(`/driver/page`, 'get', data)
// 获取未绑定的司机分页数据
export const unBindDriverList = data => createAPI(`/unBindingDrivers/`, 'get', data)
// 获取司机详情
export const driverDetail = data => createAPI(`/driver/${data}`, 'get', data)
// 司机更改车队
export const driverChangeFleet = (id, data) => createAPI(`/web-manager/transfor-center/bussiness/driver/${id}`, 'put', data)
// 更新司机详情-基本信息
export const driverDetailUpdate = (id, data) => createAPI(`/driver/${id}`, 'put', data)
// 获取司机驾驶证信息
export const driverLicenseDetail = data => createAPI(`/driverLicense/${data}`, 'get', data)
// 更新司机驾驶证信息
export const driverLicenseDetailUpdate = data => createAPI(`/driverLicense`, 'post', data)
// 获取司机车辆安排
export const driverTruckList = data => createAPI(`/web-manager/transfor-center/bussiness/driver/${data}/truck`, 'get', data)
// 安排车辆(车次)
export const arrangeCar = data => createAPI(`/transportLine/trips/${data.transportTripsId}/truckDrivers`, 'post', data)
// 安排车辆(司机)
export const driverArrangeCar = data => createAPI(`/driver/truckDrivers`, 'post', data)
// 安排司机(车辆)
export const carArrangeDriver = data => createAPI(`/truck/truckDrivers`, 'post', data)
// 获取车辆分页数据
export const truckList = data => createAPI(`/truck/page`, 'get', data)
// 获取司机配置车辆弹出框中车辆下拉的数据(已停用并且绑定司机数少于两个)
export const getTruckListInDriver = data => createAPI(`/unWorkingTrucks`, 'get', data)
// 添加车辆
export const truckTypeAdd = data => createAPI(`/truck`, 'post', data)
// 获取车辆详情-基本信息
export const truckTypeDetail = data => createAPI(`/truck/${data}`, 'get', data)
// 更新车辆详情-基本信息
export const truckTypeUpdate = (id, data) => createAPI(`/truck/${id}`, 'put', data)
// 获取车辆详情-行驶证信息
export const truckTypeDrivingLicenseDetail = data => createAPI(`/truck/${data}/license`, 'get', data)
// 获取车辆详情-保存行驶证信息
export const truckTypeDrivingLicense = (id, data) => createAPI(`/truck/${id}/license`, 'post', data)
// 获取车辆车系
export const truckTripsList = data => createAPI(`/truck/${data}/transportTrips`, 'get', data)
// 删除车辆
export const truckDel = data => createAPI(`/del/${data}`, 'delete', data)
// 启用车辆
export const truckStatusUse = data => createAPI(`/enable/${data}`, 'PUT', data)
// 停用车辆
export const truckStatusNoUse = data => createAPI(`/disable/${data}`, 'PUT', data)
// 获取线路类型分页数据
export const lineTypeList = data => createAPI(`/web-manager/transfor-center/bussiness/transportLineType/page`, 'get', data)
// 获取线路类型详情
export const lineTypeDetail = data => createAPI(`/web-manager/transfor-center/bussiness/transportLineType/${data}`, 'get', data)
// 更新线路类型
export const lineTypeUpdate = (id, data) => createAPI(`/web-manager/transfor-center/bussiness/transportLineType/${id}`, 'put', data)
// 添加线路类型
export const lineTypeAdd = data => createAPI(`/web-manager/transfor-center/bussiness/transportLineType`, 'post', data)
// 删除线路类型
export const lineTypeDel = data => createAPI(`/web-manager/transfor-center/bussiness/transportLineType/${data}`, 'delete', data)
// 获取线路分页数据
export const lineList = data => createAPI(`/transportLine/page`, 'post', data)
// 添加线路
export const lineAdd = data => createAPI(`/transportLine`, 'post', data)
// 删除线路
export const lineDel = data => createAPI(`/transportLine/${data}`, 'delete', data)
// 获取线路详情
export const lineDetail = data => createAPI(`/transportLine/${data}`, 'get', data)
// 更新线路
export const lineUpdate = (id, data) => createAPI(`/transportLine/${id}`, 'put', data)
// 获取车次下对应的车辆
export const carByTrips = data => createAPI(`/transportLine/trips/truckDrivers`, 'get', data)
// 根据线路id获取车次列表
export const tripsList = data => createAPI(`/transportLine/trips`, 'get', data)
// 添加车次
export const tripsAdd = data => createAPI(`/transportLine/trips`, 'post', data)
// 更新车次
export const tripsUpdate = (id, data) => createAPI(`/transportLine/trips/${id}`, 'put', data)
// 获取车次详情
export const tripsDetail = data => createAPI(`/transportLine/trips/${data}`, 'get', data)
// 删除车次
export const tripsDel = data => createAPI(`/transportLine/trips/${data}`, 'delete', data)
// 车次-安排车辆和司机
export const arrangeTripsTruckDrive = (id, data) => createAPI(`/web-manager/transfor-center/bussiness/transportLine/trips/${id}/truckDriver`, 'post', data)
// 车辆位置
export const truckPlace = data => createAPI(`/web-druid/apache-druid/query/select`, 'get', data)
// 车辆位置详情
export const truckPlaceInfo = data => createAPI(`/web-manager/transfor-center/truck-place-info/${data}`, 'get', data)
// 获取运费模板列表
export const freightManageList = data => createAPI(`/carriages`, 'get', data)
// 新增修改运费模板
export const freightManageOperate = data => createAPI(`/carriages`, 'post', data)
// 删除运费模板
export const freightManageDelete = data => createAPI(`/carriages/${data}`, 'delete', data)
// 新增工作模式
export const addWorkHistory = data => createAPI(`/work-patterns`, 'post', data)
// 修改工作模式
export const updateWorkHistory = data => createAPI(`/work-patterns`, 'put', data)
// 工作模式列表(带分页)
export const workHistoryList = data => createAPI(`/work-patterns/page`, 'get', data)
// 工作模式列表(下拉)
export const selectWorkHistoryList = data => createAPI(`/work-patterns/all`, 'get', data)
// 查看工作模式详情
export const workHistoryInfo = data => createAPI(`/work-patterns/${data}`, 'get', data)
// 删除工作模式
export const deleteWorkHistory = data => createAPI(`/work-patterns/${data}`, 'delete', data)
// 排班管理列表
export const workManage = data => createAPI(`/work-schedulings`, 'get', data)
// 人工调整排班
export const peopleSet = data => createAPI(`/work-schedulings`, 'put', data)
// 下载排班管理模板
export const downLoadFile = data => createAPI(`/work-schedulings/downExcelTemplate`, 'get', data, 'blob')
// 批量上传排班管理
export const batchUpload = data => createAPI(`/work-schedulings/uploadExcel`, 'post', data)
// 图片上传
export const imgUpload = data => createAPI(`/files/imageUpload`, 'post', data)
// 查询成本配置
export const getCostSetting = data => createAPI(`/cost-configuration-manager`, 'get', data)
// 设置成本
export const setCostSetting = data => createAPI(`/cost-configuration-manager`, 'post', data)

View File

@@ -0,0 +1,29 @@
/*
* @Author: zhangyanxin
* @Date: 2020-02-20
*
* 运输任务管理
*/
import { createAPI } from '@/utils/request'
// 分页查询运输任务接口
export const transportList = data => createAPI(`/transport-task-manager/page`, 'post', data)
// 获取运输任务统计接口
export const transportListCount = data => createAPI(`/transport-task-manager/count`, 'get', data)
// 分页查询司机单作业单接口
export const driverJobList = data => createAPI(`/web-manager/driver-job-manager/page`, 'post', data)
// 获取运输任务详情接口
export const transportJobDetail = data => createAPI(`/transport-task-manager/${data}`, 'get', data)
// 获取运输任务轨迹-画线
export const transportLocus = data => createAPI(`/apache-druid/query/selectOne`, 'get', data)
// 获取运输任务轨迹-途径点
export const transportPoint = data => createAPI(`/web-manager/transport-task-manager/point/${data}`, 'get', data)
// 空车取消运输任务
export const cancelTransportTask = data => createAPI(`/transport-task-manager/cancel/${data}`, 'put')
// 运输任务分配车辆
export const dispatchTransportTask = data => createAPI(`/transport-task-manager/adjust/${data.id}`, 'put', data)
// 获取已启用并且未绑定过车次的车辆
export const getUseCarSuccess = data => createAPI(`/workingTrucks`, 'get', data)

View File

@@ -0,0 +1,14 @@
[
{
"id": 1,
"name": "待发车"
},
{
"id": 2,
"name": "在途"
},
{
"id": 4,
"name": "已到达"
}
]

View File

@@ -0,0 +1,24 @@
import request from '@/utils/request'
export function login(data) {
return request({
url: '/user/login',
method: 'post',
data
})
}
export function getInfo(token) {
return request({
url: '/user/info',
method: 'get',
params: { token }
})
}
export function logout() {
return request({
url: '/user/logout',
method: 'post'
})
}

View File

@@ -0,0 +1,24 @@
/*
* @Author: zhangyanxin
* @Date: 2020-03-04
*
* 运单管理
*/
import { createAPI } from '@/utils/request'
// 获取运单统计数据
export const waybillStatic = data => createAPI(`/transport-order-manager/count`, 'get', data)
// 获取运单分页数据
export const waybillList = data => createAPI(`/transport-order-manager/page`, 'post', data)
// 获取运单详情数据
export const waybillDetail = data => createAPI(`/transport-order-manager/${data}`, 'get', data)
// 获取订单轨迹参数
export const orderLocusParamsList = data => createAPI(`/orderLocus/${data}`, 'get', data)
// 获取订单轨迹-画线
export const orderLocusList = data => createAPI(`/web-druid/apache-druid/query/selectByList`, 'post', data)
// 获取订单轨迹-打点
export const orderLocusPointList = data => createAPI(`/web-dispatch/orderLocus/point/${data}`, 'get', data)
// 获取调度配置
export const getDispatchConfig = data => createAPI(`/dispatch-configuration-manager`, 'get', data)
// 设置调度配置
export const setDispatchConfig = data => createAPI(`/dispatch-configuration-manager`, 'post', data)

View File

@@ -0,0 +1,18 @@
[
{
"id": 1,
"name": "新建"
},
{
"id": 2,
"name": "已装车"
},
{
"id": 3,
"name": "到达"
},
{
"id": 4,
"name": "到达终端网点"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Some files were not shown because too many files have changed in this diff Show More