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 e25e374f
authored
Aug 28, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
bac63e36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
38 deletions
src/views/trafficManagement/editDialog.vue
src/views/trafficManagement/index.vue
src/views/trafficManagement/editDialog.vue
View file @
e25e374
<!-- 新增/编辑车辆弹窗 -->
<!-- 新增/编辑车辆弹窗 -->
import { constants } from 'fs';
<
template
>
<
template
>
<div>
<div>
<el-dialog
<el-dialog
:title=
"!editForm.
carNum
? '添加车辆' : '编辑车辆'"
:title=
"!editForm.
trafficCode
? '添加车辆' : '编辑车辆'"
:visible
.
sync=
"isVisible"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
:before-close=
"handleClose"
>
>
...
@@ -15,25 +14,25 @@ import { constants } from 'fs';
...
@@ -15,25 +14,25 @@ import { constants } from 'fs';
>
>
<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=
"
belongCar
"
>
<el-form-item
label=
"归属车辆段"
prop=
"
stationName
"
>
<el-select
v-model=
"editForm.
belongCar
"
placeholder=
"请选择归属车辆段"
clearable
filterable
>
<el-select
v-model=
"editForm.
stationName
"
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=
"
repairContractor
"
>
<el-form-item
label=
"维修承包商"
prop=
"
merchantName
"
>
<el-input
v-model=
"editForm.
repairContractor
"
placeholder=
"请输入维修承包商"
clearable
></el-input>
<el-input
v-model=
"editForm.
merchantName
"
placeholder=
"请输入维修承包商"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"接口开放"
prop=
"
interfac
e"
>
<el-form-item
label=
"接口开放"
prop=
"
openTyp
e"
>
<el-radio
v-model=
"editForm.
interfac
e"
label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"editForm.
openTyp
e"
label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"editForm.
interface"
label=
"0
"
>
否
</el-radio>
<el-radio
v-model=
"editForm.
openType"
label=
"2
"
>
否
</el-radio>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
...
@@ -56,16 +55,16 @@ export default {
...
@@ -56,16 +55,16 @@ export default {
return
{
return
{
disabled
:
false
,
disabled
:
false
,
rules
:
{
rules
:
{
carNum
:
[
trafficCode
:
[
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
],
],
belongCar
:
[
stationName
:
[
{
required
:
true
,
message
:
'请选择归属车辆段'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择归属车辆段'
,
trigger
:
'change'
}
],
],
repairContractor
:
[
merchantName
:
[
{
required
:
true
,
message
:
'请输入维修承包商'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入维修承包商'
,
trigger
:
'blur'
}
],
],
interfac
e
:
[
openTyp
e
:
[
{
required
:
true
,
message
:
'请选择接口开放'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择接口开放'
,
trigger
:
'change'
}
],
],
}
}
...
@@ -81,8 +80,8 @@ export default {
...
@@ -81,8 +80,8 @@ export default {
watch
:
{
watch
:
{
isVisible
(
val
)
{
isVisible
(
val
)
{
this
.
disabled
=
this
.
editForm
.
carNum
?
true
:
false
this
.
disabled
=
this
.
editForm
.
trafficCode
?
true
:
false
this
.
editForm
.
interface
=
this
.
editForm
.
carNum
?
this
.
editForm
.
interfac
e
:
'1'
this
.
editForm
.
openType
=
this
.
editForm
.
trafficCode
?
this
.
editForm
.
openTyp
e
:
'1'
this
.
$refs
.
editRuleForm
.
resetFields
()
this
.
$refs
.
editRuleForm
.
resetFields
()
}
}
},
},
...
...
src/views/trafficManagement/index.vue
View file @
e25e374
...
@@ -128,22 +128,6 @@ export default {
...
@@ -128,22 +128,6 @@ export default {
// 表格
// 表格
tableLoading
:
false
,
tableLoading
:
false
,
tableData
:
[],
tableData
:
[],
// tableData: [{
// trafficCode: 'CRH45661-0001',
// stationName: '青岛',
// merchantName: '长春通富机电设备有限公司',
// openType: '1'
// }, {
// trafficCode: 'CRH45661-0002',
// stationName: '青岛',
// merchantName: '长春通富机电设备有限公司',
// openType: '0'
// }, {
// trafficCode: 'CRH45661-0003',
// stationName: '青岛',
// merchantName: '长春通富机电设备有限公司',
// openType: '1'
// }],
tableColumns
:
[{
tableColumns
:
[{
label
:
'车辆编号'
,
label
:
'车辆编号'
,
prop
:
'trafficCode'
prop
:
'trafficCode'
...
@@ -159,8 +143,8 @@ export default {
...
@@ -159,8 +143,8 @@ export default {
formatter
:
(
cellValue
)
=>
{
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
openType
)
{
if
(
cellValue
.
openType
)
{
return
{
return
{
0
:
'否
'
,
1
:
'是
'
,
1
:
'是
'
2
:
'否
'
}[
cellValue
.
openType
]
}[
cellValue
.
openType
]
}
}
}
}
...
@@ -193,7 +177,6 @@ export default {
...
@@ -193,7 +177,6 @@ export default {
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
params
.
method
=
trafficManageMethods
.
Search
params
.
method
=
trafficManageMethods
.
Search
request
(
params
).
then
(
res
=>
{
request
(
params
).
then
(
res
=>
{
// console.log(res)
this
.
tableData
=
res
this
.
tableData
=
res
this
.
tableLoading
=
false
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
...
@@ -201,6 +184,17 @@ export default {
...
@@ -201,6 +184,17 @@ export default {
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
},
},
addTraffic
(
value
)
{
const
params
=
value
params
.
method
=
trafficManageMethods
.
Add
request
(
params
).
then
(
res
=>
{
this
.
handleEditClose
()
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
notice
.
errorTips
()
})
},
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
...
@@ -244,8 +238,9 @@ export default {
...
@@ -244,8 +238,9 @@ export default {
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.editVisible = !this.editVisible
// 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