From a12f4ec3ac597f5daa53ec43b2c02c1db51bc78a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E6=99=AF=E9=98=B3?= <1656488874@qq.com>
Date: Mon, 30 Sep 2019 14:44:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=88=AC=E8=99=AB=E5=88=97?=
=?UTF-8?q?=E4=B8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/spider/SpiderList.vue | 37 +++++++++++++++---------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/frontend/src/views/spider/SpiderList.vue b/frontend/src/views/spider/SpiderList.vue
index 63e0a817..5b93afb4 100644
--- a/frontend/src/views/spider/SpiderList.vue
+++ b/frontend/src/views/spider/SpiderList.vue
@@ -109,9 +109,18 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -239,7 +248,7 @@ import {
import dayjs from 'dayjs'
import CrawlConfirmDialog from '../../components/Common/CrawlConfirmDialog'
import StatusTag from '../../components/Status/StatusTag'
-
+import request from '../../api/request'
export default {
name: 'SpiderList',
components: {
@@ -262,18 +271,17 @@ export default {
crawlConfirmDialogVisible: false,
activeSpiderId: undefined,
filter: {
- keyword: ''
+ keyword: '',
+ type: ''
},
+ types: [],
// tableData,
columns: [
- { name: 'name', label: 'Name', width: '160', align: 'left' },
- // { name: 'site_name', label: 'Site', width: '140', align: 'left' },
+ { name: 'display_name', label: 'Name', width: '160', align: 'left' },
{ name: 'type', label: 'Spider Type', width: '120' },
- // { name: 'cmd', label: 'Command Line', width: '200' },
{ name: 'last_status', label: 'Last Status', width: '120' },
{ name: 'last_run_ts', label: 'Last Run', width: '140' },
- { name: 'create_ts', label: 'Create Time', width: '140' },
- { name: 'update_ts', label: 'Update Time', width: '140' },
+ // { name: 'update_ts', label: 'Update Time', width: '140' },
{ name: 'remark', label: 'Remark', width: '140' }
],
spiderFormRules: {
@@ -485,12 +493,15 @@ export default {
keyword: this.filter.keyword
}
this.$store.dispatch('spider/getSpiderList', params)
+ },
+ getTypes () {
+ request.get(`/spider/types`).then(resp => {
+ console.log('resp', resp)
+ })
}
},
created () {
- // take site from params to filter
- this.$store.commit('spider/SET_FILTER_SITE', this.$route.params.domain)
-
+ this.getTypes()
// fetch spider list
this.getList()
},