Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liyaoting
/
jk-ut-plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 06580758
authored
2023-04-10 09:39:02 +0800
by
liyaoting
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
V1.03
1 parent
c47c9093
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
10 deletions
index.html
index.html
View file @
0658075
...
...
@@ -36,11 +36,22 @@
<div>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
id=
"basic-addon1"
>
把配置贴到这
</span>
<textarea
v-model=
"source"
class=
"form-control"
rows=
"2"
></textarea>
<textarea
v-model=
"source"
class=
"form-control"
placeholder=
"请手动输入..."
rows=
"2"
></textarea>
</div>
</div>
<!--搜索-->
<div
class=
"row navbar-btn"
v-if=
"allServiceList.length"
>
<div
class=
"col-lg-6"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control"
v-model=
"searchText"
placeholder=
"Search for..."
>
<span
class=
"input-group-btn"
>
<button
class=
"btn btn-danger"
type=
"button"
@
click=
"cleanSearchText"
>
clean
</button>
</span>
</div>
</div>
</div>
<!--表格-->
<table
class=
"table table-striped"
v-if=
"
s
erviceList.length"
>
<table
class=
"table table-striped"
v-if=
"
allS
erviceList.length"
>
<thead
class=
"thead-dark"
>
<tr>
<th>
No.
</th>
...
...
@@ -71,12 +82,25 @@
this
.
source
=
val
;
this
.
analyseSource
();
},
searchText
:
function
(
val
)
{
//在allServiceList中找到包含val的
let
serviceList
=
[];
this
.
allServiceList
.
forEach
((
item
)
=>
{
console
.
log
(
item
)
if
(
item
.
serviceName
.
indexOf
(
val
)
!=
-
1
)
{
serviceList
.
push
(
item
);
}
});
this
.
serviceList
=
serviceList
;
}
},
data
:
{
source
:
''
,
//复制过来的
sourceArr
:
[],
//按行分割的
serviceList
:
[],
//服务列表
allServiceList
:
[],
//服务列表
sleepList
:
[],
//sleep列表
searchText
:
""
,
//搜索框的值
},
created
:
function
()
{
...
...
@@ -87,19 +111,19 @@
let
sysPayload
=
window
.
sysPayload
;
if
(
sysPayload
)
{
let
source
=
""
if
(
sysPayload
.
indexOf
(
"node"
)
==
-
1
)
{
source
=
"请手动粘贴吧"
}
else
{
if
(
!
sysPayload
.
indexOf
(
"node"
)
===
-
1
)
{
source
=
sysPayload
;
}
this
.
source
=
source
;
this
.
analyseSource
();
}
else
{
this
.
source
=
"请手动粘贴吧"
;
}
},
500
);
},
methods
:
{
//清除搜索框
cleanSearchText
:
function
()
{
this
.
searchText
=
""
;
},
//清除输入
cleanInput
:
function
()
{
this
.
source
=
""
;
...
...
@@ -223,17 +247,18 @@
serviceList
.
push
(
serviceMap
[
key
]);
}
this
.
sourceArr
=
sourceArr
;
this
.
allServiceList
=
serviceList
;
this
.
serviceList
=
serviceList
;
this
.
sleepList
=
sleepList
;
},
//复制出来
copyNew
:
function
()
{
let
{
serviceList
,
sourceArr
,
sleepList
}
=
this
;
if
(
!
s
erviceList
.
length
)
{
let
{
serviceList
,
allServiceList
,
sourceArr
,
sleepList
}
=
this
;
if
(
!
allS
erviceList
.
length
)
{
alert
(
"你输入的内容不对"
);
}
else
{
s
erviceList
.
forEach
((
item
)
=>
{
allS
erviceList
.
forEach
((
item
)
=>
{
let
uploadRow
=
item
.
uploadRow
;
let
buildRow
=
item
.
buildRow
;
sourceArr
[
item
.
uploadRowNo
]
=
uploadRow
;
...
...
Write
Preview
Styling with
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