mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
fix 前端报错的问题
This commit is contained in:
@@ -25,15 +25,7 @@ const mutations = {
|
||||
const { id, systemInfo } = payload
|
||||
for (let i = 0; i < state.nodeList.length; i++) {
|
||||
if (state.nodeList[i]._id === id) {
|
||||
// Vue.set(state.nodeList[i], 'systemInfo', {})
|
||||
state.nodeList[i].systemInfo = systemInfo
|
||||
// for (const key in systemInfo) {
|
||||
// if (systemInfo.hasOwnProperty(key)) {
|
||||
// console.log(key)
|
||||
// state.nodeList[i].systemInfo[key] = systemInfo[key]
|
||||
// // Vue.set(state.nodeList[i].systemInfo, key, systemInfo[key])
|
||||
// }
|
||||
// }
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -76,10 +68,12 @@ const actions = {
|
||||
getTaskList ({ state, commit }, id) {
|
||||
return request.get(`/nodes/${id}/tasks`)
|
||||
.then(response => {
|
||||
commit('task/SET_TASK_LIST',
|
||||
response.data.data.map(d => d)
|
||||
.sort((a, b) => a.create_ts < b.create_ts ? 1 : -1),
|
||||
{ root: true })
|
||||
if (response.data.data) {
|
||||
commit('task/SET_TASK_LIST',
|
||||
response.data.data.map(d => d)
|
||||
.sort((a, b) => a.create_ts < b.create_ts ? 1 : -1),
|
||||
{ root: true })
|
||||
}
|
||||
})
|
||||
},
|
||||
getNodeSystemInfo ({ state, commit }, id) {
|
||||
|
||||
Reference in New Issue
Block a user