Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
卡
卡车调度系统
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caicaicai
卡车调度系统
Commits
ea0dc6f8
Commit
ea0dc6f8
authored
Nov 18, 2022
by
SQL_Mou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://h.gemho.cn:7099/caicaicai/truckDispatching
parents
ecb236ae
f672485f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
600 additions
and
180 deletions
+600
-180
.env.development
.env.development
+3
-3
common.js
src/assets/js/common.js
+42
-0
Map2.vue
src/components/mars3d/Map2.vue
+91
-14
Map4.vue
src/components/mars3d/Map4.vue
+80
-32
index.vue
src/views/DeviceManage/deviceMan/index.vue
+12
-9
index.vue
src/views/MLargeScreen/index.vue
+20
-6
index.vue
src/views/carManagement/carInformation/index.vue
+3
-3
index.vue
src/views/driverManagement/index.vue
+153
-32
index.vue
src/views/regionalManagement/regionalInformation/index.vue
+55
-22
index.vue
src/views/regionalManagement/regionalPathMap/index.vue
+95
-36
index.vue
...ws/system/dataDictionary/largeScreenMenuDispose/index.vue
+45
-23
vue.config.js
vue.config.js
+1
-0
No files found.
.env.development
View file @
ea0dc6f8
...
...
@@ -2,10 +2,10 @@ ENV = 'development'
# 接口地址
#VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_BASE_API = 'http://192.168.0.108:909
0
'
VUE_APP_BASE_API = 'http://192.168.0.108:909
2
'
VUE_APP_WS_API = 'ws://8.143.203.103:9092/webSocket'
VUE_APP_LOCAL_API = 'http://192.168.0.108:909
0
'
VUE_APP_LOCAL_API2 = 'http://192.168.0.108:909
0
'
VUE_APP_LOCAL_API = 'http://192.168.0.108:909
2
'
VUE_APP_LOCAL_API2 = 'http://192.168.0.108:909
2
'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true
src/assets/js/common.js
View file @
ea0dc6f8
...
...
@@ -2289,6 +2289,32 @@ var HttpReq = function(){
params
:
param
,
})
},
//新增用户
apiusersAdd
:
function
(
data
){
return
request
({
url
:
'
/api/users
'
,
method
:
'
POST
'
,
data
:
data
,
}).
then
((
res
)
=>
{
return
res
})
},
//修改用户
apiusersUpdate
:
function
(
data
){
return
request
({
url
:
'
/api/users
'
,
method
:
'
PUT
'
,
data
:
data
,
})
},
//删除用户
apiusersDel
:
function
(
data
){
return
request
({
url
:
'
/api/users
'
,
method
:
'
Delete
'
,
data
:
data
,
})
},
//获取用于选择用户的用户名(没用过的用户名)
getNoUseSystemUserNameQuery
:
function
(
param
){
return
request
({
...
...
@@ -2587,6 +2613,22 @@ var HttpReq = function(){
params
:
param
,
})
},
//所有角色信息
apirolesallQuery
:
function
(
param
){
return
request
({
url
:
'
/api/roles/all
'
,
method
:
'
get
'
,
params
:
param
,
})
},
//获取轨迹分段时间以及坐标
apimineAlarmHistoryTjQuery
:
function
(
param
){
return
request
({
url
:
'
/api/mineAlarmHistory/Tj
'
,
method
:
'
get
'
,
params
:
param
,
})
},
...
...
src/components/mars3d/Map2.vue
View file @
ea0dc6f8
...
...
@@ -48,6 +48,8 @@ export default {
carPlaySpeed
:
1
,
stopPointData
:[],
leadTime
:
false
,
//获取停车时间段以及坐标点
stopCarCoordinates
:[],
}
},
...
...
@@ -137,19 +139,56 @@ export default {
hisCenterData
.
push
(
obj1
);
that
.
historyTrajectoryData
=
[...
hisCenterData
];
this
.
$nextTick
(()
=>
{
if
(
this
.
appendToBody
)
{
document
.
body
.
appendChild
(
this
.
$el
)
}
if
(
this
.
mapKey
)
{
this
.
initMars3d
(
this
.
options
)
}
else
{
mars3d
.
Resource
.
fetchJson
({
url
:
this
.
url
}).
then
((
data
)
=>
{
this
.
initMars3d
(
data
.
map3d
)
// 构建地图
//获取停车时间段以及坐标点
if
(
that
.
leadTime
){
HttpReq
.
truckDispatching
.
apimineAlarmHistoryTjQuery
({
number
:
that
.
carNumber
,
bTime
:
bTime
,
eTime
:
eTime
}).
then
((
resTj
)
=>
{
let
arr1
=
[];
resTj
.
data
.
forEach
((
itemTj1
,
indexTj1
)
=>
{
let
arr2
=
{};
let
arr2_5
=
[];
itemTj1
.
line
.
forEach
((
itemTj2
,
indexTj2
)
=>
{
let
arr3
=
[];
arr3
.
push
(
itemTj2
.
x
);
arr3
.
push
(
itemTj2
.
y
);
arr3
.
push
(
1000
);
arr2_5
.
push
(
arr3
);
})
arr2
.
time1
=
itemTj1
.
time1
;
arr2
.
time2
=
itemTj1
.
time2
;
arr2
.
line
=
arr2_5
;
arr1
.
push
(
arr2
);
})
that
.
stopCarCoordinates
=
arr1
;
this
.
$nextTick
(()
=>
{
if
(
this
.
appendToBody
)
{
document
.
body
.
appendChild
(
this
.
$el
)
}
if
(
this
.
mapKey
)
{
this
.
initMars3d
(
this
.
options
)
}
else
{
mars3d
.
Resource
.
fetchJson
({
url
:
this
.
url
}).
then
((
data
)
=>
{
this
.
initMars3d
(
data
.
map3d
)
// 构建地图
})
}
})
}
})
})
}
else
{
that
.
stopCarCoordinates
=
[];
this
.
$nextTick
(()
=>
{
if
(
this
.
appendToBody
)
{
document
.
body
.
appendChild
(
this
.
$el
)
}
if
(
this
.
mapKey
)
{
this
.
initMars3d
(
this
.
options
)
}
else
{
mars3d
.
Resource
.
fetchJson
({
url
:
this
.
url
}).
then
((
data
)
=>
{
this
.
initMars3d
(
data
.
map3d
)
// 构建地图
})
}
})
}
}
}
})
...
...
@@ -262,6 +301,19 @@ export default {
that
.
addDemoGraphic1
(
graphicLayer2
,
item
.
lon
,
item
.
lat
,
item
.
alarmTime
,
item
.
time
);
})
//展示轨迹
that
.
stopCarCoordinates
.
forEach
((
item
,
index
)
=>
{
var
graphicLayer3
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayer3
);
var
itemText
=
`<table style="width: auto;">
<tr>
<th scope="col" colspan="2" style="text-align:center;font-size:15px;">
${
item
.
time1
}
至
${
item
.
time2
}
</th>
</tr>
</table>`
;
initGraphicManager
(
graphicLayer3
,
itemText
);
that
.
addDemoGraphic2
(
graphicLayer3
,
item
);
})
//webgl渲染失败后,刷新页面
map
.
on
(
mars3d
.
EventType
.
renderError
,
function
(
event
){
window
.
location
.
reload
();
...
...
@@ -275,7 +327,7 @@ export default {
// 抛出事件
this
.
$emit
(
'
onload
'
,
map
)
},
//车辆轨迹1
//车辆轨迹1
:车辆运动
addGraphic_02
(
graphicLayer2
,
positions
,
truckName
)
{
let
that
=
this
;
var
property
=
new
Cesium
.
SampledPositionProperty
();
...
...
@@ -299,8 +351,8 @@ export default {
width
:
4
,
color
:
"
rgb(251,84,48)
"
,
opacity
:
1.0
,
leadTime
:
that
.
leadTime
?
9999
:
0
,
// 前方的路线不显示
trailTime
:
that
.
leadTime
?
9999
:
0
,
leadTime
:
0
,
// 前方的路线不显示
trailTime
:
0
,
//高亮时的样式(默认为鼠标移入,也可以指定type:'click'单击高亮),构造后也可以openHighlight、closeHighlight方法来手动调用
highlight
:
{
type
:
mars3d
.
EventType
.
click
,
...
...
@@ -356,6 +408,31 @@ export default {
})
graphicLayer
.
addGraphic
(
graphic
)
},
//展示轨迹
addDemoGraphic2
(
graphicLayer
,
item
)
{
const
graphic
=
new
mars3d
.
graphic
.
PolylineEntity
({
positions
:
item
.
line
,
style
:
{
width
:
6
,
materialType
:
mars3d
.
MaterialType
.
PolylineOutline
,
color
:
'
blue
'
,
label
:
{
text
:
""
,
font_size
:
18
,
color
:
"
white
"
,
distanceDisplayCondition
:
true
,
distanceDisplayCondition_far
:
500000
,
distanceDisplayCondition_near
:
0
,
visibleDepth
:
false
,
},
highlight
:
{
type
:
mars3d
.
EventType
.
click
,
color
:
"
#ff0000
"
,
},
},
})
graphicLayer
.
addGraphic
(
graphic
)
},
//测距画线
startDrawGraphic
(
boo
)
{
let
that
=
this
;
...
...
src/components/mars3d/Map4.vue
View file @
ea0dc6f8
...
...
@@ -47,6 +47,9 @@
toJavaCoordinates
:[],
controlPointId
:
0
,
lineData
:[],
weilanzuobianData
:[],
weilanName
:[],
areaColorData
:[],
}
},
...
...
@@ -90,6 +93,7 @@
methods
:
{
//后台获取数据
getCoordinate
(
data
)
{
let
that
=
this
;
this
.
zuobianData
=
data
;
HttpReq
.
truckDispatching
.
apiPathmapQuery
({
size
:
9999
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
...
...
@@ -117,17 +121,40 @@
arr1
.
push
(
obj1
);
});
this
.
lineData
=
arr1
;
this
.
$nextTick
(()
=>
{
if
(
this
.
appendToBody
)
{
document
.
body
.
appendChild
(
this
.
$el
)
}
if
(
this
.
mapKey
)
{
this
.
initMars3d
(
this
.
options
)
}
else
{
mars3d
.
Resource
.
fetchJson
({
url
:
this
.
url
}).
then
((
data
)
=>
{
this
.
initMars3d
(
data
.
map3d
)
// 构建地图
//获取电子围栏
HttpReq
.
truckDispatching
.
screenMapSetUpQuery
({
size
:
9999
}).
then
((
res
)
=>
{
if
(
true
){;
let
data1
=
[];
for
(
let
key
in
res
){
that
.
weilanName
.
push
(
key
);
that
.
areaColorData
.
push
(
res
[
key
][
0
].
color
);
let
arrays
=
[];
res
[
key
].
forEach
(
function
(
item
){
var
arr
=
[];
arr
[
0
]
=
item
.
lon
;
arr
[
1
]
=
item
.
lat
;
arr
[
2
]
=
"
500
"
;
arrays
.
push
(
arr
);
})
data1
.
push
(
arrays
)
}
that
.
weilanzuobianData
=
data1
this
.
$nextTick
(()
=>
{
if
(
this
.
appendToBody
)
{
document
.
body
.
appendChild
(
this
.
$el
)
}
if
(
this
.
mapKey
)
{
this
.
initMars3d
(
this
.
options
)
}
else
{
mars3d
.
Resource
.
fetchJson
({
url
:
this
.
url
}).
then
((
data
)
=>
{
this
.
initMars3d
(
data
.
map3d
)
// 构建地图
})
}
})
}
})
})
...
...
@@ -164,14 +191,12 @@
})
this
.
$nextTick
(()
=>
{
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
this
.
$parent
.
resetData
();
})
}
})
...
...
@@ -191,14 +216,12 @@
this
.
$nextTick
(()
=>
{
if
(
res
.
code
==
200
){
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
this
.
$parent
.
resetData
();
}
})
})
...
...
@@ -238,14 +261,12 @@
})
this
.
$nextTick
(()
=>
{
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
this
.
$parent
.
resetData
();
})
}
})
...
...
@@ -269,14 +290,12 @@
this
.
$nextTick
(()
=>
{
if
(
res
.
code
==
200
){
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
this
.
$parent
.
resetData
();
}
})
})
...
...
@@ -287,7 +306,7 @@
//创建地图
initMars3d
(
options
)
{
let
that
=
this
;
if
(
this
[
`map
${
this
.
mapKey
}
`
])
return
//
if (this[`map${this.mapKey}`]) return
const
mapOptions
=
{
...
options
,
...
...
@@ -300,6 +319,14 @@
// 创建三维地球场景
map
=
new
mars3d
.
Map
(
`mars3d-container
${
this
.
mapKey
}
`
,
mapOptions
)
this
[
`map
${
this
.
mapKey
}
`
]
=
map
//围栏回显
that
.
weilanzuobianData
.
forEach
(
function
(
item
,
index
){
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayer
);
initLayerManager
(
graphicLayer
,
that
.
weilanName
[
index
]);
that
.
addGraphic_01
(
graphicLayer
,
item
,
that
.
weilanName
[
index
],
that
.
areaColorData
[
index
]);
})
//关键点显示
that
.
zuobianData
.
forEach
(
function
(
item
,
index
){
...
...
@@ -342,6 +369,28 @@
})
graphicLayer
.
addGraphic
(
graphic
)
},
//围栏回显
addGraphic_01
(
graphicLayer
,
positions
,
weilanName
,
color
){
let
graphic
=
new
mars3d
.
graphic
.
PolygonEntity
({
positions
:
positions
,
style
:
{
color
:
color
,
opacity
:
0.5
,
outline
:
true
,
outlineWidth
:
3
,
outlineColor
:
"
#ffffff
"
,
label
:
{
text
:
weilanName
,
font_size
:
18
,
color
:
"
#ffffff
"
,
distanceDisplayCondition
:
true
,
distanceDisplayCondition_far
:
500000
,
distanceDisplayCondition_near
:
0
,
},
},
});
graphicLayer
.
addGraphic
(
graphic
);
//还可以另外一种写法: graphic.addTo(graphicLayer)
},
//画线
addDemoGraphic2
(
graphicLayer
,
item
)
{
const
graphic
=
new
mars3d
.
graphic
.
PolylineEntity
({
...
...
@@ -369,11 +418,6 @@
this
.
toJavaCoordinates
=
[];
let
that
=
this
;
var
graphicLayer3
=
new
mars3d
.
layer
.
GraphicLayer
();
graphicLayer3
.
on
(
mars3d
.
EventType
.
click
,
function
(
event
)
{
var
mpt
=
mars3d
.
LatLngPoint
.
fromCartesian
(
event
.
cartesian
);
that
.
toJavaCoordinates
.
push
(
mpt
.
toString
().
split
(
'
,
'
));
//console.log(that.toJavaCoordinates);
});
map
.
addLayer
(
graphicLayer3
);
initLayerManager
(
graphicLayer3
);
graphicLayer3
.
startDraw
({
...
...
@@ -393,6 +437,10 @@
pixelOffset
:
new
Cesium
.
Cartesian2
(
10
,
-
25
),
//偏移量
},
},
success
:
function
(
graphic
){
var
mpt
=
mars3d
.
LatLngPoint
.
fromCartesian
(
graphic
.
_position_draw
);
that
.
toJavaCoordinates
.
push
(
mpt
.
toString
().
split
(
'
,
'
));
}
});
},
bindLayerPopup
(
graphicLayer
,
item
)
{
...
...
src/views/DeviceManage/deviceMan/index.vue
View file @
ea0dc6f8
...
...
@@ -19,9 +19,9 @@
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"toolbar"
>
<
!--
<
div
class=
"toolbar"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
</div>
</div>
-->
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"name"
label=
"设备编码"
align=
"center"
></el-table-column>
...
...
@@ -47,7 +47,7 @@
<el-dialog
append-to-body
:close-on-click-modal=
"true"
:before-close=
"cancelForm"
:visible.sync=
"form.visible"
:title=
"form.title"
width=
"700px"
>
<el-form
:model=
"form.item"
:rules=
"rules"
ref=
"form1"
:inline=
"true"
size=
"small"
label-width=
"150px"
>
<el-form-item
label=
"设备编码"
prop=
"name"
>
<el-input
v-model=
"form.item.name"
style=
"width:280px;"
placeholder=
"请输入设备编码"
/>
<el-input
v-model=
"form.item.name"
style=
"width:280px;"
placeholder=
"请输入设备编码"
:disabled=
"form.reqType == 'edit'"
/>
</el-form-item>
<el-form-item
label=
"设备状态"
prop=
"status"
>
<el-select
v-model=
"form.item.status"
placeholder=
"请选择设备状态"
style=
"width:280px;"
>
...
...
@@ -182,7 +182,7 @@ export default {
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
var
communicationName
=
item
.
n
umber
var
communicationName
=
item
.
n
ame
;
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
...
...
@@ -239,9 +239,6 @@ export default {
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
//新增通信账号
// let communicationAccount = lastData.number;
// HttpReq.truckDispatching.communicationAccountAdd({name:communicationAccount}).then((res) => {})
},
//修改设备
reqUpdateItem
(
form
,
item
){
...
...
@@ -285,8 +282,14 @@ export default {
}
this
.
loadData
();
})
//删除通信账号
// HttpReq.truckDispatching.communicationAccountDel({name:communicationName}).then((res) => {})
//将车辆信息表中的终端设备字段改为空
HttpReq
.
truckDispatching
.
carInformationQuery
({
equipmentName
:
communicationName
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
&&
res
.
data
.
totalElements
!=
0
){
let
lastData
=
res
.
data
.
content
[
0
];
lastData
.
equipmentName
=
''
;
HttpReq
.
truckDispatching
.
carInformationUpdate
(
lastData
).
then
((
resDel
)
=>
{})
}
})
},
}
}
...
...
src/views/MLargeScreen/index.vue
View file @
ea0dc6f8
...
...
@@ -177,8 +177,10 @@ export default {
let
rightTemporaryData
=
[];
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
screenTitleMenuQuery
({
size
:
9999
,
status
:
1
,
pid
:
0
,
sort
:
'
dsort
'
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){;
let
array1
=
res
.
data
.
content
;
if
(
res
.
code
==
200
){
let
array1
=
res
.
data
.
content
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
dsort
)
-
parseInt
(
b
.
dsort
);
});
for
(
let
i
=
0
;
i
<
3
;
i
++
){
leftTemporaryData
.
push
(
array1
[
i
]);
}
...
...
@@ -203,7 +205,10 @@ export default {
let
left1
=
[];
let
center1
=
[];
let
right1
=
[];
res
.
data
.
content
.
forEach
((
item
,
index
)
=>
{
let
array1
=
res
.
data
.
content
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
dsort
)
-
parseInt
(
b
.
dsort
);
});
array1
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
pos
==
'
left
'
){
left1
.
push
(
item
);
}
else
if
(
item
.
pos
==
'
right
'
){
...
...
@@ -240,7 +245,10 @@ export default {
let
left1
=
[];
let
center1
=
[];
let
right1
=
[];
res
.
data
.
content
.
forEach
((
item
,
index
)
=>
{
let
array1
=
res
.
data
.
content
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
dsort
)
-
parseInt
(
b
.
dsort
);
});
array1
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
pos
==
'
left
'
){
left1
.
push
(
item
);
}
else
if
(
item
.
pos
==
'
right
'
){
...
...
@@ -277,7 +285,10 @@ export default {
let
left1
=
[];
let
center1
=
[];
let
right1
=
[];
res
.
data
.
content
.
forEach
((
item
,
index
)
=>
{
let
array1
=
res
.
data
.
content
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
dsort
)
-
parseInt
(
b
.
dsort
);
});
array1
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
pos
==
'
left
'
){
left1
.
push
(
item
);
}
else
if
(
item
.
pos
==
'
right
'
){
...
...
@@ -314,7 +325,10 @@ export default {
let
left1
=
[];
let
center1
=
[];
let
right1
=
[];
res
.
data
.
content
.
forEach
((
item
,
index
)
=>
{
let
array1
=
res
.
data
.
content
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
dsort
)
-
parseInt
(
b
.
dsort
);
});
array1
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
pos
==
'
left
'
){
left1
.
push
(
item
);
}
else
if
(
item
.
pos
==
'
right
'
){
...
...
src/views/carManagement/carInformation/index.vue
View file @
ea0dc6f8
...
...
@@ -149,9 +149,9 @@ export default {
number
:
[
{
required
:
true
,
message
:
'
请输入车牌号
'
,
trigger
:
'
blur
'
}
],
equipmentName
:
[
{
required
:
true
,
message
:
'
请选择终端设备
'
,
trigger
:
'
change
'
}
],
//
equipmentName: [
//
{required: true, message: '请选择终端设备', trigger: 'change' }
//
],
road
:
[
{
required
:
true
,
message
:
'
请选择所属车队名称
'
,
trigger
:
'
change
'
}
],
...
...
src/views/driverManagement/index.vue
View file @
ea0dc6f8
...
...
@@ -9,10 +9,10 @@
<label
class=
"el-form-item-label"
style=
"font-weight: 500;"
>
人员姓名
</label>
<el-input
v-model=
"query.name"
clearable
size=
"small"
placeholder=
"请输入人员姓名"
style=
"width:180px;"
/>
<label
class=
"el-form-item-label"
style=
"font-weight: 500;"
>
驾驶车辆
</label>
<
!--
<
label
class=
"el-form-item-label"
style=
"font-weight: 500;"
>
驾驶车辆
</label>
<el-select
v-model=
"query.car"
placeholder=
"请选择驾驶车辆"
style=
"width:180px;"
>
<el-option
v-for=
"(obj,index) in selectList"
:label=
"obj.number"
:value=
"obj.number"
:key=
"index"
></el-option>
</el-select>
</el-select>
-->
<el-button
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"toSearch"
>
搜索
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-refresh"
@
click=
"clearLimit"
>
重置
</el-button>
...
...
@@ -38,7 +38,6 @@
<el-table-column
prop=
"post"
label=
"岗位"
align=
"center"
></el-table-column>
<el-table-column
prop=
"company"
label=
"公司名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"adr"
label=
"住址"
align=
"center"
></el-table-column>
<el-table-column
prop=
"car"
label=
"驾驶车辆"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"toEdit(scope.row)"
></el-button>
...
...
@@ -61,8 +60,11 @@
<el-input
v-model=
"form.item.name"
style=
"width:280px;"
placeholder=
"请输入名称"
/>
</el-form-item>
<el-form-item
label=
"用户名"
prop=
"userName"
>
<el-select
v-model=
"form.item.userName"
placeholder=
"请选择用户名"
style=
"width:280px;"
>
<el-option
v-for=
"(obj,index) in allSystemUserNameData"
:label=
"obj.username"
:value=
"obj.username"
:key=
"index"
></el-option>
<el-input
v-model=
"form.item.userName"
style=
"width:280px;"
placeholder=
"请选择用户名"
:disabled=
"form.reqType == 'edit'"
/>
</el-form-item>
<el-form-item
label=
"角色"
prop=
"roles"
>
<el-select
v-model=
"form.item.roles"
placeholder=
"请选择角色"
style=
"width:280px;"
:disabled=
"form.reqType == 'edit'"
>
<el-option
v-for=
"(obj,index) in getAllapirolesData"
:label=
"obj.name"
:value=
"obj.name"
:key=
"index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
...
...
@@ -82,11 +84,6 @@
v-model=
"form.item.depart"
/>
</el-form-item>
<!-- <el-form-item label="部门" prop="depart">
<el-select v-model="form.item.depart" placeholder="请选择部门" style="width:280px;">
<el-option v-for="(obj,index) in allDepartmentData" :label="obj.name" :value="obj.name" :key="index"></el-option>
</el-select>
</el-form-item> -->
<el-form-item
label=
"岗位"
prop=
"post"
>
<el-select
v-model=
"form.item.post"
placeholder=
"请选择岗位"
style=
"width:280px;"
>
<el-option
v-for=
"(obj,index) in allPostData"
:label=
"obj.name"
:value=
"obj.name"
:key=
"index"
></el-option>
...
...
@@ -98,11 +95,6 @@
<el-form-item
label=
"住址"
prop=
"adr"
>
<el-input
v-model=
"form.item.adr"
style=
"width:280px;"
placeholder=
"请输入住址"
/>
</el-form-item>
<el-form-item
label=
"驾驶车辆"
prop=
"car"
>
<el-select
v-model=
"form.item.car"
placeholder=
"请选择驾驶车辆"
style=
"width:280px;"
>
<el-option
v-for=
"(obj,index) in selectList"
:label=
"obj.number"
:value=
"obj.number"
:key=
"index"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"cancelForm"
>
取消
</el-button>
...
...
@@ -134,6 +126,16 @@ export default {
allSystemUserNameData
:[],
allDepartmentData
:[],
allPostData
:[],
//最终选择部门信息
lastDeptData
:{},
//修改用户信息
xiugaiUserData
:{},
//所有用户信息
getAllSystemUserNameData
:[],
//所有角色信息
getAllapirolesData
:[],
//角色单独属性
rolesLonely
:
""
,
form
:
{
title
:
'
新增司机人员
'
,
visible
:
false
,
...
...
@@ -171,15 +173,15 @@ export default {
post
:
[
{
required
:
true
,
message
:
'
请输入岗位
'
,
trigger
:
'
blur
'
}
],
roles
:
[
{
required
:
true
,
message
:
'
请输入角色
'
,
trigger
:
'
blur
'
}
],
company
:
[
{
required
:
true
,
message
:
'
请输入公司名称
'
,
trigger
:
'
blur
'
}
],
adr
:
[
{
required
:
true
,
message
:
'
请输入住址
'
,
trigger
:
'
blur
'
}
],
car
:
[
{
required
:
true
,
message
:
'
请选择驾驶的车辆
'
,
trigger
:
'
blur
'
}
]
},
}
},
...
...
@@ -188,10 +190,11 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
loadData
();
})
},
},
methods
:
{
selectDepart
(
val
){
console
.
log
(
'
selectDepart
'
,
val
);
this
.
lastDeptData
=
val
;
return
this
.
depts
=
val
.
label
},
loadOptions
({
action
,
parentNode
,
callback
})
{
...
...
@@ -208,6 +211,7 @@ export default {
if
(
obj
.
hasChildren
)
{
obj
.
children
=
null
;
}
console
.
log
(
obj
);
return
obj
})
});
...
...
@@ -257,6 +261,14 @@ export default {
HttpReq
.
truckDispatching
.
getAllPostQuery
({
size
:
9999
}).
then
((
res
)
=>
{
this
.
allPostData
=
res
.
content
;
})
//获取所有的用户信息
HttpReq
.
truckDispatching
.
getAllSystemUserNameQuery
({
size
:
9999
}).
then
((
res
)
=>
{
this
.
getAllSystemUserNameData
=
res
.
content
;
})
//获取所有的角色信息
HttpReq
.
truckDispatching
.
apirolesallQuery
().
then
((
res
)
=>
{
this
.
getAllapirolesData
=
res
;
})
})
},
...
...
@@ -298,9 +310,24 @@ export default {
this
.
form
.
visible
=
true
;
this
.
form
.
item
=
{...
item
};
this
.
form
.
reqType
=
'
edit
'
;
this
.
getAllSystemUserNameData
.
forEach
((
item1
,
index1
)
=>
{
if
(
item1
.
username
==
item
.
userName
){
this
.
xiugaiUserData
=
item1
;
}
})
this
.
getAllapirolesData
.
forEach
((
item1
,
index1
)
=>
{
if
(
item1
.
id
==
this
.
xiugaiUserData
.
roles
[
0
].
id
){
this
.
form
.
item
.
roles
=
item1
.
name
;
}
})
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
getAllSystemUserNameData
.
forEach
((
item1
,
index1
)
=>
{
if
(
item1
.
username
==
item
.
userName
){
this
.
xiugaiUserData
=
item1
;
}
})
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
...
...
@@ -340,26 +367,82 @@ export default {
},
//新增司机人员
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
driverManagementPCAdd
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
let
panduanchongfu
=
true
;
let
panduanchongfu2
=
true
;
this
.
getAllSystemUserNameData
.
forEach
((
obj1
,
index1
)
=>
{
if
(
obj1
.
username
==
item
.
userName
){
panduanchongfu
=
false
;
}
})
this
.
getAllSystemUserNameData
.
forEach
((
obj1
,
index1
)
=>
{
if
(
obj1
.
phone
==
item
.
phone
){
panduanchongfu2
=
false
;
}
})
if
(
panduanchongfu
&&
panduanchongfu2
){
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
driverManagementPCAdd
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
this
.
$notify
({
title
:
'
司机人员新增成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
let
addUsers
=
{};
addUsers
.
createBy
=
"
admin
"
;
addUsers
.
createTime
=
this
.
currentTime
();
addUsers
.
dept
=
{
id
:
this
.
lastDeptData
.
id
};
addUsers
.
deptId
=
this
.
lastDeptData
.
id
;
addUsers
.
email
=
lastData
.
userName
+
'
@qq.com
'
;
addUsers
.
enabled
=
"
true
"
;
addUsers
.
gender
=
"
男
"
;
addUsers
.
id
=
null
;
this
.
allPostData
.
forEach
((
item1
,
index1
)
=>
{
if
(
item1
.
name
==
lastData
.
post
){
addUsers
.
jobs
=
[{
id
:
item1
.
id
}];
}
})
this
.
getAllapirolesData
.
forEach
((
item1
,
index1
)
=>
{
if
(
item1
.
name
==
lastData
.
roles
){
addUsers
.
roles
=
[{
id
:
item1
.
id
}];
}
})
addUsers
.
nickName
=
lastData
.
userName
;
addUsers
.
phone
=
lastData
.
phone
;
addUsers
.
pwdResetTime
=
"
2022-11-10 14:49:59
"
;
addUsers
.
updateBy
=
"
admin
"
;
addUsers
.
updateTime
=
this
.
currentTime
();
addUsers
.
username
=
lastData
.
userName
;
HttpReq
.
truckDispatching
.
apiusersAdd
(
addUsers
).
then
((
res
)
=>
{})
this
.
lastDeptData
=
{};
}
else
{
form
.
status
.
cu
=
0
if
(
!
panduanchongfu
){
this
.
$notify
({
title
:
'
司机人员新增成功
!
'
,
type
:
'
success
'
,
title
:
'
用户名不允许重复,请重新输入
!
'
,
type
:
'
error
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
})
}
else
if
(
!
panduanchongfu2
){
this
.
$notify
({
title
:
res
.
msg
,
title
:
'
手机号已存在,请重新输入!
'
,
type
:
'
error
'
,
duration
:
2500
})
}
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
}
},
//修改司机人员
reqUpdateItem
(
form
,
item
){
...
...
@@ -383,6 +466,7 @@ export default {
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
this
.
lastDeptData
=
{};
},
//删除司机人员
reqRemoveProject
(
item
){
...
...
@@ -402,7 +486,44 @@ export default {
}
this
.
loadData
();
})
if
(
this
.
xiugaiUserData
.
id
){
HttpReq
.
truckDispatching
.
apiusersDel
([
this
.
xiugaiUserData
.
id
]).
then
((
res
)
=>
{})
}
},
//转换时间
currentTime
(){
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
//年 ,从 Date 对象以四位数字返回年份
var
month
=
date
.
getMonth
()
+
1
;
//月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
var
day
=
date
.
getDate
();
//日 ,从 Date 对象返回一个月中的某一天 (1 ~ 31)
var
hours
=
date
.
getHours
();
//小时 ,返回 Date 对象的小时 (0 ~ 23)
var
minutes
=
date
.
getMinutes
();
//分钟 ,返回 Date 对象的分钟 (0 ~ 59)
var
seconds
=
date
.
getSeconds
();
//秒 ,返回 Date 对象的秒数 (0 ~ 59)
//修改月份格式
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"
0
"
+
month
;
}
//修改日期格式
if
(
day
>=
0
&&
day
<=
9
)
{
day
=
"
0
"
+
day
;
}
//修改小时格式
if
(
hours
>=
0
&&
hours
<=
9
)
{
hours
=
"
0
"
+
hours
;
}
//修改分钟格式
if
(
minutes
>=
0
&&
minutes
<=
9
)
{
minutes
=
"
0
"
+
minutes
;
}
//修改秒格式
if
(
seconds
>=
0
&&
seconds
<=
9
)
{
seconds
=
"
0
"
+
seconds
;
}
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
let
currentFormatDate
=
year
+
"
-
"
+
month
+
"
-
"
+
day
+
"
"
+
hours
+
"
:
"
+
minutes
+
"
:
"
+
seconds
;
return
currentFormatDate
;
}
}
}
</
script
>
...
...
src/views/regionalManagement/regionalInformation/index.vue
View file @
ea0dc6f8
...
...
@@ -411,30 +411,63 @@ export default {
})
HttpReq
.
truckDispatching
.
screenMapSetUpDel
(
weilanName
).
then
((
res
)
=>
{})
//删除该卸区点所对应的路径图信息
if
(
items
.
areaclass
==
'
卸区
'
){
let
delname
=
items
.
name
;
HttpReq
.
truckDispatching
.
apiPathmapQuery
({
size
:
9999
,
end
:
delname
}).
then
((
res1
)
=>
{
if
(
res1
.
code
==
200
){
let
idArr1
=
[];
res1
.
data
.
content
.
forEach
((
item1
,
index1
)
=>
{
idArr1
.
push
(
item1
.
id
);
HttpReq
.
truckDispatching
.
RegionalCaiDianQuery
({
areaName
:
items
.
name
}).
then
((
resAll
)
=>
{
if
(
resAll
.
code
==
200
){
//totalElements == 0 说明为卸区,删除卸区对应点以及路径图信息
if
(
resAll
.
data
.
totalElements
==
0
){
let
delname
=
items
.
name
;
HttpReq
.
truckDispatching
.
apiPathmapQuery
({
size
:
9999
,
end
:
delname
}).
then
((
res1
)
=>
{
if
(
res1
.
code
==
200
){
let
idArr1
=
[];
res1
.
data
.
content
.
forEach
((
item1
,
index1
)
=>
{
idArr1
.
push
(
item1
.
id
);
})
//删除
if
(
idArr1
.
length
!=
0
){
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{})
}
}
})
HttpReq
.
truckDispatching
.
apiCpointQuery
({
name
:
delname
}).
then
((
res2
)
=>
{
if
(
res2
.
code
==
200
){
if
(
res2
.
data
.
content
[
0
].
id
){
HttpReq
.
truckDispatching
.
apiCpointDel
([
res2
.
data
.
content
[
0
].
id
]).
then
((
res
)
=>
{})
}
}
})
}
else
{
//totalElements != 0 说明为采区,删除采区对应点以及路径图信息
resAll
.
data
.
content
.
forEach
((
itemdel1
,
indexdel1
)
=>
{
//删除该采点所对应的路径图信息
let
delname
=
itemdel1
.
areaName
+
'
/
'
+
itemdel1
.
name
;
HttpReq
.
truckDispatching
.
apiPathmapQuery
({
size
:
9999
,
end
:
delname
}).
then
((
res1
)
=>
{
if
(
res1
.
code
==
200
){
let
idArr1
=
[];
res1
.
data
.
content
.
forEach
((
item1
,
index1
)
=>
{
idArr1
.
push
(
item1
.
id
);
})
//删除
if
(
idArr1
.
length
!=
0
){
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{})
}
}
})
//删除对应控制点
HttpReq
.
truckDispatching
.
apiCpointQuery
({
name
:
delname
}).
then
((
res2
)
=>
{
if
(
res2
.
code
==
200
){
if
(
res2
.
data
.
content
[
0
].
id
){
HttpReq
.
truckDispatching
.
apiCpointDel
([
res2
.
data
.
content
[
0
].
id
]).
then
((
res
)
=>
{})
}
}
})
//采点表里面的采点
HttpReq
.
truckDispatching
.
RegionalCaiDianDel
([
itemdel1
.
id
]).
then
((
res
)
=>
{})
})
//删除
if
(
idArr1
.
length
!=
0
){
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{})
}
}
})
HttpReq
.
truckDispatching
.
apiCpointQuery
({
name
:
delname
}).
then
((
res2
)
=>
{
if
(
res2
.
code
==
200
){
if
(
res2
.
data
.
content
[
0
].
id
){
HttpReq
.
truckDispatching
.
apiCpointDel
([
res2
.
data
.
content
[
0
].
id
]).
then
((
res
)
=>
{})
}
}
})
}
}
})
},
//图片上传
excelImport
(
event
)
{
...
...
src/views/regionalManagement/regionalPathMap/index.vue
View file @
ea0dc6f8
...
...
@@ -16,7 +16,7 @@
<el-input-number
v-model=
"query.coefficient"
:precision=
"2"
:step=
"0.1"
:min=
"0"
:max=
"9999"
@
change=
"inputInitialFn()"
></el-input-number>
<el-button
size=
"mini"
type=
"success"
@
click=
"addKeyPoints()"
:disabled=
"addKeyPointsAble"
>
添加路径关键点
</el-button>
<div
style=
"width:62vw;height: 72vh;overflow: hidden;margin-top: 1vh;"
>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
/>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
:key=
"shuaxinTimer"
/>
</div>
</div>
</div>
...
...
@@ -122,6 +122,8 @@ export default {
faControlPointId
:
0
,
//选择连接点数据
selectConnectPointArray
:[],
//重置地图
shuaxinTimer
:
null
,
};
},
mounted
(){
...
...
@@ -245,18 +247,27 @@ export default {
idArr1
.
push
(
item1
.
id
);
})
//删除
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
res
)
=>
{
this
.
$notify
({
title
:
'
删除成功,即将重新加载,请勿操作!
'
,
type
:
'
success
'
,
duration
:
2500
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
if
(
idArr1
.
length
==
0
){
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
resetData
();
})
}
else
{
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
resetData
();
})
})
}
)
}
}
})
},
...
...
@@ -289,18 +300,27 @@ export default {
idArr1
.
push
(
item1
.
id
);
})
//删除
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
res
)
=>
{
this
.
$notify
({
title
:
'
删除成功,即将重新加载,请勿操作!
'
,
type
:
'
success
'
,
duration
:
2500
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
if
(
idArr1
.
length
==
0
){
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
resetData
();
})
}
else
{
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
resetData
();
})
})
}
)
}
}
})
},
...
...
@@ -347,25 +367,32 @@ export default {
idArr1
.
push
(
item2
.
id
);
})
//删除
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功,即将重新加载,请勿操作!
'
,
type
:
'
success
'
,
duration
:
2500
});
setTimeout
(
function
(){
window
.
location
.
reload
();
},
2000
);
if
(
idArr1
.
length
==
0
){
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
resetData
();
})
}
else
{
HttpReq
.
truckDispatching
.
apiPathmapDel
(
idArr1
).
then
((
resDel1
)
=>
{
HttpReq
.
truckDispatching
.
apiCpointDel
([
this
.
faControlPointId
]).
then
((
resDel2
)
=>
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
resetData
();
})
})
}
)
}
}
})
}
})
},
//点击关键点获取对应数据
clickPointFn
(
item
){
...
...
@@ -440,6 +467,38 @@ export default {
})
}
},
//重置数据
resetData
(){
//获取各个点的数据
HttpReq
.
truckDispatching
.
apiCpointQuery
({
size
:
9999
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
let
arr1
=
[];
res
.
data
.
content
.
forEach
((
item
,
index
)
=>
{
let
obj1
=
{};
obj1
.
end
=
item
.
name
;
obj1
.
weight
=
0
;
arr1
.
push
(
obj1
);
})
this
.
controlPointData
=
arr1
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
);
//添加路径关键点按钮可否使用
this
.
addKeyPointsAble
=
false
;
//选择关键点类型
this
.
activeName
=
""
;
//装卸车点名称
this
.
entruckingValue1
=
[];
this
.
detrainingValue2
=
[];
this
.
controlPointValue3
=
''
;
//保存时判断为添加还是修改
this
.
transmitWay
=
'
add
'
;
//暂存修改删除时的id
this
.
faControlPointId
=
0
;
//选择连接点数据
this
.
selectConnectPointArray
=
[];
}
})
},
// 地图构造完成回调
onMapload
(
map
)
{
// 以下为演示代码
...
...
src/views/system/dataDictionary/largeScreenMenuDispose/index.vue
View file @
ea0dc6f8
...
...
@@ -44,7 +44,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"dsort"
>
<el-input-number
v-model=
"form.item.dsort"
></el-input-number>
<el-input-number
v-model=
"form.item.dsort"
:min=
"1"
:precision=
"0"
:step=
"1"
></el-input-number>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"form.item.status"
placeholder=
"请选择状态"
style=
"width:280px;"
>
...
...
@@ -98,7 +98,10 @@ export default {
//获取对应子标题
HttpReq
.
truckDispatching
.
screenTitleMenuQuery
({
size
:
9999
,
pid
:
item
.
children
,
sort
:
'
dsort
'
}).
then
((
res2
)
=>
{
if
(
res2
.
code
==
200
){
sonData
.
children
=
res2
.
data
.
content
;
let
sortArr
=
res2
.
data
.
content
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
dsort
)
-
parseInt
(
b
.
dsort
);
});
sonData
.
children
=
sortArr
;
alltableData
.
push
(
sonData
);
this
.
tableData
=
alltableData
;
}
else
{
...
...
@@ -151,29 +154,48 @@ export default {
//修改菜单配置
reqUpdateItem
(
form
,
item
){
let
lastData
=
{...
item
};
lastData
.
id
=
this
.
alarmTimeId
;
if
(
lastData
.
children
){
delete
lastData
.
children
;
}
HttpReq
.
truckDispatching
.
screenTitleMenuUpdate
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
this
.
$notify
({
title
:
'
大屏配置修改成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
let
panduan1
=
true
;
HttpReq
.
truckDispatching
.
screenTitleMenuQuery
({
size
:
9999
,
pid
:
lastData
.
pid
}).
then
((
res1
)
=>
{
if
(
res1
.
code
==
200
){
res1
.
data
.
content
.
forEach
((
item1
,
index1
)
=>
{
if
(
item1
.
dsort
==
lastData
.
dsort
&&
item1
.
title
!=
lastData
.
title
){
panduan1
=
false
;
}
})
if
(
panduan1
){
lastData
.
id
=
this
.
alarmTimeId
;
if
(
lastData
.
children
){
delete
lastData
.
children
;
}
HttpReq
.
truckDispatching
.
screenTitleMenuUpdate
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
this
.
$notify
({
title
:
'
大屏配置修改成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
}
else
{
this
.
$notify
({
title
:
"
排序序号与该模块中的序号重复,请重新选择排序!
"
,
type
:
'
error
'
,
duration
:
2500
})
form
.
status
.
cu
=
0
;
}
}
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
})
},
//组件状态展示修改
statusChange
(
row
){
...
...
vue.config.js
View file @
ea0dc6f8
...
...
@@ -25,6 +25,7 @@ module.exports = {
productionSourceMap
:
false
,
devServer
:
{
host
:
'
localhost
'
,
// 也可以直接写IP地址这样方便真机测试
//host: '192.168.0.102', // 也可以直接写IP地址这样方便真机测试
port
:
port
,
open
:
true
,
//https: true,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment