Browse Source

工作汇报

master
赵鹏 1 month ago
parent
commit
7ba9d1d819
  1. 25
      src/views/system/jobinfo/index.vue

25
src/views/system/jobinfo/index.vue

@ -46,7 +46,6 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="汇报标题" align="center" prop="title" /> <el-table-column label="汇报标题" align="center" prop="title" />
<el-table-column label="汇报日期" :formatter="dateFormatter2" align="center" prop="jobDate" /> <el-table-column label="汇报日期" :formatter="dateFormatter2" align="center" prop="jobDate" />
<el-table-column label="汇报人姓名" align="center" prop="jobName" /> <el-table-column label="汇报人姓名" align="center" prop="jobName" />
@ -57,6 +56,19 @@
:formatter="dateFormatter" :formatter="dateFormatter"
width="180px" width="180px"
/> />
<el-table-column label="PDF文件" align="center" prop="pdfUrl">
<template #default="scope">
<el-button
v-if="scope.row.pdfUrl"
link
type="primary"
@click="handleOpenPdf(scope.row.pdfUrl)"
>
查看PDF
</el-button>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120px"> <el-table-column label="操作" align="center" min-width="120px">
<template #default="scope"> <template #default="scope">
<el-button <el-button
@ -65,7 +77,7 @@
@click="handleDetail(scope.row.id)" @click="handleDetail(scope.row.id)"
v-hasPermi="['system:job-info:update']" v-hasPermi="['system:job-info:update']"
> >
详情 生成
</el-button> </el-button>
<el-button <el-button
link link
@ -154,13 +166,13 @@ const openForm = (type: string, id?: number) => {
formRef.value.open(type, id) formRef.value.open(type, id)
} }
/** 删除按钮操作 */ /** 生成按钮操作 */
const handleDetail = async (id: number) => { const handleDetail = async (id: number) => {
try { try {
// //
await JobInfoApi.jobDetail(id) await JobInfoApi.jobDetail(id)
message.success(t('common.delSuccess')) message.success('生成成功')
// //
await getList() await getList()
} catch {} } catch {}
@ -179,6 +191,11 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 打开pdf */
const handleOpenPdf = (url: string) => {
window.open(url)
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const handleExport = async () => { const handleExport = async () => {
try { try {

Loading…
Cancel
Save