You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
163 lines
5.4 KiB
163 lines
5.4 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../../component/pear/css/pear.css" />
|
|
<style>
|
|
.woo-tool-text-delimiter {
|
|
width: 1px;
|
|
height: 12px;
|
|
background: #EEEEEE;
|
|
display: inline-block;
|
|
margin: 0 6px 0 4px;
|
|
}
|
|
|
|
.woo-theme-color {
|
|
color: #2d8cf0 !important;
|
|
}
|
|
|
|
.woo-tool-span {
|
|
margin: 0 3px;
|
|
position: relative;
|
|
top: -1px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.layui-table-tool-temp {
|
|
padding-right: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="pear-container layui-form">
|
|
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<table id="data-table"></table>
|
|
|
|
<script type="text/html" id="table-toolbar">
|
|
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="zhinengMatch">
|
|
<i class="layui-icon layui-icon-search"></i>
|
|
智能匹配
|
|
</button>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/html" id="table-bar">
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="shoudongMatch"><a
|
|
class="woo-theme-color">手功匹配</a></span>
|
|
</script>
|
|
|
|
<script src="../../../../component/layui/layui.js"></script>
|
|
<script src="../../../../component/pear/pear.js"></script>
|
|
|
|
<script>
|
|
layui.use(['table', 'form', 'jquery', 'common'], function () {
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var common = layui.common;
|
|
|
|
tableRender();
|
|
|
|
function tableRender() {
|
|
table.render({
|
|
elem: '#data-table',
|
|
url: '/QingLong/collect/getAllBureau',
|
|
where: {
|
|
is_match: 0
|
|
},
|
|
height: 'full-60',
|
|
page: {
|
|
limit: 15
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
, prev: "上一页"
|
|
, next: "下一页"
|
|
},
|
|
cols: [[
|
|
{ title: '序号', unresize: true, align: 'center', width: "5%", type: 'numbers' },
|
|
{ title: '单位名称', unresize: true, align: 'center', field: 'org_name' },
|
|
{ title: '单位类型', unresize: true, align: 'center', field: 'bureau_type_name', width: "20%" },
|
|
{ title: '操作', unresize: true, align: 'center', width: "10%", toolbar: '#table-bar' }
|
|
]],
|
|
skin: 'line',
|
|
toolbar: '#table-toolbar',
|
|
defaultToolbar: [{
|
|
title: '刷新',
|
|
layEvent: 'refresh',
|
|
icon: 'layui-icon-refresh',
|
|
}]
|
|
});
|
|
}
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
if (obj.event === 'shoudongMatch') {
|
|
window.shoudongMatch(obj);
|
|
}
|
|
});
|
|
|
|
table.on('toolbar(data-table)', function (obj) {
|
|
if (obj.event === 'zhinengMatch') {
|
|
window.zhinengMatch(obj);
|
|
} else if (obj.event === 'refresh') {
|
|
window.refresh();
|
|
}
|
|
});
|
|
|
|
window.shoudongMatch = function (obj) {
|
|
layer.open({
|
|
type: 2,
|
|
title: '手工匹配',
|
|
offset: 'r',
|
|
anim: 'slideLeft',
|
|
area: ['800px', '100%'],
|
|
shade: 0.1,
|
|
content: './ty_org_list.html?org_id=' + obj.data.org_id
|
|
});
|
|
}
|
|
|
|
window.zhinengMatch = function (obj) {
|
|
$.ajax({
|
|
url: "/QingLong/collect/OneKeyMatch",
|
|
async: false,
|
|
type: 'POST',
|
|
success: function (res) {
|
|
layer.msg("智能匹配成功,本次成功匹配 " + res.count + " 条数据", {
|
|
icon: 1,
|
|
time: 2000
|
|
}, function () {
|
|
refresh();
|
|
});
|
|
},
|
|
error: function (xhr, status, error) {
|
|
layer.msg("出现异常!", {
|
|
icon: 2,
|
|
time: 1000
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
window.refresh = function (param) {
|
|
table.reload('data-table');
|
|
}
|
|
|
|
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> |