Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-yunshou-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
AI云守
ai-yunshou-vue
Commits
30fa284e
Commit
30fa284e
authored
Aug 13, 2024
by
wp song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
3a6a6699
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
286 additions
and
40 deletions
+286
-40
src/views/videoControl/pointControl/hooks/index.js
src/views/videoControl/pointControl/hooks/index.js
+100
-0
src/views/videoControl/pointControl/index.scss
src/views/videoControl/pointControl/index.scss
+6
-0
src/views/videoControl/pointControl/index.vue
src/views/videoControl/pointControl/index.vue
+178
-39
vite.config.js
vite.config.js
+2
-1
No files found.
src/views/videoControl/pointControl/hooks/index.js
0 → 100644
View file @
30fa284e
import
{
onMounted
,
ref
,
watch
}
from
"
vue
"
;
import
request
from
"
@/utils/request
"
;
import
{
ElMessageBox
}
from
"
element-plus
"
;
function
useIndex
(
apis
)
{
const
visible
=
ref
(
false
);
const
form
=
ref
({
regionName
:
''
});
const
list
=
ref
([]);
watch
(
()
=>
visible
,
(
newVal
)
=>
{
if
(
newVal
==
false
)
{
form
.
value
=
{};
}
}
);
function
toView
()
{}
function
toEdit
(
data
)
{
getDetail
(
data
.
id
);
visible
.
value
=
true
;
}
function
toAdd
()
{
visible
.
value
=
true
;
}
function
toDel
(
data
)
{
//弹框确认
ElMessageBox
.
confirm
(
"
是否删除该区域?
"
).
then
(()
=>
{
request
({
url
:
apis
.
delete
+
data
.
id
,
method
:
"
delete
"
,
}).
then
((
res
)
=>
{
visible
.
value
=
false
;
getList
();
});
});
}
function
getList
()
{
request
({
url
:
apis
.
list
,
method
:
"
get
"
,
}).
then
((
res
)
=>
{
list
.
value
=
res
.
data
;
});
}
function
getDetail
(
id
)
{
return
request
({
url
:
apis
.
detail
+
id
,
method
:
"
get
"
,
}).
then
((
res
)
=>
{
form
.
value
=
res
.
data
;
});
}
function
toSubmit
()
{
if
(
form
.
value
.
id
)
{
request
({
url
:
apis
.
edit
,
method
:
"
put
"
,
data
:
form
.
value
,
}).
then
((
res
)
=>
{
visible
.
value
=
false
;
getList
();
});
}
else
{
request
({
url
:
apis
.
add
,
method
:
"
post
"
,
data
:
form
.
value
,
}).
then
((
res
)
=>
{
visible
.
value
=
false
;
getList
();
});
}
}
function
toClose
()
{
visible
.
value
=
false
;
}
onMounted
(()
=>
{
getList
();
});
return
{
visible
,
form
,
list
,
toView
,
toEdit
,
toAdd
,
toDel
,
getDetail
,
toClose
,
toSubmit
,
};
}
export
{
useIndex
};
src/views/videoControl/pointControl/index.scss
0 → 100644
View file @
30fa284e
.areaNodes
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
100%
;
}
\ No newline at end of file
src/views/videoControl/pointControl/index.vue
View file @
30fa284e
This diff is collapsed.
Click to expand it.
vite.config.js
View file @
30fa284e
...
...
@@ -25,13 +25,14 @@ export default defineConfig(({ mode, command }) => {
},
// vite 相关配置
server
:
{
port
:
80
,
port
:
80
90
,
host
:
true
,
open
:
true
,
proxy
:
{
// https://cn.vitejs.dev/config/#server-proxy
'
/dev-api
'
:
{
target
:
'
http://192.168.4.206:80/ai
'
,
// target:'http://192.168.14.43:8111/ai',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api/
,
''
)
}
...
...
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