Commit 48d95e07 by 前端

1

1 parent f89d627b
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
background-color: var(--btnBlue) !important; background-color: var(--btnBlue) !important;
color: #fff !important; color: #fff !important;
} */ } */
.layui-form-checked > span:first-child { #accountTypeElRole .layui-form-checked > span:first-child {
background-color: var(--btnBlue) !important; background-color: var(--btnBlue) !important;
color: #fff !important; color: #fff !important;
} }
...@@ -921,42 +921,46 @@ attachScrollListener(); ...@@ -921,42 +921,46 @@ attachScrollListener();
// 定义一个防抖版本的 prepareExecuteFindMenuFun // 定义一个防抖版本的 prepareExecuteFindMenuFun
var debouncedPrepareExecuteFindMenuFun = debounce(prepareExecuteFindMenuFun, 800); // 800ms 作为防抖时间 var debouncedPrepareExecuteFindMenuFun = debounce(prepareExecuteFindMenuFun, 800); // 800ms 作为防抖时间
form.on('checkbox', function(data) { form.on('checkbox', function(data) {
// 检查复选框的name是否以 "accountType[" 开头
if (data.elem.name.startsWith('accountType[')) {
var selectedValues = []; var selectedValues = [];
// 收集选中的账户类型值
$('#accountTypeElRole .accounttypeId').each(function() { $('#accountTypeElRole .accounttypeId').each(function() {
if (this.checked) { if (this.checked) {
selectedValues.push($(this).val()); selectedValues.push($(this).val());
} }
}); });
// console.log("选中的账户类型值: ", selectedValues);
if (selectedValues.length === 0) { if (selectedValues.length === 0) {
layer.msg('账户类型不能为空', { icon: 5, anim: 6 }); layer.msg('账户类型不能为空', { icon: 5, anim: 6 });
$('#accountTypeElRole .accounttypeId').each(function() { $('#accountTypeElRole .accounttypeId').each(function() {
if (this.value == _currentaccountType) { if (this.value == _currentaccountType) {
this.checked = true this.checked = true;
$(this).next('div').addClass('layui-form-checked'); $(this).next('div').addClass('layui-form-checked');
} }
}); });
return return;
} }
_currentaccountType =selectedValues _currentaccountType = selectedValues;
// !selectedValues? _currentaccountType :selectedValues
// 检查触发事件的元素是否不是以"project"为前缀的id的元素的一部分 // 检查是否不是以 "project" 为前缀的id的元素的一部分
if (!$(data.elem).closest('[id^=project]').length) { if (!$(data.elem).closest('[id^=project]').length) {
// 只有当点击的复选框未被禁用,且不是"project"相关的复选框时,执行后续操作
if (!data.elem.disabled) { if (!data.elem.disabled) {
clearRoleAuthTabContent(); clearRoleAuthTabContent();
debouncedPrepareExecuteFindMenuFun() debouncedPrepareExecuteFindMenuFun();
}
} }
} }
}); });
function prepareExecuteFindMenuFun(){ function prepareExecuteFindMenuFun(){
// 修改check_arr // 修改check_arr
console.log('zheli')
if(_currentMerchantLevel != '1' && !_superMerchantInfo) return if(_currentMerchantLevel != '1' && !_superMerchantInfo) return
var rolePageParams = {} var rolePageParams = {}
if(_currentMerchantLevel != '1'){ if(_currentMerchantLevel != '1'){
...@@ -2574,6 +2578,7 @@ loadSuperiorMerchants(currentPage).then(function(list) { ...@@ -2574,6 +2578,7 @@ loadSuperiorMerchants(currentPage).then(function(list) {
} }
// 查询商户的菜单权限树 // 查询商户的菜单权限树
function findMenuFunTreeByMerId(rolePageParams) { function findMenuFunTreeByMerId(rolePageParams) {
console.log('?')
var params = {} var params = {}
if(rolePageParams){ if(rolePageParams){
params = rolePageParams params = rolePageParams
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!