Compare commits
5 Commits
2914d640f2
...
f88a2ec153
Author | SHA1 | Date |
---|---|---|
|
f88a2ec153 | |
|
78b3204656 | |
|
ec30d55126 | |
|
d36ffdfd12 | |
|
8e80f2f2be |
|
@ -1,10 +1,10 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 企业管理系统
|
VUE_APP_TITLE = 客户业务系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 企业管理系统/开发环境
|
# 客户业务系统/开发环境
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 企业管理系统
|
VUE_APP_TITLE = 客户业务系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
# 企业管理系统/生产环境
|
# 客户业务系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 企业管理系统
|
VUE_APP_TITLE = 客户业务系统
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
# 测试环境配置
|
# 测试环境配置
|
||||||
ENV = 'staging'
|
ENV = 'staging'
|
||||||
|
|
||||||
# 企业管理系统/测试环境
|
# 客户业务系统/测试环境
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|
|
@ -1,46 +1,23 @@
|
||||||
######################################################################
|
.DS_Store
|
||||||
# Build Tools
|
node_modules/
|
||||||
|
|
||||||
.gradle
|
|
||||||
/build/
|
|
||||||
!gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# IDE
|
|
||||||
|
|
||||||
### STS ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### JRebel ###
|
|
||||||
rebel.xml
|
|
||||||
### NetBeans ###
|
|
||||||
nbproject/private/
|
|
||||||
build/*
|
|
||||||
nbbuild/
|
|
||||||
dist/
|
dist/
|
||||||
nbdist/
|
npm-debug.log*
|
||||||
.nb-gradle/
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
**/*.log
|
||||||
|
|
||||||
######################################################################
|
tests/**/coverage/
|
||||||
# Others
|
tests/e2e/reports
|
||||||
*.log
|
selenium-debug.log
|
||||||
*.xml.versionsBackup
|
|
||||||
*.swp
|
|
||||||
|
|
||||||
!*/build/*.java
|
# Editor directories and files
|
||||||
!*/build/*.html
|
.idea
|
||||||
!*/build/*.xml
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.local
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
54
README.md
54
README.md
|
@ -1,26 +1,30 @@
|
||||||
## 系统模块
|
## 开发
|
||||||
|
|
||||||
~~~
|
```bash
|
||||||
com.muyu
|
# 克隆项目
|
||||||
├── muyu-ui // 前端框架 [80]
|
git clone https://gitea.qinmian.online/ruoyi/cloud-ui.git
|
||||||
├── muyu-gateway // 网关模块 [8080]
|
|
||||||
├── muyu-auth // 认证中心 [9200]
|
# 进入项目目录
|
||||||
├── muyu-common // 通用模块
|
cd cloud-ui
|
||||||
│ └── muyu-common-core // 核心模块
|
|
||||||
│ └── muyu-common-datascope // 权限范围
|
# 安装依赖
|
||||||
│ └── muyu-common-datasource // 多数据源
|
npm install
|
||||||
│ └── muyu-common-log // 日志记录
|
|
||||||
│ └── muyu-common-redis // 缓存服务
|
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||||
│ └── muyu-common-seata // 分布式事务
|
npm install --registry=https://registry.npmmirror.com
|
||||||
│ └── muyu-common-security // 安全模块
|
|
||||||
│ └── muyu-common-swagger // 系统接口
|
# 启动服务
|
||||||
│ └── muyu-common-system // 系统基础
|
npm run dev
|
||||||
├── muyu-modules // 业务模块
|
```
|
||||||
│ └── muyu-system // 系统模块 [9201]
|
|
||||||
│ └── muyu-gen // 代码生成 [9202]
|
浏览器访问 http://localhost:80
|
||||||
│ └── muyu-job // 定时任务 [9203]
|
|
||||||
│ └── muyu-file // 文件服务 [9300]
|
## 发布
|
||||||
├── muyu-visual // 图形化管理模块
|
|
||||||
│ └── muyu-visual-monitor // 监控中心 [9100]
|
```bash
|
||||||
├──pom.xml // 公共依赖
|
# 构建测试环境
|
||||||
~~~
|
npm run build:stage
|
||||||
|
|
||||||
|
# 构建生产环境
|
||||||
|
npm run build:prod
|
||||||
|
```
|
|
@ -1,12 +1,12 @@
|
||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
echo [信息] 安装Web工程,生成node_modules文件。
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
%~d0
|
%~d0
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
call mvn clean package -Dmaven.test.skip=true
|
npm install --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
pause
|
pause
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "muyu",
|
"name": "muyu",
|
||||||
"version": "3.6.3",
|
"version": "3.6.3",
|
||||||
"description": "企业管理系统",
|
"description": "客户业务系统",
|
||||||
"author": "若依",
|
"author": "若依",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -36,12 +36,13 @@
|
||||||
"url": "https://gitee.com/y_project/MuYu-Cloud.git"
|
"url": "https://gitee.com/y_project/MuYu-Cloud.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"axios": "0.24.0",
|
"axios": "0.24.0",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
"core-js": "3.25.3",
|
"core-js": "3.25.3",
|
||||||
"echarts": "5.4.0",
|
"echarts": "5.4.0",
|
||||||
"element-ui": "2.15.14",
|
"element-ui": "2.15.13",
|
||||||
"file-saver": "2.0.5",
|
"file-saver": "2.0.5",
|
||||||
"fuse.js": "6.4.3",
|
"fuse.js": "6.4.3",
|
||||||
"highlight.js": "9.18.5",
|
"highlight.js": "9.18.5",
|
||||||
|
@ -67,7 +68,7 @@
|
||||||
"babel-eslint": "10.1.0",
|
"babel-eslint": "10.1.0",
|
||||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"compression-webpack-plugin": "6.1.2",
|
"compression-webpack-plugin": "5.0.2",
|
||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
"eslint": "7.15.0",
|
"eslint": "7.15.0",
|
||||||
"eslint-plugin-vue": "7.2.0",
|
"eslint-plugin-vue": "7.2.0",
|
||||||
|
|
|
@ -7,8 +7,11 @@
|
||||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
<link href="<%= BASE_URL %>favicon.ico" rel="icon">
|
<link href="<%= BASE_URL %>favicon.ico" rel="icon">
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
|
|
||||||
|
|
||||||
<!--[if lt IE 11]>
|
<!--[if lt IE 11]>
|
||||||
<script>window.location.href = '/html/ie.html';</script><![endif]-->
|
<script>window.location.href = '/html/ie.html';</script><![endif]-->
|
||||||
|
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=c40d968cfc9a8d5ff5453709dc80c793"></script>
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
body,
|
body,
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询电子围栏列表
|
||||||
|
export function listFence(query) {
|
||||||
|
return request({
|
||||||
|
url: '/customerBusiness/fence/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询电子围栏详细
|
||||||
|
export function getFence(id) {
|
||||||
|
return request({
|
||||||
|
url: '/customerBusiness/fence/' + id,
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增电子围栏
|
||||||
|
export function addFence(data) {
|
||||||
|
return request({
|
||||||
|
url: '/customerBusiness/fence',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改电子围栏
|
||||||
|
export function updateFence(data) {
|
||||||
|
return request({
|
||||||
|
url: '/customerBusiness/fence/'+data.id,
|
||||||
|
method: 'put',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除电子围栏
|
||||||
|
export function delFence(id) {
|
||||||
|
return request({
|
||||||
|
url: '/customerBusiness/fence/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,10 @@ export function listVehicle(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/customerBusiness/vehicle/list',
|
url: '/customerBusiness/vehicle/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query,
|
||||||
|
// headers: {
|
||||||
|
// 'enterprise-code': 'jiang_0612'
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +16,10 @@ export function listVehicle(query) {
|
||||||
export function getVehicle(id) {
|
export function getVehicle(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/customerBusiness/vehicle/' + id,
|
url: '/customerBusiness/vehicle/' + id,
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +28,10 @@ export function addVehicle(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/customerBusiness/vehicle',
|
url: '/customerBusiness/vehicle',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +40,10 @@ export function updateVehicle(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/customerBusiness/vehicle/'+data.id,
|
url: '/customerBusiness/vehicle/'+data.id,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +51,43 @@ export function updateVehicle(data) {
|
||||||
export function delVehicle(id) {
|
export function delVehicle(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/customerBusiness/vehicle/' + id,
|
url: '/customerBusiness/vehicle/' + id,
|
||||||
method: 'delete'
|
method: 'delete',
|
||||||
|
headers: {
|
||||||
|
'enterprise-code': 'jiang_0612'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询车辆运营平台数据
|
||||||
|
export function getCar(id) {
|
||||||
|
return request({
|
||||||
|
url: '/netWorking/car/'+id,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改车辆运营平台
|
||||||
|
export function updateCar(data) {
|
||||||
|
return request({
|
||||||
|
url: '/netWorking/car/'+data.id,
|
||||||
|
method: 'put',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//完善企业信息
|
||||||
|
export function updateEnterprise(data) {
|
||||||
|
return request({
|
||||||
|
url: '/netWorking/car/updateEnterprise/'+data.id,
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询企业
|
||||||
|
export function selectByName() {
|
||||||
|
return request({
|
||||||
|
url: '/netWorking/car/selectByName',
|
||||||
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询企业信息列表
|
|
||||||
export function listCar(query) {
|
|
||||||
return request({
|
|
||||||
url: '/netWorking/car/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询企业信息详细
|
|
||||||
export function getCar(id) {
|
|
||||||
return request({
|
|
||||||
url: '/netWorking/car/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增企业信息
|
|
||||||
export function addCar(data) {
|
|
||||||
return request({
|
|
||||||
url: '/netWorking/car',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改企业信息
|
|
||||||
export function updateCar(data) {
|
|
||||||
return request({
|
|
||||||
url: '/netWorking/car/'+data.id,
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除企业信息
|
|
||||||
export function delCar(id) {
|
|
||||||
return request({
|
|
||||||
url: '/netWorking/car/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -73,7 +73,6 @@ service.interceptors.request.use(config => {
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
service.interceptors.response.use(res => {
|
service.interceptors.response.use(res => {
|
||||||
// debugger
|
|
||||||
// 未设置状态码则默认成功状态
|
// 未设置状态码则默认成功状态
|
||||||
const code = res.data.code || 200;
|
const code = res.data.code || 200;
|
||||||
// 获取错误信息
|
// 获取错误信息
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
<template>
|
||||||
|
<div class="index">
|
||||||
|
<el-button type="primary" @click="drawRectangle">绘制多边形</el-button>
|
||||||
|
<el-button type="primary" @click="editRectangle">编辑多边形</el-button>
|
||||||
|
<el-button type="primary" @click="deleRectangle">删除多边形</el-button>
|
||||||
|
<div id="amapContainer"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'amapFence',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
path: [], // 当前绘制的多边形经纬度数组
|
||||||
|
polygonItem: [], // 地图上绘制的所有多边形对象
|
||||||
|
polyEditors: [] // 所有编辑对象数组
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
paths: {} // 编辑
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.intAmap(() => {
|
||||||
|
if (this.paths) {
|
||||||
|
this.editRectangle(this.paths);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 地图初始化
|
||||||
|
intAmap (callBack) {
|
||||||
|
this.AMap = window.AMap;
|
||||||
|
this.AMap.plugin(['AMap.MouseTool', 'AMap.PolyEditor', 'AMap.ControlBar'], function () {
|
||||||
|
//TODO 创建控件并添加
|
||||||
|
});
|
||||||
|
this.map = new this.AMap.Map("amapContainer", {
|
||||||
|
center: [116.434381, 39.898515],
|
||||||
|
zoom: 14,
|
||||||
|
mapStyle: "amap://styles/darkblue",
|
||||||
|
pitch: 80,
|
||||||
|
rotation: -15,
|
||||||
|
viewMode: '3D',//开启3D视图,默认为关闭
|
||||||
|
buildingAnimation: true,//楼块出现是否带动画
|
||||||
|
});
|
||||||
|
this.map.addControl(new this.AMap.ControlBar());
|
||||||
|
if (callBack && typeof callBack == 'function') {
|
||||||
|
callBack();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 编辑围栏
|
||||||
|
editRectangle (paths) {
|
||||||
|
const path = paths;
|
||||||
|
const AMap = window.AMap;
|
||||||
|
var polygon = new this.AMap.Polygon({
|
||||||
|
path: path,
|
||||||
|
strokeColor: "#FF33FF",
|
||||||
|
strokeWeight: 6,
|
||||||
|
strokeOpacity: 0.2,
|
||||||
|
fillOpacity: 0.4,
|
||||||
|
fillColor: '#1791fc',
|
||||||
|
zIndex: 50,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.map.add(polygon);
|
||||||
|
this.polygonItem.push(polygon);
|
||||||
|
// 缩放地图到合适的视野级别
|
||||||
|
this.map.setFitView([polygon]);
|
||||||
|
|
||||||
|
this.polyEditor = new AMap.PolyEditor(this.map, polygon);
|
||||||
|
this.polyEditor.open();
|
||||||
|
this.polyEditors.push(this.polyEditor);
|
||||||
|
|
||||||
|
this.polyEditor.on('addnode', function (event) {
|
||||||
|
console.info('触发事件:addnode', event)
|
||||||
|
console.info('修改后的经纬度:', polygon.getPath())
|
||||||
|
});
|
||||||
|
|
||||||
|
this.polyEditor.on('adjust', function (event) {
|
||||||
|
console.info('触发事件:adjust', event)
|
||||||
|
console.info('修改后的经纬度:', polygon.getPath())
|
||||||
|
});
|
||||||
|
|
||||||
|
this.polyEditor.on('removenode', function (event) {
|
||||||
|
console.info('触发事件:removenode', event)
|
||||||
|
console.info('修改后的经纬度:', polygon.getPath())
|
||||||
|
});
|
||||||
|
|
||||||
|
this.polyEditor.on('end', function (event) {
|
||||||
|
console.info('触发事件: end', event)
|
||||||
|
console.info('修改后的经纬度:', polygon.getPath())
|
||||||
|
// event.target 即为编辑后的多边形对象
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 绘制多边形
|
||||||
|
drawRectangle () {
|
||||||
|
const vm = this;
|
||||||
|
this.mouseTool = new this.AMap.MouseTool(this.map);
|
||||||
|
const polygon = this.mouseTool.polygon({
|
||||||
|
strokeColor: 'red',
|
||||||
|
strokeOpacity: 0.5,
|
||||||
|
strokeWeight: 6,
|
||||||
|
fillColor: 'blue',
|
||||||
|
fillOpacity: 0.5,
|
||||||
|
// strokeStyle还支持 solid
|
||||||
|
strokeStyle: 'solid',
|
||||||
|
// strokeDasharray: [30,10],
|
||||||
|
});
|
||||||
|
|
||||||
|
this.mouseTool.on('draw', function (event) {
|
||||||
|
// event.obj 为绘制出来的覆盖物对象
|
||||||
|
var polygonItem = event.obj;
|
||||||
|
var paths = polygonItem.getPath();//取得绘制的多边形的每一个点坐标
|
||||||
|
console.log('覆盖物对象绘制完成各个点的坐标', paths);
|
||||||
|
var path = []; // 编辑的路径
|
||||||
|
paths.forEach(v => {
|
||||||
|
path.push([v.lng, v.lat])
|
||||||
|
});
|
||||||
|
vm.path = path;
|
||||||
|
vm.editRectangle(vm.path);
|
||||||
|
vm.polygonItem.push(event.obj);
|
||||||
|
vm.map.remove(event.obj); // 删除多边形
|
||||||
|
console.log(polygon, '------polygon-----');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 批量删除多边形
|
||||||
|
deleRectangle () {
|
||||||
|
// 取消编辑状态
|
||||||
|
this.polyEditors.forEach(v => {
|
||||||
|
v.close();
|
||||||
|
});
|
||||||
|
this.map.clearMap(); // 删除地图所有覆盖物
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
#amapContainer {
|
||||||
|
height: 800px;
|
||||||
|
width: 1000px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,274 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="电子围栏名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入电子围栏名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经纬度信息" prop="longitudeAndLatitude">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.longitudeAndLatitude"
|
||||||
|
placeholder="请输入经纬度信息"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['customerBusiness:fence:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['customerBusiness:fence:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['customerBusiness:fence:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['customerBusiness:fence:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="fenceList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="id" align="center" prop="id" />
|
||||||
|
<el-table-column label="电子围栏名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="围栏类型" align="center" prop="fenceType" />
|
||||||
|
<el-table-column label="经纬度信息" align="center" prop="longitudeAndLatitude" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['customerBusiness:fence:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['customerBusiness:fence:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改电子围栏对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="电子围栏名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入电子围栏名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电子围栏类型" prop="fenceType">
|
||||||
|
<el-input v-model="form.fenceType" placeholder="电子围栏类型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经纬度信息" prop="longitudeAndLatitude">
|
||||||
|
<el-input v-model="form.longitudeAndLatitude" placeholder="请输入经纬度信息" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listFence, getFence, delFence, addFence, updateFence } from "@/api/customerBusiness/fence";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Fence",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 电子围栏表格数据
|
||||||
|
fenceList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: null,
|
||||||
|
fenceType: null,
|
||||||
|
longitudeAndLatitude: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询电子围栏列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listFence(this.queryParams).then(response => {
|
||||||
|
this.fenceList = response.data.rows;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
name: null,
|
||||||
|
fenceType: null,
|
||||||
|
longitudeAndLatitude: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加电子围栏";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getFence(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改电子围栏";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateFence(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addFence(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除电子围栏编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delFence(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('customerBusiness/fence/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `fence_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1,45 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<span v-if="enterprise.enterpriseStatus==='N'"> <el-table :data="tableData" >
|
||||||
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="carList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="企业名称" align="center" prop="ebterpriseName" />
|
<el-table-column label="企业名称" align="center" prop="ebterpriseName" />
|
||||||
<el-table-column label="法定代表人" align="center" prop="legalPerson" />
|
<el-table-column label="法定代表人" align="center" prop="legalPerson" />
|
||||||
<el-table-column label="经营范围" align="center" prop="businessScope" />
|
<el-table-column label="企业成立时间" align="center" prop="estabinessDate" width="180"/>
|
||||||
<el-table-column label="注册地址" align="center" prop="address" />
|
<el-table-column label="注册地址" align="center" prop="address" />
|
||||||
<el-table-column label="企业联系方式" align="center" prop="contactPhone" />
|
<el-table-column label="企业联系方式" align="center" prop="contactPhone" />
|
||||||
<el-table-column label="公司邮箱" align="center" prop="email" />
|
<el-table-column label="公司邮箱" align="center" prop="email" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['netWorking:car:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['netWorking:car:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</span>
|
||||||
|
<span v-if="enterprise.enterpriseStatus!=='N'">
|
||||||
|
<span>{{"企业信息未完善"}}</span>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="handleUpdate(open,enterprise)"
|
||||||
|
>完善信息</el-button>
|
||||||
|
</span>
|
||||||
|
|
||||||
<pagination
|
<!-- 添加或修改车辆运营平台对话框 -->
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改企业信息对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="企业名称" prop="ebterpriseName">
|
<el-form-item label="企业名称" prop="ebterpriseName">
|
||||||
|
@ -90,9 +69,6 @@
|
||||||
placeholder="请选择认证时间">
|
placeholder="请选择认证时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="服务级别" prop="serviceLevel">
|
|
||||||
<el-input v-model="form.serviceLevel" placeholder="请输入服务级别" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="开通服务id" prop="openServerId">
|
<el-form-item label="开通服务id" prop="openServerId">
|
||||||
<el-input v-model="form.openServerId" placeholder="请输入开通服务id" />
|
<el-input v-model="form.openServerId" placeholder="请输入开通服务id" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -112,50 +88,23 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCar, getCar, delCar, addCar, updateCar } from "@/api/netWorking/car";
|
import {parseTime} from "../../../utils/muyu";
|
||||||
|
import { selectByName, updateEnterprise } from '@/api/customerBusiness/vehicle'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Car",
|
name: "Car",
|
||||||
|
dicts: ['service_level', 'enterprise_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
enterprise:{},
|
||||||
ids: [],
|
// 车辆运营平台表格数据
|
||||||
// 非单个禁用
|
tableData: [],
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 企业信息表格数据
|
|
||||||
carList: [],
|
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
ebterpriseName: null,
|
|
||||||
legalPerson: null,
|
|
||||||
businessLincenseNumber: null,
|
|
||||||
estabinessDate: null,
|
|
||||||
businessScope: null,
|
|
||||||
address: null,
|
|
||||||
contactPhone: null,
|
|
||||||
email: null,
|
|
||||||
status: null,
|
|
||||||
registrationDate: null,
|
|
||||||
certificationId: null,
|
|
||||||
authenticationDate: null,
|
|
||||||
serviceLevel: null,
|
|
||||||
openServerId: null,
|
|
||||||
addServerId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
@ -164,18 +113,10 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.selectByName();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询企业信息列表 */
|
parseTime,
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listCar(this.queryParams).then(response => {
|
|
||||||
this.carList = response.data.rows;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -193,7 +134,7 @@ export default {
|
||||||
address: null,
|
address: null,
|
||||||
contactPhone: null,
|
contactPhone: null,
|
||||||
email: null,
|
email: null,
|
||||||
status: null,
|
enterpriseStatus: null,
|
||||||
registrationDate: null,
|
registrationDate: null,
|
||||||
certificationId: null,
|
certificationId: null,
|
||||||
authenticationDate: null,
|
authenticationDate: null,
|
||||||
|
@ -208,73 +149,28 @@ export default {
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加企业信息";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(open,row) {
|
||||||
this.reset();
|
// this.reset();
|
||||||
const id = row.id || this.ids
|
this.form = row;
|
||||||
getCar(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改企业信息";
|
this.title = "修改车辆运营平台";
|
||||||
|
},
|
||||||
|
selectByName() {
|
||||||
|
selectByName().then(response => {
|
||||||
|
console.log(response)
|
||||||
|
this.enterprise = response.data;
|
||||||
|
this.tableData.push(this.enterprise)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
updateEnterprise(this.form).then(response =>{
|
||||||
if (valid) {
|
console.log(this.form)
|
||||||
if (this.form.id != null) {
|
|
||||||
updateCar(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.selectByName();
|
||||||
});
|
})
|
||||||
} else {
|
|
||||||
addCar(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除企业信息编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delCar(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('netWorking/car/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `car_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -0,0 +1,431 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="车辆vin" prop="vin">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.vin"
|
||||||
|
placeholder="请输入车辆vin"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品牌" prop="brand">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.brand"
|
||||||
|
placeholder="请输入品牌"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型号" prop="model">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.model"
|
||||||
|
placeholder="请输入型号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="生产日期" prop="productionDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.productionDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择生产日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车身颜色" prop="color">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.color"
|
||||||
|
placeholder="请输入车身颜色"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发动机排量" prop="engineCapacity">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.engineCapacity"
|
||||||
|
placeholder="请输入发动机排量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变速器类型" prop="transmission">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.transmission"
|
||||||
|
placeholder="请输入变速器类型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="行驶里程" prop="mileage">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.mileage"
|
||||||
|
placeholder="请输入行驶里程"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="注册日期" prop="registrationDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.registrationDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择注册日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车牌号码" prop="licenseNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.licenseNumber"
|
||||||
|
placeholder="请输入车牌号码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="持有者" prop="holder">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.holder"
|
||||||
|
placeholder="请输入持有者"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['customerBusiness:vehicle:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['customerBusiness:vehicle:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['customerBusiness:vehicle:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['customerBusiness:vehicle:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="vehicleList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="车辆id" align="center" prop="id" />
|
||||||
|
<el-table-column label="车辆vin" align="center" prop="vin" />
|
||||||
|
<el-table-column label="品牌" align="center" prop="brand" />
|
||||||
|
<el-table-column label="型号" align="center" prop="model" />
|
||||||
|
<el-table-column label="生产日期" align="center" prop="productionDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="车身类型" align="center" prop="bodyType" />
|
||||||
|
<el-table-column label="车身颜色" align="center" prop="color" />
|
||||||
|
<el-table-column label="发动机排量" align="center" prop="engineCapacity" />
|
||||||
|
<el-table-column label="燃油类型" align="center" prop="fuelType" />
|
||||||
|
<el-table-column label="变速器类型" align="center" prop="transmission" />
|
||||||
|
<el-table-column label="驱动方式" align="center" prop="driveType" />
|
||||||
|
<el-table-column label="行驶里程" align="center" prop="mileage" />
|
||||||
|
<el-table-column label="注册日期" align="center" prop="registrationDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.registrationDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="车牌号码" align="center" prop="licenseNumber" />
|
||||||
|
<el-table-column label="持有者" align="center" prop="holder" />
|
||||||
|
<el-table-column label="车辆类型" align="center" prop="vehicleType" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['customerBusiness:vehicle:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['customerBusiness:vehicle:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改车辆录入对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="车辆vin" prop="vin">
|
||||||
|
<el-input v-model="form.vin" placeholder="请输入车辆vin" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品牌" prop="brand">
|
||||||
|
<el-input v-model="form.brand" placeholder="请输入品牌" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="型号" prop="model">
|
||||||
|
<el-input v-model="form.model" placeholder="请输入型号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="生产日期" prop="productionDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.productionDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择生产日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车身颜色" prop="color">
|
||||||
|
<el-input v-model="form.color" placeholder="请输入车身颜色" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车身类型" prop="bodyType">
|
||||||
|
<el-input v-model="form.bodyType" placeholder="请输入车身类型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车辆类型" prop="vehicleType">
|
||||||
|
<el-input v-model="form.vehicleType" placeholder="请输入车辆类型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发动机排量" prop="engineCapacity">
|
||||||
|
<el-input v-model="form.engineCapacity" placeholder="请输入发动机排量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变速器类型" prop="transmission">
|
||||||
|
<el-input v-model="form.transmission" placeholder="请输入变速器类型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="行驶里程" prop="mileage">
|
||||||
|
<el-input v-model="form.mileage" placeholder="请输入行驶里程" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="注册日期" prop="registrationDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.registrationDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择注册日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车牌号码" prop="licenseNumber">
|
||||||
|
<el-input v-model="form.licenseNumber" placeholder="请输入车牌号码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="持有者" prop="holder">
|
||||||
|
<el-input v-model="form.holder" placeholder="请输入持有者" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listVehicle, getVehicle, delVehicle, addVehicle, updateVehicle } from "@/api/customerBusiness/vehicle";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Vehicle",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 车辆录入表格数据
|
||||||
|
vehicleList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
vin: null,
|
||||||
|
brand: null,
|
||||||
|
model: null,
|
||||||
|
productionDate: null,
|
||||||
|
bodyType: null,
|
||||||
|
color: null,
|
||||||
|
engineCapacity: null,
|
||||||
|
fuelType: null,
|
||||||
|
transmission: null,
|
||||||
|
driveType: null,
|
||||||
|
mileage: null,
|
||||||
|
registrationDate: null,
|
||||||
|
licenseNumber: null,
|
||||||
|
holder: null,
|
||||||
|
vehicleType: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询车辆录入列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listVehicle(this.queryParams).then(response => {
|
||||||
|
this.vehicleList = response.data.rows;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
vin: null,
|
||||||
|
brand: null,
|
||||||
|
model: null,
|
||||||
|
productionDate: null,
|
||||||
|
bodyType: null,
|
||||||
|
color: null,
|
||||||
|
engineCapacity: null,
|
||||||
|
fuelType: null,
|
||||||
|
transmission: null,
|
||||||
|
driveType: null,
|
||||||
|
mileage: null,
|
||||||
|
registrationDate: null,
|
||||||
|
licenseNumber: null,
|
||||||
|
holder: null,
|
||||||
|
vehicleType: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加车辆录入";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getVehicle(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改车辆录入";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateVehicle(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addVehicle(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除车辆录入编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delVehicle(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('customerBusiness/vehicle/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `vehicle_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -5,7 +5,6 @@
|
||||||
<blockquote class="text-warning" style="font-size: 14px">
|
<blockquote class="text-warning" style="font-size: 14px">
|
||||||
领取阿里云通用云产品1888优惠券
|
领取阿里云通用云产品1888优惠券
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
href="https://www.aliyun.com/minisite/goods?userCode=brki8iof"
|
href="https://www.aliyun.com/minisite/goods?userCode=brki8iof"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -45,9 +44,9 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :lg="12" :sm="24" style="padding-left: 20px">
|
<el-col :lg="12" :sm="24" style="padding-left: 20px">
|
||||||
<h2>企业后台管理框架</h2>
|
<h2>若依后台管理框架</h2>
|
||||||
<p>
|
<p>
|
||||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了客户业务系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>当前版本:</b> <span>v{{ version }}</span>
|
<b>当前版本:</b> <span>v{{ version }}</span>
|
||||||
|
@ -885,7 +884,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Index",
|
name: "Index",
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title">企业运营平台</h3>
|
<h3 class="title">若依后台管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
|
@ -124,7 +124,7 @@ export default {
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
username: username === undefined ? this.loginForm.username : username,
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
|
@ -135,7 +135,6 @@ export default {
|
||||||
Cookies.set("username", this.loginForm.username, {expires: 30});
|
Cookies.set("username", this.loginForm.username, {expires: 30});
|
||||||
Cookies.set("password", encrypt(this.loginForm.password), {expires: 30});
|
Cookies.set("password", encrypt(this.loginForm.password), {expires: 30});
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30});
|
Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("username");
|
Cookies.remove("username");
|
||||||
Cookies.remove("password");
|
Cookies.remove("password");
|
||||||
|
@ -144,7 +143,6 @@ export default {
|
||||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||||
this.$router.push({path: this.redirect || "/"}).catch(() => {
|
this.$router.push({path: this.redirect || "/"}).catch(() => {
|
||||||
});
|
});
|
||||||
console.log(this.loginForm)
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
|
|
|
@ -1,369 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['netWorking:car:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['netWorking:car:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['netWorking:car:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['netWorking:car:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="carList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="企业名称" align="center" prop="ebterpriseName" />
|
|
||||||
<el-table-column label="法定代表人" align="center" prop="legalPerson" />
|
|
||||||
<el-table-column label="企业成立时间" align="center" prop="estabinessDate" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.estabinessDate, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="注册地址" align="center" prop="address" />
|
|
||||||
<el-table-column label="企业联系方式" align="center" prop="contactPhone" />
|
|
||||||
<el-table-column label="公司邮箱" align="center" prop="email" />
|
|
||||||
<el-table-column label="企业当前状态" align="center" prop="enterpriseStatus">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.enterprise_status" :value="scope.row.enterpriseStatus"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="服务级别" align="center" prop="serviceLevel">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.service_level" :value="scope.row.serviceLevel"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['netWorking:car:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['netWorking:car:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
@click="authentication(scope.row)"
|
|
||||||
v-if="scope.row.enterpriseStatus!=='N'"
|
|
||||||
>审核</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改车辆运营平台对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="企业名称" prop="ebterpriseName">
|
|
||||||
<el-input v-model="form.ebterpriseName" placeholder="请输入企业名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="法定代表人" prop="legalPerson">
|
|
||||||
<el-input v-model="form.legalPerson" placeholder="请输入法定代表人" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="经营执照凭证号码" prop="businessLincenseNumber">
|
|
||||||
<el-input v-model="form.businessLincenseNumber" placeholder="请输入经营执照凭证号码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业成立时间" prop="estabinessDate">
|
|
||||||
<el-date-picker clearable
|
|
||||||
v-model="form.estabinessDate"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择企业成立时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="经营范围" prop="businessScope">
|
|
||||||
<el-input v-model="form.businessScope" placeholder="请输入经营范围" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="注册地址" prop="address">
|
|
||||||
<el-input v-model="form.address" placeholder="请输入注册地址" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业联系方式" prop="contactPhone">
|
|
||||||
<el-input v-model="form.contactPhone" placeholder="请输入企业联系方式" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="公司邮箱" prop="email">
|
|
||||||
<el-input v-model="form.email" placeholder="请输入公司邮箱" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业当前状态" prop="enterpriseStatus">
|
|
||||||
<el-radio-group v-model="form.enterpriseStatus">
|
|
||||||
<el-radio
|
|
||||||
v-for="dict in dict.type.enterprise_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{dict.label}}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业入驻平台时期" prop="registrationDate">
|
|
||||||
<el-date-picker clearable
|
|
||||||
v-model="form.registrationDate"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择企业入驻平台时期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业认证id" prop="certificationId">
|
|
||||||
<el-input v-model="form.certificationId" placeholder="请输入企业认证id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="认证时间" prop="authenticationDate">
|
|
||||||
<el-date-picker clearable
|
|
||||||
v-model="form.authenticationDate"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择认证时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服务级别" prop="serviceLevel">
|
|
||||||
<el-select v-model="form.serviceLevel" placeholder="请选择服务级别">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.service_level"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="parseInt(dict.value)"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="开通服务id" prop="openServerId">
|
|
||||||
<el-input v-model="form.openServerId" placeholder="请输入开通服务id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="增值服务id" prop="addServerId">
|
|
||||||
<el-input v-model="form.addServerId" placeholder="请输入增值服务id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listCar, getCar, delCar, addCar, updateCar, authentication } from '@/api/netWorking/car'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Car",
|
|
||||||
dicts: ['service_level', 'enterprise_status'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 车辆运营平台表格数据
|
|
||||||
carList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
ebterpriseName: null,
|
|
||||||
legalPerson: null,
|
|
||||||
businessLincenseNumber: null,
|
|
||||||
estabinessDate: null,
|
|
||||||
businessScope: null,
|
|
||||||
address: null,
|
|
||||||
contactPhone: null,
|
|
||||||
email: null,
|
|
||||||
enterpriseStatus: null,
|
|
||||||
registrationDate: null,
|
|
||||||
certificationId: null,
|
|
||||||
authenticationDate: null,
|
|
||||||
serviceLevel: null,
|
|
||||||
openServerId: null,
|
|
||||||
addServerId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
authentication(row){
|
|
||||||
authentication(row).then(
|
|
||||||
res=>{
|
|
||||||
this.$modal.msgSuccess("认证成功");
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
/** 查询车辆运营平台列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listCar(this.queryParams).then(response => {
|
|
||||||
this.carList = response.data.rows;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
ebterpriseName: null,
|
|
||||||
legalPerson: null,
|
|
||||||
businessLincenseNumber: null,
|
|
||||||
estabinessDate: null,
|
|
||||||
businessScope: null,
|
|
||||||
address: null,
|
|
||||||
contactPhone: null,
|
|
||||||
email: null,
|
|
||||||
enterpriseStatus: null,
|
|
||||||
registrationDate: null,
|
|
||||||
certificationId: null,
|
|
||||||
authenticationDate: null,
|
|
||||||
serviceLevel: null,
|
|
||||||
openServerId: null,
|
|
||||||
addServerId: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
remark: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加车辆运营平台";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getCar(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改车辆运营平台";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateCar(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addCar(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除车辆运营平台编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delCar(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('netWorking/car/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `car_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">企业运营平台</h3>
|
<h3 class="title">若依后台管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" auto-complete="off" placeholder="账号" type="text">
|
<el-input v-model="registerForm.username" auto-complete="off" placeholder="账号" type="text">
|
||||||
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="user"/>
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="user"/>
|
||||||
|
|
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '企业管理系统' // 网页标题
|
const name = process.env.VUE_APP_TITLE || '客户业务系统' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue