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
b0ca8baf
Commit
b0ca8baf
authored
Apr 02, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
44841a6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
common.js
src/assets/js/common.js
+18
-0
index.vue
src/views/DeviceManage/deviceMan/index.vue
+12
-4
No files found.
src/assets/js/common.js
View file @
b0ca8baf
...
...
@@ -752,6 +752,24 @@ var HttpReq = function(){
data
:
data
,
})
},
//设备管理——添加通信账号
communicationAccountAdd
:
function
(
data
){
return
request
({
url
:
'
/instantMessage/createUsers
'
,
method
:
'
POST
'
,
data
:
data
,
}).
then
((
res
)
=>
{
return
res
})
},
//设备管理——删除通信账号
communicationAccountDel
:
function
(
data
){
return
request
({
url
:
'
/instantMessage/deleteUsers
'
,
method
:
'
Delete
'
,
data
:
data
,
})
},
//设备管理——报警管理
callPoliceQuery
:
function
(
param
){
return
request
({
...
...
src/views/DeviceManage/deviceMan/index.vue
View file @
b0ca8baf
...
...
@@ -66,10 +66,10 @@
</el-select>
</el-form-item>
<el-form-item
label=
"通信账号"
prop=
"number"
>
<el-input
v-model=
"form.item.number"
style=
"width:280px;"
placeholder=
"请输入通信账号"
/>
<el-input
v-model=
"form.item.number"
style=
"width:280px;"
placeholder=
"请输入通信账号"
:disabled=
"form.reqType == 'edit'"
/>
</el-form-item>
<el-form-item
label=
"通信密码"
prop=
"password"
>
<el-input
v-model=
"form.item.password"
style=
"width:280px;"
show-password
placeholder=
"请输入通信密码"
/>
<el-input
v-model=
"form.item.password"
style=
"width:280px;"
show-password
placeholder=
"请输入通信密码"
:disabled=
"form.reqType == 'edit'"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"form.item.remarks"
style=
"width:280px;"
></el-input>
...
...
@@ -186,12 +186,13 @@ export default {
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
var
communicationName
=
item
.
number
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
((
e
)
=>
{
this
.
reqRemoveProject
([
id
])
this
.
reqRemoveProject
([
id
]
,
communicationName
)
}).
catch
((
e
)
=>
{})
},
pageChange
(
e
)
{
...
...
@@ -222,6 +223,7 @@ export default {
//新增设备
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
//新增设备数据
HttpReq
.
truckDispatching
.
deviceManagementAdd
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
...
...
@@ -241,6 +243,9 @@ export default {
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
//新增通信账号
let
communicationAccount
=
lastData
.
number
;
HttpReq
.
truckDispatching
.
communicationAccountAdd
({
name
:
communicationAccount
}).
then
((
res
)
=>
{})
},
//修改设备
reqUpdateItem
(
form
,
item
){
...
...
@@ -266,7 +271,8 @@ export default {
});
},
//删除设备
reqRemoveProject
(
item
){
reqRemoveProject
(
item
,
communicationName
){
//删除设备信息
HttpReq
.
truckDispatching
.
deviceManagementDel
(
item
).
then
((
res
)
=>
{
if
(
res
.
status
==
400
){
this
.
$notify
({
...
...
@@ -283,6 +289,8 @@ export default {
}
this
.
loadData
();
})
//删除通信账号
HttpReq
.
truckDispatching
.
communicationAccountDel
({
name
:
communicationName
}).
then
((
res
)
=>
{})
},
}
}
...
...
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