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.
227 lines
9.5 KiB
227 lines
9.5 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
|
<link rel="stylesheet" href="../iconfont/iconfont.css" />
|
|
|
|
</head>
|
|
|
|
<body class="pear-container layui-form">
|
|
|
|
<div class="layui-card" style="margin-bottom: 10px !important;">
|
|
<div class="layui-card-body">
|
|
<div class="layui-form-item" style="margin: 10px 0 5px 0 !important;">
|
|
<div class="layui-form-item layui-inline">
|
|
<label class="layui-form-label" style="width: auto;">任务名称:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="task_name" lay-affix="clear" lay-filter="clear" placeholder="请输入任务名称"
|
|
class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline">
|
|
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="user-query">
|
|
<i class="layui-icon layui-icon-search"></i>
|
|
查询
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<table id="data-table"></table>
|
|
<script type="text/html" id="jobName-Templet">
|
|
{{#if (d.job_type == 1) { }}
|
|
<img src="../imgs/form.png" title="表单" style="max-width: 16px;margin-top: -4px;">
|
|
{{# } else { }}
|
|
<img src="../imgs/excel.png" title="EXCEL模板" style="max-width: 16px;margin-top: -4px;">
|
|
{{# } }}
|
|
{{d.job_name}}
|
|
{{#if (d.jiezhi == true) { }}
|
|
<img src="../imgs/yjz.svg" style="max-width: 50px;margin-top: -9px;margin-left: 1px;">
|
|
{{# } }}
|
|
</script>
|
|
<script type="text/html" id="targetType">
|
|
{{#if (d.target_type_id == 1) { }}
|
|
单位
|
|
{{# } else { }}
|
|
人员
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/html" id="table-bar">
|
|
{{# if(d.jiezhi == false){ }}
|
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="report" style="font-size: 12px !important;">
|
|
<i class="iconfont icon-tianbao"></i> 填报
|
|
</button>
|
|
{{# } }}
|
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="view" style="font-size: 12px !important;">
|
|
<i class="iconfont icon-chakan"></i> 查看
|
|
</button>
|
|
{{# if(d.is_finish === 1){ }}
|
|
{{# if(d.job_type === 2){ }}
|
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="download" style="font-size: 12px !important;">
|
|
<i class="iconfont icon-xiazai"></i> 下载
|
|
</button>
|
|
{{# } }}
|
|
{{# } }}
|
|
</script>
|
|
|
|
<script src="../../../component/layui/layui.js"></script>
|
|
<script src="../../../component/pear/pear.js"></script>
|
|
<script src="../../../component/pear/base64.js"></script>
|
|
|
|
<script>
|
|
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var common = layui.common;
|
|
var laytpl = layui.laytpl;
|
|
|
|
var statusCodes = GetQueryString("status_codes");
|
|
|
|
tableRender();
|
|
|
|
form.on('submit(user-query)', function () {
|
|
tableRender();
|
|
return false;
|
|
});
|
|
|
|
form.on('input-affix(clear)', function (data) {
|
|
tableRender();
|
|
});
|
|
|
|
function tableRender() {
|
|
table.render({
|
|
elem: '#data-table',
|
|
url: '/QingLong/collect/viewJobList',
|
|
where: {
|
|
keyword: $("#task_name").val(),
|
|
status_codes: statusCodes
|
|
},
|
|
height: 'full-150',
|
|
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: 'left', templet: '#jobName-Templet' },
|
|
{ title: '发布时间', unresize: true, field: 'publish_time', align: 'center', width: "15%" },
|
|
{ title: '截止时间', unresize: true, field: 'deadline_time', align: 'center', width: "15%" },
|
|
{ title: '发布对象', unresize: true, align: 'center', width: "8%", templet: '#targetType' },
|
|
{ title: '操作', unresize: true, align: 'center', width: "15%", toolbar: '#table-bar' }
|
|
]],
|
|
skin: 'line',
|
|
defaultToolbar: []
|
|
});
|
|
}
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
if (obj.event === 'report') {
|
|
window.report(obj);
|
|
} else if (obj.event === 'view') {
|
|
window.view(obj);
|
|
} else if (obj.event === 'download') {
|
|
window.download(obj);
|
|
}
|
|
});
|
|
|
|
window.report = function (obj) {
|
|
|
|
if (obj.data.target_type_id === 1) {
|
|
if (obj.data.job_type === 1) {
|
|
layer.open({
|
|
type: 2,
|
|
title: '填报',
|
|
offset: 'r',
|
|
anim: 'slideLeft',
|
|
area: ['1000px', '100%'],
|
|
shade: 0.1,
|
|
content: "../form/report.html?job_id=" + obj.data.job_id + "&status_code=" + obj.data.status_code + "&target_id=" + obj.data.target_id
|
|
});
|
|
} else {
|
|
layer.open({
|
|
type: 2,
|
|
title: '填报',
|
|
shade: 0.1,
|
|
area: ['560px', '430px'],
|
|
content: './report_excel.html?job_id=' + obj.data.job_id + '&file_name=' + obj.data.upload_excel_filename_finish + "&status_code=" + obj.data.status_code
|
|
});
|
|
}
|
|
} else {
|
|
layer.open({
|
|
type: 2,
|
|
title: '发布',
|
|
offset: 'r',
|
|
anim: 'slideLeft',
|
|
area: ['1000px', '100%'],
|
|
shade: 0.1,
|
|
content: "./publish_person.html?job_id=" + obj.data.job_id
|
|
});
|
|
}
|
|
}
|
|
|
|
window.download = function (obj) {
|
|
window.location = '/QingLong/collect/getJobBureauFillInfo?job_id=' + obj.data.job_id + '&type_id=1';
|
|
}
|
|
|
|
window.view = function (obj) {
|
|
if (obj.data.is_finish === 0) {
|
|
layer.open({
|
|
type: 2,
|
|
title: '查看',
|
|
shade: 0.1,
|
|
area: ['800px', '400px'],
|
|
content: '../dis/job_view.html?job_id=' + obj.data.job_id
|
|
});
|
|
} else {
|
|
if (obj.data.job_type === 1) {
|
|
layer.open({
|
|
type: 2,
|
|
title: '查看',
|
|
offset: 'r',
|
|
anim: 'slideLeft',
|
|
area: ['1000px', '100%'],
|
|
shade: 0.1,
|
|
shadeClose: true,
|
|
content: "../form/view.html?job_id=" + obj.data.job_id + "&target_id=" + obj.data.target_id + "&status_code=" + obj.data.status_code,
|
|
end: function () {
|
|
tableRender();
|
|
}
|
|
});
|
|
} else {
|
|
var base64Url = Base64.encode('/QingLong/collect/getJobBureauFillInfo?job_id=' + obj.data.job_id + '&type_id=2' + '&status_code=' + obj.data.status_code);
|
|
window.open('../exportPdf.html?url=' + base64Url, '_blank');
|
|
}
|
|
}
|
|
}
|
|
|
|
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> |