diff --git a/userauth/src/main/resources/template/js/appstore/storeindex.js b/userauth/src/main/resources/template/js/appstore/storeindex.js deleted file mode 100644 index 83ad2aaf9256851256ac21790cbcb4948605accf..0000000000000000000000000000000000000000 --- a/userauth/src/main/resources/template/js/appstore/storeindex.js +++ /dev/null @@ -1,145 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - - var $ = layui.$, - form = layui.form; - - //加载一级分类 - showGrid({ - id: "sysFirstType", - url: reqBasePath + "sysevewintype012", - params: {}, - pagination: false, - template: getFileContent('tpl/appstore/firsttypeTemplate.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function (json) { - } - }); - - initDate(); - function initDate(){ - var secondType = ""; - $.each($('#sysSecondType input:checkbox:checked'), function() { - secondType = secondType + $(this).val() + ","; - }); - //初始化数据 - showGrid({ - id: "showForm", - url: reqBasePath + "sysevewin008", - params: {firstType: $("#sysFirstType").find(".active").find('a').attr('rowid'), secondType: secondType}, - pagination: true, - pagesize: 18, - template: getFileContent('tpl/appstore/storeindexTemplate.tpl'), - ajaxSendLoadBefore: function(hdb){ - - hdb.registerHelper("compare1", function(v1, options){ - return fileBasePath + v1; - }); - - hdb.registerHelper('compare2', function(v1, v2, options) { - if(isNull(v1)){ - return ''; - } else { - return ''; - } - }); - }, - options: {}, - ajaxSendAfter:function (json) { - $(".sysExperience").hide(); - $(".aysnMenu").hide(); - - //遮罩层移入移出事件 - $(".app-store-item-bottom-card").mouseover(function (e){ - $(this).parent().find(".app-store-item-bottom").addClass("app-store-item-bottom-zz"); - $(this).find(".sysExperience").show(); - $(this).find(".aysnMenu").show(); - }).mouseout(function (e){ - $(this).parent().find(".app-store-item-bottom").removeClass("app-store-item-bottom-zz"); - $(this).find(".sysExperience").hide(); - $(this).find(".aysnMenu").hide(); - }); - matchingLanguage(); - form.render(); - } - }); - } - - //一级分类点击事件 - $("#sysFirstType").on('click', "a", function (e) { - $("#sysFirstType").find("li").removeClass("active"); - $(this).parent().addClass("active"); - var rowId = $(this).attr("rowid"); - //加载二级分类 - showGrid({ - id: "sysSecondType", - url: reqBasePath + "sysevewintype013", - params: {rowId: rowId}, - pagination: false, - template: getFileContent('tpl/appstore/secondtypeTemplate.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function (json) { - form.render('checkbox'); - initDate(); - } - }); - }); - - //二级分类点击事件 - form.on('checkbox(checkboxProperty)', function(data){ - if($('#sysSecondType input:checkbox:checked').length == $('#sysSecondType input:checkbox').length){ - $("#sysSecondType").find("li").find('a[rowid="111"]').parent().addClass('active'); - } else { - $("#sysSecondType").find("li").find('a[rowid="111"]').parent().removeClass('active'); - } - initDate(); - }); - //二级分类全选操作 - $("#sysSecondType").on('click', "a[rowid='111']", function (e) { - $.each($('#sysSecondType input:checkbox'), function() { - $(this).prop("checked", true); - }); - $(this).parent().addClass('active'); - form.render('checkbox'); - initDate(); - }); - - //体验 - $("body").on('click', ".sysExperience", function (e) { - var sysurl = $(this).attr('sysurl'); - window.open(sysurl, '_blank', ''); - }); - - //详情 - $("body").on('click', ".sysDetails", function (e) { - - }); - - //同步 - $("body").on('click', ".aysnMenu", function (e) { - var downLoadId = $(this).attr("rowid"); - layer.prompt({ - formType: 0, - value: '', - title: '请输入系统所在地址' - }, function(val, index){ - layer.close(index); - layer.confirm('确定从该地址:[' + val + ']进行数据同步吗?', { icon: 3, title: '数据同步' }, function (index) { - layer.close(index); - AjaxPostUtil.request({url: reqBasePath + "sysimportantsynchronization001", params:{rowId: downLoadId, url: val}, type: 'json', callback: function (json) { - winui.window.msg("同步成功", {icon: 1, time: 2000}); - }}); - }); - }); - }); - - exports('storeindex', {}); -}); diff --git a/userauth/src/main/resources/template/js/sysevewin/sysevewinadd.js b/userauth/src/main/resources/template/js/sysevewin/sysevewinadd.js index 16af9d845c5fa66b5bc6acd45e5bd6c22df6afce..697f3858b171b96bc22979d9a51dca72f3f9a9e8 100644 --- a/userauth/src/main/resources/template/js/sysevewin/sysevewinadd.js +++ b/userauth/src/main/resources/template/js/sysevewin/sysevewinadd.js @@ -71,53 +71,15 @@ layui.config({ } }); - //加载一级分类 - showGrid({ - id: "sysFirstType", - url: reqBasePath + "sysevewintype012", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - matchingLanguage(); form.render(); - form.on('select(sysFirstType)', function(data){ - var firstSelTypeId; - if(isNull(data.value)){ - firstSelTypeId = '111'; - } else { - firstSelTypeId = data.value; - } - showGrid({ - id: "sysSecondType", - url: reqBasePath + "sysevewintype013", - params: {rowId: firstSelTypeId}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - }); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { var params = { sysName: $("#sysName").val(), sysUrl: $("#sysUrl").val(), sysDesc: encodeURIComponent(layedit.getContent(layContent)), sysType: $("#sysType").val(), - sysFirstType: data.field.sysFirstType, - sysSecondType: data.field.sysSecondType, }; params.sysPic = $("#sysPic").find("input[type='hidden'][name='upload']").attr("oldurl"); if(isNull(params.sysPic)){ @@ -132,11 +94,10 @@ layui.config({ return false; }); - //取消 + // 取消 $("body").on("click", "#cancle", function() { parent.layer.close(index); }); }); - }); \ No newline at end of file diff --git a/userauth/src/main/resources/template/js/sysevewin/sysevewinedit.js b/userauth/src/main/resources/template/js/sysevewin/sysevewinedit.js index eb8d8f1b2cb8dbec788dbb8832ea64b0c0c0bdc8..65d55f7a6722b14e8345fc99dc7ac4c9397c3f2d 100644 --- a/userauth/src/main/resources/template/js/sysevewin/sysevewinedit.js +++ b/userauth/src/main/resources/template/js/sysevewin/sysevewinedit.js @@ -15,7 +15,7 @@ layui.config({ var layContent; AjaxPostUtil.request({url: reqBasePath + "sysevewin003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) { - if(!isNull(json.bean)){ + if(!isNull(json.bean)) { rowId = json.bean.id; // 初始化上传 $("#sysPic").upload(systemCommonUtil.uploadCommon003Config('sysPic', 8, json.bean.sysPic, 1)); @@ -23,34 +23,6 @@ layui.config({ $("#sysName").val(json.bean.sysName); $("#sysUrl").val(json.bean.sysUrl); $("#content").val(json.bean.sysDesc); - - //加载一级分类 - showGrid({ - id: "sysFirstType", - url: reqBasePath + "sysevewintype012", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function(j){ - $("#sysFirstType").val(json.bean.sysFirstType); - form.render('select'); - showGrid({ - id: "sysSecondType", - url: reqBasePath + "sysevewintype013", - params: {rowId: json.bean.sysFirstType}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function(j){ - $("#sysSecondType").val(json.bean.sysSecondType); - form.render('select'); - } - }); - } - }); } layedit.set({ @@ -112,43 +84,19 @@ layui.config({ matchingLanguage(); form.render(); - form.on('select(sysFirstType)', function(data){ - var firstSelTypeId; - if(isNull(data.value)){ - firstSelTypeId = '111'; - } else { - firstSelTypeId = data.value; - } - showGrid({ - id: "sysSecondType", - url: reqBasePath + "sysevewintype013", - params: {rowId: firstSelTypeId}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - }); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { var params = { sysName: $("#sysName").val(), sysUrl: $("#sysUrl").val(), sysDesc: encodeURIComponent(layedit.getContent(layContent)), rowId: parent.rowId, - sysFirstType: data.field.sysFirstType, - sysSecondType: data.field.sysSecondType, + sysPic: $("#sysPic").find("input[type='hidden'][name='upload']").attr("oldurl") }; - params.sysPic = $("#sysPic").find("input[type='hidden'][name='upload']").attr("oldurl"); - if(isNull(params.sysPic)){ - winui.window.msg('请上传系统图片', {icon: 2, time: 2000}); - return false; - } + if (isNull(params.sysPic)) { + winui.window.msg('请上传系统图片', {icon: 2, time: 2000}); + return false; + } AjaxPostUtil.request({url: reqBasePath + "sysevewin004", params: params, type: 'json', callback: function (json) { parent.layer.close(index); parent.refreshCode = '0'; diff --git a/userauth/src/main/resources/template/js/syswintype/syswintypeadd.js b/userauth/src/main/resources/template/js/syswintype/syswintypeadd.js deleted file mode 100644 index 6c10b135511c73832485cde415729742047c22fe..0000000000000000000000000000000000000000 --- a/userauth/src/main/resources/template/js/syswintype/syswintypeadd.js +++ /dev/null @@ -1,71 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - //加载一级分类 - showGrid({ - id: "parentId", - url: reqBasePath + "sysevewintype002", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - - //分类级别变化事件 - form.on('radio(typeLevel)', function (data) { - var val = data.value; - if(val == '1'){//一级分类 - $("#parentIdDiv").hide(); - }else if(val == '2'){//二级分类 - $("#parentIdDiv").show(); - } else { - winui.window.msg('状态值错误', {icon: 2, time: 2000}); - } - }); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - typeName: $("#typeName").val(), - }; - if(data.field.typeLevel == '1'){//一级分类 - params.parentId = '0'; - }else if(data.field.typeLevel == '2'){//二级分类 - if(isNull($("#parentId").val())){ - winui.window.msg('请选择一级分类', {icon: 2, time: 2000}); - return false; - } - params.parentId = $("#parentId").val(); - } else { - winui.window.msg('状态值错误', {icon: 2, time: 2000}); - return false; - } - AjaxPostUtil.request({url: reqBasePath + "sysevewintype003", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - //取消 - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/userauth/src/main/resources/template/js/syswintype/syswintypeedit.js b/userauth/src/main/resources/template/js/syswintype/syswintypeedit.js deleted file mode 100644 index 20111fca645826f6e0493cfda6fb6d85d912e648..0000000000000000000000000000000000000000 --- a/userauth/src/main/resources/template/js/syswintype/syswintypeedit.js +++ /dev/null @@ -1,89 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - AjaxPostUtil.request({url: reqBasePath + "sysevewintype004", params:{rowId: parent.rowId}, type: 'json', callback: function (json) { - $("#typeName").val(json.bean.typeName); - - if(json.bean.parentId === '0'){ - $("input:radio[name=typeLevel][value=1]").attr("checked", true); - $("#parentIdDiv").hide(); - } else { - $("input:radio[name=typeLevel][value=2]").attr("checked", true); - $("#parentIdDiv").show(); - } - - //加载一级分类 - showGrid({ - id: "parentId", - url: reqBasePath + "sysevewintype006", - params: {rowId: parent.rowId}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function(j){ - if(json.bean.parentId != '0'){ - $("#parentId").val(json.bean.parentId); - } - form.render('select'); - } - }); - - matchingLanguage(); - form.render(); - - //分类级别变化事件 - form.on('radio(typeLevel)', function (data) { - var val = data.value; - if(val == '1'){//一级分类 - $("#parentIdDiv").hide(); - }else if(val == '2'){//二级分类 - $("#parentIdDiv").show(); - } else { - winui.window.msg('状态值错误', {icon: 2, time: 2000}); - } - }); - - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - typeName: $("#typeName").val(), - rowId: parent.rowId, - }; - if(data.field.typeLevel == '1'){//一级分类 - params.parentId = '0'; - }else if(data.field.typeLevel == '2'){//二级分类 - if(isNull($("#parentId").val())){ - winui.window.msg('请选择一级分类', {icon: 2, time: 2000}); - return false; - } - params.parentId = $("#parentId").val(); - } else { - winui.window.msg('状态值错误', {icon: 2, time: 2000}); - return false; - } - - AjaxPostUtil.request({url: reqBasePath + "sysevewintype005", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - }}); - - //取消 - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/userauth/src/main/resources/template/js/syswintype/syswintypelist.js b/userauth/src/main/resources/template/js/syswintype/syswintypelist.js deleted file mode 100644 index addac481ccdccf46d9742053003ddd674973bdfd..0000000000000000000000000000000000000000 --- a/userauth/src/main/resources/template/js/syswintype/syswintypelist.js +++ /dev/null @@ -1,153 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'tableTreeDj', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - tableTree = layui.tableTreeDj; - - authBtn('1552962225700'); - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - loadTable(); - } - return false; - }); - - tableTree.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: reqBasePath + 'sysevewintype001', - where: {typeName: $("#typeName").val(), state: $("#state").val()}, - cols: [[ - { field:'name', width:300, title: '分类名称'}, - { field:'stateName', width:100, title: '状态'}, - { field:'winNum', width:100, title: '项目数量'}, - { field:'orderBy', width:100, title: '排序'}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'} - ]], - done: function(){ - matchingLanguage(); - } - }, { - keyId: 'id', - keyPid: 'pId', - title: 'name', - }); - - tableTree.getTable().on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - }else if (layEvent === 'del') { //删除 - del(data, obj); - }else if (layEvent === 'upMove') { //上移 - upMove(data); - }else if (layEvent === 'downMove') { //下移 - downMove(data); - }else if (layEvent === 'upState') { //上线 - upState(data, obj); - }else if (layEvent === 'downState') { //下线 - downState(data, obj); - } - }); - - //编辑 - function edit(data){ - rowId = data.id; - _openNewWindows({ - url: "../../tpl/syswintype/syswintypeedit.html", - title: "编辑分类", - pageId: "sysevewintypeedit", - area: ['500px', '350px'], - callBack: function(refreshCode){ - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //删除 - function del(data, obj){ - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ - layer.close(index); - AjaxPostUtil.request({url: reqBasePath + "sysevewintype007", params:{rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - //上移 - function upMove(data){ - AjaxPostUtil.request({url: reqBasePath + "sysevewintype008", params:{rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //下移 - function downMove(data){ - AjaxPostUtil.request({url: reqBasePath + "sysevewintype009", params:{rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //上线 - function upState(data, obj){ - var msg = obj ? '确认上线该分类【' + obj.data.name + '】吗?' : '确认上线选中数据吗?'; - layer.confirm(msg, { icon: 3, title: '系统分类上线操作' }, function (index) { - layer.close(index); - AjaxPostUtil.request({url: reqBasePath + "sysevewintype010", params:{rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg("上线成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - //下线 - function downState(data, obj){ - var msg = obj ? '确认下线该分类【' + obj.data.name + '】吗?' : '确认下线选中数据吗?'; - layer.confirm(msg, { icon: 3, title: '系统分类下线操作' }, function (index) { - layer.close(index); - AjaxPostUtil.request({url: reqBasePath + "sysevewintype011", params:{rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg("下线成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - //添加分类 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/syswintype/syswintypeadd.html", - title: "新增分类", - pageId: "sysevewintypeadd", - area: ['500px', '350px'], - callBack: function(refreshCode){ - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - //刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable(){ - tableTree.reload("messageTable", {where:{typeName: $("#typeName").val(), state: $("#state").val()}}); - } - - exports('syswintypelist', {}); -}); diff --git a/userauth/src/main/resources/template/tpl/appstore/firsttypeTemplate.tpl b/userauth/src/main/resources/template/tpl/appstore/firsttypeTemplate.tpl deleted file mode 100644 index 7ee503c2bd145db391fd6bc2c30a32b2fe03fc74..0000000000000000000000000000000000000000 --- a/userauth/src/main/resources/template/tpl/appstore/firsttypeTemplate.tpl +++ /dev/null @@ -1,4 +0,0 @@ -
{{sysName}}
-