diff --git a/cxywztglxt/db/aimzdb.mv.db b/cxywztglxt/db/aimzdb.mv.db index 1c89631..f6e720b 100644 Binary files a/cxywztglxt/db/aimzdb.mv.db and b/cxywztglxt/db/aimzdb.mv.db differ diff --git a/cxywztglxt/src/main/resources/static/route/pages/index.html b/cxywztglxt/src/main/resources/static/route/pages/index.html index 7365715..6b40481 100644 --- a/cxywztglxt/src/main/resources/static/route/pages/index.html +++ b/cxywztglxt/src/main/resources/static/route/pages/index.html @@ -735,7 +735,7 @@ - + @@ -753,7 +753,7 @@ var init = function() { var $pageIframe = $('#pageIframe'); $pageIframe.css({ - height: `${$win.height() - 150}px` + height: `${$win.height() - 100}px` }) } diff --git a/rjdmaiznscxt/db/aimzdb.mv.db b/rjdmaiznscxt/db/aimzdb.mv.db index b795d19..f4e7f2a 100644 Binary files a/rjdmaiznscxt/db/aimzdb.mv.db and b/rjdmaiznscxt/db/aimzdb.mv.db differ diff --git a/zjkglxt/db/aimzdb.mv.db b/zjkglxt/db/aimzdb.mv.db index 992a889..0107c69 100644 Binary files a/zjkglxt/db/aimzdb.mv.db and b/zjkglxt/db/aimzdb.mv.db differ diff --git a/zjkglxt/src/main/resources/static/route/pages/1c4881/list.html b/zjkglxt/src/main/resources/static/route/pages/1c4881/list.html index 43feebe..374d8e6 100644 --- a/zjkglxt/src/main/resources/static/route/pages/1c4881/list.html +++ b/zjkglxt/src/main/resources/static/route/pages/1c4881/list.html @@ -99,7 +99,7 @@ }, { field: 'czjg', - title: '操作结果', align: "center", + title: '操作结果', align: "center", minWidth: 120, diff --git a/zjkglxt/src/main/resources/static/route/pages/785671/list.html b/zjkglxt/src/main/resources/static/route/pages/785671/list.html index 6ef0f80..6a7fb32 100644 --- a/zjkglxt/src/main/resources/static/route/pages/785671/list.html +++ b/zjkglxt/src/main/resources/static/route/pages/785671/list.html @@ -1,7 +1,7 @@ - + 专家库管理系统 @@ -16,7 +16,6 @@
-
@@ -25,19 +24,19 @@
+
+ + + + + +
- - +
@@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,19 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'zjxm', - title: '专家姓名', - minWidth: 80, - }, - { - field: 'zjly', - title: '专家领域', - minWidth: 80, - }, - { - field: 'ssjg', - title: '所属机构', - minWidth: 80, - }, - { - field: 'lxfs', - title: '联系方式', - minWidth: 80, - }, - { - field: 'dzyj', - title: '电子邮件', - minWidth: 80, - }, - { - field: 'cyxms', - title: '参与项目数', - minWidth: 80, - }, - { - field: 'fbwzs', - title: '发表文章数', - minWidth: 80, - }, - { - field: 'zjychdrq', - title: '最近一次活动日期', - minWidth: 80, - }, - { - field: 'zjpf', - title: '专家评分', - minWidth: 80, - }, - { - field: 'zjjj', - title: '专家简介', - minWidth: 80, - }, + { field: 'zjxm', title: '专家姓名', fixed: "left", + align: "center", minWidth: 120 }, + { field: 'zjly', title: '专家领域', fixed: "left", + align: "center", minWidth: 200 }, + { field: 'ssjg', title: '所属机构', fixed: "left", + align: "center", minWidth: 200 }, + { field: 'lxfs', title: '联系方式', align: "center", minWidth: 200 }, + { field: 'dzyj', title: '电子邮件', align: "center", minWidth: 200 }, + { field: 'cyxms', title: '参与项目数', align: "center", minWidth: 120 }, + { field: 'fbwzs', title: '发表文章数', align: "center",minWidth: 120 }, + { field: 'zjychdrq', title: '最近一次活动日期', align: "center", minWidth: 200 }, + { field: 'zjpf', title: '专家评分', align: "center",minWidth: 120 }, + { field: 'zjjj', title: '专家简介', align: "center", minWidth: 200 }, ] ], data: datas, @@ -140,18 +102,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/785671/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/785671/save.html', + content: 'route/pages/785671/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +140,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/785671/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/785671?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/785671?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +187,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/785671/save.html b/zjkglxt/src/main/resources/static/route/pages/785671/save.html index 34fa01c..8284dca 100644 --- a/zjkglxt/src/main/resources/static/route/pages/785671/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/785671/save.html @@ -14,61 +14,63 @@
数据统计新增数据
- +
- +
- +
- +
- +
- +
- +
- +
- + + +
- +
- +
@@ -85,6 +87,18 @@
+
@@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,19 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'yhm', - title: '用户名', - minWidth: 80, - }, - { - field: 'mm', - title: '密码', - minWidth: 80, - }, - { - field: 'js', - title: '角色', - minWidth: 80, - }, - { - field: 'xm', - title: '姓名', - minWidth: 80, - }, - { - field: 'yx', - title: '邮箱', - minWidth: 80, - }, - { - field: 'dh', - title: '电话', - minWidth: 80, - }, - { - field: 'ssbm', - title: '所属部门', - minWidth: 80, - }, - { - field: 'cjsj', - title: '创建时间', - minWidth: 80, - }, - { - field: 'zhdlsj', - title: '最后登录时间', - minWidth: 80, - }, - { - field: 'zt', - title: '状态', - minWidth: 80, - }, + { field: 'yhm', title: '用户名', fixed: "left", + align: "center", minWidth: 120 }, + { field: 'mm', title: '密码', fixed: "left", + align: "center",minWidth: 200 }, + { field: 'js', title: '角色', + align: "center", minWidth: 120 }, + { field: 'xm', title: '姓名', align: "center",minWidth: 120 }, + { field: 'yx', title: '邮箱', align: "center",minWidth: 200 }, + { field: 'dh', title: '电话', align: "center", minWidth: 200 }, + { field: 'ssbm', title: '所属部门', align: "center", minWidth: 120 }, + { field: 'cjsj', title: '创建时间', align: "center", minWidth: 200 }, + { field: 'zhdlsj', title: '最后登录时间', align: "center", minWidth: 200 }, + { field: 'zt', title: '状态', align: "center", minWidth: 120 }, ] ], data: datas, @@ -140,18 +102,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/90b4d4/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/90b4d4/save.html', + content: 'route/pages/90b4d4/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +140,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/90b4d4/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/90b4d4?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/90b4d4?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +187,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/90b4d4/save.html b/zjkglxt/src/main/resources/static/route/pages/90b4d4/save.html index 2ac90fd..6c1c153 100644 --- a/zjkglxt/src/main/resources/static/route/pages/90b4d4/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/90b4d4/save.html @@ -14,61 +14,65 @@
用户管理新增数据
- +
- +
- +
- +
- +
- +
- +
- +
- + + +
- +
- + + +
- +
@@ -85,6 +89,18 @@
+
@@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,18 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'xm', - title: '姓名', - minWidth: 80, - }, - { - field: 'xb', - title: '性别', - minWidth: 80, - }, - { - field: 'csrq', - title: '出生日期', - minWidth: 80, - }, - { - field: 'zyly', - title: '专业领域', - minWidth: 80, - }, - { - field: 'zc', - title: '职称', - minWidth: 80, - }, - { - field: 'gzdw', - title: '工作单位', - minWidth: 80, - }, - { - field: 'lxdh', - title: '联系电话', - minWidth: 80, - }, - { - field: 'dzyx', - title: '电子邮箱', - minWidth: 80, - }, - { - field: 'zjjj', - title: '专家简介', - minWidth: 80, - }, - { - field: 'lrsj', - title: '录入时间', - minWidth: 80, - }, + { field: 'xm', title: '姓名', fixed: "left", + align: "center",minWidth: 120 }, + { field: 'xb', title: '性别', fixed: "left", + align: "center",minWidth: 120 }, + { field: 'csrq', title: '出生日期', align: "center", minWidth: 200 }, + { field: 'zyly', title: '专业领域', align: "center",minWidth: 120 }, + { field: 'zc', title: '职称', align: "center", minWidth: 120 }, + { field: 'gzdw', title: '工作单位', align: "center", minWidth: 200 }, + { field: 'lxdh', title: '联系电话', align: "center",minWidth: 200 }, + { field: 'dzyx', title: '电子邮箱', align: "center", minWidth: 200 }, + { field: 'zjjj', title: '专家简介', align: "center", minWidth: 250 }, + { field: 'lrsj', title: '录入时间', align: "center", minWidth: 200 }, ] ], data: datas, @@ -140,18 +101,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/a11c9c/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/a11c9c/save.html', + content: 'route/pages/a11c9c/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +139,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/a11c9c/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/a11c9c?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/a11c9c?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +186,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/a11c9c/save.html b/zjkglxt/src/main/resources/static/route/pages/a11c9c/save.html index 67863db..6560b07 100644 --- a/zjkglxt/src/main/resources/static/route/pages/a11c9c/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/a11c9c/save.html @@ -14,63 +14,72 @@
专家录入新增数据
- +
- +
- + +
- +
- + + +
- +
- +
- +
- +
- +
- +
- +
- + + +
@@ -85,6 +94,18 @@ + @@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,17 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'zjxm', - title: '专家姓名', - minWidth: 80, - }, - { - field: 'xb', - title: '性别', - minWidth: 80, - }, - { - field: 'csrq', - title: '出生日期', - minWidth: 80, - }, - { - field: 'zyly', - title: '专业领域', - minWidth: 80, - }, - { - field: 'zc', - title: '职称', - minWidth: 80, - }, - { - field: 'gzdw', - title: '工作单位', - minWidth: 80, - }, - { - field: 'lxfs', - title: '联系方式', - minWidth: 80, - }, - { - field: 'yxdz', - title: '邮箱地址', - minWidth: 80, - }, - { - field: 'zjjj', - title: '专家简介', - minWidth: 80, - }, - { - field: 'zjzp', - title: '专家照片', - minWidth: 80, - }, + { field: 'zjxm', title: '专家姓名', fixed: "left", + align: "center",minWidth: 120 }, + { field: 'xb', title: '性别', align: "center", minWidth: 80 }, + { field: 'csrq', title: '出生日期', align: "center", minWidth: 200 }, + { field: 'zyly', title: '专业领域', align: "center", minWidth: 200 }, + { field: 'zc', title: '职称', align: "center", minWidth: 200 }, + { field: 'gzdw', title: '工作单位', align: "center", minWidth: 200 }, + { field: 'lxfs', title: '联系方式', align: "center",minWidth: 200 }, + { field: 'yxdz', title: '邮箱地址', align: "center",minWidth: 200 }, + { field: 'zjjj', title: '专家简介', align: "center",minWidth: 250 }, + { field: 'zjzp', title: '专家照片', align: "center",minWidth: 200 }, ] ], data: datas, @@ -140,18 +100,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/adbccf/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/adbccf/save.html', + content: 'route/pages/adbccf/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +138,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/adbccf/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/adbccf?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/adbccf?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +185,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/adbccf/save.html b/zjkglxt/src/main/resources/static/route/pages/adbccf/save.html index f840af3..d303de0 100644 --- a/zjkglxt/src/main/resources/static/route/pages/adbccf/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/adbccf/save.html @@ -14,61 +14,68 @@
专家分类新增数据
- +
- +
- + +
- +
- + + +
- +
- +
- +
- +
- +
- +
- +
@@ -85,6 +92,18 @@
+
@@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,18 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'yhm', - title: '用户名', - minWidth: 80, - }, - { - field: 'mm', - title: '密码', - minWidth: 80, - }, - { - field: 'jsmc', - title: '角色名称', - minWidth: 80, - }, - { - field: 'yhlx', - title: '用户类型', - minWidth: 80, - }, - { - field: 'cjsj', - title: '创建时间', - minWidth: 80, - }, - { - field: 'gxsj', - title: '更新时间', - minWidth: 80, - }, - { - field: 'yx', - title: '邮箱', - minWidth: 80, - }, - { - field: 'dh', - title: '电话', - minWidth: 80, - }, - { - field: 'zhdlsj', - title: '最后登录时间', - minWidth: 80, - }, - { - field: 'qxjb', - title: '权限级别', - minWidth: 80, - }, + { field: 'yhm', title: '用户名', fixed: "left", + align: "center", minWidth: 120 }, + { field: 'mm', title: '密码', fixed: "left", + align: "center",minWidth: 200 }, + { field: 'jsmc', title: '角色名称', align: "center", minWidth: 120 }, + { field: 'yhlx', title: '用户类型', align: "center", minWidth: 120 }, + { field: 'cjsj', title: '创建时间', align: "center", minWidth: 200 }, + { field: 'gxsj', title: '更新时间', align: "center", minWidth: 200 }, + { field: 'yx', title: '邮箱', align: "center", minWidth: 200 }, + { field: 'dh', title: '电话', align: "center",minWidth: 200 }, + { field: 'zhdlsj', title: '最后登录时间', align: "center", minWidth: 200 }, + { field: 'qxjb', title: '权限级别', align: "center",minWidth: 120 }, ] ], data: datas, @@ -140,18 +101,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/eac73e/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/eac73e/save.html', + content: 'route/pages/eac73e/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +139,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/eac73e/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/eac73e?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/eac73e?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +186,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/eac73e/save.html b/zjkglxt/src/main/resources/static/route/pages/eac73e/save.html index e9f18e0..0228378 100644 --- a/zjkglxt/src/main/resources/static/route/pages/eac73e/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/eac73e/save.html @@ -14,61 +14,67 @@
角色权限新增数据
- +
- +
- +
- +
- +
- + + +
- +
- + + +
- +
- +
- +
- + + +
- +
@@ -85,6 +91,18 @@
+
@@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,17 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'zjxm', - title: '专家姓名', - minWidth: 80, - }, - { - field: 'xb', - title: '性别', - minWidth: 80, - }, - { - field: 'csrq', - title: '出生日期', - minWidth: 80, - }, - { - field: 'zc', - title: '职称', - minWidth: 80, - }, - { - field: 'zyly', - title: '专业领域', - minWidth: 80, - }, - { - field: 'gzdw', - title: '工作单位', - minWidth: 80, - }, - { - field: 'lxdh', - title: '联系电话', - minWidth: 80, - }, - { - field: 'yxdz', - title: '邮箱地址', - minWidth: 80, - }, - { - field: 'grjj', - title: '个人简介', - minWidth: 80, - }, - { - field: 'zhgxsj', - title: '最后更新时间', - minWidth: 80, - }, + { field: 'zjxm', title: '专家姓名', fixed: "left", + align: "center", minWidth: 120 }, + { field: 'xb', title: '性别',align: "center", minWidth: 120 }, + { field: 'csrq', title: '出生日期', minWidth: 80 }, + { field: 'zc', title: '职称',align: "center", minWidth: 120 }, + { field: 'zyly', title: '专业领域',align: "center", minWidth: 120 }, + { field: 'gzdw', title: '工作单位',align: "center", minWidth: 200 }, + { field: 'lxdh', title: '联系电话',align: "center", minWidth: 200 }, + { field: 'yxdz', title: '邮箱地址',align: "center", minWidth: 200 }, + { field: 'grjj', title: '个人简介', align: "center",minWidth: 250 }, + { field: 'zhgxsj', title: '最后更新时间',align: "center", minWidth: 200 }, ] ], data: datas, @@ -140,18 +100,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/eec4e2/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/eec4e2/save.html', + content: 'route/pages/eec4e2/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +138,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/eec4e2/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/eec4e2?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/eec4e2?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +185,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/eec4e2/save.html b/zjkglxt/src/main/resources/static/route/pages/eec4e2/save.html index dedb624..bc167ec 100644 --- a/zjkglxt/src/main/resources/static/route/pages/eec4e2/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/eec4e2/save.html @@ -14,63 +14,71 @@
专家查询新增数据
- +
- +
- + +
- +
- + +
- +
- +
- +
- +
- +
- +
- +
- + + +
@@ -85,6 +93,30 @@ + @@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,18 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'xm', - title: '姓名', - minWidth: 80, - }, - { - field: 'xb', - title: '性别', - minWidth: 80, - }, - { - field: 'csrq', - title: '出生日期', - minWidth: 80, - }, - { - field: 'zc', - title: '职称', - minWidth: 80, - }, - { - field: 'zyly', - title: '专业领域', - minWidth: 80, - }, - { - field: 'gzdw', - title: '工作单位', - minWidth: 80, - }, - { - field: 'lxfs', - title: '联系方式', - minWidth: 80, - }, - { - field: 'dzyx', - title: '电子邮箱', - minWidth: 80, - }, - { - field: 'zjjj', - title: '专家简介', - minWidth: 80, - }, - { - field: 'txURL', - title: '头像URL', - minWidth: 80, - }, + { field: 'xm', title: '姓名', fixed: "left", + align: "center", minWidth: 120 }, + { field: 'xb', title: '性别', + align: "center",minWidth: 80 }, + { field: 'csrq', title: '出生日期', align: "center", minWidth: 200 }, + { field: 'zc', title: '职称', align: "center", minWidth: 120 }, + { field: 'zyly', title: '专业领域', align: "center", minWidth: 200 }, + { field: 'gzdw', title: '工作单位', align: "center",minWidth: 200 }, + { field: 'lxfs', title: '联系方式', align: "center", minWidth: 200 }, + { field: 'dzyx', title: '电子邮箱', align: "center", minWidth: 200 }, + { field: 'zjjj', title: '专家简介', align: "center", minWidth: 250 }, + { field: 'txURL', title: '头像URL', align: "center", minWidth: 250 }, ] ], data: datas, @@ -140,18 +101,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/f56928/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/f56928/save.html', + content: 'route/pages/f56928/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +139,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/f56928/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/f56928?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/f56928?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +186,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/f56928/save.html b/zjkglxt/src/main/resources/static/route/pages/f56928/save.html index 1ea493b..dfe50f3 100644 --- a/zjkglxt/src/main/resources/static/route/pages/f56928/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/f56928/save.html @@ -14,61 +14,68 @@
专家信息管理新增数据
- +
- +
- + +
- +
- + + +
- +
- +
- +
- +
- +
- +
- +
@@ -85,6 +92,18 @@
+
@@ -63,7 +62,7 @@ elem: "#datatable", id: 'datatable', height: $win.height() - 83, - toolbar: '#headerToolBar', + // 移除toolbar配置 cols: [ [ { type: "checkbox", fixed: "left" }, @@ -75,56 +74,17 @@ align: "center", templet: "{{d.LAY_NUM}}", }, - { - field: 'zjxm', - title: '专家姓名', - minWidth: 80, - }, - { - field: 'xb', - title: '性别', - minWidth: 80, - }, - { - field: 'csrq', - title: '出生日期', - minWidth: 80, - }, - { - field: 'lxdh', - title: '联系电话', - minWidth: 80, - }, - { - field: 'dzyj', - title: '电子邮件', - minWidth: 80, - }, - { - field: 'zyly', - title: '专业领域', - minWidth: 80, - }, - { - field: 'zc', - title: '职称', - minWidth: 80, - }, - { - field: 'gzdw', - title: '工作单位', - minWidth: 80, - }, - { - field: 'jj', - title: '简介', - minWidth: 80, - }, - { - field: 'txURL', - title: '头像URL', - minWidth: 80, - }, + { field: 'zjxm', title: '专家姓名', fixed: "left", + align: "center", minWidth: 120 }, + { field: 'xb', title: '性别', align: "center",minWidth: 80 }, + { field: 'csrq', title: '出生日期', align: "center", minWidth: 200 }, + { field: 'lxdh', title: '联系电话', align: "center", minWidth: 200 }, + { field: 'dzyj', title: '电子邮件', align: "center",minWidth: 200 }, + { field: 'zyly', title: '专业领域', align: "center", minWidth: 120 }, + { field: 'zc', title: '职称', align: "center", minWidth: 120 }, + { field: 'gzdw', title: '工作单位', align: "center", minWidth: 200 }, + { field: 'jj', title: '简介', align: "center", minWidth: 250 }, + { field: 'txURL', title: '头像URL', align: "center", minWidth: 200 }, ] ], data: datas, @@ -140,18 +100,37 @@ } var addEvent = function() { - // 事件 - 增删改 - table.on('toolbar(datatable)', function(obj) { - var layEvent = obj.event; + // 直接绑定按钮点击事件 + $('#saveBtn').on('click', function() { + top.layer.open({ + type: 2, + title: false, + closeBtn: false, + shadeClose: true, + content: 'route/pages/f69afb/save.html', + area: ['400px', '100%'], + offset: 'r', + anim: 'slideLeft', + end: function() { + initTableData(); + } + }); + }); + + $('#updateBtn').on('click', function() { var checkStatus = table.checkStatus('datatable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { + if(checkDatas.length === 0) { + top.layer.msg('请勾选要编辑的数据'); + } else if(checkDatas.length > 1) { + top.layer.msg('不能编辑多条数据'); + } else { top.layer.open({ type: 2, title: false, closeBtn: false, shadeClose: true, - content: 'route/pages/f69afb/save.html', + content: 'route/pages/f69afb/update.html?id='+ checkDatas[0].id, area: ['400px', '100%'], offset: 'r', anim: 'slideLeft', @@ -159,66 +138,43 @@ initTableData(); } }); - } else if(layEvent === 'updateEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要编辑的数据'); - } else if(checkDatas.length > 1) { - top.layer.msg('不能编辑多条数据'); - } else { - top.layer.open({ - type: 2, - title: false, - closeBtn: false, - shadeClose: true, - content: 'route/pages/f69afb/update.html?id='+ checkDatas[0].id, - area: ['400px', '100%'], - offset: 'r', - anim: 'slideLeft', - end: function() { - initTableData(); - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.layer.msg('请勾选要删除的数据'); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += ','; - } - ids += item.id; - } - top.layer.confirm('确定删除吗?', {title: false}, function(index) { - top.layer.close(index); - var loadingIndex; - $.ajax({ - type: 'DELETE', - url: 'api/data/delete/c3a63a/f69afb?ids=' + ids, - contentType: "application/json;charset=utf-8", - success: function(resp) { - top.layer.msg('删除成功'); - initTableData(); - }, - error: function(resp) { - var data = JSON.parse(resp.responseText); - top.layer.msg(data.msg); - }, - beforeSend: function() { - loadingIndex = top.layer.msg('正在删除...', { - icon: 16, - shade: 0.01 - });; - }, - complete: function() { - top.layer.close(loadingIndex); - } - }) - }); - } } }); + + $('#removeBtn').on('click', function() { + var checkStatus = table.checkStatus('datatable'); + var checkDatas = checkStatus.data; + if(checkDatas.length === 0) { + top.layer.msg('请勾选要删除的数据'); + } else { + var ids = ''; + for(var i = 0, item; item = checkDatas[i++];) { + if(i > 1) ids += ','; + ids += item.id; + } + top.layer.confirm('确定删除吗?', {title: false}, function(index) { + top.layer.close(index); + var loadingIndex = top.layer.msg('正在删除...', {icon: 16, shade: 0.01}); + $.ajax({ + type: 'DELETE', + url: 'api/data/delete/c3a63a/f69afb?ids=' + ids, + contentType: "application/json;charset=utf-8", + success: function(resp) { + top.layer.msg('删除成功'); + initTableData(); + }, + error: function(resp) { + var data = JSON.parse(resp.responseText); + top.layer.msg(data.msg); + }, + complete: function() { + top.layer.close(loadingIndex); + } + }); + }); + } + }); + form.on('submit(searchFilter)', function(formData) { initTableData(formData.field.keywords); }); @@ -229,4 +185,4 @@ }); - + \ No newline at end of file diff --git a/zjkglxt/src/main/resources/static/route/pages/f69afb/save.html b/zjkglxt/src/main/resources/static/route/pages/f69afb/save.html index 05b10a8..b969212 100644 --- a/zjkglxt/src/main/resources/static/route/pages/f69afb/save.html +++ b/zjkglxt/src/main/resources/static/route/pages/f69afb/save.html @@ -14,61 +14,68 @@
专家编辑新增数据
- +
- +
- + +
- +
- + + +
- +
- +
- +
- +
- +
- +
- +
@@ -85,6 +92,18 @@