|
@@ -566,6 +566,9 @@ function renderColSet(pageSetList){
|
|
|
}
|
|
|
$("#mainBox .colSetBox .cloInfo", parent.document).html(infoStr)
|
|
|
|
|
|
+ $(".colTabInfoBox", parent.document).scrollTop(scrollTop)
|
|
|
+ scrollTop = 0
|
|
|
+
|
|
|
bindSelectCol()
|
|
|
bindColOrder()
|
|
|
bindSaveColSet()
|
|
@@ -591,6 +594,7 @@ function bindSelectCol(){
|
|
|
$(".toggleSelectCol", parent.document ).off("click").on("click", function(){
|
|
|
const index = $(this).parent().attr("data-index")
|
|
|
pageSetCopy[index].status = pageSetCopy[index].status == 1 ? 0 : 1
|
|
|
+ scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
|
|
|
renderColSet(pageSetCopy)
|
|
|
|
|
|
})
|
|
@@ -604,6 +608,7 @@ function bindSelectCol(){
|
|
|
pageSetCopy[i].status = 1
|
|
|
}
|
|
|
}
|
|
|
+ scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
|
|
|
renderColSet(pageSetCopy)
|
|
|
|
|
|
})
|
|
@@ -623,15 +628,23 @@ function bindCloseColSet(){
|
|
|
}
|
|
|
function bindSaveColSet(){
|
|
|
$(".saveColSet", parent.document ).off("click").on("click", function(){
|
|
|
+ let showNumSet = 0
|
|
|
let sysUserPagesetVOList = []
|
|
|
for(let i = 0; i < pageSetCopy.length; i++){
|
|
|
const item = pageSetCopy[i]
|
|
|
- sysUserPagesetVOList.push({
|
|
|
- name: item.name,
|
|
|
- orderNo: i,
|
|
|
- status: item.status,
|
|
|
- val: item.val
|
|
|
- })
|
|
|
+ sysUserPagesetVOList.push({
|
|
|
+ name: item.name,
|
|
|
+ orderNo: i,
|
|
|
+ status: item.status,
|
|
|
+ val: item.val
|
|
|
+ })
|
|
|
+ if(item.status == 1){
|
|
|
+ showNumSet++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(showNumSet === 0){
|
|
|
+ $.alerModal({"message":'最低显示1列',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ return
|
|
|
}
|
|
|
return post(api.saveQcListPageSet,{pageType:1,sysUserPagesetVOList:sysUserPagesetVOList}).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
@@ -659,6 +672,7 @@ function bindColOrder(){
|
|
|
const upItem = pageSetCopy[index]
|
|
|
const upItemPre = pageSetCopy[index-1]
|
|
|
pageSetCopy.splice(index-1,2,upItem,upItemPre)
|
|
|
+ scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
|
|
|
renderColSet(pageSetCopy)
|
|
|
|
|
|
}else{
|
|
@@ -674,6 +688,7 @@ function bindColOrder(){
|
|
|
const downItemBack = pageSetCopy[index + 1]
|
|
|
console.log('downItem',downItem,'downItemBack',downItemBack)
|
|
|
pageSetCopy.splice(index,2,downItemBack,downItem)
|
|
|
+ scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
|
|
|
renderColSet(pageSetCopy)
|
|
|
}
|
|
|
})
|