feat: add personnel type and creation time range to search criteria
This commit is contained in:
@@ -15,6 +15,30 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类型" prop="inspectionPointType">
|
||||
<el-select
|
||||
v-model="queryParams.inspectionPointType"
|
||||
placeholder="请选择人员类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in inspection_point_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" style="width: 308px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
@@ -246,6 +270,7 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
|
||||
|
||||
// 多选导出的数组
|
||||
@@ -257,6 +282,7 @@ const data = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
inspectionPoint: null,
|
||||
inspectionPointType: null,
|
||||
},
|
||||
rules: {
|
||||
inspectionPoint: [
|
||||
@@ -289,11 +315,13 @@ function switchChange(data) {
|
||||
/** 查询巡检点管理列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listManage(queryParams.value).then((response) => {
|
||||
listManage(proxy.addDateRange(queryParams.value, dateRange.value)).then(
|
||||
(response) => {
|
||||
manageList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
@@ -324,6 +352,7 @@ function handleQuery() {
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
@@ -447,7 +476,7 @@ function handleExport() {
|
||||
proxy.download(
|
||||
"inspection/manage/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
...proxy.addDateRange(queryParams.value, dateRange.value),
|
||||
},
|
||||
`manage_${new Date().getTime()}.xlsx`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user