Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdisk
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdisk
提交
6798ff9a
提交
6798ff9a
编写于
6月 10, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
58303479
变更
58
展开全部
显示空白字符变更
内嵌
并排
正在显示
58 个修改的文件
包含
1849 行增加
和
560 行删除
+1849
-560
QQ.svg
app_web/public/assets/img/QQ.svg
+1
-0
background.png
app_web/public/assets/img/background.png
+0
-0
weixin.svg
app_web/public/assets/img/weixin.svg
+1
-0
app-register.ts
app_web/src/app-register.ts
+2
-0
app-autocomplete.vue
app_web/src/components/app-autocomplete/app-autocomplete.vue
+20
-12
app-breadcrumb.vue
app_web/src/components/app-breadcrumb/app-breadcrumb.vue
+30
-37
app-checkbox-list.vue
...eb/src/components/app-checkbox-list/app-checkbox-list.vue
+22
-14
app-embed-picker.vue
app_web/src/components/app-embed-picker/app-embed-picker.vue
+26
-22
app-form-druipart.vue
...eb/src/components/app-form-druipart/app-form-druipart.vue
+37
-9
app-mpicker.vue
app_web/src/components/app-mpicker/app-mpicker.vue
+22
-14
app-picker-select-view.vue
...ponents/app-picker-select-view/app-picker-select-view.vue
+53
-48
app-picker.vue
app_web/src/components/app-picker/app-picker.vue
+14
-9
app-radio-group.vue
app_web/src/components/app-radio-group/app-radio-group.vue
+22
-14
app-span.vue
app_web/src/components/app-span/app-span.vue
+14
-7
app-transfer.less
app_web/src/components/app-transfer/app-transfer.less
+6
-0
app-transfer.vue
app_web/src/components/app-transfer/app-transfer.vue
+270
-0
app-tree-picker.vue
app_web/src/components/app-tree-picker/app-tree-picker.vue
+32
-28
app-user.vue
app_web/src/components/app-user/app-user.vue
+3
-0
codelist.vue
app_web/src/components/codelist/codelist.vue
+16
-8
context-menu.less
app_web/src/components/context-menu/context-menu.less
+5
-0
dropdown-list-dynamic.vue
...omponents/dropdown-list-dynamic/dropdown-list-dynamic.vue
+15
-7
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+16
-8
dropdown-list.vue
app_web/src/components/dropdown-list/dropdown-list.vue
+14
-6
login.less
app_web/src/components/login/login.less
+108
-60
login.vue
app_web/src/components/login/login.vue
+161
-47
tab-page-exp.less
app_web/src/components/tab-page-exp/tab-page-exp.less
+63
-109
tab-page-exp.vue
app_web/src/components/tab-page-exp/tab-page-exp.vue
+37
-15
edit-view-engine.ts
app_web/src/engine/view/edit-view-engine.ts
+6
-3
kan-ban-view-engine.ts
app_web/src/engine/view/kan-ban-view-engine.ts
+58
-0
index.ts
app_web/src/locale/index.ts
+2
-1
en-US.ts
app_web/src/locale/lang/en-US.ts
+3
-0
zh-CN.ts
app_web/src/locale/lang/zh-CN.ts
+3
-0
sdfile_en_US.ts
app_web/src/locale/lanres/entities/sdfile/sdfile_en_US.ts
+2
-2
sdfile_zh_CN.ts
app_web/src/locale/lanres/entities/sdfile/sdfile_zh_CN.ts
+2
-2
sdfile-edit-view-base.vue
...src/pages/disk/sdfile-edit-view/sdfile-edit-view-base.vue
+0
-14
sdfile-grid-view-base.vue
...src/pages/disk/sdfile-grid-view/sdfile-grid-view-base.vue
+11
-20
router.ts
app_web/src/pages/disk/sdindex-view/router.ts
+10
-5
shims-vue.d.ts
app_web/src/shims-vue.d.ts
+2
-1
default.less
app_web/src/styles/default.less
+6
-0
interceptor.ts
app_web/src/utils/interceptor/interceptor.ts
+7
-0
uiaction-tool.d.ts
app_web/src/utils/types/uiaction-tool.d.ts
+7
-3
util.d.ts
app_web/src/utils/types/util.d.ts
+14
-0
uiaction-tool.ts
app_web/src/utils/uiaction-tool/uiaction-tool.ts
+23
-9
util.ts
app_web/src/utils/util/util.ts
+38
-0
main-form-base.vue
app_web/src/widgets/sdfile/main-form/main-form-base.vue
+1
-1
ibzdisk-app-web.yaml
...-app/ibzdisk-app-web/src/main/docker/ibzdisk-app-web.yaml
+10
-0
application-dev.yml
ibzdisk-boot/src/main/resources/application-dev.yml
+4
-0
pom.xml
ibzdisk-core/pom.xml
+1
-1
SDFileSearchContext.java
...java/cn/ibizlab/core/disk/filter/SDFileSearchContext.java
+2
-2
MybatisConfiguration.java
...ava/cn/ibizlab/core/util/config/MybatisConfiguration.java
+1
-0
pom.xml
ibzdisk-dependencies/pom.xml
+20
-9
ibzdisk-provider-api.yaml
...sk-provider-api/src/main/docker/ibzdisk-provider-api.yaml
+10
-0
SwaggerConfiguration.java
...rc/main/java/cn/ibizlab/swagger/SwaggerConfiguration.java
+2
-0
QueryBuildContext.java
...c/main/java/cn/ibizlab/util/filter/QueryBuildContext.java
+163
-0
QueryFilter.java
...til/src/main/java/cn/ibizlab/util/filter/QueryFilter.java
+270
-0
QueryWrapperContext.java
...main/java/cn/ibizlab/util/filter/QueryWrapperContext.java
+148
-4
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+6
-4
AppController.java
...til/src/main/java/cn/ibizlab/util/rest/AppController.java
+7
-5
未找到文件。
app_web/public/assets/img/QQ.svg
0 → 100644
浏览文件 @
6798ff9a
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
class=
"icon"
width=
"200px"
height=
"200.00px"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M511.999 1024a512 512 0 1 0-512-512 512 512 0 0 0 512 512z"
fill=
"#23A0F0"
/><path
d=
"M735.765 604.422c-3.55-49.47-36.192-90.932-55.09-112.47a70.383 70.383 0 0 0-15.577-67.003v-1.718c0-97.235-68.028-167.254-153.35-167.55-85.333 0.342-153.35 70.315-153.35 167.55v1.718a70.383 70.383 0 0 0-15.576 67.003c-18.898 21.413-51.54 62.874-55.09 112.47a75.39 75.39 0 0 0 7.554 40.425c7.555 10.308 28.513-2.06 43.406-34.93a210.33 210.33 0 0 0 35.499 67.914c-36.307 8.477-46.729 44.897-34.475 64.853 8.59 14.086 28.445 25.657 62.419 25.657 60.473 0 87.267-16.611 99.18-28.057a16.259 16.259 0 0 1 20.844 0c11.913 11.57 38.684 28.057 99.18 28.057 34.02 0 53.715-11.57 62.419-25.657 12.253-19.922 1.831-56.342-34.475-64.853a211.627 211.627 0 0 0 35.499-67.914c14.893 32.87 35.85 45.124 43.406 34.93a76.493 76.493 0 0 0 7.577-40.425z"
fill=
"#FFFFFF"
/></svg>
\ No newline at end of file
app_web/public/assets/img/background.png
0 → 100644
浏览文件 @
6798ff9a
145.0 KB
app_web/public/assets/img/weixin.svg
0 → 100644
浏览文件 @
6798ff9a
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
class=
"icon"
width=
"200px"
height=
"200.00px"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
><path
fill=
"#36ab60"
d=
"M352.814545 385.396364m-33.512727 0a33.512727 33.512727 0 1 0 67.025455 0 33.512727 33.512727 0 1 0-67.025455 0Z"
/><path
fill=
"#36ab60"
d=
"M502.690909 384.465455m-33.512727 0a33.512727 33.512727 0 1 0 67.025454 0 33.512727 33.512727 0 1 0-67.025454 0Z"
/><path
fill=
"#36ab60"
d=
"M576.232727 534.341818m-23.272727 0a23.272727 23.272727 0 1 0 46.545455 0 23.272727 23.272727 0 1 0-46.545455 0Z"
/><path
fill=
"#36ab60"
d=
"M694.458182 536.203636m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z"
/><path
fill=
"#36ab60"
d=
"M512 0C229.003636 0 0 229.003636 0 512s229.003636 512 512 512 512-229.003636 512-512S794.996364 0 512 0z m-87.505455 630.225455c-26.996364 0-48.407273-5.585455-75.403636-11.17091l-75.403636 37.236364 21.410909-64.232727c-53.992727-37.236364-85.643636-85.643636-85.643637-145.221818 0-102.4 96.814545-182.458182 215.04-182.458182 105.192727 0 198.283636 64.232727 216.901819 150.807273-6.516364-0.930909-13.963636-0.930909-20.48-0.93091-102.4 0-182.458182 76.334545-182.458182 170.356364 0 15.825455 2.792727 30.72 6.516363 44.683636-7.447273 0-13.963636 0.930909-20.48 0.93091z m314.647273 75.403636l15.825455 53.992727-58.647273-32.581818c-21.410909 5.585455-42.821818 11.170909-64.232727 11.170909-102.4 0-182.458182-69.818182-182.458182-155.461818s80.058182-155.461818 182.458182-155.461818c96.814545 0 182.458182 69.818182 182.458182 155.461818 0 47.476364-31.650909 90.298182-75.403637 122.88z"
/></svg>
\ No newline at end of file
app_web/src/app-register.ts
浏览文件 @
6798ff9a
...
...
@@ -77,6 +77,7 @@ import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vu
import
IBizGroupPicker
from
'./components/ibiz-group-picker/ibiz-group-picker.vue'
import
AppWFApproval
from
'./components/app-wf-approval/app-wf-approval.vue'
import
Breadcrumb
from
'./components/app-breadcrumb/app-breadcrumb.vue'
;
import
AppTransfer
from
'./components/app-transfer/app-transfer.vue'
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
...
...
@@ -163,5 +164,6 @@ export const AppComponents = {
v
.
component
(
'ibiz-group-picker'
,
IBizGroupPicker
);
v
.
component
(
'app-wf-approval'
,
AppWFApproval
);
v
.
component
(
'app-breadcrumb'
,
Breadcrumb
);
v
.
component
(
'app-transfer'
,
AppTransfer
);
},
};
\ No newline at end of file
app_web/src/components/app-autocomplete/app-autocomplete.vue
浏览文件 @
6798ff9a
...
...
@@ -100,12 +100,20 @@ export default class AppAutocomplete extends Vue {
@
Prop
()
public
name
!
:
string
;
/**
*
编辑器
参数
*
局部上下文导航
参数
*
* @type {
string
}
* @type {
any
}
* @memberof AppAutocomplete
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@
Prop
()
public
localParam
!
:
any
;
/**
* 值项名称
...
...
@@ -119,7 +127,7 @@ export default class AppAutocomplete extends Vue {
* 值
*
* @type {*}
* @memberof App
Picker
* @memberof App
Autocomplete
*/
@
Model
(
'change'
)
public
value
?:
any
;
...
...
@@ -127,7 +135,7 @@ export default class AppAutocomplete extends Vue {
* 当前值
*
* @type {string}
* @memberof App
Picker
* @memberof App
Autocomplete
*/
public
curvalue
:
string
=
''
;
...
...
@@ -160,7 +168,7 @@ export default class AppAutocomplete extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof App
Picker
* @memberof App
Autocomplete
*/
@
Watch
(
'value'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
...
@@ -277,19 +285,19 @@ export default class AppAutocomplete extends Vue {
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
appPicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPicker
.formdataException'
)
as
any
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
AppAutocomplete.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppAutocomplete
.formdataException'
)
as
any
)
});
return
false
;
}
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
return
true
;
...
...
app_web/src/components/app-breadcrumb/app-breadcrumb.vue
浏览文件 @
6798ff9a
...
...
@@ -9,7 +9,7 @@
:key=
"item.path"
>
<span
v-if=
"i
tem.redirect === 'noredirect' || i
ndex === breadcrumbs.length-1"
v-if=
"index === breadcrumbs.length-1"
class=
"no-redirect"
>
{{
$t
(
item
.
meta
.
caption
)
}}
</span>
<a
...
...
@@ -22,64 +22,57 @@
</
template
>
<
script
lang=
"ts"
>
import
{
compile
}
from
'path-to-regexp'
import
{
Component
,
Vue
,
Watch
,
Prop
}
from
'vue-property-decorator'
import
{
RouteRecord
,
Route
}
from
'vue-router'
@
Component
({
name
:
'Breadcrumb'
})
export
default
class
extends
Vue
{
private
breadcrumbs
:
RouteRecord
[]
=
[]
export
default
class
Breadcrumb
extends
Vue
{
private
breadcrumbs
:
RouteRecord
[]
=
[];
//面包屑列表
@
Prop
()
public
defPSAppView
?:
any
;
@
Prop
()
public
defPSAppView
:
any
;
//默认视图
/**
* 监听路由
*
* @memberof Breadcrumb
*/
@
Watch
(
'$route'
)
private
onRouteChange
(
route
:
Route
)
{
// if you go to the redirect page, do not update the breadcrumbs
if
(
route
.
path
.
startsWith
(
'/redirect/'
))
{
return
}
this
.
getBreadcrumb
()
}
/**
* vue 生命周期
*
* @memberof Breadcrumb
*/
created
()
{
this
.
getBreadcrumb
()
}
/**
* 获取面包屑数据
*
* @memberof Breadcrumb
*/
private
getBreadcrumb
()
{
let
matched
=
this
.
$route
.
matched
.
filter
((
item
)
=>
item
.
meta
&&
item
.
meta
.
caption
)
const
first
=
matched
[
0
]
if
(
!
this
.
isDashboard
(
first
))
{
matched
=
[{
path
:
"/index/:index?"
,
meta
:
{
caption
:
'app.views.index.caption'
,
viewType
:
'APPINDEX'
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
],
requireAuth
:
true
,
}
}
as
RouteRecord
].
concat
(
matched
)
}
this
.
breadcrumbs
=
matched
.
filter
((
item
)
=>
{
return
item
.
meta
&&
item
.
meta
.
caption
&&
item
.
meta
.
breadcrumb
!==
false
this
.
breadcrumbs
=
this
.
$route
.
matched
.
filter
((
item
)
=>
{
return
item
.
meta
&&
item
.
meta
.
caption
})
if
(
this
.
defPSAppView
){
/**如果配置了默认视图,给面包屑第一级赋值默认视图为首页 */
}
private
isDashboard
(
route
:
RouteRecord
)
{
const
name
=
route
&&
route
.
meta
.
parameters
[
0
].
pathName
;
if
(
!
name
)
{
return
false
}
return
name
.
trim
().
toLocaleLowerCase
()
===
'index'
.
toLocaleLowerCase
()
}
private
pathCompile
(
item
:
any
)
{
const
{
params
,
path
,
query
}
=
item
;
return
{
params
,
path
,
query
};
}
/**
* 单机面包屑
*
* @memberof Breadcrumb
*/
private
handleLink
(
item
:
any
)
{
this
.
$router
.
push
(
this
.
pathCompile
(
item
)
).
catch
(
err
=>
{
this
.
$router
.
push
(
item
).
catch
(
err
=>
{
console
.
warn
(
err
);
});
}
...
...
app_web/src/components/app-checkbox-list/app-checkbox-list.vue
浏览文件 @
6798ff9a
...
...
@@ -57,23 +57,31 @@ export default class AppCheckBox extends Vue {
* 传入表单数据
*
* @type {*}
* @memberof
DropDownList
* @memberof
AppCheckBox
*/
@
Prop
()
public
data
?:
any
;
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {*}
* @memberof DropDownList
* @type {any}
* @memberof AppCheckBox
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof App
Autocomplete
* @memberof App
CheckBox
*/
@
Prop
()
public
context
!
:
any
;
...
...
@@ -81,7 +89,7 @@ export default class AppCheckBox extends Vue {
* 视图参数
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
CheckBox
*/
@
Prop
()
public
viewparams
!
:
any
;
...
...
@@ -203,19 +211,19 @@ export default class AppCheckBox extends Vue {
*
* @param {*} arg
* @returns
* @memberof
DropDownList
* @memberof
AppCheckBox
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
@@ -253,7 +261,7 @@ export default class AppCheckBox extends Vue {
/**
* 监听表单数据变化
*
* @memberof App
OrgSelect
* @memberof App
CheckBox
*/
@
Watch
(
'data'
,{
immediate
:
true
,
deep
:
true
})
onDataChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
...
app_web/src/components/app-embed-picker/app-embed-picker.vue
浏览文件 @
6798ff9a
...
...
@@ -62,7 +62,7 @@ export default class AppEmbedPicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
@
Prop
()
public
data
!
:
any
;
...
...
@@ -95,7 +95,7 @@ export default class AppEmbedPicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
@
Prop
()
public
valueItem
?:
string
;
...
...
@@ -103,7 +103,7 @@ export default class AppEmbedPicker extends Vue {
* 关联视图名称
*
* @type {string}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
@
Prop
()
public
refviewname
?:
string
;
...
...
@@ -127,17 +127,25 @@ export default class AppEmbedPicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
@
Prop
()
public
name
!
:
string
;
/**
*
关联视图
参数
*
局部上下文导航
参数
*
* @type {
*
}
* @type {
any
}
* @memberof AppEmbedPicker
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@
Prop
()
public
localParam
!
:
any
;
/**
* 是否忽略之变化
...
...
@@ -160,8 +168,8 @@ export default class AppEmbedPicker extends Vue {
*
* @memberof AppEmbedPicker
*/
public
setViewParam
(
activeData
:
any
)
{
if
(
!
this
.
itemParam
||
!
activeD
ata
)
{
public
setViewParam
()
{
if
(
!
this
.
d
ata
)
{
return
;
}
let
arg
:
any
=
{};
...
...
@@ -169,17 +177,13 @@ export default class AppEmbedPicker extends Vue {
let
param
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
activeData
,
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
param
,
_param
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localContext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
parentdata
)
{
let
_par
entdata
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
parentdata
);
Object
.
assign
(
param
,
_parentdata
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_par
am
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localParam
);
Object
.
assign
(
arg
.
param
,
_param
);
}
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewparam
=
JSON
.
stringify
(
param
);
...
...
@@ -196,7 +200,7 @@ export default class AppEmbedPicker extends Vue {
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
const
newFormData
:
any
=
JSON
.
parse
(
newVal
);
const
oldDormData
:
any
=
JSON
.
parse
(
oldVal
);
this
.
setViewParam
(
newFormData
);
this
.
setViewParam
();
if
(
!
this
.
refreshitems
||
this
.
ignorefieldvaluechange
)
{
return
;
}
...
...
@@ -215,7 +219,7 @@ export default class AppEmbedPicker extends Vue {
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
setViewParam
(
JSON
.
parse
(
this
.
data
)
);
this
.
setViewParam
();
}
});
}
...
...
app_web/src/components/app-form-druipart/app-form-druipart.vue
浏览文件 @
6798ff9a
...
...
@@ -4,6 +4,7 @@
:is=
"viewname"
class=
"viewcontainer2"
:viewdata =
"viewdata"
:viewparam=
"viewparam"
:viewDefaultUsage=
"false"
:formDruipart=
"formDruipart"
:isformDruipart=
"true"
...
...
@@ -119,6 +120,22 @@ export default class AppFormDRUIPart extends Vue {
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 局部上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
localParam
!
:
any
;
/**
* 应用实体参数名称
*
...
...
@@ -240,21 +257,32 @@ export default class AppFormDRUIPart extends Vue {
}
const
formData
:
any
=
data
?
data
:
JSON
.
parse
(
this
.
data
);
const
_paramitem
=
formData
[
this
.
paramItem
];
let
viewdata
=
{};
Object
.
assign
(
viewdata
,
this
.
$viewTool
.
getIndexViewParam
());
let
tempContext
:
any
=
{};
let
tempParam
:
any
=
{};
Object
.
assign
(
tempContext
,
this
.
$viewTool
.
getIndexViewParam
());
const
_parameters
:
any
[]
=
[...
this
.
$viewTool
.
getIndexParameters
(),
...
this
.
parameters
];
_parameters
.
forEach
((
parameter
:
any
)
=>
{
const
{
pathName
,
parameterName
}:
{
pathName
:
string
,
parameterName
:
string
}
=
parameter
;
if
(
formData
[
parameterName
]
&&
!
Object
.
is
(
formData
[
parameterName
],
''
))
{
Object
.
assign
(
viewdata
,
{
[
parameterName
]:
formData
[
parameterName
]
});
Object
.
assign
(
tempContext
,
{
[
parameterName
]:
formData
[
parameterName
]
});
}
});
Object
.
assign
(
viewdata
,
{
[
this
.
paramItem
]:
_paramitem
});
Object
.
assign
(
tempContext
,
{
[
this
.
paramItem
]:
_paramitem
});
//设置顶层视图唯一标识
Object
.
assign
(
viewdata
,
this
.
context
);
Object
.
assign
(
viewdata
,{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
});
this
.
viewdata
=
JSON
.
stringify
(
viewdata
);
this
.
viewparam
=
JSON
.
stringify
(
this
.
viewparams
);
Object
.
assign
(
tempContext
,
this
.
context
);
Object
.
assign
(
tempContext
,{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
});
// 设置局部上下文
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
){
let
_context
:
any
=
this
.
$util
.
computedNavData
(
formData
,
tempContext
,
this
.
viewparams
,
this
.
localContext
);
Object
.
assign
(
tempContext
,
_context
);
}
this
.
viewdata
=
JSON
.
stringify
(
tempContext
);
// 设置局部参数
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
){
let
_param
:
any
=
this
.
$util
.
computedNavData
(
formData
,
tempContext
,
this
.
viewparams
,
this
.
localParam
);
Object
.
assign
(
tempParam
,
_param
);
}
this
.
viewparam
=
JSON
.
stringify
(
tempParam
);
if
(
this
.
isRelationalData
)
{
if
(
!
_paramitem
||
_paramitem
==
null
||
Object
.
is
(
_paramitem
,
''
))
{
this
.
blockUIStart
();
...
...
app_web/src/components/app-mpicker/app-mpicker.vue
浏览文件 @
6798ff9a
...
...
@@ -45,12 +45,20 @@ export default class AppMpicker extends Vue {
@
Prop
()
curvalue
?:
any
;
/**
*
表单项
参数
*
局部上下文导航
参数
*
* @type {any}
* @memberof AppPicker
* @memberof AppMpicker
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppMpicker
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 表单项名称
...
...
@@ -61,7 +69,7 @@ export default class AppMpicker extends Vue {
* 视图上下文
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
@
Prop
()
public
context
!
:
any
;
...
...
@@ -69,7 +77,7 @@ export default class AppMpicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
@
Prop
()
public
viewparams
!
:
any
;
...
...
@@ -77,7 +85,7 @@ export default class AppMpicker extends Vue {
* AC参数
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
...
...
@@ -85,7 +93,7 @@ export default class AppMpicker extends Vue {
* 应用实体主信息属性名称
*
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Mpicker
*/
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
...
...
@@ -93,7 +101,7 @@ export default class AppMpicker extends Vue {
* 应用实体主键属性名称
*
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Mpicker
*/
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
...
...
@@ -101,7 +109,7 @@ export default class AppMpicker extends Vue {
* 表单服务
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
@
Prop
()
public
service
?:
any
;
...
...
@@ -242,19 +250,19 @@ export default class AppMpicker extends Vue {
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
activeData
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
appPicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appP
icker.formdataException'
)
as
any
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
AppMpicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppMp
icker.formdataException'
)
as
any
)
});
return
false
;
}
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
activeData
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
activeData
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
activeData
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
activeData
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
return
true
;
...
...
app_web/src/components/app-picker-select-view/app-picker-select-view.vue
浏览文件 @
6798ff9a
此差异已折叠。
点击以展开。
app_web/src/components/app-picker/app-picker.vue
浏览文件 @
6798ff9a
...
...
@@ -153,12 +153,20 @@ export default class AppPicker extends Vue {
@
Prop
()
public
linkview
?:
any
;
/**
*
表单项
参数
*
局部上下文导航
参数
*
* @type {any}
* @memberof AppPicker
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppPicker
*/
@
Prop
()
public
localParam
!
:
any
;
/**
* 值项名称
...
...
@@ -639,9 +647,6 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
itemParam
)
{
return
true
;
}
if
(
!
this
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.appPicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPicker.formdataException'
)
as
any
)
});
return
false
;
...
...
@@ -650,12 +655,12 @@ export default class AppPicker extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
return
true
;
...
...
app_web/src/components/app-radio-group/app-radio-group.vue
浏览文件 @
6798ff9a
...
...
@@ -65,14 +65,14 @@ export default class AppRadioGroup extends Vue {
* 传入表单数据
*
* @type {*}
* @memberof
DropDownList
* @memberof
AppRadioGroup
*/
@
Prop
()
public
data
?:
any
;
/**
* 监听表单数据变化
*
* @memberof App
OrgSelect
* @memberof App
RadioGroup
*/
@
Watch
(
'data'
,{
immediate
:
true
,
deep
:
true
})
onDataChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
...
@@ -103,18 +103,26 @@ export default class AppRadioGroup extends Vue {
@
Prop
()
public
disabled
?:
boolean
;
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {*}
* @memberof DropDownList
* @type {any}
* @memberof AppRadioGroup
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof App
Autocomplete
* @memberof App
RadioGroup
*/
@
Prop
()
public
context
!
:
any
;
...
...
@@ -122,7 +130,7 @@ export default class AppRadioGroup extends Vue {
* 视图参数
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
RadioGroup
*/
@
Prop
()
public
viewparams
!
:
any
;
...
...
@@ -161,19 +169,19 @@ export default class AppRadioGroup extends Vue {
*
* @param {*} arg
* @returns
* @memberof
DropDownList
* @memberof
AppRadioGroup
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
app_web/src/components/app-span/app-span.vue
浏览文件 @
6798ff9a
<
template
>
<codelist
v-if=
"tag"
:tag=
"tag"
:value=
"value"
:codelistType=
"codelistType"
:renderMode=
"renderMode"
:valueSeparator=
"valueSeparator"
:textSeparator=
"textSeparator"
:data=
"data"
:
itemParam=
"item
Param"
:context=
"context"
:viewparams=
"viewparams"
></codelist>
<codelist
v-if=
"tag"
:tag=
"tag"
:value=
"value"
:codelistType=
"codelistType"
:renderMode=
"renderMode"
:valueSeparator=
"valueSeparator"
:textSeparator=
"textSeparator"
:data=
"data"
:
localContext=
"localContext"
:localParam=
"local
Param"
:context=
"context"
:viewparams=
"viewparams"
></codelist>
<app-upload-file-info
v-else-if=
"Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')"
:value=
"value"
:name=
"name"
></app-upload-file-info>
<span
class=
"app-span"
v-else
>
{{
text
}}
</span>
</
template
>
...
...
@@ -72,12 +72,20 @@ export default class AppSpan extends Vue {
@
Prop
()
public
data
?:
any
;
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {
*
}
* @type {
any
}
* @memberof AppSpan
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppSpan
*/
@
Prop
()
public
localParam
!
:
any
;
/**
* 视图上下文
...
...
@@ -137,9 +145,8 @@ export default class AppSpan extends Vue {
* @memberof AppSpan
*/
public
load
(){
if
(
!
this
.
value
||
this
.
tag
){
if
(
this
.
tag
){
return
;
//代码表走codelist组件
}
else
if
(
this
.
editorType
===
"ADDRESSPICKUP"
){
JSON
.
parse
(
this
.
value
).
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
text
+=
index
===
0
?
item
.
srfmajortext
:
","
+
item
.
srfmajortext
;
...
...
app_web/src/components/app-transfer/app-transfer.less
0 → 100644
浏览文件 @
6798ff9a
.ivu-select-dropdown {
padding: 0px;
.hidden {
display: none;
}
}
\ No newline at end of file
app_web/src/components/app-transfer/app-transfer.vue
0 → 100644
浏览文件 @
6798ff9a
<
template
>
<Select
@
on-open-change=
"transferRefresh"
@
on-change=
"dataChange"
v-model=
"dataRight"
:style=
"
{width:width}"
multiple
>
<Option
class=
"hidden"
:value=
"item"
v-for=
"(item,i) in dataRight"
:key=
"i"
>
{{
findLabel
(
item
)
}}
</Option>
<el-transfer
v-model=
"dataRight"
:data=
"dataLeft"
@
change=
"dataChange"
:titles=
"['未选择', '已选择']"
></el-transfer>
</Select>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
"vue-property-decorator"
;
import
CodeListService
from
"@service/app/codelist-service"
;
import
{
ElSelect
}
from
"element-ui/types/select"
;
@
Component
({})
export
default
class
AppTransfer
extends
Vue
{
/**
* 左侧框数据
*/
public
dataLeft
:
any
[]
=
[];
/**
* 右侧框数据
*/
public
dataRight
:
any
[]
=
[];
/**
* 穿梭框宽度
*/
@
Prop
()
public
width
:
any
;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof AppTransfer
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 查询参数
* @type {*}
* @memberof AppTransfer
*/
public
queryParam
:
any
;
/**
* 表单传入字符串值分隔符
*/
@
Prop
()
public
valueSeparator
?:
string
;
/**
* 当前选中值
* @type {any}
* @memberof AppTransfer
*/
@
Model
(
"change"
)
public
itemValue
!
:
any
;
/**
* 代码表标识
*
* @type {string}
* @memberof AppTransfer
*/
@
Prop
()
public
tag
?:
string
;
/**
* 代码表类型
*
* @type {string}
* @memberof AppTransfer
*/
@
Prop
()
public
codelistType
?:
string
;
/**
* 组件change事件,右侧框数据变化时
* @memberof AppTransfer
*/
dataChange
(
e
:
any
)
{
let
newVal
:
any
;
newVal
=
e
.
join
(
`
${
this
.
valueSeparator
}
`
);
if
(
newVal
)
{
this
.
$emit
(
"change"
,
newVal
);
}
else
{
this
.
$emit
(
"change"
,
null
);
}
}
/**
* 传入额外参数
*
* @type {*}
* @memberof AppTransfer
*/
@
Prop
()
public
itemParam
?:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 是否禁用
* @type {any}
* @memberof AppTransfer
*
*/
@
Prop
()
public
disabled
?:
any
;
/**
* 是否支持过滤
* @type {boolean}
* @memberof AppTransfer
*/
@
Prop
()
public
filterable
?:
boolean
;
/**
* 下拉选提示内容
* @type {string}
* @memberof AppTransfer
*/
@
Prop
()
public
placeholder
?:
string
;
/**
* vue 生命周期
*
* @memberof AppTransfer
*/
public
created
()
{
this
.
dataHandle
();
}
/**
* 数据处理
*/
public
dataHandle
()
{
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"STATIC"
))
{
const
codelist
=
this
.
$store
.
getters
.
getCodeList
(
this
.
tag
);
if
(
codelist
)
{
this
.
dataLeft
=
[...
JSON
.
parse
(
JSON
.
stringify
(
codelist
.
items
))];
this
.
initLeft
();
this
.
initRight
();
}
else
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
}
}
else
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
))
{
// 处理公共参数
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
)
.
then
((
res
:
any
)
=>
{
this
.
dataLeft
=
res
;
this
.
initLeft
();
this
.
initRight
();
})
.
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
});
}
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppTransfer
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
itemValue
,
arg
.
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
itemValue
,
arg
.
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
/**
* 初始化左侧框数据
*/
public
initLeft
()
{
let
left
:
any
[]
=
[];
Object
.
assign
(
left
,
this
.
dataLeft
);
this
.
dataLeft
=
[];
left
.
forEach
((
elem
:
any
,
i
:
any
)
=>
{
this
.
dataLeft
.
push
({
key
:
elem
.
id
,
value
:
elem
.
value
,
label
:
elem
.
label
,
disabled
:
elem
.
disabled
});
});
}
/**
* 初始化右侧框数据
*/
public
initRight
()
{
let
_data
:
any
=
this
.
itemValue
;
if
(
_data
)
{
let
newData
:
any
[]
=
_data
.
split
(
`
${
this
.
valueSeparator
}
`
);
this
.
dataLeft
.
forEach
((
elem
:
any
)
=>
{
newData
.
forEach
((
item
:
any
)
=>
{
if
(
item
===
elem
.
value
)
{
this
.
dataRight
.
push
(
elem
.
key
);
}
});
});
}
}
/**
* 穿梭框打开时刷新数据
*/
public
transferRefresh
(
e
:
any
)
{
if
(
e
&&
this
.
codelistType
===
"DYNAMIC"
)
{
this
.
dataLeft
=
[];
this
.
dataRight
=
[];
this
.
dataHandle
();
}
}
/**
* 找到dataLeft中key与dataRight中item相等的元素,返回label
*/
public
findLabel
(
item
:
any
)
{
for
(
const
elem
of
this
.
dataLeft
)
{
if
(
elem
.
key
===
item
)
return
elem
.
label
;
}
}
}
</
script
>
<
style
lang=
'less'
>
@import "./app-transfer.less";
</
style
>
\ No newline at end of file
app_web/src/components/app-tree-picker/app-tree-picker.vue
浏览文件 @
6798ff9a
...
...
@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
* 视图上下文
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
TreePicker
*/
@
Prop
()
public
context
!
:
any
;
...
...
@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
TreePicker
*/
@
Prop
()
public
viewparams
!
:
any
;
...
...
@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
@
Prop
()
public
data
!
:
any
;
...
...
@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
* 是否启用
*
* @type {boolean}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
@
Prop
({
default
:
false
})
public
disabled
!
:
boolean
;
...
...
@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
@
Prop
()
public
valueItem
?:
string
;
...
...
@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
* 关联视图名称
*
* @type {string}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
@
Prop
()
public
refviewname
?:
string
;
...
...
@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
@
Prop
()
public
name
!
:
string
;
/**
*
关联视图
参数
*
局部上下文导航
参数
*
* @type {*}
* @type {any}
* @memberof AppTreePicker
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppTreePicker
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 是否忽略之变化
...
...
@@ -210,8 +218,8 @@ export default class AppTreePicker extends Vue {
*
* @memberof AppTreePicker
*/
public
setViewParam
(
activeData
:
any
)
{
if
(
!
this
.
itemParam
||
!
activeD
ata
)
{
public
setViewParam
()
{
if
(
!
this
.
d
ata
)
{
return
;
}
let
arg
:
any
=
{};
...
...
@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue {
let
param
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
activeData
,
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
param
,
_param
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localContext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
parentdata
)
{
let
_par
entdata
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
parentdata
);
Object
.
assign
(
param
,
_parentdata
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_par
am
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localParam
);
Object
.
assign
(
arg
.
param
,
_param
);
}
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewparam
=
JSON
.
stringify
(
param
);
...
...
@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof App
FormDRUIPart
* @memberof App
TreePicker
*/
@
Watch
(
'data'
)
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
const
newFormData
:
any
=
JSON
.
parse
(
newVal
);
const
oldDormData
:
any
=
JSON
.
parse
(
oldVal
);
this
.
setViewParam
(
newFormData
);
this
.
setViewParam
();
if
(
!
this
.
refreshitems
||
this
.
ignorefieldvaluechange
)
{
return
;
}
...
...
@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
@
Watch
(
'value'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
...
@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue {
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
setViewParam
(
JSON
.
parse
(
this
.
data
)
);
this
.
setViewParam
();
}
});
}
...
...
@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue {
/**
* vue 生命周期
*
* @memberof
SelectType
* @memberof
AppTreePicker
*/
public
destroyed
()
{
if
(
this
.
formStateEvent
)
{
...
...
app_web/src/components/app-user/app-user.vue
浏览文件 @
6798ff9a
...
...
@@ -86,6 +86,9 @@ export default class AppUser extends Vue {
if
(
response
&&
response
.
status
===
200
)
{
localStorage
.
removeItem
(
'user'
);
localStorage
.
removeItem
(
'token'
);
let
leftTime
=
new
Date
();
leftTime
.
setTime
(
leftTime
.
getSeconds
()
-
1
);
document
.
cookie
=
"ibzuaa-token=;expires="
+
leftTime
.
toUTCString
();
this
.
$router
.
push
({
name
:
'login'
});
}
}).
catch
((
error
:
any
)
=>
{
...
...
app_web/src/components/codelist/codelist.vue
浏览文件 @
6798ff9a
...
...
@@ -79,12 +79,20 @@ export default class CodeList extends Vue {
@
Prop
()
public
data
?:
any
;
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {*}
* @type {any}
* @memberof CodeList
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof CodeList
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 视图上下文
...
...
@@ -270,12 +278,12 @@ export default class CodeList extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
app_web/src/components/context-menu/context-menu.less
浏览文件 @
6798ff9a
...
...
@@ -12,6 +12,11 @@
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
.tree-right-menu{
.ivu-select-dropdown{
overflow: auto;
}
}
.ivu-divider{
width: 100%;
}
...
...
app_web/src/components/dropdown-list-dynamic/dropdown-list-dynamic.vue
浏览文件 @
6798ff9a
...
...
@@ -86,12 +86,20 @@ export default class DropDownListDynamic extends Vue {
}
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {*}
* @memberof DropDownListDynamic
* @memberof DropDownList
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 是否禁用
...
...
@@ -172,12 +180,12 @@ export default class DropDownListDynamic extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
app_web/src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
6798ff9a
...
...
@@ -85,12 +85,20 @@ export default class DropDownListMpicker extends Vue {
@
Prop
()
public
placeholder
?:
string
;
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {*}
* @type {any}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
* 视图上下文
...
...
@@ -157,12 +165,12 @@ export default class DropDownListMpicker extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
app_web/src/components/dropdown-list/dropdown-list.vue
浏览文件 @
6798ff9a
...
...
@@ -86,12 +86,20 @@ export default class DropDownList extends Vue {
}
/**
*
传入额外
参数
*
局部上下文导航
参数
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
localParam
!
:
any
;
/**
* 视图上下文
...
...
@@ -172,12 +180,12 @@ export default class DropDownList extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
app_web/src/components/login/login.less
浏览文件 @
6798ff9a
.login{
width: 100vh;
height: 100vh;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
min-height: 100%;
background: #108cee;
> img{
width: 100vw;
height: 100vh;
}
.login-logo{
position: fixed;
left: 80px;
top: 80px;
}
.login-content{
position: fixed;
left: 10%;
top: 30%;
width: 60%;
>span{
color: #fff;
font-size: 84px;
}
}
&-con{
position: fixed;
right: 160px;
top: 50%;
transform: translateY(-60%);
width: 300px;
.ivu-card{
border-radius: 15px;
position: absolute;
left: 0;
right: 0;
top: 20%;
margin: auto;
width: 450px;
.ivu-card-head {
padding: 14px 6px;
padding: 30px 0px 20px 0px;
border-bottom: 0px;
>p{
line-height: 20px;
height: 30px;
line-height: 30px;
font-size: 20px;
color: #17233d;
font-weight: 700;
text-align:center;
color: #666666;
font-weight: 600;
}
}
&-header{
...
...
@@ -45,26 +38,81 @@
padding: 30px 0;
}
.form-con{
padding: 10px 0 0;
.ivu-form-item{
margin-bottom: 20px;
}
p{
font-size: 14px;
font-weight: bold;
height: 21px;
line-height: 21px;
}
button{
background-image: linear-gradient(to bottom,#8bbcf1 0%,#2d8cf0 100%);
border-color:#8bbcf1;
padding: 0px 20px 0px 20px;
>i-button{
width: 170px;
height: 40px;
}
}
.login-tip{
font-size: 10px;
text-align: center;
color: #5f4949;
}
color: red;
height: 30px;
}
}
}
.login_btn{
width: 175px;
height: 40px;
font-size: 18px;
font-family: MicrosoftYaHei;
}
.login_reset {
width: 175px;
height: 40px;
font-size: 18px;
font-family: MicrosoftYaHei;
float: right;
}
.form_tipinfo {
font-family: MicrosoftYaHei-Bold;
font-size: 14px;
font-weight: bold;
font-stretch: normal;
line-height: 24px;
letter-spacing: 0px;
color: #666666;
}
form_tipinfo_more {
font-family: MicrosoftYaHei;
font-size: 14px;
font-weight: normal;
letter-spacing: 0px;
color: #666666;
}
.log_footer {
display: block;
padding: 0 16px;
margin: 48px 0 24px;
text-align: center;
color: #212529;
}
.log_footer a {
color: white;
text-decoration: none;
}
.sign-btn {
display: inline-block;
cursor: pointer;
margin-left: 10px;
}
.wx-svg-container,
.qq-svg-container {
display: inline-block;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
padding-top: 1px;
border-radius: 4px;
margin-bottom: -20px;
margin-top: 10px;
}
\ No newline at end of file
app_web/src/components/login/login.vue
浏览文件 @
6798ff9a
此差异已折叠。
点击以展开。
app_web/src/components/tab-page-exp/tab-page-exp.less
浏览文件 @
6798ff9a
// .ibiz-page-tag {
// position: relative;
// box-sizing: border-box;
// // width: calc(100% + 30px);
// height: 38px;
// padding: 0 60px 0 30px;
// background: #f6f6f6;
// .tags-body {
// position: relative;
// width: 100%;
// height: 100%;
// overflow: hidden;
// .tags-container {
// position: absolute;
// overflow: visible;
// white-space: nowrap;
// transition: left .3s ease;
// .ivu-tag {
// margin: 0;
// height: 38px;
// line-height: 38px;
// border: 0;
// border-radius: 0;
// border-right: 1px solid #ddd;
// font-size: 14px;
// .text-icon {
// height: 16px;
// margin-bottom: -3px;
// }
// .ivu-icon-ios-close {
// visibility: hidden;
// }
// .tag-text {
// display: table-cell;
// .ivu-tooltip {
// display: block;
// .ivu-tooltip-rel {
// display: block;
// max-width: 200px;
// overflow: hidden;
// text-overflow: ellipsis;
// }
// }
// }
// }
// .ivu-tag.tag-is-active {
// background: #fff;
// }
// .ivu-tag:hover,.ivu-tag.tag-is-active {
// .ivu-icon-ios-close {
// visibility: initial;
// }
// }
// }
// }
// .move-btn {
// font-size: 18px;
// width: 30px;
// height: 38px;
// line-height: 38px;
// border-left: 1px solid #ddd;
// border-right: 1px solid #ddd;
// text-align: center;
// cursor: pointer;
// }
// .move-btn:hover {
// background: #efefef;
// }
// .move-left, .move-right, .ivu-dropdown{
// position: absolute;
// top: 0;
// }
// .move-left {
// left: 0;
// }
// .move-right {
// right: 30px;
// }
// .ivu-dropdown {
// right: 0;
// }
// }
// .tags-transition-move {
// transition: transform .3s;
// }
// .tags-transition-enter,.tags-transition-leave-to{
// opacity: 0;
// }
.ibiz-page-tag {
position: relative;
.left{
.el-tabs__header{
padding-right:120px;
}
}
.right{
position: absolute;
right:0px;
top:0px;
width:120px;
margin:5px 0px;
display: flex;
justify-content: center;
}
>.tag-tabs{
background-color: #F0F0F0 !important;
.el-tabs{
.el-tabs__nav{
padding:0px 10px;
border:none;
}
.el-tabs__active-bar{
background-color: transparent !important;
}
.el-tabs__item{
color:#ccc;
border:none;
height: 32px;
line-height: 32px;
border: 1px solid #e8eaec!important;
color: #515a6e!important;
background: #fff!important;
padding: 0 12px;
display: inline-block;
margin: 4px 4px 4px 0;
border-radius: 3px;
font-size: 12px;
vertical-align: middle;
opacity: 1;
overflow: hidden;
.ivu-tag-dot-inner{
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
background: #e8eaec;
position: relative;
top: 1px;
}
}
.el-tabs__item:hover{
color:#409eff;
}
.is-active{
color:#409eff;
border-bottom:2px solid #409eff !important;
.ivu-tag-dot-inner{
background-color:#409eff !important;
}
.el-tabs__nav-scroll{
background-color: white;
border-bottom:2px solid transparent !important;
}
.el-tabs__header{
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
margin:0 0 1 0;
}
}
}
}
\ No newline at end of file
app_web/src/components/tab-page-exp/tab-page-exp.vue
浏览文件 @
6798ff9a
<
template
>
<div
class=
"ibiz-page-tag"
>
<div
class=
"tag-tabs left"
>
<el-tabs
type=
"card"
@
tab-click=
"changePage"
...
...
@@ -9,12 +10,25 @@
>
<el-tab-pane
v-for=
"(meta, index) of $store.state.pageMetas"
:label=
"getCaption(meta.caption, meta.info)"
:name=
"index+''"
:key=
"index+''"
></el-tab-pane>
>
<span
slot=
"label"
><span
class=
"ivu-tag-dot-inner"
></span>
{{
getCaption
(
meta
.
caption
,
meta
.
info
)
}}
</span>
</el-tab-pane>
</el-tabs>
</div>
<div
v-show=
"$store.state.pageMetas.length > 0"
class=
"right"
>
<el-dropdown
@
command=
"handlerClose"
>
<el-button
size=
"mini"
type=
"primary"
>
更多
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:command=
"item"
v-for=
"(item,index) in actions"
:key=
"index"
>
{{
$t
(
item
.
text
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -23,6 +37,7 @@ import { Environment } from "../../environments/environment";
@
Component
({})
export
default
class
TabPageExp
extends
Vue
{
@
Provide
()
public
styleLeft
:
number
=
0
;
...
...
@@ -32,7 +47,14 @@ export default class TabPageExp extends Vue {
{
text
:
"app.tabpage.closeother"
,
value
:
"closeOther"
}
];
public
editableTabsValue
:
any
=
""
;
/**
* 关闭tab页方法
*/
public
handlerClose
(
item
:
any
){
this
.
doTagAction
(
item
.
value
);
}
public
editableTabsValue
:
any
=
""
;
//tabs页绑定值
@
Watch
(
"$route"
)
public
onRouteChange
(
newVal
:
any
)
{
...
...
app_web/src/engine/view/edit-view-engine.ts
浏览文件 @
6798ff9a
...
...
@@ -101,7 +101,7 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine
*/
public
onFormLoad
(
arg
:
any
):
void
{
this
.
view
.
model
.
dataInfo
=
Object
.
is
(
arg
.
srfuf
,
'1'
)
?
arg
.
srfmajortext
:
'新建'
;
this
.
view
.
model
.
dataInfo
=
Object
.
is
(
arg
.
srfuf
,
'1'
)
?
(
this
.
majorPSDEField
?
arg
[
this
.
majorPSDEField
]:
arg
.
srfmajortext
)
:
this
.
view
.
$t
(
'app.local.new'
)
;
this
.
setTabCaption
(
this
.
view
.
model
.
dataInfo
);
const
newdata
:
boolean
=
!
Object
.
is
(
arg
.
srfuf
,
'1'
);
...
...
@@ -115,7 +115,7 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine
*/
public
onFormSave
(
arg
:
any
):
void
{
this
.
view
.
model
.
dataInfo
=
Object
.
is
(
arg
.
srfuf
,
'1'
)
?
arg
.
srfmajortext
:
'新建'
;
this
.
view
.
model
.
dataInfo
=
Object
.
is
(
arg
.
srfuf
,
'1'
)
?
(
this
.
majorPSDEField
?
arg
[
this
.
majorPSDEField
]:
arg
.
srfmajortext
)
:
this
.
view
.
$t
(
'app.local.new'
)
;
this
.
setTabCaption
(
this
.
view
.
model
.
dataInfo
);
const
newdata
:
boolean
=
!
Object
.
is
(
arg
.
srfuf
,
'1'
);
...
...
@@ -248,7 +248,10 @@ export default class EditViewEngine extends ViewEngine {
public
setTabCaption
(
info
:
string
):
void
{
let
viewdata
:
any
=
this
.
view
.
model
;
if
(
viewdata
&&
info
&&
!
Object
.
is
(
info
,
''
)
&&
this
.
view
.
$tabPageExp
&&
(
viewdata
.
srfTitle
.
indexOf
(
" - "
)
===
-
1
))
{
this
.
view
.
$tabPageExp
.
setCurPageCaption
(
viewdata
.
srfCaption
,
viewdata
.
srfTitle
,
info
);
this
.
view
.
$tabPageExp
.
setCurPageCaption
(
viewdata
.
srfTitle
,
viewdata
.
srfTitle
,
info
);
if
(
this
.
view
.
$route
){
this
.
view
.
$route
.
meta
.
info
=
info
;
}
this
.
view
.
model
.
srfTitle
=
`
${
this
.
view
.
$t
(
viewdata
.
srfTitle
)}
-
${
viewdata
.
dataInfo
}
`
;
}
}
...
...
app_web/src/engine/view/kan-ban-view-engine.ts
0 → 100644
浏览文件 @
6798ff9a
import
DataViewEngine
from
'./data-view-engine'
;
/**
* 视图引擎基础
*
* @export
* @class DataViewEngine
* @extends {MDViewEngine}
*/
export
default
class
KanBanViewEngine
extends
DataViewEngine
{
/**
* 表格部件
*
* @type {*}
* @memberof DataViewEngine
*/
protected
kanban
:
any
;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof DataViewEngine
*/
public
init
(
options
:
any
=
{}):
void
{
this
.
kanban
=
options
.
kanban
;
super
.
init
(
options
);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewEngine
*/
public
onCtrlEvent
(
ctrlName
:
string
,
eventName
:
string
,
args
:
any
):
void
{
if
(
Object
.
is
(
ctrlName
,
'kanban'
))
{
this
.
MDCtrlEvent
(
eventName
,
args
);
}
super
.
onCtrlEvent
(
ctrlName
,
eventName
,
args
);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof DataViewEngine
*/
public
getMDCtrl
():
any
{
return
this
.
kanban
;
}
}
\ No newline at end of file
app_web/src/locale/index.ts
浏览文件 @
6798ff9a
...
...
@@ -26,7 +26,8 @@ vueApp.locale = () => { };
const
i18n
=
new
VueI18n
({
locale
:
lang
,
messages
messages
,
silentTranslationWarn
:
true
});
export
default
i18n
;
app_web/src/locale/lang/en-US.ts
浏览文件 @
6798ff9a
...
...
@@ -11,6 +11,9 @@ export default {
ok
:
'OK'
,
cancel
:
'Cancel'
,
},
local
:{
new
:
'New'
},
gridpage
:
{
choicecolumns
:
'Choice columns'
,
refresh
:
'refresh'
,
...
...
app_web/src/locale/lang/zh-CN.ts
浏览文件 @
6798ff9a
...
...
@@ -11,6 +11,9 @@ export default {
ok
:
'确认'
,
cancel
:
'取消'
,
},
local
:{
new
:
'新建'
},
gridpage
:
{
choicecolumns
:
'选择列'
,
refresh
:
'刷新'
,
...
...
app_web/src/locale/lanres/entities/sdfile/sdfile_en_US.ts
浏览文件 @
6798ff9a
...
...
@@ -3,11 +3,11 @@ export default {
views
:
{
gridview
:
{
caption
:
"文件"
,
title
:
'文件'
,
title
:
'文件
表格视图
'
,
},
editview
:
{
caption
:
"文件"
,
title
:
'文件'
,
title
:
'文件
编辑视图
'
,
},
},
main_form
:
{
...
...
app_web/src/locale/lanres/entities/sdfile/sdfile_zh_CN.ts
浏览文件 @
6798ff9a
...
...
@@ -2,11 +2,11 @@ export default {
views
:
{
gridview
:
{
caption
:
'文件'
,
title
:
'文件'
,
title
:
'文件
表格视图
'
,
},
editview
:
{
caption
:
'文件'
,
title
:
'文件'
,
title
:
'文件
编辑视图
'
,
},
},
main_form
:
{
...
...
app_web/src/pages/disk/sdfile-edit-view/sdfile-edit-view-base.vue
浏览文件 @
6798ff9a
...
...
@@ -663,7 +663,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -692,7 +691,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -721,7 +719,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -750,7 +747,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -779,7 +775,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -808,7 +803,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -837,7 +831,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -866,7 +859,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -895,7 +887,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -924,7 +915,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -953,7 +943,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -982,7 +971,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1011,7 +999,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1040,7 +1027,6 @@ export default class SDFileEditViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
app_web/src/pages/disk/sdfile-grid-view/sdfile-grid-view-base.vue
浏览文件 @
6798ff9a
...
...
@@ -763,7 +763,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -792,7 +791,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -821,7 +819,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -850,7 +847,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -879,7 +875,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -908,7 +903,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -937,7 +931,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -966,7 +959,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -995,7 +987,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1024,7 +1015,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1053,7 +1043,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1082,7 +1071,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1111,7 +1099,6 @@ export default class SDFileGridViewBase extends Vue {
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
...
...
@@ -1135,14 +1122,16 @@ export default class SDFileGridViewBase extends Vue {
* @memberof SDFileGridView
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
if
(
args
[
0
].
srfsourcekey
){
data
.
srfsourcekey
=
args
[
0
].
srfsourcekey
;
}
let
curViewParam
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
delete
curViewParam
.
sdfile
;
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
delete
tempContext
.
sdfile
;
if
(
args
.
length
>
0
){
Object
.
assign
(
curViewParam
,
args
[
0
]);
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
...
...
@@ -1150,7 +1139,7 @@ export default class SDFileGridViewBase extends Vue {
];
const
_this
:
any
=
this
;
const
openDrawer
=
(
view
:
any
,
data
:
any
)
=>
{
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
curViewParam
,
data
);
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
tempContext
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
...
...
@@ -1183,10 +1172,12 @@ export default class SDFileGridViewBase extends Vue {
* @memberof SDFileGridView
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
let
curViewParam
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
if
(
args
.
length
>
0
){
Object
.
assign
(
curViewParam
,
args
[
0
]);
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
...
...
@@ -1194,7 +1185,7 @@ export default class SDFileGridViewBase extends Vue {
];
const
_this
:
any
=
this
;
const
openDrawer
=
(
view
:
any
,
data
:
any
)
=>
{
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
curViewParam
,
data
);
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
tempContext
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
...
...
app_web/src/pages/disk/sdindex-view/router.ts
浏览文件 @
6798ff9a
...
...
@@ -25,7 +25,8 @@ const router = new Router({
});
},
meta
:
{
caption
:
'app.views.sdindexview.caption'
,
caption
:
'app.views.sdindexview.title'
,
info
:
''
,
viewType
:
'APPINDEX'
,
parameters
:
[
{
pathName
:
'sdindexview'
,
parameterName
:
'sdindexview'
},
...
...
@@ -37,7 +38,8 @@ const router = new Router({
{
path
:
'sdfiles/:sdfile?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.sdfile.views.gridview.caption'
,
caption
:
'entities.sdfile.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sdindexview'
,
parameterName
:
'sdindexview'
},
{
pathName
:
'sdfiles'
,
parameterName
:
'sdfile'
},
...
...
@@ -50,7 +52,8 @@ const router = new Router({
{
path
:
'sdfiles/:sdfile?/editview/:editview?'
,
meta
:
{
caption
:
'entities.sdfile.views.editview.caption'
,
caption
:
'entities.sdfile.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sdindexview'
,
parameterName
:
'sdindexview'
},
{
pathName
:
'sdfiles'
,
parameterName
:
'sdfile'
},
...
...
@@ -66,7 +69,8 @@ const router = new Router({
{
path
:
'/sdfiles/:sdfile?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.sdfile.views.gridview.caption'
,
caption
:
'entities.sdfile.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sdfiles'
,
parameterName
:
'sdfile'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
...
...
@@ -78,7 +82,8 @@ const router = new Router({
{
path
:
'/sdfiles/:sdfile?/editview/:editview?'
,
meta
:
{
caption
:
'entities.sdfile.views.editview.caption'
,
caption
:
'entities.sdfile.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sdfiles'
,
parameterName
:
'sdfile'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
...
...
app_web/src/shims-vue.d.ts
浏览文件 @
6798ff9a
...
...
@@ -9,3 +9,4 @@ declare module '@fullcalendar/list';
declare
module
'@fullcalendar/interaction'
;
declare
module
'vue-grid-layout'
;
declare
module
'vue-print-nb'
;
declare
module
'vuedraggable'
;
\ No newline at end of file
app_web/src/styles/default.less
浏览文件 @
6798ff9a
...
...
@@ -237,6 +237,12 @@
}
}
// 清除看板里视图的阴影
.dashboard .portlet .view-container{
-webkit-box-shadow: none ;
box-shadow: none;
}
/*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式
...
...
app_web/src/utils/interceptor/interceptor.ts
浏览文件 @
6798ff9a
...
...
@@ -84,6 +84,13 @@ export class Interceptors {
if
(
appdata
&&
appdata
.
context
)
{
config
.
headers
[
'srforgsectorid'
]
=
appdata
.
context
.
srforgsectorid
;
}
if
(
!
window
.
localStorage
.
getItem
(
'token'
)){
let
arr
;
let
reg
=
new
RegExp
(
"(^| )ibzuaa-token=([^;]*)(;|$)"
);
if
(
arr
=
document
.
cookie
.
match
(
reg
)){
window
.
localStorage
.
setItem
(
'token'
,
unescape
(
arr
[
2
]));
}
}
if
(
window
.
localStorage
.
getItem
(
'token'
))
{
const
token
=
window
.
localStorage
.
getItem
(
'token'
);
config
.
headers
[
'Authorization'
]
=
`Bearer
${
token
}
`
;
...
...
app_web/src/utils/types/uiaction-tool.d.ts
浏览文件 @
6798ff9a
...
...
@@ -13,18 +13,22 @@ export declare interface UIActionTool {
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入应用上下数据参数
*/
handleContextParam
(
actionTarget
:
any
,
args
:
any
,
context
:
any
):
any
;
handleContextParam
(
actionTarget
:
any
,
args
:
any
,
parentContext
:
any
,
parentParams
:
any
,
context
:
any
):
any
;
/**
* 处理界面行为参数
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入界面行为附加参数
*/
handleActionParam
(
actionTarget
:
any
,
args
:
any
,
params
:
any
):
any
;
handleActionParam
(
actionTarget
:
any
,
args
:
any
,
parentContext
:
any
,
parentParams
:
any
,
params
:
any
):
any
;
}
declare
module
"vue/types/vue"
{
...
...
app_web/src/utils/types/util.d.ts
浏览文件 @
6798ff9a
...
...
@@ -130,6 +130,20 @@ export declare interface Util {
*/
formatData
(
arg
:
any
,
parent
:
any
,
params
:
any
):
any
;
/**
* 计算导航数据
* 先从当前数据目标计算,然后再从当前上下文计算,最后从当前视图参数计算,没有则为null
*
* @static
* @param {any} data 表单数据
* @param {any} parentContext 外层context
* @param {any} parentParam 外层param
* @param {any} params 附加参数
* @returns {any}
* @memberof Util
*/
computedNavData
(
data
:
any
,
parentContext
:
any
,
parentParam
:
any
,
params
:
any
):
any
;
/**
* 日期格式化
*
...
...
app_web/src/utils/uiaction-tool/uiaction-tool.ts
浏览文件 @
6798ff9a
...
...
@@ -8,10 +8,12 @@ export class UIActionTool {
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入应用上下数据参数
*/
public
static
handleContextParam
(
actionTarget
:
any
,
args
:
any
,
context
:
any
)
{
return
this
.
formatData
(
actionTarget
,
args
,
context
);
public
static
handleContextParam
(
actionTarget
:
any
,
args
:
any
,
parentContext
:
any
,
parentParams
:
any
,
context
:
any
)
{
return
this
.
formatData
(
actionTarget
,
args
,
parentContext
,
parentParams
,
context
);
}
/**
...
...
@@ -19,10 +21,12 @@ export class UIActionTool {
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入界面行为附加参数
*/
public
static
handleActionParam
(
actionTarget
:
any
,
args
:
any
,
params
:
any
)
{
return
this
.
formatData
(
actionTarget
,
args
,
params
);
public
static
handleActionParam
(
actionTarget
:
any
,
args
:
any
,
parentContext
:
any
,
parentParams
:
any
,
params
:
any
)
{
return
this
.
formatData
(
actionTarget
,
args
,
parentContext
,
parentParams
,
params
);
}
/**
...
...
@@ -32,11 +36,13 @@ export class UIActionTool {
* @static
* @param {*} actionTarget
* @param {*} args
* @param parentContext
* @param parentParams
* @param {*} _params
* @returns {*}
* @memberof UIActionTool
*/
private
static
formatData
(
actionTarget
:
any
,
args
:
any
,
_params
:
any
):
any
{
private
static
formatData
(
actionTarget
:
any
,
args
:
any
,
parentContext
:
any
,
parentParams
:
any
,
_params
:
any
):
any
{
let
_data
:
any
=
{};
if
(
Object
.
is
(
actionTarget
,
'SINGLEKEY'
))
{
let
[
arg
]
=
args
;
...
...
@@ -50,12 +56,16 @@ export class UIActionTool {
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
);
if
(
arg
&&
arg
.
hasOwnProperty
(
key
))
{
value
=
(
arg
[
key
]
!==
null
&&
arg
[
key
]
!==
undefined
)
?
arg
[
key
]
:
null
;
}
else
{
}
else
if
(
parentContext
&&
parentContext
.
hasOwnProperty
(
key
)){
value
=
(
parentContext
[
key
]
!==
null
&&
parentContext
[
key
]
!==
undefined
)
?
parentContext
[
key
]
:
null
;
}
else
if
(
parentParams
&&
parentParams
.
hasOwnProperty
(
key
)){
value
=
(
parentParams
[
key
]
!==
null
&&
parentParams
[
key
]
!==
undefined
)
?
parentParams
[
key
]
:
null
;
}
else
{
hasProperty
=
false
;
}
}
if
(
hasProperty
){
Object
.
assign
(
_data
,
{
[
name
]:
value
});
Object
.
assign
(
_data
,
{
[
name
.
toLowerCase
()
]:
value
});
}
});
}
else
if
(
Object
.
is
(
actionTarget
,
'MULTIKEY'
))
{
...
...
@@ -71,7 +81,11 @@ export class UIActionTool {
args
.
forEach
((
arg
:
any
)
=>
{
if
(
arg
&&
arg
.
hasOwnProperty
(
key
))
{
value
=
(
arg
[
key
]
!==
null
&&
arg
[
key
]
!==
undefined
)
?
arg
[
key
]
:
null
;
}
else
{
}
else
if
(
parentContext
&&
parentContext
.
hasOwnProperty
(
key
)){
value
=
(
parentContext
[
key
]
!==
null
&&
parentContext
[
key
]
!==
undefined
)
?
parentContext
[
key
]
:
null
;
}
else
if
(
parentParams
&&
parentParams
.
hasOwnProperty
(
key
)){
value
=
(
parentParams
[
key
]
!==
null
&&
parentParams
[
key
]
!==
undefined
)
?
parentParams
[
key
]
:
null
;
}
else
{
value
=
null
;
noPropertyNum
++
;
}
...
...
@@ -79,7 +93,7 @@ export class UIActionTool {
});
}
if
(
values
.
length
!==
noPropertyNum
){
Object
.
assign
(
_data
,
{
[
name
]:
values
.
length
>
0
?
values
.
join
(
','
)
:
value
});
Object
.
assign
(
_data
,
{
[
name
.
toLowerCase
()
]:
values
.
length
>
0
?
values
.
join
(
','
)
:
value
});
}
});
}
...
...
app_web/src/utils/util/util.ts
浏览文件 @
6798ff9a
...
...
@@ -324,6 +324,44 @@ export class Util {
return
_data
;
}
/**
* 计算导航数据
* 先从当前数据目标计算,然后再从当前上下文计算,最后从当前视图参数计算,没有则为null
*
* @static
* @param {any} data 表单数据
* @param {any} parentContext 外层context
* @param {any} parentParam 外层param
* @param {any} params 附加参数
* @returns {any}
* @memberof Util
*/
public
static
computedNavData
(
data
:
any
,
parentContext
:
any
,
parentParam
:
any
,
params
:
any
):
any
{
let
_data
:
any
=
{};
if
(
params
&&
Object
.
keys
(
params
).
length
>
0
){
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
if
(
!
name
)
{
return
;
}
let
value
:
string
|
null
=
params
[
name
];
if
(
value
&&
value
.
startsWith
(
'%'
)
&&
value
.
endsWith
(
'%'
))
{
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
).
toLowerCase
();
if
(
data
&&
data
.
hasOwnProperty
(
key
))
{
value
=
data
[
key
];
}
else
if
(
parentContext
&&
parentContext
[
key
]){
value
=
parentContext
[
key
];
}
else
if
(
parentParam
&&
parentParam
[
key
]){
value
=
parentParam
[
key
];
}
else
{
value
=
null
;
}
}
Object
.
assign
(
_data
,
{
[
name
.
toLowerCase
()]:
value
});
});
}
return
_data
;
}
/**
* 日期格式化
*
...
...
app_web/src/widgets/sdfile/main-form/main-form-base.vue
浏览文件 @
6798ff9a
...
...
@@ -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):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 10
06
, column 18]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 10
28
, column 18]
----
\ No newline at end of file
ibzdisk-app/ibzdisk-app-web/src/main/docker/ibzdisk-app-web.yaml
浏览文件 @
6798ff9a
...
...
@@ -14,6 +14,16 @@ services:
memory
:
400M
mode
:
replicated
replicas
:
1
volumes
:
-
"
nfs:/app/file"
volumes
:
nfs
:
driver
:
local
driver_opts
:
type
:
"
nfs"
o
:
"
addr=172.16.240.109,rw"
device
:
"
:/nfs"
networks
:
agent_network
:
...
...
ibzdisk-boot/src/main/resources/application-dev.yml
浏览文件 @
6798ff9a
...
...
@@ -8,6 +8,10 @@ zuul:
path
:
/v7/login
serviceId
:
ibzuaa-api
stripPrefix
:
false
uaa
:
path
:
/uaa/**
serviceId
:
ibzuaa-api
stripPrefix
:
false
oucore
:
path
:
/ibzorganizations/**
serviceId
:
ibzou-api
...
...
ibzdisk-core/pom.xml
浏览文件 @
6798ff9a
...
...
@@ -156,7 +156,7 @@
<verbose>
true
</verbose>
<logging>
debug
</logging>
<contexts>
!test
</contexts>
<diffExcludeObjects>
Index:.*,table:ibzfile,ibzuser,ibzdataaudit,
IBZFILE,IBZUSER,IBZDATAAUDIT
</diffExcludeObjects>
<diffExcludeObjects>
Index:.*,table:ibzfile,ibzuser,ibzdataaudit,
ibzcfg,IBZFILE,IBZUSER,IBZDATAAUDIT,IBZCFG
</diffExcludeObjects>
</configuration>
<phase>
process-resources
</phase>
<goals>
...
...
ibzdisk-core/src/main/java/cn/ibizlab/core/disk/filter/SDFileSearchContext.java
浏览文件 @
6798ff9a
...
...
@@ -34,7 +34,7 @@ public class SDFileSearchContext extends QueryBuildContext {
this
.
n_filename_like
=
n_filename_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_filename_like
)){
Pattern
pattern
=
Pattern
.
compile
(
"^.*"
+
n_filename_like
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
this
.
getSe
lect
Cond
().
and
(
"filename"
).
regex
(
pattern
);
this
.
getSe
arch
Cond
().
and
(
"filename"
).
regex
(
pattern
);
}
}
...
...
@@ -46,7 +46,7 @@ public class SDFileSearchContext extends QueryBuildContext {
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
Pattern
pattern
=
Pattern
.
compile
(
"^.*"
+
query
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
this
.
getSe
lect
Cond
().
or
(
new
BasicDBObject
(
"filename"
,
pattern
));
this
.
getSe
arch
Cond
().
or
(
new
BasicDBObject
(
"filename"
,
pattern
));
}
}
}
...
...
ibzdisk-core/src/main/java/cn/ibizlab/core/util/config/MybatisConfiguration.java
浏览文件 @
6798ff9a
...
...
@@ -29,6 +29,7 @@ public class MybatisConfiguration {
Properties
p
=
new
Properties
();
p
.
setProperty
(
"Oracle"
,
"oracle"
);
p
.
setProperty
(
"MySQL"
,
"mysql"
);
p
.
setProperty
(
"PostgreSQL"
,
"postgresql"
);
p
.
setProperty
(
"DM"
,
"oracle"
);
//达梦数据库使用oracle模式
p
.
setProperty
(
"H2"
,
"mysql"
);
//根据当前运行的数据库设置h2对应的databaseid
databaseIdProvider
.
setProperties
(
p
);
...
...
ibzdisk-dependencies/pom.xml
浏览文件 @
6798ff9a
...
...
@@ -77,6 +77,9 @@
<!--xxl-job定时服务 -->
<xxl-job.version>
2.1.0
</xxl-job.version>
<oracle.version>
11.2.0.3
</oracle.version>
<postgresql.version>
42.2.6
</postgresql.version>
</properties>
<dependencyManagement>
...
...
@@ -299,12 +302,6 @@
<artifactId>
httpclient
</artifactId>
</dependency>
<!-- MySQL驱动包 -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<!-- 阿里Druid数据源 -->
<dependency>
<groupId>
com.alibaba
</groupId>
...
...
@@ -317,9 +314,23 @@
<artifactId>
h2
</artifactId>
</dependency>
<!-- Error -->
<!-- Security -->
<!-- Oracle驱动包 -->
<dependency>
<groupId>
com.oracle
</groupId>
<artifactId>
ojdbc6
</artifactId>
<version>
${oracle.version}
</version>
</dependency>
<!-- PostgreSQL驱动包 -->
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<version>
${postgresql.version}
</version>
</dependency>
<!-- MySQL驱动包 -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
</dependencies>
...
...
ibzdisk-provider/ibzdisk-provider-api/src/main/docker/ibzdisk-provider-api.yaml
浏览文件 @
6798ff9a
...
...
@@ -14,6 +14,16 @@ services:
memory
:
400M
mode
:
replicated
replicas
:
1
volumes
:
-
"
nfs:/app/file"
volumes
:
nfs
:
driver
:
local
driver_opts
:
type
:
"
nfs"
o
:
"
addr=172.16.240.109,rw"
device
:
"
:/nfs"
networks
:
agent_network
:
...
...
ibzdisk-provider/ibzdisk-provider-api/src/main/java/cn/ibizlab/swagger/SwaggerConfiguration.java
浏览文件 @
6798ff9a
...
...
@@ -17,6 +17,7 @@ import springfox.documentation.spring.web.plugins.Docket;
import
springfox.documentation.spring.web.readers.operation.OperationParameterReader
;
import
springfox.documentation.spring.web.readers.parameter.ModelAttributeParameterExpander
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
...
...
@@ -24,6 +25,7 @@ import java.util.List;
@Configuration
@EnableSwagger2
@ConditionalOnExpression
(
"${swagger.enable:false}"
)
public
class
SwaggerConfiguration
{
@Bean
...
...
ibzdisk-util/src/main/java/cn/ibizlab/util/filter/QueryBuildContext.java
浏览文件 @
6798ff9a
...
...
@@ -5,6 +5,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import
com.mongodb.QueryBuilder
;
import
lombok.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
@Slf4j
@Data
...
...
@@ -14,4 +18,163 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
@JSONField
(
serialize
=
false
)
private
QueryBuilder
selectCond
=
new
QueryBuilder
();
public
QueryBuilder
getSearchCond
(){
return
this
.
selectCond
;
}
/**
* 填充自定义查询条件
* @return
*/
public
QueryBuilder
getSelectCond
()
{
if
(!
ObjectUtils
.
isEmpty
(
filter
)){
QueryBuilder
queryBuilder
=
parseQueryFilter
(
filter
);
if
(!
ObjectUtils
.
isEmpty
(
queryBuilder
)){
selectCond
.
and
(
queryBuilder
.
get
());
}
}
return
selectCond
;
}
/**
* 解析自定义查询条件
* @param queryFilter
* @return
*/
private
QueryBuilder
parseQueryFilter
(
QueryFilter
queryFilter
){
if
(
ObjectUtils
.
isEmpty
(
queryFilter
.
get
$and
())
&&
ObjectUtils
.
isEmpty
(
queryFilter
.
get
$or
())
&&
ObjectUtils
.
isEmpty
(
queryFilter
.
any
()))
return
null
;
QueryBuilder
rsBuilder
=
QueryBuilder
.
start
();
QueryBuilder
fieldBuilder
=
parseFieldMap
(
queryFilter
.
any
());
QueryBuilder
orBuilder
=
parseOrQueryFilter
(
queryFilter
.
get
$or
());
QueryBuilder
andBuilder
=
parseAndQueryFilter
(
queryFilter
.
get
$and
());
if
(!
ObjectUtils
.
isEmpty
(
fieldBuilder
)){
rsBuilder
.
and
(
fieldBuilder
.
get
());
}
if
(!
ObjectUtils
.
isEmpty
(
orBuilder
)){
rsBuilder
.
and
(
orBuilder
.
get
());
}
if
(!
ObjectUtils
.
isEmpty
(
andBuilder
)){
rsBuilder
.
and
(
andBuilder
.
get
());
}
return
rsBuilder
;
}
/**
* 解析自定义条件[or]
* @param queryFilters
* @return
*/
private
QueryBuilder
parseOrQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
QueryBuilder
orBuilder
=
new
QueryBuilder
();
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
){
return
null
;
}
for
(
QueryFilter
queryFilter:
queryFilters
){
QueryBuilder
queryBuilder
=
parseQueryFilter
(
queryFilter
);
if
(!
ObjectUtils
.
isEmpty
(
queryBuilder
)){
orBuilder
.
or
(
queryBuilder
.
get
());
}
}
return
orBuilder
;
}
/**
* 解析自定义条件[and]
* @param queryFilters
* @return
*/
private
QueryBuilder
parseAndQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
QueryBuilder
orBuilder
=
new
QueryBuilder
();
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
){
return
null
;
}
for
(
QueryFilter
queryFilter:
queryFilters
){
QueryBuilder
queryBuilder
=
parseQueryFilter
(
queryFilter
);
if
(!
ObjectUtils
.
isEmpty
(
queryBuilder
)){
orBuilder
.
and
(
queryBuilder
.
get
());
}
}
return
orBuilder
;
}
/**
* 解析自定义条件[字段条件]
* @param fieldMap
* @return
*/
private
QueryBuilder
parseFieldMap
(
Map
<
String
,
QueryFilter
.
SegmentCond
>
fieldMap
)
{
if
(
fieldMap
.
size
()==
0
)
return
null
;
QueryBuilder
fieldBuilders
=
QueryBuilder
.
start
();
for
(
Map
.
Entry
<
String
,
QueryFilter
.
SegmentCond
>
entry:
fieldMap
.
entrySet
()){
getSegmentCondSql
(
entry
.
getKey
(),
entry
.
getValue
(),
fieldBuilders
);
}
return
fieldBuilders
;
}
/**
* 解析自定义条件[字段条件]
* @param fieldName
* @param segmentCond
* @param fieldBuilder
*/
private
void
getSegmentCondSql
(
String
fieldName
,
QueryFilter
.
SegmentCond
segmentCond
,
QueryBuilder
fieldBuilder
)
{
Map
<
String
,
Object
>
segmentCondMap
=
segmentCond
.
any
();
for
(
Map
.
Entry
<
String
,
Object
>
entry:
segmentCondMap
.
entrySet
()){
Object
value
=
entry
.
getValue
();
switch
(
entry
.
getKey
()){
case
"$eq"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
is
(
value
).
get
());
break
;
case
"$ne"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
not
().
and
(
fieldName
).
is
(
value
).
get
());
break
;
case
"$gt"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
greaterThan
(
value
).
get
());
break
;
case
"$gte"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
greaterThanEquals
(
value
).
get
());
break
;
case
"$lt"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
lessThan
(
value
).
get
());
break
;
case
"$lte"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
lessThanEquals
(
value
).
get
());
break
;
case
"$null"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
exists
(
null
).
get
());
break
;
case
"$notNull"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
exists
(
true
).
and
(
fieldName
).
notEquals
(
""
).
and
(
fieldName
).
notEquals
(
null
).
get
());
break
;
case
"$in"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
in
(
value
).
get
());
break
;
case
"$notIn"
:
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
not
().
in
(
value
).
get
());
break
;
case
"$like"
:
Pattern
likePattern
=
Pattern
.
compile
(
"^.*"
+
value
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
regex
(
likePattern
).
get
());
break
;
case
"$startsWith"
:
Pattern
startsWithPattern
=
Pattern
.
compile
(
value
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
regex
(
startsWithPattern
).
get
());
break
;
case
"$endsWith"
:
Pattern
endsWithPattern
=
Pattern
.
compile
(
"^.*"
+
value
+
"$"
,
Pattern
.
CASE_INSENSITIVE
);
fieldBuilder
.
and
(
QueryBuilder
.
start
().
and
(
fieldName
).
regex
(
endsWithPattern
).
get
());
break
;
case
"$exists"
:
break
;
case
"$notExists"
:
break
;
}
}
}
}
ibzdisk-util/src/main/java/cn/ibizlab/util/filter/QueryFilter.java
0 → 100644
浏览文件 @
6798ff9a
package
cn
.
ibizlab
.
util
.
filter
;
import
com.fasterxml.jackson.annotation.*
;
import
org.springframework.data.annotation.Transient
;
import
java.util.*
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
public
class
QueryFilter
{
public
static
QueryFilter
createQuery
()
{
QueryFilter
queryFilter
=
new
QueryFilter
();
return
queryFilter
;
}
public
QueryFilter
eq
(
String
column
,
Object
value
)
{
return
op
(
column
,
SegmentCond
.
eq
(
value
));
}
public
QueryFilter
ne
(
String
column
,
Object
value
)
{
return
op
(
column
,
SegmentCond
.
ne
(
value
));
}
public
QueryFilter
gt
(
String
column
,
Object
value
)
{
return
op
(
column
,
SegmentCond
.
gt
(
value
));
}
public
QueryFilter
ge
(
String
column
,
Object
value
)
{
return
op
(
column
,
SegmentCond
.
ge
(
value
));
}
public
QueryFilter
lt
(
String
column
,
Object
value
)
{
return
op
(
column
,
SegmentCond
.
lt
(
value
));
}
public
QueryFilter
le
(
String
column
,
Object
value
)
{
return
op
(
column
,
SegmentCond
.
le
(
value
));
}
public
QueryFilter
isnull
(
String
column
)
{
return
op
(
column
,
SegmentCond
.
isnull
());
}
public
QueryFilter
isnotnull
(
String
column
)
{
return
op
(
column
,
SegmentCond
.
isnotnull
());
}
public
QueryFilter
in
(
String
column
,
Collection
value
)
{
return
op
(
column
,
SegmentCond
.
in
(
value
));
}
public
QueryFilter
notin
(
String
column
,
Collection
value
)
{
return
op
(
column
,
SegmentCond
.
notin
(
value
));
}
public
QueryFilter
like
(
String
column
,
String
value
)
{
return
op
(
column
,
SegmentCond
.
like
(
value
));
}
public
QueryFilter
startsWith
(
String
column
,
String
value
)
{
return
op
(
column
,
SegmentCond
.
startsWith
(
value
));
}
public
QueryFilter
endsWith
(
String
column
,
String
value
)
{
return
op
(
column
,
SegmentCond
.
endsWith
(
value
));
}
public
QueryFilter
between
(
String
column
,
Object
from
,
Object
to
)
{
return
op
(
column
,
SegmentCond
.
between
(
from
,
to
));
}
@JsonIgnore
@Transient
private
Map
<
String
,
SegmentCond
>
map
;
private
Map
<
String
,
SegmentCond
>
getMap
()
{
if
(
map
==
null
)
map
=
new
LinkedHashMap
<>();
return
map
;
}
@JsonAnyGetter
public
Map
<
String
,
SegmentCond
>
any
()
{
return
getMap
();
}
@JsonAnySetter
public
void
set
(
String
column
,
SegmentCond
value
)
{
getMap
().
put
(
column
,
value
);
}
@JsonProperty
(
index
=
999
)
private
List
<
QueryFilter
>
$or
;
public
List
<
QueryFilter
>
get$or
()
{
return
$or
;
}
public
void
set$or
(
List
<
QueryFilter
>
$or
)
{
this
.
$or
=
$or
;
}
public
QueryFilter
or
(
QueryFilter
...
ors
)
{
if
(
$or
==
null
)
{
$or
=
new
ArrayList
();
}
Collections
.
addAll
(
$or
,
ors
);
return
this
;
}
@JsonProperty
(
index
=
999
)
private
List
<
QueryFilter
>
$and
;
public
List
<
QueryFilter
>
get$and
()
{
return
$and
;
}
public
void
set$and
(
List
<
QueryFilter
>
$and
)
{
this
.
$and
=
$and
;
}
public
QueryFilter
and
(
QueryFilter
...
ands
)
{
if
(
$and
==
null
)
{
$and
=
new
ArrayList
();
}
Collections
.
addAll
(
$and
,
ands
);
return
this
;
}
@Override
public
String
toString
()
{
return
"QueryFilter{"
+
"map="
+
map
+
", $or="
+
$or
+
'}'
;
}
private
QueryFilter
op
(
String
column
,
SegmentCond
segmentCond
)
{
if
(
this
.
getMap
().
containsKey
(
column
))
((
SegmentCond
)
this
.
getMap
().
get
(
column
)).
getMap
().
putAll
(
segmentCond
.
getMap
());
else
this
.
getMap
().
put
(
column
,
segmentCond
);
return
this
;
}
public
static
class
SegmentCond
{
@JsonIgnore
@Transient
private
Map
<
String
,
Object
>
map
;
@Override
public
String
toString
()
{
return
"SegmentCond{"
+
"map="
+
map
+
'}'
;
}
private
Map
<
String
,
Object
>
getMap
()
{
if
(
map
==
null
)
map
=
new
LinkedHashMap
<>();
return
map
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
any
()
{
return
getMap
();
}
@JsonAnySetter
public
void
set
(
String
column
,
Object
value
)
{
getMap
().
put
(
column
,
value
);
}
public
static
SegmentCond
eq
(
Object
value
)
{
return
op
(
Segment
.
EQ
,
value
);
}
public
static
SegmentCond
ne
(
Object
value
)
{
return
op
(
Segment
.
NE
,
value
);
}
public
static
SegmentCond
gt
(
Object
value
)
{
return
op
(
Segment
.
GT
,
value
);
}
public
static
SegmentCond
ge
(
Object
value
)
{
return
op
(
Segment
.
GE
,
value
);
}
public
static
SegmentCond
lt
(
Object
value
)
{
return
op
(
Segment
.
LT
,
value
);
}
public
static
SegmentCond
le
(
Object
value
)
{
return
op
(
Segment
.
LE
,
value
);
}
public
static
SegmentCond
isnull
()
{
return
op
(
Segment
.
IS_NULL
,
true
);
}
public
static
SegmentCond
isnotnull
()
{
return
op
(
Segment
.
IS_NOT_NULL
,
true
);
}
public
static
SegmentCond
in
(
Collection
value
)
{
return
op
(
Segment
.
IN
,
value
);
}
public
static
SegmentCond
notin
(
Collection
value
)
{
return
op
(
Segment
.
NOTIN
,
value
);
}
public
static
SegmentCond
like
(
String
value
)
{
return
op
(
Segment
.
LIKE
,
value
);
}
public
static
SegmentCond
startsWith
(
String
value
)
{
return
op
(
Segment
.
LEFTLIKE
,
value
);
}
public
static
SegmentCond
endsWith
(
String
value
)
{
return
op
(
Segment
.
RIGHTLIKE
,
value
);
}
public
static
SegmentCond
between
(
Object
from
,
Object
to
)
{
return
op
(
Segment
.
GE
,
from
).
op
(
Segment
.
LT
,
to
);
}
private
static
SegmentCond
op
(
Segment
segment
,
Object
value
)
{
SegmentCond
segmentCond
=
new
SegmentCond
();
segmentCond
.
getMap
().
put
(
segment
.
keyword
,
value
);
return
segmentCond
;
}
}
public
enum
Segment
{
AND
(
"$and"
),
OR
(
"$or"
),
EQ
(
"$eq"
),
NE
(
"$ne"
),
GT
(
"$gt"
),
GE
(
"$gte"
),
LT
(
"$lt"
),
LE
(
"$lte"
),
IS_NULL
(
"$null"
),
IS_NOT_NULL
(
"$notNull"
),
IN
(
"$in"
),
NOTIN
(
"$notIn"
),
LIKE
(
"$like"
),
LEFTLIKE
(
"$startsWith"
),
RIGHTLIKE
(
"$endsWith"
),
EXISTS
(
"$exists"
),
NOTEXISTS
(
"$notExists"
);
private
final
String
keyword
;
Segment
(
final
String
keyword
)
{
this
.
keyword
=
keyword
;
}
}
/*
SQL: (field1>1 and field2='3' and (field3 like "a" or (field4 is not null and field5 in ['11','12']) )
JAVA: QueryFilter filter=QueryFilter.createQuery()
.gt("field1",1)
.eq("field2",'3')
.or(QueryFilter.createQuery().like("field3","a")
,QueryFilter.createQuery().isnotnull("field4").in("field5",Arrays.asList("11","12")));
JSON: {
"$or":[
{
"field3":{"$like":"a"}
},
{
"field4":{ "$notNull":true},
"field5":{"$in":["11","12"]}
}],
"field1":{"$gt":1},
"field2":{"$eq":"3" }
}
*/
}
ibzdisk-util/src/main/java/cn/ibizlab/util/filter/QueryWrapperContext.java
浏览文件 @
6798ff9a
...
...
@@ -10,11 +10,9 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.data.domain.Sort
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.lang.reflect.ParameterizedType
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.*
;
import
java.util.function.Consumer
;
@Slf4j
@Data
...
...
@@ -73,4 +71,150 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
return
page
;
}
public
QueryWrapper
<
T
>
getSearchCond
(){
return
this
.
selectCond
;
}
/**
* 填充自定义查询条件
* @return
*/
public
QueryWrapper
<
T
>
getSelectCond
()
{
if
(!
ObjectUtils
.
isEmpty
(
filter
)){
Consumer
queryWrapper
=
parseQueryFilter
(
filter
);
if
(!
ObjectUtils
.
isEmpty
(
queryWrapper
)){
selectCond
.
and
(
queryWrapper
);
}
}
return
selectCond
;
}
/**
* 解析自定义查询条件
* @param queryFilter
* @return
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseQueryFilter
(
QueryFilter
queryFilter
){
if
(
queryFilter
.
any
().
size
()==
0
&&
queryFilter
.
get
$or
()==
null
&&
queryFilter
.
get
$and
()==
null
)
return
null
;
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
Consumer
fieldConsumer
=
parseFieldMap
(
queryFilter
.
any
());
Consumer
orConsumer
=
parseOrQueryFilter
(
queryFilter
.
get
$or
());
Consumer
andConsumer
=
parseAndQueryFilter
(
queryFilter
.
get
$and
());
if
(!
ObjectUtils
.
isEmpty
(
fieldConsumer
)){
queryWrapper
.
and
(
fieldConsumer
);
}
if
(!
ObjectUtils
.
isEmpty
(
orConsumer
)){
queryWrapper
.
and
(
orConsumer
);
}
if
(!
ObjectUtils
.
isEmpty
(
andConsumer
)){
queryWrapper
.
and
(
andConsumer
);
}
};
return
consumer
;
}
/**
* 解析自定义条件[or]
* @param queryFilters
* @return
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseOrQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
)
return
null
;
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
for
(
QueryFilter
queryFilter:
queryFilters
){
Consumer
tempQueryWrapper
=
parseQueryFilter
(
queryFilter
);
queryWrapper
.
or
(
tempQueryWrapper
);
}
};
return
consumer
;
}
/**
* 解析自定义条件[and]
* @param queryFilters
* @return
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseAndQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
)
return
null
;
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
for
(
QueryFilter
queryFilter:
queryFilters
){
Consumer
tempQueryWrapper
=
parseQueryFilter
(
queryFilter
);
queryWrapper
.
and
(
tempQueryWrapper
);
}
};
return
consumer
;
}
/**
* 解析自定义条件[字段条件]
* @param fieldMap
* @return
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseFieldMap
(
Map
<
String
,
QueryFilter
.
SegmentCond
>
fieldMap
)
{
if
(
fieldMap
.
size
()==
0
)
return
null
;
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
for
(
Map
.
Entry
<
String
,
QueryFilter
.
SegmentCond
>
field:
fieldMap
.
entrySet
()){
String
fieldName
=
field
.
getKey
();
QueryFilter
.
SegmentCond
segmentCond
=
field
.
getValue
();
Map
<
String
,
Object
>
segmentCondMap
=
segmentCond
.
any
();
for
(
Map
.
Entry
<
String
,
Object
>
fieldCond:
segmentCondMap
.
entrySet
()){
Object
value
=
fieldCond
.
getValue
();
switch
(
fieldCond
.
getKey
()){
case
"$eq"
:
queryWrapper
.
eq
(
fieldName
,
value
);
break
;
case
"$ne"
:
queryWrapper
.
ne
(
fieldName
,
value
);
break
;
case
"$gt"
:
queryWrapper
.
gt
(
fieldName
,
value
);
break
;
case
"$gte"
:
queryWrapper
.
ge
(
fieldName
,
value
);
break
;
case
"$lt"
:
queryWrapper
.
lt
(
fieldName
,
value
);
break
;
case
"$lte"
:
queryWrapper
.
le
(
fieldName
,
value
);
break
;
case
"$null"
:
queryWrapper
.
isNull
(
fieldName
);
break
;
case
"$notNull"
:
queryWrapper
.
isNotNull
(
fieldName
);
break
;
case
"$in"
:
queryWrapper
.
in
(
fieldName
,(
Collection
)
value
);
break
;
case
"$notIn"
:
queryWrapper
.
notIn
(
fieldName
,(
Collection
)
value
);
break
;
case
"$like"
:
queryWrapper
.
like
(
fieldName
,
value
);
break
;
case
"$startsWith"
:
queryWrapper
.
likeRight
(
fieldName
,
value
);
break
;
case
"$endsWith"
:
queryWrapper
.
likeLeft
(
fieldName
,
value
);
break
;
case
"$exists"
:
break
;
case
"$notExists"
:
break
;
}
}
}
};
return
consumer
;
}
}
ibzdisk-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
6798ff9a
...
...
@@ -12,9 +12,7 @@ import org.springframework.data.domain.Pageable;
import
org.springframework.data.domain.Sort
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Slf4j
@Data
...
...
@@ -35,7 +33,11 @@ public class SearchContextBase implements ISearchContext{
*/
@JsonProperty
(
"query"
)
public
String
query
;
/**
* 条件表达式
*/
@JsonProperty
(
"filter"
)
public
QueryFilter
filter
;
/**
* 数据查询
*/
...
...
ibzdisk-util/src/main/java/cn/ibizlab/util/rest/AppController.java
浏览文件 @
6798ff9a
...
...
@@ -12,10 +12,7 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Set
;
import
java.util.*
;
@RestController
@RequestMapping
(
value
=
""
)
...
...
@@ -38,8 +35,9 @@ public class AppController {
Set
<
String
>
appMenu
=
new
HashSet
();
Set
<
String
>
uniRes
=
new
HashSet
();
AuthenticationUser
curUser
=
AuthenticationUser
.
getAuthenticationUser
();
if
(
enablePermissionValid
){
Collection
<
GrantedAuthority
>
authorities
=
AuthenticationUser
.
getAuthenticationUser
()
.
getAuthorities
();
Collection
<
GrantedAuthority
>
authorities
=
curUser
.
getAuthorities
();
Iterator
it
=
authorities
.
iterator
();
while
(
it
.
hasNext
())
{
GrantedAuthority
authority
=
(
GrantedAuthority
)
it
.
next
();
...
...
@@ -50,6 +48,10 @@ public class AppController {
appMenu
.
add
(
strAuthority
.
substring
(
systemId
.
length
()+
9
));
}
}
Map
<
String
,
Object
>
context
=
new
HashMap
<>();
context
.
putAll
(
curUser
.
getSessionParams
());
context
.
put
(
"srfusername"
,
curUser
.
getPersonname
());
appData
.
put
(
"context"
,
context
);
appData
.
put
(
"unires"
,
uniRes
);
appData
.
put
(
"appmenu"
,
appMenu
);
appData
.
put
(
"enablepermissionvalid"
,
enablePermissionValid
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录