修改爬虫状态回显问题
This commit is contained in:
parent
b45651c803
commit
35e785705e
|
@ -236,10 +236,11 @@ const openDialog = (row) => {
|
|||
state.isShowDialog = true;
|
||||
}
|
||||
const getDate = () => {
|
||||
getList(1, 10, { disasterId: state.data.disasterId }).then(res => {
|
||||
getList(1, 9999, { disasterId: state.data.disasterId }).then(res => {
|
||||
let data = res.records;
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
const element = data[index];
|
||||
|
||||
if (element.type == 2) {
|
||||
state.baidu = element;
|
||||
}
|
||||
|
@ -310,12 +311,12 @@ const start = (text) => {
|
|||
if(text =='baidu' || text == 'bing'){
|
||||
news(ret[0].disasterId, keywords, page, (text == "baidu"), ret[0].id).then(res => {
|
||||
ElMessage.success("Data is being acquired!")
|
||||
getData();
|
||||
getDate();
|
||||
})
|
||||
}else if(text == 'twitter'){
|
||||
twitter(ret[0].disasterId,keywords,state.twitter.date[0],state.twitter.date[1],ret[0].id).then(res=>{
|
||||
ElMessage.success("Data is being acquired!")
|
||||
getData();
|
||||
getDate();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue