style: 优化代码格式和布局

- 调整了多行代码的缩进和换行方式,提高了代码可读性
- 在 Materials 和 QuestionUserAnswer 组件中进行了相似的格式化修改
- 未改变原有功能,仅优化了代码结构
This commit is contained in:
tcy
2025-08-29 18:56:51 +08:00
parent bfafbc9591
commit 043d49cb20
2 changed files with 41 additions and 38 deletions

View File

@ -1,6 +1,7 @@
<template>
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
:leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
@ -24,26 +25,21 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-col :span="1.5" v-hasPermi="['safety:questionUserAnswer:uploadZip']">
<el-tooltip placement="top" effect="dark">
<template #content>
:上传压缩包内的文件夹名称需设置为姓名-身份证-满分-得分-及格分 <br />
例如:小明-5130112333654X-100-59-60
</template>
<file-upload
:limit="1"
v-model:model-value="filePath"
isImportInfo
:fileType="['zip']"
uploadUrl="/safety/questionUserAnswer/upload/zip"
:file-size="5000"
:data="{ projectId: currentProject.id }"
><el-button type="success" plain icon="Upload">上传线下安全考试</el-button></file-upload
>
<file-upload :limit="1" v-model:model-value="filePath" isImportInfo :fileType="['zip']"
uploadUrl="/safety/questionUserAnswer/upload/zip" :file-size="5000"
:data="{ projectId: currentProject.id }"><el-button type="success" plain
icon="Upload">上传线下安全考试</el-button></file-upload>
</el-tooltip>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="Download" :disabled="single" @click="handleDownload()">批量下载试卷</el-button>
<el-button type="primary" plain icon="Download" :disabled="single"
@click="handleDownload()">批量下载试卷</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -70,12 +66,14 @@
<el-button link type="primary" icon="View">预览试卷</el-button>
</el-link>
<el-button link type="primary" icon="Download" @click="downloadOssOne(scope.row)">下载试卷</el-button>
<el-button link type="primary" icon="Download" @click="downloadOssOne(scope.row)"
v-hasPermi="['system:oss:download']">下载试卷</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
</div>
</template>