| | |
| | | <el-dialog v-model="dialogVisible" title="附件" width="40%" :before-close="handleClose"> |
| | | <el-table :data="tableData" border height="40vh" stripe> |
| | | <el-table-column label="附件名称" prop="name" min-width="400" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="操作" width="100" align="center"> |
| | | <el-table-column fixed="right" label="操作" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">下载</el-button> |
| | | <el-button link type="primary" size="small" @click="lookFile(scope.row)">预览</el-button> |
| | | <el-button link type="primary" size="small" @click="delFile(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <script setup> |
| | | import { ref, getCurrentInstance } from 'vue' |
| | | import filePreview from '@/components/filePreview/index.vue' |
| | | import { |
| | | delLedgerFile |
| | | } from "@/api/salesManagement/salesLedger.js"; |
| | | |
| | | const dialogVisible = ref(false) |
| | | const tableData = ref([]) |
| | |
| | | const lookFile = (row) => { |
| | | filePreviewRef.value.open(row.url) |
| | | } |
| | | const delFile = (row) => { |
| | | let ids = []; |
| | | ids.push(row.id); |
| | | delLedgerFile(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }); |
| | | } |
| | | defineExpose({ |
| | | open |
| | | }) |