|
|
|
@ -37,33 +37,41 @@
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body class="pear-container layui-form">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
<table>
|
|
|
|
|
<colgroup>
|
|
|
|
|
<col width="350">
|
|
|
|
|
<col width="100">
|
|
|
|
|
<col width="350">
|
|
|
|
|
</colgroup>
|
|
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><img src="../imgs/form.png" alt="" style="width: 60%;height: 60%;" lay-on="form"></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td><img src="../imgs/excel.png" alt="" style="width: 55%;height: 55%;" lay-on="excel"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span lay-on="form">表单</span></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td><span lay-on="excel">EXCEL模板</span></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<body class="pear-container">
|
|
|
|
|
<form class="layui-form" action="">
|
|
|
|
|
<div class="mainBox">
|
|
|
|
|
<div class="main-container" style="margin-top: 25px;">
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label" style="width: auto !important;">发布对象:</label>
|
|
|
|
|
<div class="layui-input-block" style="margin-left: 90px !important;">
|
|
|
|
|
<input type="radio" name="targetId" value=1 title="机构单位" checked lay-filter="targetId">
|
|
|
|
|
<input type="radio" name="targetId" value=2 title="群体 / 具体人" lay-filter="targetId">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label" style="width: auto !important;">任务格式:</label>
|
|
|
|
|
<div class="layui-input-block" style="margin-left: 90px !important;">
|
|
|
|
|
<span style="font-weight:normal" id="form_radio">
|
|
|
|
|
<input type="radio" name="formType" value="1" checked><img src="../imgs/form.png" title="表单"
|
|
|
|
|
style="width: 50px;margin-left: -22px;margin-right: 29px;">
|
|
|
|
|
</span>
|
|
|
|
|
<span style="font-weight:normal" id="excel_radio">
|
|
|
|
|
<input type="radio" name="formType" value="2" style="margin-left: 130px;"><img
|
|
|
|
|
src="../imgs/excel.png" title="表格" style="width: 50px;margin-left: -22px;" id="excel">
|
|
|
|
|
</span>
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -72,9 +80,61 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
layui.use(function () {
|
|
|
|
|
var form = layui.form;
|
|
|
|
|
var $ = layui.jquery;
|
|
|
|
|
var util = layui.util;
|
|
|
|
|
|
|
|
|
|
localStorage.removeItem('target_type_id');
|
|
|
|
|
|
|
|
|
|
form.on('radio(targetId)', function (data) {
|
|
|
|
|
if (data.value == 2) {
|
|
|
|
|
$('#excel_radio').hide();
|
|
|
|
|
$('input[name="formType"][value="1"]').prop('checked', true);
|
|
|
|
|
layui.form.render('radio');
|
|
|
|
|
} else {
|
|
|
|
|
$('#excel_radio').show();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
form.on('submit(save)', function (data) {
|
|
|
|
|
|
|
|
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
|
|
|
|
|
|
|
|
window.localStorage.setItem('target_type_id', parseInt(data.field.targetId));
|
|
|
|
|
|
|
|
|
|
if (data.field.formType == "1") {
|
|
|
|
|
parent.openFormCreatePage();
|
|
|
|
|
} else {
|
|
|
|
|
parent.openExcelCreatePage();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// $.ajax({
|
|
|
|
|
// url: '/QingLong/collect/cloneJob',
|
|
|
|
|
// type: 'post',
|
|
|
|
|
// data: {
|
|
|
|
|
// "job_id": jobId,
|
|
|
|
|
// "job_name": $("#task_name").val()
|
|
|
|
|
// },
|
|
|
|
|
// success: function (result) {
|
|
|
|
|
// if (result.success) {
|
|
|
|
|
// layer.msg("复制成功!", {
|
|
|
|
|
// icon: 1,
|
|
|
|
|
// time: 1000
|
|
|
|
|
// }, function () {
|
|
|
|
|
// parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
|
|
|
// parent.refresh();
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// layer.msg(result.message, {
|
|
|
|
|
// icon: 2,
|
|
|
|
|
// time: 2000
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
util.on({
|
|
|
|
|
form: function () {
|
|
|
|
|