Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xxx_phase2_web
Project overview
Project overview
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
夏敏伟
xxx_phase2_web
Commits
f1ff7acf
Commit
f1ff7acf
authored
Dec 05, 2023
by
高飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改网页打开电脑软件
parent
97ae2be7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
289 additions
and
28 deletions
+289
-28
index.html
index.html
+1
-0
src/assets/img/setting/ht.png
src/assets/img/setting/ht.png
+0
-0
src/assets/img/setting/ht1.png
src/assets/img/setting/ht1.png
+0
-0
src/view/flfg/znfx.vue
src/view/flfg/znfx.vue
+14
-12
src/view/fzjc/znfx.vue
src/view/fzjc/znfx.vue
+14
-12
src/view/sjgl/wxk_public.vue
src/view/sjgl/wxk_public.vue
+52
-4
static/js/protocolcheck.js
static/js/protocolcheck.js
+208
-0
No files found.
index.html
View file @
f1ff7acf
...
...
@@ -21,5 +21,6 @@
alert
(
"
当前浏览器版本过低,请升级!!!
"
);
}
</script>
<script
src=
"static/js/protocolcheck.js"
></script>
<script
src=
"http://192.168.168.213:9000/web-apps/apps/api/documents/api.js"
></script>
</html>
\ No newline at end of file
src/assets/img/setting/ht.png
0 → 100644
View file @
f1ff7acf
1.45 KB
src/assets/img/setting/ht1.png
0 → 100644
View file @
f1ff7acf
1.19 KB
src/view/flfg/znfx.vue
View file @
f1ff7acf
...
...
@@ -567,7 +567,7 @@ export default {
data
.
list
.
forEach
((
item
,
index
)
=>
{
data
.
list
[
index
].
create_time
=
new
Date
(
data
.
list
[
index
].
create_time
).
Format
(
"
yyyy-MM-dd
HH
:mm:ss
"
);
).
Format
(
"
yyyy-MM-dd
hh
:mm:ss
"
);
});
_this
.
get_files
=
data
.
list
;
_this
.
totals_qw
=
data
.
totals
;
...
...
@@ -621,10 +621,6 @@ export default {
document
.
getElementById
(
"
sound_id
"
).
currentTime
=
0
;
},
500
);
}
else
{
// let path_srt =
// "api/rest/document/pdf/" + _this.type_folder + "/" + row.file.uuid;
// window.open(path_srt);
// window.open(`api/rest/file/pdf/DocumentPDF?objectName=${row.file.uuid}`);
get
(
`api/rest/file/exists?bucket=DocumentPDF&filename=
${
row
.
file
.
uuid
}
`
).
then
(
res
=>
{
if
(
res
)
{
...
...
@@ -643,13 +639,19 @@ export default {
},
//table_全文搜索预览
handleView_qwss
(
item
)
{
// let path_srt =
// "api/rest/document/pdf/" +
// this.type_folder +
// "/" +
// item.fileInfo.file.uuid;
// window.open(path_srt);
get
(
`api/rest/file/exists?bucket=DocumentPDF&filename=
${
item
.
fileInfo
.
file
.
uuid
}
`
).
then
(
res
=>
{
if
(
res
)
{
window
.
open
(
`api/rest/file/pdf/DocumentPDF?objectName=
${
item
.
fileInfo
.
file
.
uuid
}
`
);
}
else
{
return
post
(
"
api/rest/file/path?bucket=Document&filename=
"
+
item
.
fileInfo
.
file
.
uuid
);
}
}).
then
(
res
=>
{
if
(
res
)
{
window
.
open
(
`./onlyoffice.html?url=
${
encodeURIComponent
(
res
)}
&fileType=
${
item
.
fileInfo
.
file
.
type
}
&filename=
${
item
.
fileInfo
.
name
}
`
);
}
}).
catch
(
err
=>
{
this
.
$message
(
"
预览失败
"
);
});
},
//table数据下载
handleDownload
(
index
,
row
)
{
...
...
src/view/fzjc/znfx.vue
View file @
f1ff7acf
...
...
@@ -561,7 +561,7 @@ export default {
data
.
list
.
forEach
((
item
,
index
)
=>
{
data
.
list
[
index
].
create_time
=
new
Date
(
data
.
list
[
index
].
create_time
).
Format
(
"
yyyy-MM-dd
HH
:mm:ss
"
);
).
Format
(
"
yyyy-MM-dd
hh
:mm:ss
"
);
});
_this
.
get_files
=
data
.
list
;
_this
.
totals_qw
=
data
.
totals
;
...
...
@@ -615,10 +615,6 @@ export default {
document
.
getElementById
(
"
sound_id
"
).
currentTime
=
0
;
},
500
);
}
else
{
// let path_srt =
// "api/rest/document/pdf/" + _this.type_folder + "/" + row.file.uuid;
// window.open(path_srt);
// window.open(`api/rest/file/pdf/DocumentPDF?objectName=${row.file.uuid}`);
get
(
`api/rest/file/exists?bucket=DocumentPDF&filename=
${
row
.
file
.
uuid
}
`
).
then
(
res
=>
{
if
(
res
)
{
...
...
@@ -637,13 +633,19 @@ export default {
},
//table_全文搜索预览
handleView_qwss
(
item
)
{
// let path_srt =
// "api/rest/document/pdf/" +
// this.type_folder +
// "/" +
// item.fileInfo.file.uuid;
// window.open(path_srt);
get
(
`api/rest/file/exists?bucket=DocumentPDF&filename=
${
item
.
fileInfo
.
file
.
uuid
}
`
).
then
(
res
=>
{
if
(
res
)
{
window
.
open
(
`api/rest/file/pdf/DocumentPDF?objectName=
${
item
.
fileInfo
.
file
.
uuid
}
`
);
}
else
{
return
post
(
"
api/rest/file/path?bucket=Document&filename=
"
+
item
.
fileInfo
.
file
.
uuid
);
}
}).
then
(
res
=>
{
if
(
res
)
{
window
.
open
(
`./onlyoffice.html?url=
${
encodeURIComponent
(
res
)}
&fileType=
${
item
.
fileInfo
.
file
.
type
}
&filename=
${
item
.
fileInfo
.
name
}
`
);
}
}).
catch
(
err
=>
{
this
.
$message
(
"
预览失败
"
);
});
},
//table数据下载
handleDownload
(
index
,
row
)
{
...
...
src/view/sjgl/wxk_public.vue
View file @
f1ff7acf
...
...
@@ -49,7 +49,7 @@
</el-table-column>
<el-table-column
prop=
"file.type"
label=
"文档类型"
width=
"110"
>
</el-table-column>
<el-table-column
prop=
"cz"
label=
"操作"
width=
"
15
0"
show-overflow-tooltip
>
<el-table-column
prop=
"cz"
label=
"操作"
width=
"
20
0"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<i
class=
"el-icon-view"
@
click=
"handleView(scope.$index, scope.row)"
title=
"预览"
></i>
...
...
@@ -61,6 +61,9 @@
>
-->
<i
class=
"el-icon-edit"
@
click=
"handleEdit(scope.$index, scope.row)"
title=
"编辑"
></i>
<!--
<i
class=
"el-icon-delete-solid"
@
click=
"handleOpen(scope.$index, scope.row)"
title=
"打开软件"
v-if=
"fl_type===2"
></i>
-->
<div
class=
"ht-div"
@
click=
"handleOpen(scope.$index, scope.row)"
v-if=
"fl_type===2"
title=
"打开软件"
></div>
<i
class=
"el-icon-delete-solid"
@
click=
"handleDelete(scope.$index, scope.row)"
title=
"删除"
></i>
</
template
>
...
...
@@ -166,7 +169,7 @@
</el-table-column>
<el-table-column
prop=
"file.type"
label=
"文档类型"
width=
"110"
>
</el-table-column>
<el-table-column
prop=
"cz"
label=
"操作"
width=
"
15
0"
show-overflow-tooltip
>
<el-table-column
prop=
"cz"
label=
"操作"
width=
"
20
0"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<i
class=
"el-icon-view"
@
click=
"handleView(scope.$index, scope.row)"
title=
"预览"
></i>
...
...
@@ -178,6 +181,10 @@
>
-->
<i
class=
"el-icon-edit"
@
click=
"handleEdit(scope.$index, scope.row)"
title=
"编辑"
></i>
<!--
<i
class=
"el-icon-delete-solid"
@
click=
"handleOpen(scope.$index, scope.row)"
title=
"打开软件"
v-if=
"fl_type===2"
></i>
-->
<div
class=
"ht-div"
@
click=
"handleOpen(scope.$index, scope.row)"
v-if=
"fl_type===2"
title=
"打开软件"
></div>
<i
class=
"el-icon-delete-solid"
@
click=
"handleDelete(scope.$index, scope.row)"
title=
"删除"
></i>
</
template
>
...
...
@@ -488,7 +495,7 @@ export default {
data
.
list
.
forEach
((
item
,
index
)
=>
{
data
.
list
[
index
].
create_time
=
new
Date
(
data
.
list
[
index
].
create_time
).
Format
(
"
yyyy-MM-dd
HH
:mm:ss
"
);
).
Format
(
"
yyyy-MM-dd
hh
:mm:ss
"
);
});
_this
.
get_files
=
data
.
list
;
_this
.
totals_qw
=
data
.
totals
;
...
...
@@ -589,6 +596,39 @@ export default {
item
.
fileInfo
.
file
.
uuid
;
download
(
path_srt
,
item
.
fileInfo
.
file
.
name
);
},
//打开软件
handleOpen
(
index
,
row
){
let
_this
=
this
;
//用户判断此格式是否是视频格式
let
video_type
=
false
;
//用户判断此格式是否是音频格式
let
sound_type
=
false
;
arr_video_format
().
forEach
((
name
)
=>
{
if
(
name
.
toUpperCase
()
==
row
.
file
.
type
.
toUpperCase
())
{
video_type
=
true
;
}
});
arr_sound_format
().
forEach
((
name
)
=>
{
if
(
name
.
toUpperCase
()
==
row
.
file
.
type
.
toUpperCase
())
{
sound_type
=
true
;
}
});
if
(
video_type
||
sound_type
){
window
.
protocolCheck
(
'
UHD://
'
,(
fail
)
=>
{
// 安装则直接打开
console
.
log
(
1111
);
},(
succ
)
=>
{
// 安装则直接打开
console
.
log
(
'
succ
'
,
succ
)
}
)
}
else
{
_this
.
$message
({
type
:
"
warning
"
,
message
:
"
当前文件格式不支持本地软件操作
"
,
});
}
},
//table数据编辑弹出框展示
handleEdit
(
index
,
row
)
{
let
_this
=
this
;
...
...
@@ -1136,7 +1176,15 @@ export default {
.table-div
{
width
:
100%
;
height
:
calc
(
100%
-
50px
);
.ht-div
{
width
:
26px
;
height
:
21px
;
background-image
:
url(../../assets/img/setting/ht1.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
margin-right
:
9px
;
float
:
left
;
}
.el-table
tr
{
background-color
:
transparent
!
important
;
color
:
#ffffff
c7
;
...
...
static/js/protocolcheck.js
0 → 100644
View file @
f1ff7acf
(
function
(
f
){
if
(
typeof
exports
===
"
object
"
&&
typeof
module
!==
"
undefined
"
){
module
.
exports
=
f
()}
else
if
(
typeof
define
===
"
function
"
&&
define
.
amd
){
define
([],
f
)}
else
{
var
g
;
if
(
typeof
window
!==
"
undefined
"
){
g
=
window
}
else
if
(
typeof
global
!==
"
undefined
"
){
g
=
global
}
else
if
(
typeof
self
!==
"
undefined
"
){
g
=
self
}
else
{
g
=
this
}
g
.
protocolCheck
=
f
()}})(
function
(){
var
define
,
module
,
exports
;
return
(
function
e
(
t
,
n
,
r
){
function
s
(
o
,
u
){
if
(
!
n
[
o
]){
if
(
!
t
[
o
]){
var
a
=
typeof
require
==
"
function
"
&&
require
;
if
(
!
u
&&
a
)
return
a
(
o
,
!
0
);
if
(
i
)
return
i
(
o
,
!
0
);
var
f
=
new
Error
(
"
Cannot find module '
"
+
o
+
"
'
"
);
throw
f
.
code
=
"
MODULE_NOT_FOUND
"
,
f
}
var
l
=
n
[
o
]
=
{
exports
:{}};
t
[
o
][
0
].
call
(
l
.
exports
,
function
(
e
){
var
n
=
t
[
o
][
1
][
e
];
return
s
(
n
?
n
:
e
)},
l
,
l
.
exports
,
e
,
t
,
n
,
r
)}
return
n
[
o
].
exports
}
var
i
=
typeof
require
==
"
function
"
&&
require
;
for
(
var
o
=
0
;
o
<
r
.
length
;
o
++
)
s
(
r
[
o
]);
return
s
})({
1
:[
function
(
require
,
module
,
exports
){
function
_registerEvent
(
target
,
eventType
,
cb
)
{
if
(
target
.
addEventListener
)
{
target
.
addEventListener
(
eventType
,
cb
);
return
{
remove
:
function
()
{
target
.
removeEventListener
(
eventType
,
cb
);
}
};
}
else
{
target
.
attachEvent
(
eventType
,
cb
);
return
{
remove
:
function
()
{
target
.
detachEvent
(
eventType
,
cb
);
}
};
}
}
function
_createHiddenIframe
(
target
,
uri
)
{
var
iframe
=
document
.
createElement
(
"
iframe
"
);
iframe
.
src
=
uri
;
iframe
.
id
=
"
hiddenIframe
"
;
iframe
.
style
.
display
=
"
none
"
;
target
.
appendChild
(
iframe
);
return
iframe
;
}
function
openUriWithHiddenFrame
(
uri
,
failCb
,
successCb
)
{
var
timeout
=
setTimeout
(
function
()
{
failCb
();
handler
.
remove
();
},
1000
);
var
iframe
=
document
.
querySelector
(
"
#hiddenIframe
"
);
if
(
!
iframe
)
{
iframe
=
_createHiddenIframe
(
document
.
body
,
"
about:blank
"
);
}
var
handler
=
_registerEvent
(
window
,
"
blur
"
,
onBlur
);
function
onBlur
()
{
clearTimeout
(
timeout
);
handler
.
remove
();
successCb
();
}
iframe
.
contentWindow
.
location
.
href
=
uri
;
}
function
openUriWithTimeoutHack
(
uri
,
failCb
,
successCb
)
{
var
timeout
=
setTimeout
(
function
()
{
failCb
();
handler
.
remove
();
},
1000
);
//handle page running in an iframe (blur must be registered with top level window)
var
target
=
window
;
while
(
target
!=
target
.
parent
)
{
target
=
target
.
parent
;
}
var
handler
=
_registerEvent
(
target
,
"
blur
"
,
onBlur
);
function
onBlur
()
{
clearTimeout
(
timeout
);
handler
.
remove
();
successCb
();
}
window
.
location
=
uri
;
}
function
openUriUsingFirefox
(
uri
,
failCb
,
successCb
)
{
var
iframe
=
document
.
querySelector
(
"
#hiddenIframe
"
);
if
(
!
iframe
)
{
iframe
=
_createHiddenIframe
(
document
.
body
,
"
about:blank
"
);
}
try
{
iframe
.
contentWindow
.
location
.
href
=
uri
;
successCb
();
}
catch
(
e
)
{
if
(
e
.
name
==
"
NS_ERROR_UNKNOWN_PROTOCOL
"
)
{
failCb
();
}
}
}
function
openUriUsingIEInOlderWindows
(
uri
,
failCb
,
successCb
)
{
if
(
getInternetExplorerVersion
()
===
10
)
{
openUriUsingIE10InWindows7
(
uri
,
failCb
,
successCb
);
}
else
if
(
getInternetExplorerVersion
()
===
9
||
getInternetExplorerVersion
()
===
11
)
{
openUriWithHiddenFrame
(
uri
,
failCb
,
successCb
);
}
else
{
openUriInNewWindowHack
(
uri
,
failCb
,
successCb
);
}
}
function
openUriUsingIE10InWindows7
(
uri
,
failCb
,
successCb
)
{
var
timeout
=
setTimeout
(
failCb
,
1000
);
window
.
addEventListener
(
"
blur
"
,
function
()
{
clearTimeout
(
timeout
);
successCb
();
});
var
iframe
=
document
.
querySelector
(
"
#hiddenIframe
"
);
if
(
!
iframe
)
{
iframe
=
_createHiddenIframe
(
document
.
body
,
"
about:blank
"
);
}
try
{
iframe
.
contentWindow
.
location
.
href
=
uri
;
}
catch
(
e
)
{
failCb
();
clearTimeout
(
timeout
);
}
}
function
openUriInNewWindowHack
(
uri
,
failCb
,
successCb
)
{
var
myWindow
=
window
.
open
(
''
,
''
,
'
width=0,height=0
'
);
myWindow
.
document
.
write
(
"
<iframe src='
"
+
uri
+
"
'></iframe>
"
);
setTimeout
(
function
()
{
try
{
myWindow
.
location
.
href
;
myWindow
.
setTimeout
(
"
window.close()
"
,
1000
);
successCb
();
}
catch
(
e
)
{
myWindow
.
close
();
failCb
();
}
},
1000
);
}
function
openUriWithMsLaunchUri
(
uri
,
failCb
,
successCb
)
{
navigator
.
msLaunchUri
(
uri
,
successCb
,
failCb
);
}
function
checkBrowser
()
{
var
isOpera
=
!!
window
.
opera
||
navigator
.
userAgent
.
indexOf
(
'
OPR/
'
)
>=
0
;
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
return
{
isOpera
:
isOpera
,
isFirefox
:
typeof
InstallTrigger
!==
'
undefined
'
,
isSafari
:
(
~
ua
.
indexOf
(
'
safari
'
)
&&
!~
ua
.
indexOf
(
'
chrome
'
))
||
Object
.
prototype
.
toString
.
call
(
window
.
HTMLElement
).
indexOf
(
'
Constructor
'
)
>
0
,
isIOS
:
/iPad|iPhone|iPod/
.
test
(
navigator
.
userAgent
)
&&
!
window
.
MSStream
,
isChrome
:
!!
window
.
chrome
&&
!
isOpera
,
isIE
:
/*@cc_on!@*/
false
||
!!
document
.
documentMode
// At least IE6
}
}
function
getInternetExplorerVersion
()
{
var
rv
=
-
1
;
if
(
navigator
.
appName
===
"
Microsoft Internet Explorer
"
)
{
var
ua
=
navigator
.
userAgent
;
var
re
=
new
RegExp
(
"
MSIE ([0-9]{1,}[
\
.0-9]{0,})
"
);
if
(
re
.
exec
(
ua
)
!=
null
)
rv
=
parseFloat
(
RegExp
.
$1
);
}
else
if
(
navigator
.
appName
===
"
Netscape
"
)
{
var
ua
=
navigator
.
userAgent
;
var
re
=
new
RegExp
(
"
Trident/.*rv:([0-9]{1,}[
\
.0-9]{0,})
"
);
if
(
re
.
exec
(
ua
)
!=
null
)
{
rv
=
parseFloat
(
RegExp
.
$1
);
}
}
return
rv
;
}
module
.
exports
=
function
(
uri
,
failCb
,
successCb
,
unsupportedCb
)
{
function
failCallback
()
{
failCb
&&
failCb
();
}
function
successCallback
()
{
successCb
&&
successCb
();
}
if
(
navigator
.
msLaunchUri
)
{
//for IE and Edge in Win 8 and Win 10
openUriWithMsLaunchUri
(
uri
,
failCb
,
successCb
);
}
else
{
var
browser
=
checkBrowser
();
if
(
browser
.
isFirefox
)
{
openUriUsingFirefox
(
uri
,
failCallback
,
successCallback
);
}
else
if
(
browser
.
isChrome
||
browser
.
isIOS
)
{
openUriWithTimeoutHack
(
uri
,
failCallback
,
successCallback
);
}
else
if
(
browser
.
isIE
)
{
openUriUsingIEInOlderWindows
(
uri
,
failCallback
,
successCallback
);
}
else
if
(
browser
.
isSafari
)
{
openUriWithHiddenFrame
(
uri
,
failCallback
,
successCallback
);
}
else
{
unsupportedCb
();
//not supported, implement please
}
}
}
},{}]},{},[
1
])(
1
)
});
\ No newline at end of file
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