Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
cc497145
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1431
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看板
提交
cc497145
编写于
2月 06, 2023
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码修改
上级
273ab8e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
62 addition
and
2 deletion
+62
-2
common/src/main/resources/template/js/dsFormPage/simpleTableDesign.js
...ain/resources/template/js/dsFormPage/simpleTableDesign.js
+62
-2
未找到文件。
common/src/main/resources/template/js/dsFormPage/simpleTableDesign.js
浏览文件 @
cc497145
...
@@ -11,14 +11,74 @@ layui.config({
...
@@ -11,14 +11,74 @@ layui.config({
form
=
layui
.
form
,
form
=
layui
.
form
,
table
=
layui
.
table
,
table
=
layui
.
table
,
soulTable
=
layui
.
soulTable
;
soulTable
=
layui
.
soulTable
;
var
tableDataList
=
new
Array
();
var
selOption
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
var
selOption
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
// 获取属性
// 获取属性
var
attrList
=
[];
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryAttrDefinitionList
"
,
params
:
{
className
:
parent
.
objectId
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
data
)
{
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
));
attrList
=
[].
concat
(
data
.
rows
);
$
(
"
#attrKey
"
).
val
(
json
.
bean
.
attrKey
);
},
async
:
false
});
},
async
:
false
});
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
get
'
,
data
:
tableDataList
,
even
:
true
,
page
:
false
,
rowDrag
:
{
trigger
:
'
row
'
,
done
:
function
(
obj
)
{}
},
cols
:
[[
{
type
:
'
checkbox
'
,
align
:
'
center
'
},
{
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
(
attrList
,
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
:
'
templet
'
,
title
:
'
脚本
'
,
align
:
'
left
'
,
width
:
300
,
templet
:
function
(
d
)
{
return
`<input type="text" id="templet
${
d
.
id
}
" placeholder="请填写脚本" cus-id="
${
d
.
id
}
" class="layui-input tableInput" `
+
`value='`
+
(
isNull
(
d
.
templet
)
?
""
:
d
.
templet
)
+
`'/>`
;
}},
]],
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
);
}
});
matchingLanguage
();
matchingLanguage
();
form
.
render
();
form
.
render
();
form
.
on
(
'
submit(formWriteBean)
'
,
function
(
data
)
{
form
.
on
(
'
submit(formWriteBean)
'
,
function
(
data
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录