refactor(qualityConstructionLog): 优化代码格式并添加默认排序参数
调整模板中的代码格式以提高可读性,同时在查询参数中添加默认排序字段和排序方式
This commit is contained in:
@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<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]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="发生日期" prop="happenDate">
|
<el-form-item label="发生日期" prop="happenDate">
|
||||||
<el-date-picker clearable v-model="queryParams.happenDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择发生日期" />
|
<el-date-picker clearable v-model="queryParams.happenDate" type="date" value-format="YYYY-MM-DD"
|
||||||
|
placeholder="请选择发生日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
@ -26,15 +28,8 @@
|
|||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['quality:qualityConstructionLog:edit']">修改</el-button>
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['quality:qualityConstructionLog:edit']">修改</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||||
type="danger"
|
v-hasPermi="['quality:qualityConstructionLog:remove']">删除</el-button>
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete()"
|
|
||||||
v-hasPermi="['quality:qualityConstructionLog:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['quality:qualityConstructionLog:export']">导出</el-button>
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['quality:qualityConstructionLog:export']">导出</el-button>
|
||||||
@ -81,14 +76,16 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="View" @click="handleUpdate(scope.row)">详情</el-button>
|
<el-button link type="primary" icon="View" @click="handleUpdate(scope.row)">详情</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['quality:qualityConstructionLog:remove']">
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['quality:qualityConstructionLog:remove']">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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>
|
</el-card>
|
||||||
<!-- 详情对话框 -->
|
<!-- 详情对话框 -->
|
||||||
<el-dialog title="施工日志详情" v-model="dialog.visible" width="60vw" append-to-body>
|
<el-dialog title="施工日志详情" v-model="dialog.visible" width="60vw" append-to-body>
|
||||||
@ -147,6 +144,8 @@ const data = reactive<PageData<QualityConstructionLogForm, QualityConstructionLo
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
projectId: currentProject.value?.id,
|
projectId: currentProject.value?.id,
|
||||||
happenDate: undefined,
|
happenDate: undefined,
|
||||||
|
orderByColumn: "createTime",
|
||||||
|
isAsc: "desc",
|
||||||
params: {}
|
params: {}
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
Reference in New Issue
Block a user