Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
SHR
/
tFIMS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0fa854df
authored
Aug 29, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口修改
1 parent
55928a93
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
180 additions
and
118 deletions
src/api/subSysManagement.js
src/api/sys.traffic.subsys.js
src/api/systemMonitor.js
src/api/trafficManagement.js
src/router/routes.js
src/views/subSysManagement/editDialog.vue
src/views/subSysManagement/index.vue
src/views/trafficManagement/index.vue
src/api/subSysManagement.js
0 → 100644
View file @
0fa854d
import
request
from
'./request'
const
path
=
'fims.subsystem.'
const
methods
=
{
Add
:
`
${
path
}
add`
,
Edit
:
`
${
path
}
edit`
}
function
getListApi
(
data
)
{
data
.
method
=
`
${
path
}
list`
return
request
(
data
)
}
function
editApi
(
data
)
{
return
request
(
data
)
}
function
removeApi
(
data
)
{
data
.
method
=
`
${
path
}
remove`
return
request
(
data
)
}
export
{
getListApi
,
methods
,
editApi
,
removeApi
}
\ No newline at end of file
\ No newline at end of file
src/api/sys.traffic.subsys.js
deleted
100644 → 0
View file @
55928a9
const
sysMonitorPath
=
'fims.system.'
const
trafficManagePath
=
'fims.traffic.'
const
sysMonitorMethods
=
{
Search
:
`
${
sysMonitorPath
}
list`
,
Report
:
`
${
sysMonitorPath
}
report`
}
const
trafficManageMethods
=
{
Add
:
`
${
trafficManagePath
}
add`
,
Search
:
`
${
trafficManagePath
}
list`
,
Edit
:
`
${
trafficManagePath
}
edit`
,
Remove
:
`
${
trafficManagePath
}
remove`
}
export
{
sysMonitorMethods
,
trafficManageMethods
}
src/api/systemMonitor.js
View file @
0fa854d
import
request
from
'./request'
import
request
from
'./request'
const
sysMonitorP
ath
=
'fims.system.'
const
p
ath
=
'fims.system.'
function
getListApi
(
data
)
{
function
getListApi
(
data
)
{
data
.
method
=
`
${
sysMonitorP
ath
}
list`
data
.
method
=
`
${
p
ath
}
list`
return
request
(
data
)
return
request
(
data
)
}
}
function
reportApi
(
data
)
{
function
reportApi
(
data
)
{
data
.
method
=
`
${
sysMonitorP
ath
}
report`
data
.
method
=
`
${
p
ath
}
report`
return
request
(
data
)
return
request
(
data
)
}
}
...
...
src/api/trafficManagement.js
View file @
0fa854d
import
request
from
'./request'
import
request
from
'./request'
const
trafficManageP
ath
=
'fims.traffic.'
const
p
ath
=
'fims.traffic.'
function
getListApi
(
data
)
{
const
methods
=
{
data
.
method
=
`
${
trafficManagePath
}
list`
Add
:
`
${
path
}
add`
,
return
request
(
data
)
Edit
:
`
${
path
}
edit`
}
}
function
add
Api
(
data
)
{
function
getList
Api
(
data
)
{
data
.
method
=
`
${
trafficManagePath
}
add
`
data
.
method
=
`
${
path
}
list
`
return
request
(
data
)
return
request
(
data
)
}
}
// function addApi (data) {
// data.method = `${path}add`
// return request(data)
// }
function
editApi
(
data
)
{
function
editApi
(
data
)
{
data
.
method
=
`
${
trafficManageP
ath
}
edit`
// data.method = `${p
ath}edit`
return
request
(
data
)
return
request
(
data
)
}
}
function
removeApi
(
data
)
{
function
removeApi
(
data
)
{
data
.
method
=
`
${
trafficManageP
ath
}
remove`
data
.
method
=
`
${
p
ath
}
remove`
return
request
(
data
)
return
request
(
data
)
}
}
export
{
export
{
getListApi
,
getListApi
,
addApi
,
methods
,
// addApi,
editApi
,
editApi
,
removeApi
removeApi
}
}
\ No newline at end of file
\ No newline at end of file
src/router/routes.js
View file @
0fa854d
...
@@ -87,14 +87,14 @@ export const resources = {
...
@@ -87,14 +87,14 @@ export const resources = {
},
},
component
:
_import
(
'demo/page3'
)
component
:
_import
(
'demo/page3'
)
},
},
// '10
3
': {
// '10
2
': {
// path: 'trafficManagement',
// path: 'trafficManagement',
// icon: 'folder-o',
// icon: 'folder-o',
// name: '车辆管理',
// name: '车辆管理',
// meta: {
// meta: {
// auth: true,
// auth: true,
// title: '车辆管理',
// title: '车辆管理',
// id: '10
3
',
// id: '10
2
',
// pid: '0'
// pid: '0'
// },
// },
// component: _import('trafficManagement')
// component: _import('trafficManagement')
...
@@ -114,10 +114,10 @@ export const resources = {
...
@@ -114,10 +114,10 @@ export const resources = {
'104'
:
{
'104'
:
{
path
:
'trafficManagement'
,
path
:
'trafficManagement'
,
icon
:
'folder-o'
,
icon
:
'folder-o'
,
name
:
'
物料
管理'
,
name
:
'
车辆
管理'
,
meta
:
{
meta
:
{
auth
:
true
,
auth
:
true
,
title
:
'
物料
管理'
,
title
:
'
车辆
管理'
,
id
:
'104'
,
id
:
'104'
,
pid
:
'0'
pid
:
'0'
},
},
...
...
src/views/subSysManagement/editDialog.vue
View file @
0fa854d
...
@@ -3,7 +3,7 @@ import { constants } from 'fs';
...
@@ -3,7 +3,7 @@ import { constants } from 'fs';
<
template
>
<
template
>
<div>
<div>
<el-dialog
<el-dialog
:title=
"!editForm.sub
SystemNum
? '添加子系统' : '编辑子系统'"
:title=
"!editForm.sub
systemCode
? '添加子系统' : '编辑子系统'"
:visible
.
sync=
"isVisible"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
:before-close=
"handleClose"
>
>
...
@@ -15,42 +15,42 @@ import { constants } from 'fs';
...
@@ -15,42 +15,42 @@ import { constants } from 'fs';
>
>
<el-form-item
<el-form-item
label=
"子系统编号"
label=
"子系统编号"
prop=
"sub
SystemNum
"
>
prop=
"sub
systemCode
"
>
<el-input
<el-input
:disabled=
"disabled"
:disabled=
"disabled"
v-model=
"editForm.sub
SystemNum
"
v-model=
"editForm.sub
systemCode
"
placeholder=
"请输入子系统编号"
placeholder=
"请输入子系统编号"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"车辆编号"
label=
"车辆编号"
prop=
"
carNum
"
>
prop=
"
trafficCode
"
>
<el-input
<el-input
:disabled=
"disabled"
:disabled=
"disabled"
v-model=
"editForm.
carNum
"
v-model=
"editForm.
trafficCode
"
placeholder=
"请输入车辆编号"
placeholder=
"请输入车辆编号"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"类型"
prop=
"
t
ype"
>
<el-form-item
label=
"类型"
prop=
"
systemT
ype"
>
<el-select
v-model=
"editForm.
t
ype"
placeholder=
"请选择类型"
clearable
filterable
>
<el-select
v-model=
"editForm.
systemT
ype"
placeholder=
"请选择类型"
clearable
filterable
>
<el-option
label=
"座椅"
value=
"1"
></el-option>
<el-option
label=
"座椅"
value=
"1"
></el-option>
<el-option
label=
"桌板"
value=
"2"
></el-option>
<el-option
label=
"桌板"
value=
"2"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"生产厂家"
prop=
"m
anufacturer
"
>
<el-form-item
label=
"生产厂家"
prop=
"m
erchantName
"
>
<el-input
v-model=
"editForm.m
anufacturer
"
placeholder=
"请输入生产厂家"
clearable
></el-input>
<el-input
v-model=
"editForm.m
erchantName
"
placeholder=
"请输入生产厂家"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发送结点序列"
prop=
"
xl
"
>
<el-form-item
label=
"发送结点序列"
prop=
"
sendSequence
"
>
<el-input
v-model=
"editForm.
xl
"
placeholder=
"请输入发送结点序列"
clearable
></el-input>
<el-input
v-model=
"editForm.
sendSequence
"
placeholder=
"请输入发送结点序列"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发送节点端口"
prop=
"
jk
"
>
<el-form-item
label=
"发送节点端口"
prop=
"
sendPort
"
>
<el-input
v-model=
"editForm.
jk
"
placeholder=
"请输入发送节点端口"
clearable
></el-input>
<el-input
v-model=
"editForm.
sendPort
"
placeholder=
"请输入发送节点端口"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"网关地址"
prop=
"
wgdz
"
>
<el-form-item
label=
"网关地址"
prop=
"
gatewayUrl
"
>
<el-input
v-model=
"editForm.
wgdz
"
placeholder=
"请输入网关地址"
clearable
></el-input>
<el-input
v-model=
"editForm.
gatewayUrl
"
placeholder=
"请输入网关地址"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"网关端口"
prop=
"
wgdk
"
>
<el-form-item
label=
"网关端口"
prop=
"
gatewayPort
"
>
<el-input
v-model=
"editForm.
wgdk
"
placeholder=
"请输入网关端口"
clearable
></el-input>
<el-input
v-model=
"editForm.
gatewayPort
"
placeholder=
"请输入网关端口"
clearable
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
...
@@ -73,28 +73,28 @@ export default {
...
@@ -73,28 +73,28 @@ export default {
return
{
return
{
disabled
:
false
,
disabled
:
false
,
rules
:
{
rules
:
{
sub
SystemNum
:
[
sub
systemCode
:
[
{
required
:
true
,
message
:
'请输入子系统编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入子系统编号'
,
trigger
:
'blur'
}
],
],
carNum
:
[
trafficCode
:
[
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
],
],
t
ype
:
[
systemT
ype
:
[
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
],
],
m
anufacturer
:
[
m
erchantName
:
[
{
required
:
true
,
message
:
'请输入生产厂家'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入生产厂家'
,
trigger
:
'blur'
}
],
],
xl
:
[
sendSequence
:
[
{
required
:
true
,
message
:
'请输入发送节点序列'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入发送节点序列'
,
trigger
:
'blur'
}
],
],
jk
:
[
sendPort
:
[
{
required
:
true
,
message
:
'请输入发送节点端口'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入发送节点端口'
,
trigger
:
'blur'
}
],
],
wgdz
:
[
gatewayUrl
:
[
{
required
:
true
,
message
:
'请输入网关地址'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入网关地址'
,
trigger
:
'blur'
}
],
],
wgdk
:
[
gatewayPort
:
[
{
required
:
true
,
message
:
'请输入网关端口'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入网关端口'
,
trigger
:
'blur'
}
]
]
}
}
...
@@ -110,8 +110,7 @@ export default {
...
@@ -110,8 +110,7 @@ export default {
watch
:
{
watch
:
{
isVisible
(
val
)
{
isVisible
(
val
)
{
this
.
disabled
=
!!
this
.
editForm
.
subSystemNum
this
.
disabled
=
this
.
editForm
.
subsystemCode
?
true
:
false
// this.editForm.interface = this.editForm.carNum ? this.editForm.interface : '1'
this
.
$refs
.
editRuleForm
.
resetFields
()
this
.
$refs
.
editRuleForm
.
resetFields
()
}
}
},
},
...
...
src/views/subSysManagement/index.vue
View file @
0fa854d
...
@@ -7,19 +7,19 @@
...
@@ -7,19 +7,19 @@
label-width=
"85px"
label-width=
"85px"
>
>
<el-form-item
label=
"子系统编号"
>
<el-form-item
label=
"子系统编号"
>
<el-input
v-model=
"searchForm.sub
SystemNum
"
placeholder=
"请输入子系统编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.sub
systemCode
"
placeholder=
"请输入子系统编号"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-form-item
label=
"类型"
>
<el-select
v-model=
"searchForm.
typ
e"
placeholder=
"请选择类型"
clearable
filterable
>
<el-select
v-model=
"searchForm.
systemTypeCod
e"
placeholder=
"请选择类型"
clearable
filterable
>
<el-option
label=
"座椅"
value=
"1"
></el-option>
<el-option
label=
"座椅"
value=
"1"
></el-option>
<el-option
label=
"桌板"
value=
"2"
></el-option>
<el-option
label=
"桌板"
value=
"2"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"车辆编号"
>
<el-form-item
label=
"车辆编号"
>
<el-input
v-model=
"searchForm.
carNum
"
placeholder=
"请输入车辆编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.
trafficCode
"
placeholder=
"请输入车辆编号"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"生产厂家"
>
<el-form-item
label=
"生产厂家"
>
<el-input
v-model=
"searchForm.m
anufacturer
"
placeholder=
"请输入生产厂家"
clearable
></el-input>
<el-input
v-model=
"searchForm.m
erchantName
"
placeholder=
"请输入生产厂家"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
...
@@ -97,6 +97,8 @@
...
@@ -97,6 +97,8 @@
<
script
>
<
script
>
import
EditDialog
from
'./editDialog'
import
EditDialog
from
'./editDialog'
import
{
getListApi
,
methods
,
editApi
,
removeApi
}
from
'@api/subSysManagement'
import
notice
from
'@/common/notice'
export
default
{
export
default
{
name
:
'subSysManagement'
,
name
:
'subSysManagement'
,
components
:
{
components
:
{
...
@@ -107,74 +109,74 @@ export default {
...
@@ -107,74 +109,74 @@ export default {
// 新增/编辑弹窗
// 新增/编辑弹窗
editVisible
:
false
,
editVisible
:
false
,
editForm
:
{
editForm
:
{
sub
SystemNum
:
''
,
sub
systemCode
:
''
,
t
ype
:
''
,
systemT
ype
:
''
,
carNum
:
''
,
trafficCode
:
''
,
m
anufacturer
:
''
,
m
erchantName
:
''
,
xl
:
''
,
sendSequence
:
''
,
jk
:
''
,
sendPort
:
''
,
wgdz
:
''
,
gatewayUrl
:
''
,
wgdk
:
''
gatewayPort
:
''
},
},
// 搜索
// 搜索
searchForm
:
{
searchForm
:
{
sub
SystemNum
:
''
,
sub
systemCode
:
''
,
typ
e
:
''
,
systemTypeCod
e
:
''
,
carNum
:
''
,
trafficCode
:
''
,
m
anufacturer
:
''
m
erchantName
:
''
},
},
tableData
:
[{
tableData
:
[{
sub
SystemNum
:
'3#1F'
,
sub
systemCode
:
'3#1F'
,
t
ype
:
'座椅'
,
systemT
ype
:
'座椅'
,
carNum
:
'CRH45661-5648'
,
trafficCode
:
'CRH45661-5648'
,
m
anufacturer
:
'长春通富机电设备有限公司'
,
m
erchantName
:
'长春通富机电设备有限公司'
,
xl
:
'1.56'
,
sendSequence
:
'1.56'
,
jk
:
'4000'
,
sendPort
:
'4000'
,
wgdz
:
'192.168.1.1'
,
gatewayUrl
:
'192.168.1.1'
,
wgdk
:
'8000'
gatewayPort
:
'8000'
},
{
},
{
sub
SystemNum
:
'3#2F'
,
sub
systemCode
:
'3#2F'
,
t
ype
:
'桌板'
,
systemT
ype
:
'桌板'
,
carNum
:
'CRH45661-5648'
,
trafficCode
:
'CRH45661-5648'
,
m
anufacturer
:
'长春通富机电设备有限公司'
,
m
erchantName
:
'长春通富机电设备有限公司'
,
xl
:
'1.56'
,
sendSequence
:
'1.56'
,
jk
:
'4000'
,
sendPort
:
'4000'
,
wgdz
:
'192.168.1.1'
,
gatewayUrl
:
'192.168.1.1'
,
wgdk
:
'8000'
gatewayPort
:
'8000'
},
{
},
{
sub
SystemNum
:
'3#3F'
,
sub
systemCode
:
'3#3F'
,
t
ype
:
'座椅'
,
systemT
ype
:
'座椅'
,
carNum
:
'CRH45661-5648'
,
trafficCode
:
'CRH45661-5648'
,
m
anufacturer
:
'长春通富机电设备有限公司'
,
m
erchantName
:
'长春通富机电设备有限公司'
,
xl
:
'1.56'
,
sendSequence
:
'1.56'
,
jk
:
'4000'
,
sendPort
:
'4000'
,
wgdz
:
'192.168.1.1'
,
gatewayUrl
:
'192.168.1.1'
,
wgdk
:
'8000'
gatewayPort
:
'8000'
}],
}],
tableColumns
:
[{
tableColumns
:
[{
label
:
'子系统编号'
,
label
:
'子系统编号'
,
prop
:
'sub
SystemNum
'
prop
:
'sub
systemCode
'
},
{
},
{
label
:
'类型'
,
label
:
'类型'
,
prop
:
'
t
ype'
prop
:
'
systemT
ype'
},
{
},
{
label
:
'车辆编号'
,
label
:
'车辆编号'
,
prop
:
'
carNum
'
prop
:
'
trafficCode
'
},
{
},
{
label
:
'生产厂家'
,
label
:
'生产厂家'
,
prop
:
'm
anufacturer
'
prop
:
'm
erchantName
'
},
{
},
{
label
:
'发送结点序列'
,
label
:
'发送结点序列'
,
prop
:
'
xl
'
prop
:
'
sendSequence
'
},
{
},
{
label
:
'发送结点接口'
,
label
:
'发送结点接口'
,
prop
:
'
jk
'
prop
:
'
sendPort
'
},
{
},
{
label
:
'网关地址'
,
label
:
'网关地址'
,
prop
:
'
wgdz
'
prop
:
'
gatewayUrl
'
},
{
},
{
label
:
'网关端口'
,
label
:
'网关端口'
,
prop
:
'
wgdk
'
prop
:
'
gatewayPort
'
}],
}],
// 页码
// 页码
currentPage
:
1
,
currentPage
:
1
,
...
@@ -183,10 +185,49 @@ export default {
...
@@ -183,10 +185,49 @@ export default {
}
}
},
},
mounted
()
{
this
.
loadingGetList
()
},
methods
:
{
methods
:
{
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
},
/* 接口请求-start */
getParams
()
{
return
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
this
.
searchForm
}
},
getList
()
{
const
params
=
this
.
getParams
()
getListApi
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
this
.
tableLoading
=
false
})
},
editSubSystem
(
value
)
{
const
params
=
value
params
.
method
=
value
.
id
?
methods
.
Edit
:
methods
.
Add
editApi
(
params
).
then
(
res
=>
{
this
.
handleEditClose
()
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
notice
.
errorTips
()
})
},
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
console
.
log
(
this
.
searchForm
)
this
.
loadingGetList
()
},
},
// 页码
// 页码
...
@@ -194,12 +235,14 @@ export default {
...
@@ -194,12 +235,14 @@ export default {
console
.
log
(
value
)
console
.
log
(
value
)
this
.
pageSize
=
value
this
.
pageSize
=
value
// 调接口
// 调接口
this
.
loadingGetList
()
},
},
handleCurrentChange
(
value
)
{
handleCurrentChange
(
value
)
{
console
.
log
(
value
)
console
.
log
(
value
)
this
.
currentPage
=
value
this
.
currentPage
=
value
// 调接口
// 调接口
this
.
loadingGetList
()
},
},
resetForm
(
obj
)
{
resetForm
(
obj
)
{
...
@@ -213,18 +256,22 @@ export default {
...
@@ -213,18 +256,22 @@ export default {
},
},
handleAdd
()
{
handleAdd
()
{
console
.
log
(
this
.
editForm
)
this
.
editVisible
=
!
this
.
editVisible
this
.
editVisible
=
!
this
.
editVisible
},
},
handleEditClose
()
{
handleEditClose
()
{
this
.
editVisible
=
!
this
.
editVisible
this
.
editVisible
=
!
this
.
editVisible
this
.
resetForm
(
this
.
editForm
)
this
.
resetForm
(
this
.
editForm
)
console
.
log
(
this
.
editForm
)
},
},
handleEditConfirm
()
{
handleEditConfirm
()
{
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
)))
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
)))
this
.
editVisible
=
!
this
.
editVisible
var
editParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
))
this
.
resetForm
(
this
.
editForm
)
this
.
editSubSystem
(
this
.
editForm
)
// this.editVisible = !this.editVisible
// this.resetForm(this.editForm)
},
},
// 表格-编辑
// 表格-编辑
...
...
src/views/trafficManagement/index.vue
View file @
0fa854d
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
<
script
>
<
script
>
import
EditDialog
from
'./editDialog'
import
EditDialog
from
'./editDialog'
import
{
getListApi
,
addApi
,
editApi
,
removeApi
}
from
'@api/trafficManagement'
import
{
getListApi
,
methods
,
editApi
,
removeApi
}
from
'@api/trafficManagement'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
export
default
{
export
default
{
name
:
'trafficManagement'
,
name
:
'trafficManagement'
,
...
@@ -175,7 +175,6 @@ export default {
...
@@ -175,7 +175,6 @@ export default {
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
// params.method = trafficManageMethods.Search
getListApi
(
params
).
then
(
res
=>
{
getListApi
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
this
.
tableData
=
res
this
.
tableLoading
=
false
this
.
tableLoading
=
false
...
@@ -184,9 +183,10 @@ export default {
...
@@ -184,9 +183,10 @@ export default {
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
},
},
add
Traffic
(
value
)
{
edit
Traffic
(
value
)
{
const
params
=
value
const
params
=
value
addApi
(
params
).
then
(
res
=>
{
params
.
method
=
value
.
id
?
methods
.
Edit
:
methods
.
Add
editApi
(
params
).
then
(
res
=>
{
this
.
handleEditClose
()
this
.
handleEditClose
()
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingGetList
()
this
.
loadingGetList
()
...
@@ -227,19 +227,20 @@ export default {
...
@@ -227,19 +227,20 @@ export default {
},
},
handleAdd
()
{
handleAdd
()
{
console
.
log
(
this
.
editForm
)
this
.
editVisible
=
!
this
.
editVisible
this
.
editVisible
=
!
this
.
editVisible
},
},
handleEditClose
()
{
handleEditClose
()
{
this
.
editVisible
=
!
this
.
editVisible
this
.
editVisible
=
!
this
.
editVisible
this
.
resetForm
(
this
.
editForm
)
this
.
resetForm
(
this
.
editForm
)
console
.
log
(
this
.
editForm
)
},
},
handleEditConfirm
()
{
handleEditConfirm
()
{
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
)))
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
)))
var
editParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
))
var
editParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
))
// this.editVisible = !this.editVisible
this
.
editTraffic
(
editParams
)
// this.resetForm(this.editForm)
},
},
// 表格-编辑
// 表格-编辑
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment