Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdisk
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdisk
提交
fa41b02f
提交
fa41b02f
编写于
10月 26, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
6c0c9440
变更
49
显示空白字符变更
内嵌
并排
正在显示
49 个修改的文件
包含
1918 行增加
和
1350 行删除
+1918
-1350
CHANGELOG.md
app_web/CHANGELOG.md
+64
-0
package.json
app_web/package.json
+1
-1
auth-service.ts
app_web/src/authservice/auth-service.ts
+9
-1
codelist-service.ts
app_web/src/codelist/codelist-service.ts
+9
-7
app-actionbar.vue
app_web/src/components/app-actionbar/app-actionbar.vue
+2
-2
app-alert-group.vue
app_web/src/components/app-alert-group/app-alert-group.vue
+30
-1
app-alert.vue
app_web/src/components/app-alert/app-alert.vue
+40
-6
app-breadcrumb.vue
app_web/src/components/app-breadcrumb/app-breadcrumb.vue
+9
-1
app-form-group.vue
app_web/src/components/app-form-group/app-form-group.vue
+1
-1
app-image-preview.vue
...eb/src/components/app-image-preview/app-image-preview.vue
+1
-1
app-image-upload.vue
app_web/src/components/app-image-upload/app-image-upload.vue
+1
-1
app-picker.vue
app_web/src/components/app-picker/app-picker.vue
+47
-8
avue-custom-form.vue
app_web/src/components/avue-custom-form/avue-custom-form.vue
+92
-18
disk-file-upload.vue
app_web/src/components/disk-file-upload/disk-file-upload.vue
+593
-521
disk-image-upload.vue
...eb/src/components/disk-image-upload/disk-image-upload.vue
+642
-564
appConfig.ts
app_web/src/config/appConfig.ts
+3
-1
md-view-engine.ts
app_web/src/engine/view/md-view-engine.ts
+2
-2
view-engine.ts
app_web/src/engine/view/view-engine.ts
+1
-1
wizard-view-engine.ts
app_web/src/engine/view/wizard-view-engine.ts
+5
-1
environment.ts
app_web/src/environments/environment.ts
+2
-0
view-message-service.ts
app_web/src/message/view-message-service.ts
+18
-11
sdfile-edit-view-base.vue
...src/pages/disk/sdfile-edit-view/sdfile-edit-view-base.vue
+67
-18
sdfile-grid-view-base.vue
...src/pages/disk/sdfile-grid-view/sdfile-grid-view-base.vue
+63
-15
sdindex-view-base.vue
app_web/src/pages/disk/sdindex-view/sdindex-view-base.vue
+27
-0
getters.ts
app_web/src/store/getters.ts
+11
-2
getters.ts
app_web/src/store/modules/auth-resource/getters.ts
+43
-10
default.less
app_web/src/styles/default.less
+3
-0
sdfile-ui-service-base.ts
app_web/src/uiservice/sdfile/sdfile-ui-service-base.ts
+6
-6
ui-service.ts
app_web/src/uiservice/ui-service.ts
+4
-0
view-tool.ts
app_web/src/utils/view-tool/view-tool.ts
+1
-1
sdindex-view-appmenu-base.vue
...ts/app/sdindex-view-appmenu/sdindex-view-appmenu-base.vue
+1
-0
default-searchform-base.vue
...ets/sdfile/default-searchform/default-searchform-base.vue
+1
-0
default-searchform-service.ts
...s/sdfile/default-searchform/default-searchform-service.ts
+29
-0
main-form-base.vue
app_web/src/widgets/sdfile/main-form/main-form-base.vue
+15
-89
main-form-service.ts
app_web/src/widgets/sdfile/main-form/main-form-service.ts
+1
-1
main-grid-base.vue
app_web/src/widgets/sdfile/main-grid/main-grid-base.vue
+1
-1
main-grid-service.ts
app_web/src/widgets/sdfile/main-grid/main-grid-service.ts
+1
-1
config.xml
config.xml
+0
-5
application-dev.yml
ibzdisk-boot/src/main/resources/application-dev.yml
+1
-1
SDFile.java
...ore/src/main/java/cn/ibizlab/core/disk/domain/SDFile.java
+1
-0
SDFileServiceImpl.java
.../cn/ibizlab/core/disk/service/impl/SDFileServiceImpl.java
+1
-0
20200620200620_init_ibzcfg2.xml
...urces/liquibase/changelog/20200620200620_init_ibzcfg2.xml
+21
-0
Dockerfile
...-provider/ibzdisk-provider-api/src/main/docker/Dockerfile
+1
-1
ibzdisk-provider-api.yaml
...sk-provider-api/src/main/docker/ibzdisk-provider-api.yaml
+1
-14
SDFileResource.java
...api/src/main/java/cn/ibizlab/api/rest/SDFileResource.java
+2
-0
AuditAspect.java
...til/src/main/java/cn/ibizlab/util/aspect/AuditAspect.java
+34
-30
LayeringCache.java
.../main/java/cn/ibizlab/util/cache/cache/LayeringCache.java
+10
-4
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+0
-1
application-sys.yml
ibzdisk-util/src/main/resources/application-sys.yml
+0
-1
未找到文件。
app_web/CHANGELOG.md
浏览文件 @
fa41b02f
## v7.0.0-alpha.20 [2020-10-18]
### Bug修复
修复获取数据对象的主状态值统一转字符串处理逻辑
修复表单空输入异常问题
修复下拉数据数据加载异常问题
修复表单分页图标重复发布异常
修复数据选择增加外键值附加数据回填逻辑
修复表格行编辑可设置数据主键和清空仿真主键问题
修复代码表返回数据不合法抛出的异常
修复表单值规则部分逻辑
修复导航类视图修改右侧表单数据时,只能跳转第一条数据BUG
### 功能新增及优化
#### 模板
新增动态表单支持
新增视图消息支持
新增表单、面板、工具栏、数据看板直接内容项支持
新增日历项支持标识属性和文本属性
新增应用组件包支持
新增导航工具栏权限控制支持
新增图表绘制最终参数
新增门户部件界面行为组权限校验
新增表单、表格数据对象方式新建、更新默认值
新增导航视图搜索框提示可搜索字段名称
新增部件逻辑插件支持
新增工具栏、工具栏项插件支持
优化调整代码表服务基类位置
#### 基础文件
新增动态表单组件、直接内容项组件、视图消息组组件和视图消息组件
优化导航类部件工具栏状态逻辑
修复表单空输入异常问题
修复下拉数据数据加载异常
修复关系页第一次进入不加载问题
## v7.0.0-alpha.19 [2020-9-13]
## v7.0.0-alpha.19 [2020-9-13]
### Bug修复
### Bug修复
...
...
app_web/package.json
浏览文件 @
fa41b02f
app_web/src/authservice/auth-service.ts
浏览文件 @
fa41b02f
import
store
from
'@/store'
;
import
store
from
'@/store'
;
import
{
Environment
}
from
'@/environments/environment'
;
/**
/**
* 实体权限服务
* 实体权限服务
*
*
...
@@ -115,8 +117,14 @@ export default class AuthService {
...
@@ -115,8 +117,14 @@ export default class AuthService {
if
(
!
this
.
$store
.
getters
[
'authresource/getEnablePermissionValid'
])
{
if
(
!
this
.
$store
.
getters
[
'authresource/getEnablePermissionValid'
])
{
return
true
;
return
true
;
}
}
if
(
Object
.
is
(
Environment
.
menuPermissionMode
,
"RT"
)){
return
this
.
$store
.
getters
[
'authresource/getAuthMenuWithRT'
](
item
);
}
else
if
(
Object
.
is
(
Environment
.
menuPermissionMode
,
"RESOURCE"
)){
return
this
.
$store
.
getters
[
'authresource/getAuthMenuWithResource'
](
item
);
}
else
{
return
this
.
$store
.
getters
[
'authresource/getAuthMenu'
](
item
);
return
this
.
$store
.
getters
[
'authresource/getAuthMenu'
](
item
);
}
}
}
/**
/**
* 根据统一资源标识获取统一资源权限
* 根据统一资源标识获取统一资源权限
...
...
app_web/src/codelist/codelist-service.ts
浏览文件 @
fa41b02f
...
@@ -149,10 +149,11 @@ export default class CodeListService {
...
@@ -149,10 +149,11 @@ export default class CodeListService {
// 启用缓存
// 启用缓存
if
(
isEnableCache
){
if
(
isEnableCache
){
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
const
callbackKey
:
string
=
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
;
promise
.
then
((
result
:
any
)
=>
{
promise
.
then
((
result
:
any
)
=>
{
if
(
result
.
length
>
0
){
if
(
result
.
length
>
0
){
CodeListService
.
codelistCached
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,{
items
:
result
});
CodeListService
.
codelistCached
.
set
(
callbackKey
,{
items
:
result
});
CodeListService
.
codelistCache
.
delete
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
);
CodeListService
.
codelistCache
.
delete
(
callbackKey
);
return
resolve
(
result
);
return
resolve
(
result
);
}
else
{
}
else
{
return
resolve
([]);
return
resolve
([]);
...
@@ -162,8 +163,9 @@ export default class CodeListService {
...
@@ -162,8 +163,9 @@ export default class CodeListService {
})
})
}
}
// 加载完成,从本地缓存获取
// 加载完成,从本地缓存获取
if
(
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
const
key
:
string
=
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
;
let
items
:
any
=
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
).
items
;
if
(
CodeListService
.
codelistCached
.
get
(
key
)){
let
items
:
any
=
CodeListService
.
codelistCached
.
get
(
key
).
items
;
if
(
items
.
length
>
0
){
if
(
items
.
length
>
0
){
if
(
new
Date
().
getTime
()
<=
codelist
.
getExpirationTime
()){
if
(
new
Date
().
getTime
()
<=
codelist
.
getExpirationTime
()){
return
resolve
(
items
);
return
resolve
(
items
);
...
@@ -172,11 +174,11 @@ export default class CodeListService {
...
@@ -172,11 +174,11 @@ export default class CodeListService {
}
}
if
(
codelist
)
{
if
(
codelist
)
{
// 加载中,UI又需要数据,解决连续加载同一代码表问题
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if
(
CodeListService
.
codelistCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
if
(
CodeListService
.
codelistCache
.
get
(
key
)){
callback
(
context
,
data
,
tag
,
CodeListService
.
codelistCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
));
callback
(
context
,
data
,
tag
,
CodeListService
.
codelistCache
.
get
(
key
));
}
else
{
}
else
{
let
result
:
Promise
<
any
>
=
codelist
.
getItems
(
context
,
data
,
isloading
);
let
result
:
Promise
<
any
>
=
codelist
.
getItems
(
context
,
data
,
isloading
);
CodeListService
.
codelistCache
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,
result
);
CodeListService
.
codelistCache
.
set
(
key
,
result
);
codelist
.
setExpirationTime
(
new
Date
().
getTime
()
+
cacheTimeout
);
codelist
.
setExpirationTime
(
new
Date
().
getTime
()
+
cacheTimeout
);
callback
(
context
,
data
,
tag
,
result
);
callback
(
context
,
data
,
tag
,
result
);
}
}
...
...
app_web/src/components/app-actionbar/app-actionbar.vue
浏览文件 @
fa41b02f
...
@@ -66,7 +66,7 @@ export default class AppActionBar extends Vue {
...
@@ -66,7 +66,7 @@ export default class AppActionBar extends Vue {
public
created
(){
public
created
(){
if
(
this
.
viewState
)
{
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
"a
pp-actionbar
"
))
{
if
(
!
Object
.
is
(
tag
,
"a
ll-portlet
"
))
{
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'loadmodel'
)){
if
(
Object
.
is
(
action
,
'loadmodel'
)){
...
@@ -107,7 +107,7 @@ export default class AppActionBar extends Vue {
...
@@ -107,7 +107,7 @@ export default class AppActionBar extends Vue {
const
_item
=
ActionModel
[
key
];
const
_item
=
ActionModel
[
key
];
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
){
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
){
let
dataActionResult
:
any
;
let
dataActionResult
:
any
;
if
(
Object
.
is
(
_item
[
'actiontarget'
],
"NONE"
)){
if
(
Object
.
is
(
_item
[
'actiontarget'
],
"NONE"
)
||
Object
.
is
(
_item
[
'actiontarget'
],
""
)
){
dataActionResult
=
UIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
dataActionResult
=
UIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
}
else
{
}
else
{
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
...
...
app_web/src/components/app-alert-group/app-alert-group.vue
浏览文件 @
fa41b02f
...
@@ -4,7 +4,11 @@
...
@@ -4,7 +4,11 @@
<app-alert
<app-alert
:key=
"index"
:key=
"index"
:tag=
"item.tag"
:tag=
"item.tag"
:position=
"item.position"
/>
:context=
"context"
:viewparam=
"viewparam"
:position=
"item.position"
:infoGroup=
"infoGroup"
:viewname=
"viewname"
/>
</
template
>
</
template
>
</div>
</div>
...
@@ -32,6 +36,23 @@ export default class AppAlertGroup extends Vue {
...
@@ -32,6 +36,23 @@ export default class AppAlertGroup extends Vue {
*/
*/
@
Prop
()
infoGroup
:
any
;
@
Prop
()
infoGroup
:
any
;
/**
* 应用上下文
*
* @type {any}
* @memberof AppAlertGroup
*/
@
Prop
()
context
:
any
;
/**
* 视图参数
*
* @type {any}
* @memberof AppAlertGroup
*/
@
Prop
()
viewparam
:
any
;
/**
/**
* 视图消息组显示位置
* 视图消息组显示位置
*
*
...
@@ -40,6 +61,14 @@ export default class AppAlertGroup extends Vue {
...
@@ -40,6 +61,14 @@ export default class AppAlertGroup extends Vue {
*/
*/
@
Prop
()
position
:
any
;
@
Prop
()
position
:
any
;
/**
* 视图名称
*
* @type {any}
* @memberof AppAlertGroup
*/
@
Prop
()
viewname
:
any
;
/**
/**
* 当前位置视图消息集合
* 当前位置视图消息集合
*
*
...
...
app_web/src/components/app-alert/app-alert.vue
浏览文件 @
fa41b02f
...
@@ -44,6 +44,39 @@ export default class AppAlert extends Vue {
...
@@ -44,6 +44,39 @@ export default class AppAlert extends Vue {
*/
*/
@
Prop
()
position
:
any
;
@
Prop
()
position
:
any
;
/**
* 应用上下文
*
* @type {any}
* @memberof AppAlert
*/
@
Prop
()
context
:
any
;
/**
* 视图参数
*
* @type {any}
* @memberof AppAlert
*/
@
Prop
()
viewparam
:
any
;
/**
* 视图消息组tag
*
* @type {any}
* @memberof AppAlert
*/
@
Prop
()
infoGroup
!
:
any
;
/**
* 视图名称
*
* @type {any}
* @memberof AppAlert
*/
@
Prop
()
viewname
!
:
any
;
/**
/**
* 视图消息对象
* 视图消息对象
*
*
...
@@ -79,7 +112,7 @@ export default class AppAlert extends Vue {
...
@@ -79,7 +112,7 @@ export default class AppAlert extends Vue {
* @memberof AppAlert
* @memberof AppAlert
*/
*/
public
async
getData
()
{
public
async
getData
()
{
let
response
:
any
=
await
this
.
viewMessageService
.
getViewMessageByTag
(
this
.
tag
,
null
,
null
)
let
response
:
any
=
await
this
.
viewMessageService
.
getViewMessageByTag
(
this
.
tag
,
this
.
context
,
this
.
viewparam
);
if
(
response
&&
response
.
length
>
0
)
{
if
(
response
&&
response
.
length
>
0
)
{
response
.
forEach
((
item
:
any
)
=>
{
response
.
forEach
((
item
:
any
)
=>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
...
@@ -118,7 +151,8 @@ export default class AppAlert extends Vue {
...
@@ -118,7 +151,8 @@ export default class AppAlert extends Vue {
data
.
showState
=
true
;
data
.
showState
=
true
;
if
(
data
.
closeMode
||
data
.
closeMode
==
0
)
{
if
(
data
.
closeMode
||
data
.
closeMode
==
0
)
{
if
(
data
.
closeMode
==
1
)
{
if
(
data
.
closeMode
==
1
)
{
const
id
=
this
.
$store
.
getters
.
getViewMessage
(
data
.
codename
);
const
tag
=
this
.
viewname
+
'_'
+
this
.
infoGroup
+
'_'
+
data
.
codename
;
const
id
=
localStorage
.
getItem
(
tag
);
if
(
id
)
{
if
(
id
)
{
data
.
showState
=
false
;
data
.
showState
=
false
;
flag
=
false
;
flag
=
false
;
...
@@ -182,14 +216,14 @@ export default class AppAlert extends Vue {
...
@@ -182,14 +216,14 @@ export default class AppAlert extends Vue {
let
tempArr
:
any
[]
=
data
.
customClass
.
toString
().
split
(
','
);
let
tempArr
:
any
[]
=
data
.
customClass
.
toString
().
split
(
','
);
if
(
tempArr
&&
tempArr
.
length
>
0
)
{
if
(
tempArr
&&
tempArr
.
length
>
0
)
{
if
(
Object
.
is
(
"1"
,
tempArr
[
1
]))
{
if
(
Object
.
is
(
"1"
,
tempArr
[
1
]))
{
const
args
=
{
tag
:
tempArr
[
0
],
id
:
data
.
customClass
}
;
const
tag
=
this
.
viewname
+
'_'
+
this
.
infoGroup
+
'_'
+
tempArr
[
0
]
;
this
.
$store
.
commit
(
'addViewMessage'
,
arg
s
);
localStorage
.
setItem
(
tag
,
data
.
customClas
s
);
}
}
}
}
}
}
if
(
data
.
closeMode
&&
data
.
closeMode
==
1
)
{
if
(
data
.
closeMode
&&
data
.
closeMode
==
1
)
{
const
args
=
{
tag
:
data
.
codename
,
id
:
data
.
id
}
;
const
tag
=
this
.
viewname
+
'_'
+
this
.
infoGroup
+
'_'
+
data
.
codename
;
this
.
$store
.
commit
(
'addViewMessage'
,
args
);
localStorage
.
setItem
(
tag
,
data
.
id
);
}
}
}
}
...
...
app_web/src/components/app-breadcrumb/app-breadcrumb.vue
浏览文件 @
fa41b02f
<
template
>
<
template
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/
"
>
<el-breadcrumb
class=
"app-breadcrumb"
:separator=
"separator
"
>
<transition-group
name=
"breadcrumb"
>
<transition-group
name=
"breadcrumb"
>
<template
v-if=
"Object.is(this.navModel,'route')"
>
<template
v-if=
"Object.is(this.navModel,'route')"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadcrumbs"
:key=
"item.id"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadcrumbs"
:key=
"item.id"
>
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
import
{
Component
,
Vue
,
Watch
,
Prop
}
from
'vue-property-decorator'
import
{
Component
,
Vue
,
Watch
,
Prop
}
from
'vue-property-decorator'
import
{
RouteRecord
,
Route
}
from
'vue-router'
import
{
RouteRecord
,
Route
}
from
'vue-router'
import
{
Environment
}
from
"@/environments/environment"
;
import
{
Environment
}
from
"@/environments/environment"
;
import
{
appConfig
}
from
'@/config/appConfig'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
Subscription
}
from
'rxjs'
;
...
@@ -48,6 +49,13 @@ export default class Breadcrumb extends Vue {
...
@@ -48,6 +49,13 @@ export default class Breadcrumb extends Vue {
*/
*/
private
breadcrumbs
:
Array
<
any
>
=
[];
private
breadcrumbs
:
Array
<
any
>
=
[];
/**
* 面包屑分隔符
*
* @memberof Breadcrumb
*/
private
separator
:
string
=
appConfig
.
breadcrumbSeparator
;
/**
/**
* 导航服务
* 导航服务
*
*
...
...
app_web/src/components/app-form-group/app-form-group.vue
浏览文件 @
fa41b02f
...
@@ -165,7 +165,7 @@ export default class AppFormGroup extends Vue {
...
@@ -165,7 +165,7 @@ export default class AppFormGroup extends Vue {
const
_item
=
ActionModel
[
key
];
const
_item
=
ActionModel
[
key
];
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
){
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
){
let
dataActionResult
:
any
;
let
dataActionResult
:
any
;
if
(
Object
.
is
(
_item
[
'actiontarget'
],
"NONE"
)){
if
(
Object
.
is
(
_item
[
'actiontarget'
],
"NONE"
)
||
Object
.
is
(
_item
[
'actiontarget'
],
""
)
){
dataActionResult
=
UIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
dataActionResult
=
UIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
}
else
{
}
else
{
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
...
...
app_web/src/components/app-image-preview/app-image-preview.vue
浏览文件 @
fa41b02f
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</ul>
</ul>
<!-- 预览 -->
<!-- 预览 -->
<modal
v-model=
"dialogVisible"
footer-hide
width=
"auto"
class-name=
'app-image-preview-model'
>
<modal
v-model=
"dialogVisible"
footer-hide
width=
"auto"
class-name=
'app-image-preview-model'
>
<el-image
src=
"dialogImageUrl"
>
<el-image
:
src=
"dialogImageUrl"
>
<div
slot=
'error'
class=
'image-slot'
>
<div
slot=
'error'
class=
'image-slot'
>
<img
src=
"/assets/img/picture.png"
>
<img
src=
"/assets/img/picture.png"
>
</div>
</div>
...
...
app_web/src/components/app-image-upload/app-image-upload.vue
浏览文件 @
fa41b02f
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
</el-upload>
</el-upload>
<!-- 预览 -->
<!-- 预览 -->
<modal
v-model=
"dialogVisible"
footer-hide
class-name=
'app-image-upload-model'
>
<modal
v-model=
"dialogVisible"
footer-hide
class-name=
'app-image-upload-model'
>
<el-image
src=
"dialogImageUrl"
>
<el-image
:
src=
"dialogImageUrl"
>
<div
slot=
'error'
class=
'image-slot'
>
<div
slot=
'error'
class=
'image-slot'
>
<i
class=
'el-icon-picture-outline'
></i>
<i
class=
'el-icon-picture-outline'
></i>
</div>
</div>
...
...
app_web/src/components/app-picker/app-picker.vue
浏览文件 @
fa41b02f
...
@@ -65,7 +65,7 @@ export default class AppPicker extends Vue {
...
@@ -65,7 +65,7 @@ export default class AppPicker extends Vue {
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -73,7 +73,7 @@ export default class AppPicker extends Vue {
...
@@ -73,7 +73,7 @@ export default class AppPicker extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -81,15 +81,23 @@ export default class AppPicker extends Vue {
...
@@ -81,15 +81,23 @@ export default class AppPicker extends Vue {
* AC参数
* AC参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
/**
* 外键值附加数据
*
* @type {*}
* @memberof AppPicker
*/
@
Prop
()
public
pickUpData
?:
string
;
/**
/**
* 表单服务
* 表单服务
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
()
public
service
?:
any
;
@
Prop
()
public
service
?:
any
;
...
@@ -97,7 +105,7 @@ export default class AppPicker extends Vue {
...
@@ -97,7 +105,7 @@ export default class AppPicker extends Vue {
* 应用实体主信息属性名称
* 应用实体主信息属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
...
@@ -105,7 +113,7 @@ export default class AppPicker extends Vue {
...
@@ -105,7 +113,7 @@ export default class AppPicker extends Vue {
* 应用实体主键属性名称
* 应用实体主键属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
...
@@ -240,7 +248,7 @@ export default class AppPicker extends Vue {
...
@@ -240,7 +248,7 @@ export default class AppPicker extends Vue {
* 输入状态
* 输入状态
*
*
* @type {boolean}
* @type {boolean}
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
public
inputState
:
boolean
=
false
;
public
inputState
:
boolean
=
false
;
...
@@ -397,6 +405,7 @@ export default class AppPicker extends Vue {
...
@@ -397,6 +405,7 @@ export default class AppPicker extends Vue {
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]
});
}
}
this
.
fillPickUpData
(
item
);
}
}
/**
/**
...
@@ -430,6 +439,7 @@ export default class AppPicker extends Vue {
...
@@ -430,6 +439,7 @@ export default class AppPicker extends Vue {
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
}
}
this
.
fillPickUpData
();
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
...
@@ -672,6 +682,7 @@ export default class AppPicker extends Vue {
...
@@ -672,6 +682,7 @@ export default class AppPicker extends Vue {
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]?
item
[
this
.
deMajorField
]:
item
[
"srfmajortext"
]
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]?
item
[
this
.
deMajorField
]:
item
[
"srfmajortext"
]
});
}
}
this
.
fillPickUpData
(
item
);
}
}
}
}
...
@@ -752,7 +763,7 @@ export default class AppPicker extends Vue {
...
@@ -752,7 +763,7 @@ export default class AppPicker extends Vue {
/**
/**
* 输入过程中
* 输入过程中
*
*
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
public
onInput
(
$event
:
any
)
{
public
onInput
(
$event
:
any
)
{
if
(
Object
.
is
(
$event
,
this
.
value
))
{
if
(
Object
.
is
(
$event
,
this
.
value
))
{
...
@@ -784,6 +795,34 @@ export default class AppPicker extends Vue {
...
@@ -784,6 +795,34 @@ export default class AppPicker extends Vue {
}
}
}
}
/**
* 填充外键值附加数据
*
* @param {item} 数据集
* @memberof AppPicker
*/
public
fillPickUpData
(
item
?:
any
){
if
(
this
.
pickUpData
){
let
pickUpDataArray
:
Array
<
any
>
=
this
.
pickUpData
.
split
(
";"
)
if
(
pickUpDataArray
&&
pickUpDataArray
.
length
>
0
){
for
(
let
i
=
0
;
i
<
pickUpDataArray
.
length
;
i
++
){
if
(
item
){
this
.
$emit
(
"formitemvaluechange"
,
{
name
:
pickUpDataArray
[
i
],
value
:
item
[
pickUpDataArray
[
i
]],
});
}
else
{
this
.
$emit
(
"formitemvaluechange"
,
{
name
:
pickUpDataArray
[
i
],
value
:
""
,
});
}
}
}
}
}
}
}
</
script
>
</
script
>
...
...
app_web/src/components/avue-custom-form/avue-custom-form.vue
浏览文件 @
fa41b02f
...
@@ -20,10 +20,10 @@ export default class AvueCustomForm extends Vue {
...
@@ -20,10 +20,10 @@ export default class AvueCustomForm extends Vue {
/**
/**
* 编辑器参数传入组件配置
* 编辑器参数传入组件配置
*
*
* @type {
any
}
* @type {
*
}
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
@
Prop
()
public
options
?
:
any
;
public
options
:
any
;
/**
/**
* 是否需要转换为string类型
* 是否需要转换为string类型
...
@@ -47,7 +47,7 @@ export default class AvueCustomForm extends Vue {
...
@@ -47,7 +47,7 @@ export default class AvueCustomForm extends Vue {
* @type {any}
* @type {any}
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
@
Model
(
'change'
)
public
value
:
any
;
@
Model
(
"change"
)
public
value
:
any
;
/**
/**
* 是否将表单数据通过组件配置带入组件中
* 是否将表单数据通过组件配置带入组件中
...
@@ -57,13 +57,22 @@ export default class AvueCustomForm extends Vue {
...
@@ -57,13 +57,22 @@ export default class AvueCustomForm extends Vue {
*/
*/
@
Prop
()
public
isFormData
?:
boolean
;
@
Prop
()
public
isFormData
?:
boolean
;
/**
* 是否为子表单
*
* @type {boolean}
* @memberof AvueCustomForm
*/
@
Prop
()
public
isSubForm
?:
boolean
;
/**
/**
* 表单数据
* 表单数据
*
*
* @type {
any
}
* @type {
*
}
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
@
Prop
()
public
formData
:
any
;
@
Prop
()
public
formData
?:
any
;
/**
/**
* 表单状态
* 表单状态
...
@@ -84,6 +93,8 @@ export default class AvueCustomForm extends Vue {
...
@@ -84,6 +93,8 @@ export default class AvueCustomForm extends Vue {
if
(
this
.
value
)
{
if
(
this
.
value
)
{
if
(
this
.
isParseString
)
obj
=
JSON
.
parse
(
this
.
value
);
if
(
this
.
isParseString
)
obj
=
JSON
.
parse
(
this
.
value
);
else
obj
=
this
.
value
;
else
obj
=
this
.
value
;
if
(
this
.
isSubForm
&&
obj
instanceof
Array
)
obj
=
this
.
loadSubFormData
(
obj
);
}
}
return
obj
;
return
obj
;
}
}
...
@@ -110,7 +121,7 @@ export default class AvueCustomForm extends Vue {
...
@@ -110,7 +121,7 @@ export default class AvueCustomForm extends Vue {
/**
/**
* 当前组件配置设置属性
* 当前组件配置设置属性
*
*
* @type {
any
}
* @type {
*
}
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
public
formOption
:
any
=
null
;
public
formOption
:
any
=
null
;
...
@@ -118,7 +129,7 @@ export default class AvueCustomForm extends Vue {
...
@@ -118,7 +129,7 @@ export default class AvueCustomForm extends Vue {
/**
/**
* avue-form默认配置
* avue-form默认配置
*
*
* @type {
any
}
* @type {
*
}
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
public
defaultOptions
:
any
=
{
public
defaultOptions
:
any
=
{
...
@@ -185,22 +196,26 @@ export default class AvueCustomForm extends Vue {
...
@@ -185,22 +196,26 @@ export default class AvueCustomForm extends Vue {
*
*
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
public
load
()
{
public
async
load
()
{
let
that
:
any
=
this
;
let
that
:
any
=
this
;
if
(
!
this
.
options
&&
this
.
options
==
null
)
{
if
(
!
this
.
options
&&
this
.
options
==
null
)
{
if
(
this
.
url
&&
this
.
options
==
null
)
{
if
(
this
.
url
&&
this
.
options
==
null
)
{
const
get
:
Promise
<
any
>
=
this
.
$http
.
get
(
this
.
url
);
const
get
:
Promise
<
any
>
=
this
.
$http
.
get
(
this
.
url
);
get
.
then
((
response
:
any
)
=>
{
await
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
data
)
{
if
(
response
&&
response
.
data
)
{
that
.
formOption
=
response
.
data
;
let
options
:
any
=
response
.
data
;
if
(
this
.
isFormData
)
that
.
getFormData
();
this
.
transitionDicUrlCondition
(
options
);
that
.
formOption
=
options
;
if
(
that
.
isFormData
)
that
.
getFormData
();
}
}
});
});
}
else
{
}
else
{
this
.
transitionDicUrlCondition
(
this
.
defaultOptions
);
this
.
formOption
=
this
.
defaultOptions
;
this
.
formOption
=
this
.
defaultOptions
;
if
(
this
.
isFormData
)
that
.
getFormData
();
if
(
this
.
isFormData
)
that
.
getFormData
();
}
}
}
else
{
}
else
{
this
.
transitionDicUrlCondition
(
this
.
options
);
this
.
formOption
=
this
.
options
;
this
.
formOption
=
this
.
options
;
if
(
this
.
isFormData
)
that
.
getFormData
();
if
(
this
.
isFormData
)
that
.
getFormData
();
}
}
...
@@ -239,18 +254,77 @@ export default class AvueCustomForm extends Vue {
...
@@ -239,18 +254,77 @@ export default class AvueCustomForm extends Vue {
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
public
setValue
(
value
:
any
)
{
public
setValue
(
value
:
any
)
{
if
(
this
.
isSubForm
)
value
=
this
.
getSubFormData
(
value
);
if
(
this
.
isParseString
)
this
.
$emit
(
"change"
,
JSON
.
stringify
(
value
));
if
(
this
.
isParseString
)
this
.
$emit
(
"change"
,
JSON
.
stringify
(
value
));
else
this
.
$emit
(
"change"
,
value
);
else
this
.
$emit
(
"change"
,
value
);
}
}
/**
* 提取第一个属性值
*
* @memberof AvueCustomForm
* @return {Array<any>}
*/
public
getSubFormData
(
value
:
any
):
Array
<
any
>
{
let
arr
:
Array
<
any
>
=
[];
for
(
let
val
in
value
)
{
arr
=
value
[
val
];
break
;
}
return
arr
;
}
/**
* 加载子表单值
*
* @memberof AvueCustomForm
* @return {*}
*/
public
loadSubFormData
(
arr
:
Array
<
any
>
):
any
{
let
value
:
any
=
{};
value
[
this
.
formOption
.
column
[
0
].
prop
]
=
arr
;
return
value
;
}
/**
* 配置的下拉列表转换符号支持动态配置
*
* @memberof AvueCustomForm
* @param {*}
*/
public
transitionDicUrlCondition
(
options
:
any
)
{
let
that
:
any
=
this
;
let
recursive
:
any
=
function
(
obj
:
any
)
{
if
(
obj
.
column
&&
obj
.
column
.
length
>
0
)
{
obj
.
column
.
forEach
((
col
:
any
)
=>
{
if
(
col
.
dicUrl
&&
col
.
dicUrl
.
indexOf
(
"$"
)
>
0
)
{
let
g
=
/
\$
{
[^
+
]
+}/
;
let
dicGroup
=
col
.
dicUrl
.
match
(
g
);
dicGroup
.
forEach
((
dic
:
any
)
=>
{
col
.
dicUrl
=
col
.
dicUrl
.
replace
(
dic
,
that
.
formData
[
dic
.
substring
(
2
,
dic
.
length
-
1
)]
);
});
}
if
(
col
.
children
)
recursive
(
col
.
children
);
if
(
col
.
group
)
recursive
(
col
.
group
);
});
}
if
(
obj
.
children
)
recursive
(
obj
.
children
);
if
(
obj
.
group
)
recursive
(
obj
.
group
);
};
recursive
(
options
);
}
/**
/**
* 销毁组件(vue生命周期)
* 销毁组件(vue生命周期)
*
*
* @type {Subject<any>}
* @type {Subject<any>}
* @memberof AvueCustomForm
* @memberof AvueCustomForm
*/
*/
public
destroy
(){
public
destroy
()
{
if
(
this
.
formStateEvent
)
{
if
(
this
.
formStateEvent
)
{
this
.
formStateEvent
.
unsubscribe
();
this
.
formStateEvent
.
unsubscribe
();
}
}
}
}
...
...
app_web/src/components/disk-file-upload/disk-file-upload.vue
浏览文件 @
fa41b02f
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
:headers=
"myHeaders"
:headers=
"myHeaders"
:file-list=
"uploadFileList"
:file-list=
"uploadFileList"
:show-file-list=
"false"
:show-file-list=
"false"
:limit=
"limit"
:http-request=
"customUploadFile"
>
:http-request=
"customUploadFile"
>
<div>
<div>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
...
@@ -20,7 +19,6 @@
...
@@ -20,7 +19,6 @@
<span>
{{
$t
(
'components.diskFileUpload.fileDrag'
)
}}
</span>
<span>
{{
$t
(
'components.diskFileUpload.fileDrag'
)
}}
</span>
<span
style=
"color:#409EFF;"
>
{{
$t
(
'components.diskFileUpload.clickUpload'
)
}}
</span>
<span
style=
"color:#409EFF;"
>
{{
$t
(
'components.diskFileUpload.clickUpload'
)
}}
</span>
</div>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
{{
uploadTip
}}
</div>
</div>
</div>
</el-upload>
</el-upload>
</el-col>
</el-col>
...
@@ -34,10 +32,10 @@
...
@@ -34,10 +32,10 @@
:headers=
"myHeaders"
:headers=
"myHeaders"
:file-list=
"uploadFileList"
:file-list=
"uploadFileList"
:show-file-list=
"false"
:show-file-list=
"false"
:limit=
"limit"
:http-request=
"customUploadFile"
>
:http-request=
"customUploadFile"
>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-upload"
>
{{
$t
(
'components.diskFileUpload.clickUpload'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-upload"
>
<div
slot=
"tip"
class=
"el-upload__tip"
>
{{
uploadTip
}}
</div>
{{
$t
(
'components.diskFileUpload.clickUpload'
)
}}
</el-button>
</el-upload>
</el-upload>
</el-col>
</el-col>
<!--文件操作-->
<!--文件操作-->
...
@@ -47,8 +45,11 @@
...
@@ -47,8 +45,11 @@
<span>
{{
item
.
name
}}
</span>
<span>
{{
item
.
name
}}
</span>
</div>
</div>
<div
class=
"fileMain"
>
<div
class=
"fileMain"
>
<el-link
type=
"success"
icon=
"el-icon-download"
@
click=
"onDownload(item)"
>
{{
$t
(
'components.diskFileUpload.load'
)
}}
</el-link>
<el-link
type=
"success"
icon=
"el-icon-download"
@
click=
"onDownload(item)"
>
<el-link
type=
"warning"
icon=
"el-icon-view"
v-show=
"showPreview"
@
click=
"onPreview(item)"
>
{{
$t
(
'components.diskFileUpload.preview'
)
}}
{{
$t
(
'components.diskFileUpload.load'
)
}}
</el-link>
<el-link
type=
"warning"
icon=
"el-icon-view"
v-show=
"showPreview"
@
click=
"onPreview(item)"
>
{{
$t
(
'components.diskFileUpload.preview'
)
}}
</el-link>
</el-link>
<el-link
type=
"primary"
icon=
"el-icon-edit"
<el-link
type=
"primary"
icon=
"el-icon-edit"
v-show=
"showEdit && (item.name.match(/^.+\.(doc|DOC|docx|DOCX|wps|WPS|xls|XLS|xlsx|XLSX|ppt|PPT|et|ET)$/))"
v-show=
"showEdit && (item.name.match(/^.+\.(doc|DOC|docx|DOCX|wps|WPS|xls|XLS|xlsx|XLSX|ppt|PPT|et|ET)$/))"
...
@@ -58,21 +59,40 @@
...
@@ -58,21 +59,40 @@
v-show=
"showOcrview && (item.name.match(/^.+\.(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|bmp|BMP|pdf|PDF)$/))"
v-show=
"showOcrview && (item.name.match(/^.+\.(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|bmp|BMP|pdf|PDF)$/))"
@
click=
"onOcr(item)"
>
OCR
@
click=
"onOcr(item)"
>
OCR
</el-link>
</el-link>
<el-link
type=
"danger"
icon=
"el-icon-delete"
@
click=
"onRemove(item,index)"
>
{{
$t
(
'components.diskFileUpload.delete'
)
}}
</el-link>
<el-link
type=
"danger"
icon=
"el-icon-delete"
@
click=
"onRemove(item,index)"
>
{{
$t
(
'components.diskFileUpload.delete'
)
}}
</el-link>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<!-- 自定义弹框 -->
<div
class=
"dialogDiv"
>
<el-dialog
:title=
"dialogTitle"
center
width=
"70%"
top=
"5vh"
:visible=
"showDialog"
:close-on-click-modal=
"true"
:show-close=
"true"
:before-close=
"dialogClose"
:modal-append-to-body=
"false"
>
<div
style=
"height: 100%;"
>
<iframe
id=
"fileIframe"
:src=
"iframeUrl"
frameborder=
"0"
width=
"100%"
></iframe>
</div>
</el-dialog>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Button
,
Row
,
Col
,
Link
,
Icon
,
Upload
,
Message
,
MessageBox
}
from
'element-ui'
;
import
{
Button
,
Row
,
Col
,
Link
,
Icon
,
Upload
,
Message
,
MessageBox
}
from
'element-ui'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
{
Subject
,
Unsubscribable
}
from
'rxjs'
;
import
{
Subject
,
Unsubscribable
}
from
'rxjs'
;
@
Component
({})
@
Component
({})
export
default
class
DiskFileUpload
extends
Vue
{
export
default
class
DiskFileUpload
extends
Vue
{
/**
/**
* 当前表单对象
* 当前表单对象
...
@@ -170,22 +190,6 @@ export default class DiskFileUpload extends Vue {
...
@@ -170,22 +190,6 @@ export default class DiskFileUpload extends Vue {
*/
*/
@
Prop
({
default
:
false
})
public
showOcrview
?:
boolean
;
@
Prop
({
default
:
false
})
public
showOcrview
?:
boolean
;
/**
* 单文件大小
*
* @type {number}
* @memberof DiskFileUpload
*/
@
Prop
({
default
:
1
})
public
size
!
:
number
;
/**
* 文件上传个数
*
* @type {number}
* @memberof DiskFileUpload
*/
@
Prop
({
default
:
5
})
public
limit
!
:
number
;
/**
/**
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
*
*
...
@@ -194,15 +198,6 @@ export default class DiskFileUpload extends Vue {
...
@@ -194,15 +198,6 @@ export default class DiskFileUpload extends Vue {
*/
*/
public
srfuf
:
string
=
'0'
;
public
srfuf
:
string
=
'0'
;
/**
* 上传提示语
*
* @type {string}
* @memberof DiskFileUpload
*/
get
uploadTip
():
string
{
return
this
.
$t
(
'components.diskFileUpload.clues'
)
+
this
.
size
.
toString
()
+
"M,"
+
this
.
$t
(
'components.diskFileUpload.clues1'
)
+
this
.
limit
;
}
/**
/**
* 文件列表
* 文件列表
...
@@ -252,14 +247,50 @@ export default class DiskFileUpload extends Vue {
...
@@ -252,14 +247,50 @@ export default class DiskFileUpload extends Vue {
*/
*/
public
isCreate
:
boolean
=
true
;
public
isCreate
:
boolean
=
true
;
/**
* 自定义弹框标题
*
* @type {*}
* @memberof DiskFileUpload
*/
public
dialogTitle
:
any
=
''
;
/**
* 是否显示自定义弹框
*
* @type {boolean}
* @memberof DiskFileUpload
*/
public
showDialog
:
boolean
=
false
;
/**
* 嵌入自定义弹框中iframe的url
*
* @type {*}
* @memberof DiskFileUpload
*/
public
iframeUrl
:
any
=
''
;
/**
* 关闭自定义弹框
*
* @memberof DiskFileUpload
*/
public
dialogClose
()
{
this
.
dialogTitle
=
''
;
this
.
showDialog
=
false
;
this
.
iframeUrl
=
''
;
let
iframe
:
any
=
document
.
getElementById
(
"fileIframe"
);
iframe
.
parentNode
.
removeChild
(
"fileIframe"
);
}
/**
/**
* 拼接上传路径
* 拼接上传路径
*
*
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
getAction
()
{
public
getAction
()
{
const
uploadUrl
=
'/net-disk/upload/'
+
this
.
getFolder
()
+
'?ownertype='
+
this
.
getOwnertype
()
+
'&ownerid='
+
this
.
getOwnerid
();
return
'/net-disk/upload/'
+
this
.
getFolder
()
+
'?ownertype='
+
this
.
getOwnertype
()
+
'&ownerid='
+
this
.
getOwnerid
();
return
uploadUrl
;
}
}
/**
/**
...
@@ -268,8 +299,7 @@ export default class DiskFileUpload extends Vue {
...
@@ -268,8 +299,7 @@ export default class DiskFileUpload extends Vue {
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
getFolder
()
{
public
getFolder
()
{
const
folder
=
typeof
this
.
folder
==
"string"
?
this
.
folder
:
JSON
.
stringify
(
this
.
folder
);
return
typeof
this
.
folder
==
"string"
?
this
.
folder
:
JSON
.
stringify
(
this
.
folder
);
return
folder
;
}
}
/**
/**
...
@@ -278,8 +308,7 @@ export default class DiskFileUpload extends Vue {
...
@@ -278,8 +308,7 @@ export default class DiskFileUpload extends Vue {
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
getOwnertype
()
{
public
getOwnertype
()
{
const
ownertype
=
typeof
this
.
ownertype
==
"string"
?
this
.
ownertype
:
JSON
.
stringify
(
this
.
ownertype
);
return
typeof
this
.
ownertype
==
"string"
?
this
.
ownertype
:
JSON
.
stringify
(
this
.
ownertype
);
return
ownertype
;
}
}
/**
/**
...
@@ -288,16 +317,15 @@ export default class DiskFileUpload extends Vue {
...
@@ -288,16 +317,15 @@ export default class DiskFileUpload extends Vue {
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
getOwnerid
()
{
public
getOwnerid
()
{
const
ownerid
=
typeof
this
.
ownerid
==
"string"
?
this
.
ownerid
:
JSON
.
stringify
(
this
.
ownerid
);
return
typeof
this
.
ownerid
==
"string"
?
this
.
ownerid
:
JSON
.
stringify
(
this
.
ownerid
);
return
ownerid
;
}
}
/**
/**
*
* vue创建
*
*
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
created
()
{
public
created
()
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
((
$event
:
any
)
=>
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
((
$event
:
any
)
=>
{
// 表单加载完成
// 表单加载完成
if
(
Object
.
is
(
$event
.
type
,
'load'
))
{
if
(
Object
.
is
(
$event
.
type
,
'load'
))
{
...
@@ -325,7 +353,7 @@ export default class DiskFileUpload extends Vue {
...
@@ -325,7 +353,7 @@ export default class DiskFileUpload extends Vue {
if
(
Object
.
is
(
$event
.
type
,
'save'
))
{
if
(
Object
.
is
(
$event
.
type
,
'save'
))
{
// 批量更新文件表中的ownerid
// 批量更新文件表中的ownerid
if
(
this
.
isUpdateBatch
==
true
&&
this
.
uploadFileList
.
length
>
0
)
{
if
(
this
.
isUpdateBatch
==
true
&&
this
.
uploadFileList
.
length
>
0
)
{
this
.
updateFileBatch
(
this
.
uploadFileList
,
'update'
);
this
.
updateFileBatch
(
this
.
uploadFileList
);
}
}
}
}
});
});
...
@@ -336,9 +364,9 @@ export default class DiskFileUpload extends Vue {
...
@@ -336,9 +364,9 @@ export default class DiskFileUpload extends Vue {
*
*
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
getFiles
()
{
public
getFiles
()
{
// 拼接url
// 拼接url
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
const
getUrl
=
'/net-disk/files/'
+
this
.
getFolder
();
const
getUrl
=
'/net-disk/files/'
+
this
.
getFolder
();
// 发送get请求
// 发送get请求
Axios
.
get
(
getUrl
,
{
Axios
.
get
(
getUrl
,
{
...
@@ -346,9 +374,9 @@ export default class DiskFileUpload extends Vue {
...
@@ -346,9 +374,9 @@ export default class DiskFileUpload extends Vue {
ownertype
:
this
.
getOwnertype
(),
ownertype
:
this
.
getOwnertype
(),
ownerid
:
this
.
getOwnerid
(),
ownerid
:
this
.
getOwnerid
(),
},
},
}).
then
(
response
=>
{
}).
then
(
(
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.getFileFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.getFileFailure'
)
+
'!'
);
return
;
return
;
}
}
// 返回的是一个jsonArray
// 返回的是一个jsonArray
...
@@ -358,8 +386,8 @@ export default class DiskFileUpload extends Vue {
...
@@ -358,8 +386,8 @@ export default class DiskFileUpload extends Vue {
this
.
uploadFileList
.
push
.
apply
(
this
.
uploadFileList
,
files
);
this
.
uploadFileList
.
push
.
apply
(
this
.
uploadFileList
,
files
);
}
}
}
}
}).
catch
(
error
=>
{
}).
catch
(
(
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.getFileFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.getFileFailure'
)
+
':'
+
error
);
});
});
}
}
...
@@ -373,21 +401,15 @@ export default class DiskFileUpload extends Vue {
...
@@ -373,21 +401,15 @@ export default class DiskFileUpload extends Vue {
// 上传的文件
// 上传的文件
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
let
file
=
param
.
file
;
let
file
=
param
.
file
;
// 文件大小
const
isSize
=
file
.
size
/
1024
/
1024
<
this
.
size
;
if
(
!
isSize
)
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.loadFailure1'
)
+
_this
.
size
.
toString
()
+
"M!"
);
return
;
}
// formData传参
// formData传参
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
formData
.
append
(
'file'
,
file
);
// 拼接url
// 拼接url
const
uploadUrl
=
this
.
getAction
();
const
uploadUrl
=
this
.
getAction
();
// 发送post请求
// 发送post请求
Axios
.
post
(
uploadUrl
,
formData
,
{
timeout
:
2000
}).
then
(
response
=>
{
Axios
.
post
(
uploadUrl
,
formData
,
{
timeout
:
2000
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.loadFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.loadFailure'
)
+
'!'
);
}
}
// 返回的是一个jsonobject
// 返回的是一个jsonobject
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -403,8 +425,8 @@ export default class DiskFileUpload extends Vue {
...
@@ -403,8 +425,8 @@ export default class DiskFileUpload extends Vue {
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
formItemName
,
value
:
value
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
formItemName
,
value
:
value
});
}
}
}
}
}).
catch
(
err
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.loadFailure'
)
+
':'
+
er
r
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.loadFailure'
)
+
':'
+
erro
r
);
})
})
}
}
...
@@ -423,12 +445,12 @@ export default class DiskFileUpload extends Vue {
...
@@ -423,12 +445,12 @@ export default class DiskFileUpload extends Vue {
// 发送get请求
// 发送get请求
Axios
.
get
(
downloadUrl
,
{
Axios
.
get
(
downloadUrl
,
{
headers
:
{
headers
:
{
'authcode'
:
item
.
authcode
'authcode'
:
item
.
authcode
,
},
},
responseType
:
'arraybuffer'
,
responseType
:
'arraybuffer'
,
}).
then
(
response
=>
{
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.downloadFile'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.downloadFile'
)
+
'!'
);
return
;
return
;
}
}
// 请求成功,后台返回的是一个文件流
// 请求成功,后台返回的是一个文件流
...
@@ -437,13 +459,17 @@ export default class DiskFileUpload extends Vue {
...
@@ -437,13 +459,17 @@ export default class DiskFileUpload extends Vue {
const
disposition
=
response
.
headers
[
'content-disposition'
];
const
disposition
=
response
.
headers
[
'content-disposition'
];
const
filename
=
disposition
.
split
(
'filename='
)[
1
];
const
filename
=
disposition
.
split
(
'filename='
)[
1
];
// 用blob对象获取文件流
// 用blob对象获取文件流
var
blob
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
[
'content-type'
]});
let
blob
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
[
'content-type'
]});
//
创建下载链接
// 通过文件流
创建下载链接
var
href
=
URL
.
createObjectURL
(
blob
);
var
href
=
URL
.
createObjectURL
(
blob
);
// 创建一个a元素并设置相关属性
// 创建一个a元素并设置相关属性
var
a
=
document
.
createElement
(
'a'
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
href
;
a
.
href
=
href
;
if
(
name
)
{
a
.
download
=
name
;
}
else
{
a
.
download
=
filename
;
a
.
download
=
filename
;
}
// 添加a元素到当前网页
// 添加a元素到当前网页
document
.
body
.
appendChild
(
a
);
document
.
body
.
appendChild
(
a
);
// 触发a元素的点击事件,实现下载
// 触发a元素的点击事件,实现下载
...
@@ -455,8 +481,8 @@ export default class DiskFileUpload extends Vue {
...
@@ -455,8 +481,8 @@ export default class DiskFileUpload extends Vue {
}
else
{
}
else
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.downloadFile1'
));
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.downloadFile1'
));
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.downloadFile'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.downloadFile'
)
+
':'
+
error
);
});
});
}
}
...
@@ -470,9 +496,20 @@ export default class DiskFileUpload extends Vue {
...
@@ -470,9 +496,20 @@ export default class DiskFileUpload extends Vue {
// 拼接url
// 拼接url
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
name
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
name
);
const
previewUrl
=
'/net-disk/preview/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
item
.
authcode
;
let
previewUrl
=
'/net-disk/preview/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
item
.
authcode
;
// 新窗口打开url
Axios
.
get
(
previewUrl
).
then
((
response
:
any
)
=>
{
window
.
open
(
previewUrl
);
if
(
!
response
||
response
.
status
!=
200
)
{
return
;
}
// 返回一个url,通过自定义弹框打开
if
(
response
.
data
)
{
this
.
dialogTitle
=
name
;
this
.
showDialog
=
true
;
this
.
iframeUrl
=
response
.
data
;
}
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
error
);
});
}
}
/**
/**
...
@@ -485,8 +522,8 @@ export default class DiskFileUpload extends Vue {
...
@@ -485,8 +522,8 @@ export default class DiskFileUpload extends Vue {
// 拼接url
// 拼接url
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
name
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
name
);
const
editUrl
=
'/net-disk/edit
/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
item
.
authcode
;
const
editUrl
=
'/net-disk/editview
/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
item
.
authcode
;
// 新窗口打开url
// TODO:暂时用window.open
window
.
open
(
editUrl
);
window
.
open
(
editUrl
);
}
}
...
@@ -501,8 +538,19 @@ export default class DiskFileUpload extends Vue {
...
@@ -501,8 +538,19 @@ export default class DiskFileUpload extends Vue {
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
name
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
name
);
const
ocrUrl
=
'/net-disk/ocrview/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
item
.
authcode
;
const
ocrUrl
=
'/net-disk/ocrview/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
item
.
authcode
;
// 新窗口打开url
Axios
.
get
(
ocrUrl
).
then
((
response
:
any
)
=>
{
window
.
open
(
ocrUrl
);
if
(
!
response
||
response
.
status
!=
200
)
{
return
;
}
// 返回一个url,通过自定义弹框打开
if
(
response
.
data
)
{
this
.
dialogTitle
=
name
;
this
.
showDialog
=
true
;
this
.
iframeUrl
=
response
.
data
;
}
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
error
);
});
}
}
/**
/**
...
@@ -513,7 +561,7 @@ export default class DiskFileUpload extends Vue {
...
@@ -513,7 +561,7 @@ export default class DiskFileUpload extends Vue {
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
onRemove
(
item
:
any
,
index
:
number
)
{
public
onRemove
(
item
:
any
,
index
:
number
)
{
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
if
(
item
)
{
if
(
item
)
{
MessageBox
.
confirm
(
_this
.
$t
(
'components.diskFileUpload.deleteFile'
),
_this
.
$t
(
'components.diskFileUpload.deleteFilePrompt'
),
{
MessageBox
.
confirm
(
_this
.
$t
(
'components.diskFileUpload.deleteFile'
),
_this
.
$t
(
'components.diskFileUpload.deleteFilePrompt'
),
{
confirmButtonText
:
_this
.
$t
(
'components.diskFileUpload.true'
),
confirmButtonText
:
_this
.
$t
(
'components.diskFileUpload.true'
),
...
@@ -523,9 +571,9 @@ export default class DiskFileUpload extends Vue {
...
@@ -523,9 +571,9 @@ export default class DiskFileUpload extends Vue {
// 拼接url
// 拼接url
const
deleteUrl
=
'/net-disk/files/'
+
item
.
id
;
const
deleteUrl
=
'/net-disk/files/'
+
item
.
id
;
// 发送delete请求
// 发送delete请求
Axios
.
delete
(
deleteUrl
).
then
(
response
=>
{
Axios
.
delete
(
deleteUrl
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.deleteFileFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.deleteFileFailure'
)
+
'!'
);
}
}
// 从文件列表中删除
// 从文件列表中删除
this
.
uploadFileList
.
splice
(
index
,
1
);
this
.
uploadFileList
.
splice
(
index
,
1
);
...
@@ -534,9 +582,9 @@ export default class DiskFileUpload extends Vue {
...
@@ -534,9 +582,9 @@ export default class DiskFileUpload extends Vue {
const
value
=
JSON
.
stringify
(
this
.
uploadFileList
);
const
value
=
JSON
.
stringify
(
this
.
uploadFileList
);
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
formItemName
,
value
:
value
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
formItemName
,
value
:
value
});
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
// 提示删除失败
// 提示删除失败
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.deleteFileFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.deleteFileFailure'
)
+
':'
+
error
);
});
});
});
});
}
}
...
@@ -547,8 +595,8 @@ export default class DiskFileUpload extends Vue {
...
@@ -547,8 +595,8 @@ export default class DiskFileUpload extends Vue {
*
*
* @memberof DiskFileUpload
* @memberof DiskFileUpload
*/
*/
public
updateFileBatch
(
files
:
any
,
opt
:
any
)
{
public
updateFileBatch
(
files
:
any
)
{
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
// 拼接url
// 拼接url
const
updateUrl
=
'/net-disk/files/'
+
this
.
getFolder
()
+
'?ownertype='
+
this
.
getOwnertype
()
+
"&ownerid="
+
this
.
getOwnerid
();
const
updateUrl
=
'/net-disk/files/'
+
this
.
getFolder
()
+
'?ownertype='
+
this
.
getOwnertype
()
+
"&ownerid="
+
this
.
getOwnerid
();
// requestBody参数
// requestBody参数
...
@@ -562,69 +610,93 @@ export default class DiskFileUpload extends Vue {
...
@@ -562,69 +610,93 @@ export default class DiskFileUpload extends Vue {
"Content-Type"
:
"application/json;charset=UTF-8"
"Content-Type"
:
"application/json;charset=UTF-8"
},
},
timeout
:
2000
timeout
:
2000
}).
then
(
response
=>
{
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.updateFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.updateFailure'
)
+
'!'
);
return
;
return
;
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.updateFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskFileUpload.updateFailure'
)
+
':'
+
error
);
});
});
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
#file-upload {
#file-upload {
width: auto;
width: auto;
height: auto;
height: auto;
border: 0px solid black;
border: 0px solid black;
}
}
#el-row {
#el-row {
border: 0px solid red;
border: 0px solid red;
width: 400px;
width: 400px;
}
}
.withDrag {
.withDrag {
border: 0px solid grey;
border: 0px solid grey;
width: 400px;
width: 400px;
}
}
.withoutDrag {
.withoutDrag {
border: 0px solid grey;
border: 0px solid grey;
width: 400px;
width: 400px;
text-align: left;
text-align: left;
padding-left: 0px;
padding-left: 0px;
padding-top: 0px;
padding-top: 0px;
margin-top: 0px;
margin-top: 0px;
}
}
.el-upload__tip {
margin-top: 0px;
}
.fileList {
.fileList {
width: 400px;
width: 400px;
border: 0px solid grey;
border: 0px solid grey;
margin-top: 0px;
margin-top: 0px;
}
}
.fileTitle {
.fileTitle {
text-align: left;
text-align: left;
margin-left: 0px;
margin-left: 0px;
}
}
.fileTitle i {
.fileTitle i {
margin-right: 5px;
margin-right: 5px;
}
}
.fileMain {
.fileMain {
text-align: left;
text-align: left;
margin-left: 0px;
margin-left: 0px;
margin-top: -10px;
margin-top: -10px;
}
}
.fileMain .el-link:nth-child(n+2) {
.fileMain .el-link:nth-child(n+2) {
margin-left: 10px;
margin-left: 10px;
}
}
.dialogDiv {
// el-dialog头部
.el-dialog__header {
height: 40px;
}
// el-dialog面板
.el-dialog__wrapper {
height: 90vh;
overflow: visible;
}
// el-dialog
.el-dialog {
height: 100%;
}
// el-dailog内容
.el-dialog__body {
height: inherit;
}
#fileIframe {
height: calc(100% - 40px);
}
}
</
style
>
</
style
>
\ No newline at end of file
app_web/src/components/disk-image-upload/disk-image-upload.vue
浏览文件 @
fa41b02f
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
list-type=
"picture-card"
list-type=
"picture-card"
:action=
"getAction()"
:action=
"getAction()"
:headers=
"myHeaders"
:headers=
"myHeaders"
:limit=
"limit"
:before-upload=
"beforeUpload"
:before-upload=
"beforeUpload"
:http-request=
"customImageUpload"
>
:http-request=
"customImageUpload"
>
<i
class=
"el-icon-plus"
></i>
<i
class=
"el-icon-plus"
></i>
...
@@ -15,40 +14,62 @@
...
@@ -15,40 +14,62 @@
<img
class=
"el-upload-list__item-thumbnail"
:src=
"file.url"
>
<img
class=
"el-upload-list__item-thumbnail"
:src=
"file.url"
>
<span
class=
"el-upload-list__item-actions"
>
<span
class=
"el-upload-list__item-actions"
>
<!--预览按钮-->
<!--预览按钮-->
<span
class=
"el-upload-list__item-preview"
@
click=
"onPreview(file)"
:title=
"$t('components.diskImageUpload.preview')"
<span
class=
"el-upload-list__item-preview"
@
click=
"onPreview(file)"
:title=
"$t('components.diskImageUpload.preview')"
v-show=
"showPreview"
>
v-show=
"showPreview"
>
<i
class=
"el-icon-view"
></i>
<i
class=
"el-icon-view"
></i>
</span>
</span>
<!--OCR按钮-->
<!--OCR按钮-->
<span
class=
"el-upload-list__item-delete"
@
click=
"onOcr(file)"
:title=
"$t('components.diskImageUpload.OCRdiscern')"
<span
class=
"el-upload-list__item-delete"
@
click=
"onOcr(file)"
:title=
"$t('components.diskImageUpload.OCRdiscern')"
v-show=
"showOcrview && (file.name.match(/^.+\.(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|bmp|BMP)$/))"
>
v-show=
"showOcrview && (file.name.match(/^.+\.(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|bmp|BMP)$/))"
>
<i
class=
"el-icon-camera"
></i>
<i
class=
"el-icon-camera"
></i>
</span>
</span>
<!--下载按钮-->
<!--下载按钮-->
<span
class=
"el-upload-list__item-delete"
@
click=
"onDownload(file)"
:title=
"$t('components.diskImageUpload.load')"
>
<span
class=
"el-upload-list__item-delete"
@
click=
"onDownload(file)"
:title=
"$t('components.diskImageUpload.load')"
>
<i
class=
"el-icon-download"
></i>
<i
class=
"el-icon-download"
></i>
</span>
</span>
<!--删除按钮-->
<!--删除按钮-->
<span
class=
"el-upload-list__item-delete"
@
click=
"onRemove(file)"
:title=
"$t('components.diskImageUpload.delete')"
>
<span
class=
"el-upload-list__item-delete"
@
click=
"onRemove(file)"
:title=
"$t('components.diskImageUpload.delete')"
>
<i
class=
"el-icon-delete"
></i>
<i
class=
"el-icon-delete"
></i>
</span>
</span>
</span>
</span>
</div>
</div>
</el-upload>
</el-upload>
<!-- 预览弹框 -->
<el-dialog
:visible
.
sync=
"dialogVisible"
:modal=
"false"
>
<el-dialog
:visible
.
sync=
"dialogVisible"
:modal=
"false"
>
<img
width=
"100%"
:src=
"dialogImageUrl"
alt=
""
>
<img
width=
"100%"
:src=
"dialogImageUrl"
alt=
""
>
</el-dialog>
</el-dialog>
<!-- 自定义弹框 -->
<div
class=
"dialogDiv"
>
<el-dialog
:title=
"dialogTitle"
center
width=
"70%"
top=
"5vh"
:visible=
"showDialog"
:close-on-click-modal=
"true"
:show-close=
"true"
:before-close=
"dialogClose"
:modal-append-to-body=
"false"
>
<div
style=
"height: 100%;"
>
<iframe
id=
"fileIframe"
:src=
"iframeUrl"
frameborder=
"0"
width=
"100%"
></iframe>
</div>
</el-dialog>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Message
,
MessageBox
}
from
'element-ui'
;
import
{
Message
,
MessageBox
}
from
'element-ui'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
{
Subject
,
Unsubscribable
}
from
'rxjs'
;
import
{
Subject
,
Unsubscribable
}
from
'rxjs'
;
@
Component
({})
@
Component
({})
export
default
class
DiskImageUplaod
extends
Vue
{
export
default
class
DiskImageUplaod
extends
Vue
{
/**
/**
* 当前表单对象
* 当前表单对象
...
@@ -131,21 +152,6 @@ export default class DiskImageUplaod extends Vue {
...
@@ -131,21 +152,6 @@ export default class DiskImageUplaod extends Vue {
*/
*/
@
Prop
({
default
:
false
})
public
showOcrview
?:
boolean
;
@
Prop
({
default
:
false
})
public
showOcrview
?:
boolean
;
/**
* 单文件大小
*
* @type {number}
* @memberof DiskImageUplaod
*/
@
Prop
({
default
:
1
})
public
size
!
:
number
;
/**
* 文件上传个数
*
* @type {number}
* @memberof DiskImageUplaod
*/
@
Prop
({
default
:
5
})
public
limit
!
:
number
;
/**
/**
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
...
@@ -227,6 +233,43 @@ export default class DiskImageUplaod extends Vue {
...
@@ -227,6 +233,43 @@ export default class DiskImageUplaod extends Vue {
*/
*/
public
imageFileids
:
Array
<
any
>
=
[];
public
imageFileids
:
Array
<
any
>
=
[];
/**
* 自定义弹框标题
*
* @type {*}
* @memberof DiskImageUplaod
*/
public
dialogTitle
:
any
=
''
;
/**
* 是否显示自定义弹框
*
* @type {boolean}
* @memberof DiskImageUplaod
*/
public
showDialog
:
boolean
=
false
;
/**
* 嵌入自定义弹框中iframe的url
*
* @type {*}
* @memberof DiskImageUplaod
*/
public
iframeUrl
:
any
=
''
;
/**
* 关闭自定义弹框
*
* @memberof DiskImageUplaod
*/
public
dialogClose
()
{
this
.
dialogTitle
=
''
;
this
.
showDialog
=
false
;
this
.
iframeUrl
=
''
;
let
iframe
:
any
=
document
.
getElementById
(
"fileIframe"
);
iframe
.
parentNode
.
removeChild
(
"fileIframe"
);
}
/**
/**
* 拼接上传路径
* 拼接上传路径
*
*
...
@@ -264,7 +307,7 @@ export default class DiskImageUplaod extends Vue {
...
@@ -264,7 +307,7 @@ export default class DiskImageUplaod extends Vue {
}
}
/**
/**
* vue生命周期create
* vue创建
*
*
* @memberof DiskImageUplaod
* @memberof DiskImageUplaod
*/
*/
...
@@ -312,7 +355,7 @@ export default class DiskImageUplaod extends Vue {
...
@@ -312,7 +355,7 @@ export default class DiskImageUplaod extends Vue {
*/
*/
public
getFiles
()
{
public
getFiles
()
{
// 拼接url
// 拼接url
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
const
getUrl
=
'/net-disk/files/'
+
this
.
getFolder
();
const
getUrl
=
'/net-disk/files/'
+
this
.
getFolder
();
// 发送get请求
// 发送get请求
Axios
.
get
(
getUrl
,
{
Axios
.
get
(
getUrl
,
{
...
@@ -320,9 +363,9 @@ export default class DiskImageUplaod extends Vue {
...
@@ -320,9 +363,9 @@ export default class DiskImageUplaod extends Vue {
ownertype
:
this
.
getOwnertype
(),
ownertype
:
this
.
getOwnertype
(),
ownerid
:
this
.
getOwnerid
(),
ownerid
:
this
.
getOwnerid
(),
},
},
}).
then
(
response
=>
{
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.getImageFailure'
)
+
"!"
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.getImageFailure'
)
+
"!"
);
return
;
return
;
}
}
// 返回的是一个jsonArray
// 返回的是一个jsonArray
...
@@ -337,8 +380,8 @@ export default class DiskImageUplaod extends Vue {
...
@@ -337,8 +380,8 @@ export default class DiskImageUplaod extends Vue {
});
});
}
}
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.getImageFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.getImageFailure'
)
+
':'
+
error
);
});
});
}
}
...
@@ -358,14 +401,14 @@ export default class DiskImageUplaod extends Vue {
...
@@ -358,14 +401,14 @@ export default class DiskImageUplaod extends Vue {
'authcode'
:
fileData
.
authcode
'authcode'
:
fileData
.
authcode
},
},
responseType
:
'blob'
,
responseType
:
'blob'
,
}).
then
(
res
=>
{
}).
then
((
response
:
any
)
=>
{
if
(
!
res
||
res
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
'!'
);
}
}
// 请求成功,后台返回的是一个文件流
// 请求成功,后台返回的是一个文件流
if
(
res
.
data
)
{
if
(
response
.
data
)
{
// 用blob对象获取文件流
// 用blob对象获取文件流
var
blob
=
new
Blob
([
res
.
data
],
{
type
:
res
.
headers
[
'content-type'
]});
var
blob
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
[
'content-type'
]});
// 通过文件流创建下载链接
// 通过文件流创建下载链接
var
href
=
URL
.
createObjectURL
(
blob
);
var
href
=
URL
.
createObjectURL
(
blob
);
// 将下载链接保存到图片中
// 将下载链接保存到图片中
...
@@ -384,8 +427,8 @@ export default class DiskImageUplaod extends Vue {
...
@@ -384,8 +427,8 @@ export default class DiskImageUplaod extends Vue {
}
else
{
}
else
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure1'
));
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure1'
));
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
':'
+
error
);
});
});
}
}
...
@@ -401,12 +444,6 @@ export default class DiskImageUplaod extends Vue {
...
@@ -401,12 +444,6 @@ export default class DiskImageUplaod extends Vue {
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadImageFailure1'
));
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadImageFailure1'
));
return
false
;
return
false
;
}
}
// 文件大小
const
isSize
=
file
.
size
/
1024
/
1024
<
this
.
size
;
if
(
!
isSize
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadFailure'
)
+
this
.
size
.
toString
()
+
"M!"
);
return
false
;
}
}
}
/**
/**
...
@@ -424,9 +461,9 @@ export default class DiskImageUplaod extends Vue {
...
@@ -424,9 +461,9 @@ export default class DiskImageUplaod extends Vue {
// 拼接url
// 拼接url
const
uploadUrl
=
this
.
getAction
();
const
uploadUrl
=
this
.
getAction
();
// 发送post请求
// 发送post请求
Axios
.
post
(
uploadUrl
,
formData
,
{
timeout
:
2000
}).
then
(
response
=>
{
Axios
.
post
(
uploadUrl
,
formData
,
{
timeout
:
2000
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadImageFailure'
)
+
"!"
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadImageFailure'
)
+
"!"
);
}
}
// 返回的是一个jsonobject
// 返回的是一个jsonobject
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -439,15 +476,15 @@ export default class DiskImageUplaod extends Vue {
...
@@ -439,15 +476,15 @@ export default class DiskImageUplaod extends Vue {
'authcode'
:
returnData
.
authcode
'authcode'
:
returnData
.
authcode
},
},
responseType
:
'blob'
,
responseType
:
'blob'
,
}).
then
(
res
=>
{
}).
then
((
response2
)
=>
{
if
(
!
res
||
res
.
status
!=
200
)
{
if
(
!
response2
||
response2
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
"!"
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
"!"
);
return
;
return
;
}
}
// 请求成功,后台返回的是一个文件流
// 请求成功,后台返回的是一个文件流
if
(
res
.
data
)
{
if
(
response2
.
data
)
{
// 用blob对象获取文件流
// 用blob对象获取文件流
var
blob
=
new
Blob
([
res
.
data
],
{
type
:
res
.
headers
[
'content-type'
]});
var
blob
=
new
Blob
([
response2
.
data
],
{
type
:
response2
.
headers
[
'content-type'
]});
// 通过文件流创建下载链接
// 通过文件流创建下载链接
var
href
=
URL
.
createObjectURL
(
blob
);
var
href
=
URL
.
createObjectURL
(
blob
);
// 将下载链接保存到本次上传成功后返回的jsonobject中
// 将下载链接保存到本次上传成功后返回的jsonobject中
...
@@ -475,12 +512,12 @@ export default class DiskImageUplaod extends Vue {
...
@@ -475,12 +512,12 @@ export default class DiskImageUplaod extends Vue {
}
else
{
}
else
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure1'
));
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure1'
));
}
}
}).
catch
(
error
=>
{
}).
catch
((
error2
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure'
)
+
':'
+
error2
);
});
});
}
}
}).
catch
(
err
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadImageFailure'
)
+
':'
+
er
r
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.uploadImageFailure'
)
+
':'
+
erro
r
);
});
});
}
}
...
@@ -510,8 +547,19 @@ export default class DiskImageUplaod extends Vue {
...
@@ -510,8 +547,19 @@ export default class DiskImageUplaod extends Vue {
const
id
=
typeof
file
.
id
==
"string"
?
file
.
id
:
JSON
.
stringify
(
file
.
id
);
const
id
=
typeof
file
.
id
==
"string"
?
file
.
id
:
JSON
.
stringify
(
file
.
id
);
const
name
=
typeof
file
.
name
==
"string"
?
file
.
name
:
JSON
.
stringify
(
file
.
name
);
const
name
=
typeof
file
.
name
==
"string"
?
file
.
name
:
JSON
.
stringify
(
file
.
name
);
const
ocrUrl
=
'/net-disk/ocrview/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
file
.
authcode
;
const
ocrUrl
=
'/net-disk/ocrview/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
name
+
'?authcode='
+
file
.
authcode
;
// 新窗口打开url
Axios
.
get
(
ocrUrl
).
then
((
response
:
any
)
=>
{
window
.
open
(
ocrUrl
);
if
(
!
response
||
response
.
status
!=
200
)
{
return
;
}
// 返回一个url,通过自定义弹框打开
if
(
response
.
data
)
{
this
.
dialogTitle
=
name
;
this
.
showDialog
=
true
;
this
.
iframeUrl
=
response
.
data
;
}
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
error
);
});
}
}
/**
/**
...
@@ -531,9 +579,9 @@ export default class DiskImageUplaod extends Vue {
...
@@ -531,9 +579,9 @@ export default class DiskImageUplaod extends Vue {
'authcode'
:
file
.
authcode
'authcode'
:
file
.
authcode
},
},
responseType
:
'blob'
,
responseType
:
'blob'
,
}).
then
(
response
=>
{
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure2'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure2'
)
+
'!'
);
return
;
return
;
}
}
// 请求成功,后台返回的是一个文件流
// 请求成功,后台返回的是一个文件流
...
@@ -548,7 +596,11 @@ export default class DiskImageUplaod extends Vue {
...
@@ -548,7 +596,11 @@ export default class DiskImageUplaod extends Vue {
// 创建一个a元素并设置相关属性
// 创建一个a元素并设置相关属性
var
a
=
document
.
createElement
(
'a'
);
var
a
=
document
.
createElement
(
'a'
);
a
.
href
=
href
;
a
.
href
=
href
;
if
(
name
)
{
a
.
download
=
name
;
}
else
{
a
.
download
=
filename
;
a
.
download
=
filename
;
}
// 添加a元素到当前网页
// 添加a元素到当前网页
document
.
body
.
appendChild
(
a
);
document
.
body
.
appendChild
(
a
);
// 触发a元素的点击事件,实现下载
// 触发a元素的点击事件,实现下载
...
@@ -560,8 +612,8 @@ export default class DiskImageUplaod extends Vue {
...
@@ -560,8 +612,8 @@ export default class DiskImageUplaod extends Vue {
}
else
{
}
else
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure3'
));
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure3'
));
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure2'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.loadImageFailure2'
)
+
':'
+
error
);
});
});
}
}
...
@@ -574,7 +626,7 @@ export default class DiskImageUplaod extends Vue {
...
@@ -574,7 +626,7 @@ export default class DiskImageUplaod extends Vue {
public
onRemove
(
file
:
any
)
{
public
onRemove
(
file
:
any
)
{
let
_this
:
any
=
this
;
let
_this
:
any
=
this
;
if
(
file
)
{
if
(
file
)
{
MessageBox
.
confirm
(
_this
.
$t
(
'components.diskImageUpload.deleteFile'
),
_this
.
$t
(
'components.diskImageUpload.deleteFilePrompt'
),
{
MessageBox
.
confirm
(
_this
.
$t
(
'components.diskImageUpload.deleteFile'
),
_this
.
$t
(
'components.diskImageUpload.deleteFilePrompt'
),
{
confirmButtonText
:
_this
.
$t
(
'components.diskImageUpload.true'
),
confirmButtonText
:
_this
.
$t
(
'components.diskImageUpload.true'
),
cancelButtonText
:
_this
.
$t
(
'components.diskImageUpload.false'
),
cancelButtonText
:
_this
.
$t
(
'components.diskImageUpload.false'
),
type
:
'warning'
type
:
'warning'
...
@@ -585,9 +637,9 @@ export default class DiskImageUplaod extends Vue {
...
@@ -585,9 +637,9 @@ export default class DiskImageUplaod extends Vue {
// 拼接url
// 拼接url
const
deleteUrl
=
'/net-disk/files/'
+
file
.
id
;
const
deleteUrl
=
'/net-disk/files/'
+
file
.
id
;
// 发送delete请求
// 发送delete请求
Axios
.
delete
(
deleteUrl
).
then
(
response
=>
{
Axios
.
delete
(
deleteUrl
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.deleteImageFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.deleteImageFailure'
)
+
'!'
);
}
}
// 从fileid数组中删除
// 从fileid数组中删除
this
.
imageFileids
.
splice
(
index
,
1
);
this
.
imageFileids
.
splice
(
index
,
1
);
...
@@ -598,9 +650,9 @@ export default class DiskImageUplaod extends Vue {
...
@@ -598,9 +650,9 @@ export default class DiskImageUplaod extends Vue {
const
value
=
JSON
.
stringify
(
this
.
imageList
);
const
value
=
JSON
.
stringify
(
this
.
imageList
);
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
formItemName
,
value
:
value
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
formItemName
,
value
:
value
});
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
// 提示删除失败
// 提示删除失败
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.deleteImageFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.deleteImageFailure'
)
+
':'
+
error
);
});
});
}
}
});
});
...
@@ -628,20 +680,46 @@ export default class DiskImageUplaod extends Vue {
...
@@ -628,20 +680,46 @@ export default class DiskImageUplaod extends Vue {
"Content-Type"
:
"application/json;charset=UTF-8"
"Content-Type"
:
"application/json;charset=UTF-8"
},
},
timeout
:
2000
timeout
:
2000
}).
then
(
response
=>
{
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
if
(
!
response
||
response
.
status
!=
200
)
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.updateFailure'
)
+
'!'
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.updateFailure'
)
+
'!'
);
return
;
return
;
}
}
}).
catch
(
error
=>
{
}).
catch
((
error
:
any
)
=>
{
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.updateFailure'
)
+
':'
+
error
);
Message
.
error
(
_this
.
$t
(
'components.diskImageUpload.updateFailure'
)
+
':'
+
error
);
});
});
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
>
.dialogDiv {
// el-dialog头部
.el-dialog__header {
height: 40px;
}
// el-dialog面板
.el-dialog__wrapper {
height: 90vh;
overflow: visible;
}
// el-dialog
.el-dialog {
height: 100%;
}
// el-dailog内容
.el-dialog__body {
height: inherit;
}
// iframe
#fileIframe {
height: calc(100% - 40px);
}
}
</
style
>
</
style
>
\ No newline at end of file
app_web/src/config/appConfig.ts
浏览文件 @
fa41b02f
...
@@ -35,5 +35,7 @@ export const appConfig = {
...
@@ -35,5 +35,7 @@ export const appConfig = {
label
:
'YouYuan'
,
label
:
'YouYuan'
,
value
:
'YouYuan'
,
value
:
'YouYuan'
,
},
},
]
],
// 面包屑分隔符
breadcrumbSeparator
:
"/"
}
}
\ No newline at end of file
app_web/src/engine/view/md-view-engine.ts
浏览文件 @
fa41b02f
...
@@ -401,10 +401,10 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -401,10 +401,10 @@ export default class MDViewEngine extends ViewEngine {
if
(
this
.
view
.
viewparams
&&
Object
.
keys
(
this
.
view
.
viewparams
).
length
>
0
)
{
if
(
this
.
view
.
viewparams
&&
Object
.
keys
(
this
.
view
.
viewparams
).
length
>
0
)
{
Object
.
assign
(
arg
,
this
.
view
.
viewparams
);
Object
.
assign
(
arg
,
this
.
view
.
viewparams
);
}
}
if
(
this
.
getSearchForm
()
&&
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
getSearchForm
())
{
Object
.
assign
(
arg
,
this
.
getSearchForm
().
getData
());
Object
.
assign
(
arg
,
this
.
getSearchForm
().
getData
());
}
}
if
(
this
.
view
&&
this
.
view
.
$refs
.
searchbar
&&
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
view
&&
this
.
view
.
$refs
.
searchbar
)
{
Object
.
assign
(
arg
,
this
.
view
.
$refs
.
searchbar
.
getData
());
Object
.
assign
(
arg
,
this
.
view
.
$refs
.
searchbar
.
getData
());
}
}
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
...
...
app_web/src/engine/view/view-engine.ts
浏览文件 @
fa41b02f
...
@@ -194,7 +194,7 @@ export default class ViewEngine {
...
@@ -194,7 +194,7 @@ export default class ViewEngine {
const
_item
=
_this
.
view
.
toolBarModels
[
key
];
const
_item
=
_this
.
view
.
toolBarModels
[
key
];
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
_this
.
view
.
appUIService
){
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
_this
.
view
.
appUIService
){
let
dataActionResult
:
any
;
let
dataActionResult
:
any
;
if
(
_item
.
uiaction
&&
(
Object
.
is
(
_item
.
uiaction
.
target
,
'NONE'
))){
if
(
_item
.
uiaction
&&
(
Object
.
is
(
_item
.
uiaction
.
target
,
"NONE"
)
||
Object
.
is
(
_item
.
uiaction
.
target
,
""
))){
dataActionResult
=
_this
.
view
.
appUIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
dataActionResult
=
_this
.
view
.
appUIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
}
else
{
}
else
{
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
...
...
app_web/src/engine/view/wizard-view-engine.ts
浏览文件 @
fa41b02f
...
@@ -78,7 +78,11 @@ export default class WizardViewEngine extends ViewEngine {
...
@@ -78,7 +78,11 @@ export default class WizardViewEngine extends ViewEngine {
*/
*/
public
onfinish
(
args
:
any
):
void
{
public
onfinish
(
args
:
any
):
void
{
this
.
view
.
$emit
(
'viewdataschange'
,
[
args
]);
this
.
view
.
$emit
(
'viewdataschange'
,
[
args
]);
if
(
!
this
.
view
.
viewDefaultUsage
){
this
.
view
.
$emit
(
'close'
,
null
);
this
.
view
.
$emit
(
'close'
,
null
);
}
else
{
this
.
view
.
$tabPageExp
.
onClose
(
this
.
view
.
$route
.
fullPath
);
}
}
}
/**
/**
...
...
app_web/src/environments/environment.ts
浏览文件 @
fa41b02f
...
@@ -25,6 +25,8 @@ export const Environment = {
...
@@ -25,6 +25,8 @@ export const Environment = {
devMode
:
true
,
devMode
:
true
,
// 是否开启权限认证
// 是否开启权限认证
enablePermissionValid
:
false
,
enablePermissionValid
:
false
,
// 菜单权限模式,可选值:RT(RT模式),RESOURCE(资源模式),MINIX(混合模式),默认MINIX
menuPermissionMode
:
"MINIX"
,
// 项目模板地址
// 项目模板地址
ProjectUrl
:
"http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7"
,
ProjectUrl
:
"http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7"
,
// 打开目标工具,可选参数:sln、mos
// 打开目标工具,可选参数:sln、mos
...
...
app_web/src/message/view-message-service.ts
浏览文件 @
fa41b02f
...
@@ -201,7 +201,7 @@ export default class ViewMessageService {
...
@@ -201,7 +201,7 @@ export default class ViewMessageService {
public
async
getViewMessageByTag
(
tag
:
string
,
context
:
any
=
{},
viewparam
:
any
=
{}){
public
async
getViewMessageByTag
(
tag
:
string
,
context
:
any
=
{},
viewparam
:
any
=
{}){
let
messageService
:
any
=
await
this
.
getService
(
tag
);
let
messageService
:
any
=
await
this
.
getService
(
tag
);
if
(
messageService
.
dynamicMode
&&
Object
.
is
(
messageService
.
dynamicMode
,
"STATIC"
)){
if
(
messageService
.
dynamicMode
&&
Object
.
is
(
messageService
.
dynamicMode
,
"STATIC"
)){
return
messageService
.
getStaticViewMessage
();
return
messageService
.
getStaticViewMessage
(
context
,
viewparam
);
}
else
{
}
else
{
return
messageService
.
getDynamicViewMessage
(
tag
,
messageService
,
context
,
viewparam
);
return
messageService
.
getDynamicViewMessage
(
tag
,
messageService
,
context
,
viewparam
);
}
}
...
@@ -210,9 +210,14 @@ export default class ViewMessageService {
...
@@ -210,9 +210,14 @@ export default class ViewMessageService {
/**
/**
* 转化消息模板标题和内容
* 转化消息模板标题和内容
*
*
* @target {*} target 返回目标数据
* @param {*} context 应用上下文
* @param {*} viewparam 视图参数
* @param {*} item 源数据
*
* @memberof ViewMessageService
* @memberof ViewMessageService
*/
*/
public
translateMessageTemp
(
target
:
any
,
item
?:
any
){
public
translateMessageTemp
(
target
:
any
,
context
:
any
,
viewparam
:
any
,
item
?:
any
){
}
}
...
@@ -221,7 +226,7 @@ export default class ViewMessageService {
...
@@ -221,7 +226,7 @@ export default class ViewMessageService {
*
*
* @memberof ViewMessageService
* @memberof ViewMessageService
*/
*/
public
getStaticViewMessage
():
Array
<
ViewMessage
>
{
public
getStaticViewMessage
(
context
:
any
,
viewparam
:
any
):
Array
<
ViewMessage
>
{
let
returnViewMessage
:
ViewMessage
=
{
let
returnViewMessage
:
ViewMessage
=
{
id
:
this
.
id
,
id
:
this
.
id
,
name
:
this
.
name
,
name
:
this
.
name
,
...
@@ -236,7 +241,7 @@ export default class ViewMessageService {
...
@@ -236,7 +241,7 @@ export default class ViewMessageService {
dynamicMode
:
this
.
dynamicMode
,
dynamicMode
:
this
.
dynamicMode
,
messageType
:
this
.
messageType
messageType
:
this
.
messageType
};
};
this
.
translateMessageTemp
(
returnViewMessage
);
this
.
translateMessageTemp
(
returnViewMessage
,
context
,
viewparam
);
return
[
returnViewMessage
];
return
[
returnViewMessage
];
}
}
...
@@ -259,10 +264,11 @@ export default class ViewMessageService {
...
@@ -259,10 +264,11 @@ export default class ViewMessageService {
// 启用缓存
// 启用缓存
if
(
isEnableCache
){
if
(
isEnableCache
){
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
const
callbackKey
:
string
=
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
;
promise
.
then
((
result
:
any
)
=>
{
promise
.
then
((
result
:
any
)
=>
{
if
(
result
.
length
>
0
){
if
(
result
.
length
>
0
){
ViewMessageService
.
messageCached
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,{
items
:
result
});
ViewMessageService
.
messageCached
.
set
(
callbackKey
,{
items
:
result
});
ViewMessageService
.
messageCache
.
delete
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
);
ViewMessageService
.
messageCache
.
delete
(
callbackKey
);
return
resolve
(
result
);
return
resolve
(
result
);
}
else
{
}
else
{
return
resolve
([]);
return
resolve
([]);
...
@@ -271,9 +277,10 @@ export default class ViewMessageService {
...
@@ -271,9 +277,10 @@ export default class ViewMessageService {
return
reject
(
result
);
return
reject
(
result
);
})
})
}
}
const
key
:
string
=
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
;
// 加载完成,从本地缓存获取
// 加载完成,从本地缓存获取
if
(
ViewMessageService
.
messageCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
if
(
ViewMessageService
.
messageCached
.
get
(
key
)){
let
items
:
any
=
ViewMessageService
.
messageCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
).
items
;
let
items
:
any
=
ViewMessageService
.
messageCached
.
get
(
key
).
items
;
if
(
items
.
length
>
0
){
if
(
items
.
length
>
0
){
if
(
new
Date
().
getTime
()
<=
messageService
.
getExpirationTime
()){
if
(
new
Date
().
getTime
()
<=
messageService
.
getExpirationTime
()){
return
resolve
(
items
);
return
resolve
(
items
);
...
@@ -282,11 +289,11 @@ export default class ViewMessageService {
...
@@ -282,11 +289,11 @@ export default class ViewMessageService {
}
}
if
(
messageService
)
{
if
(
messageService
)
{
// 加载中,UI又需要数据,解决连续加载同一代码表问题
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if
(
ViewMessageService
.
messageCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
if
(
ViewMessageService
.
messageCache
.
get
(
key
)){
callback
(
context
,
data
,
tag
,
ViewMessageService
.
messageCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
));
callback
(
context
,
data
,
tag
,
ViewMessageService
.
messageCache
.
get
(
key
));
}
else
{
}
else
{
let
result
:
Promise
<
any
>
=
messageService
.
getItems
(
context
,
data
,
isloading
);
let
result
:
Promise
<
any
>
=
messageService
.
getItems
(
context
,
data
,
isloading
);
ViewMessageService
.
messageCache
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,
result
);
ViewMessageService
.
messageCache
.
set
(
key
,
result
);
messageService
.
setExpirationTime
(
new
Date
().
getTime
()
+
cacheTimeout
);
messageService
.
setExpirationTime
(
new
Date
().
getTime
()
+
cacheTimeout
);
callback
(
context
,
data
,
tag
,
result
);
callback
(
context
,
data
,
tag
,
result
);
}
}
...
...
app_web/src/pages/disk/sdfile-edit-view/sdfile-edit-view-base.vue
浏览文件 @
fa41b02f
...
@@ -27,28 +27,32 @@
...
@@ -27,28 +27,32 @@
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem5.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem5.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem7.visabled"
:disabled=
"toolBarModels.tbitem7.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem7' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem7.visabled"
:disabled=
"toolBarModels.tbitem7.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem7' }, $event)">
<i
class=
'fa fa-remove'
></i>
<i
class=
'fa fa-remove'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem7.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem7.caption'
)
}}
</span>
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem7.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem7.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem12.visabled"
:disabled=
"toolBarModels.tbitem12.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem12' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem12.visabled"
:disabled=
"toolBarModels.tbitem12.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem12' }, $event)">
<i
class=
'fa fa-file-text-o'
></i>
<i
class=
'fa fa-file-text-o'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem12.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem12.caption'
)
}}
</span>
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem12.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem12.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem14.visabled"
:disabled=
"toolBarModels.tbitem14.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem14' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem14.visabled"
:disabled=
"toolBarModels.tbitem14.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem14' }, $event)">
<i
class=
'fa fa-copy'
></i>
<i
class=
'fa fa-copy'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem14.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem14.caption'
)
}}
</span>
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem14.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem14.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem23.visabled"
:disabled=
"toolBarModels.tbitem23.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem23' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem23.visabled"
:disabled=
"toolBarModels.tbitem23.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem23' }, $event)">
<i
class=
'fa fa-fast-backward'
></i>
<i
class=
'fa fa-fast-backward'
></i>
...
@@ -76,7 +80,8 @@
...
@@ -76,7 +80,8 @@
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem26.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem26.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem22.visabled"
:disabled=
"toolBarModels.tbitem22.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem22' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem22.visabled"
:disabled=
"toolBarModels.tbitem22.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem22' }, $event)">
<i
class=
'fa fa-question'
></i>
<i
class=
'fa fa-question'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem22.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.editviewtoolbar_toolbar.tbitem22.caption'
)
}}
</span>
...
@@ -86,9 +91,11 @@
...
@@ -86,9 +91,11 @@
</div>
</div>
</div>
</div>
<div
class=
"content-container"
>
<div
class=
'view-top-messages'
>
<div
class=
'view-top-messages'
>
</div>
</div>
<div
class=
"content-container"
>
<div
class=
'view-body-messages'
>
</div>
<view
_form
<view
_form
:viewState=
"viewState"
:viewState=
"viewState"
:viewparams=
"viewparams"
:viewparams=
"viewparams"
...
@@ -111,8 +118,8 @@
...
@@ -111,8 +118,8 @@
@
load=
"form_load($event)"
@
load=
"form_load($event)"
@
closeview=
"closeView($event)"
>
@
closeview=
"closeView($event)"
>
</view
_form
>
</view
_form
>
<div
class=
'view-bottom-messages'
>
</div>
</div>
<div
class=
'view-bottom-messages'
>
</div>
</div>
</card>
</card>
</div>
</div>
...
@@ -289,6 +296,18 @@ export default class SDFileEditViewBase extends Vue {
...
@@ -289,6 +296,18 @@ export default class SDFileEditViewBase extends Vue {
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
};
};
/**
* 视图刷新
*
* @param {*} args
* @memberof SDFileEditViewBase
*/
public
refresh
(
args
?:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
&&
refs
.
form
)
{
refs
.
form
.
refresh
();
}
}
/**
/**
* 计数器刷新
* 计数器刷新
*
*
...
@@ -320,32 +339,32 @@ export default class SDFileEditViewBase extends Vue {
...
@@ -320,32 +339,32 @@ export default class SDFileEditViewBase extends Vue {
* @memberof SDFileEditView
* @memberof SDFileEditView
*/
*/
public
toolBarModels
:
any
=
{
public
toolBarModels
:
any
=
{
tbitem3
:
{
name
:
'tbitem3'
,
caption
:
'保存'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Save'
,
target
:
''
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'保存'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Save'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'保存并新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndNew'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
actiontarget
:
'NONE'
,
caption
:
'保存并新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndNew'
,
target
:
''
}
},
tbitem5
:
{
name
:
'tbitem5'
,
caption
:
'保存并关闭'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndExit'
,
target
:
''
}
},
tbitem5
:
{
name
:
'tbitem5'
,
actiontarget
:
'NONE'
,
caption
:
'保存并关闭'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndExit'
,
target
:
''
}
},
tbitem6
:
{
name
:
'tbitem6'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem6
:
{
name
:
'tbitem6'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem7
:
{
name
:
'tbitem7'
,
caption
:
'删除并关闭'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'RemoveAndExit'
,
target
:
'SINGLEKEY'
}
},
tbitem7
:
{
name
:
'tbitem7'
,
actiontarget
:
'NONE'
,
caption
:
'删除并关闭'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'RemoveAndExit'
,
target
:
'SINGLEKEY'
}
},
tbitem8
:
{
name
:
'tbitem8'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem8
:
{
name
:
'tbitem8'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem12
:
{
name
:
'tbitem12'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem12
:
{
name
:
'tbitem12'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem13
:
{
name
:
'tbitem13'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem13
:
{
name
:
'tbitem13'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem14
:
{
name
:
'tbitem14'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem14
:
{
name
:
'tbitem14'
,
actiontarget
:
'NONE'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem16
:
{
name
:
'tbitem16'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem16
:
{
name
:
'tbitem16'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem23
:
{
name
:
'tbitem23'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'FirstRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem23
:
{
name
:
'tbitem23'
,
actiontarget
:
'NONE'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'FirstRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem24
:
{
name
:
'tbitem24'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'PrevRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem24
:
{
name
:
'tbitem24'
,
actiontarget
:
'NONE'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'PrevRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem25
:
{
name
:
'tbitem25'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'NextRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem25
:
{
name
:
'tbitem25'
,
actiontarget
:
'NONE'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'NextRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem26
:
{
name
:
'tbitem26'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'LastRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem26
:
{
name
:
'tbitem26'
,
actiontarget
:
'NONE'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'LastRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem21
:
{
name
:
'tbitem21'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem21
:
{
name
:
'tbitem21'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem22
:
{
name
:
'tbitem22'
,
caption
:
'帮助'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
}
},
tbitem22
:
{
name
:
'tbitem22'
,
actiontarget
:
'NONE'
,
caption
:
'帮助'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
}
},
};
};
...
@@ -394,6 +413,23 @@ export default class SDFileEditViewBase extends Vue {
...
@@ -394,6 +413,23 @@ export default class SDFileEditViewBase extends Vue {
*/
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof SDFileEditViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SDFileEditViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
/**
* 应用上下文
* 应用上下文
*
*
...
@@ -607,6 +643,16 @@ export default class SDFileEditViewBase extends Vue {
...
@@ -607,6 +643,16 @@ export default class SDFileEditViewBase extends Vue {
});
});
}
}
});
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'calendar-view9'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
}
...
@@ -1568,6 +1614,9 @@ export default class SDFileEditViewBase extends Vue {
...
@@ -1568,6 +1614,9 @@ export default class SDFileEditViewBase extends Vue {
}
}
})
})
}
}
if
(
this
.
portletStateEvent
){
this
.
portletStateEvent
.
unsubscribe
();
}
}
}
...
...
app_web/src/pages/disk/sdfile-grid-view/sdfile-grid-view-base.vue
浏览文件 @
fa41b02f
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
<div
slot=
'title'
class=
"header-container"
>
<div
slot=
'title'
class=
"header-container"
>
<span
class=
'caption-info'
>
{{
$t
(
model
.
srfCaption
)
}}
</span>
<span
class=
'caption-info'
>
{{
$t
(
model
.
srfCaption
)
}}
</span>
</div>
</div>
<div
class=
'content-container'
>
<div
class=
'view-top-messages'
>
<div
class=
'view-top-messages'
>
</div>
</div>
<div
class=
'content-container'
>
<div
style=
'margin-bottom: 6px;'
>
<div
style=
'margin-bottom: 6px;'
>
<i-input
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
enter-button
@
on-search=
"onSearch($event)"
class=
'quick-search-input'
style=
'max-width: 400px;'
placeholder=
""
/>
<i-input
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
enter-button
@
on-search=
"onSearch($event)"
class=
'quick-search-input'
style=
'max-width: 400px;'
placeholder=
""
/>
<div
class=
'pull-right'
>
<div
class=
'pull-right'
>
...
@@ -33,18 +33,21 @@
...
@@ -33,18 +33,21 @@
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem6.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem6.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem8.visabled"
:disabled=
"toolBarModels.tbitem8.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem8' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem8.visabled"
:disabled=
"toolBarModels.tbitem8.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem8' }, $event)">
<i
class=
'fa fa-remove'
></i>
<i
class=
'fa fa-remove'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem8.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem8.caption'
)
}}
</span>
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem8.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem8.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<app-export-excel
:item=
"toolBarModels.tbitem13"
:caption=
"$t('entities.sdfile.gridviewtoolbar_toolbar.tbitem13.caption')"
@
exportexcel=
"toolbar_click(
{ tag: 'tbitem13' }, $event)">
</app-export-excel>
<app-export-excel
:item=
"toolBarModels.tbitem13"
:caption=
"$t('entities.sdfile.gridviewtoolbar_toolbar.tbitem13.caption')"
@
exportexcel=
"toolbar_click(
{ tag: 'tbitem13' }, $event)">
</app-export-excel>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem13.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem13.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<dropdown
v-show=
"toolBarModels.tbitem16.visabled"
trigger=
'click'
>
<span
class=
'seperator'
>
|
</span>
<dropdown
v-show=
"toolBarModels.tbitem16.visabled"
trigger=
'click'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
class=
''
>
<i-button
class=
''
>
<i
class=
''
></i>
<i
class=
''
></i>
...
@@ -78,7 +81,8 @@
...
@@ -78,7 +81,8 @@
</dropdown-item>
</dropdown-item>
</dropdown-menu>
</dropdown-menu>
</dropdown>
</dropdown>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem19.visabled"
:disabled=
"toolBarModels.tbitem19.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem19' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem19.visabled"
:disabled=
"toolBarModels.tbitem19.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem19' }, $event)">
<i
class=
'fa fa-filter'
></i>
<i
class=
'fa fa-filter'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem19.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.sdfile.gridviewtoolbar_toolbar.tbitem19.caption'
)
}}
</span>
...
@@ -111,6 +115,8 @@
...
@@ -111,6 +115,8 @@
@
load=
"searchform_load($event)"
@
load=
"searchform_load($event)"
@
closeview=
"closeView($event)"
>
@
closeview=
"closeView($event)"
>
</view
_searchform
>
</view
_searchform
>
<div
class=
'view-body-messages'
>
</div>
<view
_grid
<view
_grid
:viewState=
"viewState"
:viewState=
"viewState"
:viewparams=
"viewparams"
:viewparams=
"viewparams"
...
@@ -138,8 +144,8 @@
...
@@ -138,8 +144,8 @@
@
load=
"grid_load($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
@
closeview=
"closeView($event)"
>
</view
_grid
>
</view
_grid
>
<div
class=
'view-bottom-messages'
>
</div>
</div>
<div
class=
'view-bottom-messages'
>
</div>
</div>
</card>
</card>
</div>
</div>
...
@@ -320,6 +326,18 @@ export default class SDFileGridViewBase extends Vue {
...
@@ -320,6 +326,18 @@ export default class SDFileGridViewBase extends Vue {
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
};
/**
* 视图刷新
*
* @param {*} args
* @memberof SDFileGridViewBase
*/
public
refresh
(
args
?:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
&&
refs
.
grid
)
{
refs
.
grid
.
refresh
();
}
}
/**
/**
* 计数器刷新
* 计数器刷新
*
*
...
@@ -351,29 +369,29 @@ export default class SDFileGridViewBase extends Vue {
...
@@ -351,29 +369,29 @@ export default class SDFileGridViewBase extends Vue {
* @memberof SDFileGridView
* @memberof SDFileGridView
*/
*/
public
toolBarModels
:
any
=
{
public
toolBarModels
:
any
=
{
tbitem3
:
{
name
:
'tbitem3'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
tbitem4
:
{
name
:
'tbitem4'
,
actiontarget
:
'NONE'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
tbitem6
:
{
name
:
'tbitem6'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem6
:
{
name
:
'tbitem6'
,
actiontarget
:
'NONE'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem7
:
{
name
:
'tbitem7'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem7
:
{
name
:
'tbitem7'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem8
:
{
name
:
'tbitem8'
,
caption
:
'删除'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
}
},
tbitem8
:
{
name
:
'tbitem8'
,
actiontarget
:
'NONE'
,
caption
:
'删除'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
}
},
tbitem9
:
{
name
:
'tbitem9'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem9
:
{
name
:
'tbitem9'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem13
:
{
name
:
'tbitem13'
,
caption
:
'导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportExcel'
,
target
:
''
},
MaxRowCount
:
1000
},
tbitem13
:
{
name
:
'tbitem13'
,
actiontarget
:
'NONE'
,
caption
:
'导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportExcel'
,
target
:
''
},
MaxRowCount
:
1000
},
tbitem10
:
{
name
:
'tbitem10'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem10
:
{
name
:
'tbitem10'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem16
:
{
name
:
'tbitem16'
,
caption
:
'其它'
,
disabled
:
false
,
type
:
'ITEMS'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem16
:
{
name
:
'tbitem16'
,
caption
:
'其它'
,
disabled
:
false
,
type
:
'ITEMS'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem21
:
{
name
:
'tbitem21'
,
caption
:
'导出数据模型'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportModel'
,
target
:
''
}
},
tbitem21
:
{
name
:
'tbitem21'
,
actiontarget
:
'NONE'
,
caption
:
'导出数据模型'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportModel'
,
target
:
''
}
},
tbitem23
:
{
name
:
'tbitem23'
,
caption
:
'数据导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Import'
,
target
:
''
}
},
tbitem23
:
{
name
:
'tbitem23'
,
actiontarget
:
'NONE'
,
caption
:
'数据导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Import'
,
target
:
''
}
},
tbitem17
:
{
name
:
'tbitem17'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem17
:
{
name
:
'tbitem17'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem19
:
{
name
:
'tbitem19'
,
caption
:
'过滤'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ToggleFilter'
,
target
:
''
}
},
tbitem19
:
{
name
:
'tbitem19'
,
actiontarget
:
'NONE'
,
caption
:
'过滤'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ToggleFilter'
,
target
:
''
}
},
tbitem18
:
{
name
:
'tbitem18'
,
caption
:
'帮助'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
}
},
tbitem18
:
{
name
:
'tbitem18'
,
actiontarget
:
'NONE'
,
caption
:
'帮助'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
}
},
};
};
...
@@ -429,6 +447,23 @@ export default class SDFileGridViewBase extends Vue {
...
@@ -429,6 +447,23 @@ export default class SDFileGridViewBase extends Vue {
*/
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof SDFileGridViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SDFileGridViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
/**
* 应用上下文
* 应用上下文
*
*
...
@@ -642,6 +677,16 @@ export default class SDFileGridViewBase extends Vue {
...
@@ -642,6 +677,16 @@ export default class SDFileGridViewBase extends Vue {
});
});
}
}
});
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'calendar-view9'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
if
(
this
.
formDruipart
){
if
(
this
.
formDruipart
){
this
.
formDruipart
.
subscribe
((
res
:
any
)
=>
{
this
.
formDruipart
.
subscribe
((
res
:
any
)
=>
{
if
(
Object
.
is
(
res
.
action
,
'save'
)){
if
(
Object
.
is
(
res
.
action
,
'save'
)){
...
@@ -1617,6 +1662,9 @@ export default class SDFileGridViewBase extends Vue {
...
@@ -1617,6 +1662,9 @@ export default class SDFileGridViewBase extends Vue {
}
}
})
})
}
}
if
(
this
.
portletStateEvent
){
this
.
portletStateEvent
.
unsubscribe
();
}
}
}
/**
/**
...
...
app_web/src/pages/disk/sdindex-view/sdindex-view-base.vue
浏览文件 @
fa41b02f
...
@@ -262,6 +262,23 @@ export default class SDIndexViewBase extends Vue {
...
@@ -262,6 +262,23 @@ export default class SDIndexViewBase extends Vue {
*/
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof SDIndexViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SDIndexViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
/**
* 应用上下文
* 应用上下文
*
*
...
@@ -470,6 +487,16 @@ export default class SDIndexViewBase extends Vue {
...
@@ -470,6 +487,16 @@ export default class SDIndexViewBase extends Vue {
});
});
}
}
});
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'calendar-view9'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
}
...
...
app_web/src/store/getters.ts
浏览文件 @
fa41b02f
...
@@ -47,12 +47,21 @@ export const getLocalData = (state: any) => () => {
...
@@ -47,12 +47,21 @@ export const getLocalData = (state: any) => () => {
* @param state
* @param state
*/
*/
export
const
getAppData
=
(
state
:
any
)
=>
()
=>
{
export
const
getAppData
=
(
state
:
any
)
=>
()
=>
{
if
(
!
state
.
appdata
){
state
.
appdata
=
{};
}
let
result
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
appdata
));
let
result
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
appdata
));
if
(
state
.
localdata
&&
Object
.
keys
(
state
.
localdata
).
length
>
0
){
let
copyContext
:
any
=
result
.
context
?
result
.
context
:{};
let
copyContext
:
any
=
result
.
context
?
result
.
context
:{};
if
(
state
.
localdata
&&
Object
.
keys
(
state
.
localdata
).
length
>
0
){
Object
.
assign
(
copyContext
,
state
.
localdata
);
Object
.
assign
(
copyContext
,
state
.
localdata
);
result
.
context
=
copyContext
;
}
else
if
(
localStorage
.
getItem
(
'localdata'
)){
try
{
Object
.
assign
(
copyContext
,
JSON
.
parse
(
localStorage
.
getItem
(
'localdata'
)
as
string
));
}
catch
(
error
){
console
.
warn
(
error
);
}
}
}
result
.
context
=
copyContext
;
return
result
;
return
result
;
}
}
...
...
app_web/src/store/modules/auth-resource/getters.ts
浏览文件 @
fa41b02f
...
@@ -32,23 +32,56 @@ export const getEnablePermissionValid = (state: any) => {
...
@@ -32,23 +32,56 @@ export const getEnablePermissionValid = (state: any) => {
}
}
/**
/**
* 判断指定菜单是否显示
* 判断指定菜单是否显示
(混合模式)
*
*
* @param state
* @param state
*/
*/
export
const
getAuthMenu
=
(
state
:
any
)
=>
(
menu
:
any
)
=>
{
export
const
getAuthMenu
=
(
state
:
any
)
=>
(
menu
:
any
)
=>
{
// 存在权限
if
(
state
.
enablePermissionValid
)
{
let
resourceIndex
:
any
;
let
resourceIndex
:
any
;
let
menuIndex
:
any
;
let
menuIndex
:
any
;
if
(
state
.
enablePermissionValid
){
resourceIndex
=
state
.
resourceData
.
findIndex
((
resourcetag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
resourceIndex
=
state
.
resourceData
.
findIndex
((
resourcetag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menu
.
resourcetag
,
resourcetag
);
return
Object
.
is
(
menu
.
resourcetag
,
resourcetag
);
})
})
menuIndex
=
state
.
menuData
.
findIndex
((
menutag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
menuIndex
=
state
.
menuData
.
findIndex
((
menutag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menu
.
authtag
,
menutag
);
return
Object
.
is
(
menu
.
authtag
,
menutag
);
})
})
return
(
resourceIndex
!==
-
1
||
menuIndex
!==
-
1
)?
true
:
false
;
return
(
resourceIndex
!==
-
1
||
menuIndex
!==
-
1
)
?
true
:
false
;
}
else
{
}
else
{
return
true
;
}
}
/**
* 判断指定菜单是否显示(资源模式)
*
* @param state
*/
export
const
getAuthMenuWithResource
=
(
state
:
any
)
=>
(
menu
:
any
)
=>
{
if
(
state
.
enablePermissionValid
&&
menu
.
resourcetag
)
{
let
resourceIndex
:
any
;
resourceIndex
=
state
.
resourceData
.
findIndex
((
resourcetag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menu
.
resourcetag
,
resourcetag
);
})
return
resourceIndex
!==
-
1
?
true
:
false
;
}
else
{
return
true
;
}
}
/**
* 判断指定菜单是否显示(RT模式)
*
* @param state
*/
export
const
getAuthMenuWithRT
=
(
state
:
any
)
=>
(
menu
:
any
)
=>
{
if
(
state
.
enablePermissionValid
)
{
let
menuIndex
:
any
;
menuIndex
=
state
.
menuData
.
findIndex
((
menutag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menu
.
authtag
,
menutag
);
})
return
menuIndex
!==
-
1
?
true
:
false
;
}
else
{
return
true
;
return
true
;
}
}
}
}
\ No newline at end of file
app_web/src/styles/default.less
浏览文件 @
fa41b02f
...
@@ -124,11 +124,14 @@
...
@@ -124,11 +124,14 @@
// flex-grow: 1;
// flex-grow: 1;
height: calc(100% - 74px);
height: calc(100% - 74px);
padding: 0px;
padding: 0px;
display: flex;
flex-direction: column;
> .content-container {
> .content-container {
height: 100%;
height: 100%;
display: flex;
display: flex;
margin: 0;
margin: 0;
flex-direction: column;
flex-direction: column;
overflow: auto;
}
}
}
}
}
}
...
...
app_web/src/uiservice/sdfile/sdfile-ui-service-base.ts
浏览文件 @
fa41b02f
...
@@ -89,8 +89,8 @@ export default class SDFileUIServiceBase extends UIService {
...
@@ -89,8 +89,8 @@ export default class SDFileUIServiceBase extends UIService {
* @memberof SDFileUIServiceBase
* @memberof SDFileUIServiceBase
*/
*/
public
initViewMap
(){
public
initViewMap
(){
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'sdfiles'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'sdfiles'
,
component
:
'sdfile-edit-view'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'sdfiles'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'sdfiles'
,
component
:
'sdfile-grid-view'
});
}
}
/**
/**
...
@@ -199,17 +199,17 @@ export default class SDFileUIServiceBase extends UIService {
...
@@ -199,17 +199,17 @@ export default class SDFileUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
if
(
!
(
singleMainField
in
curData
)){
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误
`
);
console
.
warn
(
`当前数据对象不包含属性
「
${
singleMainField
}
」,根据「
${
singleMainField
}
」属性进行的主状态计算默认为空值
`
);
}
}
})
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
0
]]}
`
:
""
:
""
;
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]]
!=
null
&&
curData
[
this
.
mainStateFields
[
0
]]
!==
""
)?(
i
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
0
]]}
`
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
1
]]}
`
:
""
}
`
:
strTag
;
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]]
!=
null
&&
curData
[
this
.
mainStateFields
[
1
]]
!==
""
)?
`
${
strTag
}
__
${(
j
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
1
]]}
`
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
2
]]}
`
:
""
}
`
:
strTag2
;
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]]
!=
null
&&
curData
[
this
.
mainStateFields
[
2
]]
!==
""
)?
`
${
strTag2
}
__
${(
k
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
2
]]}
`
:
""
}
`
:
strTag2
;
// 判断是否存在
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
}
...
...
app_web/src/uiservice/ui-service.ts
浏览文件 @
fa41b02f
import
{
Store
}
from
'vuex'
;
import
{
Store
}
from
'vuex'
;
import
AuthService
from
'@/authservice/auth-service'
;
/**
/**
* 界面服务基类
* 界面服务基类
...
@@ -63,6 +64,9 @@ export default class UIService {
...
@@ -63,6 +64,9 @@ export default class UIService {
* @memberof UIService
* @memberof UIService
*/
*/
public
getResourceOPPrivs
(
tag
:
any
){
public
getResourceOPPrivs
(
tag
:
any
){
if
(
!
this
.
authService
)
{
this
.
authService
=
new
AuthService
(
this
.
getStore
());
}
return
this
.
authService
.
getResourcePermission
(
this
.
authService
.
sysOPPrivsMap
.
get
(
tag
))?
1
:
0
;
return
this
.
authService
.
getResourcePermission
(
this
.
authService
.
sysOPPrivsMap
.
get
(
tag
))?
1
:
0
;
}
}
...
...
app_web/src/utils/view-tool/view-tool.ts
浏览文件 @
fa41b02f
...
@@ -260,7 +260,7 @@ export class ViewTool {
...
@@ -260,7 +260,7 @@ export class ViewTool {
const
_item
=
ActionModel
[
key
];
const
_item
=
ActionModel
[
key
];
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
){
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
){
let
dataActionResult
:
any
;
let
dataActionResult
:
any
;
if
(
Object
.
is
(
_item
[
'actiontarget'
],
"NONE"
)){
if
(
Object
.
is
(
_item
[
'actiontarget'
],
"NONE"
)
||
Object
.
is
(
_item
[
'actiontarget'
],
""
)
){
dataActionResult
=
UIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
dataActionResult
=
UIService
.
getResourceOPPrivs
(
_item
[
'dataaccaction'
]);
}
else
{
}
else
{
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
...
...
app_web/src/widgets/app/sdindex-view-appmenu/sdindex-view-appmenu-base.vue
浏览文件 @
fa41b02f
...
@@ -223,6 +223,7 @@ export default class SDIndexViewBase extends Vue implements ControlInterface {
...
@@ -223,6 +223,7 @@ export default class SDIndexViewBase extends Vue implements ControlInterface {
}
}
/**
/**
* 获取多项数据
* 获取多项数据
*
*
...
...
app_web/src/widgets/sdfile/default-searchform/default-searchform-base.vue
浏览文件 @
fa41b02f
...
@@ -172,6 +172,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -172,6 +172,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
}
}
/**
/**
* 获取多项数据
* 获取多项数据
*
*
...
...
app_web/src/widgets/sdfile/default-searchform/default-searchform-service.ts
浏览文件 @
fa41b02f
...
@@ -41,6 +41,14 @@ export default class DefaultService extends ControlService {
...
@@ -41,6 +41,14 @@ export default class DefaultService extends ControlService {
this
.
model
=
new
DefaultModel
();
this
.
model
=
new
DefaultModel
();
}
}
/**
* 远端数据
*
* @type {*}
* @memberof DefaultService
*/
private
remoteCopyData
:
any
=
{};
/**
/**
* 处理数据
* 处理数据
*
*
...
@@ -271,6 +279,7 @@ export default class DefaultService extends ControlService {
...
@@ -271,6 +279,7 @@ export default class DefaultService extends ControlService {
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
}
}
result
.
then
((
response
)
=>
{
result
.
then
((
response
)
=>
{
this
.
setRemoteCopyData
(
response
);
this
.
handleResponse
(
action
,
response
);
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
...
@@ -301,6 +310,7 @@ export default class DefaultService extends ControlService {
...
@@ -301,6 +310,7 @@ export default class DefaultService extends ControlService {
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
}
}
result
.
then
((
response
)
=>
{
result
.
then
((
response
)
=>
{
this
.
setRemoteCopyData
(
response
);
this
.
handleResponse
(
action
,
response
,
true
);
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
...
@@ -434,5 +444,24 @@ export default class DefaultService extends ControlService {
...
@@ -434,5 +444,24 @@ export default class DefaultService extends ControlService {
return
item
;
return
item
;
}
}
/**
* 设置远端数据
*
* @param result 远端请求结果
* @memberof DefaultService
*/
public
setRemoteCopyData
(
result
:
any
){
if
(
result
&&
result
.
status
===
200
)
{
this
.
remoteCopyData
=
Util
.
deepCopy
(
result
.
data
);
}
}
/**
* 获取远端数据
*
* @memberof DefaultService
*/
public
getRemoteCopyData
(){
return
this
.
remoteCopyData
;
}
}
}
\ No newline at end of file
app_web/src/widgets/sdfile/main-form/main-form-base.vue
浏览文件 @
fa41b02f
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'sdfile_main'
style=
""
>
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'sdfile_main'
style=
""
>
<input
style=
"display:none;"
/>
<input
style=
"display:none;"
/>
<row
>
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sdfile.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sdfile.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<row>
<i-col
v-show=
"detailsModel.filename.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.filename.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
...
@@ -323,6 +322,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -323,6 +322,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
/**
/**
* 视图默认使用
* 视图默认使用
*
*
...
@@ -578,138 +578,58 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -578,138 +578,58 @@ export default class MainBase extends Vue implements ControlInterface {
*/
*/
public
rules
()
:
any
{
public
rules
()
:
any
{
return
{
return
{
srfupdatedate
:
[
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srfupdatedate
.
required
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srfupdatedate
.
required
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'blur'
},
],
srforikey
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srforikey
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srforikey
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfkey
:
[
{
type
:
'string'
,
message
:
'标识 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'标识 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srfkey
.
required
,
type
:
'string'
,
message
:
'标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srfkey
.
required
,
type
:
'string'
,
message
:
'标识 值不能为空'
,
trigger
:
'blur'
},
],
srfmajortext
:
[
{
type
:
'string'
,
message
:
'名称 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'名称 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srfmajortext
.
required
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srfmajortext
.
required
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'blur'
},
],
srftempmode
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srftempmode
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srftempmode
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfuf
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srfuf
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srfuf
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfdeid
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srfdeid
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srfdeid
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfsourcekey
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
srfsourcekey
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
srfsourcekey
.
required
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
filename
:
[
filename
:
[
{
type
:
'string'
,
message
:
'名称 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'名称 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
filename
.
required
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
filename
.
required
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
filename
.
required
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
filename
.
required
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'blur'
},
],
],
filepath
:
[
filepath
:
[
{
type
:
'string'
,
message
:
'路径 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'路径 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
filepath
.
required
,
type
:
'string'
,
message
:
'路径 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
filepath
.
required
,
type
:
'string'
,
message
:
'路径 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
filepath
.
required
,
type
:
'string'
,
message
:
'路径 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
filepath
.
required
,
type
:
'string'
,
message
:
'路径 值不能为空'
,
trigger
:
'blur'
},
],
],
filesize
:
[
filesize
:
[
{
type
:
'number'
,
message
:
'文件大小 值必须为数值类型'
,
trigger
:
'change'
},
{
type
:
'number'
,
message
:
'文件大小 值必须为数值类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
filesize
.
required
,
type
:
'number'
,
message
:
'文件大小 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
filesize
.
required
,
type
:
'number'
,
message
:
'文件大小 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
filesize
.
required
,
type
:
'number'
,
message
:
'文件大小 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
filesize
.
required
,
type
:
'number'
,
message
:
'文件大小 值不能为空'
,
trigger
:
'blur'
},
],
],
fileext
:
[
fileext
:
[
{
type
:
'string'
,
message
:
'扩展名 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'扩展名 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
fileext
.
required
,
type
:
'string'
,
message
:
'扩展名 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
fileext
.
required
,
type
:
'string'
,
message
:
'扩展名 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
fileext
.
required
,
type
:
'string'
,
message
:
'扩展名 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
fileext
.
required
,
type
:
'string'
,
message
:
'扩展名 值不能为空'
,
trigger
:
'blur'
},
],
],
folder
:
[
folder
:
[
{
type
:
'string'
,
message
:
'特定目录 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'特定目录 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
folder
.
required
,
type
:
'string'
,
message
:
'特定目录 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
folder
.
required
,
type
:
'string'
,
message
:
'特定目录 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
folder
.
required
,
type
:
'string'
,
message
:
'特定目录 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
folder
.
required
,
type
:
'string'
,
message
:
'特定目录 值不能为空'
,
trigger
:
'blur'
},
],
],
digestcode
:
[
digestcode
:
[
{
type
:
'string'
,
message
:
'签名 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'签名 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
digestcode
.
required
,
type
:
'string'
,
message
:
'签名 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
digestcode
.
required
,
type
:
'string'
,
message
:
'签名 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
digestcode
.
required
,
type
:
'string'
,
message
:
'签名 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
digestcode
.
required
,
type
:
'string'
,
message
:
'签名 值不能为空'
,
trigger
:
'blur'
},
],
],
ownerid
:
[
ownerid
:
[
{
type
:
'string'
,
message
:
'所属主体 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'所属主体 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
ownerid
.
required
,
type
:
'string'
,
message
:
'所属主体 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ownerid
.
required
,
type
:
'string'
,
message
:
'所属主体 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ownerid
.
required
,
type
:
'string'
,
message
:
'所属主体 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
ownerid
.
required
,
type
:
'string'
,
message
:
'所属主体 值不能为空'
,
trigger
:
'blur'
},
],
],
ownertype
:
[
ownertype
:
[
{
type
:
'string'
,
message
:
'所属类型 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'所属类型 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
ownertype
.
required
,
type
:
'string'
,
message
:
'所属类型 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ownertype
.
required
,
type
:
'string'
,
message
:
'所属类型 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ownertype
.
required
,
type
:
'string'
,
message
:
'所属类型 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
ownertype
.
required
,
type
:
'string'
,
message
:
'所属类型 值不能为空'
,
trigger
:
'blur'
},
],
],
memo
:
[
memo
:
[
{
type
:
'string'
,
message
:
'备注 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'备注 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
memo
.
required
,
type
:
'string'
,
message
:
'备注 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
memo
.
required
,
type
:
'string'
,
message
:
'备注 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
memo
.
required
,
type
:
'string'
,
message
:
'备注 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
memo
.
required
,
type
:
'string'
,
message
:
'备注 值不能为空'
,
trigger
:
'blur'
},
],
],
createman
:
[
createman
:
[
{
type
:
'string'
,
message
:
'创建人 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'创建人 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
createman
.
required
,
type
:
'string'
,
message
:
'创建人 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
createman
.
required
,
type
:
'string'
,
message
:
'创建人 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
createman
.
required
,
type
:
'string'
,
message
:
'创建人 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
createman
.
required
,
type
:
'string'
,
message
:
'创建人 值不能为空'
,
trigger
:
'blur'
},
],
],
createdate
:
[
createdate
:
[
{
type
:
'string'
,
message
:
'创建日期 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'创建日期 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
createdate
.
required
,
type
:
'string'
,
message
:
'创建日期 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
createdate
.
required
,
type
:
'string'
,
message
:
'创建日期 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
createdate
.
required
,
type
:
'string'
,
message
:
'创建日期 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
createdate
.
required
,
type
:
'string'
,
message
:
'创建日期 值不能为空'
,
trigger
:
'blur'
},
],
],
updateman
:
[
updateman
:
[
{
type
:
'string'
,
message
:
'更新人 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新人 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
updateman
.
required
,
type
:
'string'
,
message
:
'更新人 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
updateman
.
required
,
type
:
'string'
,
message
:
'更新人 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
updateman
.
required
,
type
:
'string'
,
message
:
'更新人 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
updateman
.
required
,
type
:
'string'
,
message
:
'更新人 值不能为空'
,
trigger
:
'blur'
},
],
],
updatedate
:
[
updatedate
:
[
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
updatedate
.
required
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
updatedate
.
required
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
updatedate
.
required
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
updatedate
.
required
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'blur'
},
],
],
fileid
:
[
{
type
:
'string'
,
message
:
'标识 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'标识 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
fileid
.
required
,
type
:
'string'
,
message
:
'标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
fileid
.
required
,
type
:
'string'
,
message
:
'标识 值不能为空'
,
trigger
:
'blur'
},
],
}
}
}
}
...
@@ -746,32 +666,38 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -746,32 +666,38 @@ export default class MainBase extends Vue implements ControlInterface {
falg
.
isPast
=
val
;
falg
.
isPast
=
val
;
}
}
}
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
for
(
let
i
=
0
;
i
<
rule
[
name
].
length
;
i
++
){
let
item
:
any
=
rule
[
name
][
i
];
let
dataValue
=
item
.
deName
?
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]:
""
;
let
dataValue
=
item
.
deName
?
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]:
""
;
// 常规规则
// 常规规则
if
(
item
.
type
==
'SIMPLE'
){
if
(
item
.
type
==
'SIMPLE'
){
startOp
(
!
this
.
$verify
.
checkFieldSimpleRule
(
dataValue
,
item
.
condOP
,
item
.
paramValue
,
item
.
ruleInfo
,
item
.
paramType
,
this
.
data
,
item
.
isKeyCond
));
startOp
(
!
this
.
$verify
.
checkFieldSimpleRule
(
dataValue
,
item
.
condOP
,
item
.
paramValue
,
item
.
ruleInfo
,
item
.
paramType
,
this
.
data
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
// 数值范围
// 数值范围
if
(
item
.
type
==
'VALUERANGE2'
){
if
(
item
.
type
==
'VALUERANGE2'
){
startOp
(
!
this
.
$verify
.
checkFieldValueRangeRule
(
dataValue
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
startOp
(
!
this
.
$verify
.
checkFieldValueRangeRule
(
dataValue
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
// 正则式
// 正则式
if
(
item
.
type
==
"REGEX"
)
{
if
(
item
.
type
==
"REGEX"
)
{
startOp
(
!
this
.
$verify
.
checkFieldRegExRule
(
dataValue
,
item
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
startOp
(
!
this
.
$verify
.
checkFieldRegExRule
(
dataValue
,
item
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
// 长度
// 长度
if
(
item
.
type
==
"STRINGLENGTH"
)
{
if
(
item
.
type
==
"STRINGLENGTH"
)
{
startOp
(
!
this
.
$verify
.
checkFieldStringLengthRule
(
dataValue
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
startOp
(
!
this
.
$verify
.
checkFieldStringLengthRule
(
dataValue
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
// 系统值规则
// 系统值规则
if
(
item
.
type
==
"SYSVALUERULE"
)
{
if
(
item
.
type
==
"SYSVALUERULE"
)
{
startOp
(
!
this
.
$verify
.
checkFieldSysValueRule
(
dataValue
,
item
.
sysRule
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
startOp
(
!
this
.
$verify
.
checkFieldSysValueRule
(
dataValue
,
item
.
sysRule
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
// 分组
// 分组
if
(
item
.
type
==
'GROUP'
){
if
(
item
.
type
==
'GROUP'
){
...
@@ -779,9 +705,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -779,9 +705,9 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
item
.
isNotMode
){
if
(
item
.
isNotMode
){
falg
.
isPast
=
!
falg
.
isPast
;
falg
.
isPast
=
!
falg
.
isPast
;
}
}
if
(
!
falg
.
isPast
)
return
falg
;
}
}
}
});
if
(
!
falg
.
hasOwnProperty
(
"isPast"
)){
if
(
!
falg
.
hasOwnProperty
(
"isPast"
)){
falg
.
isPast
=
true
;
falg
.
isPast
=
true
;
}
}
...
@@ -1548,12 +1474,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1548,12 +1474,12 @@ export default class MainBase extends Vue implements ControlInterface {
/**
/**
* 部件刷新
* 部件刷新
*
*
* @param {any
[]
} args
* @param {any} args
* @memberof MainBase
* @memberof MainBase
*/
*/
public
refresh
(
args
:
any
[]
):
void
{
public
refresh
(
args
?:
any
):
void
{
let
arg
:
any
=
{};
let
arg
:
any
=
{};
Object
.
assign
(
arg
,
args
[
0
]
);
Object
.
assign
(
arg
,
args
?
args
[
0
]:{}
);
if
(
this
.
data
.
srfkey
&&
!
Object
.
is
(
this
.
data
.
srfkey
,
''
))
{
if
(
this
.
data
.
srfkey
&&
!
Object
.
is
(
this
.
data
.
srfkey
,
''
))
{
Object
.
assign
(
arg
,
{
srfkey
:
this
.
data
.
srfkey
});
Object
.
assign
(
arg
,
{
srfkey
:
this
.
data
.
srfkey
});
this
.
load
(
arg
);
this
.
load
(
arg
);
...
...
app_web/src/widgets/sdfile/main-form/main-form-service.ts
浏览文件 @
fa41b02f
...
@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
...
@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
----
FTL stack trace ("~" means nesting-related):
FTL stack trace ("~" means nesting-related):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_en_US" at line 3
59
, column 14]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_en_US" at line 3
68
, column 14]
----
----
\ No newline at end of file
app_web/src/widgets/sdfile/main-grid/main-grid-base.vue
浏览文件 @
fa41b02f
...
@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
...
@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
----
FTL stack trace ("~" means nesting-related):
FTL stack trace ("~" means nesting-related):
- Failed at: ${ctrl.getPSAppDataEntity().getMajorP... [in template "TEMPLCODE_en_US" at line 11
42
, column 39]
- Failed at: ${ctrl.getPSAppDataEntity().getMajorP... [in template "TEMPLCODE_en_US" at line 11
56
, column 39]
----
----
\ No newline at end of file
app_web/src/widgets/sdfile/main-grid/main-grid-service.ts
浏览文件 @
fa41b02f
...
@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
...
@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
----
FTL stack trace ("~" means nesting-related):
FTL stack trace ("~" means nesting-related):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_en_US" at line 3
68
, column 35]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_en_US" at line 3
96
, column 35]
----
----
\ No newline at end of file
config.xml
浏览文件 @
fa41b02f
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzdisk/
git clone -b master $para2 ibzdisk/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzdisk/
cd ibzdisk/
mvn clean package -Papi
cd ibzdisk-provider/ibzdisk-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzdisk-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
ibzdisk-boot/src/main/resources/application-dev.yml
浏览文件 @
fa41b02f
...
@@ -17,7 +17,7 @@ zuul:
...
@@ -17,7 +17,7 @@ zuul:
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
stripPrefix
:
false
config
:
config
:
path
:
/config/**
path
:
/config
s
/**
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
stripPrefix
:
false
oucore
:
oucore
:
...
...
ibzdisk-core/src/main/java/cn/ibizlab/core/disk/domain/SDFile.java
浏览文件 @
fa41b02f
...
@@ -18,6 +18,7 @@ import cn.ibizlab.util.domain.EntityBase;
...
@@ -18,6 +18,7 @@ import cn.ibizlab.util.domain.EntityBase;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
cn.ibizlab.util.helper.DataObject
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
lombok.*
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.data.annotation.Transient
;
...
...
ibzdisk-core/src/main/java/cn/ibizlab/core/disk/service/impl/SDFileServiceImpl.java
浏览文件 @
fa41b02f
...
@@ -209,6 +209,7 @@ public class SDFileServiceImpl extends ServiceImpl<SDFileMapper, SDFile> impleme
...
@@ -209,6 +209,7 @@ public class SDFileServiceImpl extends ServiceImpl<SDFileMapper, SDFile> impleme
}
}
}
}
...
...
ibzdisk-core/src/main/resources/liquibase/changelog/20200620200620_init_ibzcfg2.xml
0 → 100644
浏览文件 @
fa41b02f
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd"
>
<changeSet
author=
"Think (generated)"
id=
"1592547336292-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not
>
<tableExists
tableName=
"IBZCFG"
/>
</not>
</preConditions>
<createTable
remarks=
"配置"
tableName=
"IBZCFG"
>
<column
name=
"CFGID"
remarks=
"配置标识"
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
/>
</column>
<column
name=
"SYSTEMID"
remarks=
"系统标识"
type=
"VARCHAR(100)"
/>
<column
name=
"CFGTYPE"
remarks=
"配置类型"
type=
"VARCHAR(100)"
/>
<column
name=
"TARGETTYPE"
remarks=
"引用对象"
type=
"VARCHAR(100)"
/>
<column
name=
"USERID"
remarks=
"用户标识"
type=
"VARCHAR(100)"
/>
<column
name=
"CFG"
remarks=
"配置"
type=
"MEDIUMTEXT"
/>
<column
name=
"UPDATEDATE"
remarks=
"更新时间"
type=
"datetime"
/>
</createTable>
</changeSet>
</databaseChangeLog>
ibzdisk-provider/ibzdisk-provider-api/src/main/docker/Dockerfile
浏览文件 @
fa41b02f
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzdisk-provider-api.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzdisk-provider-api.jar
EXPOSE
40006
EXPOSE
8081
ADD
ibzdisk-provider-api.jar /ibzdisk-provider-api.jar
ADD
ibzdisk-provider-api.jar /ibzdisk-provider-api.jar
ibzdisk-provider/ibzdisk-provider-api/src/main/docker/ibzdisk-provider-api.yaml
浏览文件 @
fa41b02f
...
@@ -3,22 +3,9 @@ services:
...
@@ -3,22 +3,9 @@ services:
ibzdisk-provider-api
:
ibzdisk-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzdisk-provider-api:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzdisk-provider-api:latest
ports
:
ports
:
-
"
40006:40006
"
-
"
8081:8081
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=40006
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.102.211:8848
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
ibzdisk-provider/ibzdisk-provider-api/src/main/java/cn/ibizlab/api/rest/SDFileResource.java
浏览文件 @
fa41b02f
...
@@ -157,5 +157,7 @@ public class SDFileResource {
...
@@ -157,5 +157,7 @@ public class SDFileResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
sdfileMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
.
body
(
new
PageImpl
(
sdfileMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
}
}
ibzdisk-util/src/main/java/cn/ibizlab/util/aspect/AuditAspect.java
浏览文件 @
fa41b02f
...
@@ -54,6 +54,7 @@ public class AuditAspect
...
@@ -54,6 +54,7 @@ public class AuditAspect
return
;
return
;
Object
serviceParam
=
args
[
0
];
Object
serviceParam
=
args
[
0
];
if
(
serviceParam
instanceof
EntityBase
){
EntityBase
entity
=(
EntityBase
)
serviceParam
;
//创建数据
EntityBase
entity
=(
EntityBase
)
serviceParam
;
//创建数据
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
if
(
auditFields
.
size
()==
0
)
//是否有审计属性
if
(
auditFields
.
size
()==
0
)
//是否有审计属性
...
@@ -66,7 +67,7 @@ public class AuditAspect
...
@@ -66,7 +67,7 @@ public class AuditAspect
}
}
//记录审计日志
//记录审计日志
dataAuditService
.
createAudit
(
request
,
entity
,
idValue
,
auditFields
);
dataAuditService
.
createAudit
(
request
,
entity
,
idValue
,
auditFields
);
return
;
}
}
}
/**
/**
...
@@ -88,6 +89,7 @@ public class AuditAspect
...
@@ -88,6 +89,7 @@ public class AuditAspect
return
point
.
proceed
();
return
point
.
proceed
();
Object
arg
=
args
[
0
];
Object
arg
=
args
[
0
];
if
(
arg
instanceof
EntityBase
){
EntityBase
entity
=
(
EntityBase
)
arg
;
EntityBase
entity
=
(
EntityBase
)
arg
;
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
...
@@ -110,6 +112,8 @@ public class AuditAspect
...
@@ -110,6 +112,8 @@ public class AuditAspect
dataAuditService
.
updateAudit
(
request
,
beforeEntity
,
serviceObj
,
idValue
,
auditFields
);
dataAuditService
.
updateAudit
(
request
,
beforeEntity
,
serviceObj
,
idValue
,
auditFields
);
return
true
;
return
true
;
}
}
return
point
.
proceed
();
}
/**
/**
* 实体数据更新切面,在成功更新数据后将新增数据内容记录审计日志内(审计明细【AuditInfo】中只记录审计属性变化情况,审计属性在平台属性中配置)
* 实体数据更新切面,在成功更新数据后将新增数据内容记录审计日志内(审计明细【AuditInfo】中只记录审计属性变化情况,审计属性在平台属性中配置)
...
...
ibzdisk-util/src/main/java/cn/ibizlab/util/cache/cache/LayeringCache.java
浏览文件 @
fa41b02f
...
@@ -11,6 +11,7 @@ import java.util.Map;
...
@@ -11,6 +11,7 @@ import java.util.Map;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
import
cn.ibizlab.util.cache.listener.RedisPublisher
;
import
cn.ibizlab.util.cache.listener.RedisPublisher
;
import
cn.ibizlab.util.enums.RedisChannelTopic
;
import
cn.ibizlab.util.enums.RedisChannelTopic
;
import
org.springframework.util.ObjectUtils
;
/**
/**
* 缓存分层类
* 缓存分层类
...
@@ -58,11 +59,16 @@ public class LayeringCache extends AbstractValueAdaptingCache {
...
@@ -58,11 +59,16 @@ public class LayeringCache extends AbstractValueAdaptingCache {
@Override
@Override
public
ValueWrapper
get
(
Object
key
)
{
public
ValueWrapper
get
(
Object
key
)
{
ValueWrapper
wrapper
=
caffeineCache
.
get
(
key
);
ValueWrapper
wrapper
=
caffeineCache
.
get
(
key
);
log
.
debug
(
"查询一级缓存 key:{},value:{}"
,
key
,
wrapper
);
Object
value
=
ObjectUtils
.
isEmpty
(
wrapper
)?
null
:
wrapper
.
get
();
if
(
wrapper
==
null
)
{
log
.
debug
(
"查询一级缓存 key:{} ,value:{}"
,
key
,
value
);
if
(
ObjectUtils
.
isEmpty
(
value
))
{
wrapper
=
redisCache
.
get
(
key
);
wrapper
=
redisCache
.
get
(
key
);
caffeineCache
.
put
(
key
,
wrapper
==
null
?
null
:
wrapper
.
get
());
value
=
ObjectUtils
.
isEmpty
(
wrapper
)?
null
:
wrapper
.
get
();
log
.
debug
(
"查询二级缓存,并将数据放到一级缓存。 key:{}"
,
key
);
log
.
debug
(
"查询二级缓存 key:{} ,value:{}"
,
key
,
value
);
if
(!
ObjectUtils
.
isEmpty
(
value
)){
caffeineCache
.
put
(
key
,
value
);
log
.
debug
(
"查询二级缓存,并将数据放到一级缓存。 key:{} ,value:{}"
,
key
,
value
);
}
}
}
return
wrapper
;
return
wrapper
;
}
}
...
...
ibzdisk-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
fa41b02f
...
@@ -67,7 +67,6 @@ public class SearchContextBase implements ISearchContext{
...
@@ -67,7 +67,6 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
* 工作流流程标识
*/
*/
public
String
processDefinitionKey
;
public
String
processDefinitionKey
;
/**
/**
* 获取工作流步骤标识
* 获取工作流步骤标识
*/
*/
...
...
ibzdisk-util/src/main/resources/application-sys.yml
浏览文件 @
fa41b02f
#缓存、数据源
#缓存、数据源
spring
:
spring
:
cache
:
cache
:
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录