Commit 5acf2840 by 潘建波

feat 任务设置增加10条分页,增加滚动控制修改任务后滚动条还在当前的位置

1 parent 0bb93399
......@@ -8,7 +8,7 @@
"test:unit": "vue-cli-service test:unit",
"lint": "vue-cli-service lint",
"analyzer": "cross-env use_analyzer=true npm run serve",
"commit": "git add . && git-cz"
"commit": "git-cz"
},
"dependencies": {
"@svgdotjs/svg.js": "^3.0.16",
......@@ -90,5 +90,10 @@
"browserslist": [
"> 1%",
"last 2 versions"
]
],
"config":{
"commitizen":{
"path":"./node_modules/cz-conventional-changelog"
}
}
}
......@@ -166,6 +166,7 @@ export default {
priority: "normal",
period: true
},
pedittype:"add",
vchanAry: [],
platT: [],
sessionData: {},
......@@ -187,10 +188,6 @@ export default {
};
},
props: {
pedittype: {
type: String,
default: "add"
},
freeList: {
type: Array,
// eslint-disable-next-line vue/require-valid-default-prop
......@@ -205,12 +202,13 @@ export default {
var freeArr = [];
this.freeList.forEach(ele => {
if (ele.license_info && ele.license_info.platType) {
this.platT.set(ele.license_info.platType);
this.platT.push(ele.license_info.platType);
}
});
}
},
initData(type, pdata) {
this.pedittype = type;
this.platT = [];
this.setvisible = true;
if (type == "add") {
......@@ -229,6 +227,7 @@ export default {
};
}
if (type == "edit") {
this.pedittype = type;
if (pdata.start_time) {
let startT = pdata.start_time;
let endT = pdata.end_time;
......
......@@ -234,9 +234,10 @@
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="[10, 30, 50, 100, 200]"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
:page-size="30"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:total="total"
......@@ -283,7 +284,8 @@ export default {
subTaskData: [],
pedittype: "add",
currentRow: {},
assign_ip: ""
assign_ip: "",
curscrollTop:0
};
},
components: {
......@@ -408,6 +410,7 @@ export default {
},
query() {
this.page = 1;
this.curscrollTop = 0;
this.getTaskList();
},
getTaskList() {
......@@ -448,14 +451,23 @@ export default {
}
});
this.tableData = res.list_data;
this.$nextTick(() => {
this.$refs.table.$el.children[2].scrollTop = this.curscrollTop;
});
}
})
.catch(error => {});
},
editVideo(index, row) {
this.setsSrollTop();
this.$refs.editvideo.showModal(row);
},
editTask(type, index, row) {
if(type === "add") {
this.curscrollTop = 0;
} else {
this.setsSrollTop();
}
this.$refs.editset.initData(type, row);
this.pedittype = type;
this.$nextTick(() => {
......@@ -463,6 +475,7 @@ export default {
});
},
setTaskStatus(data, type) {
this.setsSrollTop();
if (data.status == "NotInTimeOfDay") {
return;
}
......@@ -494,12 +507,16 @@ export default {
}
});
});
},
setsSrollTop() {
this.curscrollTop = this.$refs.table.$el.children[2].scrollTop;
}
},
mounted() {
this.getTaskList();
},
created() {
this.curscrollTop = 0;
this.getFreelist();
}
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!