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
6410c5ff
Commit
6410c5ff
authored
Aug 31, 2023
by
周田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:弹框修改协议时,已经选择要清空
parent
d97a61c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
EditDialog.vue
frontend/src/components/device_communication/EditDialog.vue
+4
-3
xdc.sqlite
xdc.sqlite
+0
-0
No files found.
frontend/src/components/device_communication/EditDialog.vue
View file @
6410c5ff
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<el-input
v-model=
"form.station_id"
autocomplete=
"false"
/>
<el-input
v-model=
"form.station_id"
autocomplete=
"false"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"协议名称"
:label-width=
"formLabelWidth"
prop=
"protocol_name"
>
<el-form-item
label=
"协议名称"
:label-width=
"formLabelWidth"
prop=
"protocol_name"
>
<el-select
v-model=
"form.protocol_name"
@
change=
"handleProtocolChange"
>
<el-select
v-model=
"form.protocol_name"
@
change=
"handleProtocolChange
(form.protocol_name, [])
"
>
<el-option
v-for=
"protocolName in store.protocolNames"
:label=
"protocolName.label"
:value=
"protocolName.value"
/>
<el-option
v-for=
"protocolName in store.protocolNames"
:label=
"protocolName.label"
:value=
"protocolName.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -145,7 +145,7 @@ watch(() => props.isShow, () => {
...
@@ -145,7 +145,7 @@ watch(() => props.isShow, () => {
udp_port_dst
:
props
.
deviceInfo
!
.
udp_port_dst
,
udp_port_dst
:
props
.
deviceInfo
!
.
udp_port_dst
,
}
}
handleModeChange
(
form
.
value
.
communicate_mode
)
handleModeChange
(
form
.
value
.
communicate_mode
)
handleProtocolChange
(
form
.
value
.
protocol_name
)
handleProtocolChange
(
form
.
value
.
protocol_name
,
checked_performance_fields
.
value
)
checked_performance_fields
.
value
=
props
.
deviceInfo
!
.
checked_performance_fields
!
checked_performance_fields
.
value
=
props
.
deviceInfo
!
.
checked_performance_fields
!
}
}
})
})
...
@@ -209,10 +209,11 @@ const rules = reactive<FormRules<typeof form>>({
...
@@ -209,10 +209,11 @@ const rules = reactive<FormRules<typeof form>>({
})
})
// 下拉框选择触发的事件
// 下拉框选择触发的事件
const
handleProtocolChange
=
(
protocol_name
:
string
)
=>
{
const
handleProtocolChange
=
(
protocol_name
:
string
,
checked_fields
:
string
[]
)
=>
{
axios
.
get
(
'/api/device_communication/protocol_performance/'
+
protocol_name
+
'/'
)
axios
.
get
(
'/api/device_communication/protocol_performance/'
+
protocol_name
+
'/'
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
performance_fields
.
value
=
res
.
data
performance_fields
.
value
=
res
.
data
checked_performance_fields
.
value
=
checked_fields
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
...
xdc.sqlite
View file @
6410c5ff
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