feat: 页面以子页面打卡时使用弹框方式增加和编辑

This commit is contained in:
augushong
2025-11-12 18:29:09 +08:00
parent 9b91b2507c
commit 17a024de12

View File

@@ -388,15 +388,13 @@
admin.api.copyText('[lay-id=' + options.id + ']');
};
/**
* 为空时认为自己是普通状态,否则是单选、多选、子页面,此时添加等默认行为走弹框而不是新标签页
*/
selectMode = admin.getQueryVariable("select_mode");
selectConfirmCallback = admin.getQueryVariable('select_confirm_callback', 'onTableDataConfirm');
if (selectMode == 'checkbox') {
if (options.cols[0][0].type == 'radio') {
options.cols[0][0].type = 'checkbox';
@@ -415,7 +413,12 @@
});
}
} else {
if(!admin.isParentIndex()){
selectMode = 'childPage'
}
}
// 判断元素对象是否有嵌套的
options.cols = admin.table.formatCols(options.cols, options.init);
@@ -3147,6 +3150,16 @@
}
return false;
},
isParentIndex(){
try {
if (window.parent && window.parent.pageType && window.parent.pageType == 'index') {
return true;
}
} catch (e) {
return false;
}
return false;
},
findIndexPage(findCallback, missCallback) {
if (!findCallback) {
findCallback = function (w) { return w; };