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
69fbe438
Commit
69fbe438
authored
Aug 26, 2023
by
周田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test:点击按钮添加表格显示相关性能设备性能数据
parent
03d5702c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
DevicePerformanceTabel.vue
frontend/src/components/DevicePerformanceTabel.vue
+2
-1
Chat.vue
frontend/src/views/Chat.vue
+24
-2
No files found.
frontend/src/components/DevicePerformanceTabel.vue
View file @
69fbe438
...
@@ -14,7 +14,8 @@ type propsType = {
...
@@ -14,7 +14,8 @@ type propsType = {
const
props
=
defineProps
<
propsType
>
()
const
props
=
defineProps
<
propsType
>
()
type
tableDataType
=
Record
<
string
,
string
>
[]
type
tableDataType
=
Record
<
string
,
string
>
[]
const
tableData
=
ref
<
tableDataType
>
([{}]);
// const tableData = ref
<
tableDataType
>
([{}]);
const
tableData
=
ref
<
tableDataType
>
([{}])
onMounted
(()
=>
{
onMounted
(()
=>
{
let
table_websocket
=
new
WebSocket
(
let
table_websocket
=
new
WebSocket
(
...
...
frontend/src/views/Chat.vue
View file @
69fbe438
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
onMounted
,
watch
}
from
'vue'
;
import
{
ref
,
onMounted
,
watch
}
from
'vue'
;
import
{
ElScrollbar
,
ElInput
,
ElButton
}
from
'element-plus'
;
import
{
ElScrollbar
,
ElInput
,
ElButton
}
from
'element-plus'
;
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
DevicePerformanceTable
from
'@/components/DevicePerformanceTabel'
import
DevicePerformanceTable
from
'@/components/DevicePerformanceTabel'
const
innerRef
=
ref
<
HTMLDivElement
>
();
const
innerRef
=
ref
<
HTMLDivElement
>
();
...
@@ -58,6 +59,27 @@ onMounted(() => {
...
@@ -58,6 +59,27 @@ onMounted(() => {
};
};
})
})
const
deviceTableParams
=
ref
<
string
[]
>
([]);
const
addDeviceTable
=
()
=>
{
ElMessageBox
.
prompt
(
'Please input WebSocket group name'
,
'Tip'
,
{
confirmButtonText
:
'OK'
,
cancelButtonText
:
'Cancel'
,
})
.
then
(({
value
})
=>
{
ElMessage
({
type
:
'success'
,
message
:
`new websocket group name is chat_
${
value
}
`
,
})
deviceTableParams
.
value
.
push
(
value
);
})
.
catch
(()
=>
{
ElMessage
({
type
:
'info'
,
message
:
'Input canceled'
,
})
})
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -73,8 +95,8 @@ onMounted(() => {
...
@@ -73,8 +95,8 @@ onMounted(() => {
<el-input
v-model=
"input"
placeholder=
"Please input"
@
keyup
.
enter=
"send"
></el-input>
<el-input
v-model=
"input"
placeholder=
"Please input"
@
keyup
.
enter=
"send"
></el-input>
<el-button
@
click=
"send"
>
Send
</el-button>
<el-button
@
click=
"send"
>
Send
</el-button>
<device-performance-table
group-name=
"acu7m5"
mt-5
/>
<device-performance-table
v-for=
"param in deviceTableParams"
mt-5
:group-name=
"param"
:key=
"param"
/>
<
device-performance-table
group-name=
"hwf"
mt-5
/
>
<
el-button
@
click=
"addDeviceTable"
class=
"mt-5"
>
Add table
</el-button
>
</
template
>
</
template
>
<
style
scoped
>
<
style
scoped
>
...
...
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