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

删除前台服务配置前端代码

上级 3942f1a3
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form', 'textool'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
textool = layui.textool;
textool.init({eleId: 'content', maxlength: 200});
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
name: $("#name").val(),
content: $("#content").val(),
sysUrl: $("#sysUrl").val(),
};
AjaxPostUtil.request({url: reqBasePath + "writeSysEveWinMation", 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', 'fileUpload'], function (exports) {
winui.renderColor();
layui.use(['form', 'textool'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
textool = layui.textool;
AjaxPostUtil.request({url: reqBasePath + "sysevewin003", params: {id: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
$("#name").val(json.bean.name);
$("#sysUrl").val(json.bean.sysUrl);
$("#content").val(json.bean.content);
textool.init({eleId: 'content', maxlength: 200});
}});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
name: $("#name").val(),
content: $("#content").val(),
sysUrl: $("#sysUrl").val(),
id: parent.rowId,
};
AjaxPostUtil.request({url: reqBasePath + "writeSysEveWinMation", 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
var rowId = "";
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;
authBtn('1552961221651');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'sysevewin001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '名称', width: 180 },
{ field: 'sysUrl', title: '地址', width: 240 },
{ field: 'content', title: '介绍', width: 300 },
{ field: 'menuNum', title: '菜单数量', 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();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入名称", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
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 + "sysevewin005", 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/sysEveWin/sysEveWinEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "sysEveWinEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/sysEveWin/sysEveWinAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "sysEveWinAdd",
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 $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('sysEveWinList', {});
});
<!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-xs12">
<label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入名称" class="layui-input" maxlength="75"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">地址</label>
<div class="layui-input-block">
<input type="text" id="sysUrl" name="sysUrl" win-verify="url" placeholder="请输入地址" class="layui-input" maxlength="100"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">介绍</label>
<div class="layui-input-block">
<textarea id="content" name="content" placeholder="请输入介绍" class="layui-textarea" style="height: 100px;" maxlength="200"></textarea>
</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/sysEveWin/'}).use('sysEveWinAdd');
</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="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入名称" class="layui-input" maxlength="75"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">地址</label>
<div class="layui-input-block">
<input type="text" id="sysUrl" name="sysUrl" win-verify="url" placeholder="请输入地址" class="layui-input" maxlength="100"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">介绍</label>
<div class="layui-input-block">
<textarea id="content" name="content" placeholder="请输入介绍" class="layui-textarea" style="height: 100px;" maxlength="200"></textarea>
</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>
</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/sysEveWin/'}).use('sysEveWinEdit');
</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="winui-toolbar">
<div class="winui-tool">
<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" auth="1552961221651"><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(d.menuNum == 0 && auth('1552961260671')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# if(auth('1552961221651')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></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/sysEveWin/'}).use('sysEveWinList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -3162,11 +3162,12 @@ hr,
}
.layui-table-tool-panel {
position: absolute;
top: 29px;
left: -1px;
position: fixed;
margin-top: 10px;
right: 20px;
padding: 5px 0;
min-width: 150px;
width: max-content;
min-height: 40px;
border: 1px solid #d2d2d2;
text-align: left;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册