Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
T
TrainSys
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
苏州培训方案
TrainSys
提交
64891427
提交
64891427
编写于
5月 11, 2023
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lxm1993 发布系统代码 [TrainSys,网页端]
上级
98b3e238
变更
9
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
200 行增加
和
87 行删除
+200
-87
package.json
app_Web/package.json
+7
-7
pnpm-lock.yaml
app_Web/pnpm-lock.yaml
+41
-41
router-shell.tsx
app_Web/src/components/router-shell/router-shell.tsx
+44
-1
tree-exp-view.tsx
app_Web/src/components/views/tree-exp-view/tree-exp-view.tsx
+2
-2
index.ts
app_Web/src/router/index.ts
+20
-0
403-view.tsx
app_Web/src/views/403-view/403-view.tsx
+50
-0
yarn.lock
app_Web/yarn.lock
+28
-28
PSSYSAPP.json
.../ibizlab/trainsys/PSSYSAPPS/TemplatePublish/PSSYSAPP.json
+4
-4
PSSYSAPP.json
...ces/model/cn/ibizlab/trainsys/PSSYSAPPS/Web/PSSYSAPP.json
+4
-4
未找到文件。
app_Web/package.json
浏览文件 @
64891427
...
...
@@ -13,13 +13,13 @@
"dependencies"
:
{
"@floating-ui/dom"
:
"^1.0.11"
,
"@ibiz-template/command"
:
"^0.0.1-beta.50"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/core"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/model"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/service"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.7
4
"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.7
5
"
,
"@ibiz-template/core"
:
"^0.0.1-beta.7
5
"
,
"@ibiz-template/model"
:
"^0.0.1-beta.7
5
"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.7
5
"
,
"@ibiz-template/service"
:
"^0.0.1-beta.7
5
"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.7
5
"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.7
5
"
,
"@ibiz/dynamic-model-api"
:
"^2.1.17"
,
"@riophae/vue-treeselect"
:
"^0.4.0"
,
"dayjs"
:
"^1.11.7"
,
...
...
app_Web/pnpm-lock.yaml
浏览文件 @
64891427
此差异已折叠。
点击以展开。
app_Web/src/components/router-shell/router-shell.tsx
浏览文件 @
64891427
...
...
@@ -54,6 +54,34 @@ export default defineComponent({
level
:
props
.
level
,
};
/** 计算视图是否有权限访问 */
const
calcViewAccess
=
(
accUserMode
?:
number
|
0
|
2
|
3
|
4
,
accessKey
?:
string
,
)
=>
{
// 未指定直接返回true
if
(
accUserMode
===
0
)
{
return
true
;
}
// 2:登录用户、 3:匿名用户及登录用户,看有没有用户登录
const
hasLogin
=
!!
ibiz
.
appData
?.
context
.
srfuserid
;
if
(
accUserMode
===
3
||
accUserMode
===
2
)
{
return
hasLogin
;
}
// 登录用户且拥有指定资源能力,配了资源标识要有资源标识,否则看是否登录
if
(
accUserMode
===
4
)
{
if
(
accessKey
)
{
const
unires
:
string
[]
=
ibiz
.
appData
?.
unires
;
return
hasLogin
&&
unires
.
includes
(
accessKey
);
}
return
hasLogin
;
}
return
true
;
};
// 根据应用模型解析视图参数
const
calcViewData
=
async
()
=>
{
const
service
=
await
ModelUtil
.
getModelService
();
...
...
@@ -62,7 +90,22 @@ export default defineComponent({
// 获取视图
try
{
const
route
=
useRoute
(
proxy
)
as
Route
;
const
_viewData
=
parseRouteViewData
(
appModel
,
route
,
props
.
level
);
const
_viewData
=
await
parseRouteViewData
(
appModel
,
route
,
props
.
level
,
);
const
accessAble
=
calcViewAccess
(
_viewData
.
accUserMode
,
_viewData
.
accessKey
,
);
if
(
!
accessAble
)
{
// 没权限跳转403页面
router
.
push
({
name
:
`403View
${
props
.
level
}
`
});
return
;
}
const
_context
=
IBizContext
.
create
(
_viewData
.
context
);
viewData
.
value
=
{
...
...
app_Web/src/components/views/tree-exp-view/tree-exp-view.tsx
浏览文件 @
64891427
...
...
@@ -88,13 +88,13 @@ export const TreeExpView = defineComponent({
if
(
!
this
.
c
.
context
.
isRouter
)
{
// 非路由模式下绘制嵌入视图
return
h
(
'ViewShell'
,
{
prop
s
:
{
attr
s
:
{
context
:
navViewParams
[
currentNavKey
].
context
,
params
:
navViewParams
[
currentNavKey
].
params
,
modal
:
{
mode
:
ViewMode
.
EMBED
},
modelPath
:
navViewParams
[
currentNavKey
].
modelPath
,
key
:
currentNavKey
,
},
key
:
currentNavKey
,
});
}
...
...
app_Web/src/router/index.ts
浏览文件 @
64891427
...
...
@@ -27,6 +27,11 @@ const router = new Router({
name
:
'404View1'
,
component
:
()
=>
import
(
'../views/404-view/404-view'
),
},
{
path
:
'/403'
,
name
:
'403View1'
,
component
:
()
=>
import
(
'../views/403-view/403-view'
),
},
{
path
:
'/appredirectview'
,
name
:
'appRedirectView'
,
...
...
@@ -73,6 +78,11 @@ const router = new Router({
name
:
'404View2'
,
component
:
()
=>
import
(
'../views/404-view/404-view'
),
},
{
path
:
'403'
,
name
:
'403View2'
,
component
:
()
=>
import
(
'../views/403-view/403-view'
),
},
{
path
:
`:view2(
${
viewReg
}
)/:params2(
${
paramReg
}
)`
,
props
:
{
...
...
@@ -85,6 +95,11 @@ const router = new Router({
name
:
'404View3'
,
component
:
()
=>
import
(
'../views/404-view/404-view'
),
},
{
path
:
'403'
,
name
:
'403View3'
,
component
:
()
=>
import
(
'../views/403-view/403-view'
),
},
{
path
:
`:view3(
${
viewReg
}
)/:params3(
${
paramReg
}
)`
,
props
:
{
...
...
@@ -97,6 +112,11 @@ const router = new Router({
name
:
'404View4'
,
component
:
()
=>
import
(
'../views/404-view/404-view'
),
},
{
path
:
'403'
,
name
:
'403View4'
,
component
:
()
=>
import
(
'../views/403-view/403-view'
),
},
{
path
:
`:view4(
${
viewReg
}
)/:params4(
${
paramReg
}
)`
,
props
:
{
...
...
app_Web/src/views/403-view/403-view.tsx
0 → 100644
浏览文件 @
64891427
import
{
useNamespace
,
useRoute
,
useRouter
}
from
'@ibiz-template/vue-util'
;
import
{
computed
,
defineComponent
,
getCurrentInstance
,
onMounted
}
from
'vue'
;
import
'@ibiz-template/theme/style/components/views/403-view/403-view.scss'
;
import
{
Route
}
from
'vue-router'
;
export
default
defineComponent
({
setup
()
{
const
ns
=
useNamespace
(
'403-view'
);
const
{
proxy
}
=
getCurrentInstance
()
!
;
const
router
=
useRouter
(
proxy
);
const
route
=
useRoute
(
proxy
)
as
Route
;
const
gotoIndexView
=
()
=>
{
router
.
push
(
'/'
);
};
onMounted
(()
=>
{
setTimeout
(()
=>
{
const
el
=
document
.
querySelector
(
'.app-loading-x'
)
as
HTMLDivElement
;
if
(
el
)
{
el
.
style
.
display
=
'none'
;
}
},
300
);
});
const
isTop
=
computed
(()
=>
{
return
!
route
.
params
.
view1
;
});
return
{
ns
,
isTop
,
gotoIndexView
};
},
render
()
{
return
(
<
div
class=
{
[
this
.
ns
.
b
(),
this
.
ns
.
is
(
'top'
,
this
.
isTop
)]
}
>
<
img
class=
{
this
.
ns
.
b
(
'img'
)
}
src=
'./assets/img/404.png'
/>
<
div
class=
{
this
.
ns
.
b
(
'text'
)
}
>
<
div
class=
{
this
.
ns
.
be
(
'text'
,
'text1'
)
}
>
抱歉,您无权限访问该页面!
</
div
>
{
this
.
isTop
?
(
<
div
class=
{
this
.
ns
.
be
(
'text'
,
'text2'
)
}
>
您无权限访问该页面,请返回
<
a
on
-
click=
{
this
.
gotoIndexView
}
>
首页
</
a
>
继续浏览
</
div
>
)
:
null
}
</
div
>
</
div
>
);
},
});
app_Web/yarn.lock
浏览文件 @
64891427
...
...
@@ -651,54 +651,54 @@
dependencies:
qx-util "^0.4.8"
"@ibiz-template/controller@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/controller/-/controller-0.0.1-beta.7
4.tgz#5d2525f924570686fee2b833153772588c777d1e
"
integrity sha512-
qpaj8aS/dsrFvUs9Vq/427397Kbz05fZEMv9+EAXxe3zra/xXy3SYYMfepLvCRvysJnRoUaHwh9YHGJ5oeG/PA
==
"@ibiz-template/controller@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/controller/-/controller-0.0.1-beta.7
5.tgz#1249cdd1a3aa69cd90207616245c688d1e796efd
"
integrity sha512-
kylrN2xbNvuO7vubGfzKoYO+eXOVsHJJIfs1jyOERGYx73U/VWUU1PIZGlGpvuYKnpQ07yl8moeLqIHNS23wXQ
==
dependencies:
async-validator "^4.2.5"
dayjs "^1.11.5"
"@ibiz-template/core@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/core/-/core-0.0.1-beta.7
4.tgz#8f5f1883b15a73c65ed0d9d226de45938739e263
"
integrity sha512-
rqxGwmuceH8zuf4CCtoOEPoGxqO9xcJBO1pA1mPMA3EZsM/biLlERYM9YxVU5g+gFsRXci+cSUx+tc6hSu5xuA
==
"@ibiz-template/core@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/core/-/core-0.0.1-beta.7
5.tgz#38ea1110322ae29648d8446cff3658e2612c7fda
"
integrity sha512-
VgR6qaHBnCK3K+Spp2cihmUbB/hDa52pLq0h9bE+f2MrUF3bxV+kLH3NaSChab9s8HHRk+dpmcFRK26SC6WK9g
==
dependencies:
axios "^1.2.1"
loglevel "^1.8.0"
pluralize "^8.0.0"
qs "^6.11.0"
"@ibiz-template/model@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/model/-/model-0.0.1-beta.7
4.tgz#7dfcf83ea1ceaa60bdc30e3cabe6d630ce95c514
"
integrity sha512-
NZr2C1hTmU/PRrKwnHThIJ9pWA5So1QNBaH9JRtBEEiWcs2JPWyWiBJdBYHUJi3o4taTxRVZF5BmrkI1XtNy6Q
==
"@ibiz-template/model@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/model/-/model-0.0.1-beta.7
5.tgz#2bfd1e99548aff1e8d97658750a8c82eaa8daeb9
"
integrity sha512-
dKqP/gdOFMCF/Ud8xHjF+F2OwMpbvtW9wvzBMsSE3EsBXwd5JdvDZJLR3kmQxKOGr/UALaTIc7hbN1r2F98gbg
==
dependencies:
"@ibiz/dynamic-model-api" "^2.1.17"
pluralize "^8.0.0"
"@ibiz-template/runtime@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/runtime/-/runtime-0.0.1-beta.7
4.tgz#60418bb3fc001d6be9d4b54654219ee2132ab412
"
integrity sha512-
ORt4mTi5ENTqeOpL3JvKfzA41DeFhP7DqqpFW89OVSYgt+CbGcIvTkqBtC6CNuRqVRp9A5WcKpEmxvkwaJYwkg
==
"@ibiz-template/runtime@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/runtime/-/runtime-0.0.1-beta.7
5.tgz#21d88b98cf497fd2b90917bd91309172a68bde9e
"
integrity sha512-
xbM7TFbG+o20/yvRVqiLOgUeGPq4XVIFrUF9IqP/BC6yp0ttavmsUeWgMsJvcxnNEFKQbZEjUpBjnIMGTybzcQ
==
dependencies:
"@ibiz-template/command" "^0.0.1-beta.50"
qs "^6.11.0"
"@ibiz-template/service@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/service/-/service-0.0.1-beta.7
4.tgz#95cfc34670e5e8f658cbb8cd84265cd6e805eaef
"
integrity sha512-
RGwOxtRYnXp5Ay+3hEnF5+muOjmGjBDPbNBpiA8WkeDAftVxW/dRumjFCk6HRSzKVX5B5AXCbN+QUHoWJ2SvaA
==
"@ibiz-template/service@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/service/-/service-0.0.1-beta.7
5.tgz#cf202591c0149d67b9c97c383fe7ffd304d88df2
"
integrity sha512-
wsKiAmAAaSe88yQ2IqEUzOGJBdv9bRYDgVsWijWqWud40rLs0sQJOs5aVffeCcj1eF1GxeJZMhQcwLYhp1O1+g
==
"@ibiz-template/theme@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/theme/-/theme-0.0.1-beta.7
4.tgz#b397cbe0d0abcda912238b4b153aae3c28802b79
"
integrity sha512-
cCAnCazx/VZ9NEgmEH37rkixYRKcdR0dhJAB1o0a7/ikTSvdcxmXf7Tx0ikcTFVRQppPagvUG2kwUSL9iysfaw
==
"@ibiz-template/theme@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/theme/-/theme-0.0.1-beta.7
5.tgz#4aa5a07b8be082574b74b43739fb4fa3bf3ae98b
"
integrity sha512-
ErZqAhQ6GNMgprTFU5msgFqh6dSV7yP4ruL9YzegnNYAClVLQgk8UmviBI13rQt9xbSCpexwnAZ/hirTqEVuAg
==
"@ibiz-template/vue-util@^0.0.1-beta.7
4
":
version "0.0.1-beta.7
4
"
resolved "http://npm.zhr.icu/@ibiz-template/vue-util/-/vue-util-0.0.1-beta.7
4.tgz#d3be2f0cfab1d3b25e03fe8adbfd95ba1ce4d87a
"
integrity sha512-
gyFVrhChd4kZVOTEvE3rg+5N93mv6sNTLcfkNwUJi6vCqQhl32u0Hv9qi8Bm4xJC7SehXFtbG64baFXuWIPBkQ
==
"@ibiz-template/vue-util@^0.0.1-beta.7
5
":
version "0.0.1-beta.7
5
"
resolved "http://npm.zhr.icu/@ibiz-template/vue-util/-/vue-util-0.0.1-beta.7
5.tgz#5dc504da915724c0bb9049ade50d50ddc6e8b23b
"
integrity sha512-
HU+K40kPYtEDCsYSSL5V+cj243zgWKxUoo2ovFW/cb9jqSynCkuvA8WXJx51LRwXiHXbn4KjAXNfvQz7c84zEA
==
"@ibiz/dynamic-model-api@^2.1.17":
version "2.1.17"
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/TemplatePublish/PSSYSAPP.json
浏览文件 @
64891427
...
...
@@ -1224,16 +1224,16 @@
"mOSFilePath"
:
"pssysapps/TemplatePublish/psappviewmsggroups/VMGroup2"
,
"name"
:
"视图消息组2"
,
"getPSAppViewMsgGroupDetails"
:
[
{
"name"
:
"视图消息"
,
"name"
:
"视图消息
2
"
,
"getPSAppViewMsg"
:
{
"modelref"
:
true
,
"id"
:
"ViewMsg
2
"
"id"
:
"ViewMsg
3
"
}
},
{
"name"
:
"视图消息
2
"
,
"name"
:
"视图消息"
,
"getPSAppViewMsg"
:
{
"modelref"
:
true
,
"id"
:
"ViewMsg
3
"
"id"
:
"ViewMsg
2
"
}
}
],
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/psappviewmsggroups/VMGroup2"
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/Web/PSSYSAPP.json
浏览文件 @
64891427
...
...
@@ -2477,16 +2477,16 @@
"mOSFilePath" : "pssysapps/Web/psappviewmsggroups/VMGroup2",
"name" : "视图消息组2",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "视图消息",
"name" : "视图消息
2
",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg
2
"
"id" : "ViewMsg
3
"
}
}, {
"name" : "视图消息
2
",
"name" : "视图消息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg
3
"
"id" : "ViewMsg
2
"
}
} ],
"rTMOSFilePath" : "pssysapps/Web/psappviewmsggroups/VMGroup2"
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录