Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
7d09d373
Commit
7d09d373
authored
Jun 23, 2020
by
panpp
Browse files
修改了主页工作台常用功能的显示内容
parent
a866cd37
Changes
83
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/static/plugins/animate/3.7.2/animate.min.css
0 → 100644
View file @
7d09d373
This diff is collapsed.
Click to expand it.
src/main/webapp/static/plugins/less/3.9.0/less.min.js
0 → 100644
View file @
7d09d373
This diff is collapsed.
Click to expand it.
src/main/webapp/static/plugins/ms/1.0.0/ms.dict.js
0 → 100644
View file @
7d09d373
/**
* 字典类
* 初始化:ms.dict.list("A类型,B类型,C类型","子业务类型")
* 获取值:ms.dict.getDictValue("A类型标签") ;ms.dict.getDictValue("C类型标签",3)
* 获取值:ms.dict.getDictLabel("B类型值",2)
*/
(
function
()
{
var
dictData
;
/**
* 获取所有字典类型的数组集合
* @param dictType 字典类型 支持多个类型用英文逗号隔开
* @param isChild 子业务类型 可选
*/
function
list
(
dictType
,
isChild
)
{
var
_dict
=
{
dictType
:
dictType
,
isChild
:
isChild
,
}
ms
.
http
.
get
(
ms
.
manager
+
'
/mdiy/dict/dictList.do
'
,
_dict
).
then
(
function
(
res
)
{
if
(
res
.
code
==
200
){
dict
.
dictData
=
res
.
data
;
}
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
}
function
get
(
index
,
dictLabel
,
dictValue
,
isChild
){
var
dicts
=
(
dict
.
dictData
?
dict
.
dictData
[
index
-
1
]:[]).
filter
(
function
(
element
,
index
,
self
){
if
(
dictLabel
&&
dictLabel
!=
element
.
dictLabel
){
return
false
}
else
if
(
dictValue
&&
dictValue
!=
element
.
dictValue
){
return
false
}
return
true
})
if
(
dicts
.
length
){
return
dicts
[
0
];
}
else
{
return
null
;
}
}
/**
* 获取字典列表
* @param index list方法中dictType的索引值 从1开始
* @returns {*}
*/
function
getList
(
index
){
if
(
index
){
return
dict
.
dictData
[
0
]
}
else
{
return
dict
.
dictData
[
index
-
1
]
}
}
/**
* 获取字典值
* @param dictLabel 字典标签值
* @param index list方法中dictType的索引值 从1开始
* @param defaultValue 默认值
* @returns {string|string|rules.dictValue|{message, required}}
*/
function
getDictValue
(
dictLabel
,
index
,
defaultValue
)
{
if
(
!
defaultValue
)
{
defaultValue
=
""
;
}
var
dictEntity
=
''
if
(
index
&&
dictLabel
)
{
dictEntity
=
get
(
index
,
dictLabel
,
null
);
}
if
(
!
index
&&
dictLabel
)
{
dictEntity
=
get
(
1
,
dictLabel
,
null
);
}
if
(
dictEntity
){
return
dictEntity
.
dictValue
;
}
return
defaultValue
;
}
/**
* 获取字典标签
* @param dictValue 字典值
* @param index list方法中dictType的索引值 从1开始
* @param defaultValue 默认值
* @returns {string|string|rules.dictLabel|{message, required}|data.mdiyFormRule.dictLabel|{trigger, message, required}}
*/
function
getDictLabel
(
dictValue
,
index
,
defaultValue
)
{
if
(
!
defaultValue
)
{
defaultValue
=
""
;
}
var
dictEntity
=
''
if
(
!
index
&&
dictValue
){
dictEntity
=
get
(
1
,
""
,
dictValue
,
null
);
}
if
(
index
&&
dictValue
)
{
dictEntity
=
get
(
index
,
""
,
dictValue
,
null
);
}
if
(
dictEntity
){
return
dictEntity
.
dictLabel
;
}
return
defaultValue
;
}
var
dict
=
{
list
:
list
,
dictData
:
dictData
,
getList
:
getList
,
getDictValue
:
getDictValue
,
getDictLabel
:
getDictLabel
,
}
if
(
typeof
ms
!=
"
object
"
)
{
window
.
ms
=
{};
}
window
.
ms
.
dict
=
dict
;
}());
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment