Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue_django_test
Overview
Overview
Details
Activity
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
周田
vue_django_test
Commits
7a675283
Commit
7a675283
authored
Sep 06, 2023
by
qianmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:init
parent
c140e230
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
CollapseTable.vue
frontend/src/components/protocol/CollapseTable.vue
+17
-4
protocol.ts
frontend/src/dao/protocol.ts
+1
-1
xdc.sqlite
xdc.sqlite
+0
-0
No files found.
frontend/src/components/protocol/CollapseTable.vue
View file @
7a675283
...
...
@@ -77,7 +77,7 @@
<
script
setup
lang=
"ts"
>
import
{
ref
,
onMounted
}
from
'vue'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
GetProtocolVersion
}
from
"@/dao/protocol"
import
{
GetProtocolVersion
,
ProtocolInit
}
from
"@/dao/protocol"
import
ProtocolTable
from
"./ProtocolTable.vue"
;
import
type
{
DeviceProtocolResponse
,
ProtocolCmdResponse
}
from
'./types'
;
...
...
@@ -118,8 +118,8 @@ const open = () => {
})
}
function
getVersion
(){
GetProtocolVersion
()
async
function
getVersion
(){
await
GetProtocolVersion
()
.
then
((
res
)
=>
{
for
(
const
item
of
res
){
protocol_names
.
value
.
push
(
item
.
protocol_name
)
...
...
@@ -136,8 +136,21 @@ function getVersion(){
})
}
function
Init
(){
ProtocolInit
({
protocol_name
:
props
.
name
})
.
then
((
res
)
=>
{
options
.
value
.
push
({
value
:
"init"
,
label
:
"init"
})
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
})
}
onMounted
(
async
()
=>
{
getVersion
()
await
getVersion
()
if
(
protocol_names
.
value
.
indexOf
(
props
.
name
)
===
-
1
){
Init
()
}
})
</
script
>
...
...
frontend/src/dao/protocol.ts
View file @
7a675283
...
...
@@ -10,7 +10,7 @@ export function GetProtocolVersion(){
)
}
export
function
ProtocolInit
(
protocol_name
:
string
){
export
function
ProtocolInit
(
protocol_name
:
any
){
return
axios
.
post
(
'api/protocol_version_manage/init/'
,
protocol_name
).
then
(
function
(
response
){
return
response
.
data
...
...
xdc.sqlite
View file @
7a675283
No preview for this file type
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