mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 17:09:07 +08:00
add the drawer for view job info snapshot
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<div>{{ jobInfo }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType } from 'vue'
|
||||||
|
import { type VChatStartupLog } from '@geekgeekrun/sqlite-plugin/src/entity/VChatStartupLog'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
jobInfo: {
|
||||||
|
type: Object as PropType<VChatStartupLog>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
<style lang="scss"></style>
|
||||||
@@ -35,18 +35,18 @@
|
|||||||
<ElTableColumn prop="bossTitle" label="BOSS身份" />
|
<ElTableColumn prop="bossTitle" label="BOSS身份" />
|
||||||
<ElTableColumn label="职位信息" fixed="right">
|
<ElTableColumn label="职位信息" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <ElButton
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="handleViewJobButtonClick(row.encryptJobId)"
|
|
||||||
>快照</ElButton
|
|
||||||
> -->
|
|
||||||
<ElButton
|
<ElButton
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleViewJobButtonClick(row.encryptJobId)"
|
@click="handleViewJobSnapshotButtonClick(row)"
|
||||||
|
>快照</ElButton
|
||||||
|
>
|
||||||
|
<ElButton
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleViewJobOnlineButtonClick(row.encryptJobId)"
|
||||||
>线上</ElButton
|
>线上</ElButton
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -66,17 +66,23 @@
|
|||||||
@size-change="getAutoStartChatRecord"
|
@size-change="getAutoStartChatRecord"
|
||||||
@current-change="getAutoStartChatRecord"
|
@current-change="getAutoStartChatRecord"
|
||||||
/>
|
/>
|
||||||
|
<ElDrawer v-model="drawVisibleModelValue">
|
||||||
|
<JobInfoSnapshot
|
||||||
|
v-if="selectedJobInfoForViewSnapshot"
|
||||||
|
:job-info="selectedJobInfoForViewSnapshot"
|
||||||
|
@closed="selectedJobInfoForViewSnapshot = null"
|
||||||
|
/>
|
||||||
|
</ElDrawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||||
import { ElTable, ElTableColumn, ElButton, ElPagination } from 'element-plus'
|
import { ElTable, ElTableColumn, ElButton, ElPagination, ElDrawer } from 'element-plus'
|
||||||
import { useRouter } from 'vue-router'
|
|
||||||
import { type VChatStartupLog } from '@geekgeekrun/sqlite-plugin/src/entity/VChatStartupLog'
|
import { type VChatStartupLog } from '@geekgeekrun/sqlite-plugin/src/entity/VChatStartupLog'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { PageReq, PagedRes } from '../../../../common/types/pagination'
|
import { PageReq, PagedRes } from '../../../../common/types/pagination'
|
||||||
const router = useRouter()
|
import JobInfoSnapshot from '../../features/JobInfoSnapshot/index.vue'
|
||||||
|
|
||||||
const tableData = ref<VChatStartupLog[]>([])
|
const tableData = ref<VChatStartupLog[]>([])
|
||||||
const pageSizeList = ref<number[]>([100, 200, 300, 400])
|
const pageSizeList = ref<number[]>([100, 200, 300, 400])
|
||||||
@@ -127,12 +133,20 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleViewJobButtonClick(encryptJobId: string) {
|
function handleViewJobOnlineButtonClick(encryptJobId: string) {
|
||||||
electron.ipcRenderer.send(
|
electron.ipcRenderer.send(
|
||||||
'open-external-link',
|
'open-external-link',
|
||||||
`https://www.zhipin.com/job_detail/${encryptJobId}.html`
|
`https://www.zhipin.com/job_detail/${encryptJobId}.html`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const drawVisibleModelValue = ref(false)
|
||||||
|
const selectedJobInfoForViewSnapshot = ref<VChatStartupLog | null>(null)
|
||||||
|
|
||||||
|
function handleViewJobSnapshotButtonClick(record: VChatStartupLog) {
|
||||||
|
selectedJobInfoForViewSnapshot.value = record
|
||||||
|
drawVisibleModelValue.value = true
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user