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
539ff970
Commit
539ff970
authored
Aug 14, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.censoft.com.cn/ai-yunshou/ai-yunshou-vue
into developer
parents
68a50b0a
7c50bfac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
17 deletions
+45
-17
src/views/videoControl/pointControl/components/drawPoint.vue
src/views/videoControl/pointControl/components/drawPoint.vue
+2
-1
src/views/videoControl/pointControl/hooks/index.js
src/views/videoControl/pointControl/hooks/index.js
+10
-4
src/views/videoControl/pointControl/index.vue
src/views/videoControl/pointControl/index.vue
+31
-9
vite.config.js
vite.config.js
+2
-3
No files found.
src/views/videoControl/pointControl/components/drawPoint.vue
View file @
539ff970
...
...
@@ -78,6 +78,7 @@
</el-form>
</div>
<div
class=
"left-list"
>
<div
class=
"form-title"
>
算法列表
</div>
<el-table
:data=
"
unref(algorithmManage.form).aiRegionalLocationList ||
...
...
@@ -232,10 +233,10 @@ function handleDeviceChange(e, index) {
function
submit
()
{
let
algorithms
=
[];
algorithmManage
.
form
.
value
.
runningState
=
'
0
'
;
if
(
algorithmManage
.
form
.
value
.
id
)
{
algorithms
=
unref
(
algorithmManage
.
form
).
aiRegionalLocationList
;
}
else
{
algorithmManage
.
form
.
value
.
runningState
=
0
;
unref
(
aiAlgorithm
.
list
).
forEach
((
val
)
=>
{
algorithms
.
push
({
algorithmId
:
val
.
id
,
...
...
src/views/videoControl/pointControl/hooks/index.js
View file @
539ff970
import
{
onMounted
,
ref
,
watch
}
from
"
vue
"
;
import
request
from
"
@/utils/request
"
;
import
{
ElMessageBox
}
from
"
element-plus
"
;
function
useIndex
(
apis
,
callback
)
{
function
useIndex
(
apis
,
callback
,
listReady
,
immList
=
true
)
{
const
visible
=
ref
(
false
);
const
search
=
ref
({});
const
form
=
ref
({
...
...
@@ -50,7 +50,7 @@ function useIndex(apis, callback) {
});
});
}
function
getList
(
params
)
{
function
getList
(
params
,
isFirst
)
{
request
({
url
:
apis
.
list
,
method
:
"
get
"
,
...
...
@@ -58,6 +58,9 @@ function useIndex(apis, callback) {
}).
then
((
res
)
=>
{
list
.
value
=
res
.
data
||
res
.
rows
;
page
.
value
.
total
=
res
.
total
;
if
(
isFirst
)
{
listReady
&&
listReady
(
res
.
data
);
}
});
}
function
getDetail
(
id
)
{
...
...
@@ -107,8 +110,8 @@ function useIndex(apis, callback) {
visible
.
value
=
false
;
}
onMounted
(()
=>
{
if
(
apis
.
list
)
{
getList
();
if
(
apis
.
list
&&
immList
)
{
getList
(
{},
true
);
}
});
...
...
@@ -125,7 +128,10 @@ function useIndex(apis, callback) {
toSubmit
,
getList
,
toOpen
,
search
,
};
}
export
{
useIndex
};
src/views/videoControl/pointControl/index.vue
View file @
539ff970
...
...
@@ -10,13 +10,13 @@
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
<el-card
class=
"left-list"
>
<div
class=
"head-container"
>
<
el-input
v-model=
"deptName"
placeholder=
"请输入"
clearable
prefix-icon=
"Search"
style=
"margin-bottom: 20px"
/
>
<
!--
<el-input
--
>
<!-- v-model="deptName" -->
<!-- placeholder="请输入" -->
<!-- clearable -->
<!-- prefix-icon="Search" -->
<!-- style="margin-bottom: 20px" -->
<!-- /> --
>
</div>
<div
class=
"head-container"
>
<el-tree
...
...
@@ -123,9 +123,10 @@
<!--
}}
</el-tag
--
>
<!-- > -->
<el-switch
v-model
:value
=
"scope.row.runningState"
v-model=
"scope.row.runningState"
active-value=
"0"
inactive-value=
"1"
@
change=
"(e)=>changeState(scope.row, e)"
/>
</
template
>
</el-table-column>
...
...
@@ -356,6 +357,11 @@ const areaManger = useIndex(
},
({
data
})
=>
{
data
.
parents
=
data
.
regionPath
.
split
(
"
,
"
).
map
((
x
)
=>
Number
(
x
));
},
(
data
)
=>
{
algorithmManage
.
form
.
value
.
regionalId
=
data
[
0
].
id
;
algorithmManage
.
search
.
value
.
regionalId
=
data
[
0
].
id
;
algorithmManage
.
getList
()
}
);
...
...
@@ -367,7 +373,9 @@ const algorithmManage = useIndex(
delete
:
"
/yunshou/aiRegionalLocation/
"
,
detail
:
"
/yunshou/aiRegionalLocation/
"
,
},
({
data
})
=>
{}
({
data
})
=>
{},
()
=>
{},
false
);
function
submitAreaForm
(
e
)
{
const
{
form
}
=
areaManger
;
...
...
@@ -382,9 +390,23 @@ function submitAreaForm(e) {
}
function
handleNodeClick
(
e
)
{
algorithmManage
.
form
.
value
.
regionalId
=
e
.
id
;
algorithmManage
.
search
.
value
.
regionalId
=
e
.
id
;
areaManger
.
form
.
value
.
id
=
e
.
id
;
algorithmManage
.
getList
({
regionalId
:
e
.
id
});
}
function
changeState
(
data
,
e
)
{
request
({
url
:
'
/yunshou/aiRegionalLocation/updateRunningState
'
,
method
:
'
POST
'
,
data
:{
id
:
data
.
id
,
runningState
:
e
}
}).
then
(()
=>
{
algorithmManage
.
getList
({
regionalId
:
data
.
regionalId
})
})
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
vite.config.js
View file @
539ff970
...
...
@@ -31,9 +31,8 @@ export default defineConfig(({ mode, command }) => {
proxy
:
{
// https://cn.vitejs.dev/config/#server-proxy
'
/dev-api
'
:
{
// target: 'http://192.168.14.43:8111/ai',
target
:
'
http://192.168.4.206:80/ai
'
,
// target:'http://192.168.14.43:8111/ai',
// 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