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
7ca50854
Commit
7ca50854
authored
Apr 24, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
16f688d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
900 deletions
+135
-900
common.js
src/assets/js/common.js
+31
-0
index.vue
...iews/MLargeScreen/components/intelligentSchedul/index.vue
+54
-3
index.vue
src/views/system/dataDictionary/alarmHowTime/index.vue
+0
-273
index.vue
src/views/system/dataDictionary/fatigueDriving/index.vue
+0
-273
index.vue
src/views/system/dataDictionary/getPriority/index.vue
+0
-280
index.vue
src/views/system/dataDictionary/notifiyFrequency/index.vue
+50
-71
No files found.
src/assets/js/common.js
View file @
7ca50854
...
@@ -47,6 +47,37 @@ var HttpReq = function(){
...
@@ -47,6 +47,37 @@ var HttpReq = function(){
data
:
data
,
data
:
data
,
})
})
},
},
//系统管理——数据字典设置
dataDictionaryQuery
:
function
(
param
){
return
request
({
url
:
'
/api/Threshold
'
,
method
:
'
get
'
,
params
:
param
,
})
},
dataDictionaryAdd
:
function
(
data
){
return
request
({
url
:
'
/api/Threshold
'
,
method
:
'
POST
'
,
data
:
data
,
}).
then
((
res
)
=>
{
return
res
})
},
dataDictionaryUpdate
:
function
(
data
){
return
request
({
url
:
'
/api/Threshold
'
,
method
:
'
PUT
'
,
data
:
data
,
})
},
dataDictionaryDel
:
function
(
data
){
return
request
({
url
:
'
/api/Threshold
'
,
method
:
'
Delete
'
,
data
:
data
,
})
},
//系统管理——数据字典——报警时长
//系统管理——数据字典——报警时长
alarmTimeQuery
:
function
(
param
){
alarmTimeQuery
:
function
(
param
){
return
request
({
return
request
({
...
...
src/views/MLargeScreen/components/intelligentSchedul/index.vue
View file @
7ca50854
...
@@ -34,9 +34,9 @@
...
@@ -34,9 +34,9 @@
</div>
</div>
</div>
</div>
<div
class=
"voiceAppContent_4"
>
<div
class=
"voiceAppContent_4"
>
<el-button
type=
"primary"
@
click=
"toNoticeFn('广播')"
>
广播
</el-button>
<el-button
type=
"primary"
@
click=
"toNoticeFn('广播')"
>
{{
guangbo1
}}
</el-button>
<el-button
type=
"primary"
@
click=
"toNoticeFn('紧急通知')"
>
紧急通知
</el-button>
<el-button
type=
"primary"
@
click=
"toNoticeFn('紧急通知')"
>
{{
jinzhitongzhi1
}}
</el-button>
<el-button
type=
"primary"
@
click=
"toNoticeFn('通话')"
>
通话
</el-button>
<el-button
type=
"primary"
@
click=
"toNoticeFn('通话')"
>
{{
tonghua1
}}
</el-button>
<el-button
type=
"primary"
@
click=
"todispatchChange()"
>
{{
dispatchBtnTitle
}}
</el-button>
<el-button
type=
"primary"
@
click=
"todispatchChange()"
>
{{
dispatchBtnTitle
}}
</el-button>
</div>
</div>
</div>
</div>
...
@@ -124,6 +124,54 @@
...
@@ -124,6 +124,54 @@
</div>
</div>
</div>
</div>
<!-- 语音所需内容,隐藏无需展示 -->
<div
class=
"main"
style=
"display:none;"
>
<slot
name=
"top"
></slot>
<div
class=
"mainBox"
>
<div
class=
"btns"
>
<div>
<button
@
click=
"recOpen"
>
打开录音,请求权限
</button>
<button
@
click=
"recClose"
>
关闭录音,释放资源
</button>
</div>
<button
@
click=
"recStart"
>
录制
</button>
<button
@
click=
"recStop"
style=
"margin-right:80px"
>
停止
</button>
<span
style=
"display: inline-block;"
>
<button
@
click=
"recPause"
>
暂停
</button>
<button
@
click=
"recResume"
>
继续
</button>
</span>
<span
style=
"display: inline-block;"
>
<button
@
click=
"recPlayLast"
>
播放
</button>
<button
@
click=
"recUploadLast"
>
上传
</button>
</span>
</div>
</div>
<div
class=
"mainBox"
>
<div
style=
"height:100px;width:300px;border:1px solid #ccc;box-sizing: border-box;display:inline-block;vertical-align:bottom"
class=
"ctrlProcessWave"
></div>
<div
style=
"height:40px;width:300px;display:inline-block;background:#999;position:relative;vertical-align:bottom"
>
<div
class=
"ctrlProcessX"
style=
"height:40px;background:#0B1;position:absolute;"
:style=
"
{width:powerLevel+'%'}">
</div>
<div
class=
"ctrlProcessT"
style=
"padding-left:50px; line-height:40px; position: relative;"
>
{{
duration
+
"
/
"
+
powerLevel
}}
</div>
</div>
</div>
<div
class=
"mainBox"
>
<audio
ref=
"LogAudioPlayer"
style=
"width:100%"
></audio>
<div
class=
"mainLog"
>
</div>
</div>
<div
v-if=
"recOpenDialogShow"
style=
"z-index:99999;width:100%;height:100%;top:0;left:0;position:fixed;background:rgba(0,0,0,0.3);"
>
</div>
<slot
name=
"bottom"
></slot>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -154,6 +202,9 @@ export default {
...
@@ -154,6 +202,9 @@ export default {
dispatchDetailsList
:[],
//智能调度情况表
dispatchDetailsList
:[],
//智能调度情况表
dispatchBtnTitle
:
'
人工调度
'
,
dispatchBtnTitle
:
'
人工调度
'
,
dispatchBtnTitle1
:
'
人工调度
'
,
dispatchBtnTitle1
:
'
人工调度
'
,
guangbo1
:
'
广播
'
,
jinzhitongzhi1
:
'
紧急通知
'
,
tonghua1
:
'
通话
'
,
type
:
"
mp3
"
,
type
:
"
mp3
"
,
bitRate
:
16
,
bitRate
:
16
,
...
...
src/views/system/dataDictionary/alarmHowTime/index.vue
deleted
100644 → 0
View file @
16f688d2
<
template
>
<div
class=
"common-page device-manage"
>
<!-- 表格 -->
<div
class=
"panel-bottom page-row"
>
<h3>
报警时长设置
</h3>
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"toolbar"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
</div>
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"id"
label=
"序号"
align=
"center"
></el-table-column>
<el-table-column
prop=
"time"
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>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"toDelete(scope.row)"
></el-button>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total=
"total"
:current-page=
"page"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
</div>
</div>
</div>
</div>
<!-- 表单渲染 -->
<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=
"time"
>
<el-input
v-model=
"form.item.time"
style=
"width:280px;"
placeholder=
"请输入时长(分钟)"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"cancelForm"
>
取消
</el-button>
<el-button
:loading=
"form.status.cu === 2"
type=
"primary"
@
click=
"submitForm('form1', form.item)"
>
确认
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
Tools
,
HttpReq
,
Dates
}
from
'
@/assets/js/common.js
'
;
export
default
{
name
:
'
AlarmHowTime
'
,
components
:
{},
data
()
{
return
{
loading
:
false
,
page
:
1
,
size
:
10
,
total
:
0
,
query
:{},
alarmTimeId
:
''
,
tableData
:
[],
form
:
{
title
:
'
新增报警时长
'
,
visible
:
false
,
reqType
:
'
add
'
,
status
:{
cu
:
0
},
item
:{},
},
rules
:
{
time
:
[
{
required
:
true
,
message
:
'
请输入报警时长
'
,
trigger
:
'
blur
'
}
],
},
}
},
mounted
()
{
var
that
=
this
;
this
.
$nextTick
(()
=>
{
this
.
loadData
();
})
},
methods
:
{
loadData
()
{
var
sort
=
'
id,desc
'
;
var
param
=
this
.
query
;
param
.
page
=
this
.
page
-
1
;
param
.
size
=
this
.
size
;
param
.
sort
=
sort
;
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
alarmTimeQuery
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
this
.
loading
=
false
;
this
.
tableData
=
res
.
data
.
content
;
this
.
total
=
res
.
data
.
totalElements
;
}
})
})
},
tableRowClassName
({
row
,
rowIndex
})
{
if
(
rowIndex
===
1
)
{
return
'
warning-row
'
;
}
else
if
(
rowIndex
===
3
)
{
return
'
success-row
'
;
}
return
''
;
},
cancelForm
(
a
,
b
,
c
){
this
.
form
.
visible
=
false
;
},
toAdd
()
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
新增报警时长
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
reqType
=
'
add
'
;
this
.
form
.
item
=
{};
},
toEdit
(
item
)
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
修改报警时长
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
item
=
{...
item
};
this
.
form
.
reqType
=
'
edit
'
;
this
.
alarmTimeId
=
this
.
form
.
item
.
id
;
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
((
e
)
=>
{
this
.
reqRemoveProject
([
id
])
}).
catch
((
e
)
=>
{})
},
pageChange
(
e
)
{
this
.
page
=
e
this
.
loadData
()
},
sizeChange
(
e
)
{
this
.
page
=
1
this
.
size
=
e
this
.
loadData
()
},
submitForm
(
validateName
,
item
){
if
(
!
this
.
form
.
status
.
cu
){
this
.
form
.
status
.
cu
=
2
;
this
.
$refs
[
validateName
].
validate
(
valid
=>
{
if
(
valid
){
if
(
this
.
form
.
reqType
===
'
add
'
){
this
.
reqAddItem
(
this
.
form
,
item
)
}
else
{
this
.
reqUpdateItem
(
this
.
form
,
item
)
}
}
else
{
this
.
form
.
status
.
cu
=
0
}
});
};
},
//新增报警时长
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
alarmTimeAdd
(
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
});
},
//修改报警时长
reqUpdateItem
(
form
,
item
){
let
lastData
=
{...
item
};
lastData
.
id
=
this
.
alarmTimeId
;
HttpReq
.
truckDispatching
.
alarmTimeUpdate
(
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
});
},
//删除报警时长
reqRemoveProject
(
item
){
HttpReq
.
truckDispatching
.
alarmTimetDel
(
item
).
then
((
res
)
=>
{
if
(
res
.
status
==
400
){
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
else
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
}
this
.
loadData
();
})
},
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scope
>
.el-table
.warning-row
{
background
:
oldlace
;
}
.el-table
.success-row
{
background
:
#f0f9eb
;
}
.device-manage
{
.panel-bottom
{
.el-button
{
margin
:
2px
0
;
padding
:
6px
15px
;
font-size
:
14px
;}
.btn-groub2
{
display
:inline-block
;
.el-button
{
margin
:
2px
0
;
padding
:
6px
15px
;
font-size
:
15px
;}
.el-button--warning
{
background-color
:
#e6a23c
;
border-color
:
#e6a23c
;
}
.el-button--warning
:focus
,
.el-button--warning
:hover
{
background
:
#ebb563
;
border-color
:
#ebb563
;}
}
}
}
.ecahrt1-dialog
{
display
:flex
;
align-items
:center
;
.el-dialog
{
margin-top
:inherit
!
important
;
display
:table
!
important
;
width
:fit-content
;
.el-form-item
{
margin-right
:
0
;}
}
.el-dialog__header
{
height
:
0
;
padding
:
0
;
display
:block
;}
.form-body
{
border
:
1px
solid
#999
;
width
:
800px
;
height
:
500px
;
position
:relative
;
>
div
{
position
:absolute
;
top
:
0
;
left
:
0
;
height
:
100%
;
width
:
100%
;}
}
}
</
style
>
src/views/system/dataDictionary/fatigueDriving/index.vue
deleted
100644 → 0
View file @
16f688d2
<
template
>
<div
class=
"common-page device-manage"
>
<!-- 表格 -->
<div
class=
"panel-bottom page-row"
>
<h3>
疲劳驾驶时长设置
</h3>
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"toolbar"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
</div>
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"id"
label=
"序号"
align=
"center"
></el-table-column>
<el-table-column
prop=
"fdritime"
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>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"toDelete(scope.row)"
></el-button>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total=
"total"
:current-page=
"page"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
</div>
</div>
</div>
</div>
<!-- 表单渲染 -->
<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=
"fdritime"
>
<el-input
v-model=
"form.item.fdritime"
style=
"width:280px;"
placeholder=
"请输入时长(小时)"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"cancelForm"
>
取消
</el-button>
<el-button
:loading=
"form.status.cu === 2"
type=
"primary"
@
click=
"submitForm('form1', form.item)"
>
确认
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
Tools
,
HttpReq
,
Dates
}
from
'
@/assets/js/common.js
'
;
export
default
{
name
:
'
FatigueDriving
'
,
components
:
{},
data
()
{
return
{
loading
:
false
,
page
:
1
,
size
:
10
,
total
:
0
,
query
:{},
alarmTimeId
:
''
,
tableData
:
[],
form
:
{
title
:
'
新增疲劳驾驶时长
'
,
visible
:
false
,
reqType
:
'
add
'
,
status
:{
cu
:
0
},
item
:{},
},
rules
:
{
fdritime
:
[
{
required
:
true
,
message
:
'
请输入疲劳驾驶时长
'
,
trigger
:
'
blur
'
}
],
},
}
},
mounted
()
{
var
that
=
this
;
this
.
$nextTick
(()
=>
{
this
.
loadData
();
})
},
methods
:
{
loadData
()
{
var
sort
=
'
id,desc
'
;
var
param
=
this
.
query
;
param
.
page
=
this
.
page
-
1
;
param
.
size
=
this
.
size
;
param
.
sort
=
sort
;
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
fdriTimeQuery
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
this
.
loading
=
false
;
this
.
tableData
=
res
.
data
.
content
;
this
.
total
=
res
.
data
.
totalElements
;
}
})
})
},
tableRowClassName
({
row
,
rowIndex
})
{
if
(
rowIndex
===
1
)
{
return
'
warning-row
'
;
}
else
if
(
rowIndex
===
3
)
{
return
'
success-row
'
;
}
return
''
;
},
cancelForm
(
a
,
b
,
c
){
this
.
form
.
visible
=
false
;
},
toAdd
()
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
新增疲劳驾驶时长
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
reqType
=
'
add
'
;
this
.
form
.
item
=
{};
},
toEdit
(
item
)
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
修改疲劳驾驶时长
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
item
=
{...
item
};
this
.
form
.
reqType
=
'
edit
'
;
this
.
alarmTimeId
=
this
.
form
.
item
.
id
;
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
((
e
)
=>
{
this
.
reqRemoveProject
([
id
])
}).
catch
((
e
)
=>
{})
},
pageChange
(
e
)
{
this
.
page
=
e
this
.
loadData
()
},
sizeChange
(
e
)
{
this
.
page
=
1
this
.
size
=
e
this
.
loadData
()
},
submitForm
(
validateName
,
item
){
if
(
!
this
.
form
.
status
.
cu
){
this
.
form
.
status
.
cu
=
2
;
this
.
$refs
[
validateName
].
validate
(
valid
=>
{
if
(
valid
){
if
(
this
.
form
.
reqType
===
'
add
'
){
this
.
reqAddItem
(
this
.
form
,
item
)
}
else
{
this
.
reqUpdateItem
(
this
.
form
,
item
)
}
}
else
{
this
.
form
.
status
.
cu
=
0
}
});
};
},
//新增疲劳驾驶时长
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
fdriTimeAdd
(
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
});
},
//修改疲劳驾驶时长
reqUpdateItem
(
form
,
item
){
let
lastData
=
{...
item
};
lastData
.
id
=
this
.
alarmTimeId
;
HttpReq
.
truckDispatching
.
fdriTimeUpdate
(
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
});
},
//删除疲劳驾驶时长
reqRemoveProject
(
item
){
HttpReq
.
truckDispatching
.
fdriTimetDel
(
item
).
then
((
res
)
=>
{
if
(
res
.
status
==
400
){
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
else
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
}
this
.
loadData
();
})
},
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scope
>
.el-table
.warning-row
{
background
:
oldlace
;
}
.el-table
.success-row
{
background
:
#f0f9eb
;
}
.device-manage
{
.panel-bottom
{
.el-button
{
margin
:
2px
0
;
padding
:
6px
15px
;
font-size
:
14px
;}
.btn-groub2
{
display
:inline-block
;
.el-button
{
margin
:
2px
0
;
padding
:
6px
15px
;
font-size
:
15px
;}
.el-button--warning
{
background-color
:
#e6a23c
;
border-color
:
#e6a23c
;
}
.el-button--warning
:focus
,
.el-button--warning
:hover
{
background
:
#ebb563
;
border-color
:
#ebb563
;}
}
}
}
.ecahrt1-dialog
{
display
:flex
;
align-items
:center
;
.el-dialog
{
margin-top
:inherit
!
important
;
display
:table
!
important
;
width
:fit-content
;
.el-form-item
{
margin-right
:
0
;}
}
.el-dialog__header
{
height
:
0
;
padding
:
0
;
display
:block
;}
.form-body
{
border
:
1px
solid
#999
;
width
:
800px
;
height
:
500px
;
position
:relative
;
>
div
{
position
:absolute
;
top
:
0
;
left
:
0
;
height
:
100%
;
width
:
100%
;}
}
}
</
style
>
src/views/system/dataDictionary/getPriority/index.vue
deleted
100644 → 0
View file @
16f688d2
<
template
>
<div
class=
"common-page device-manage"
>
<!-- 表格 -->
<div
class=
"panel-bottom page-row"
>
<h3>
智能分配优先级设置
</h3>
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"toolbar"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
</div>
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"id"
label=
"序号"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"名字"
align=
"center"
></el-table-column>
<el-table-column
prop=
"pri"
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>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"toDelete(scope.row)"
></el-button>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total=
"total"
:current-page=
"page"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
</div>
</div>
</div>
</div>
<!-- 表单渲染 -->
<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-form-item>
<el-form-item
label=
"优先级设置"
prop=
"pri"
>
<el-input
v-model=
"form.item.pri"
style=
"width:280px;"
placeholder=
"请输入优先级"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"cancelForm"
>
取消
</el-button>
<el-button
:loading=
"form.status.cu === 2"
type=
"primary"
@
click=
"submitForm('form1', form.item)"
>
确认
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
Tools
,
HttpReq
,
Dates
}
from
'
@/assets/js/common.js
'
;
export
default
{
name
:
'
GetPriority
'
,
components
:
{},
data
()
{
return
{
loading
:
false
,
page
:
1
,
size
:
10
,
total
:
0
,
query
:{},
alarmTimeId
:
''
,
tableData
:
[],
form
:
{
title
:
'
新增优先级设置
'
,
visible
:
false
,
reqType
:
'
add
'
,
status
:{
cu
:
0
},
item
:{},
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'
请输入名字
'
,
trigger
:
'
blur
'
}
],
pri
:
[
{
required
:
true
,
message
:
'
请输入优先级
'
,
trigger
:
'
blur
'
}
],
},
}
},
mounted
()
{
var
that
=
this
;
this
.
$nextTick
(()
=>
{
this
.
loadData
();
})
},
methods
:
{
loadData
()
{
var
sort
=
'
id,desc
'
;
var
param
=
this
.
query
;
param
.
page
=
this
.
page
-
1
;
param
.
size
=
this
.
size
;
param
.
sort
=
sort
;
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
getPriorityQuery
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
this
.
loading
=
false
;
this
.
tableData
=
res
.
data
.
content
;
this
.
total
=
res
.
data
.
totalElements
;
}
})
})
},
tableRowClassName
({
row
,
rowIndex
})
{
if
(
rowIndex
===
1
)
{
return
'
warning-row
'
;
}
else
if
(
rowIndex
===
3
)
{
return
'
success-row
'
;
}
return
''
;
},
cancelForm
(
a
,
b
,
c
){
this
.
form
.
visible
=
false
;
},
toAdd
()
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
新增优先级设置
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
reqType
=
'
add
'
;
this
.
form
.
item
=
{};
},
toEdit
(
item
)
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
修改优先级设置
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
item
=
{...
item
};
this
.
form
.
reqType
=
'
edit
'
;
this
.
alarmTimeId
=
this
.
form
.
item
.
id
;
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
((
e
)
=>
{
this
.
reqRemoveProject
([
id
])
}).
catch
((
e
)
=>
{})
},
pageChange
(
e
)
{
this
.
page
=
e
this
.
loadData
()
},
sizeChange
(
e
)
{
this
.
page
=
1
this
.
size
=
e
this
.
loadData
()
},
submitForm
(
validateName
,
item
){
if
(
!
this
.
form
.
status
.
cu
){
this
.
form
.
status
.
cu
=
2
;
this
.
$refs
[
validateName
].
validate
(
valid
=>
{
if
(
valid
){
if
(
this
.
form
.
reqType
===
'
add
'
){
this
.
reqAddItem
(
this
.
form
,
item
)
}
else
{
this
.
reqUpdateItem
(
this
.
form
,
item
)
}
}
else
{
this
.
form
.
status
.
cu
=
0
}
});
};
},
//新增优先级设置
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
getPriorityTimeAdd
(
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
});
},
//修改优先级设置
reqUpdateItem
(
form
,
item
){
let
lastData
=
{...
item
};
lastData
.
id
=
this
.
alarmTimeId
;
HttpReq
.
truckDispatching
.
getPriorityTimeUpdate
(
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
});
},
//删除优先级设置
reqRemoveProject
(
item
){
HttpReq
.
truckDispatching
.
getPriorityTimetDel
(
item
).
then
((
res
)
=>
{
if
(
res
.
status
==
400
){
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
else
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
}
this
.
loadData
();
})
},
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scope
>
.el-table
.warning-row
{
background
:
oldlace
;
}
.el-table
.success-row
{
background
:
#f0f9eb
;
}
.device-manage
{
.panel-bottom
{
.el-button
{
margin
:
2px
0
;
padding
:
6px
15px
;
font-size
:
14px
;}
.btn-groub2
{
display
:inline-block
;
.el-button
{
margin
:
2px
0
;
padding
:
6px
15px
;
font-size
:
15px
;}
.el-button--warning
{
background-color
:
#e6a23c
;
border-color
:
#e6a23c
;
}
.el-button--warning
:focus
,
.el-button--warning
:hover
{
background
:
#ebb563
;
border-color
:
#ebb563
;}
}
}
}
.ecahrt1-dialog
{
display
:flex
;
align-items
:center
;
.el-dialog
{
margin-top
:inherit
!
important
;
display
:table
!
important
;
width
:fit-content
;
.el-form-item
{
margin-right
:
0
;}
}
.el-dialog__header
{
height
:
0
;
padding
:
0
;
display
:block
;}
.form-body
{
border
:
1px
solid
#999
;
width
:
800px
;
height
:
500px
;
position
:relative
;
>
div
{
position
:absolute
;
top
:
0
;
left
:
0
;
height
:
100%
;
width
:
100%
;}
}
}
</
style
>
src/views/system/dataDictionary/notifiyFrequency/index.vue
View file @
7ca50854
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<!-- 表格 -->
<!-- 表格 -->
<div
class=
"panel-bottom page-row"
>
<div
class=
"panel-bottom page-row"
>
<h3>
通知频率
设置
</h3>
<h3>
数据字典
设置
</h3>
<div
class=
"ctin-box"
>
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"content-fix"
>
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"
id"
label=
"序号
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
description"
label=
"描述
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
endclass"
label=
"终端类型
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
name"
label=
"名称
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
hz"
label=
"通知频率(分钟)
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
threshold"
label=
"盐值
"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"toEdit(scope.row)"
></el-button>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"toEdit(scope.row)"
></el-button>
...
@@ -33,14 +33,14 @@
...
@@ -33,14 +33,14 @@
<!-- 表单渲染 -->
<!-- 表单渲染 -->
<el-dialog
append-to-body
:close-on-click-modal=
"true"
:before-close=
"cancelForm"
:visible.sync=
"form.visible"
:title=
"form.title"
width=
"700px"
>
<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
:model=
"form.item"
:rules=
"rules"
ref=
"form1"
:inline=
"true"
size=
"small"
label-width=
"150px"
>
<el-form-item
label=
"终端类型"
prop=
"endclass"
>
<el-form-item
label=
"描述"
prop=
"description"
>
<el-select
v-model=
"form.item.endclass"
placeholder=
"请选择终端类型"
style=
"width:280px;"
>
<el-input
v-model=
"form.item.description"
style=
"width:280px;"
placeholder=
"请输入描述"
/>
<el-option
label=
"卡车"
value=
"卡车"
></el-option>
<el-option
label=
"电铲"
value=
"电铲"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"通知频率(分钟)"
prop=
"hz"
>
<el-form-item
label=
"名称"
prop=
"name"
>
<el-input
v-model=
"form.item.hz"
style=
"width:280px;"
placeholder=
"请输入通知频率"
/>
<el-input
v-model=
"form.item.name"
style=
"width:280px;"
placeholder=
"请输入名称"
/>
</el-form-item>
<el-form-item
label=
"盐值"
prop=
"threshold"
>
<el-input
v-model=
"form.item.threshold"
style=
"width:280px;"
placeholder=
"请输入盐值"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -67,21 +67,26 @@ export default {
...
@@ -67,21 +67,26 @@ export default {
query
:{},
query
:{},
tableData
:
[],
tableData
:
[],
form
:
{
form
:
{
title
:
'
新增
通知频率
'
,
title
:
'
新增
数据字典
'
,
visible
:
false
,
visible
:
false
,
reqType
:
'
add
'
,
reqType
:
'
add
'
,
status
:{
cu
:
0
},
status
:{
cu
:
0
},
item
:{},
item
:{},
},
},
rules
:
{
rules
:
{
// fdritime: [
description
:
[
// {required: true, message: '请输入通知频率', trigger: 'blur' }
{
required
:
true
,
message
:
'
请输入描述
'
,
trigger
:
'
blur
'
}
// ],
],
name
:
[
{
required
:
true
,
message
:
'
请输入名称
'
,
trigger
:
'
blur
'
}
],
threshold
:
[
{
required
:
true
,
message
:
'
请输入盐值
'
,
trigger
:
'
blur
'
}
],
},
},
}
}
},
},
mounted
()
{
mounted
()
{
var
that
=
this
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
loadData
();
this
.
loadData
();
})
})
...
@@ -95,12 +100,10 @@ export default {
...
@@ -95,12 +100,10 @@ export default {
param
.
sort
=
sort
;
param
.
sort
=
sort
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
notifiyFrequencyQuery
(
param
).
then
((
res
)
=>
{
HttpReq
.
truckDispatching
.
dataDictionaryQuery
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
tableData
=
res
.
content
;
this
.
tableData
=
res
.
data
.
content
;
this
.
total
=
res
.
content
.
length
;
this
.
total
=
res
.
data
.
totalElements
;
}
})
})
})
})
...
@@ -119,7 +122,7 @@ export default {
...
@@ -119,7 +122,7 @@ export default {
toAdd
()
{
toAdd
()
{
// 请除表单验证
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
新增
通知频率
'
;
this
.
form
.
title
=
'
新增
数据字典
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
visible
=
true
;
this
.
form
.
reqType
=
'
add
'
;
this
.
form
.
reqType
=
'
add
'
;
...
@@ -128,7 +131,7 @@ export default {
...
@@ -128,7 +131,7 @@ export default {
toEdit
(
item
)
{
toEdit
(
item
)
{
// 请除表单验证
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
修改
通知频率
'
;
this
.
form
.
title
=
'
修改
数据字典
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
visible
=
true
;
this
.
form
.
item
=
{...
item
};
this
.
form
.
item
=
{...
item
};
...
@@ -169,68 +172,44 @@ export default {
...
@@ -169,68 +172,44 @@ export default {
});
});
};
};
},
},
//新增
通知频率
//新增
数据字典
reqAddItem
(
form
,
item
){
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
notifiyFrequencyAdd
(
lastData
).
then
((
res
)
=>
{
HttpReq
.
truckDispatching
.
dataDictionaryAdd
(
lastData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
'
新增成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
form
.
visible
=
false
;
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
this
.
loadData
();
this
.
$notify
({
title
:
'
通知频率新增成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
}).
catch
(
function
(
error
)
{
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
form
.
status
.
cu
=
0
});
});
},
},
//修改
通知频率
//修改
数据字典
reqUpdateItem
(
form
,
item
){
reqUpdateItem
(
form
,
item
){
let
lastData
=
{...
item
};
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
notifiyFrequencyUpdate
(
lastData
).
then
((
res
)
=>
{
HttpReq
.
truckDispatching
.
dataDictionaryUpdate
(
lastData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
'
修改成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
form
.
visible
=
false
;
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
this
.
loadData
();
this
.
$notify
({
title
:
'
通知频率修改成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
}).
catch
(
function
(
error
)
{
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
form
.
status
.
cu
=
0
});
});
},
},
//删除
通知频率
//删除
数据字典
reqRemoveProject
(
item
){
reqRemoveProject
(
item
){
HttpReq
.
truckDispatching
.
notifiyFrequencyDel
(
item
).
then
((
res
)
=>
{
HttpReq
.
truckDispatching
.
dataDictionaryDel
(
item
).
then
((
res
)
=>
{
if
(
res
.
status
==
400
){
this
.
$notify
({
this
.
$notify
({
title
:
'
删除成功!
'
,
title
:
res
.
msg
,
type
:
'
success
'
,
type
:
'
error
'
,
duration
:
2500
duration
:
2500
});
})
}
else
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
}
this
.
loadData
();
this
.
loadData
();
})
})
},
},
...
...
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