mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-25 17:42:25 +01:00
加入复制爬虫
This commit is contained in:
@@ -290,6 +290,15 @@
|
||||
/>
|
||||
<!--./crawl confirm dialog-->
|
||||
|
||||
<!--copy dialog-->
|
||||
<copy-spider-dialog
|
||||
:visible="copyDialogVisible"
|
||||
:spider-id="activeSpiderId"
|
||||
@close="copyDialogVisible = false"
|
||||
@confirm="onCopyConfirm"
|
||||
/>
|
||||
<!--./copy dialog-->
|
||||
|
||||
<el-card style="border-radius: 0">
|
||||
<!--filter-->
|
||||
<div class="filter">
|
||||
@@ -566,7 +575,7 @@
|
||||
>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column :label="$t('Action')" align="left" fixed="right" min-width="170px">
|
||||
<el-table-column :label="$t('Action')" align="left" fixed="right" min-width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :content="$t('View')" placement="top">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini"
|
||||
@@ -576,6 +585,14 @@
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini"
|
||||
@click="onRemove(scope.row, $event)"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="$t('Copy')" placement="top">
|
||||
<el-button
|
||||
type="info"
|
||||
icon="el-icon-copy-document"
|
||||
size="mini"
|
||||
@click="onCopy(scope.row, $event)"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip v-if="!isShowRun(scope.row)" :content="$t('No command line')" placement="top">
|
||||
<el-button disabled type="success" icon="fa fa-bug" size="mini"
|
||||
@click="onCrawl(scope.row, $event)"></el-button>
|
||||
@@ -619,10 +636,12 @@ import dayjs from 'dayjs'
|
||||
import CrawlConfirmDialog from '../../components/Common/CrawlConfirmDialog'
|
||||
import StatusTag from '../../components/Status/StatusTag'
|
||||
import StatusLegend from '../../components/Status/StatusLegend'
|
||||
import CopySpiderDialog from '../../components/Spider/CopySpiderDialog'
|
||||
|
||||
export default {
|
||||
name: 'SpiderList',
|
||||
components: {
|
||||
CopySpiderDialog,
|
||||
StatusLegend,
|
||||
CrawlConfirmDialog,
|
||||
StatusTag
|
||||
@@ -784,7 +803,8 @@ export default {
|
||||
selectedSpiders: [],
|
||||
isStopLoading: false,
|
||||
isRemoveLoading: false,
|
||||
isMultiple: false
|
||||
isMultiple: false,
|
||||
copyDialogVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -966,6 +986,17 @@ export default {
|
||||
this.getList()
|
||||
}, 1000)
|
||||
},
|
||||
onCopy (row, ev) {
|
||||
ev.stopPropagation()
|
||||
this.copyDialogVisible = true
|
||||
this.activeSpiderId = row._id
|
||||
this.$st.sendEv('爬虫列表', '点击复制')
|
||||
},
|
||||
onCopyConfirm () {
|
||||
setTimeout(() => {
|
||||
this.getList()
|
||||
}, 1000)
|
||||
},
|
||||
onView (row, ev) {
|
||||
ev.stopPropagation()
|
||||
this.$router.push('/spiders/' + row._id)
|
||||
|
||||
Reference in New Issue
Block a user