Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
804e2ad1
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1433
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看板
提交
804e2ad1
编写于
3月 06, 2023
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除流程属性配置功能
上级
ec2b58e3
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
229 addition
and
772 deletion
+229
-772
base-server/src/main/resources/template/js/classServer/classServer.js
...src/main/resources/template/js/classServer/classServer.js
+0
-4
base-server/src/main/resources/template/js/processAttr/processAttrAdd.js
.../main/resources/template/js/processAttr/processAttrAdd.js
+0
-235
base-server/src/main/resources/template/js/processAttr/processAttrEdit.js
...main/resources/template/js/processAttr/processAttrEdit.js
+0
-252
base-server/src/main/resources/template/js/processAttr/processAttrList.js
...main/resources/template/js/processAttr/processAttrList.js
+0
-129
base-server/src/main/resources/template/tpl/processAttr/processAttrAdd.html
...in/resources/template/tpl/processAttr/processAttrAdd.html
+0
-88
base-server/src/main/resources/template/tpl/processAttr/processAttrList.html
...n/resources/template/tpl/processAttr/processAttrList.html
+0
-34
common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
...main/resources/template/js/dsFormPage/dsFormPageDesign.js
+1
-1
common/src/main/resources/template/js/dsFormPage/editPageContent.js
.../main/resources/template/js/dsFormPage/editPageContent.js
+18
-0
common/src/main/resources/template/js/dsFormPage/editPageContentIsTable.js
...esources/template/js/dsFormPage/editPageContentIsTable.js
+186
-0
common/src/main/resources/template/js/dsFormPage/writePage.js
...on/src/main/resources/template/js/dsFormPage/writePage.js
+23
-2
common/src/main/resources/template/tpl/dsFormPage/editPageContentIsTable.html
...urces/template/tpl/dsFormPage/editPageContentIsTable.html
+1
-27
未找到文件。
base-server/src/main/resources/template/js/classServer/classServer.js
浏览文件 @
804e2ad1
...
@@ -52,10 +52,6 @@ layui.config({
...
@@ -52,10 +52,6 @@ layui.config({
title
:
'
流程信息
'
,
title
:
'
流程信息
'
,
pageUrl
:
'
../../tpl/classServer/classServerProcessList.html
'
pageUrl
:
'
../../tpl/classServer/classServerProcessList.html
'
});
});
defaultList
.
push
({
title
:
'
流程属性信息
'
,
pageUrl
:
'
../../tpl/processAttr/processAttrList.html
'
});
}
}
tabPageUtil
.
init
({
tabPageUtil
.
init
({
...
...
base-server/src/main/resources/template/js/processAttr/processAttrAdd.js
已删除
100644 → 0
浏览文件 @
ec2b58e3
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
,
'
soulTable
'
,
'
table
'
].
concat
(
dsFormUtil
.
mastHaveImport
),
function
(
exports
)
{
winui
.
renderColor
();
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
,
soulTable
=
layui
.
soulTable
;
var
childServiceClassName
=
''
;
var
tableDataList
=
new
Array
();
var
rowNum
=
1
;
$
(
"
#tableBox
"
).
hide
();
var
attrMap
=
{};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryAttrDefinitionList
"
,
params
:
{
className
:
parent
.
objectId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
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
(
"
widthScale
"
,
'
select
'
,
"
proportion
"
,
''
,
form
);
var
alignmentData
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
"
alignment
"
);
form
.
on
(
'
select(attrKey)
'
,
function
(
data
)
{
if
(
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
$
(
"
#tableBox
"
).
hide
();
}
else
{
buildTable
();
}
});
function
getShowType
(
attrKey
)
{
var
attr
=
attrMap
[
attrKey
];
return
dsFormUtil
.
getShowType
(
attr
);
}
var
jsEditorMap
=
{};
function
buildTable
()
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
tableDataList
=
new
Array
();
var
params
=
{
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
()
};
var
childAttr
=
[];
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryChildAttrDefinitionList
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
childAttr
=
[].
concat
(
json
.
rows
);
if
(
childAttr
.
length
>
0
)
{
childServiceClassName
=
childAttr
[
0
].
className
;
}
},
async
:
false
});
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
get
'
,
data
:
tableDataList
,
even
:
true
,
page
:
false
,
rowDrag
:
{
trigger
:
'
.drag-row
'
,
done
:
function
(
obj
)
{}
},
cols
:
[[
{
type
:
'
checkbox
'
,
align
:
'
center
'
},
{
field
:
'
test
'
,
title
:
''
,
align
:
'
left
'
,
width
:
40
,
templet
:
function
(
d
)
{
return
'
<i class="fa fa-arrows drag-row" />
'
;}},
{
field
:
'
attrKey
'
,
title
:
'
属性<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
150
,
templet
:
function
(
d
)
{
var
_html
=
`<select lay-filter="tableSelect" lay-search="" id="attrKey
${
d
.
id
}
" cus-id="
${
d
.
id
}
" win-verify="required"><option value="">全部</option>`
;
$
.
each
(
childAttr
,
function
(
i
,
item
)
{
if
(
item
.
attrKey
==
d
.
attrKey
)
{
_html
+=
`<option value="
${
item
.
attrKey
}
" selected="selected">
${
item
.
name
}
</option>`
;
}
else
{
_html
+=
`<option value="
${
item
.
attrKey
}
">
${
item
.
name
}
</option>`
;
}
});
_html
+=
`</select>`
;
return
_html
;
}},
{
field
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="name
${
d
.
id
}
" placeholder="请填写名称" cus-id="
${
d
.
id
}
" class="layui-input tableInput" `
+
`value="`
+
(
isNull
(
d
.
name
)
?
""
:
d
.
name
)
+
`"/>`
;
}},
{
field
:
'
align
'
,
title
:
'
对齐方式<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
var
_html
=
`<select lay-filter="tableSelect" lay-search="" id="align
${
d
.
id
}
" cus-id="
${
d
.
id
}
" win-verify="required"><option value="">全部</option>`
;
$
.
each
(
alignmentData
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
id
==
d
.
align
)
{
_html
+=
`<option value="
${
item
.
id
}
" selected="selected">
${
item
.
name
}
</option>`
;
}
else
{
_html
+=
`<option value="
${
item
.
id
}
">
${
item
.
name
}
</option>`
;
}
});
_html
+=
`</select>`
;
return
_html
;
}},
{
field
:
'
width
'
,
title
:
'
宽度<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="width
${
d
.
id
}
" placeholder="请填写宽度" cus-id="
${
d
.
id
}
" class="layui-input tableInput" win-verify="required|number" `
+
`value="`
+
(
isNull
(
d
.
width
)
?
""
:
d
.
width
)
+
`"/>`
;
}},
{
field
:
'
templetBox
'
,
title
:
'
脚本
'
,
align
:
'
left
'
,
width
:
700
,
templet
:
function
(
d
)
{
return
`<textarea id="templet
${
d
.
id
}
" placeholder="请填写脚本" cus-id="
${
d
.
id
}
" class="tableInput templateClass"></textarea>`
;
}},
]],
done
:
function
(
json
)
{
matchingLanguage
();
if
(
$
(
`div[lay-id='messageTable']`
).
find
(
'
.place-holder
'
).
length
==
0
)
{
$
(
`div[lay-id='messageTable']`
).
find
(
'
.layui-table-body
'
).
append
(
'
<div class="place-holder"></div>
'
);
}
soulTable
.
render
(
this
);
jsEditorMap
=
{};
$
.
each
(
$
(
"
.templateClass
"
),
function
(
i
,
item
)
{
var
id
=
$
(
item
).
attr
(
'
cus-id
'
);
var
tableData
=
getInPoingArr
(
tableDataList
,
'
id
'
,
id
);
var
jsEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
templet
"
+
id
),
codeUtil
.
getConfig
(
'
text/javascript
'
));
jsEditor
.
setValue
(
tableData
.
templet
);
jsEditorMap
[
id
]
=
jsEditor
;
});
}
});
}
else
{
tableDataList
=
new
Array
();
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
$
(
"
#tableBox
"
).
hide
();
}
}
form
.
on
(
'
select(tableSelect)
'
,
function
(
data
)
{
var
id
=
data
.
elem
.
id
;
buildData
(
$
(
`#
${
id
}
`
))
});
$
(
"
body
"
).
on
(
"
input
"
,
"
.tableInput
"
,
function
()
{
buildData
(
$
(
this
))
});
$
(
"
body
"
).
on
(
"
change
"
,
"
.tableInput
"
,
function
()
{
buildData
(
$
(
this
))
});
function
buildData
(
_this
)
{
var
id
=
_this
.
attr
(
'
cus-id
'
);
var
key
=
_this
.
attr
(
'
id
'
).
replace
(
id
,
''
);
$
.
each
(
tableDataList
,
function
(
j
,
item
)
{
if
(
item
.
id
==
id
)
{
item
[
key
]
=
_this
.
val
();
}
});
}
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
if
(
table
.
cache
.
messageTable
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择表格属性.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
$
.
each
(
table
.
cache
.
messageTable
,
function
(
i
,
item
)
{
item
.
templet
=
jsEditorMap
[
item
.
id
].
getValue
();
item
.
id
=
null
;
item
.
className
=
childServiceClassName
;
item
.
parentAttrKey
=
$
(
"
#attrKey
"
).
val
();
item
.
orderBy
=
i
+
1
;
item
.
actFlowId
=
parent
.
$
(
"
#actFlowId
"
).
val
();
});
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
}
else
{
tableDataList
=
new
Array
();
}
var
params
=
{
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
(),
orderBy
:
$
(
"
#orderBy
"
).
val
(),
attrTransformTableList
:
encodeURIComponent
(
JSON
.
stringify
(
tableDataList
)),
proportion
:
$
(
"
#proportion
"
).
val
(),
actFlowId
:
parent
.
$
(
"
#actFlowId
"
).
val
(),
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
writeAttrTransform
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
}
return
false
;
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
});
// 新增行
function
addRow
()
{
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
tableDataList
.
push
({
id
:
rowNum
});
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
rowNum
++
;
}
// 删除行
function
deleteRow
()
{
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
var
check_box
=
table
.
checkStatus
(
'
messageTable
'
).
data
;
for
(
var
i
=
0
;
i
<
check_box
.
length
;
i
++
){
var
list
=
[];
$
.
each
(
tableDataList
,
function
(
j
,
item
)
{
if
(
item
.
id
!=
check_box
[
i
].
id
){
list
.
push
(
item
);
}
});
tableDataList
=
[].
concat
(
list
);
}
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
});
\ No newline at end of file
base-server/src/main/resources/template/js/processAttr/processAttrEdit.js
已删除
100644 → 0
浏览文件 @
ec2b58e3
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
,
'
soulTable
'
,
'
table
'
].
concat
(
dsFormUtil
.
mastHaveImport
),
function
(
exports
)
{
winui
.
renderColor
();
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
,
soulTable
=
layui
.
soulTable
;
var
childServiceClassName
=
''
;
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
)
{
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
(
"
widthScale
"
,
'
select
'
,
"
proportion
"
,
json
.
bean
.
proportion
,
form
);
alignmentData
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
"
alignment
"
);
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
$
(
"
#tableBox
"
).
show
();
$
.
each
(
json
.
bean
.
attrTransformTableList
,
function
(
j
,
item
)
{
item
.
id
=
rowNum
;
tableDataList
.
push
(
item
);
rowNum
++
;
});
buildTable
();
}
else
{
$
(
"
#tableBox
"
).
hide
();
}
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
if
(
table
.
cache
.
messageTable
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择表格属性.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
$
.
each
(
table
.
cache
.
messageTable
,
function
(
i
,
item
)
{
item
.
templet
=
jsEditorMap
[
item
.
id
].
getValue
();
item
.
id
=
null
;
item
.
className
=
childServiceClassName
;
item
.
parentAttrKey
=
$
(
"
#attrKey
"
).
val
();
item
.
orderBy
=
i
+
1
;
item
.
actFlowId
=
parent
.
$
(
"
#actFlowId
"
).
val
();
});
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
}
else
{
tableDataList
=
new
Array
();
}
var
params
=
{
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
(),
orderBy
:
$
(
"
#orderBy
"
).
val
(),
attrTransformTableList
:
encodeURIComponent
(
JSON
.
stringify
(
tableDataList
)),
proportion
:
$
(
"
#proportion
"
).
val
(),
actFlowId
:
parent
.
$
(
"
#actFlowId
"
).
val
(),
id
:
parent
.
rowId
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
writeAttrTransform
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
}
return
false
;
});
},
async
:
false
});
form
.
on
(
'
select(attrKey)
'
,
function
(
data
)
{
if
(
isNull
(
$
(
"
#attrKey
"
).
val
()))
{
$
(
"
#tableBox
"
).
hide
();
}
else
{
tableDataList
=
new
Array
();
buildTable
();
}
});
function
getShowType
(
attrKey
)
{
var
attr
=
attrMap
[
attrKey
];
return
dsFormUtil
.
getShowType
(
attr
);
}
var
jsEditorMap
=
{};
function
buildTable
()
{
var
showType
=
getShowType
(
$
(
"
#attrKey
"
).
val
());
if
(
showType
==
5
)
{
var
params
=
{
className
:
parent
.
objectId
,
attrKey
:
$
(
"
#attrKey
"
).
val
()
};
var
childAttr
=
[];
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryChildAttrDefinitionList
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
childAttr
=
[].
concat
(
json
.
rows
);
if
(
childAttr
.
length
>
0
)
{
childServiceClassName
=
childAttr
[
0
].
className
;
}
},
async
:
false
});
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
get
'
,
data
:
tableDataList
,
even
:
true
,
page
:
false
,
rowDrag
:
{
trigger
:
'
.drag-row
'
,
done
:
function
(
obj
)
{}
},
cols
:
[[
{
type
:
'
checkbox
'
,
align
:
'
center
'
},
{
field
:
'
test
'
,
title
:
''
,
align
:
'
left
'
,
width
:
40
,
templet
:
function
(
d
)
{
return
'
<i class="fa fa-arrows drag-row" />
'
;}},
{
field
:
'
attrKey
'
,
title
:
'
属性<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
150
,
templet
:
function
(
d
)
{
var
_html
=
`<select lay-filter="tableSelect" lay-search="" id="attrKey
${
d
.
id
}
" cus-id="
${
d
.
id
}
" win-verify="required"><option value="">全部</option>`
;
$
.
each
(
childAttr
,
function
(
i
,
item
)
{
if
(
item
.
attrKey
==
d
.
attrKey
)
{
_html
+=
`<option value="
${
item
.
attrKey
}
" selected="selected">
${
item
.
name
}
</option>`
;
}
else
{
_html
+=
`<option value="
${
item
.
attrKey
}
">
${
item
.
name
}
</option>`
;
}
});
_html
+=
`</select>`
;
return
_html
;
}},
{
field
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="name
${
d
.
id
}
" placeholder="请填写名称" cus-id="
${
d
.
id
}
" class="layui-input tableInput" `
+
`value="`
+
(
isNull
(
d
.
name
)
?
""
:
d
.
name
)
+
`"/>`
;
}},
{
field
:
'
align
'
,
title
:
'
对齐方式<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
var
_html
=
`<select lay-filter="tableSelect" lay-search="" id="align
${
d
.
id
}
" cus-id="
${
d
.
id
}
" win-verify="required"><option value="">全部</option>`
;
$
.
each
(
alignmentData
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
id
==
d
.
align
)
{
_html
+=
`<option value="
${
item
.
id
}
" selected="selected">
${
item
.
name
}
</option>`
;
}
else
{
_html
+=
`<option value="
${
item
.
id
}
">
${
item
.
name
}
</option>`
;
}
});
_html
+=
`</select>`
;
return
_html
;
}},
{
field
:
'
width
'
,
title
:
'
宽度<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="width
${
d
.
id
}
" placeholder="请填写宽度" cus-id="
${
d
.
id
}
" class="layui-input tableInput" win-verify="required|number" `
+
`value="`
+
(
isNull
(
d
.
width
)
?
""
:
d
.
width
)
+
`"/>`
;
}},
{
field
:
'
templetBox
'
,
title
:
'
脚本
'
,
align
:
'
left
'
,
width
:
700
,
templet
:
function
(
d
)
{
return
`<textarea id="templet
${
d
.
id
}
" placeholder="请填写脚本" cus-id="
${
d
.
id
}
" class="tableInput templateClass"></textarea>`
;
}},
]],
done
:
function
(
json
)
{
matchingLanguage
();
if
(
$
(
`div[lay-id='messageTable']`
).
find
(
'
.place-holder
'
).
length
==
0
)
{
$
(
`div[lay-id='messageTable']`
).
find
(
'
.layui-table-body
'
).
append
(
'
<div class="place-holder"></div>
'
);
}
soulTable
.
render
(
this
);
jsEditorMap
=
{};
$
.
each
(
$
(
"
.templateClass
"
),
function
(
i
,
item
)
{
var
id
=
$
(
item
).
attr
(
'
cus-id
'
);
var
tableData
=
getInPoingArr
(
tableDataList
,
'
id
'
,
id
);
var
jsEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
templet
"
+
id
),
codeUtil
.
getConfig
(
'
text/javascript
'
));
jsEditor
.
setValue
(
tableData
.
templet
);
jsEditorMap
[
id
]
=
jsEditor
;
});
}
});
}
else
{
tableDataList
=
new
Array
();
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
$
(
"
#tableBox
"
).
hide
();
}
}
form
.
on
(
'
select(tableSelect)
'
,
function
(
data
)
{
var
id
=
data
.
elem
.
id
;
buildData
(
$
(
`#
${
id
}
`
));
});
$
(
"
body
"
).
on
(
"
input
"
,
"
.tableInput
"
,
function
()
{
buildData
(
$
(
this
));
});
$
(
"
body
"
).
on
(
"
change
"
,
"
.tableInput
"
,
function
()
{
buildData
(
$
(
this
));
});
function
buildData
(
_this
)
{
var
id
=
_this
.
attr
(
'
cus-id
'
);
var
key
=
_this
.
attr
(
'
id
'
).
replace
(
id
,
''
);
$
.
each
(
tableDataList
,
function
(
j
,
item
)
{
if
(
item
.
id
==
id
)
{
item
[
key
]
=
_this
.
val
();
}
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
});
// 新增行
function
addRow
()
{
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
tableDataList
.
push
({
id
:
rowNum
});
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
rowNum
++
;
}
// 删除行
function
deleteRow
()
{
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
var
check_box
=
table
.
checkStatus
(
'
messageTable
'
).
data
;
for
(
var
i
=
0
;
i
<
check_box
.
length
;
i
++
){
var
list
=
[];
$
.
each
(
tableDataList
,
function
(
j
,
item
)
{
if
(
item
.
id
!=
check_box
[
i
].
id
){
list
.
push
(
item
);
}
});
tableDataList
=
[].
concat
(
list
);
}
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
});
\ No newline at end of file
base-server/src/main/resources/template/js/processAttr/processAttrList.js
已删除
100644 → 0
浏览文件 @
ec2b58e3
var
objectId
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
;
objectId
=
GetUrlParam
(
"
objectId
"
);
if
(
isNull
(
objectId
))
{
winui
.
window
.
msg
(
"
请传入适用对象信息
"
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
'
queryActFlowListByClassName
'
,
params
:
{
className
:
objectId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
$
(
"
#actFlowId
"
).
html
(
getDataUseHandlebars
(
`{{#each rows}}<option value="{{id}}">{{flowName}}</option>{{/each}}`
,
json
));
},
async
:
false
});
form
.
on
(
'
select(actFlowId)
'
,
function
(
data
)
{
loadTable
();
});
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
reqBasePath
+
'
queryAttrTransformList
'
,
where
:
getTableParams
(),
even
:
true
,
page
:
false
,
limits
:
getLimits
(),
limit
:
getLimit
(),
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
label
'
,
title
:
'
属性
'
,
align
:
'
left
'
,
width
:
150
},
{
field
:
'
proportion
'
,
title
:
'
宽度比例
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
skyeyeClassEnumUtil
.
getEnumDataNameByCodeAndKey
(
"
widthScale
"
,
'
id
'
,
d
.
proportion
,
'
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
},
{
field
:
'
lastUpdateName
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateName
"
][
languageType
],
align
:
'
left
'
,
width
:
120
},
{
field
:
'
lastUpdateTime
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
180
,
toolbar
:
'
#tableBar
'
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
}
});
table
.
on
(
'
tool(messageTable)
'
,
function
(
obj
)
{
var
data
=
obj
.
data
;
var
layEvent
=
obj
.
event
;
if
(
layEvent
===
'
del
'
)
{
// 删除
del
(
data
,
obj
);
}
else
if
(
layEvent
===
'
edit
'
)
{
// 编辑
edit
(
data
);
}
});
// 删除
function
del
(
data
,
obj
)
{
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.deleteOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.deleteOperation
"
][
languageType
]},
function
(
index
)
{
layer
.
close
(
index
);
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
deleteAttrTransformById
"
,
params
:
{
id
:
data
.
id
},
type
:
'
json
'
,
method
:
"
DELETE
"
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.deleteOperationSuccessMsg
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
}
// 编辑
function
edit
(
data
)
{
rowId
=
data
.
id
;
if
(
isNull
(
$
(
"
#actFlowId
"
)))
{
winui
.
window
.
msg
(
'
请先绑定流程.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
_openNewWindows
({
url
:
"
../../tpl/processAttr/processAttrEdit.html
"
,
title
:
systemLanguage
[
"
com.skyeye.editPageTitle
"
][
languageType
],
pageId
:
"
processAttrEdit
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
}
// 新增
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
()
{
if
(
isNull
(
$
(
"
#actFlowId
"
)))
{
winui
.
window
.
msg
(
'
请先绑定流程.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
_openNewWindows
({
url
:
"
../../tpl/processAttr/processAttrAdd.html
"
,
title
:
systemLanguage
[
"
com.skyeye.addPageTitle
"
][
languageType
],
pageId
:
"
processAttrAdd
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
form
.
render
();
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
});
function
loadTable
()
{
table
.
reloadData
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
function
getTableParams
()
{
return
{
className
:
objectId
,
actFlowId
:
$
(
'
#actFlowId
'
).
val
()
};
}
exports
(
'
processAttrList
'
,
{});
});
\ No newline at end of file
base-server/src/main/resources/template/tpl/processAttr/processAttrAdd.html
已删除
100644 → 0
浏览文件 @
ec2b58e3
<!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"
/>
<link
href=
"../../assets/lib/layui/css/codemirror.css"
rel=
"stylesheet"
/>
<style>
.layui-table-cell
{
height
:
auto
;
text-overflow
:
inherit
;
overflow
:
visible
;
white-space
:
normal
;
word-wrap
:
break-word
;
}
.layui-table-cell
.layui-anim
{
height
:
180px
;
}
.place-holder
{
height
:
200px
;
}
</style>
</head>
<body>
<div
style=
"margin: 0 auto; padding: 20px;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
基本信息
</span><hr>
</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=
"attrKey"
lay-search=
""
id=
"attrKey"
win-verify=
"required"
>
</select>
</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=
"proportion"
lay-search=
""
id=
"proportion"
win-verify=
"required"
>
</select>
</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"
>
<input
type=
"text"
id=
"orderBy"
name=
"orderBy"
win-verify=
"required|number"
placeholder=
"请输入序号"
class=
"layui-input"
/>
<div
class=
"layui-form-mid layui-word-aux"
>
序号越大越往后。
</div>
</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"
>
<div
class=
"winui-tip alert-info"
>
拖拽表格行可修改顺序。
</div>
<div
class=
"winui-tool"
style=
"text-align: left;"
>
<button
id=
"addRow"
class=
"winui-toolbtn"
type=
"button"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
新增行
</button>
<button
id=
"deleteRow"
class=
"winui-toolbtn"
type=
"button"
><i
class=
"fa fa-trash-o"
aria-hidden=
"true"
></i>
删除行
</button>
</div>
<table
class=
"layui-table"
id=
"messageTable"
>
</table>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
><language
showName=
"com.skyeye.cancel"
></language></button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formAddBean"
><language
showName=
"com.skyeye.save"
></language></button>
</div>
</div>
</form>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/processAttr/
'
}).
use
(
'
processAttrAdd
'
);
</script>
</body>
</html>
\ No newline at end of file
base-server/src/main/resources/template/tpl/processAttr/processAttrList.html
已删除
100644 → 0
浏览文件 @
ec2b58e3
<!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
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
style=
"width: 200px; float: left;"
>
<select
lay-filter=
"actFlowId"
lay-search=
""
id=
"actFlowId"
>
</select>
</form>
<button
id=
"reloadTable"
class=
"winui-toolbtn search-table-btn-right"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn search-table-btn-right"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
del
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/processAttr/
'
}).
use
(
'
processAttrList
'
);
</script>
</body>
</html>
\ No newline at end of file
common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
浏览文件 @
804e2ad1
var
pageId
=
GetUrlParam
(
"
pageId
"
);
var
pageId
=
GetUrlParam
(
"
pageId
"
);
var
className
=
GetUrlParam
(
"
className
"
);
var
layedit
,
form
;
var
layedit
,
form
;
// 选中的表单布局组件信息
// 选中的表单布局组件信息
...
@@ -30,7 +31,6 @@ layui.config({
...
@@ -30,7 +31,6 @@ layui.config({
// 表单控件集合
// 表单控件集合
var
componentList
=
[];
var
componentList
=
[];
var
className
=
GetUrlParam
(
"
className
"
);
var
pageType
=
GetUrlParam
(
"
pageType
"
);
var
pageType
=
GetUrlParam
(
"
pageType
"
);
var
editContentPageUrl
=
'
../../tpl/dsFormPage/editPageContent.html?pageType=
'
+
pageType
;
var
editContentPageUrl
=
'
../../tpl/dsFormPage/editPageContent.html?pageType=
'
+
pageType
;
if
(
isNull
(
className
))
{
if
(
isNull
(
className
))
{
...
...
common/src/main/resources/template/js/dsFormPage/editPageContent.js
浏览文件 @
804e2ad1
...
@@ -134,6 +134,12 @@ layui.config({
...
@@ -134,6 +134,12 @@ layui.config({
</select>
</select>
</div>
</div>
</div>`
,
</div>`
,
'
tableAttrBox
'
:
`<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">表格属性<i class="red">*</i></label>
<div class="layui-input-block" id="attrTransformTableList" data-json="[]">
<button id="attrTransformTableListConfig" type="button" class="winui-toolbtn search-table-btn-right">属性配置</button>
</div>
</div>`
,
};
};
// 详情类布局才展示的组件属性
// 详情类布局才展示的组件属性
var
detailsPageAttr
=
[
'
attrKeyBox
'
,
'
titleBox
'
,
'
widthBox
'
];
var
detailsPageAttr
=
[
'
attrKeyBox
'
,
'
titleBox
'
,
'
widthBox
'
];
...
@@ -187,6 +193,7 @@ layui.config({
...
@@ -187,6 +193,7 @@ layui.config({
$
(
"
#attrKey
"
).
val
(
''
);
$
(
"
#attrKey
"
).
val
(
''
);
}
}
}
}
$
(
"
#attrTransformTableList
"
).
attr
(
'
data-json
'
,
JSON
.
stringify
([]));
});
});
// 宽度
// 宽度
...
@@ -215,6 +222,17 @@ layui.config({
...
@@ -215,6 +222,17 @@ layui.config({
// 日期类型
// 日期类型
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
dateTimeType
"
,
'
select
'
,
"
dateTimeType
"
,
data
.
dateTimeType
,
form
);
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
dateTimeType
"
,
'
select
'
,
"
dateTimeType
"
,
data
.
dateTimeType
,
form
);
$
(
"
body
"
).
on
(
"
click
"
,
"
#attrTransformTableListConfig
"
,
function
()
{
parent
.
_openNewWindows
({
url
:
"
../../tpl/dsFormPage/editPageContentIsTable.html?pageType=
"
+
pageType
,
title
:
'
表格属性配置
'
,
pageId
:
"
editPageContentIsTable
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
}});
});
matchingLanguage
();
matchingLanguage
();
form
.
render
();
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
...
...
common/src/main/resources/template/js/dsFormPage/editPageContentIsTable.js
0 → 100644
浏览文件 @
804e2ad1
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
,
'
soulTable
'
,
'
table
'
].
concat
(
dsFormUtil
.
mastHaveImport
),
function
(
exports
)
{
winui
.
renderColor
();
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
,
soulTable
=
layui
.
soulTable
;
var
tableDataList
=
new
Array
();
// 对齐方式
var
alignmentData
=
skyeyeClassEnumUtil
.
getEnumDataListByClassName
(
"
alignment
"
);
var
rowNum
=
1
;
var
pageType
=
GetUrlParam
(
"
pageType
"
);
var
cols
=
[];
if
(
pageType
==
'
processAttr
'
)
{
// 流程属性布局
cols
=
[[
{
type
:
'
checkbox
'
,
align
:
'
center
'
},
{
field
:
'
test
'
,
title
:
''
,
align
:
'
left
'
,
width
:
40
,
templet
:
function
(
d
)
{
return
'
<i class="fa fa-arrows drag-row" />
'
;}},
{
field
:
'
attrKey
'
,
title
:
'
属性<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
150
,
templet
:
function
(
d
)
{
return
`<input type="text" id="attrKey
${
d
.
id
}
" placeholder="请填写属性Key" cus-id="
${
d
.
id
}
" win-verify="required" class="layui-input tableInput" `
+
`value="`
+
(
isNull
(
d
.
attrKey
)
?
""
:
d
.
attrKey
)
+
`"/>`
;
}},
{
field
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="name
${
d
.
id
}
" placeholder="请填写名称" cus-id="
${
d
.
id
}
" win-verify="required" class="layui-input tableInput" `
+
`value="`
+
(
isNull
(
d
.
name
)
?
""
:
d
.
name
)
+
`"/>`
;
}},
{
field
:
'
align
'
,
title
:
'
对齐方式<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
var
_html
=
`<select lay-filter="tableSelect" lay-search="" id="align
${
d
.
id
}
" cus-id="
${
d
.
id
}
" win-verify="required"><option value="">全部</option>`
;
$
.
each
(
alignmentData
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
id
==
d
.
align
)
{
_html
+=
`<option value="
${
item
.
id
}
" selected="selected">
${
item
.
name
}
</option>`
;
}
else
{
_html
+=
`<option value="
${
item
.
id
}
">
${
item
.
name
}
</option>`
;
}
});
_html
+=
`</select>`
;
return
_html
;
}},
{
field
:
'
width
'
,
title
:
'
宽度<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="width
${
d
.
id
}
" placeholder="请填写宽度" cus-id="
${
d
.
id
}
" class="layui-input tableInput" win-verify="required|number" `
+
`value="`
+
(
isNull
(
d
.
width
)
?
""
:
d
.
width
)
+
`"/>`
;
}},
{
field
:
'
templetBox
'
,
title
:
'
脚本
'
,
align
:
'
left
'
,
width
:
700
,
templet
:
function
(
d
)
{
return
`<textarea id="templet
${
d
.
id
}
" placeholder="请填写脚本" cus-id="
${
d
.
id
}
" class="tableInput templateClass"></textarea>`
;
}},
]];
}
else
{
// 新增/编辑布局
cols
=
[[
{
type
:
'
checkbox
'
,
align
:
'
center
'
},
{
field
:
'
test
'
,
title
:
''
,
align
:
'
left
'
,
width
:
40
,
templet
:
function
(
d
)
{
return
'
<i class="fa fa-arrows drag-row" />
'
;}},
{
field
:
'
attrKey
'
,
title
:
'
属性<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
150
,
templet
:
function
(
d
)
{
return
`<input type="text" id="attrKey
${
d
.
id
}
" placeholder="请填写属性Key" cus-id="
${
d
.
id
}
" win-verify="required" class="layui-input tableInput" `
+
`value="`
+
(
isNull
(
d
.
attrKey
)
?
""
:
d
.
attrKey
)
+
`"/>`
;
}},
{
field
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="name
${
d
.
id
}
" placeholder="请填写名称" cus-id="
${
d
.
id
}
" win-verify="required" class="layui-input tableInput" `
+
`value="`
+
(
isNull
(
d
.
name
)
?
""
:
d
.
name
)
+
`"/>`
;
}},
{
field
:
'
width
'
,
title
:
'
宽度<i class="red">*</i>
'
,
align
:
'
left
'
,
width
:
120
,
templet
:
function
(
d
)
{
return
`<input type="text" id="width
${
d
.
id
}
" placeholder="请填写宽度" cus-id="
${
d
.
id
}
" class="layui-input tableInput" win-verify="required|number" `
+
`value="`
+
(
isNull
(
d
.
width
)
?
""
:
d
.
width
)
+
`"/>`
;
}},
]]
}
var
jsEditorMap
=
{};
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
get
'
,
data
:
tableDataList
,
even
:
true
,
page
:
false
,
rowDrag
:
{
trigger
:
'
.drag-row
'
,
done
:
function
(
obj
)
{}
},
cols
:
cols
,
done
:
function
(
json
)
{
matchingLanguage
();
if
(
$
(
`div[lay-id='messageTable']`
).
find
(
'
.place-holder
'
).
length
==
0
)
{
$
(
`div[lay-id='messageTable']`
).
find
(
'
.layui-table-body
'
).
append
(
'
<div class="place-holder"></div>
'
);
}
soulTable
.
render
(
this
);
jsEditorMap
=
{};
$
.
each
(
$
(
"
.templateClass
"
),
function
(
i
,
item
)
{
var
id
=
$
(
item
).
attr
(
'
cus-id
'
);
var
tableData
=
getInPoingArr
(
tableDataList
,
'
id
'
,
id
);
var
jsEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
templet
"
+
id
),
codeUtil
.
getConfig
(
'
text/javascript
'
));
if
(
!
isNull
(
tableData
.
templet
))
{
jsEditor
.
setValue
(
tableData
.
templet
);
}
jsEditorMap
[
id
]
=
jsEditor
;
});
}
});
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
table
.
cache
.
messageTable
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择表格属性.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
$
.
each
(
tableDataList
,
function
(
i
,
item
)
{
item
.
orderBy
=
i
+
1
;
if
(
pageType
==
'
processAttr
'
)
{
item
.
templet
=
jsEditorMap
[
item
.
id
].
getValue
();
}
item
.
id
=
null
;
});
console
.
log
(
tableDataList
);
// parent.layer.close(index);
// parent.refreshCode = '0';
}
return
false
;
});
form
.
on
(
'
select(tableSelect)
'
,
function
(
data
)
{
var
id
=
data
.
elem
.
id
;
buildData
(
$
(
`#
${
id
}
`
));
});
$
(
"
body
"
).
on
(
"
input
"
,
"
.tableInput
"
,
function
()
{
buildData
(
$
(
this
));
});
$
(
"
body
"
).
on
(
"
change
"
,
"
.tableInput
"
,
function
()
{
buildData
(
$
(
this
));
});
function
buildData
(
_this
)
{
var
id
=
_this
.
attr
(
'
cus-id
'
);
var
key
=
_this
.
attr
(
'
id
'
).
replace
(
id
,
''
);
$
.
each
(
tableDataList
,
function
(
j
,
item
)
{
if
(
item
.
id
==
id
)
{
item
[
key
]
=
_this
.
val
();
}
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
});
// 新增行
function
addRow
()
{
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
tableDataList
.
push
({
id
:
rowNum
});
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
rowNum
++
;
}
// 删除行
function
deleteRow
()
{
tableDataList
=
[].
concat
(
table
.
cache
.
messageTable
);
var
check_box
=
table
.
checkStatus
(
'
messageTable
'
).
data
;
for
(
var
i
=
0
;
i
<
check_box
.
length
;
i
++
){
var
list
=
[];
$
.
each
(
tableDataList
,
function
(
j
,
item
)
{
if
(
item
.
id
!=
check_box
[
i
].
id
){
list
.
push
(
item
);
}
});
tableDataList
=
[].
concat
(
list
);
}
table
.
reloadData
(
"
messageTable
"
,
{
data
:
tableDataList
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
});
\ No newline at end of file
common/src/main/resources/template/js/dsFormPage/writePage.js
浏览文件 @
804e2ad1
...
@@ -28,13 +28,19 @@ layui.config({
...
@@ -28,13 +28,19 @@ layui.config({
<div class="layui-input-block" id="isDataAuth">
<div class="layui-input-block" id="isDataAuth">
</div>
</div>
</div>`
,
</div>`
,
// 基础表格布局
'
isDataAuth
'
:
`<div class="layui-form-item layui-col-xs6" id="dataAuthPointNumBox">
'
isDataAuth
'
:
`<div class="layui-form-item layui-col-xs6" id="dataAuthPointNumBox">
<label class="layui-form-label">数据权限点编号<i class="red">*</i></label>
<label class="layui-form-label">数据权限点编号<i class="red">*</i></label>
<div class="layui-input-block">
<div class="layui-input-block">
<input type="text" id="dataAuthPointNum" name="dataAuthPointNum" win-verify="required" placeholder="请输入数据权限点编号" class="layui-input"/>
<input type="text" id="dataAuthPointNum" name="dataAuthPointNum" win-verify="required" placeholder="请输入数据权限点编号" class="layui-input"/>
</div>
</div>
</div>`
</div>`
,
'
processAttr
'
:
`<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">流程<i class="red">*</i></label>
<div class="layui-input-block">
<select lay-filter="actFlowId" lay-search="" id="actFlowId" name="actFlowId" win-verify="required"></select>
</div>
</div>`
,
// 流程属性布局
};
};
$
(
"
#serviceStr
"
).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
serviceMap
}));
$
(
"
#serviceStr
"
).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
serviceMap
}));
...
@@ -86,6 +92,17 @@ layui.config({
...
@@ -86,6 +92,17 @@ layui.config({
}
}
$
(
"
#searchTips
"
).
val
(
data
.
searchTips
);
$
(
"
#searchTips
"
).
val
(
data
.
searchTips
);
}
else
if
(
type
==
'
processAttr
'
)
{
$
(
'
#otherDom
'
).
html
(
pageHtml
[
type
]);
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
'
queryActFlowListByClassName
'
,
params
:
{
className
:
parent
.
objectId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
$
(
"
#actFlowId
"
).
html
(
getDataUseHandlebars
(
`{{#each rows}}<option value="{{id}}">{{flowName}}</option>{{/each}}`
,
json
));
if
(
!
isNull
(
data
.
actFlowId
))
{
$
(
"
#actFlowId
"
).
val
(
data
.
actFlowId
);
// 禁止更换流程
$
(
"
#actFlowId
"
).
attr
(
"
disabled
"
,
true
);
}
form
.
render
(
'
select
'
);
},
async
:
false
});
}
else
{
}
else
{
$
(
'
#otherDom
'
).
html
(
''
);
$
(
'
#otherDom
'
).
html
(
''
);
}
}
...
@@ -122,6 +139,10 @@ layui.config({
...
@@ -122,6 +139,10 @@ layui.config({
}
}
}
}
if
(
params
.
type
==
'
processAttr
'
)
{
params
[
'
actFlowId
'
]
=
$
(
"
#actFlowId
"
).
val
();
}
var
businessApi
=
{
var
businessApi
=
{
serviceStr
:
$
(
"
#serviceStr
"
).
val
(),
serviceStr
:
$
(
"
#serviceStr
"
).
val
(),
api
:
$
(
"
#api
"
).
val
(),
api
:
$
(
"
#api
"
).
val
(),
...
...
base-server/src/main/resources/template/tpl/processAttr/processAttrEdit
.html
→
common/src/main/resources/template/tpl/dsFormPage/editPageContentIsTable
.html
浏览文件 @
804e2ad1
...
@@ -33,32 +33,6 @@
...
@@ -33,32 +33,6 @@
<script
type=
"text/x-handlebars-template"
id=
"beanTemplate"
>
<script
type=
"text/x-handlebars-template"
id=
"beanTemplate"
>
{{
#
bean
}}
{{
#
bean
}}
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
span
class
=
"
hr-title
"
>
基本信息
<
/span><hr
>
<
/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
=
"
attrKey
"
lay
-
search
=
""
id
=
"
attrKey
"
win
-
verify
=
"
required
"
>
<
/select
>
<
/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
=
"
proportion
"
lay
-
search
=
""
id
=
"
proportion
"
win
-
verify
=
"
required
"
>
<
/select
>
<
/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
"
>
<
input
type
=
"
text
"
id
=
"
orderBy
"
name
=
"
orderBy
"
win
-
verify
=
"
required|number
"
placeholder
=
"
请输入序号
"
class
=
"
layui-input
"
value
=
"
{{orderBy}}
"
/>
<
div
class
=
"
layui-form-mid layui-word-aux
"
>
序号越大越往后
。
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
id
=
"
tableBox
"
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
id
=
"
tableBox
"
>
<
label
class
=
"
layui-form-label
"
>
表格属性
<
i
class
=
"
red
"
>*<
/i></
label
>
<
label
class
=
"
layui-form-label
"
>
表格属性
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
div
class
=
"
layui-input-block
"
>
...
@@ -88,7 +62,7 @@
...
@@ -88,7 +62,7 @@
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/
processAttr/
'
}).
use
(
'
processAttrEdit
'
);
layui
.
config
({
base
:
'
../../js/
dsFormPage/
'
}).
use
(
'
editPageContentIsTable
'
);
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录