Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 f39c491e
authored
Aug 29, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 路由传参修改
1 parent
2b42564c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
121 additions
and
109 deletions
src/views/systemConfig/deviceManage/deviceHistory.vue
src/views/systemConfig/deviceManage/deviceList.vue
src/views/systemConfig/deviceManage/deviceHistory.vue
View file @
f39c491
...
...
@@ -94,7 +94,7 @@ export default {
components
:
{},
computed
:
{},
created
()
{
this
.
recordInfo
=
this
.
$route
.
params
.
info
this
.
recordInfo
=
JSON
.
parse
(
this
.
$route
.
query
.
info
)
},
mounted
()
{
this
.
getHistoryRecord
()
...
...
src/views/systemConfig/deviceManage/deviceList.vue
View file @
f39c491
<!-- 设备管理 -->
<
template
>
<d2-container
class=
"service-manage"
>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:form-data=
"showFormData"
/>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:form-data=
"showFormData"
/>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<div
class=
"d2-container-content"
>
<d2-table-header>
<span
slot=
"left"
>
<auth-button
category=
"Button"
/></span>
<span
slot=
"left"
>
<auth-button
category=
"Button"
/></span>
</d2-table-header>
<d2-table
ref=
"deviceTable"
:search-form=
"searchForm"
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
/>
<d2-table
ref=
"deviceTable"
:search-form=
"searchForm"
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
/>
</d2-table>
</div>
</d2-container>
</
template
>
<
script
>
import
{
Util
,
deepClone
}
from
'@/common/util'
import
{
trmList
,
trmDelete
}
from
'@api/deviceManage'
import
{
mapActions
}
from
'vuex'
import
{
BaseData
}
from
'@/common/constants.js'
import
{
Util
,
deepClone
}
from
"@/common/util"
import
{
trmList
,
trmDelete
}
from
"@api/deviceManage"
import
{
mapActions
}
from
"vuex"
import
{
BaseData
}
from
"@/common/constants.js"
export
default
{
name
:
'DviceList'
,
name
:
"DviceList"
,
data
()
{
return
{
searchForm
:
{
posTrmNo
:
''
,
searchMerchantName
:
''
,
searchMerchantId
:
''
posTrmNo
:
""
,
searchMerchantName
:
""
,
searchMerchantId
:
""
},
showFormData
:
[{
label
:
'终端编码'
,
name
:
'posTrmNo'
,
type
:
'input'
,
placeholder
:
'请输入POS机的终端编码'
,
maxlength
:
'20'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
},
{
label
:
'商户名称'
,
name
:
'searchMerchantName'
,
type
:
'input'
,
placeholder
:
'请输入流量方/园区店名称'
,
maxlength
:
'20'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
},
{
label
:
'商户号'
,
name
:
'searchMerchantId'
,
type
:
'input'
,
inputType
:
'number'
,
maxlength
:
'20'
,
placeholder
:
'请输入流量方/园区店商户号'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
}],
showFormData
:
[
{
label
:
"终端编码"
,
name
:
"posTrmNo"
,
type
:
"input"
,
placeholder
:
"请输入POS机的终端编码"
,
maxlength
:
"20"
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
},
{
label
:
"商户名称"
,
name
:
"searchMerchantName"
,
type
:
"input"
,
placeholder
:
"请输入流量方/园区店名称"
,
maxlength
:
"20"
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
},
{
label
:
"商户号"
,
name
:
"searchMerchantId"
,
type
:
"input"
,
inputType
:
"number"
,
maxlength
:
"20"
,
placeholder
:
"请输入流量方/园区店商户号"
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
}
],
maxLength
:
10
,
getListApi
:
trmList
,
// 表格参数
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
listName
:
"list"
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'终端编码'
,
prop
:
'posTrmNo'
},
{
label
:
'关联园区店'
,
prop
:
'yqMerchantName'
},
{
label
:
'园区店商户号'
,
prop
:
'yqMerchantId'
,
width
:
'120'
},
{
label
:
'关联流量方'
,
prop
:
'merchantName'
},
{
label
:
'流量方商户号'
,
prop
:
'merchantId'
,
width
:
'120'
},
{
label
:
'最近更新时间'
,
prop
:
'updatedDate'
,
width
:
'160'
,
formatter
:
(
cellValue
)
=>
{
return
Util
.
dateFormate
(
cellValue
.
updatedDate
,
'YYYY-MM-DD HH:mm:ss'
)
tableColumns
:
[
{
label
:
"终端编码"
,
prop
:
"posTrmNo"
},
{
label
:
"关联园区店"
,
prop
:
"yqMerchantName"
},
{
label
:
"园区店商户号"
,
prop
:
"yqMerchantId"
,
width
:
"120"
},
{
label
:
"关联流量方"
,
prop
:
"merchantName"
},
{
label
:
"流量方商户号"
,
prop
:
"merchantId"
,
width
:
"120"
},
{
label
:
"最近更新时间"
,
prop
:
"updatedDate"
,
width
:
"160"
,
formatter
:
(
cellValue
)
=>
{
return
Util
.
dateFormate
(
cellValue
.
updatedDate
,
"YYYY-MM-DD HH:mm:ss"
)
}
}
}
]
]
},
baseData
:
{
}
baseData
:
{}
}
},
components
:
{
},
components
:
{},
mounted
()
{
this
.
getBaseData
()
...
...
@@ -127,13 +137,13 @@ export default {
},
methods
:
{
...
mapActions
({
close
:
'd2admin/page/close'
}),
...
mapActions
({
close
:
"d2admin/page/close"
}),
async
getBaseData
()
{
this
.
getOptionsList
()
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
(
resolve
)
=>
{
resolve
()
})
},
...
...
@@ -142,26 +152,29 @@ export default {
},
handleReset
()
{
this
.
searchForm
=
{
posTrmNo
:
''
,
searchMerchantName
:
''
,
searchMerchantId
:
''
posTrmNo
:
""
,
searchMerchantName
:
""
,
searchMerchantId
:
""
}
this
.
$refs
.
deviceTable
.
refreshTable
()
},
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
item
.
type
===
"select"
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
"全部"
)
{
const
temp
=
{}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
''
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
'全部'
temp
[
this
.
showFormData
[
index
].
optionId
]
=
""
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
"全部"
this
.
baseData
[
item
.
optionsName
].
unshift
(
temp
)
}
this
.
$set
(
this
.
showFormData
[
index
],
'optionList'
,
"optionList"
,
this
.
baseData
[
item
.
optionsName
]
)
}
...
...
@@ -169,21 +182,21 @@ export default {
},
handleAdd
()
{
this
.
close
({
tagName
:
'/editDevice'
})
this
.
close
({
tagName
:
"/editDevice"
})
this
.
$router
.
push
({
name
:
'editDevice'
,
name
:
"editDevice"
,
params
:
{
addOrEdit
:
'add'
addOrEdit
:
"add"
}
})
},
handleEdit
(
row
)
{
this
.
close
({
tagName
:
'/editDevice'
})
this
.
close
({
tagName
:
"/editDevice"
})
this
.
$router
.
push
({
name
:
'editDevice'
,
name
:
"editDevice"
,
params
:
{
addOrEdit
:
'edit'
,
addOrEdit
:
"edit"
,
info
:
row
}
})
...
...
@@ -208,17 +221,16 @@ export default {
},
handleHistory
(
row
)
{
this
.
close
({
tagName
:
'/deviceHistory'
})
this
.
close
({
tagName
:
"/deviceHistory"
})
this
.
$router
.
push
({
name
:
'deviceHistory'
,
params
:
{
info
:
row
name
:
"deviceHistory"
,
query
:
{
info
:
JSON
.
stringify
(
row
)
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
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