refactor(submissions): 删操作列下载按钮 (跟设计文件列下载重复)
- 表格操作列 width 220 → 180 - 删 el-button onDownload - 删 onDownload() 函数 (window.open designFileUrl)
This commit is contained in:
@@ -57,12 +57,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip />
|
<el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="220" fixed="right">
|
<el-table-column label="操作" width="180" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button link type="primary" @click="onView(row)">查看</el-button>
|
<el-button link type="primary" @click="onView(row)">查看</el-button>
|
||||||
<el-button v-if="canModify(row)" link type="primary" @click="onEdit(row)">修改</el-button>
|
<el-button v-if="canModify(row)" link type="primary" @click="onEdit(row)">修改</el-button>
|
||||||
<el-button v-if="canSubmit(row)" link type="primary" @click="onSubmit(row)">提交</el-button>
|
<el-button v-if="canSubmit(row)" link type="primary" @click="onSubmit(row)">提交</el-button>
|
||||||
<el-button link type="primary" :disabled="!row.designFileUrl" @click="onDownload(row)">下载</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -155,10 +154,6 @@ function onView(row) {
|
|||||||
function onEdit(row) {
|
function onEdit(row) {
|
||||||
router.push({ path: `/doctor/submission/edit/${row.planId}` })
|
router.push({ path: `/doctor/submission/edit/${row.planId}` })
|
||||||
}
|
}
|
||||||
function onDownload(row) {
|
|
||||||
if (!row.designFileUrl) { ElMessage.warning('该投稿暂无设计文件'); return }
|
|
||||||
window.open(row.designFileUrl, '_blank')
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSubmit(row) {
|
async function onSubmit(row) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user