Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
c1f7c5aa
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1172
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c1f7c5aa
编写于
9月 18, 2022
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增业务编码配置功能
上级
0c9d9047
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
106 addition
and
7 deletion
+106
-7
common/src/main/resources/template/js/codeRule/businessDataCodeRuleConfig.js
...ources/template/js/codeRule/businessDataCodeRuleConfig.js
+52
-0
common/src/main/resources/template/tpl/codeRule/businessDataCodeRuleConfig.html
...ces/template/tpl/codeRule/businessDataCodeRuleConfig.html
+43
-0
web/src/main/resources/template/assets/lib/layui/lay/modules/ruleCode/ruleCode.js
...emplate/assets/lib/layui/lay/modules/ruleCode/ruleCode.js
+11
-7
未找到文件。
common/src/main/resources/template/js/codeRule/businessDataCodeRuleConfig.js
0 → 100644
浏览文件 @
c1f7c5aa
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
;
// 获取所有编码规则
var
codeRuleSelectHtml
=
''
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
getAllCodeRuleList
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
codeRuleSelectHtml
=
getDataUseHandlebars
(
getFileContent
(
'
tpl/template/select-option.tpl
'
),
json
);
},
async
:
false
});
// 获取需要配置编码规则的业务功能对象
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
queryClassCodeRuleList
"
,
params
:
{},
pagination
:
false
,
method
:
"
GET
"
,
template
:
$
(
"
#baseTemplate
"
).
html
(),
ajaxSendLoadBefore
:
function
(
hdb
,
json
)
{
$
.
each
(
json
.
bean
,
function
(
key
,
value
)
{
$
.
each
(
value
,
function
(
i
,
item
)
{
item
.
selectHtml
=
codeRuleSelectHtml
;
})
})
},
ajaxSendAfter
:
function
(
json
)
{
$
.
each
(
json
.
bean
,
function
(
key
,
value
)
{
$
.
each
(
value
,
function
(
i
,
item
)
{
$
(
"
#
"
+
item
.
id
).
val
(
item
.
codeRuleId
);
})
})
form
.
render
();
form
.
on
(
'
select(codeRole)
'
,
function
(
data
)
{
var
cudeRuleId
=
data
.
value
;
var
id
=
data
.
elem
.
id
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
editClassCodeRuleConfig
"
,
params
:
{
id
:
id
,
cudeRuleId
:
cudeRuleId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
}});
});
}
});
exports
(
'
businessDataCodeRuleConfig
'
,
{});
});
common/src/main/resources/template/tpl/codeRule/businessDataCodeRuleConfig.html
0 → 100644
浏览文件 @
c1f7c5aa
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"margin: 0 auto; padding: 20px;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
</form>
</div>
<script
type=
"text/x-handlebars-template"
id=
"baseTemplate"
>
{{
#
each
bean
}}
<
div
class
=
"
layui-col-md12
"
>
<
div
class
=
"
layui-card
"
>
<
div
class
=
"
layui-card-header
"
><
b
>
{{@
key
}}
<
/b></
div
>
<
div
class
=
"
layui-card-body
"
style
=
"
display: inline-block;
"
>
{{
#
each
@
this
}}
<
blockquote
class
=
"
layui-elem-quote layui-quote-nm layui-col-md2
"
>
{{
serviceName
}}
<
select
lay
-
filter
=
"
codeRole
"
lay
-
search
=
""
id
=
"
{{id}}
"
win
-
verify
=
"
required
"
>
{{{
selectHtml
}}}
<
/select
>
<
/blockquote
>
{{
/
each
}}
<
/div
>
<
/div
>
<
/div
>
{{
/
each
}}
</script>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/codeRule/
'
}).
use
(
'
businessDataCodeRuleConfig
'
);
</script>
</body>
</html>
\ No newline at end of file
web/src/main/resources/template/assets/lib/layui/lay/modules/ruleCode/ruleCode.js
浏览文件 @
c1f7c5aa
...
...
@@ -478,13 +478,17 @@ layui.define(["jquery", "dragula", 'winui', 'form', 'element'], function(exports
};
}
else
{
var
content
=
variableMap
[
value
].
content
;
if
(
variableMap
[
value
].
type
==
'
map
'
&&
!
isNull
(
variableMap
[
value
].
content
))
{
var
contentMap
=
{};
content
=
content
.
split
(
/
\n
/
);
$
.
each
(
content
,
function
(
i
,
item
)
{
contentMap
[
item
.
split
(
"
|
"
)[
0
]]
=
item
.
split
(
"
|
"
)[
1
];
});
content
=
contentMap
;
if
(
variableMap
[
value
].
type
==
'
map
'
)
{
if
(
!
isNull
(
variableMap
[
value
].
content
))
{
var
contentMap
=
{};
content
=
content
.
split
(
/
\n
/
);
$
.
each
(
content
,
function
(
i
,
item
)
{
contentMap
[
item
.
split
(
"
|
"
)[
0
]]
=
item
.
split
(
"
|
"
)[
1
];
});
content
=
contentMap
;
}
else
{
content
=
{};
}
}
params
=
{
type
:
variableMap
[
value
].
type
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录