Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
Details
Activity
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
wangweidong
patzn-cloud-web-back-soil
Commits
be728524
Commit
be728524
authored
Mar 20, 2021
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了委托评审提交审批按钮
parent
b1cc8a48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
common.js
plugins/common.js
+72
-0
No files found.
plugins/common.js
View file @
be728524
...
@@ -488,6 +488,78 @@ Vue.prototype.$layx = function(id, title, url, option) {
...
@@ -488,6 +488,78 @@ Vue.prototype.$layx = function(id, title, url, option) {
layx
.
iframe
(
id
,
title
,
url
,
option
||
{
width
:
'100%'
,
height
:
'100%'
})
layx
.
iframe
(
id
,
title
,
url
,
option
||
{
width
:
'100%'
,
height
:
'100%'
})
}
}
/**
/**
* 文件格式
* param(img:是否为图片格式)
*/
Vue
.
prototype
.
$fileFormat
=
function
(
type
,
param
)
{
const
res
=
[
'doc'
,
'docx'
,
'txt'
,
'xls'
,
'xlsx'
,
'ppt'
,
'pptx'
,
'pdf'
,
'jpg'
,
'png'
,
'exif'
,
'bmp'
,
'tif'
,
'gif'
,
'jpeg'
]
const
imgList
=
[
'jpg'
,
'png'
,
'exif'
,
'bmp'
,
'tif'
,
'gif'
,
'jpeg'
]
if
(
param
===
'img'
)
{
// 判断是否为图片
if
(
imgList
.
indexOf
(
type
.
toLowerCase
())
!==
-
1
)
{
return
true
}
else
{
return
false
}
}
else
{
// 返回文件格式
// eslint-disable-next-line no-lonely-if
if
(
res
.
indexOf
(
type
.
toLowerCase
())
!==
-
1
)
{
return
type
.
toLowerCase
()
}
else
{
return
'other'
}
}
}
/**
*预览或者编辑文件
* param: {typeKey: ''}
*/
Vue
.
prototype
.
$viewDocument
=
function
(
data
,
key
,
param
)
{
const
typeKey
=
param
&&
param
.
typeKey
?
param
.
typeKey
:
'type'
switch
(
key
)
{
case
'edit'
:
// 编辑
this
.
$openDocument
(
data
,
key
,
4
,
true
,
typeKey
)
break
case
'readonly'
:
// 只读
this
.
$openDocument
(
data
,
key
,
5
,
true
,
typeKey
)
break
}
}
Vue
.
prototype
.
$openDocument
=
function
(
rel
,
key
,
isReport
,
isEdit
,
typeKey
)
{
if
(
rel
[
typeKey
].
toLowerCase
()
===
'pdf'
)
{
// pdf 单独预览
this
.
$pdfView
(
rel
.
objectKey
)
}
else
{
// pageoffice或officeOnline打开
this
.
$openWindowModeless
({
objectKey
:
rel
.
objectKey
,
id
:
rel
.
id
,
isReport
:
isReport
,
noMark
:
true
,
isEdit
:
isEdit
})
}
}
/**
*搜索条件清空缓存处理方式(form表单 查询)
*搜索条件清空缓存处理方式(form表单 查询)
*
*
*/
*/
...
...
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