Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
b81efa45
提交
b81efa45
编写于
5月 14, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2020.2.14 更新
上级
7e2b1845
变更
22
显示空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
457 行增加
和
33 行删除
+457
-33
app-register.ts
src/app-register.ts
+4
-0
app-checkbox-list.vue
src/components/app-checkbox-list/app-checkbox-list.vue
+1
-23
app-column-format.less
src/components/app-column-format/app-column-format.less
+3
-0
app-column-format.vue
src/components/app-column-format/app-column-format.vue
+58
-0
app-form-druipart.vue
src/components/app-form-druipart/app-form-druipart.vue
+11
-1
app-quick-group.less
src/components/app-quick-group/app-quick-group.less
+37
-0
app-quick-group.vue
src/components/app-quick-group/app-quick-group.vue
+175
-0
app-span.vue
src/components/app-span/app-span.vue
+2
-2
app-user.vue
src/components/app-user/app-user.vue
+6
-0
codelist.vue
src/components/codelist/codelist.vue
+2
-2
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+1
-1
login.vue
src/components/login/login.vue
+6
-2
md-view-engine.ts
src/engine/view/md-view-engine.ts
+26
-0
index.ts
src/store/index.ts
+3
-1
actions.ts
src/store/modules/unified-resource/actions.ts
+14
-0
getters.ts
src/store/modules/unified-resource/getters.ts
+20
-0
index.ts
src/store/modules/unified-resource/index.ts
+16
-0
mutations.ts
src/store/modules/unified-resource/mutations.ts
+22
-0
state.ts
src/store/modules/unified-resource/state.ts
+9
-0
default.less
src/styles/default.less
+25
-0
app-modal.less
src/utils/app-modal/app-modal.less
+3
-0
auth-guard.ts
src/utils/auth-guard/auth-guard.ts
+13
-1
未找到文件。
src/app-register.ts
浏览文件 @
b81efa45
...
@@ -69,6 +69,8 @@ import AppImagePreview from './components/app-image-preview/app-image-preview.vu
...
@@ -69,6 +69,8 @@ import AppImagePreview from './components/app-image-preview/app-image-preview.vu
import
AppFormatData
from
'./components/app-format-data/app-format-data.vue'
import
AppFormatData
from
'./components/app-format-data/app-format-data.vue'
import
AppUploadFileInfo
from
'./components/app-upload-file-info/app-upload-file-info.vue'
import
AppUploadFileInfo
from
'./components/app-upload-file-info/app-upload-file-info.vue'
import
ContextMenu
from
'./components/context-menu/context-menu'
import
ContextMenu
from
'./components/context-menu/context-menu'
import
AppColumnFormat
from
'./components/app-column-format/app-column-format.vue'
import
AppQuickGroup
from
'./components/app-quick-group/app-quick-group.vue'
// 全局挂载UI实体服务注册中心
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
...
@@ -147,5 +149,7 @@ export const AppComponents = {
...
@@ -147,5 +149,7 @@ export const AppComponents = {
v
.
component
(
'app-format-data'
,
AppFormatData
);
v
.
component
(
'app-format-data'
,
AppFormatData
);
v
.
component
(
'app-upload-file-info'
,
AppUploadFileInfo
);
v
.
component
(
'app-upload-file-info'
,
AppUploadFileInfo
);
v
.
component
(
'context-menu'
,
ContextMenu
);
v
.
component
(
'context-menu'
,
ContextMenu
);
v
.
component
(
'app-column-format'
,
AppColumnFormat
);
v
.
component
(
'app-quick-group'
,
AppQuickGroup
);
},
},
};
};
\ No newline at end of file
src/components/app-checkbox-list/app-checkbox-list.vue
浏览文件 @
b81efa45
...
@@ -43,7 +43,7 @@ export default class AppCheckBox extends Vue {
...
@@ -43,7 +43,7 @@ export default class AppCheckBox extends Vue {
* @type {string}
* @type {string}
* @memberof AppCheckBox
* @memberof AppCheckBox
*/
*/
@
Prop
({
default
:
'
;
'
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
'
,
'
})
public
valueSeparator
?:
string
;
/**
/**
* 是否禁用
* 是否禁用
...
@@ -97,28 +97,6 @@ export default class AppCheckBox extends Vue {
...
@@ -97,28 +97,6 @@ export default class AppCheckBox extends Vue {
}
}
}
}
/**
* 分隔符
*
* @type {*}
* @memberof AppCheckBox
*/
@
Prop
()
separator
:
any
;
/**
* 获取分隔符
*
* @readonly
* @memberof AppCheckBox
*/
get
currentseparator
()
{
if
(
this
.
separator
)
{
return
this
.
separator
;
}
else
{
return
';'
;
}
}
/**
/**
* 选中值
* 选中值
*
*
...
...
src/components/app-column-format/app-column-format.less
0 → 100644
浏览文件 @
b81efa45
.app-column-format{
display: inline-block;
}
\ No newline at end of file
src/components/app-column-format/app-column-format.vue
0 → 100644
浏览文件 @
b81efa45
<
template
>
<div
class=
"app-column-format"
>
{{
text
}}
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
,
Watch
}
from
"vue-property-decorator"
;
/**
* 表格列格式化json数组,数据格式为"[{"srfkey":"001","srfmajortext":"TEST1"},{"srfkey":"002","srfmajortext":"TEST2"}......]"
*/
@
Component
({
})
export
default
class
AppColumnFormat
extends
Vue
{
/**
* 值
* @type {any}
* @memberof AppColumnFormat
*/
@
Prop
()
public
value
?:
any
;
/**
* 显示文本
* @type {any}
* @memberof AppColumnFormat
*/
get
text
(){
if
(
this
.
value
){
let
returnStr
:
string
=
""
;
let
tempData
:
Array
<
any
>
=
[];
if
(
typeof
(
this
.
value
)
===
'string'
){
tempData
=
JSON
.
parse
(
this
.
value
);
}
else
{
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
value
));
}
tempData
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
if
(
index
>
0
){
returnStr
+=
"、"
;
}
returnStr
+=
item
.
srfmajortext
;
})
return
returnStr
;
}
else
{
return
""
;
}
}
}
</
script
>
<
style
lang=
'less'
>
@import "./app-column-format.less";
</
style
>
\ No newline at end of file
src/components/app-form-druipart/app-form-druipart.vue
浏览文件 @
b81efa45
...
@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue {
...
@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue {
*/
*/
@
Prop
({
default
:
''
})
public
refreshitems
!
:
string
;
@
Prop
({
default
:
''
})
public
refreshitems
!
:
string
;
/**
* 禁止加载
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@
Prop
({
default
:
false
})
public
isForbidLoad
!
:
boolean
;
/**
/**
* 关系视图类型
* 关系视图类型
*
*
...
@@ -254,8 +262,10 @@ export default class AppFormDRUIPart extends Vue {
...
@@ -254,8 +262,10 @@ export default class AppFormDRUIPart extends Vue {
this
.
blockUIStop
();
this
.
blockUIStop
();
}
}
}
}
if
(
!
this
.
isForbidLoad
){
this
.
formDruipart
.
next
({
action
:
'load'
,
data
:{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
}});
this
.
formDruipart
.
next
({
action
:
'load'
,
data
:{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
}});
}
}
}
/**
/**
* vue 生命周期
* vue 生命周期
...
...
src/components/app-quick-group/app-quick-group.less
0 → 100644
浏览文件 @
b81efa45
.app-quick-group{
padding: 4px;
background-color: #F1F1F1;
.app-quick-item{
margin-right: 8px;
padding: 8px;
cursor: pointer;
.app-quick-item-label{
margin-left:4px;
}
.app-seleted-item{
display: inline-block;
font-weight: 700;
color: #0c64eb !important;
padding: 4px;
border-bottom: 2px solid;
}
.app-seleted-item:focus {
outline: none;
}
.app-quick-item-counter{
border-radius: 12px;
padding-left: 4px;
font-size: 12px;
font-weight: 400;
vertical-align: middle;
display: inline-block;
width: 18px;
height: 18px;
margin-left: 4px;
background-color: #ddd;
}
}
.app-quick-item :hover{
color: #0c64eb !important;
}
}
\ No newline at end of file
src/components/app-quick-group/app-quick-group.vue
0 → 100644
浏览文件 @
b81efa45
<
template
>
<div
class=
"app-quick-group"
>
<span
class=
"app-quick-item"
v-for=
"item in renderArray"
:key=
"item.id"
@
click=
"handleClick(item)"
>
<span
v-if=
"!item.children"
:style=
"
{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i
v-if=
" item.iconcls && !Object.is(item.iconcls, '')"
:class=
"item.iconcls"
></i>
<img
v-else-if=
"item.icon && !Object.is(item.icon, '')"
:src=
"item.icon"
/>
<span
class=
"app-quick-item-label"
>
{{
item
.
label
}}
</span>
<span
v-show=
"isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]"
class=
"app-quick-item-counter"
>
{{
itemTag
(
item
)
}}
</span>
</span>
<el-dropdown
v-if=
"item.children"
style=
"outline: none !important;"
trigger=
"click"
@
command=
"handleCommand($event,item)"
>
<span
:style=
"
{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i
v-if=
" item.iconcls && !Object.is(item.iconcls, '')"
:class=
"item.iconcls"
></i>
<img
v-else-if=
"item.icon && !Object.is(item.icon, '')"
:src=
"item.icon"
/>
<span
class=
"app-quick-item-label"
>
{{
item
.
label
}}
</span>
<span
v-show=
"isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]"
class=
"app-quick-item-counter"
>
{{
itemTag
(
item
)
}}
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-for=
"childitem in item.children"
:command=
"childitem"
:key=
"childitem.id"
>
<span
:style=
"
{color:childitem.color}">
<i
v-if=
" childitem.iconcls && !Object.is(childitem.iconcls, '')"
:class=
"childitem.iconcls"
></i>
<img
v-else-if=
"childitem.icon && !Object.is(childitem.icon, '')"
:src=
"childitem.icon"
/>
<span
:style=
"
{color:(childitem.label == item.label)?'#0c64eb':''}">
{{
childitem
.
label
}}
</span>
</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</span>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
@
Component
({})
export
default
class
AppQuickGroup
extends
Vue
{
/**
* 传入渲染项
*
* @type {Array<any>}
* @memberof AppQuickGroup
*/
@
Prop
()
public
items
!
:
Array
<
any
>
;
/**
* 计数器服务名
*
* @type {string}
* @memberof AppQuickGroup
*/
@
Prop
()
public
counterService
?:
any
;
/**
* UI选中项
*
* @type {*}
* @memberof AppQuickGroup
*/
public
selectedUiItem
:
any
;
/**
* 传入渲染项
*
* @type {Array<any>}
* @memberof AppQuickGroup
*/
get
renderArray
(){
if
(
this
.
items
&&
this
.
items
.
length
>
0
){
this
.
selectedUiItem
=
this
.
items
[
0
];
this
.
handleClick
(
this
.
items
[
0
]);
return
this
.
handleDataSet
(
this
.
items
)
}
else
{
return
[];
}
}
public
itemTag
(
item
:
any
){
if
(
this
.
counterService
&&
this
.
counterService
.
counterData
&&
item
.
codename
){
return
this
.
counterService
.
counterData
[
item
.
codename
];
}
else
{
return
""
;
}
}
/**
* 是否选中当前项
*
* @param item 传入当前项
* @memberof AppQuickGroup
*/
public
isSelectedItem
(
item
:
any
){
if
(
this
.
selectedUiItem
&&
(
this
.
selectedUiItem
.
id
===
item
.
id
)){
return
true
;
}
else
{
return
false
;
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @memberof AppQuickGroup
*/
public
handleDataSet
(
result
:
Array
<
any
>
){
let
list
:
Array
<
any
>
=
[];
if
(
result
.
length
===
0
){
return
list
;
}
result
.
forEach
((
codeItem
:
any
)
=>
{
if
(
!
codeItem
.
pvalue
){
let
valueField
:
string
=
codeItem
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
codeItem
);
list
.
push
(
codeItem
);
}
})
return
list
;
}
/**
* 处理非根节点数据
*
* @param pValue 父值
* @param result 返回数组
* @param codeItem 代码项
* @memberof AppQuickGroup
*/
public
setChildCodeItems
(
pValue
:
string
,
result
:
Array
<
any
>
,
codeItem
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
pvalue
==
pValue
){
let
valueField
:
string
=
item
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
item
);
if
(
!
codeItem
.
children
){
codeItem
.
children
=
[];
}
codeItem
.
children
.
push
(
item
);
}
})
}
/**
* 处理点击事件
*
* @param $event 值
* @param isswitch 是否切换UI选中项
* @memberof AppQuickGroup
*/
public
handleClick
(
$event
:
any
,
isswitch
:
boolean
=
true
){
this
.
$emit
(
'valuechange'
,
$event
);
if
(
isswitch
){
this
.
selectedUiItem
=
$event
;
}
this
.
$forceUpdate
();
}
/**
* 处理子项点击事件
*
* @param $event 值
* @param item 父值
* @memberof AppQuickGroup
*/
public
handleCommand
(
$event
:
any
,
item
:
any
){
item
.
label
=
$event
.
label
;
item
.
codename
=
$event
.
codename
;
this
.
handleClick
(
$event
,
false
);
}
}
</
script
>
<
style
lang=
'less'
>
@import "./app-quick-group.less";
</
style
>
\ No newline at end of file
src/components/app-span/app-span.vue
浏览文件 @
b81efa45
...
@@ -55,14 +55,14 @@ export default class AppSpan extends Vue {
...
@@ -55,14 +55,14 @@ export default class AppSpan extends Vue {
* @type {boolean}
* @type {boolean}
* @memberof AppSpan
* @memberof AppSpan
*/
*/
@
Prop
({
default
:
"、"
})
public
textSeparator
?:
string
;
@
Prop
({
default
:
'、'
})
public
textSeparator
?:
string
;
/**
/**
* 值分隔符
* 值分隔符
* @type {boolean}
* @type {boolean}
* @memberof AppSpan
* @memberof AppSpan
*/
*/
@
Prop
({
default
:
";"
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
','
})
public
valueSeparator
?:
string
;
/**
/**
* 监控表单属性 data 值
* 监控表单属性 data 值
...
...
src/components/app-user/app-user.vue
浏览文件 @
b81efa45
...
@@ -64,6 +64,12 @@ export default class AppUser extends Vue {
...
@@ -64,6 +64,12 @@ export default class AppUser extends Vue {
_user
.
avatar
=
this
.
$store
.
getters
.
getAppData
().
context
.
srfusericonpath
;
_user
.
avatar
=
this
.
$store
.
getters
.
getAppData
().
context
.
srfusericonpath
;
}
}
}
}
if
(
localStorage
.
getItem
(
"user"
)){
let
user
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)
as
string
);
if
(
user
&&
user
.
personname
){
_user
.
name
=
user
.
personname
;
}
}
Object
.
assign
(
this
.
user
,
_user
,{
Object
.
assign
(
this
.
user
,
_user
,{
time
:
+
new
Date
time
:
+
new
Date
});
});
...
...
src/components/codelist/codelist.vue
浏览文件 @
b81efa45
...
@@ -61,14 +61,14 @@ export default class CodeList extends Vue {
...
@@ -61,14 +61,14 @@ export default class CodeList extends Vue {
* @type {boolean}
* @type {boolean}
* @memberof SelectPicker
* @memberof SelectPicker
*/
*/
@
Prop
({
default
:
"、"
})
public
textSeparator
?:
string
;
@
Prop
({
default
:
'、'
})
public
textSeparator
?:
string
;
/**
/**
* 值分隔符
* 值分隔符
* @type {boolean}
* @type {boolean}
* @memberof SelectPicker
* @memberof SelectPicker
*/
*/
@
Prop
({
default
:
";"
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
','
})
public
valueSeparator
?:
string
;
/**
/**
* 是否为空
* 是否为空
...
...
src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
b81efa45
...
@@ -60,7 +60,7 @@ export default class DropDownListMpicker extends Vue {
...
@@ -60,7 +60,7 @@ export default class DropDownListMpicker extends Vue {
* @type {string}
* @type {string}
* @memberof DropDownListMpicker
* @memberof DropDownListMpicker
*/
*/
@
Prop
({
default
:
'
;
'
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
'
,
'
})
public
valueSeparator
?:
string
;
/**
/**
* 是否禁用
* 是否禁用
...
...
src/components/login/login.vue
浏览文件 @
b81efa45
...
@@ -133,8 +133,12 @@ export default class Login extends Vue {
...
@@ -133,8 +133,12 @@ export default class Login extends Vue {
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
const
data
=
response
.
data
;
if
(
data
&&
data
.
token
){
localStorage
.
setItem
(
'token'
,
data
.
token
);
localStorage
.
setItem
(
'token'
,
data
.
token
);
}
if
(
data
&&
data
.
user
){
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
data
.
user
));
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
data
.
user
));
}
const
url
:
any
=
this
.
$route
.
query
.
redirect
?
this
.
$route
.
query
.
redirect
:
'*'
;
const
url
:
any
=
this
.
$route
.
query
.
redirect
?
this
.
$route
.
query
.
redirect
:
'*'
;
this
.
$router
.
push
({
path
:
url
});
this
.
$router
.
push
({
path
:
url
});
}
}
...
...
src/engine/view/md-view-engine.ts
浏览文件 @
b81efa45
...
@@ -117,6 +117,9 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -117,6 +117,9 @@ export default class MDViewEngine extends ViewEngine {
if
(
Object
.
is
(
eventName
,
'load'
))
{
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
onSearchFormLoad
(
args
);
this
.
onSearchFormLoad
(
args
);
}
}
if
(
Object
.
is
(
eventName
,
'search'
))
{
this
.
onSearchFormLoad
(
args
);
}
}
}
/**
/**
...
@@ -157,6 +160,20 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -157,6 +160,20 @@ export default class MDViewEngine extends ViewEngine {
this
.
isLoadDefault
=
true
;
this
.
isLoadDefault
=
true
;
}
}
/**
* 搜索表单搜索
*
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public
onSearchFormSearch
(
args
:
any
=
{}):
void
{
if
(
this
.
getMDCtrl
()
&&
this
.
isLoadDefault
)
{
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
setViewState2
({
tag
:
tag
,
action
:
'load'
,
viewdata
:
this
.
view
.
viewparams
});
}
this
.
isLoadDefault
=
true
;
}
/**
/**
* 处理实体界面行为
* 处理实体界面行为
*
*
...
@@ -372,6 +389,15 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -372,6 +389,15 @@ export default class MDViewEngine extends ViewEngine {
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
Object
.
assign
(
arg
,
{
query
:
this
.
view
.
query
});
Object
.
assign
(
arg
,
{
query
:
this
.
view
.
query
});
}
}
// 快速分组和快速搜索栏
let
otherQueryParam
:
any
=
{};
if
(
this
.
view
&&
this
.
view
.
qucikGroupData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qucikGroupData
);
}
if
(
this
.
view
&&
this
.
view
.
qucikFormData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qucikFormData
);
}
Object
.
assign
(
arg
,{
viewparams
:
otherQueryParam
});
}
}
/**
/**
...
...
src/store/index.ts
浏览文件 @
b81efa45
...
@@ -7,6 +7,7 @@ import * as mutations from './mutations';
...
@@ -7,6 +7,7 @@ import * as mutations from './mutations';
import
*
as
getters
from
'./getters'
;
import
*
as
getters
from
'./getters'
;
import
viewaction
from
'./modules/view-action'
import
viewaction
from
'./modules/view-action'
import
unifiedresource
from
'./modules/unified-resource'
const
state
=
{
const
state
=
{
...
rootstate
...
rootstate
...
@@ -20,7 +21,8 @@ const store = new Vuex.Store({
...
@@ -20,7 +21,8 @@ const store = new Vuex.Store({
mutations
,
mutations
,
getters
,
getters
,
modules
:
{
modules
:
{
viewaction
viewaction
,
unifiedresource
},
},
});
});
...
...
src/store/modules/unified-resource/actions.ts
0 → 100644
浏览文件 @
b81efa45
/**
* 提交统一资源数据
*
* @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
src/store/modules/unified-resource/getters.ts
0 → 100644
浏览文件 @
b81efa45
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export
const
getResourceData
=
(
state
:
any
)
=>
(
resourcetag
:
string
)
=>
{
let
itemIndex
:
any
=
state
.
resourceData
.
findIndex
((
obj
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
obj
.
unirescode
,
resourcetag
);
})
return
itemIndex
===
-
1
?
false
:
true
;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export
const
getEnablePermissionValid
=
(
state
:
any
)
=>
{
return
state
.
enablePermissionValid
;
}
\ No newline at end of file
src/store/modules/unified-resource/index.ts
0 → 100644
浏览文件 @
b81efa45
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
src/store/modules/unified-resource/mutations.ts
0 → 100644
浏览文件 @
b81efa45
/**
* 设置统一资源数据
*
* @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
;
}
src/store/modules/unified-resource/state.ts
0 → 100644
浏览文件 @
b81efa45
/**
* 所有资源状态
*/
export
const
resourcestate
:
any
=
{
// 统一资源数据
resourceData
:
[],
// 是否开启权限认证
enablePermissionValid
:
false
}
\ No newline at end of file
src/styles/default.less
浏览文件 @
b81efa45
...
@@ -206,6 +206,31 @@
...
@@ -206,6 +206,31 @@
padding-bottom: 16px;
padding-bottom: 16px;
}
}
}
}
.view-container.degridview, .view-container.degridview9, .view-container.dewfgridview{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
}
}
>.view-card{
>.ivu-card-body{
>.content-container{
.quick-group-container,.quick-search-input{
float: left;
margin-top: 6px;
margin-bottom: 6px;
}
.quick-search-container{
float: left;
margin-top: -2px;
margin-bottom: 6px;
}
}
}
}
}
/*** END:多数据视图属性布局 ***/
/*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式
// 看板视图,卡片模式
...
...
src/utils/app-modal/app-modal.less
浏览文件 @
b81efa45
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
.ivu-modal-body {
.ivu-modal-body {
padding: 0;
padding: 0;
height: calc(100% - 52px);
height: calc(100% - 52px);
.view-container{
padding: 15px;
}
}
}
}
}
}
}
...
...
src/utils/auth-guard/auth-guard.ts
浏览文件 @
b81efa45
...
@@ -53,9 +53,21 @@ export class AuthGuard {
...
@@ -53,9 +53,21 @@ export class AuthGuard {
const
get
:
Promise
<
any
>
=
Http
.
getInstance
().
get
(
url
);
const
get
:
Promise
<
any
>
=
Http
.
getInstance
().
get
(
url
);
get
.
then
((
response
:
any
)
=>
{
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
if
(
response
&&
response
.
status
===
200
)
{
cons
t
{
data
}:
{
data
:
any
}
=
response
;
le
t
{
data
}:
{
data
:
any
}
=
response
;
if
(
data
)
{
if
(
data
)
{
// token认证把用户信息放入应用级数据
if
(
localStorage
.
getItem
(
'user'
)){
let
user
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
'user'
)
as
string
);
let
localAppData
:
any
=
{};
if
(
user
.
sessionParams
){
localAppData
=
{
context
:
user
.
sessionParams
};
Object
.
assign
(
localAppData
,
data
);
}
data
=
JSON
.
parse
(
JSON
.
stringify
(
localAppData
));
}
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
// 提交统一资源数据
router
.
app
.
$store
.
dispatch
(
'unifiedresource/commitResourceData'
,
data
);
}
}
}
}
resolve
(
true
);
resolve
(
true
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录