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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
12 deletions
index.html
index.html
View file @
0658075
...
@@ -36,11 +36,22 @@
...
@@ -36,11 +36,22 @@
<div>
<div>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
id=
"basic-addon1"
>
把配置贴到这
</span>
<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>
</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"
>
<thead
class=
"thead-dark"
>
<tr>
<tr>
<th>
No.
</th>
<th>
No.
</th>
...
@@ -71,12 +82,25 @@
...
@@ -71,12 +82,25 @@
this
.
source
=
val
;
this
.
source
=
val
;
this
.
analyseSource
();
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
:
{
data
:
{
source
:
''
,
//复制过来的
source
:
''
,
//复制过来的
sourceArr
:
[],
//按行分割的
sourceArr
:
[],
//按行分割的
serviceList
:
[],
//服务列表
serviceList
:
[],
//服务列表
allServiceList
:
[],
//服务列表
sleepList
:
[],
//sleep列表
sleepList
:
[],
//sleep列表
searchText
:
""
,
//搜索框的值
},
},
created
:
function
()
{
created
:
function
()
{
...
@@ -87,23 +111,23 @@
...
@@ -87,23 +111,23 @@
let
sysPayload
=
window
.
sysPayload
;
let
sysPayload
=
window
.
sysPayload
;
if
(
sysPayload
)
{
if
(
sysPayload
)
{
let
source
=
""
let
source
=
""
if
(
sysPayload
.
indexOf
(
"node"
)
==
-
1
)
{
if
(
!
sysPayload
.
indexOf
(
"node"
)
===
-
1
)
{
source
=
"请手动粘贴吧"
}
else
{
source
=
sysPayload
;
source
=
sysPayload
;
}
}
this
.
source
=
source
;
this
.
source
=
source
;
this
.
analyseSource
();
this
.
analyseSource
();
}
else
{
this
.
source
=
"请手动粘贴吧"
;
}
}
},
500
);
},
500
);
},
},
methods
:
{
methods
:
{
//清除搜索框
cleanSearchText
:
function
()
{
this
.
searchText
=
""
;
},
//清除输入
//清除输入
cleanInput
:
function
()
{
cleanInput
:
function
()
{
this
.
source
=
""
;
this
.
source
=
""
;
},
},
//选择服务
//选择服务
selectService
:
function
(
index
)
{
selectService
:
function
(
index
)
{
this
.
serviceList
[
index
].
isOpen
=
!
this
.
serviceList
[
index
].
isOpen
;
this
.
serviceList
[
index
].
isOpen
=
!
this
.
serviceList
[
index
].
isOpen
;
...
@@ -223,17 +247,18 @@
...
@@ -223,17 +247,18 @@
serviceList
.
push
(
serviceMap
[
key
]);
serviceList
.
push
(
serviceMap
[
key
]);
}
}
this
.
sourceArr
=
sourceArr
;
this
.
sourceArr
=
sourceArr
;
this
.
allServiceList
=
serviceList
;
this
.
serviceList
=
serviceList
;
this
.
serviceList
=
serviceList
;
this
.
sleepList
=
sleepList
;
this
.
sleepList
=
sleepList
;
},
},
//复制出来
//复制出来
copyNew
:
function
()
{
copyNew
:
function
()
{
let
{
serviceList
,
sourceArr
,
sleepList
}
=
this
;
let
{
serviceList
,
allServiceList
,
sourceArr
,
sleepList
}
=
this
;
if
(
!
s
erviceList
.
length
)
{
if
(
!
allS
erviceList
.
length
)
{
alert
(
"你输入的内容不对"
);
alert
(
"你输入的内容不对"
);
}
else
{
}
else
{
s
erviceList
.
forEach
((
item
)
=>
{
allS
erviceList
.
forEach
((
item
)
=>
{
let
uploadRow
=
item
.
uploadRow
;
let
uploadRow
=
item
.
uploadRow
;
let
buildRow
=
item
.
buildRow
;
let
buildRow
=
item
.
buildRow
;
sourceArr
[
item
.
uploadRowNo
]
=
uploadRow
;
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