parent
f3c2d0c21b
commit
f7bb33ccb7
@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
||||
<style>
|
||||
.require-star {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
background-color: #ea4335;
|
||||
top: 12px;
|
||||
right: 8px;
|
||||
border-radius: 1.5px;
|
||||
}
|
||||
|
||||
.input-width {
|
||||
max-width: 455px
|
||||
}
|
||||
|
||||
.layui-form-select {
|
||||
width: 455px;
|
||||
}
|
||||
|
||||
.layui-btn-container .layui-btn {
|
||||
margin-right: 10px;
|
||||
margin-top: 4px;
|
||||
word-spacing: normal;
|
||||
}
|
||||
|
||||
.layui-table-view .layui-table th {
|
||||
padding: 0;
|
||||
border-top: 1px solid #EEEEEE !important;
|
||||
/* border-left: 1px solid #EEEEEE !important; */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 100px !important;">共享表:</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-btn-container tag" lay-filter="ipTag" lay-allowclose="true" lay-newTag="true"
|
||||
id="tag">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script src="../../../component/layui/layui.js"></script>
|
||||
<script src="../../../component/pear/pear.js"></script>
|
||||
<script src="./js/tableSelect.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'tag'], function () {
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
var tag = layui.tag;
|
||||
|
||||
var systemId = GetQueryString("system_id");
|
||||
|
||||
tag.render("ipTag", {
|
||||
skin: 'layui-btn layui-btn-primary layui-btn-sm layui-btn-radius', //标签样式
|
||||
tagText: '<i class="layui-icon layui-icon-add-1" id="addTag"></i>添加表' //标签添加按钮提示文本
|
||||
});
|
||||
|
||||
|
||||
form.on('submit(save)', function (data) {
|
||||
var _data = {};
|
||||
//获取标签信息
|
||||
var buttons = $('#tag button:not(.button-new-tag)');
|
||||
var ipArray = [];
|
||||
buttons.each(function () {
|
||||
var _ip = $(this).html().replace(/<i[^>]*>.*<\/i>/g, '');
|
||||
ipArray.push(_ip);
|
||||
});
|
||||
var ip = ipArray.join(',');
|
||||
_data['table_names'] = ip;
|
||||
_data['system_id'] = systemId;
|
||||
|
||||
$.ajax({
|
||||
url: '/QingLong/dataShare/share',
|
||||
data: _data,
|
||||
type: 'post',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg("共享成功!", {
|
||||
icon: 1,
|
||||
time: 1300
|
||||
}, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
parent.layui.table.reload("data-table");
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.message, {
|
||||
icon: 2,
|
||||
time: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
function GetQueryString(name, istop) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
||||
|
||||
if (r != null) return unescape(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in new issue