Commit 5371a058 by mushishixian

fix

parent 43f011ed
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
//点击罗盘筛选 //点击罗盘筛选
$('.main_filter').click(function () { $('.main_filter').click(function () {
$('.main_filter').attr('class', 'main_filter'); clearTypeFilter();
$('.status_filter').attr('class', 'status_filter');
$(this).attr('class', 'main_filter layui-badge layui-bg-green'); $(this).attr('class', 'main_filter layui-badge layui-bg-green');
type = $(this).attr('id'); type = $(this).attr('id');
whereCondition.source_type = type whereCondition.source_type = type
...@@ -26,12 +25,13 @@ ...@@ -26,12 +25,13 @@
} }
, where: whereCondition , where: whereCondition
}); });
// $('#status').val('');
// form.render('select')
}); });
//多加了个区分根据状态去筛选 //多加了个区分根据状态去筛选
$('.status_filter').click(function () { $('.status_filter').click(function () {
$('.main_filter').attr('class', 'main_filter'); clearTypeFilter();
$('.status_filter').attr('class', 'status_filter');
$(this).attr('class', 'status_filter layui-badge layui-bg-green'); $(this).attr('class', 'status_filter layui-badge layui-bg-green');
type = $(this).attr('id'); type = $(this).attr('id');
whereCondition.source_type = type whereCondition.source_type = type
...@@ -419,6 +419,10 @@ ...@@ -419,6 +419,10 @@
//点击查询按钮 //点击查询按钮
form.on('submit(load)', function (data) { form.on('submit(load)', function (data) {
//罗盘选项会跳回全部
clearTypeFilter();
$('#all').attr('class', 'status_filter layui-badge layui-bg-green');
whereCondition.source_type = 'all';
initCondition.source_type = whereCondition.source_type; initCondition.source_type = whereCondition.source_type;
whereCondition = $.extend(false, initCondition, data.field); whereCondition = $.extend(false, initCondition, data.field);
//执行重载 //执行重载
...@@ -450,4 +454,9 @@ ...@@ -450,4 +454,9 @@
return ''; return '';
} }
} }
function clearTypeFilter() {
$('.main_filter').attr('class', 'main_filter');
$('.status_filter').attr('class', 'status_filter');
}
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment