|
|
|
@ -14,10 +14,12 @@ |
|
|
|
|
<div id="form-list-table" lay-filter="form-list-table"></div> |
|
|
|
|
<script type="text/html" id="table-head-toolbar"> |
|
|
|
|
<div class="btn-comp"> |
|
|
|
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="newDesign">设计表单</button> |
|
|
|
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="newDesign">设计表单 |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
<div class="search-comp"> |
|
|
|
|
<input class="layui-input" type="text" id="searchText" name="searchText" placeholder="请输入表单名称进行查询"/> |
|
|
|
|
<input class="layui-input" type="text" id="searchText" name="searchText" |
|
|
|
|
placeholder="请输入表单名称进行查询"/> |
|
|
|
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="query">查 询</button> |
|
|
|
|
</div> |
|
|
|
|
</script> |
|
|
|
@ -79,7 +81,7 @@ |
|
|
|
|
openFormConfigLayer(id); |
|
|
|
|
break; |
|
|
|
|
case 'delete': |
|
|
|
|
formDelete(id) |
|
|
|
|
formDelete(data) |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -100,7 +102,10 @@ |
|
|
|
|
cancel: function (index, layerObj) { |
|
|
|
|
let iframeWin = window[layerObj.find('iframe')[0]['name']]; |
|
|
|
|
if (iframeWin.isChange()) { |
|
|
|
|
layer.confirm('关闭窗口将不会保存更改的内容,是否继续关闭?', {title: '关闭表单设计器', btn: ['关闭', '取消']}, function () { |
|
|
|
|
layer.confirm('关闭窗口将不会保存更改的内容,是否继续关闭?', { |
|
|
|
|
title: '关闭表单设计器', |
|
|
|
|
btn: ['关闭', '取消'] |
|
|
|
|
}, function () { |
|
|
|
|
layer.closeAll(); |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
@ -132,10 +137,14 @@ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除表单 |
|
|
|
|
* @param id |
|
|
|
|
* @param data |
|
|
|
|
*/ |
|
|
|
|
function formDelete(id) { |
|
|
|
|
layer.confirm('是否删除该表单?', {title: '删除确认', btn: ['删除', '取消']}, function (layIndex) { |
|
|
|
|
function formDelete(data) { |
|
|
|
|
const {id, formId} = data; |
|
|
|
|
layer.confirm(`将同时删除以下数据库表:<br/><label style="color: orange">${formId}</label><br/>是否继续删除?`, { |
|
|
|
|
title: '删除确认', |
|
|
|
|
btn: ['删除', '取消'] |
|
|
|
|
}, function (layIndex) { |
|
|
|
|
postRequest(`${ctx}/dynamic-form/api/form/delete`, {id}).then(res => { |
|
|
|
|
layer.close(layIndex); |
|
|
|
|
res.flag ? showOkMsg('删除成功') : showErrorMsg(res.msg); |
|
|
|
|