Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
罗超
confucius
Commits
d802d888
Commit
d802d888
authored
Apr 02, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
2aeac837
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
UeEditor.vue
src/components/editor/UeEditor.vue
+21
-8
erpindex.js
src/utils/erpindex.js
+5
-3
No files found.
src/components/editor/UeEditor.vue
View file @
d802d888
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
uploadType
:
"1"
,
//1-上传图片,2-上传附件,3-上传音频
uploadType
:
"1"
,
//1-上传图片,2-上传附件,3-上传音频
//默认图片域名
//默认图片域名
defaultImgDomain
:
"http://imgfile.oytour.com/static/"
,
defaultImgDomain
:
"http://imgfile.oytour.com/static/"
,
ViewDomain
:
"
http://192.168.1.36:8140
"
,
ViewDomain
:
""
,
};
};
},
},
watch
:
{
watch
:
{
...
@@ -92,6 +92,10 @@
...
@@ -92,6 +92,10 @@
this
.
isInputChange
=
false
;
this
.
isInputChange
=
false
;
},
},
},
},
created
()
{
this
.
ViewDomain
=
this
.
domainManager
().
ViewFileUrl
;
console
.
log
(
"this.domainManager().ViewDomain"
,
this
.
ViewDomain
)
},
mounted
()
{
mounted
()
{
this
.
loadUe
();
this
.
loadUe
();
},
},
...
@@ -117,12 +121,15 @@
...
@@ -117,12 +121,15 @@
else
{
else
{
fileArray
.
forEach
(
item
=>
{
fileArray
.
forEach
(
item
=>
{
var
obj
=
this
.
getIcon
(
item
.
fileName
);
var
obj
=
this
.
getIcon
(
item
.
fileName
);
html
+=
this
.
getIconContent
(
item
);
if
(
obj
.
fileType
==
4
)
{
if
(
obj
.
fileType
==
4
)
{
html
+=
this
.
audioIframeStr
(
item
);
html
+=
this
.
audioIframeStr
(
item
);
}
else
if
(
obj
.
fileType
==
1
||
obj
.
fileType
==
2
||
obj
.
fileType
==
3
)
{
}
else
{
html
+=
this
.
fileIframeList
(
item
,
obj
.
fileType
);
html
+=
this
.
getIconContent
(
item
);
}
}
// else if (obj.fileType == 1 || obj.fileType == 2 || obj.fileType == 3) {
// html += this.fileIframeList(item, obj.fileType);
// }
})
})
}
}
if
(
html
&&
html
!=
''
)
{
if
(
html
&&
html
!=
''
)
{
...
@@ -135,8 +142,13 @@
...
@@ -135,8 +142,13 @@
getIconContent
(
item
)
{
getIconContent
(
item
)
{
var
iconObj
=
this
.
getIcon
(
item
.
fileName
);
var
iconObj
=
this
.
getIcon
(
item
.
fileName
);
var
fileUrl
=
encodeURIComponent
(
item
.
fileUrl
);
var
fileUrl
=
encodeURIComponent
(
item
.
fileUrl
);
let
dataUrl
=
`
${
this
.
ViewDomain
+
'/read.html?fileName='
+
item
.
fileName
+
'&url='
+
fileUrl
+
'&fileType='
+
fileType
}
`
;
let
dataUrl
=
return
`<p dataUrl='
${
this
.
ViewDomain
+
'/read.html?fileName='
+
item
.
fileName
+
'&url='
+
fileUrl
+
'&fileType='
+
fileType
}
'><span contenteditable="false" style="display:-webkit-box;margin-top:10px;background: #F7F8FA;padding: 14px 16px;max-width: 572px;overflow: hidden;cursor:pointer;-webkit-box-align: center;text-align:left;cursor:pointer;" name="
${
iconObj
.
dataType
}
" data="
${
item
.
fileName
}
">`
+
`
${
this
.
ViewDomain
+
'/read.html?fileName='
+
item
.
fileName
+
'&url='
+
fileUrl
+
'&fileType='
+
iconObj
.
fileType
}
`
;
var
linkAttr
=
""
;
if
(
iconObj
.
fileType
==
1
||
iconObj
.
fileType
==
2
||
iconObj
.
fileType
==
3
)
{
linkAttr
=
` dataUrl='
${
dataUrl
}
'`
;
}
return
`<p '
${
linkAttr
}
'><span contenteditable="false" style="display:-webkit-box;margin-top:10px;background: #F7F8FA;padding: 14px 16px;max-width: 572px;overflow: hidden;cursor:pointer;-webkit-box-align: center;text-align:left;cursor:pointer;" name="
${
iconObj
.
dataType
}
" data="
${
item
.
fileName
}
">`
+
`<img src="
${
iconObj
.
iconUrl
}
" style="width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;"><span style="font-size:14px; color:#181E33; line-height:20px; display:block; overflow:hidden; text-overflow:ellipsis;">
${
item
.
fileName
}
</span></span></p>`
;
`<img src="
${
iconObj
.
iconUrl
}
" style="width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;"><span style="font-size:14px; color:#181E33; line-height:20px; display:block; overflow:hidden; text-overflow:ellipsis;">
${
item
.
fileName
}
</span></span></p>`
;
},
},
//获取文件图标和类型
//获取文件图标和类型
...
@@ -196,12 +208,13 @@
...
@@ -196,12 +208,13 @@
'" class="ans-insertaudio-module" module="_insertaudio">'
+
' </iframe></p>'
;
'" class="ans-insertaudio-module" module="_insertaudio">'
+
' </iframe></p>'
;
},
},
//视频、PDF、WORD、PPT、EXCEL
//视频、PDF、WORD、PPT、EXCEL
fileIframeList
(
data
,
fileType
)
{
fileIframeList
(
data
,
fileType
)
{
//视频1 音频 2 ppt/word 3
//视频1 音频 2 ppt/word 3
var
fileUrl
=
encodeURIComponent
(
data
.
fileUrl
);
var
fileUrl
=
encodeURIComponent
(
data
.
fileUrl
);
return
'<p><iframe height="62px" width="auto" frameborder="0" allowtransparency="true" '
+
return
'<p><iframe height="62px" width="auto" frameborder="0" allowtransparency="true" '
+
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" '
+
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" '
+
' src="'
+
this
.
ViewDomain
+
'/read.html?fileName='
+
data
.
fileName
+
'&url='
+
fileUrl
+
'&fileType='
+
fileType
+
' src="'
+
this
.
ViewDomain
+
'/read.html?fileName='
+
data
.
fileName
+
'&url='
+
fileUrl
+
'&fileType='
+
fileType
+
'" class="ans-insertaudio-module" module="_insertaudio">'
+
' </iframe></p>'
;
'" class="ans-insertaudio-module" module="_insertaudio">'
+
' </iframe></p>'
;
},
},
loadUe
()
{
loadUe
()
{
...
...
src/utils/erpindex.js
View file @
d802d888
...
@@ -81,12 +81,14 @@ export default {
...
@@ -81,12 +81,14 @@ export default {
//域名管理对象
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
'http://192.168.1.13:8083'
;
let
domainUrl
=
'http://192.168.1.13:8083'
;
let
autoUrl
=
'http://192.168.1.36:814
0'
;
let
viewFileUrl
=
'http://192.168.1.36:812
0'
;
let
locationName
=
window
.
location
.
hostname
;
let
locationName
=
window
.
location
.
hostname
;
if
(
locationName
.
indexOf
(
'testerp.oytour'
)
!==
-
1
)
{
if
(
locationName
.
indexOf
(
'testerp.oytour'
)
!==
-
1
)
{
domainUrl
=
"http://testapi.oytour.com"
;
domainUrl
=
"http://testapi.oytour.com"
;
viewFileUrl
=
"http://upload.oytour.com"
;
}
else
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
)
{
}
else
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
)
{
domainUrl
=
"http://reborn.oytour.com"
;
domainUrl
=
"http://reborn.oytour.com"
;
viewFileUrl
=
"http://upload.oytour.com"
;
}
}
var
obj
=
{
var
obj
=
{
//主地址
//主地址
...
@@ -99,8 +101,8 @@ export default {
...
@@ -99,8 +101,8 @@ export default {
LocalTemplateFileDownLoadUrl
:
domainUrl
,
LocalTemplateFileDownLoadUrl
:
domainUrl
,
//本站文件流下载地址
//本站文件流下载地址
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
//文件预览地址
autoUrl
:
auto
Url
ViewFileUrl
:
viewFile
Url
};
};
return
obj
;
return
obj
;
},
},
...
...
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