...
|
...
|
@@ -24,6 +24,14 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
* hash变更
|
|
|
*/
|
|
|
hashChane: function () {
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
window.onload = function (){
|
|
|
// 绑定事件
|
|
|
that.bindElemClickEvent();
|
|
|
}
|
|
|
|
|
|
// debugger
|
|
|
var hash = window.top.location.hash;
|
|
|
sessionStorage.setItem("pagePath", hash);
|
...
|
...
|
@@ -82,14 +90,6 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
},
|
|
|
|
|
|
ajaxSetupInit: function () {
|
|
|
let that = this;
|
|
|
setTimeout(function () {
|
|
|
// 绑定菜单点击事件
|
|
|
that.bindMenuClickEvent();
|
|
|
// 绑定元素点击事件
|
|
|
that.bindElemClickEvent();
|
|
|
console.log("日志事件注册完成!")
|
|
|
}, 500)
|
|
|
|
|
|
// sessionStorage.setItem("batchNo", "");
|
|
|
// sessionStorage.setItem("groupId", "");
|
...
|
...
|
@@ -145,13 +145,13 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
var that = this;
|
|
|
|
|
|
// 绑定菜单事件
|
|
|
// setTimeout(function () {
|
|
|
// // 绑定菜单点击事件
|
|
|
// that.bindMenuClickEvent();
|
|
|
// // 绑定元素点击事件
|
|
|
// that.bindElemClickEvent();
|
|
|
// console.log("日志事件注册完成!")
|
|
|
// }, 500)
|
|
|
setTimeout(function () {
|
|
|
// 绑定菜单点击事件
|
|
|
that.bindMenuClickEvent();
|
|
|
// 绑定元素点击事件
|
|
|
that.bindElemClickEvent();
|
|
|
// console.log("日志事件注册完成!")
|
|
|
}, 500)
|
|
|
|
|
|
//lsq给带有title的元素绑定点击事件复制元素内容 2022-09-05
|
|
|
that.copyTitle();
|
...
|
...
|
@@ -290,6 +290,10 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
}
|
|
|
//菜单点击传入属性lay-href的值,普通元素传入当前页面路由
|
|
|
if (flg) {
|
|
|
// 清空按钮名称
|
|
|
sessionStorage.setItem("buttonPath", "");
|
|
|
sessionStorage.setItem("buttonName", "");
|
|
|
|
|
|
//that.sendAjaxData(layHref, text)
|
|
|
sessionStorage.setItem("menuName", text);
|
|
|
sessionStorage.setItem("menuPath", layHref);
|
...
|
...
|
@@ -312,7 +316,6 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
*/
|
|
|
clickEventHandle(thisObj, key) {
|
|
|
let that = this;
|
|
|
// debugger
|
|
|
sessionStorage.setItem("groupId",window.generateUUID().replace(/-/g, ""));
|
|
|
|
|
|
let layHref = thisObj.attr('lay-href') ? thisObj.attr('lay-href') : '';
|
...
|
...
|
@@ -357,12 +360,12 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
// }))
|
|
|
// }
|
|
|
setTimeout(function (){
|
|
|
console.log(`${item}元素点击事件绑定完成!`)
|
|
|
// console.log(`${item}元素点击事件绑定完成!`)
|
|
|
$(item).unbind('click.handle').on('click.handle', (function (e) {
|
|
|
e.preventDefault();
|
|
|
that.clickEventHandle($(this), item)
|
|
|
}))
|
|
|
},300)
|
|
|
},500)
|
|
|
})
|
|
|
},
|
|
|
/**
|
...
|
...
|
@@ -425,7 +428,7 @@ layui.define(['element', 'admin', 'view'], function (exports) { |
|
|
if (val.indexOf('el::') != -1) {
|
|
|
let elName = val.replace('el::', '');
|
|
|
bindContextEvent(elName, 0);
|
|
|
console.log(`${elName}元素右键提示绑定完成!`)
|
|
|
// console.log(`${elName}元素右键提示绑定完成!`)
|
|
|
}
|
|
|
})
|
|
|
}, 300)
|
...
|
...
|
|