记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
董敬伟
liquidnet-bus-v1
Commits
cb9caae8
Commit
cb9caae8
authored
Jun 21, 2021
by
qinshuangshuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
演出远程搜索框
parent
5eb8a51c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
49 deletions
+60
-49
remote-search-performance.js
...src/main/resources/static/js/remote-search-performance.js
+14
-17
include.html
...lient-admin-web/src/main/resources/templates/include.html
+1
-1
add.html
.../templates/zhengzai/kylin/performances/recommend/add.html
+3
-7
addPerformances.html
...zhengzai/kylin/performances/roadShow/addPerformances.html
+42
-24
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/static/js/remote-search.js
→
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/static/js/remote-search
-performance
.js
View file @
cb9caae8
;(
function
(
$
)
{
;(
function
(
$
)
{
//这里放入插件代码
//这里放入插件代码
var
RemoteSearch
=
function
(
element
,
options
)
{
var
RemoteSearch
Performance
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
);
this
.
$element
=
$
(
element
);
this
.
options
=
$
.
extend
(
true
,
{},
$
.
fn
.
remoteSearch
.
defaults
,
options
);
this
.
options
=
$
.
extend
(
true
,
{},
$
.
fn
.
remoteSearch
Performance
.
defaults
,
options
);
this
.
id
=
$
(
element
).
attr
(
'id'
);
this
.
id
=
$
(
element
).
attr
(
'id'
);
this
.
ulID
=
'#'
+
this
.
id
+
'_ul'
;
this
.
ulID
=
'#'
+
this
.
id
+
'_ul'
;
this
.
ulFoucus
=
false
;
this
.
ulFoucus
=
false
;
...
@@ -11,12 +11,12 @@
...
@@ -11,12 +11,12 @@
this
.
render
=
this
.
options
.
render
||
this
.
render
;
this
.
render
=
this
.
options
.
render
||
this
.
render
;
this
.
select
=
this
.
options
.
select
||
this
.
select
;
this
.
select
=
this
.
options
.
select
||
this
.
select
;
this
.
ajax
=
$
.
extend
({},
$
.
fn
.
remoteSearch
.
defaults
.
ajax
,
this
.
options
.
ajax
);
this
.
ajax
=
$
.
extend
({},
$
.
fn
.
remoteSearch
Performance
.
defaults
.
ajax
,
this
.
options
.
ajax
);
this
.
listen
();
this
.
listen
();
}
}
RemoteSearch
.
prototype
=
{
RemoteSearch
Performance
.
prototype
=
{
listen
:
function
()
{
listen
:
function
()
{
this
.
$element
.
on
(
'blur'
,
$
.
proxy
(
this
.
blur
,
this
))
this
.
$element
.
on
(
'blur'
,
$
.
proxy
(
this
.
blur
,
this
))
.
on
(
'keyup'
,
$
.
proxy
(
this
.
keyup
,
this
));
.
on
(
'keyup'
,
$
.
proxy
(
this
.
keyup
,
this
));
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
// tab
// tab
case
13
:
case
13
:
// enter
// enter
break
;
this
.
ajaxer
()
;
case
27
:
case
27
:
// escape
// escape
break
;
break
;
...
@@ -61,10 +61,10 @@
...
@@ -61,10 +61,10 @@
},
},
ajaxer
:
function
()
{
ajaxer
:
function
()
{
var
that
=
this
,
var
that
=
this
,
query
=
that
.
$element
.
val
();
title
=
that
.
$element
.
val
();
// Query changed
// Query changed
that
.
query
=
query
;
that
.
title
=
title
;
// Cancel last timer if set
// Cancel last timer if set
if
(
that
.
ajax
.
timerId
)
{
if
(
that
.
ajax
.
timerId
)
{
clearTimeout
(
that
.
ajax
.
timerId
);
clearTimeout
(
that
.
ajax
.
timerId
);
...
@@ -73,10 +73,9 @@
...
@@ -73,10 +73,9 @@
// Query is good to send, set a timer
// Query is good to send, set a timer
that
.
ajax
.
timerId
=
setTimeout
(
function
()
{
that
.
ajax
.
timerId
=
setTimeout
(
function
()
{
var
params
=
{
query
:
query
};
var
params
=
{
title
:
title
};
var
jAjax
=
(
that
.
ajax
.
method
===
"post"
)
?
$
.
post
:
$
.
get
;
var
jAjax
=
(
that
.
ajax
.
method
===
"post"
)
?
$
.
post
:
$
.
get
;
jAjax
(
that
.
ajax
.
url
,
params
,
function
(
data
){
jAjax
(
that
.
ajax
.
url
,
params
,
function
(
data
){
console
.
log
(
data
);
return
that
.
render
(
data
.
value
);
return
that
.
render
(
data
.
value
);
});
});
that
.
ajax
.
timerId
=
null
;
that
.
ajax
.
timerId
=
null
;
...
@@ -85,7 +84,6 @@
...
@@ -85,7 +84,6 @@
return
that
;
return
that
;
},
},
render
:
function
(
data
)
{
render
:
function
(
data
)
{
console
.
log
(
data
);
this
.
ulFoucus
=
false
;
this
.
ulFoucus
=
false
;
var
liList
=
data
||
[];
var
liList
=
data
||
[];
var
num
=
this
.
_getNum
();
var
num
=
this
.
_getNum
();
...
@@ -136,14 +134,14 @@
...
@@ -136,14 +134,14 @@
}
}
$
.
fn
.
remoteSearch
=
function
(
option
)
{
$
.
fn
.
remoteSearch
Performance
=
function
(
option
)
{
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
),
var
$this
=
$
(
this
),
data
=
$this
.
data
(
'remoteSearch'
),
data
=
$this
.
data
(
'remoteSearch
Performance
'
),
options
=
typeof
option
===
'object'
&&
option
;
options
=
typeof
option
===
'object'
&&
option
;
if
(
!
data
)
{
if
(
!
data
)
{
$this
.
data
(
'remoteSearch
'
,
(
data
=
new
RemoteSearch
(
this
,
options
)));
$this
.
data
(
'remoteSearch
Performance'
,
(
data
=
new
RemoteSearchPerformance
(
this
,
options
)));
}
}
if
(
typeof
option
===
'string'
)
{
if
(
typeof
option
===
'string'
)
{
...
@@ -152,9 +150,10 @@
...
@@ -152,9 +150,10 @@
});
});
}
}
$
.
fn
.
remoteSearch
.
defaults
=
{
$
.
fn
.
remoteSearch
Performance
.
defaults
=
{
hiddenVal
:
''
,
hiddenVal
:
''
,
chose
:
function
()
{
},
chose
:
function
()
{
},
ajax
:
{
ajax
:
{
url
:
null
,
url
:
null
,
timeout
:
300
,
timeout
:
300
,
...
@@ -162,11 +161,9 @@
...
@@ -162,11 +161,9 @@
timerId
:
null
timerId
:
null
},
},
success
:
function
(
res
){
success
:
function
(
res
){
console
.
log
(
'==parent==success=='
);
console
.
log
(
res
);
}
}
}
}
$
.
fn
.
remoteSearch
.
Constructor
=
RemoteSearch
;
$
.
fn
.
remoteSearch
Performance
.
Constructor
=
RemoteSearchPerformance
;
})(
jQuery
);
})(
jQuery
);
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/include.html
View file @
cb9caae8
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<script
th:src=
"@{/ruoyi/js/common.js?v=4.6.1}"
></script>
<script
th:src=
"@{/ruoyi/js/common.js?v=4.6.1}"
></script>
<script
th:src=
"@{/ruoyi/js/ry-ui.js?v=4.6.1}"
></script>
<script
th:src=
"@{/ruoyi/js/ry-ui.js?v=4.6.1}"
></script>
<!--远程搜索下拉框-->
<!--远程搜索下拉框-->
<script
th:src=
"@{/js/remote-search.js}"
></script>
<script
th:src=
"@{/js/remote-search
-performance
.js}"
></script>
</div>
</div>
<!-- ztree树插件 -->
<!-- ztree树插件 -->
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performances/recommend/add.html
View file @
cb9caae8
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
-->
-->
<div
class=
"remote_wrapper"
style=
"position: relative;"
>
<div
class=
"remote_wrapper"
style=
"position: relative;"
>
<input
name=
"ids"
type=
"hidden"
>
<input
name=
"ids"
type=
"hidden"
>
<input
type=
"text"
id=
"remoteSearch
11
"
>
<input
type=
"text"
id=
"remoteSearch"
>
</div>
</div>
</br>
</br>
<p>
推荐排序:
</p>
<p>
推荐排序:
</p>
...
@@ -65,19 +65,15 @@
...
@@ -65,19 +65,15 @@
// });
// });
// }
// }
$
(
'#remoteSearch
11'
).
remoteSearch
({
$
(
'#remoteSearch
'
).
remoteSearchPerformance
({
ajax
:{
ajax
:{
url
:
prefix
+
"/performance/status?status=(3,6,7,9,10)&
title="
+
document
.
getElementById
(
"remoteSearch11"
).
value
,
url
:
prefix
+
"/performance/status?status=(3,6,7,9,10)&
"
,
type
:
"get"
type
:
"get"
},
},
chose
:
function
(
text
,
val
){
chose
:
function
(
text
,
val
){
document
.
getElementsByName
(
"ids"
)[
0
].
value
=
val
;
document
.
getElementsByName
(
"ids"
)[
0
].
value
=
val
;
console
.
log
(
'remoteSearch===========chose='
);
console
.
log
(
text
)
console
.
log
(
val
)
},
},
success
:
function
(){
success
:
function
(){
console
.
log
(
'==success===='
);
}
}
})
})
</script>
</script>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performances/roadShow/addPerformances.html
View file @
cb9caae8
...
@@ -9,19 +9,26 @@
...
@@ -9,19 +9,26 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<p>
演出名称
</p>
<p>
演出名称
</p>
<div
class=
"row"
>
<div
class=
"row"
>
<!--
<input name="roadShowId" th:value="*{roadShowId}" type="hidden">
<input name="roadShowId" th:value="*{roadShowId}" type="hidden">
<input
name=
"ids"
type=
"hidden"
>
<input name="ids" type="hidden">
<div
class=
"col-lg-6"
>
<div class="col-lg-6">
<div
class=
"input-group"
>
<div class="input-group">
<input
type=
"text"
class=
"form-control"
id=
"suggest-demo-2"
onkeyup=
"getPerformanceTitle()"
>
<input type="text" class="form-control" id="suggest-demo-2" onkeyup="getPerformanceTitle()">
<div
class=
"input-group-btn"
>
<div class="input-group-btn">
<button
type=
"button"
class=
"btn btn-white dropdown-toggle"
data-toggle=
"dropdown"
>
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
<span
class=
"caret"
></span>
<span class="caret"></span>
</button>
</button>
<ul
class=
"dropdown-menu dropdown-menu-right"
role=
"menu"
>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
-->
<input
name=
"roadShowId"
th:value=
"*{roadShowId}"
type=
"hidden"
>
<div
class=
"remote_wrapper"
style=
"position: relative;"
>
<input
name=
"ids"
type=
"hidden"
>
<input
type=
"text"
id=
"remoteSearch"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -43,18 +50,29 @@
...
@@ -43,18 +50,29 @@
}
}
}
}
function
getPerformanceTitle
()
{
// function getPerformanceTitle() {
var
testBsSuggest
=
$
(
"#suggest-demo-2"
).
bsSuggest
({
// var testBsSuggest = $("#suggest-demo-2").bsSuggest({
url
:
prefix
+
"/performance/status?status=(3,6,7,9,10)&title="
+
document
.
getElementById
(
"suggest-demo-2"
).
value
,
// url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("suggest-demo-2").value,
showBtn
:
false
,
// showBtn: false,
idField
:
"performancesId"
,
// idField: "performancesId",
keyField
:
"title"
// keyField: "title"
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
// }).on('onDataRequestSuccess', function (e, result) {
}).
on
(
'onSetSelectValue'
,
function
(
e
,
keyword
)
{
// }).on('onSetSelectValue', function (e, keyword) {
document
.
getElementsByName
(
"ids"
)[
0
].
value
=
keyword
.
id
;
// document.getElementsByName("ids")[0].value = keyword.id;
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
// }).on('onUnsetSelectValue', function (e) {
});
// });
}
// }
$
(
'#remoteSearch'
).
remoteSearchPerformance
({
ajax
:{
url
:
prefix
+
"/performance/status?status=(3,6,7,9,10)&"
,
type
:
"get"
},
chose
:
function
(
text
,
val
){
document
.
getElementsByName
(
"ids"
)[
0
].
value
=
val
;
},
success
:
function
(){
}
})
</script>
</script>
</body>
</body>
</html>
</html>
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