Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
e4dbbfb3
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1436
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看板
提交
e4dbbfb3
编写于
2月 13, 2023
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
属性信息修改
上级
a7eda96d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
100 addition
and
60 deletion
+100
-60
base-server/src/main/resources/template/js/attr/attrList.js
base-server/src/main/resources/template/js/attr/attrList.js
+4
-0
base-server/src/main/resources/template/js/attr/writeAttr.js
base-server/src/main/resources/template/js/attr/writeAttr.js
+4
-0
base-server/src/main/resources/template/js/processAttr/processAttrAdd.js
.../main/resources/template/js/processAttr/processAttrAdd.js
+24
-13
base-server/src/main/resources/template/js/processAttr/processAttrEdit.js
...main/resources/template/js/processAttr/processAttrEdit.js
+28
-16
base-server/src/main/resources/template/js/processAttr/processAttrList.js
...main/resources/template/js/processAttr/processAttrList.js
+0
-3
base-server/src/main/resources/template/tpl/attr/writeAttr.html
...erver/src/main/resources/template/tpl/attr/writeAttr.html
+10
-0
base-server/src/main/resources/template/tpl/processAttr/processAttrAdd.html
...in/resources/template/tpl/processAttr/processAttrAdd.html
+0
-8
base-server/src/main/resources/template/tpl/processAttr/processAttrEdit.html
...n/resources/template/tpl/processAttr/processAttrEdit.html
+0
-8
web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
...s/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
+30
-12
未找到文件。
base-server/src/main/resources/template/js/attr/attrList.js
浏览文件 @
e4dbbfb3
...
...
@@ -50,6 +50,10 @@ layui.config({
}
return
''
;
}},
{
field
:
'
showType
'
,
title
:
'
显示类型
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
var
showType
=
dsFormUtil
.
getShowType
(
d
);
return
skyeyeClassEnumUtil
.
getEnumDataNameByCodeAndKey
(
"
dsFormShowType
"
,
'
id
'
,
showType
,
'
name
'
);
}},
{
field
:
'
required
'
,
title
:
'
限制条件
'
,
align
:
'
left
'
,
width
:
140
},
{
field
:
'
modelAttribute
'
,
title
:
'
是否模型属性
'
,
align
:
'
center
'
,
width
:
100
,
templet
:
function
(
d
)
{
if
(
d
.
modelAttribute
)
{
...
...
base-server/src/main/resources/template/js/attr/writeAttr.js
浏览文件 @
e4dbbfb3
...
...
@@ -68,6 +68,9 @@ layui.config({
// 如果不是入参属性,则不能设置特定的一些值
if
(
!
json
.
bean
.
whetherInputParams
)
{
$
(
'
.inputParams
'
).
hide
();
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
dsFormShowType
"
,
'
select
'
,
"
showType
"
,
json
.
bean
.
showType
,
form
);
}
else
{
$
(
'
.propertyParams
'
).
hide
();
}
var
id
=
isNull
(
json
.
bean
.
id
)
?
''
:
json
.
bean
.
id
;
...
...
@@ -83,6 +86,7 @@ layui.config({
minLength
:
$
(
"
#minLength
"
).
val
(),
maxLength
:
$
(
"
#maxLength
"
).
val
(),
remark
:
$
(
"
#remark
"
).
val
(),
showType
:
isNull
(
$
(
"
#showType
"
).
val
())
?
""
:
$
(
"
#showType
"
).
val
(),
id
:
id
};
...
...
base-server/src/main/resources/template/js/processAttr/processAttrAdd.js
浏览文件 @
e4dbbfb3
...
...
@@ -16,30 +16,40 @@ layui.config({
var
rowNum
=
1
;
$
(
"
#tableBox
"
).
hide
();
var
attrMap
=
{};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryAttrDefinitionList
"
,
params
:
{
className
:
parent
.
objectId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
$
(
"
#attrKey
"
).
html
(
getDataUseHandlebars
(
`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/each}}`
,
json
));
var
str
=
'
<option value="">请选择</option>
'
;
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
if
(
isNull
(
item
.
attrDefinitionCustom
)
||
(
isNull
(
item
.
attrDefinitionCustom
.
dsFormComponent
)
&&
isNull
(
item
.
showType
)))
{
str
+=
`<option value="{{attrKey}}" disabled="">{{name}}</option>`
;
}
else
{
attrMap
[
item
.
attrKey
]
=
item
;
str
+=
`<option value="{{attrKey}}">{{name}}</option>`
;
}
});
$
(
"
#attrKey
"
).
html
(
str
);
},
async
:
false
});
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
dsFormShowType
"
,
'
select
'
,
"
showType
"
,
''
,
form
);
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
widthScale
"
,
'
select
'
,
"
proportion
"
,
''
,
form
);
var
alignmentData
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
"
alignment
"
);
form
.
on
(
'
select(attrKey)
'
,
function
(
data
)
{
buildTable
();
});
form
.
on
(
'
select(showType)
'
,
function
(
data
)
{
var
value
=
data
.
value
;
if
(
value
==
5
)
{
$
(
"
#tableBox
"
).
show
();
}
else
{
if
(
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
$
(
"
#tableBox
"
).
hide
();
}
else
{
buildTable
();
}
buildTable
();
});
function
getShowType
(
attrKey
)
{
var
attr
=
attrMap
[
attrKey
];
return
dsFormUtil
.
getShowType
(
attr
);
}
function
buildTable
()
{
if
(
$
(
"
#showType
"
).
val
()
==
5
&&
!
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
tableDataList
=
new
Array
();
var
params
=
{
className
:
parent
.
objectId
,
...
...
@@ -113,6 +123,7 @@ layui.config({
}
else
{
tableDataList
=
new
Array
();
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
$
(
"
#tableBox
"
).
hide
();
}
}
...
...
@@ -141,7 +152,8 @@ layui.config({
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
$
(
"
#showType
"
).
val
()
==
5
)
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
if
(
table
.
cache
.
messageTable
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择表格属性.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
...
...
@@ -162,7 +174,6 @@ layui.config({
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
(),
orderBy
:
$
(
"
#orderBy
"
).
val
(),
showType
:
$
(
"
#showType
"
).
val
(),
attrTransformTableList
:
JSON
.
stringify
(
tableDataList
),
proportion
:
$
(
"
#proportion
"
).
val
(),
actFlowId
:
parent
.
$
(
"
#actFlowId
"
).
val
(),
...
...
base-server/src/main/resources/template/js/processAttr/processAttrEdit.js
浏览文件 @
e4dbbfb3
...
...
@@ -15,19 +15,29 @@ layui.config({
var
tableDataList
=
new
Array
();
var
alignmentData
;
var
rowNum
=
1
;
var
attrMap
=
{};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryAttrTransformById
"
,
params
:
{
id
:
parent
.
rowId
},
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
$
(
"
#showForm
"
).
html
(
getDataUseHandlebars
(
$
(
"
#beanTemplate
"
).
html
(),
json
));
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryAttrDefinitionList
"
,
params
:
{
className
:
parent
.
objectId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
data
)
{
$
(
"
#attrKey
"
).
html
(
getDataUseHandlebars
(
`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/each}}`
,
data
));
var
str
=
'
<option value="">请选择</option>
'
;
$
.
each
(
data
.
rows
,
function
(
i
,
item
)
{
if
(
isNull
(
item
.
attrDefinitionCustom
)
||
(
isNull
(
item
.
attrDefinitionCustom
.
dsFormComponent
)
&&
isNull
(
item
.
showType
)))
{
str
+=
`<option value="{{attrKey}}" disabled="">{{name}}</option>`
;
}
else
{
attrMap
[
item
.
attrKey
]
=
item
;
str
+=
`<option value="{{attrKey}}">{{name}}</option>`
;
}
});
$
(
"
#attrKey
"
).
html
(
str
);
$
(
"
#attrKey
"
).
val
(
json
.
bean
.
attrKey
);
},
async
:
false
});
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
dsFormShowType
"
,
'
select
'
,
"
showType
"
,
json
.
bean
.
showType
,
form
);
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
widthScale
"
,
'
select
'
,
"
proportion
"
,
json
.
bean
.
proportion
,
form
);
alignmentData
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
"
alignment
"
);
if
(
json
.
bean
.
showType
==
5
)
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
$
(
"
#tableBox
"
).
show
();
$
.
each
(
json
.
bean
.
attrTransformTableList
,
function
(
j
,
item
)
{
item
.
id
=
rowNum
;
...
...
@@ -43,7 +53,8 @@ layui.config({
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
$
(
"
#showType
"
).
val
()
==
5
)
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
if
(
table
.
cache
.
messageTable
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择表格属性.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
...
...
@@ -64,7 +75,6 @@ layui.config({
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
(),
orderBy
:
$
(
"
#orderBy
"
).
val
(),
showType
:
$
(
"
#showType
"
).
val
(),
attrTransformTableList
:
JSON
.
stringify
(
tableDataList
),
proportion
:
$
(
"
#proportion
"
).
val
(),
actFlowId
:
parent
.
$
(
"
#actFlowId
"
).
val
(),
...
...
@@ -80,22 +90,22 @@ layui.config({
},
async
:
false
});
form
.
on
(
'
select(attrKey)
'
,
function
(
data
)
{
tableDataList
=
new
Array
();
buildTable
();
});
form
.
on
(
'
select(showType)
'
,
function
(
data
)
{
var
value
=
data
.
value
;
if
(
value
==
5
)
{
$
(
"
#tableBox
"
).
show
();
}
else
{
if
(
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
$
(
"
#tableBox
"
).
hide
();
}
else
{
tableDataList
=
new
Array
();
buildTable
();
}
tableDataList
=
new
Array
();
buildTable
();
});
function
getShowType
(
attrKey
)
{
var
attr
=
attrMap
[
attrKey
];
return
dsFormUtil
.
getShowType
(
attr
);
}
function
buildTable
()
{
if
(
$
(
"
#showType
"
).
val
()
==
5
&&
!
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
var
params
=
{
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
()
...
...
@@ -166,7 +176,9 @@ layui.config({
}
});
}
else
{
tableDataList
=
new
Array
();
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
$
(
"
#tableBox
"
).
hide
();
}
}
...
...
base-server/src/main/resources/template/js/processAttr/processAttrList.js
浏览文件 @
e4dbbfb3
...
...
@@ -42,9 +42,6 @@ layui.config({
{
field
:
'
proportion
'
,
title
:
'
宽度比例
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
skyeyeClassEnumUtil
.
getEnumDataNameByCodeAndKey
(
"
widthScale
"
,
'
id
'
,
d
.
proportion
,
'
name
'
);
}},
{
field
:
'
showType
'
,
title
:
'
显示类型
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
skyeyeClassEnumUtil
.
getEnumDataNameByCodeAndKey
(
"
dsFormShowType
"
,
'
id
'
,
d
.
showType
,
'
name
'
);
}},
{
field
:
'
orderBy
'
,
title
:
'
排序
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
createName
'
,
title
:
systemLanguage
[
"
com.skyeye.createName
"
][
languageType
],
width
:
120
},
{
field
:
'
createTime
'
,
title
:
systemLanguage
[
"
com.skyeye.createTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
...
...
base-server/src/main/resources/template/tpl/attr/writeAttr.html
浏览文件 @
e4dbbfb3
...
...
@@ -63,6 +63,16 @@
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
propertyParams
"
>
<
div
class
=
"
layui-form-item layui-col-xs6
"
>
<
label
class
=
"
layui-form-label
"
>
显示类型
<
/label
>
<
div
class
=
"
layui-input-block
"
>
<
select
lay
-
filter
=
"
showType
"
lay
-
search
=
""
id
=
"
showType
"
>
<
/select
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
备注
<
/label
>
<
div
class
=
"
layui-input-block
"
>
...
...
base-server/src/main/resources/template/tpl/processAttr/processAttrAdd.html
浏览文件 @
e4dbbfb3
...
...
@@ -52,14 +52,6 @@
<div
class=
"layui-form-mid layui-word-aux"
>
序号越大越往后。
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
显示类型
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<select
lay-filter=
"showType"
lay-search=
""
id=
"showType"
win-verify=
"required"
>
</select>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
id=
"tableBox"
>
<label
class=
"layui-form-label"
>
表格属性
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
...
...
base-server/src/main/resources/template/tpl/processAttr/processAttrEdit.html
浏览文件 @
e4dbbfb3
...
...
@@ -58,14 +58,6 @@
<
div
class
=
"
layui-form-mid layui-word-aux
"
>
序号越大越往后
。
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs6
"
>
<
label
class
=
"
layui-form-label
"
>
显示类型
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
select
lay
-
filter
=
"
showType
"
lay
-
search
=
""
id
=
"
showType
"
win
-
verify
=
"
required
"
>
<
/select
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
id
=
"
tableBox
"
>
<
label
class
=
"
layui-form-label
"
>
表格属性
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
...
...
web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
浏览文件 @
e4dbbfb3
...
...
@@ -126,13 +126,7 @@ var dsFormUtil = {
// 关联数据
content
=
dsFormUtil
.
getContentLinkedData
(
content
);
}
if
(
!
isNull
(
content
.
attrDefinition
))
{
if
(
!
isNull
(
content
.
attrDefinition
.
attrDefinitionCustom
))
{
content
.
title
=
content
.
attrDefinition
.
attrDefinitionCustom
.
name
;
}
else
{
content
.
title
=
content
.
attrDefinition
.
name
;
}
}
content
.
title
=
dsFormUtil
.
getLable
(
content
.
attrDefinition
);
var
jsonStr
=
{
bean
:
content
};
var
html
=
getDataUseHandlebars
(
'
{{#bean}}
'
+
component
.
htmlContent
+
'
{{/bean}}
'
,
jsonStr
);
...
...
@@ -142,6 +136,17 @@ var dsFormUtil = {
return
content
;
},
getLable
:
function
(
attr
)
{
if
(
!
isNull
(
attr
))
{
if
(
!
isNull
(
attr
.
attrDefinitionCustom
))
{
return
attr
.
attrDefinitionCustom
.
name
;
}
else
{
return
attr
.
name
;
}
}
return
''
;
},
getContentLinkedData
:
function
(
content
)
{
var
json
=
{};
if
(
isNull
(
content
.
attrDefinition
)
||
isNull
(
content
.
attrDefinition
.
attrDefinitionCustom
))
{
...
...
@@ -375,26 +380,28 @@ var dsFormUtil = {
*/
initSequenceDataDetails
:
function
(
customBoxId
,
rows
)
{
$
.
each
(
rows
,
function
(
i
,
item
)
{
item
.
label
=
dsFormUtil
.
getLable
(
item
.
attrDefinition
);
var
jsonStr
=
{
bean
:
item
};
if
(
item
.
showType
==
4
)
{
// 图片展示
var
showType
=
dsFormUtil
.
getShowType
(
item
.
attrDefinition
);
if
(
showType
==
4
)
{
// 图片展示
var
photoValue
=
[];
if
(
!
isNull
(
jsonStr
.
bean
.
displayValue
))
{
photoValue
=
item
.
displayValue
.
split
(
"
,
"
);
}
var
rows
=
[];
$
.
each
(
photoValue
,
function
(
j
,
row
){
$
.
each
(
photoValue
,
function
(
j
,
row
)
{
rows
.
push
({
photoValue
:
row
});
});
jsonStr
.
bean
.
photo
=
rows
;
}
// 加载html
var
str
=
getDataUseHandlebars
(
dsFormUtil
.
showType
[
item
.
showType
],
jsonStr
);
var
str
=
getDataUseHandlebars
(
dsFormUtil
.
showType
[
showType
],
jsonStr
);
$
(
"
#
"
+
customBoxId
).
append
(
str
);
if
(
item
.
showType
==
5
)
{
// 表格展示
if
(
showType
==
5
)
{
// 表格展示
var
table
=
layui
.
table
;
table
.
render
({
id
:
"
messageTable
"
+
item
.
orderBy
,
...
...
@@ -403,7 +410,7 @@ var dsFormUtil = {
page
:
false
,
cols
:
dsFormUtil
.
getTableHead
(
item
.
attrTransformTableList
)
});
}
else
if
(
item
.
showType
==
6
)
{
// 凭证展示
}
else
if
(
showType
==
6
)
{
// 凭证展示
var
boxId
=
"
showVoucher
"
+
item
.
orderBy
;
// 初始化凭证
voucherUtil
.
initDataDetails
(
boxId
,
item
.
value
);
...
...
@@ -411,6 +418,17 @@ var dsFormUtil = {
});
},
getShowType
:
function
(
attr
)
{
if
(
!
isNull
(
attr
.
attrDefinitionCustom
))
{
if
(
!
isNull
(
attr
.
attrDefinitionCustom
.
dsFormComponent
))
{
return
attr
.
attrDefinitionCustom
.
dsFormComponent
.
showType
;
}
else
{
return
attr
.
attrDefinitionCustom
.
showType
;
}
}
return
null
;
},
getTableHead
:
function
(
attrTransformTableList
)
{
var
header
=
[];
$
.
each
(
attrTransformTableList
,
function
(
i
,
item
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录