提交 a7f8c256 编写于 作者: doc_wei's avatar doc_wei

删除表单分类管理功能

上级 03f02a37
......@@ -34,14 +34,6 @@ layui.config({
$("#saveCheckBox").hide();
}
dsFormUtil.loadDsFormPageTypeByPId("firstTypeId", "0");
form.on('select(firstTypeId)', function(data) {
var thisRowValue = data.value;
dsFormUtil.loadDsFormPageTypeByPId("secondTypeId", isNull(thisRowValue) ? "-" : thisRowValue);
form.render('select');
});
var tableList = [];
table.render({
id: 'messageTable',
......@@ -56,8 +48,6 @@ layui.config({
cols: [[
{ type: parent.dsFormUtil.chooseType ? 'checkbox' : 'radio', fixed: 'left'},
{ field: 'pageName', title: '页面名称', align: 'left', width: 120 },
{ field: 'firstTypeName', title: '一级分类', align: 'left', width: 120 },
{ field: 'secondTypeName', title: '二级分类', align: 'left', width: 120 },
{ field: 'pageDesc', title: '页面简介', align: 'left', width: 350 },
{ field: 'pageNum', title: '页面编号', align: 'center', width: 150 },
]],
......@@ -131,9 +121,7 @@ layui.config({
function getTableParams() {
return {
pageName: $("#pageName").val(),
firstTypeId: $("#firstTypeId").val(),
secondTypeId: $("#secondTypeId").val()
pageName: $("#pageName").val()
};
}
......
......@@ -4,19 +4,11 @@ layui.config({
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
dsFormUtil.loadDsFormPageTypeByPId("firstTypeId", "0");
form.on('select(firstTypeId)', function(data) {
var thisRowValue = data.value;
dsFormUtil.loadDsFormPageTypeByPId("secondTypeId", isNull(thisRowValue) ? "-" : thisRowValue);
form.render('select');
});
var $ = layui.$,
form = layui.form;
matchingLanguage();
form.render();
......@@ -24,9 +16,7 @@ layui.config({
if (winui.verifyForm(data.elem)) {
var params = {
pageName: $("#pageName").val(),
pageDesc: $("#pageDesc").val(),
firstTypeId: $("#firstTypeId").val(),
secondTypeId: $("#secondTypeId").val()
pageDesc: $("#pageDesc").val()
};
AjaxPostUtil.request({url: flowableBasePath + "dsformpage002", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index);
......@@ -39,5 +29,4 @@ layui.config({
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
......@@ -4,11 +4,11 @@ layui.config({
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var $ = layui.$,
form = layui.form;
showGrid({
id: "showForm",
......@@ -19,18 +19,6 @@ layui.config({
template: $("#showTemplate").html(),
ajaxSendAfter:function (json) {
dsFormUtil.loadDsFormPageTypeByPId("firstTypeId", "0");
$("#firstTypeId").val(json.bean.firstTypeId);
dsFormUtil.loadDsFormPageTypeByPId("secondTypeId", json.bean.firstTypeId);
$("#secondTypeId").val(json.bean.secondTypeId);
form.on('select(firstTypeId)', function(data) {
var thisRowValue = data.value;
dsFormUtil.loadDsFormPageTypeByPId("secondTypeId", isNull(thisRowValue) ? "-" : thisRowValue);
form.render('select');
});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
......@@ -38,9 +26,7 @@ layui.config({
var params = {
rowId: parent.rowId,
pageName: $("#pageName").val(),
pageDesc: $("#pageDesc").val(),
firstTypeId: $("#firstTypeId").val(),
secondTypeId: $("#secondTypeId").val()
pageDesc: $("#pageDesc").val()
};
AjaxPostUtil.request({url: flowableBasePath + "dsformpage007", params: params, type: 'json', method: "PUT", callback: function (json) {
parent.layer.close(index);
......@@ -55,5 +41,4 @@ layui.config({
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
......@@ -13,13 +13,6 @@ layui.config({
authBtn('1567731484858');
dsFormUtil.loadDsFormPageTypeByPId("firstTypeId", "0");
form.on('select(firstTypeId)', function(data) {
var thisRowValue = data.value;
dsFormUtil.loadDsFormPageTypeByPId("secondTypeId", isNull(thisRowValue) ? "-" : thisRowValue);
form.render('select');
});
table.render({
id: 'messageTable',
elem: '#messageTable',
......@@ -33,8 +26,6 @@ layui.config({
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'pageName', title: '页面名称', align: 'left', width: 120 },
{ field: 'firstTypeName', title: '一级分类', align: 'left', width: 120 },
{ field: 'secondTypeName', title: '二级分类', align: 'left', width: 120 },
{ field: 'pageDesc', title: '页面简介', align: 'left', width: 350 },
{ field: 'pageNum', title: '页面编号', align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
......@@ -125,9 +116,7 @@ layui.config({
function getTableParams() {
return {
pageName: $("#pageName").val(),
firstTypeId: $("#firstTypeId").val(),
secondTypeId: $("#secondTypeId").val()
pageName: $("#pageName").val()
};
}
......
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
dsFormUtil.loadDsFormPageTypeByPId('parentId', "0");
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
typeName: $("#typeName").val(),
typeNameEn: $("#typeNameEn").val(),
encoded: $("#encoded").val(),
parentId: isNull($("#parentId").val()) ? "0" : $("#parentId").val()
};
AjaxPostUtil.request({url: flowableBasePath + "dsformpagetype002", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
showGrid({
id: "showForm",
url: flowableBasePath + "dsformpagetype004",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#showTemplate").html(),
ajaxSendAfter: function (json) {
dsFormUtil.loadDsFormPageTypeByPId('parentId', '0');
$("#parentId").val(json.bean.parentId);
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
id: parent.rowId,
typeName: $("#typeName").val(),
typeNameEn: $("#typeNameEn").val(),
encoded: $("#encoded").val(),
parentId: isNull($("#parentId").val()) ? "0" : $("#parentId").val()
};
AjaxPostUtil.request({url: flowableBasePath + "dsformpagetype005", params: params, type: 'json', method: "PUT", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'tableTreeDj', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
tableTree = layui.tableTreeDj;
authBtn('1636280749353');
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'dsformpagetype001',
where: getTableParams(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'typeName', title: '中文名称', width: 180 },
{ field: 'typeNameEn', title: '英文名称', width: 180 },
{ field: 'code', 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: 130, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
}, {
keyId: 'id',
keyPid: 'parentId',
title: 'typeName',
});
tableTree.getTable().on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if(layEvent === 'delet'){ // 删除
delet(data);
} else if (layEvent === 'edit'){ // 编辑
edit(data);
}
});
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/dsFormPageType/dsFormPageTypeAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "dsFormPageTypeAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 删除
function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsformpagetype003", 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;
_openNewWindows({
url: "../../tpl/dsFormPageType/dsFormPageTypeEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "dsFormPageTypeEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 刷新数据
$("body").on("click", "#reloadTable", function() {
loadTable();
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
function loadTable() {
tableTree.reload("messageTable", {where: getTableParams()});
}
function getTableParams() {
return {
typeName: $("#typeName").val(),
encoded: $("#encoded").val()
};
}
exports('dsFormPageTypeList', {});
});
......@@ -15,16 +15,6 @@
<div class="layui-input-inline">
<input type="text" id="pageName" name="pageName" placeholder="请输入页面名称" class="layui-input" />
</div>
<label class="layui-form-label">一级分类</label>
<div class="layui-input-inline">
<select lay-filter="firstTypeId" lay-search="" id="firstTypeId">
</select>
</div>
<label class="layui-form-label">二级分类</label>
<div class="layui-input-inline">
<select lay-filter="secondTypeId" lay-search="" id="secondTypeId">
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
......
......@@ -18,20 +18,6 @@
<input type="text" id="pageName" name="pageName" win-verify="required" placeholder="请输入页面名称" class="layui-input"/>
</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="firstTypeId" lay-search="" win-verify="required" id="firstTypeId">
</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="secondTypeId" lay-search="" win-verify="required" id="secondTypeId">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面简介</label>
<div class="layui-input-block">
......
......@@ -24,20 +24,6 @@
<input type="text" id="pageName" name="pageName" win-verify="required" placeholder="请输入页面名称" class="layui-input" value="{{pageName}}"/>
</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="firstTypeId" lay-search="" win-verify="required" id="firstTypeId">
</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="secondTypeId" lay-search="" win-verify="required" id="secondTypeId">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面简介</label>
<div class="layui-input-block">
......
......@@ -14,16 +14,6 @@
<label class="layui-form-label">页面名称</label>
<div class="layui-input-inline">
<input type="text" id="pageName" name="pageName" placeholder="请输入页面名称" class="layui-input" />
</div>
<label class="layui-form-label">一级分类</label>
<div class="layui-input-inline">
<select lay-filter="firstTypeId" lay-search="" id="firstTypeId">
</select>
</div>
<label class="layui-form-label">二级分类</label>
<div class="layui-input-inline">
<select lay-filter="secondTypeId" lay-search="" id="secondTypeId">
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
......
<!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 style="margin: 0 auto; padding: 20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<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="typeName" name="typeName" win-verify="required" placeholder="请输入中文名称" class="layui-input"/>
<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">
<input type="text" id="typeNameEn" name="typeNameEn" win-verify="required" placeholder="请输入英文名称" class="layui-input"/>
<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">
<input type="text" id="encoded" name="encoded" win-verify="required" placeholder="请输入唯一编码,例如:1101" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">唯一编码不区分父子级别。</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">所属父级</label>
<div class="layui-input-block">
<select id="parentId" name="parentId" lay-filter="parentId" lay-search="">
</select>
<div class="layui-form-mid layui-word-aux">如果不选,则默认为一级分类。</div>
</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/dsFormPageType/'}).use('dsFormPageTypeAdd');
</script>
</body>
</html>
\ No newline at end of file
<!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 style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
</form>
</div>
<script type="text/x-handlebars-template" id="showTemplate">
{{#bean}}
<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="typeName" name="typeName" win-verify="required" placeholder="请输入中文名称" class="layui-input" value="{{typeName}}"/>
</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="typeNameEn" name="typeNameEn" win-verify="required" placeholder="请输入英文名称" class="layui-input" value="{{typeNameEn}}"/>
</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="encoded" name="encoded" win-verify="required" placeholder="请输入唯一编码,例如:1101" class="layui-input" value="{{code}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">所属父级</label>
<div class="layui-input-block">
<select id="parentId" name="parentId" lay-filter="parentId" lay-search="" disabled>
</select>
<div class="layui-form-mid layui-word-aux">如果不选则默认为一级分类</div>
</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="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/dsFormPageType/'}).use('dsFormPageTypeEdit');
</script>
</body>
</html>
\ No newline at end of file
<!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="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">名称</label>
<div class="layui-input-inline">
<input type="text" id="typeName" name="typeName" placeholder="请输入名称,支持中英文搜索" class="layui-input" />
</div>
<label class="layui-form-label">编码</label>
<div class="layui-input-inline">
<input type="text" id="encoded" name="encoded" placeholder="请输入编码" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1636280749353"><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">
{{# if(auth('1636280767080')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1636280757722')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><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/dsFormPageType/'}).use('dsFormPageTypeList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -85,27 +85,6 @@ var dsFormUtil = {
return [].concat(JSON.parse($("#" + id).attr(dsFormUtil.dsFormDataKey)));
},
/**
* 根据父id加载动态表单页面分类信息
*
* @param domId 要加载的dom对象的id
* @param parentId 父id
*/
loadDsFormPageTypeByPId: function (domId, parentId) {
showGrid({
id: domId,
url: flowableBasePath + "dsformpagetype006",
params: {parentId: parentId, language: languageType},
pagination: false,
method: "GET",
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter: function (json) {
}
});
},
/**
* 加载动态表单到页面
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册