|
@@ -9,7 +9,7 @@
|
|
|
<!-- <el-button type="primary" :icon="Refresh" @click="resetFilterAndRefreshTableList">刷新</el-button> -->
|
|
|
<el-button type="primary" :icon="Box" @click="doBatchRollback" v-if="showBatchListing">批量打回</el-button>
|
|
|
<el-button type="primary" :icon="Box" @click="doBatchListing" v-if="showBatchListing">批量上线</el-button>
|
|
|
- <el-button type="primary" :icon="Box" @click="doUnBatchListing" v-if="showBatchListing">批量下线</el-button>
|
|
|
+ <el-button type="primary" :icon="Box" @click="doUnBatchListing" v-if="showBatchListing">批量下架</el-button>
|
|
|
</el-button-group>
|
|
|
</el-space>
|
|
|
<el-space class="action-bar-item-container action-bar-action-right">
|
|
@@ -59,9 +59,9 @@
|
|
|
<el-main>
|
|
|
<el-table ref="spiderTable" :data="listState.list" stripe :row-style="getRowStyle" @selection-change="handleSelectionChange" v-loading="listState.loading">
|
|
|
<el-table-column type="selection" width="55" :selectable="tableRowSelectable" v-if="isAdmin" />
|
|
|
- <el-table-column prop="site" label="网站" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="channel" label="栏目" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="code" label="代码" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="site" label="网站" align="left" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="channel" label="栏目" align="left" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="code" label="代码" align="left" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="stateText" label="爬虫状态" width="80" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="claimText" label="认领状态" width="100" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="href" label="栏目地址" show-overflow-tooltip></el-table-column>
|
|
@@ -94,9 +94,9 @@
|
|
|
<template #default="scope">
|
|
|
<!-- 管理员:上线和退回 -->
|
|
|
<template v-if="tableActionShow.adminGroup(scope.row)">
|
|
|
- <el-tooltip content="下线" placement="top" v-if="tableActionShow.downCode(scope.row)">
|
|
|
+ <el-tooltip content="下架" placement="top" v-if="tableActionShow.downCode(scope.row)">
|
|
|
<el-button size="small" :class="{ active: scope.row._action_clicked_down_code }" :disabled="actionButtonDisabled.adminDownCode(scope.row)" @click="tableEvents.adminDownCode(scope.$index, scope.row)">
|
|
|
- <el-icon><Download /></el-icon>
|
|
|
+ <el-icon><CircleCloseFilled /></el-icon>
|
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip content="上线" placement="top" v-if="tableActionShow.adminSubmit(scope.row)">
|
|
@@ -116,8 +116,8 @@
|
|
|
<el-icon><CircleCheck /></el-icon>
|
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip content="打回" placement="top">
|
|
|
- <el-button size="small" :class="{ active: scope.row._action_clicked_rollback }" :disabled="actionButtonDisabled.reviewerRollback(scope.row)" @click="tableEvents.reviewerRollback(scope.$index, scope.row)">
|
|
|
+ <el-tooltip content="打回" placement="top" v-if="!actionButtonDisabled.reviewerRollback(scope.row)">
|
|
|
+ <el-button size="small" :class="{ active: scope.row._action_clicked_rollback }" @click="tableEvents.reviewerRollback(scope.$index, scope.row)">
|
|
|
<el-icon><CircleClose /></el-icon>
|
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
@@ -460,9 +460,9 @@ const openEditDialog = (row) => {
|
|
|
// 操作按钮组的显示隐藏控制
|
|
|
const tableActionShow = {
|
|
|
reviewerGroup(row) {
|
|
|
- // 已通过、已下线和已上线的不展示
|
|
|
+ // 已通过、已下架和已上线的不展示
|
|
|
const canOnline = row.state === 3 // 已通过
|
|
|
- const alreadyOffline = row.state === 6 // 已下线
|
|
|
+ const alreadyOffline = row.state === 6 // 已下架
|
|
|
const alreadyOnline = row.state === 11 // 已上线
|
|
|
const pass = canOnline || alreadyOffline || alreadyOnline
|
|
|
return !pass
|
|
@@ -475,12 +475,12 @@ const tableActionShow = {
|
|
|
}
|
|
|
},
|
|
|
adminSubmit(row) {
|
|
|
- // 只有审核通过或者下线的才能上线,否则不展示
|
|
|
+ // 只有审核通过或者下架的才能上线,否则不展示
|
|
|
const canOnline = row.state === 3 || row.state === 6
|
|
|
return canOnline
|
|
|
},
|
|
|
downCode(row) {
|
|
|
- // 下线按钮,只有已上线爬虫展示
|
|
|
+ // 下架按钮,只有已上线爬虫展示
|
|
|
return row.state === 11
|
|
|
},
|
|
|
adminRollback(row) {
|
|
@@ -698,7 +698,7 @@ const tableEvents = {
|
|
|
})
|
|
|
},
|
|
|
// 上线和批量上线操作 stateText=up
|
|
|
- // 下线和批量下线操作 stateText=down
|
|
|
+ // 下架和批量下架操作 stateText=down
|
|
|
batchListing(list = [], stateText = 'up') {
|
|
|
const stateMap = {
|
|
|
up: {
|
|
@@ -707,7 +707,7 @@ const tableEvents = {
|
|
|
},
|
|
|
down: {
|
|
|
code: 6,
|
|
|
- text: '下线',
|
|
|
+ text: '下架',
|
|
|
},
|
|
|
}
|
|
|
const stateInfo = stateMap[stateText]
|
|
@@ -807,10 +807,10 @@ const tableEvents = {
|
|
|
this.batchListing([row], 'up')
|
|
|
})
|
|
|
},
|
|
|
- // 管理控制下线
|
|
|
+ // 管理控制下架
|
|
|
adminDownCode(_, row) {
|
|
|
onlyClickHighlight(row, '_action_clicked_down_code')
|
|
|
- ElMessageBox.confirm('确认下线?', '提示',
|
|
|
+ ElMessageBox.confirm('确认下架?', '提示',
|
|
|
{
|
|
|
customClass: 'j-confirm-message-box',
|
|
|
type: 'warning',
|
|
@@ -857,7 +857,7 @@ const toggleRow = (rowList = []) => {
|
|
|
}
|
|
|
|
|
|
const tableRowSelectable = (row) => {
|
|
|
- // 待审核(管理员的批量打回)、已通过(管理员的批量上线)、已下架的批量上线或者已上线(管理员的批量下线)的才能选
|
|
|
+ // 待审核(管理员的批量打回)、已通过(管理员的批量上线)、已下架的批量上线或者已上线(管理员的批量下架)的才能选
|
|
|
return row.state === 1 || row.state === 3 || row.state === 6 || row.state === 11
|
|
|
}
|
|
|
|
|
@@ -912,7 +912,7 @@ const confirmBatchListing = () => {
|
|
|
toggleRow(dropList)
|
|
|
if (list.length <= 0) {
|
|
|
return ElMessage({
|
|
|
- message: '至少要选中1条有效数据: 当前未选中已通过或已下线爬虫',
|
|
|
+ message: '至少要选中1条有效数据: 当前未选中已通过或已下架爬虫',
|
|
|
type: 'error',
|
|
|
duration: 3000,
|
|
|
})
|
|
@@ -934,7 +934,7 @@ const doBatchListing = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 执行批量下线操作
|
|
|
+// 执行批量下架操作
|
|
|
const confirmBatchUnListing = () => {
|
|
|
// 过滤一下,找到已上线爬虫,仅提交此类爬虫
|
|
|
const list = listState.selected.filter(v => v.state === 11)
|
|
@@ -950,7 +950,7 @@ const confirmBatchUnListing = () => {
|
|
|
tableEvents.batchListing(list, 'down')
|
|
|
}
|
|
|
const doUnBatchListing = () => {
|
|
|
- ElMessageBox.confirm('确认批量下线?', '提示',
|
|
|
+ ElMessageBox.confirm('确认批量下架?', '提示',
|
|
|
{
|
|
|
customClass: 'j-confirm-message-box',
|
|
|
type: 'warning',
|