Compare commits
9 Commits
ui_2024_3_
...
master
Author | SHA1 | Date |
---|---|---|
|
ff793e68b1 | |
|
5c3f971274 | |
|
69a51fe624 | |
|
03207ec87d | |
|
ec2a485106 | |
|
de80f953a6 | |
|
043ced7518 | |
|
ba012ebdf7 | |
|
208d7f4cab |
|
@ -36,6 +36,7 @@
|
||||||
"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",
|
||||||
|
@ -46,8 +47,10 @@
|
||||||
"fuse.js": "6.4.3",
|
"fuse.js": "6.4.3",
|
||||||
"highlight.js": "9.18.5",
|
"highlight.js": "9.18.5",
|
||||||
"js-beautify": "1.13.0",
|
"js-beautify": "1.13.0",
|
||||||
"js-cookie": "3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"jsencrypt": "3.0.0-rc.1",
|
"jsencrypt": "3.0.0-rc.1",
|
||||||
|
"less-loader": "^12.2.0",
|
||||||
|
"maptalks": "^1.0.0-rc.33",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"quill": "1.3.7",
|
"quill": "1.3.7",
|
||||||
"screenfull": "5.0.2",
|
"screenfull": "5.0.2",
|
||||||
|
@ -69,7 +72,7 @@
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"compression-webpack-plugin": "5.0.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",
|
||||||
"lint-staged": "10.5.3",
|
"lint-staged": "10.5.3",
|
||||||
"runjs": "4.4.2",
|
"runjs": "4.4.2",
|
||||||
|
@ -77,6 +80,7 @@
|
||||||
"sass-loader": "10.1.1",
|
"sass-loader": "10.1.1",
|
||||||
"script-ext-html-webpack-plugin": "2.1.5",
|
"script-ext-html-webpack-plugin": "2.1.5",
|
||||||
"svg-sprite-loader": "5.1.1",
|
"svg-sprite-loader": "5.1.1",
|
||||||
|
"vue-amap": "^0.5.10",
|
||||||
"vue-template-compiler": "2.6.12"
|
"vue-template-compiler": "2.6.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<!-- <script type="text/javascript">-->
|
||||||
|
<!-- window._AMapSecurityConfig = {-->
|
||||||
|
<!-- securityJsCode: "e4ec82d19a5e0c7a7298911f1e2cd2f1",-->
|
||||||
|
<!-- }-->
|
||||||
|
<!-- </script>-->
|
||||||
|
<!-- <script src="https://webapi.amap.com/loader.js"></script>-->
|
||||||
|
<!-- <script type="text/javascript"-->
|
||||||
|
<!-- src="https://webapi.amap.com/maps?v=2.0&key=1666544c7b614ba063b4c58d5c148248">-->
|
||||||
|
<!-- </script>-->
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||||
<meta content="webkit" name="renderer">
|
<meta content="webkit" name="renderer">
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
import fence from "@/views/system/fence/index.vue";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏列表
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function fenceList(data){
|
||||||
|
return request({
|
||||||
|
url:'/business/fence/list',
|
||||||
|
method:"post",
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增围栏
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function fenceAdd(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/fence/fenceAdd',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除围栏
|
||||||
|
* @param fenceId
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function fenceDelete(fenceId) {
|
||||||
|
return request({
|
||||||
|
url: '/business/fence/fenceDelete/'+fenceId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改围栏
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function fenceUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/fence/fenceUpdate',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fenceUpdateMap(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/fence/fenceUpdateMap',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
import fence from "@/views/system/fence/index.vue";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标识列表
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function markersList(data){
|
||||||
|
return request({
|
||||||
|
url:'/business/markers/list',
|
||||||
|
method:"post",
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标识
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function markersInsert(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/markers/insert',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定围栏
|
||||||
|
* @param data
|
||||||
|
* @returns {AxiosPromise}
|
||||||
|
*/
|
||||||
|
export function insertMarkersFence(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/markers/insertMarkersFence',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
* @param markersId
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function markersDelete(markersId) {
|
||||||
|
return request({
|
||||||
|
url: '/business/markers/delete/'+markersId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
* @param markersId
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function markersFenceList(markersId) {
|
||||||
|
return request({
|
||||||
|
url: '/business/markers/markersFenceList/'+markersId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标识
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function markersUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/markers/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ export function updateAuthRole(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询部门下拉树结构
|
// 查询部门下拉树结构
|
||||||
export function deptTreeSelect() {
|
export function deptTreeSelect(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/deptTree',
|
url: '/system/user/deptTree',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
import fence from "@/views/system/fence/index.vue";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标识列表
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function vehicleList(data){
|
||||||
|
return request({
|
||||||
|
url:'/business/vehicle/list',
|
||||||
|
method:"post",
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标识
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function vehicleInsert(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/vehicle/vehicleInsert',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定围栏
|
||||||
|
* @param data
|
||||||
|
* @returns {AxiosPromise}
|
||||||
|
*/
|
||||||
|
export function insertMarkersFence(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/vehicle/insertMarkersFence',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
* @param fenceId
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function vehicleDelete(fenceId) {
|
||||||
|
return request({
|
||||||
|
url: '/business/vehicle/vehicleDelete/'+fenceId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标识
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function vehicleUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/vehicle/vehicleUpdate',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -38,6 +38,9 @@ import VueMeta from 'vue-meta'
|
||||||
// 字典数据组件
|
// 字典数据组件
|
||||||
import DictData from '@/components/DictData'
|
import DictData from '@/components/DictData'
|
||||||
|
|
||||||
|
|
||||||
|
Vue.prototype.$cookies = Cookies; // 注入到Vue原型链上
|
||||||
|
|
||||||
// 全局方法挂载
|
// 全局方法挂载
|
||||||
Vue.prototype.getDicts = getDicts
|
Vue.prototype.getDicts = getDicts
|
||||||
Vue.prototype.getConfigKey = getConfigKey
|
Vue.prototype.getConfigKey = getConfigKey
|
||||||
|
|
|
@ -73,6 +73,48 @@ export const constantRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: Layout,
|
||||||
|
redirect: 'index',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/fence',
|
||||||
|
component: () => import('@/views/system/fence/index'),
|
||||||
|
name: 'Index',
|
||||||
|
meta: {title: '电子围栏', icon: 'fence'}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: Layout,
|
||||||
|
redirect: 'index',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/markers',
|
||||||
|
component: () => import('@/views/system/markers/index'),
|
||||||
|
name: 'Index',
|
||||||
|
meta: {title: '车辆标识', icon: 'markers'}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: Layout,
|
||||||
|
redirect: 'index',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/vehicle',
|
||||||
|
component: () => import('@/views/system/vehicle/index'),
|
||||||
|
name: 'Index',
|
||||||
|
meta: {title: '车辆管理', icon: 'vehicle'}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {getInfo, login, logout, refreshToken} from '@/api/login'
|
import {getInfo, login, logout, refreshToken} from '@/api/login'
|
||||||
import {getToken, removeToken, setExpiresIn, setToken} from '@/utils/auth'
|
import {getToken, removeToken, setExpiresIn, setToken} from '@/utils/auth'
|
||||||
|
import Cookies from "js-cookie";
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
|
@ -7,6 +8,7 @@ const user = {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
|
companySign: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: []
|
permissions: []
|
||||||
},
|
},
|
||||||
|
@ -32,6 +34,10 @@ const user = {
|
||||||
},
|
},
|
||||||
SET_PERMISSIONS: (state, permissions) => {
|
SET_PERMISSIONS: (state, permissions) => {
|
||||||
state.permissions = permissions
|
state.permissions = permissions
|
||||||
|
},
|
||||||
|
SET_COMPANY: (state, companySign) => {
|
||||||
|
state.companySign = companySign
|
||||||
|
Cookies.set('companySign', companySign)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -60,6 +66,7 @@ const user = {
|
||||||
GetInfo({commit, state}) {
|
GetInfo({commit, state}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo().then(res => {
|
getInfo().then(res => {
|
||||||
|
// debugger
|
||||||
const user = res.data.user
|
const user = res.data.user
|
||||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
|
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
|
||||||
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||||
|
@ -70,6 +77,8 @@ const user = {
|
||||||
}
|
}
|
||||||
commit('SET_ID', user.userId)
|
commit('SET_ID', user.userId)
|
||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
|
let de = user.dept
|
||||||
|
commit('SET_COMPANY',de.companySign)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|
|
@ -73,7 +73,7 @@ service.interceptors.request.use(config => {
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
service.interceptors.response.use(res => {
|
service.interceptors.response.use(res => {
|
||||||
debugger
|
// debugger
|
||||||
// 未设置状态码则默认成功状态
|
// 未设置状态码则默认成功状态
|
||||||
const code = res.data.code || 200;
|
const code = res.data.code || 200;
|
||||||
// 获取错误信息
|
// 获取错误信息
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
|
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
|
||||||
<el-form-item label="部门名称" prop="deptName">
|
<!-- <el-form-item label="企业名称" prop="companySign">-->
|
||||||
|
<!-- <treeselect-->
|
||||||
|
<!-- v-model="queryParams.companySign"-->
|
||||||
|
<!-- :options="deptOptions"-->
|
||||||
|
<!-- :show-count="true"-->
|
||||||
|
<!-- placeholder="请选择上级部门"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="名称" prop="deptName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.deptName"
|
v-model="queryParams.deptName"
|
||||||
clearable
|
clearable
|
||||||
|
@ -26,6 +34,17 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5" v-if="'ZL' === this.$cookies.get('companySign')">
|
||||||
|
<el-button
|
||||||
|
v-hasPermi="['system:dept:add']"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="handleAddEnterprise"
|
||||||
|
>企业入驻
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['system:dept:add']"
|
v-hasPermi="['system:dept:add']"
|
||||||
|
@ -59,7 +78,7 @@
|
||||||
row-key="deptId"
|
row-key="deptId"
|
||||||
>
|
>
|
||||||
<el-table-column label="部门名称" prop="deptName" width="260"></el-table-column>
|
<el-table-column label="部门名称" prop="deptName" width="260"></el-table-column>
|
||||||
<el-table-column label="排序" prop="orderNum" width="200"></el-table-column>
|
<el-table-column label="企业标识" prop="companySign" width="200"></el-table-column>
|
||||||
<el-table-column label="状态" prop="status" width="100">
|
<el-table-column label="状态" prop="status" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
|
@ -101,6 +120,69 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 企业入驻对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="openCompany" append-to-body width="600px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="企业名称" prop="deptName">
|
||||||
|
<el-input v-model="form.deptName" placeholder="请输入企业名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="显示排序" prop="orderNum">
|
||||||
|
<el-input-number v-model="form.orderNum" :min="0" controls-position="right"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="负责人" prop="leader">
|
||||||
|
<el-input v-model="form.leader" maxlength="20" placeholder="请输入负责人"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input v-model="form.phone" maxlength="11" placeholder="请输入联系电话"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="邮箱" prop="email">
|
||||||
|
<el-input v-model="form.email" maxlength="50" placeholder="请输入邮箱"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="企业状态">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{ dict.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="企业标识" prop="leader">
|
||||||
|
<el-input v-model="form.companySign" maxlength="20" placeholder="请输入企业标识"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
|
||||||
<!-- 添加或修改部门对话框 -->
|
<!-- 添加或修改部门对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" append-to-body width="600px">
|
<el-dialog :title="title" :visible.sync="open" append-to-body width="600px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
@ -168,6 +250,7 @@
|
||||||
import {addDept, delDept, getDept, listDept, listDeptExcludeChild, updateDept} from "@/api/system/dept";
|
import {addDept, delDept, getDept, listDept, listDeptExcludeChild, updateDept} from "@/api/system/dept";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
import Cookies from "js-cookie";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Dept",
|
name: "Dept",
|
||||||
|
@ -187,12 +270,15 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 是否显示企业入驻对话框
|
||||||
|
openCompany:false,
|
||||||
// 是否展开,默认全部展开
|
// 是否展开,默认全部展开
|
||||||
isExpandAll: true,
|
isExpandAll: true,
|
||||||
// 重新渲染表格状态
|
// 重新渲染表格状态
|
||||||
refreshTable: true,
|
refreshTable: true,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
companySign: undefined,
|
||||||
deptName: undefined,
|
deptName: undefined,
|
||||||
status: undefined
|
status: undefined
|
||||||
},
|
},
|
||||||
|
@ -204,7 +290,7 @@ export default {
|
||||||
{required: true, message: "上级部门不能为空", trigger: "blur"}
|
{required: true, message: "上级部门不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
deptName: [
|
deptName: [
|
||||||
{required: true, message: "部门名称不能为空", trigger: "blur"}
|
{required: true, message: "部门/企业名称不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
orderNum: [
|
orderNum: [
|
||||||
{required: true, message: "显示排序不能为空", trigger: "blur"}
|
{required: true, message: "显示排序不能为空", trigger: "blur"}
|
||||||
|
@ -230,6 +316,7 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Cookies,
|
||||||
/** 查询部门列表 */
|
/** 查询部门列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -282,6 +369,7 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
if (row != undefined) {
|
if (row != undefined) {
|
||||||
this.form.parentId = row.deptId;
|
this.form.parentId = row.deptId;
|
||||||
|
this.form.companySign = row.companySign;
|
||||||
}
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加部门";
|
this.title = "添加部门";
|
||||||
|
@ -289,6 +377,16 @@ export default {
|
||||||
this.deptOptions = this.handleTree(response.data, "deptId");
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 企业入驻操作 */
|
||||||
|
handleAddEnterprise(row) {
|
||||||
|
this.reset();
|
||||||
|
this.form.parentId = 0;
|
||||||
|
this.openCompany = true;
|
||||||
|
this.title = "企业入驻";
|
||||||
|
listDept().then(response => {
|
||||||
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 展开/折叠操作 */
|
/** 展开/折叠操作 */
|
||||||
toggleExpandAll() {
|
toggleExpandAll() {
|
||||||
this.refreshTable = false;
|
this.refreshTable = false;
|
||||||
|
|
|
@ -0,0 +1,403 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div v-if="showMapp">
|
||||||
|
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称">
|
||||||
|
<el-input v-model="queryParams.fenceName" placeholder="模糊查询围栏名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏类型">
|
||||||
|
<el-select v-model="queryParams.fenceTypeId" placeholder="请选择围栏类型">
|
||||||
|
<el-option label="驶出" value="1">驶出</el-option>
|
||||||
|
<el-option label="驶入" value="2">驶入</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏状态">
|
||||||
|
<el-select v-model="queryParams.fenceState" placeholder="请选择围栏状态">
|
||||||
|
<el-option label="正常" value="1">正常</el-option>
|
||||||
|
<el-option label="停用" value="2">停用</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit" icon="el-icon-search">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" @click="fencadd">新增</el-button>
|
||||||
|
|
||||||
|
<el-table :data="fenceList" style="width: 100%" ref="multipleTable">
|
||||||
|
|
||||||
|
<el-table-column label="围栏名称" align="center" prop="fenceName" />
|
||||||
|
|
||||||
|
<el-table-column label="围栏类型"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.fenceTypeId==1">驶出</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.fenceTypeId==2">驶入</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="围栏状态"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.fenceState==1"><el-tag>正常</el-tag></span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.fenceState==2"><el-tag>停用</el-tag></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="经纬度信息" width="280">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.fenceMessage }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary" icon="el-icon-map-location" @click="handleWdit(scope.row)">编辑围栏</el-link>
|
||||||
|
|
||||||
|
<el-link type="primary" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-link>
|
||||||
|
|
||||||
|
<el-link type="primary" icon="el-icon-delete" @click="handleDelete(scope.row.fenceId)">删除</el-link>
|
||||||
|
</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="dialogFormVisible">
|
||||||
|
|
||||||
|
<el-form :model="fences">
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="fences.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="围栏类型" :label-width="formLabelWidth">
|
||||||
|
<el-select v-model="fences.fenceTypeId" placeholder="请选择活动区域">
|
||||||
|
<el-option label="驶出" value="1">驶出</el-option>
|
||||||
|
<el-option label="驶入" value="2">驶入</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addAll">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 修改电子围栏-->
|
||||||
|
<el-dialog :title="title" :visible.sync="dialogFormVisible1">
|
||||||
|
|
||||||
|
<el-form :model="fences">
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth1">
|
||||||
|
<el-input v-model="fences.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏类型" :label-width="formLabelWidth1">
|
||||||
|
<el-select v-model="fences.fenceTypeId" placeholder="请选择活动区域">
|
||||||
|
<el-option label="驶出" value="1">驶出</el-option>
|
||||||
|
<el-option label="驶入" value="2">驶入</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏状态">
|
||||||
|
<el-radio-group v-model="fences.fenceState" :label-width="formLabelWidth1">
|
||||||
|
<el-radio :label="1">正常</el-radio>
|
||||||
|
<el-radio :label="2">停用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="updateAll">修 改</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<el-button @click="drawPolygon">绘制围栏</el-button>
|
||||||
|
<!-- <el-button @click="saveFenceData">保存围栏</el-button>-->
|
||||||
|
<el-button @click="cleanFence">清除围栏</el-button>
|
||||||
|
|
||||||
|
<div id="container" v-if="showMap"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||||
|
//例如:import 《组件名称》 from '《组件路径》,
|
||||||
|
import {fenceAdd, fenceDelete, fenceList, fenceUpdate, fenceUpdateMap} from "@/api/system/fence";
|
||||||
|
import mouseTool from "quill";
|
||||||
|
export default {
|
||||||
|
name: "map-view",
|
||||||
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
|
mounted() {
|
||||||
|
this.initAMap();
|
||||||
|
},
|
||||||
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
//这里存放数据"
|
||||||
|
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
fenceName: null,
|
||||||
|
fenceTypeId: null,
|
||||||
|
fenceState: null,
|
||||||
|
},
|
||||||
|
total:0,
|
||||||
|
dialogFormVisible:false,
|
||||||
|
formLabelWidth:'120px',
|
||||||
|
fences:{
|
||||||
|
|
||||||
|
},
|
||||||
|
title:'',
|
||||||
|
dialogFormVisible1:false,
|
||||||
|
formLabelWidth1:'120px',
|
||||||
|
dj:false,
|
||||||
|
mouseTool:null,
|
||||||
|
map:null,
|
||||||
|
Amap:null,
|
||||||
|
|
||||||
|
//跳转地图页面
|
||||||
|
showMap:false,
|
||||||
|
showMapp:true,
|
||||||
|
|
||||||
|
fenceList: [],
|
||||||
|
|
||||||
|
//保存围栏
|
||||||
|
mapRequest:{
|
||||||
|
fenceId:0,
|
||||||
|
jwd:[]
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//计算属性 类似于data概念",
|
||||||
|
computed: {},
|
||||||
|
//监控data中的数据变化",
|
||||||
|
watch: {},
|
||||||
|
//方法集合",
|
||||||
|
methods: {
|
||||||
|
//获取围栏列表
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
fenceList(this.queryParams).then(res => {
|
||||||
|
this.fenceList = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 搜索框
|
||||||
|
onSubmit() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
//修改电子围栏
|
||||||
|
handleEdit(obj) {
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
this.fences = obj
|
||||||
|
this.title = '修改电子围栏'
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
updateAll() {
|
||||||
|
fenceUpdate(this.fences).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.dialogFormVisible1=false;
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
fencadd() {
|
||||||
|
this.fences = {}
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
this.title = '新增页面'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
addAll() {
|
||||||
|
fenceAdd(this.fences).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//删除电子围栏
|
||||||
|
handleDelete(fenceId){
|
||||||
|
fenceDelete(fenceId,'deleted').then(
|
||||||
|
res=>{
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//编辑围栏
|
||||||
|
handleWdit(obj) {
|
||||||
|
this.showMap=true
|
||||||
|
this.showMapp=false
|
||||||
|
this.fences = obj
|
||||||
|
this.initAMap()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//初始化地图
|
||||||
|
initAMap(){
|
||||||
|
|
||||||
|
AMapLoader.load({
|
||||||
|
key:"1666544c7b614ba063b4c58d5c148248",
|
||||||
|
version:"2.0",
|
||||||
|
plugins:["AMap.Scale","AMap.MouseTool"],
|
||||||
|
})
|
||||||
|
.then((AMap)=>{
|
||||||
|
this.Amap=AMap;
|
||||||
|
this.map=new AMap.Map("container",{
|
||||||
|
//设置地图容器ID
|
||||||
|
viewMode:"2D",
|
||||||
|
zoom:11,
|
||||||
|
center: [116.397428, 39.90923],
|
||||||
|
});
|
||||||
|
|
||||||
|
this.mouseTool=new AMap.MouseTool(this.map);
|
||||||
|
this.mouseTool.on('draw', this.drawReady)
|
||||||
|
})
|
||||||
|
.catch((e)=>{
|
||||||
|
console.log(e);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
drawPolygon () {
|
||||||
|
this.mouseTool.polygon({
|
||||||
|
strokeColor: "#FF33FF",
|
||||||
|
strokeOpacity: 1,
|
||||||
|
strokeWeight: 6,
|
||||||
|
strokeOpacity: 0.2,
|
||||||
|
fillColor: '#1791fc',
|
||||||
|
fillOpacity: 0.4,
|
||||||
|
// 线样式还支持 'dashed'
|
||||||
|
strokeStyle: "solid",
|
||||||
|
// strokeStyle是dashed时有效
|
||||||
|
strokeDasharray: [30,10],
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 在 drawReady 方法中获取绘制的围栏的经纬度信息
|
||||||
|
drawReady(event){
|
||||||
|
console.log(event)
|
||||||
|
console.log(event.obj.getPath())
|
||||||
|
const coordinates = event.obj.getPath()
|
||||||
|
|
||||||
|
const coordinatesString = coordinates.map(coord => `${coord.lng},${coord.lat}`).join(';');
|
||||||
|
console.log(coordinatesString);
|
||||||
|
this.fences.fenceMessage = coordinatesString;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
console.info('覆盖物对象绘制完成')
|
||||||
|
|
||||||
|
// // 获取绘制的围栏经纬度信息
|
||||||
|
// const path =event.obj.getPath()
|
||||||
|
// // 将经纬度信息保存到 scope.row.fenceMessage 中
|
||||||
|
// this.tableData.forEach(item=>{
|
||||||
|
// if(item.fenceId === event.obj.fenceId){ // 假设 fenceId 是围栏的唯一标识符
|
||||||
|
// item.fenceMessage = path.toString(); // 这里使用 toString() 方法将路径转换为字符串形式
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
fenceUpdateMap(this.fences).then(res=>{
|
||||||
|
// this.$modal.msgSuccess("保存成功")
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//清除围栏
|
||||||
|
cleanFence(){
|
||||||
|
this.mouseTool.close(true)
|
||||||
|
},
|
||||||
|
|
||||||
|
// //保存围栏
|
||||||
|
// saveFenceData(){
|
||||||
|
// console.log(this.mapRequest.jwd)
|
||||||
|
// saveFence(this.mapRequest).then(response=>{
|
||||||
|
// // this.$modal.msgSuccess("保存成功")
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
|
created() {
|
||||||
|
// this.list();
|
||||||
|
this.getList();
|
||||||
|
// this.mapRequest.fenceId=this.$router.query.fenceId
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
}, //生命周期 - 创建之前",
|
||||||
|
beforeMount() {
|
||||||
|
}, //生命周期 - 挂载之前",
|
||||||
|
beforeUpdate() {
|
||||||
|
}, //生命周期 - 更新之前",
|
||||||
|
updated() {
|
||||||
|
}, //生命周期 - 更新之后",
|
||||||
|
beforeDestroy() {
|
||||||
|
}, //生命周期 - 销毁之前",
|
||||||
|
destroyed() {
|
||||||
|
}, //生命周期 - 销毁完成",
|
||||||
|
activated() {
|
||||||
|
} //如果页面有keep-alive缓存功能,这个函数会触发",
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.dashboard{
|
||||||
|
&-container{
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
&-text{
|
||||||
|
font-size:30px;
|
||||||
|
line-height:46px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#container{
|
||||||
|
|
||||||
|
padding:0px;
|
||||||
|
margin:0px;
|
||||||
|
width:100%;
|
||||||
|
height:800px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,211 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
|
||||||
|
|
||||||
|
<el-form-item label="标识名称">
|
||||||
|
<el-input v-model="queryParams.markersName" placeholder="模糊查询标识名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit" icon="el-icon-search">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" @click="markersAdd">新增</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-table :data="markersList" style="width: 100%" ref="multipleTable">
|
||||||
|
|
||||||
|
<el-table-column label="标识编号" align="center" prop="markersId" />
|
||||||
|
|
||||||
|
<el-table-column label="标识名称" align="center" prop="markersName" />
|
||||||
|
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary" icon="el-icon-map-location" @click="handleWdit(scope.row)">绑定电子围栏</el-link>
|
||||||
|
|
||||||
|
<el-link type="primary" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-link>
|
||||||
|
|
||||||
|
<el-link type="primary" icon="el-icon-delete" @click="handleDelete(scope.row.markersId)">删除</el-link>
|
||||||
|
</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="dialogFormVisible">
|
||||||
|
|
||||||
|
<el-form :model="markers">
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="markers.markersName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addAll">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 修改电子围栏-->
|
||||||
|
<el-dialog :title="title" :visible.sync="dialogFormVisible1">
|
||||||
|
|
||||||
|
<el-form :model="markers">
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth1">
|
||||||
|
<el-input v-model="markers.markersName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="updateAll">修 改</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { markersList, markersInsert, markersDelete, insertMarkersFence, markersUpdate, markersFenceList} from "@/api/system/markers";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
//这里存放数据"
|
||||||
|
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
markersName: null
|
||||||
|
},
|
||||||
|
markersFences:[],
|
||||||
|
total: 0,
|
||||||
|
dialogFormVisible: false,
|
||||||
|
formLabelWidth: '120px',
|
||||||
|
markers: {},
|
||||||
|
title: '',
|
||||||
|
dialogFormVisible1: false,
|
||||||
|
formLabelWidth1: '120px',
|
||||||
|
markersList: [],
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//计算属性 类似于data概念",
|
||||||
|
computed: {},
|
||||||
|
//监控data中的数据变化",
|
||||||
|
watch: {},
|
||||||
|
//方法集合",
|
||||||
|
methods: {
|
||||||
|
//获取围栏列表
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
markersList(this.queryParams).then(res => {
|
||||||
|
this.markersList = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
markersFenceShow(){
|
||||||
|
markersFenceList().then(res => {
|
||||||
|
this.markersFences = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 搜索框
|
||||||
|
onSubmit() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleWdit(obj) {
|
||||||
|
this.markers = obj
|
||||||
|
this.markersFenceShow(obj.markersId)
|
||||||
|
console.log(this.markersFenceShow)
|
||||||
|
},
|
||||||
|
|
||||||
|
//修改标识
|
||||||
|
handleEdit(obj) {
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
this.markers = obj
|
||||||
|
this.title = '修改标识'
|
||||||
|
},
|
||||||
|
|
||||||
|
updateAll() {
|
||||||
|
markersUpdate(this.markers).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.dialogFormVisible1 = false;
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
markersAdd() {
|
||||||
|
this.markers = {}
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
this.title = '新增页面'
|
||||||
|
},
|
||||||
|
|
||||||
|
addAll() {
|
||||||
|
markersInsert(this.markers).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
//删除电子围栏
|
||||||
|
handleDelete(markersId) {
|
||||||
|
markersDelete(markersId, 'deleted').then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
}, //生命周期 - 创建之前",
|
||||||
|
beforeMount() {
|
||||||
|
}, //生命周期 - 挂载之前",
|
||||||
|
beforeUpdate() {
|
||||||
|
}, //生命周期 - 更新之前",
|
||||||
|
updated() {
|
||||||
|
}, //生命周期 - 更新之后",
|
||||||
|
beforeDestroy() {
|
||||||
|
}, //生命周期 - 销毁之前",
|
||||||
|
destroyed() {
|
||||||
|
}, //生命周期 - 销毁完成",
|
||||||
|
activated() {
|
||||||
|
} //如果页面有keep-alive缓存功能,这个函数会触发",
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -141,7 +141,6 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column align="center" type="selection" width="50"/>
|
<el-table-column align="center" type="selection" width="50"/>
|
||||||
<el-table-column v-if="columns[0].visible" key="userId" align="center" label="用户编号" prop="userId"/>
|
<el-table-column v-if="columns[0].visible" key="userId" align="center" label="用户编号" prop="userId"/>
|
||||||
|
@ -149,11 +148,13 @@
|
||||||
prop="userName"/>
|
prop="userName"/>
|
||||||
<el-table-column v-if="columns[2].visible" key="nickName" :show-overflow-tooltip="true" align="center" label="用户昵称"
|
<el-table-column v-if="columns[2].visible" key="nickName" :show-overflow-tooltip="true" align="center" label="用户昵称"
|
||||||
prop="nickName"/>
|
prop="nickName"/>
|
||||||
<el-table-column v-if="columns[3].visible" key="deptName" :show-overflow-tooltip="true" align="center" label="部门"
|
<el-table-column v-if="columns[3].visible" key="companySign" :show-overflow-tooltip="true" align="center" label="企业标识"
|
||||||
|
prop="dept.companySign"/>
|
||||||
|
<el-table-column v-if="columns[4].visible" key="deptName" :show-overflow-tooltip="true" align="center" label="部门"
|
||||||
prop="dept.deptName"/>
|
prop="dept.deptName"/>
|
||||||
<el-table-column v-if="columns[4].visible" key="phonenumber" align="center" label="手机号码"
|
<el-table-column v-if="columns[5].visible" key="phonenumber" align="center" label="手机号码"
|
||||||
prop="phonenumber" width="120"/>
|
prop="phonenumber" width="120"/>
|
||||||
<el-table-column v-if="columns[5].visible" key="status" align="center" label="状态">
|
<el-table-column v-if="columns[6].visible" key="status" align="center" label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
|
@ -398,7 +399,7 @@ export default {
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 部门树选项
|
// 部门树选项
|
||||||
deptOptions: undefined,
|
deptOptions: [],
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 部门名称
|
// 部门名称
|
||||||
|
@ -488,8 +489,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getDeptTree(1);
|
||||||
this.getDeptTree();
|
|
||||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
this.initPassword = response.data.msg;
|
this.initPassword = response.data.msg;
|
||||||
});
|
});
|
||||||
|
@ -506,10 +506,19 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
getDeptTree() {
|
getDeptTree(num) {
|
||||||
|
// debugger
|
||||||
deptTreeSelect().then(response => {
|
deptTreeSelect().then(response => {
|
||||||
this.deptOptions = response.data;
|
this.deptOptions = response.data;
|
||||||
|
if (1 === num){
|
||||||
|
this.queryParams.deptId = response.data[0].id;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
// if (1 === num){
|
||||||
|
// this.queryParams = this.deptOptions[0].id;
|
||||||
|
// this.getList();
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 筛选节点
|
// 筛选节点
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
|
|
|
@ -0,0 +1,317 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
|
||||||
|
|
||||||
|
<el-form-item label="车辆VIN">
|
||||||
|
<el-input v-model="queryParams.vehicleVIN" placeholder="车辆VIN"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="车辆类型">
|
||||||
|
<el-input v-model="queryParams.vehicleTypeId" placeholder="车辆类型"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="电机厂商">
|
||||||
|
<el-input v-model="queryParams.motorBusiness" placeholder="电机厂商"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="电池厂商">
|
||||||
|
<el-input v-model="queryParams.batteryBusiness" placeholder="电池厂商"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="电机ID">
|
||||||
|
<el-input v-model="queryParams.MotorID" placeholder="电机ID"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="电池名称">
|
||||||
|
<el-input v-model="queryParams.BatteryID" placeholder="电池ID"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="车辆状态">
|
||||||
|
<el-select v-model="queryParams.vehicleState" placeholder="请选择围栏状态">
|
||||||
|
<el-option label="正常" value="1">正常</el-option>
|
||||||
|
<el-option label="停用" value="2">停用</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit" icon="el-icon-search">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" @click="vehicleAdd">新增</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-table :data="vehicleList" style="width: 100%" ref="multipleTable">
|
||||||
|
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="vehicleVIN" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="vehicleTypeId" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="motorBusiness" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="batteryBusiness" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="motorID" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="batteryID" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="vehicleVIN" />
|
||||||
|
<el-table-column label="车辆VIN" align="center" prop="vehicleVIN" />
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="围栏状态"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.vehicleState==1"><el-tag>正常</el-tag></span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.vehicleState==2"><el-tag>停用</el-tag></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary" icon="el-icon-map-location" @click="handleWdit(scope.row)">编辑围栏</el-link>
|
||||||
|
|
||||||
|
<el-link type="primary" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-link>
|
||||||
|
|
||||||
|
<el-link type="primary" icon="el-icon-delete" @click="handleDelete(scope.row.fenceId)">删除</el-link>
|
||||||
|
</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="dialogFormVisible">
|
||||||
|
|
||||||
|
<el-form :model="vehicle">
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="围栏类型" :label-width="formLabelWidth">
|
||||||
|
<el-select v-model="vehicle.fenceTypeId" placeholder="请选择活动区域">
|
||||||
|
<el-option label="驶出" value="1">驶出</el-option>
|
||||||
|
<el-option label="驶入" value="2">驶入</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addAll">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 修改电子围栏-->
|
||||||
|
<el-dialog :title="title" :visible.sync="dialogFormVisible1">
|
||||||
|
|
||||||
|
<el-form :model="vehicle">
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth1">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="围栏名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="vehicle.fenceName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="围栏类型" :label-width="formLabelWidth1">
|
||||||
|
<el-select v-model="vehicle.fenceTypeId" placeholder="请选择活动区域">
|
||||||
|
<el-option label="驶出" value="1">驶出</el-option>
|
||||||
|
<el-option label="驶入" value="2">驶入</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="围栏状态">
|
||||||
|
<el-radio-group v-model="vehicle.fenceState" :label-width="formLabelWidth1">
|
||||||
|
<el-radio :label="1">正常</el-radio>
|
||||||
|
<el-radio :label="2">停用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="updateAll">修 改</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {vehicleInsert, insertMarkersFence, vehicleList, vehicleDelete, vehicleUpdate} from "@/api/system/vehicle";
|
||||||
|
export default {
|
||||||
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
//这里存放数据"
|
||||||
|
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
vehicleVIN: null,
|
||||||
|
vehicleTypeId: null,
|
||||||
|
motorBusiness: null,
|
||||||
|
batteryBusiness: null,
|
||||||
|
MotorID: null,
|
||||||
|
BatteryID: null,
|
||||||
|
vehicleState:null
|
||||||
|
|
||||||
|
},
|
||||||
|
total:0,
|
||||||
|
dialogFormVisible:false,
|
||||||
|
formLabelWidth:'120px',
|
||||||
|
|
||||||
|
vehicle:{},
|
||||||
|
title:'',
|
||||||
|
dialogFormVisible1:false,
|
||||||
|
formLabelWidth1:'120px',
|
||||||
|
|
||||||
|
vehicleList: [],
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//计算属性 类似于data概念",
|
||||||
|
computed: {},
|
||||||
|
//监控data中的数据变化",
|
||||||
|
watch: {},
|
||||||
|
//方法集合",
|
||||||
|
methods: {
|
||||||
|
//获取围栏列表
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
vehicleList(this.queryParams).then(res => {
|
||||||
|
this.vehicleList = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 搜索框
|
||||||
|
onSubmit() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
//修改电子围栏
|
||||||
|
handleEdit(obj) {
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
this.vehicle = obj
|
||||||
|
this.title = '修改车辆信息'
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
updateAll() {
|
||||||
|
vehicleUpdate(this.vehicle).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.dialogFormVisible1=false;
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
vehicleAdd() {
|
||||||
|
this.vehicle = {}
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
this.title = '新增页面'
|
||||||
|
},
|
||||||
|
|
||||||
|
addAll() {
|
||||||
|
vehicleInsert(this.vehicle).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//删除车辆信息
|
||||||
|
handleDelete(vehicleId){
|
||||||
|
vehicleDelete(vehicleId,'deleted').then(
|
||||||
|
res=>{
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//编辑车辆标识
|
||||||
|
handleWdit(obj) {
|
||||||
|
this.vehicle = obj
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
}, //生命周期 - 创建之前",
|
||||||
|
beforeMount() {
|
||||||
|
}, //生命周期 - 挂载之前",
|
||||||
|
beforeUpdate() {
|
||||||
|
}, //生命周期 - 更新之前",
|
||||||
|
updated() {
|
||||||
|
}, //生命周期 - 更新之后",
|
||||||
|
beforeDestroy() {
|
||||||
|
}, //生命周期 - 销毁之前",
|
||||||
|
destroyed() {
|
||||||
|
}, //生命周期 - 销毁完成",
|
||||||
|
activated() {
|
||||||
|
} //如果页面有keep-alive缓存功能,这个函数会触发",
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue