Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
45a108b7
提交
45a108b7
编写于
4月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
20190a07
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
341 行增加
和
0 行删除
+341
-0
app-register.ts
app_web/src/app-register.ts
+2
-0
app-column-link.less
app_web/src/components/app-column-link/app-column-link.less
+4
-0
app-column-link.vue
app_web/src/components/app-column-link/app-column-link.vue
+312
-0
application-dev.yml
ibzdict-boot/src/main/resources/application-dev.yml
+23
-0
未找到文件。
app_web/src/app-register.ts
浏览文件 @
45a108b7
...
...
@@ -62,6 +62,7 @@ import AppBuild from './components/app-build/app-build.vue'
import
AppStudioAction
from
'./components/app-studioaction/app-studioaction.vue'
import
AppDebugActions
from
'./components/app-debug-actions/app-debug-actions.vue'
import
AppHeaderMenus
from
'./components/app-header-menus/app-header-menus.vue'
import
AppColumnLink
from
'./components/app-column-link/app-column-link.vue'
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
...
...
@@ -133,5 +134,6 @@ export const AppComponents = {
v
.
component
(
'app-studioaction'
,
AppStudioAction
);
v
.
component
(
'app-debug-actions'
,
AppDebugActions
);
v
.
component
(
'app-header-menus'
,
AppHeaderMenus
);
v
.
component
(
'app-column-link'
,
AppColumnLink
);
},
};
\ No newline at end of file
app_web/src/components/app-column-link/app-column-link.less
0 → 100644
浏览文件 @
45a108b7
.app-column-link{
display: inline-block;
cursor:pointer;
}
\ No newline at end of file
app_web/src/components/app-column-link/app-column-link.vue
0 → 100644
浏览文件 @
45a108b7
<
template
>
<a
class=
"app-column-link"
@
click=
"openLinkView($event)"
>
<slot></slot>
</a>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
import
{
Subject
}
from
'rxjs'
;
/**
* 表格列链接
*/
@
Component
({
i18n
:
{
messages
:
{
'zh-CN'
:
{
info
:
{
error
:
'错误'
,
valueItemException
:
"值项异常"
,
rowDataException
:
"表格行数据异常"
}
},
'en-US'
:
{
info
:
{
error
:
'error'
,
valueItemException
:
"value item exception"
,
rowDataException
:
"table row data exception"
}
}
}
}
})
export
default
class
AppColumnLink
extends
Vue
{
/**
* 表格行数据
*
* @type {*}
* @memberof AppColumnLink
*/
@
Prop
()
public
data
!
:
any
;
/**
* 数据链接视图
*
* @type {*}
* @memberof AppColumnLink
*/
@
Prop
()
public
linkview
?:
any
;
/**
* 值项名称
*
* @type {string}
* @memberof AppColumnLink
*/
@
Prop
()
public
valueitem
?:
string
;
/**
* 导航上下文
*
* @type {*}
* @memberof AppColumnLink
*/
@
Prop
({
default
:{}})
public
context
?:
any
;
/**
* 导航参数
*
* @type {*}
* @memberof AppColumnLink
*/
@
Prop
({
default
:{}})
public
viewparams
?:
any
;
/**
* 应用实体主键属性名称
*
* @type {string}
* @memberof AppColumnLink
*/
@
Prop
()
public
deKeyField
!
:
string
;
/**
* 打开链接视图
*
* @memberof AppColumnLink
*/
public
openLinkView
(
$event
:
any
):
void
{
$event
.
stopPropagation
();
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'info.error'
)
as
string
),
desc
:
(
this
.
$t
(
'info.valueItemException'
)
as
string
)
});
return
;
}
// 公共参数处理
let
data
:
any
=
{};
const
bcancel
:
boolean
=
this
.
handlePublicParams
(
data
);
if
(
!
bcancel
)
{
return
;
}
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
Object
.
assign
(
_context
,
{
[
this
.
deKeyField
]:
this
.
data
[
this
.
valueitem
]
});
const
view
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
linkview
));
const
viewname2
:
string
=
this
.
$util
.
srfFilePath2
(
view
.
viewname
);
view
.
viewname
=
viewname2
;
if
(
view
.
isRedirectView
)
{
this
.
openRedirectView
(
$event
,
view
,
data
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
this
.
openIndexViewTab
(
view
,
_context
,
_param
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
this
.
openPopOver
(
$event
,
view
,
_context
,
_param
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
this
.
openPopupModal
(
view
,
_context
,
_param
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
this
.
openDrawer
(
view
,
_context
,
_param
);
}
}
/**
* 路由模式打开视图
*
* @private
* @param {string} viewpath
* @param {*} data
* @memberof AppColumnLink
*/
private
openIndexViewTab
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
context
]
,
param
);
this
.
$router
.
push
(
routePath
);
}
/**
* 模态模式打开视图
*
* @private
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private
openPopupModal
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
view
,
context
,
param
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
this
.
openViewClose
(
result
);
});
}
/**
* 抽屉模式打开视图
*
* @private
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private
openDrawer
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
context
,
param
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
this
.
openViewClose
(
result
);
});
}
/**
* 气泡卡片模式打开
*
* @private
* @param {*} $event
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private
openPopOver
(
$event
:
any
,
view
:
any
,
context
:
any
,
param
:
any
):
void
{
let
container
:
Subject
<
any
>
=
this
.
$apppopover
.
openPop
(
$event
,
view
,
context
,
param
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
this
.
openViewClose
(
result
);
});
}
/**
* 独立里面弹出
*
* @private
* @param {string} url
* @memberof AppColumnLink
*/
private
openPopupApp
(
url
:
string
):
void
{
window
.
open
(
url
,
'_blank'
);
}
/**
* 打开重定向视图
*
* @private
* @param {*} $event
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private
openRedirectView
(
$event
:
any
,
view
:
any
,
data
:
any
):
void
{
this
.
$http
.
get
(
view
.
url
,
data
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'请求异常'
});
}
if
(
response
.
status
===
401
)
{
return
;
}
const
{
data
:
result
}
=
response
;
if
(
result
.
viewparams
&&
!
Object
.
is
(
result
.
viewparams
.
srfkey
,
''
))
{
Object
.
assign
(
data
,
{
srfkey
:
result
.
viewparams
.
srfkey
});
}
if
(
Object
.
is
(
result
.
openmode
,
'POPUPAPP'
)
&&
result
.
url
&&
!
Object
.
is
(
result
.
url
,
''
))
{
this
.
openPopupApp
(
result
.
url
);
}
else
if
(
Object
.
is
(
result
.
openmode
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
result
.
openmode
,
''
))
{
// 所有数据保持在同一级
if
(
data
.
srfparentdata
)
{
Object
.
assign
(
data
,
data
.
srfparentdata
);
delete
data
.
srfparentdata
;
}
this
.
openIndexViewTab
(
view
,
null
,
data
);
}
else
if
(
Object
.
is
(
result
.
openmode
,
'POPUPMODAL'
))
{
const
viewname
=
this
.
$util
.
srfFilePath2
(
result
.
viewname
);
const
view
:
any
=
{
viewname
:
viewname
,
title
:
result
.
title
,
width
:
result
.
width
,
height
:
result
.
height
,
}
this
.
openPopupModal
(
view
,
null
,
data
);
}
else
if
(
result
.
openmode
.
startsWith
(
'DRAWER'
))
{
const
viewname
=
this
.
$util
.
srfFilePath2
(
result
.
viewname
);
const
view
:
any
=
{
viewname
:
viewname
,
title
:
result
.
title
,
width
:
result
.
width
,
height
:
result
.
height
,
placement
:
result
.
openmode
,
}
this
.
openDrawer
(
view
,
null
,
data
);
}
else
if
(
Object
.
is
(
result
.
openmode
,
'POPOVER'
))
{
const
viewname
=
this
.
$util
.
srfFilePath2
(
result
.
viewname
);
const
view
:
any
=
{
viewname
:
viewname
,
title
:
result
.
title
,
width
:
result
.
width
,
height
:
result
.
height
,
placement
:
result
.
openmode
,
}
this
.
openPopOver
(
$event
,
view
,
null
,
data
);
}
}).
catch
((
response
:
any
)
=>
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常!'
});
return
;
}
if
(
response
.
status
===
401
)
{
return
;
}
});
}
/**
* 打开页面关闭
*
* @param {*} result
* @memberof AppColumnLink
*/
public
openViewClose
(
result
:
any
)
{
let
item
:
any
=
{};
if
(
result
.
datas
&&
Array
.
isArray
(
result
.
datas
))
{
Object
.
assign
(
item
,
result
.
datas
[
0
]);
}
console
.
log
(
item
);
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppColumnLink
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'info.error'
)
as
string
),
desc
:
(
this
.
$t
(
'info.rowDataException'
)
as
string
)
});
return
false
;
}
// 合并表单参数
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
return
true
;
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-column-link.less';
</
style
>
\ No newline at end of file
ibzdict-boot/src/main/resources/application-dev.yml
浏览文件 @
45a108b7
...
...
@@ -8,6 +8,29 @@ spring:
nacos
:
discovery
:
server-addr
:
172.16.102.211:8848
datasource
:
password
:
'
E6@8@7ce'
username
:
a_A_5ae9eb39a
url
:
jdbc:mysql://172.16.180.232:3306/a_A_5ae9eb39a?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
driver-class-name
:
com.mysql.jdbc.Driver
filters
:
stat,wall,log4j2
#配置初始化大小/最小/最大
initial-size
:
1
min-idle
:
1
max-active
:
20
#获取连接等待超时时间
max-wait
:
60000
#间隔多久进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis
:
60000
#一个连接在池中最小生存的时间
min-evictable-idle-time-millis
:
300000
validation-query
:
SELECT 1 FROM DUAL
test-while-idle
:
true
test-on-borrow
:
false
test-on-return
:
false
#打开PSCache,并指定每个连接上PSCache的大小。oracle设为true,mysql设为false。分库分表较多推荐设置为false
pool-prepared-statements
:
false
max-pool-prepared-statement-per-connection-size
:
20
feign
:
sentinel
:
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录