diff --git a/WebRoot/view/jrgl/xtgl/index.html b/WebRoot/view/jrgl/xtgl/index.html index 2eaf0d07..0670c704 100644 --- a/WebRoot/view/jrgl/xtgl/index.html +++ b/WebRoot/view/jrgl/xtgl/index.html @@ -63,7 +63,7 @@ diff --git a/WebRoot/view/tb/org/publish.html b/WebRoot/view/tb/org/publish.html index 8df2f68c..1849cbd9 100644 --- a/WebRoot/view/tb/org/publish.html +++ b/WebRoot/view/tb/org/publish.html @@ -24,8 +24,8 @@
-
-
+
+
@@ -34,7 +34,7 @@ id="endDate" placeholder="请选择截止日期">
-
+
@@ -51,18 +51,35 @@
+ style="border-style:dashed;border-width:1px;border-color: #CCCCCC;height: 100px;width: 630px;padding: 10px;overflow: auto;">
-
+
+ -
- - - - + +
@@ -93,8 +110,9 @@ var tab = layui.tab; var util = layui.util; var tag = layui.tag; + var table = layui.table; - var bureauIds = ""; + var bureauIds = []; var jobId = GetQueryString("job_id"); @@ -102,61 +120,121 @@ elem: '#endDate' }); - $("#test").click(function () { - tag.add('orgs', { text: '新选项', id: 12 }); - }); - function tableRender() { - table.render({ - elem: '#data-table', - url: '/QingLong/collect/getBureauList', - where: { - org_type_id: "-1", - org_name: "" - }, - height: 'full-130', - page: { - limit: 15 - , layout: ['count', 'prev', 'page', 'next', 'skip'] - , prev: "上一页" - , next: "下一页" - }, - cols: [[ - { title: '序号', align: 'center', width: "5%", type: 'numbers' }, - { title: '单位名称', field: 'org_name', align: 'center' }, - { title: '单位类型', field: 'org_type_name', align: 'center', width: "10%" }, - { title: '操作', align: 'center', width: "25%", toolbar: '#table-bar' } - ]], - skin: 'line', - toolbar: '#table-toolbar', - defaultToolbar: [], - parseData: function (res) { - var data = res.data; - for (var i = 0; i < data.length; i++) { - switch (data[i].org_type_id) { - case 5: - res.data[i].org_type_name = '市直教辅单位'; - break; - case 9: - res.data[i].org_type_name = '市直学校'; - break; - case 11: - res.data[i].org_type_name = '区县教育局'; - break; - default: - res.data[i].sub_scope = '--'; - break; - } + + table.render({ + elem: '#data-table', + id: 'myTable', + url: '/QingLong/collect/getBureauList', + where: { + org_type_id: "-1", + org_name: $("#org_name").val() + }, + height: '375', + page: { + limit: 5 + , layout: ['count', 'prev', 'page', 'next', 'skip'] + , prev: "上一页" + , next: "下一页" + }, + cols: [[ + { title: '序号', align: 'center', width: "5%", type: 'numbers' }, + { title: '单位名称', field: 'org_name', align: 'center' }, + { title: '单位类型', field: 'org_type_name', align: 'center', width: "20%" }, + { title: '操作', align: 'center', width: "25%", templet: '#select-enable' } + ]], + skin: 'line', + toolbar: '#table-toolbar', + defaultToolbar: [], + parseData: function (res) { + var data = res.data; + for (var i = 0; i < data.length; i++) { + switch (data[i].org_type_id) { + case 5: + res.data[i].org_type_name = '市直教辅单位'; + break; + case 9: + res.data[i].org_type_name = '市直学校'; + break; + case 11: + res.data[i].org_type_name = '区县教育局'; + break; + default: + res.data[i].org_type_name = '--'; + break; } - return res; + res.data[i].sw = false + if (bureauIds.includes(data[i].org_id)) { + res.data[i].sw = true + } } + return res; + }, + done: function (res, curr, count) { + var options = this; + + // 获取当前行数据 + table.getRowData = function (tableId, elem) { + var index = $(elem).closest('tr').data('index'); + return table.cache[tableId][index] || {}; + }; + + form.on('switch(switchEnable)', function (obj) { + var data = table.getRowData(options.id, this); + if (obj.elem.checked) { + tag.add('orgs', { text: data.org_name, id: data.org_id }); + bureauIds.push(data.org_id); + } + else { + tag.delete('orgs', data.org_id); + } + }); + } + }); + + + tag.on('delete(orgs)', function (data) { + var orgId = data.elem.prevObject.prevObject[0].getAttribute("lay-id"); + bureauIds = bureauIds.filter(item => item !== orgId); + var switchElem = $('#' + orgId); + switchElem.prop('checked', false); + form.render(); + }); + + + util.on({ + confirm: function () { + tableReload(); + } + }); + + form.on('select(orgTypeId)', function (data) { + tableReload() + }); + + form.on('input-affix(clear)', function (data) { + tableReload(); + }); + + function tableReload() { + table.reloadData('myTable', { + where: { + org_type_id: $("#orgTypeId").val(), + org_name: $("#org_name").val() + }, + scrollPos: true }); } - form.on('submit(publish)', function (data) { + + + + + + form.on('submit(publish)', function (data) { var shiZhiSchool = 0; var shiZhiJiaoFu = 0; @@ -180,7 +258,7 @@ data.field["shiZhiSchool"] = shiZhiSchool; data.field["shiZhiJiaoFu"] = shiZhiJiaoFu; data.field["quXiaoJiaoYuJu"] = quXiaoJiaoYuJu; - data.field["bureauIds"] = bureauIds; + data.field["bureauIds"] = bureauIds.join(","); $.ajax({ url: '/QingLong/collect/publishJob', @@ -193,7 +271,7 @@ time: 1000 }, function () { parent.layer.close(parent.layer.getFrameIndex(window.name)); - parent.returnTaskList(); + parent.refresh(); }); } else { layer.msg(result.message, { diff --git a/WebRoot/view/tb/org/task_list.html b/WebRoot/view/tb/org/task_list.html index 7d57ea86..5158c55d 100644 --- a/WebRoot/view/tb/org/task_list.html +++ b/WebRoot/view/tb/org/task_list.html @@ -6,7 +6,7 @@ - + @@ -27,7 +27,7 @@ 查询
- +
@@ -35,16 +35,22 @@
+
@@ -110,7 +116,7 @@ { title: '发布时间', field: 'publish_time', align: 'center', width: "10%" }, { title: '截止时间', field: 'deadline_time', align: 'center', width: "10%" }, { title: '填报格式', field: 'job_type_name', align: 'center', width: "10%" }, - { title: '填报进度', field: 'fill_progress', align: 'center', width: "10%" }, + { title: '填报进度', align: 'center', width: "10%", templet: '#progress-Templet' }, { title: '状态', field: 'publish_state_name', align: 'center', width: "5%" }, { title: '操作', align: 'center', width: "25%", toolbar: '#table-bar' } ]], @@ -141,7 +147,7 @@ type: 2, title: '发布任务', shade: 0.1, - area: ['1024px', '600px'], + area: ['860px', '730px'], content: './publish.html?job_id=' + obj.data.job_id }); } diff --git a/WebRoot/view/tb/org/test.html b/WebRoot/view/tb/org/test.html index 22bbff08..2fa7309a 100644 --- a/WebRoot/view/tb/org/test.html +++ b/WebRoot/view/tb/org/test.html @@ -9,28 +9,9 @@ -
-
-
61/12
-
-
-
6/12
-
-
-
-
-
3/12
-
-
-
3/12
-
-
-
3/12
-
-
-
3/12
-
-
+
+
+