Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
b265dbdb
提交
b265dbdb
编写于
6月 02, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 部署微服务应用
上级
d9c38236
变更
11
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
107 行增加
和
7 行删除
+107
-7
index.ts
app_web/src/store/index.ts
+2
-2
actions.ts
app_web/src/store/modules/auth-resource/actions.ts
+14
-0
getters.ts
app_web/src/store/modules/auth-resource/getters.ts
+20
-0
index.ts
app_web/src/store/modules/auth-resource/index.ts
+16
-0
mutations.ts
app_web/src/store/modules/auth-resource/mutations.ts
+22
-0
state.ts
app_web/src/store/modules/auth-resource/state.ts
+9
-0
auth-guard.ts
app_web/src/utils/auth-guard/auth-guard.ts
+1
-1
main-appmenu-base.vue
app_web/src/widgets/app/main-appmenu/main-appmenu-base.vue
+2
-2
config.xml
config.xml
+5
-0
Dockerfile
ibzuaa-app/ibzuaa-app-web/src/main/docker/Dockerfile
+1
-1
ibzuaa-app-web.yaml
...aa-app/ibzuaa-app-web/src/main/docker/ibzuaa-app-web.yaml
+15
-1
未找到文件。
app_web/src/store/index.ts
浏览文件 @
b265dbdb
...
...
@@ -7,7 +7,7 @@ import * as mutations from './mutations';
import
*
as
getters
from
'./getters'
;
import
viewaction
from
'./modules/view-action'
import
unifiedresource
from
'./modules/unified
-resource'
import
authresource
from
'./modules/auth
-resource'
const
state
=
{
...
rootstate
...
...
@@ -22,7 +22,7 @@ const store = new Vuex.Store({
getters
,
modules
:
{
viewaction
,
unified
resource
auth
resource
},
});
...
...
app_web/src/store/modules/auth-resource/actions.ts
0 → 100644
浏览文件 @
b265dbdb
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export
const
commitResourceData
=
({
commit
,
state
}:
{
commit
:
any
,
state
:
any
},
{
unires
,
enablepermissionvalid
}:
{
unires
:
Array
<
any
>
,
enablepermissionvalid
:
boolean
})
=>
{
if
(
unires
&&
unires
.
length
>
0
){
commit
(
'setResourceData'
,
unires
);
}
if
(
enablepermissionvalid
){
commit
(
'setEnablePermissionValid'
,
enablepermissionvalid
);
}
}
\ No newline at end of file
app_web/src/store/modules/auth-resource/getters.ts
0 → 100644
浏览文件 @
b265dbdb
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export
const
getResourceData
=
(
state
:
any
)
=>
(
resourcetag
:
string
)
=>
{
let
itemIndex
:
any
=
state
.
resourceData
.
findIndex
((
unirescode
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
unirescode
,
resourcetag
);
})
return
itemIndex
===
-
1
?
false
:
true
;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export
const
getEnablePermissionValid
=
(
state
:
any
)
=>
{
return
state
.
enablePermissionValid
;
}
\ No newline at end of file
app_web/src/store/modules/auth-resource/index.ts
0 → 100644
浏览文件 @
b265dbdb
import
{
resourcestate
}
from
'./state'
;
import
*
as
actions
from
'./actions'
;
import
*
as
mutations
from
'./mutations'
;
import
*
as
getters
from
'./getters'
;
const
state
=
{
...
resourcestate
}
export
default
{
namespaced
:
true
,
state
,
getters
,
actions
,
mutations
}
\ No newline at end of file
app_web/src/store/modules/auth-resource/mutations.ts
0 → 100644
浏览文件 @
b265dbdb
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export
const
setResourceData
=
(
state
:
any
,
resourceArray
:
Array
<
any
>
)
=>
{
if
(
resourceArray
&&
resourceArray
.
length
===
0
){
return
;
}
state
.
resourceData
=
resourceArray
;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export
const
setEnablePermissionValid
=
(
state
:
any
,
enablepermissionvalid
:
boolean
)
=>
{
state
.
enablePermissionValid
=
enablepermissionvalid
;
}
app_web/src/store/modules/auth-resource/state.ts
0 → 100644
浏览文件 @
b265dbdb
/**
* 所有资源状态
*/
export
const
resourcestate
:
any
=
{
// 统一资源数据
resourceData
:
[],
// 是否开启权限认证
enablePermissionValid
:
false
}
\ No newline at end of file
app_web/src/utils/auth-guard/auth-guard.ts
浏览文件 @
b265dbdb
...
...
@@ -67,7 +67,7 @@ export class AuthGuard {
}
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
// 提交统一资源数据
router
.
app
.
$store
.
dispatch
(
'
unified
resource/commitResourceData'
,
data
);
router
.
app
.
$store
.
dispatch
(
'
auth
resource/commitResourceData'
,
data
);
}
}
resolve
(
true
);
...
...
app_web/src/widgets/app/main-appmenu/main-appmenu-base.vue
浏览文件 @
b265dbdb
...
...
@@ -645,7 +645,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main
*/
public
handleMenusResource
(
inputMenus
:
Array
<
any
>
){
if
(
this
.
$store
.
getters
[
'
unified
resource/getEnablePermissionValid'
]){
if
(
this
.
$store
.
getters
[
'
auth
resource/getEnablePermissionValid'
]){
this
.
computedEffectiveMenus
(
inputMenus
);
}
this
.
dataProcess
(
this
.
menuMode
.
getAppMenuItems
());
...
...
@@ -661,7 +661,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
computedEffectiveMenus
(
inputMenus
:
Array
<
any
>
){
inputMenus
.
forEach
((
_item
:
any
)
=>
{
if
(
_item
.
resourcetag
&&
!
this
.
$store
.
getters
[
'
unified
resource/getResourceData'
](
_item
.
resourcetag
)){
if
(
_item
.
resourcetag
&&
!
this
.
$store
.
getters
[
'
auth
resource/getResourceData'
](
_item
.
resourcetag
)){
_item
.
hidden
=
true
;
if
(
_item
.
items
&&
_item
.
items
.
length
>
0
)
{
this
.
computedEffectiveMenus
(
_item
.
items
);
...
...
config.xml
浏览文件 @
b265dbdb
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Pweb
cd ibzuaa-app/ibzuaa-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzuaa-app/ibzuaa-app-web/src/main/docker/Dockerfile
浏览文件 @
b265dbdb
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar
EXPOSE
8080
EXPOSE
30002
ADD
ibzuaa-app-web.jar /ibzuaa-app-web.jar
ibzuaa-app/ibzuaa-app-web/src/main/docker/ibzuaa-app-web.yaml
浏览文件 @
b265dbdb
...
...
@@ -3,9 +3,23 @@ services:
ibzuaa-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest
ports
:
-
"
8080:8080
"
-
"
30002:30002
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30002
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
ABC=1
-
DEC=2
deploy
:
resources
:
limits
:
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录