Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
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 93546332
authored
Dec 28, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
远程搜索
1 parent
2d2725e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
19 deletions
src/views/device/device.vue
src/views/user/user.vue
src/views/device/device.vue
View file @
9354633
...
...
@@ -6,12 +6,23 @@
inline=
"true"
>
<el-form-item
label=
"客户名称:"
>
<el-
inpu
t
<el-
selec
t
v-model=
"searchForm.customerName"
placeholder=
"请输入客户名称"
:size=
"$store.state.d2admin.size.value"
filterable
remote
clearable
></el-input>
placeholder=
"请选择客户名称"
:remote-method=
"getUserDownList"
:size=
"$store.state.d2admin.size.value"
>
<el-option
v-for=
"(item, index) in baseData.userList"
:key=
"index"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"设备类型:"
>
<el-select
...
...
@@ -63,12 +74,14 @@
</
template
>
<
script
>
import
{
deviceList
,
userDeviceDropList
}
from
'@api/api'
import
{
deviceList
,
userDeviceDropList
,
userDropList
}
from
'@api/api'
export
default
{
name
:
'device'
,
data
()
{
return
{
searchForm
:
{},
searchForm
:
{
customerName
:
''
},
activateTime
:
[],
getListApi
:
deviceList
,
tableParams
:
{
...
...
@@ -113,10 +126,14 @@ export default {
}
},
watch
:
{
'searchForm.customerName'
(
newVal
)
{
!
newVal
&&
(
this
.
baseData
.
userList
=
[])
}
},
mounted
()
{
userDeviceDropList
({}).
then
(
res
=>
{
// console.log(res)
// this.baseData.userList = res.customerNameList
this
.
baseData
.
deviceList
=
res
.
deviceTypeList
})
},
...
...
@@ -133,7 +150,15 @@ export default {
},
handleRest
()
{
this
.
activateTime
=
[]
this
.
searchForm
=
{}
this
.
searchForm
=
{
customerName
:
''
}
this
.
baseData
.
userList
=
[]
},
getUserDownList
(
query
)
{
userDropList
({
customerName
:
query
}).
then
(
res
=>
{
this
.
baseData
.
userList
=
res
})
}
}
}
...
...
src/views/user/user.vue
View file @
9354633
...
...
@@ -6,12 +6,23 @@
inline=
"true"
>
<el-form-item
label=
"客户名称:"
>
<el-
inpu
t
<el-
selec
t
v-model=
"searchForm.customerName"
placeholder=
"请输入客户名称"
:size=
"$store.state.d2admin.size.value"
filterable
remote
clearable
></el-input>
placeholder=
"请选择客户名称"
:remote-method=
"getUserDownList"
:size=
"$store.state.d2admin.size.value"
>
<el-option
v-for=
"(item, index) in baseData.userList"
:key=
"index"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"注册时间:"
>
<el-date-picker
...
...
@@ -54,7 +65,9 @@ export default {
name
:
'user'
,
data
()
{
return
{
searchForm
:
{},
searchForm
:
{
customerName
:
''
},
registerTime
:
[],
getListApi
:
userList
,
tableParams
:
{
...
...
@@ -100,12 +113,14 @@ export default {
}
},
mounted
()
{
// userDropList({}).then(res =>
{
// this.baseData.userList = res
// })
watch
:
{
'searchForm.customerName'
(
newVal
)
{
!
newVal
&&
(
this
.
baseData
.
userList
=
[])
}
},
mounted
()
{
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
...
...
@@ -118,7 +133,15 @@ export default {
},
handleRest
()
{
this
.
registerTime
=
[]
this
.
searchForm
=
{}
this
.
searchForm
=
{
customerName
:
''
}
this
.
baseData
.
userList
=
[]
},
getUserDownList
(
query
)
{
userDropList
({
customerName
:
query
}).
then
(
res
=>
{
this
.
baseData
.
userList
=
res
})
}
}
}
...
...
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