|
@@ -1,7 +1,5 @@
|
|
<template>
|
|
<template>
|
|
-
|
|
|
|
- <Navigator pageTitle="首页"></Navigator>
|
|
|
|
-
|
|
|
|
|
|
+ <Navigator pageTitle="爬虫列表"></Navigator>
|
|
<div class="space"></div>
|
|
<div class="space"></div>
|
|
<el-card>
|
|
<el-card>
|
|
<el-header style="text-align: center;">
|
|
<el-header style="text-align: center;">
|
|
@@ -50,8 +48,6 @@
|
|
<el-table-column prop="channel" label="栏目" width="90" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="channel" label="栏目" width="90" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="url" label="栏目地址" width="90" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="url" label="栏目地址" width="90" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="author" label="开发者" width="90" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="author" label="开发者" width="90" show-overflow-tooltip></el-table-column>
|
|
- <el-table-column prop="listItemCss" label="列表CSS选择器" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column prop="titleCss" label="详情CSS选择器" show-overflow-tooltip></el-table-column>
|
|
|
|
<el-table-column align="right">
|
|
<el-table-column align="right">
|
|
<template #header>
|
|
<template #header>
|
|
<el-input v-model="search" size="small" placeholder="按照代码过滤" />
|
|
<el-input v-model="search" size="small" placeholder="按照代码过滤" />
|
|
@@ -75,22 +71,23 @@
|
|
</el-card>
|
|
</el-card>
|
|
<InsertSpider ref="insertSpiderDialog" :onSubmit="onInsertSpiderOk"></InsertSpider>
|
|
<InsertSpider ref="insertSpiderDialog" :onSubmit="onInsertSpiderOk"></InsertSpider>
|
|
<EditSpider ref="editSpiderDialog" @custom-event="dialogEvents.editSpiderConfigSaveEvent" />
|
|
<EditSpider ref="editSpiderDialog" @custom-event="dialogEvents.editSpiderConfigSaveEvent" />
|
|
- <!-- <Login ref="loginDialog" @login-event="dialogEvents.loginEvent" /> -->
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, onMounted, onUnmounted } from 'vue'
|
|
|
|
|
|
+import { ref, computed, onMounted, onUnmounted } from 'vue'
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
|
+import { useStore } from 'vuex';
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { BrowserOpenURL, EventsOn } from "../../wailsjs/runtime"
|
|
import { BrowserOpenURL, EventsOn } from "../../wailsjs/runtime"
|
|
import { LoadSpiderConfigAll, SaveOrUpdateSpiderConfig } from "../../wailsjs/go/main/App"
|
|
import { LoadSpiderConfigAll, SaveOrUpdateSpiderConfig } from "../../wailsjs/go/main/App"
|
|
-import { GetLoginState, PutLoginState } from "../../wailsjs/go/main/App"
|
|
|
|
|
|
+import { GetLoginState, PutLoginState, ServerActionCheckLogin } from "../../wailsjs/go/main/App"
|
|
import { ImportSpiderConfigByExcelFile, SwitchSpiderConfig, DeleteSpiderConfig, SelectOpenFilePath } from "../../wailsjs/go/main/App"
|
|
import { ImportSpiderConfigByExcelFile, SwitchSpiderConfig, DeleteSpiderConfig, SelectOpenFilePath } from "../../wailsjs/go/main/App"
|
|
import Navigator from "../components/Navigator.vue"
|
|
import Navigator from "../components/Navigator.vue"
|
|
import InsertSpider from "../components/InsertSpider.vue"
|
|
import InsertSpider from "../components/InsertSpider.vue"
|
|
import EditSpider from "../components/EditSpider.vue"
|
|
import EditSpider from "../components/EditSpider.vue"
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
+const store = useStore();
|
|
const spiderTable = ref(null)
|
|
const spiderTable = ref(null)
|
|
|
|
|
|
const tableData = ref([
|
|
const tableData = ref([
|
|
@@ -313,18 +310,24 @@ const handleSave = () => {
|
|
duration: 3000,
|
|
duration: 3000,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// const listState = computed(() => store.state.rulesList.listState)
|
|
|
|
+
|
|
|
|
+const getTableList = async () => {
|
|
|
|
+ console.log('getlist')
|
|
|
|
+ // const r = await store.dispatch('rulesList/getCodeList', {
|
|
|
|
+ // modifyuser: 'lyf', // 维护人
|
|
|
|
+ // state: -1, // 爬虫状态
|
|
|
|
+ // search: '', // 搜索内容
|
|
|
|
+ // });
|
|
|
|
+ // console.log(r)
|
|
|
|
+}
|
|
|
|
+getTableList()
|
|
|
|
+
|
|
//快捷键绑定
|
|
//快捷键绑定
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
window.addEventListener('keydown', handleShortcut);
|
|
window.addEventListener('keydown', handleShortcut);
|
|
- GetLoginState().then(r => {
|
|
|
|
- console.log("login state ", r)
|
|
|
|
- if (loginDialog.value.dialogVisible) {
|
|
|
|
- loginDialog.value.dialogVisible = !r
|
|
|
|
- } else {
|
|
|
|
- console.log("login dialog is not visible")
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
//快捷键解绑
|
|
//快捷键解绑
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|