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
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
...
...
@@ -2,7 +2,9 @@
<div
class=
"app-container home"
>
<TabTitle
:text=
"nowText"
/>
<div
class=
"add-but"
>
<el-button
type=
"primary"
icon=
"Plus"
@
click=
"handeAdd"
plain
>
新增点位
</el-button>
<el-button
type=
"primary"
icon=
"Plus"
@
click=
"handeAdd"
plain
>
新增点位
{{
areaManger
.
visible
}}
</el-button
>
</div>
<el-row
:gutter=
"10"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
...
...
@@ -10,7 +12,7 @@
<div
class=
"head-container"
>
<el-input
v-model=
"deptName"
placeholder=
"请输入
部门名称
"
placeholder=
"请输入"
clearable
prefix-icon=
"Search"
style=
"margin-bottom: 20px"
...
...
@@ -18,8 +20,8 @@
</div>
<div
class=
"head-container"
>
<el-tree
:data=
"
deptOptions
"
:props=
"
{
label: 'label',
children: 'children' }"
:data=
"
areaManger.list
"
:props=
"
{ children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="deptTreeRef"
...
...
@@ -27,7 +29,38 @@
highlight-current
default-expand-all
@node-click="handleNodeClick"
/>
>
<template
#default
="
{ node, data }">
<span
class=
"areaNodes"
>
<span>
{{
data
.
label
}}
</span>
<span>
<!-- 添加dropdown -->
<el-dropdown
trigger=
"click"
>
<el-dropdown-link
class=
"dropdown-link"
>
<el-button
type=
"text"
size=
"small"
>
<el-icon
size=
"20"
color=
"#333333"
><Setting
/></el-icon>
</el-button>
</el-dropdown-link>
<template
#dropdown
>
<el-dropdown-menu>
<el-dropdown-item
@
click=
"areaManger.toAdd(data)"
>
新增子区域
</el-dropdown-item
>
<el-dropdown-item
@
click=
"areaManger.toEdit(data)"
>
编辑该区域
</el-dropdown-item
>
<el-dropdown-item
@
click=
"areaManger.toDel(data)"
>
删除该区域
</el-dropdown-item
>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</span>
</span>
</template></el-tree
>
</div>
</el-card>
</el-col>
...
...
@@ -51,33 +84,130 @@
<el-button type="primary" plain @click="handleDelete">六分屏</el-button>
</el-col>
</el-row> -->
<el-table
v-loading=
"loading"
:data=
"pointList"
>
<el-table-column
label=
"实况图"
align=
"center"
prop=
"postId"
/>
<el-table-column
label=
"摄像头名称"
align=
"center"
prop=
"postCode"
/>
<el-table-column
label=
"所属区域"
align=
"center"
prop=
"postName"
/>
<el-table-column
label=
"推理间隔(秒)"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"关联算法"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"时段配置"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"运行状态"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"操作"
width=
"180"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#default
="
scope
"
>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:post:edit']"
>
修改
</el-button>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:post:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-table
v-loading=
"loading"
:data=
"pointList"
>
<el-table-column
label=
"实况图"
align=
"center"
prop=
"postId"
/>
<el-table-column
label=
"摄像头名称"
align=
"center"
prop=
"postCode"
/>
<el-table-column
label=
"所属区域"
align=
"center"
prop=
"postName"
/>
<el-table-column
label=
"推理间隔(秒)"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"关联算法"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"时段配置"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"运行状态"
align=
"center"
prop=
"postSort"
/>
<el-table-column
label=
"操作"
width=
"180"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#default
="
scope
"
>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:post:edit']"
>
修改
</el-button
>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:post:remove']"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
</el-card>
</el-scrollbar>
</el-col>
</el-row>
<drawPoint
ref=
"drawPointRef"
/>
<!-- 添加新增区域弹框 ,包含上级区域,区域名称,区域坐标,区域地址-->
<el-dialog
title=
"新增区域"
v-model=
"areaManger.visible.value"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
width=
"50%"
>
<el-form
ref=
"areaMangerRef"
:model=
"areaManger.form"
label-width=
"120px"
>
<el-form-item
label=
"上级区域"
prop=
"regionPath"
>
<el-cascader
v-model=
"unref(areaManger.form).parents"
:options=
"areaManger.list.value"
:props=
"{ children: 'children', value: 'id', checkStrictly: true }"
placeholder=
"请选择上级区域"
clearable
/>
</el-form-item>
<el-form-item
label=
"区域名称"
prop=
"regionName"
>
<el-input
v-model=
"unref(areaManger.form).regionName"
placeholder=
"请输入区域名称"
/>
</el-form-item>
<!-- <el-form-item label="区域层级路径" prop="regionPath"> -->
<!-- <el-input -->
<!-- v-model="areaManger.form.regionPath" -->
<!-- placeholder="区域层级路径" -->
<!-- /> -->
<!-- </el-form-item> -->
<!-- <el-form-item label="区域地址" prop="areaAddress"> -->
<!-- <el-input -->
<!-- v-model="areaManger.form.areaAddress" -->
<!-- placeholder="请输入区域地址" -->
<!-- /> -->
<!-- </el-form-item> -->
<!-- <el-form-item label="区域备注" prop="areaRemark"> -->
<!-- <el-input -->
<!-- v-model="areaManger.form.areaRemark" -->
<!-- placeholder="请输入区域备注" -->
<!-- /> -->
<!-- </el-form-item> -->
</el-form>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"areaManger.toClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitAreaForm"
>
确 定
</el-button>
</span>
</
template
>
</el-dialog>
</div>
</template>
<
script
setup
name=
"Index"
>
import
drawPoint
from
'
./components/drawPoint.vue
'
import
drawPoint
from
"
./components/drawPoint.vue
"
;
import
{
ArrowDown
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
{
ElMessageBox
}
from
"
element-plus
"
;
import
{
reactive
,
ref
,
unref
,
watch
,
watchEffect
}
from
"
vue
"
;
import
request
from
"
@/utils/request
"
;
import
{
useIndex
}
from
"
./hooks
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
drawPointRef
=
ref
(
null
);
const
nowText
=
ref
(
"
点位管理
"
);
...
...
@@ -129,7 +259,7 @@ const algorithmList = reactive([
]);
const
data
=
reactive
({
form
:
{
title
:
'
测试测试测试
'
title
:
"
测试测试测试
"
,
},
queryParams
:
{
postCode
:
undefined
,
...
...
@@ -155,22 +285,29 @@ const filterNode = (value, data) => {
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
};
// function closeNow(){
// const routerArr=useTagsViewStore().visitedViews
// const nowPath=location.pathname
// return routerArr.filter(item=>{return item.path==nowPath })[0]
// }
// setTimeout(() => {
// nowText=closeNow()awdasa
// }, 500);
// function goTarget(url) {
// window.open(url, '__blank')
// }
function
handleNodeClick
(
row
)
{
const
areaManger
=
useIndex
({
list
:
"
/yunshou/aiRegionManage/list
"
,
add
:
"
/yunshou/aiRegionManage
"
,
edit
:
"
yunshou/aiRegionManage
"
,
delete
:
"
yunshou/aiRegionManage/
"
,
detail
:
"
/yunshou/aiRegionManage/
"
,
});
function
submitAreaForm
(
e
)
{
areaManger
.
form
.
value
.
regionPath
=
areaManger
.
form
.
value
.
parents
.
join
(
"
,
"
);
if
(
areaManger
.
form
.
value
.
id
)
{
areaManger
.
form
.
value
.
parentId
=
areaManger
.
form
.
parents
[
areaManger
.
form
.
value
.
parents
.
length
-
2
]
??
0
;
}
else
{
areaManger
.
form
.
value
.
parentId
=
areaManger
.
form
.
parents
[
areaManger
.
form
.
value
.
parents
.
length
-
1
]
??
0
;
}
areaManger
.
toSubmit
();
// areaManger.value.visible = false;
// areaList();
}
function
handleNodeClick
(
row
)
{}
function
handeAdd
(
row
)
{
drawPointRef
.
value
.
handleAdd
();
}
...
...
@@ -212,10 +349,11 @@ function handleDelete(row) {
</
script
>
<
style
scoped
lang=
"scss"
>
@import
url("./index.scss")
;
.left-list
{
min-height
:
700px
;
}
.add-but
{
.add-but
{
position
:
absolute
;
display
:
flex
;
top
:
30px
;
...
...
@@ -237,7 +375,7 @@ function handleDelete(row) {
}
}
}
.danger-list
{
.danger-list
{
min-height
:
700px
;
.alg-list
{
display
:
grid
;
...
...
@@ -252,7 +390,8 @@ function handleDelete(row) {
cursor
:
pointer
;
position
:
relative
;
}
.el-form-item--default
,
.el-form-item
{
.el-form-item--default
,
.el-form-item
{
font-size
:
12px
;
margin-bottom
:
0px
;
}
...
...
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