Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4b64e700
authored
Sep 27, 2021
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【BUG】存储配置导出
1 parent
3ef59f66
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
148 additions
and
24 deletions
public/dynamicParameters.html
public/js/version.json
src/api/apiList.js
src/api/device/index.js
src/assets/js/buildcodes.js
src/router/index.js
src/views/public/flvvideo.vue
src/views/resource/publicConfig/baseConfig.js
src/views/resource/publicConfig/index.vue
src/views/resource/store_confs.vue
src/views/taskManage/editVidebigree.vue
public/dynamicParameters.html
View file @
4b64e70
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
body
{
body
{
background
:
rgba
(
23
,
39
,
68
,
.6
);
background
:
rgba
(
23
,
39
,
68
,
.6
);
height
:
400px
!important
;
height
:
100vh
!important
;
padding
:
0
3%
!important
;
padding
:
0
3%
!important
;
}
}
</style>
</style>
...
...
public/js/version.json
View file @
4b64e70
{
"commit"
:
"343145f35878188a308c8d0af5a85a7ca617ef08"
,
"commitDate"
:
"2021-9-6 14:21"
,
"buildDate"
:
"2021-9-13 16:1"
,
"version"
:
"2.1.0"
,
"info"
:
"【BUG】参数多次保存出现值为空的情况"
}
\ No newline at end of file
\ No newline at end of file
{
"commit"
:
"3ef59f66af81a9e75a2f779b3a4fc9ef8731c21e"
,
"commitDate"
:
"2021-9-13 16:11"
,
"buildDate"
:
"2021-9-27 16:26"
,
"version"
:
"2.1.0"
,
"info"
:
"【new】增加存储配置导出功能"
}
\ No newline at end of file
\ No newline at end of file
src/api/apiList.js
View file @
4b64e70
...
@@ -13,7 +13,7 @@ let wsIP = "";
...
@@ -13,7 +13,7 @@ let wsIP = "";
let
flvIP
=
""
;
let
flvIP
=
""
;
switch
(
process
.
env
.
NODE_ENV
)
{
switch
(
process
.
env
.
NODE_ENV
)
{
case
"development"
:
case
"development"
:
wsIP
=
window
.
config
.
https
?
"192.168.9.227"
:
"192.168.9.233"
;
// 测试环境url
wsIP
=
window
.
config
.
https
?
"192.168.9.227"
:
"192.168.9.233
:20080
"
;
// 测试环境url
flvIP
=
window
.
config
.
https
?
"192.168.9.233"
:
"192.168.9.233"
;
flvIP
=
window
.
config
.
https
?
"192.168.9.233"
:
"192.168.9.233"
;
break
;
break
;
case
"pre"
:
case
"pre"
:
...
...
src/api/device/index.js
View file @
4b64e70
...
@@ -94,4 +94,10 @@ export default {
...
@@ -94,4 +94,10 @@ export default {
getNvs3000
:(
params
)
=>
{
getNvs3000
:(
params
)
=>
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/nvs3000`
,
params
)
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/nvs3000`
,
params
)
},
},
getConfig
:(
conf
,
params
)
=>
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/content?name=
${
conf
}
`
,
params
)
},
saveConfig
:(
id
,
params
)
=>
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/content/
${
id
}
`
,
params
)
}
};
};
src/assets/js/buildcodes.js
View file @
4b64e70
...
@@ -139,6 +139,7 @@ class Codes {
...
@@ -139,6 +139,7 @@ class Codes {
}
catch
(
err
)
{
}
catch
(
err
)
{
this
.
result
.
vehicle_plate_text
=
"未识别"
;
this
.
result
.
vehicle_plate_text
=
"未识别"
;
}
}
// 违法类型
// 违法类型
try
{
try
{
this
.
result
.
illegalTypestate
=
parseInt
(
this
.
allData
.
event_data
.
illegal
.
state
);
this
.
result
.
illegalTypestate
=
parseInt
(
this
.
allData
.
event_data
.
illegal
.
state
);
...
@@ -346,6 +347,7 @@ class Codes {
...
@@ -346,6 +347,7 @@ class Codes {
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
result
.
xcycle_plate_text
=
"未识别"
;
this
.
result
.
xcycle_plate_text
=
"未识别"
;
}
}
// 骑车类型
// 骑车类型
// console.log(this.allData.event_data.xcycle_type)
// console.log(this.allData.event_data.xcycle_type)
if
(
!
this
.
allData
.
event_data
.
xcycle_type
)
{
if
(
!
this
.
allData
.
event_data
.
xcycle_type
)
{
...
@@ -369,28 +371,21 @@ class Codes {
...
@@ -369,28 +371,21 @@ class Codes {
this
.
result
.
xcycle_type_text
=
"未识别"
;
this
.
result
.
xcycle_type_text
=
"未识别"
;
}
}
}
}
console
.
log
(
'company'
,
this
.
allData
.
event_data
.
xcycle
.
company
.
code
)
try
{
try
{
if
(
this
.
result
.
xcycle_type_text
===
"自行车"
)
{
if
(
this
.
result
.
xcycle_type_text
===
"自行车"
)
{
this
.
result
.
company
=
this
.
allData
.
event_data
.
xcycle
.
company
.
name
;
this
.
result
.
company
=
this
.
allData
.
event_data
.
xcycle
.
company
.
name
;
}
else
if
(
this
.
result
.
xcycle_type_text
===
"摩托车"
)
{
}
else
if
(
this
.
result
.
xcycle_type_text
===
"摩托车"
)
{
if
(
typeof
this
.
allData
.
event_data
.
xcycle
.
company
.
code
!==
"number"
)
{
this
.
result
.
company
=
"未识别"
;
}
else
{
this
.
result
.
company
=
this
.
getCode
(
this
.
result
.
company
=
this
.
getCode
(
"外卖公司"
,
"外卖公司"
,
this
.
allData
.
event_data
.
xcycle
.
company
.
code
this
.
allData
.
event_data
.
xcycle
.
company
.
code
);
);
}
}
else
if
(
this
.
result
.
xcycle_type_text
===
"三轮车"
)
{
}
else
if
(
this
.
result
.
xcycle_type_text
===
"三轮车"
)
{
if
(
typeof
this
.
allData
.
event_data
.
xcycle
.
company
.
code
!==
"number"
)
{
this
.
result
.
company
=
"未识别"
;
}
else
{
this
.
result
.
company
=
this
.
getCode
(
this
.
result
.
company
=
this
.
getCode
(
"快递公司"
,
"快递公司"
,
this
.
allData
.
event_data
.
xcycle
.
company
.
code
this
.
allData
.
event_data
.
xcycle
.
company
.
code
);
);
}
}
else
{
}
else
{
this
.
result
.
company
=
"无"
;
this
.
result
.
company
=
"无"
;
}
}
...
...
src/router/index.js
View file @
4b64e70
...
@@ -235,6 +235,14 @@ export const asyncRouterMap = [{
...
@@ -235,6 +235,14 @@ export const asyncRouterMap = [{
},
},
component
:
resolve
=>
component
:
resolve
=>
require
([
"../views/resource/Codes/codes.vue"
],
resolve
)
require
([
"../views/resource/Codes/codes.vue"
],
resolve
)
},{
path
:
"/resource/publicconfg"
,
name
:
"参数模板"
,
meta
:
{
icon
:
"el-icon-location"
},
component
:
resolve
=>
require
([
"../views/resource/publicConfig/index.vue"
],
resolve
)
}
}
]
]
},
},
...
...
src/views/public/flvvideo.vue
View file @
4b64e70
...
@@ -31,15 +31,6 @@ export default {
...
@@ -31,15 +31,6 @@ export default {
},
},
startFunc
(
url
)
{
startFunc
(
url
)
{
let
playerel
=
document
.
getElementById
(
"flvvideo"
);
let
playerel
=
document
.
getElementById
(
"flvvideo"
);
// if (typeof player !== "undefined") {
// if (this.player != null) {
// // this.player.unload();
// // this.player.detachMediaElement();
// // this.player.destroy();
// // this.player = null;
// this.flv_destroy();
// }
// }
if
(
this
.
player
)
{
if
(
this
.
player
)
{
this
.
destoryVideo
(
this
.
player
);
this
.
destoryVideo
(
this
.
player
);
}
}
...
...
src/views/resource/publicConfig/baseConfig.js
0 → 100644
View file @
4b64e70
This diff is collapsed.
Click to expand it.
src/views/resource/publicConfig/index.vue
0 → 100644
View file @
4b64e70
<!--
* @Author: panda
* @Date: 2021-09-27 13:40:37
* @LastEditTime: 2021-09-27 17:04:20
* @LastEditors: Please set LastEditors
* @Description: 参数缺省设置
* @FilePath: /fanxing_new/src/views/resource/publicConfig/index.vue
-->
<
template
>
<div
class=
"config-box"
>
<div
class=
"switch-box"
>
<el-radio
v-model=
"radio"
label=
"defaultConfig"
>
正常配置
</el-radio>
<el-radio
v-model=
"radio"
label=
"illegalStopDefaultConfig"
>
违停配置
</el-radio>
</div>
<el-row>
<el-col
:span=
"3"
class=
"search-box"
>
<el-input
placeholder=
"请输入内容"
v-model=
"paramsval"
class=
"input-with-select"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"$refs.iframeconfig.contentWindow.clickButton(paramsval)"
></el-button>
</el-input>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
class=
"content-box"
>
<iframe
id=
"iframeconfig"
ref=
"iframeconfig"
src=
"./dynamicParameters.html"
frameborder=
"0"
width=
"100%"
height=
"600"
scrolling=
"no"
></iframe>
</el-col>
<el-col
:span=
"1"
:offset=
"19"
>
<el-button
type=
"primary"
@
click=
"saveConfig"
class=
"save-btn"
>
保存
</el-button>
</el-col>
</el-row>
</div>
</
template
>
<
script
>
import
xml
from
'./baseConfig.js'
export
default
{
data
()
{
return
{
paramsval
:
''
,
radio
:
'defaultConfig'
,
config
:
''
,
configid
:
''
}
},
watch
:{
radio
(
val
){
this
.
getbaseConf
(
val
)
}
},
methods
:{
xmlInit
:
function
(
obj
)
{
this
.
$refs
.
iframeconfig
.
contentWindow
.
loadParameterTree
(
obj
.
content
,
'<?xml version="1.0" encoding="GBK"?><root></root>'
);
},
getbaseConf
(
type
){
this
.
$api
.
device
.
getConfig
(
type
).
then
(
res
=>
{
this
.
config
=
res
.
data
.
content
this
.
configid
=
res
.
data
.
id
this
.
xmlInit
(
res
.
data
)
})
},
saveConfig
(){
this
.
$refs
.
iframeconfig
.
contentWindow
.
submit
();
//ifram 传递回来的饿xml
let
XMLStr
=
this
.
$refs
.
iframeconfig
.
contentWindow
.
xmlStr
;
if
(
!
XMLStr
)
{
XMLStr
=
this
.
config
}
this
.
$api
.
device
.
saveConfig
(
this
.
configid
,{
content
:
XMLStr
}).
then
(
res
=>
{
if
(
res
.
ecode
==
200
)
{
this
.
$message
({
type
:
"success"
,
message
:
'保存成功!'
});
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
'保存失败!'
});
}
})
},
},
mounted
(){
setTimeout
(()
=>
{
this
.
getbaseConf
(
'defaultConfig'
)
},
2000
);
}
}
</
script
>
<
style
>
.config-box
{
margin
:
10px
;
background
:
#fff
;
overflow
:
hidden
;
}
.switch-box
{
margin
:
10px
0
0
10px
}
.search-box
,
.content-box
{
margin
:
10px
;
}
.save-btn
{
float
:
right
;
margin-bottom
:
20px
;
}
</
style
>
src/views/resource/store_confs.vue
View file @
4b64e70
...
@@ -325,7 +325,7 @@ export default {
...
@@ -325,7 +325,7 @@ export default {
},
},
exportFun
(
index
,
row
){
exportFun
(
index
,
row
){
let
url
=
location
.
origin
;
let
url
=
location
.
origin
;
console
.
log
(
`
${
url
}
/api/v1/devconf_fx/store_confs/export/
${
row
.
unid
}
`
)
location
.
href
=
`
${
url
}
/api/v1/devconf_fx/store_confs/export/
${
row
.
unid
}
`
}
}
}
}
};
};
...
...
src/views/taskManage/editVidebigree.vue
View file @
4b64e70
...
@@ -590,8 +590,7 @@ export default {
...
@@ -590,8 +590,7 @@ export default {
this
.
$api
.
device
.
getDevtreeLike
(
this
.
dev_unid
,
'内部设备'
,{
vchan_name_like
:
this
.
searchText
}).
then
(
camerares
=>
{
this
.
$api
.
device
.
getDevtreeLike
(
this
.
dev_unid
,
'内部设备'
,{
vchan_name_like
:
this
.
searchText
}).
then
(
camerares
=>
{
this
.
$api
.
device
.
getDevtreeLike
(
this
.
dev_unid
,
'短视频'
,{
vchan_name_like
:
this
.
searchText
}).
then
(
vchanres
=>
{
this
.
$api
.
device
.
getDevtreeLike
(
this
.
dev_unid
,
'短视频'
,{
vchan_name_like
:
this
.
searchText
}).
then
(
vchanres
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
debugger
this
.
zNodes
[
0
].
childs
=
res
.
result
?
res
.
result
.
childs
:[]
this
.
zNodes
[
0
].
childs
=
res
.
result
.
childs
this
.
zNodes
[
1
].
childs
=
camerares
.
vchan_struct
this
.
zNodes
[
1
].
childs
=
camerares
.
vchan_struct
this
.
zNodes
[
2
].
childs
=
vchanres
.
list_data
this
.
zNodes
[
2
].
childs
=
vchanres
.
list_data
var
ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#treeDemo"
),
this
.
setting
,
this
.
zNodes
);
var
ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#treeDemo"
),
this
.
setting
,
this
.
zNodes
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment