Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
aaf65246
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1434
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
aaf65246
编写于
4月 14, 2023
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码修改
上级
559fda9a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
40 addition
and
15 deletion
+40
-15
common/src/main/resources/template/js/dsFormPage/editPageContent.js
.../main/resources/template/js/dsFormPage/editPageContent.js
+12
-4
common/src/main/resources/template/js/dsFormPage/editPageContentIsScript.js
...sources/template/js/dsFormPage/editPageContentIsScript.js
+1
-1
erp-produce/src/main/resources/template/js/erpWorkProcedure/erpWorkProcedureChoose.js
...es/template/js/erpWorkProcedure/erpWorkProcedureChoose.js
+2
-0
web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
...s/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
+18
-10
web/src/main/resources/template/assets/lib/layui/customer/tableUtil/initTableChooseUtil.js
...ssets/lib/layui/customer/tableUtil/initTableChooseUtil.js
+3
-0
web/src/main/resources/template/tpl/template/select-option-2.tpl
.../main/resources/template/tpl/template/select-option-2.tpl
+4
-0
未找到文件。
common/src/main/resources/template/js/dsFormPage/editPageContent.js
浏览文件 @
aaf65246
...
@@ -147,23 +147,29 @@ layui.config({
...
@@ -147,23 +147,29 @@ layui.config({
</div>
</div>
</div>`
,
</div>`
,
'
deleteRowCallbackBox
'
:
`<div class="layui-form-item layui-col-xs12">
'
deleteRowCallbackBox
'
:
`<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label" style="width:
6
0%;">删除行之后的回调函数:</label>
<label class="layui-form-label" style="width:
7
0%;">删除行之后的回调函数:</label>
<div class="layui-input-block" script="">
<div class="layui-input-block" script="">
<button id="deleteRowCallbackConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
<button id="deleteRowCallbackConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
</div>
</div>
</div>`
,
</div>`
,
'
addRowCallbackBox
'
:
`<div class="layui-form-item layui-col-xs12">
'
addRowCallbackBox
'
:
`<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label" style="width:
6
0%;">新增行之后的回调函数:</label>
<label class="layui-form-label" style="width:
7
0%;">新增行之后的回调函数:</label>
<div class="layui-input-block" script="">
<div class="layui-input-block" script="">
<button id="addRowCallbackConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
<button id="addRowCallbackConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
</div>
</div>
</div>`
,
</div>`
,
'
afterScriptBox
'
:
`<div class="layui-form-item layui-col-xs12">
'
afterScriptBox
'
:
`<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label" style="width:
60%;">组件加载完成后执行的脚本
:</label>
<label class="layui-form-label" style="width:
70%;">组件加载完成后执行的JS
:</label>
<div class="layui-input-block" script="">
<div class="layui-input-block" script="
layui.define(['jquery'], function(exports) {\n\tvar form = layui.form;\n\n});
">
<button id="afterScriptConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
<button id="afterScriptConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
</div>
</div>
</div>`
,
</div>`
,
'
afterHtmlBox
'
:
`<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label" style="width: 70%;">组件加载完成后执行的HTML:</label>
<div class="layui-input-block" script="">
<button id="afterHtmlConfig" type="button" class="winui-toolbtn writeScript">编写脚本</button>
</div>
</div>`
,
};
};
// 详情类布局才展示的组件属性
// 详情类布局才展示的组件属性
var
detailsPageAttr
=
[
'
attrKeyBox
'
,
'
titleBox
'
,
'
widthBox
'
];
var
detailsPageAttr
=
[
'
attrKeyBox
'
,
'
titleBox
'
,
'
widthBox
'
];
...
@@ -253,6 +259,7 @@ layui.config({
...
@@ -253,6 +259,7 @@ layui.config({
$
(
"
#deleteRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
deleteRowCallback
);
$
(
"
#deleteRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
deleteRowCallback
);
$
(
"
#addRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
addRowCallback
);
$
(
"
#addRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
addRowCallback
);
$
(
"
#afterScriptConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
afterScript
);
$
(
"
#afterScriptConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
afterScript
);
$
(
"
#afterHtmlConfig
"
).
parent
().
attr
(
'
script
'
,
data
.
afterHtml
);
$
(
"
body
"
).
on
(
"
click
"
,
"
#attrTransformTableListConfig
"
,
function
()
{
$
(
"
body
"
).
on
(
"
click
"
,
"
#attrTransformTableListConfig
"
,
function
()
{
parent
.
temData
=
$
(
"
#attrTransformTableListConfig
"
).
parent
().
attr
(
'
data
'
);
parent
.
temData
=
$
(
"
#attrTransformTableListConfig
"
).
parent
().
attr
(
'
data
'
);
...
@@ -321,6 +328,7 @@ layui.config({
...
@@ -321,6 +328,7 @@ layui.config({
newParams
.
deleteRowCallback
=
$
(
"
#deleteRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
);
newParams
.
deleteRowCallback
=
$
(
"
#deleteRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
);
newParams
.
addRowCallback
=
$
(
"
#addRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
);
newParams
.
addRowCallback
=
$
(
"
#addRowCallbackConfig
"
).
parent
().
attr
(
'
script
'
);
newParams
.
afterScript
=
$
(
"
#afterScriptConfig
"
).
parent
().
attr
(
'
script
'
);
newParams
.
afterScript
=
$
(
"
#afterScriptConfig
"
).
parent
().
attr
(
'
script
'
);
newParams
.
afterHtml
=
$
(
"
#afterHtmlConfig
"
).
parent
().
attr
(
'
script
'
);
if
(
!
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
if
(
!
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
newParams
.
attrDefinition
=
getInPoingArr
(
parent
.
attrList
,
'
attrKey
'
,
$
(
"
#attrKey
"
).
val
());
newParams
.
attrDefinition
=
getInPoingArr
(
parent
.
attrList
,
'
attrKey
'
,
$
(
"
#attrKey
"
).
val
());
...
...
common/src/main/resources/template/js/dsFormPage/editPageContentIsScript.js
浏览文件 @
aaf65246
...
@@ -17,7 +17,7 @@ layui.config({
...
@@ -17,7 +17,7 @@ layui.config({
form
.
render
();
form
.
render
();
form
.
on
(
'
submit(formWriteBean)
'
,
function
(
data
)
{
form
.
on
(
'
submit(formWriteBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
parent
.
scriptData
=
encodeURIComponent
(
jsEditor
.
getValue
()
);
parent
.
scriptData
=
jsEditor
.
getValue
(
);
parent
.
layer
.
close
(
index
);
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
parent
.
refreshCode
=
'
0
'
;
}
}
...
...
erp-produce/src/main/resources/template/js/erpWorkProcedure/erpWorkProcedureChoose.js
浏览文件 @
aaf65246
...
@@ -15,6 +15,8 @@ layui.config({
...
@@ -15,6 +15,8 @@ layui.config({
var
checkType
=
'
1
'
;
//工序选择类型:1.单选;2.多选
var
checkType
=
'
1
'
;
//工序选择类型:1.单选;2.多选
if
(
!
isNull
(
parent
.
procedureCheckType
))
{
if
(
!
isNull
(
parent
.
procedureCheckType
))
{
checkType
=
parent
.
procedureCheckType
;
checkType
=
parent
.
procedureCheckType
;
}
else
{
checkType
=
GetUrlParam
(
"
checkType
"
);
}
}
//设置提示信息
//设置提示信息
...
...
web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
浏览文件 @
aaf65246
...
@@ -325,6 +325,9 @@ var dsFormUtil = {
...
@@ -325,6 +325,9 @@ var dsFormUtil = {
var
html_js
=
getDataUseHandlebars
(
'
{{#bean}}
'
+
component
.
jsContent
+
'
{{/bean}}
'
,
jsonStr
);
var
html_js
=
getDataUseHandlebars
(
'
{{#bean}}
'
+
component
.
jsContent
+
'
{{/bean}}
'
,
jsonStr
);
var
jsCon
=
`<script id="script
${
content
.
id
}
">
${
html_js
}
</script>`
;
var
jsCon
=
`<script id="script
${
content
.
id
}
">
${
html_js
}
</script>`
;
$
(
"
#
"
+
boxId
).
append
(
html
+
jsCon
);
$
(
"
#
"
+
boxId
).
append
(
html
+
jsCon
);
// 组件加载完成后执行的HTML和JS
$
(
"
#
"
+
boxId
).
append
(
content
.
afterHtml
);
$
(
"
#
"
+
boxId
).
append
(
`<script>
${
content
.
afterScript
}
</script>`
);
if
(
!
isNull
(
content
.
require
))
{
if
(
!
isNull
(
content
.
require
))
{
dsFormUtil
.
setIsRequired
(
content
);
dsFormUtil
.
setIsRequired
(
content
);
...
@@ -422,33 +425,38 @@ var dsFormUtil = {
...
@@ -422,33 +425,38 @@ var dsFormUtil = {
// 获取属性关联的数据值来源信息
// 获取属性关联的数据值来源信息
getContentLinkedData
:
function
(
content
)
{
getContentLinkedData
:
function
(
content
)
{
var
json
=
{};
if
(
isNull
(
content
.
attrDefinition
)
||
isNull
(
content
.
attrDefinition
.
attrDefinitionCustom
))
{
if
(
isNull
(
content
.
attrDefinition
)
||
isNull
(
content
.
attrDefinition
.
attrDefinitionCustom
))
{
return
content
;
return
content
;
}
}
var
customAttr
=
content
.
attrDefinition
.
attrDefinitionCustom
;
var
customAttr
=
content
.
attrDefinition
.
attrDefinitionCustom
;
var
dataType
=
customAttr
.
dataType
;
if
(
isNull
(
customAttr
.
objectId
)
&&
isNull
(
customAttr
.
defaultData
)
&&
isNull
(
customAttr
.
businessApi
)
&&
$
.
isEmptyObject
(
customAttr
.
businessApi
))
{
if
(
isNull
(
customAttr
.
objectId
)
&&
isNull
(
customAttr
.
defaultData
)
&&
isNull
(
customAttr
.
businessApi
)
&&
$
.
isEmptyObject
(
customAttr
.
businessApi
))
{
return
content
;
return
content
;
}
}
content
.
context
=
dsFormUtil
.
getHtmlContentByDataFrom
(
customAttr
,
content
.
dsFormComponent
.
htmlDataFrom
);
return
content
;
},
getHtmlContentByDataFrom
:
function
(
obj
,
htmlDataFrom
)
{
var
json
=
{};
var
dataType
=
obj
.
dataType
;
if
(
dataType
==
1
)
{
if
(
dataType
==
1
)
{
// 自定义
// 自定义
var
obj
=
isNull
(
customAttr
.
defaultData
)
?
[]
:
customAttr
.
defaultData
;
var
obj
=
isNull
(
obj
.
defaultData
)
?
[]
:
obj
.
defaultData
;
if
(
typeof
obj
==
'
string
'
)
{
if
(
typeof
obj
==
'
string
'
)
{
obj
=
JSON
.
parse
(
obj
);
obj
=
JSON
.
parse
(
obj
);
}
}
json
=
obj
;
json
=
obj
;
}
else
if
(
dataType
==
2
)
{
}
else
if
(
dataType
==
2
)
{
// 枚举
// 枚举
json
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
customAttr
.
objectId
).
rows
;
json
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
obj
.
objectId
).
rows
;
}
else
if
(
dataType
==
3
)
{
}
else
if
(
dataType
==
3
)
{
// 数据字典
// 数据字典
sysDictDataUtil
.
queryDictDataListByDictTypeCode
(
customAttr
.
objectId
,
function
(
data
)
{
sysDictDataUtil
.
queryDictDataListByDictTypeCode
(
obj
.
objectId
,
function
(
data
)
{
json
=
data
.
rows
;
json
=
data
.
rows
;
});
});
}
else
if
(
dataType
==
4
)
{
}
else
if
(
dataType
==
4
)
{
// 自定义接口
// 自定义接口
var
businessApi
=
customAttr
.
businessApi
;
var
businessApi
=
obj
.
businessApi
;
var
params
=
{};
var
params
=
{};
$
.
each
(
businessApi
.
params
,
function
(
key
,
value
)
{
$
.
each
(
businessApi
.
params
,
function
(
key
,
value
)
{
var
realValue
=
""
;
var
realValue
=
""
;
...
@@ -461,10 +469,10 @@ var dsFormUtil = {
...
@@ -461,10 +469,10 @@ var dsFormUtil = {
json
=
data
.
rows
;
json
=
data
.
rows
;
},
async
:
false
});
},
async
:
false
});
}
}
if
(
!
isNull
(
content
.
dsFormComponent
.
htmlDataFrom
))
{
if
(
!
isNull
(
htmlDataFrom
))
{
content
.
context
=
getDataUseHandlebars
(
content
.
dsFormComponent
.
htmlDataFrom
,
json
);
return
getDataUseHandlebars
(
htmlDataFrom
,
json
);
}
}
return
content
;
return
''
;
},
},
// 获取显示值
// 获取显示值
...
...
web/src/main/resources/template/assets/lib/layui/customer/tableUtil/initTableChooseUtil.js
浏览文件 @
aaf65246
...
@@ -191,6 +191,8 @@ var initTableChooseUtil = {
...
@@ -191,6 +191,8 @@ var initTableChooseUtil = {
value
=
$
(
"
#
"
+
tdId
).
val
();
value
=
$
(
"
#
"
+
tdId
).
val
();
}
else
if
(
bean
.
formType
==
'
detail
'
)
{
}
else
if
(
bean
.
formType
==
'
detail
'
)
{
value
=
$
(
"
#
"
+
tdId
).
html
();
value
=
$
(
"
#
"
+
tdId
).
html
();
}
else
if
(
item
.
formType
==
'
chooseInput
'
)
{
value
=
$
(
"
#
"
+
tdId
).
attr
(
"
data-id
"
);
}
}
row
[
bean
.
id
]
=
value
;
row
[
bean
.
id
]
=
value
;
});
});
...
@@ -277,6 +279,7 @@ var initTableChooseUtil = {
...
@@ -277,6 +279,7 @@ var initTableChooseUtil = {
$
(
"
#
"
+
tdId
).
val
(
value
);
$
(
"
#
"
+
tdId
).
val
(
value
);
}
else
if
(
formType
==
'
chooseInput
'
)
{
}
else
if
(
formType
==
'
chooseInput
'
)
{
$
(
"
#
"
+
tdId
).
val
(
value
);
$
(
"
#
"
+
tdId
).
val
(
value
);
}
else
if
(
formType
==
'
select
'
)
{
}
else
if
(
formType
==
'
select
'
)
{
if
(
!
isNull
(
value
[
"
html
"
]))
{
if
(
!
isNull
(
value
[
"
html
"
]))
{
$
(
"
#
"
+
tdId
).
html
(
value
[
"
html
"
]);
$
(
"
#
"
+
tdId
).
html
(
value
[
"
html
"
]);
...
...
web/src/main/resources/template/tpl/template/select-option-2.tpl
0 → 100644
浏览文件 @
aaf65246
<option
value=
""
>
请选择
</option>
{
{
#
each
this
}
}
<option
value=
"{
{
id
}
}"
>
{
{
name
}
}
</option>
{
{/
each
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录