From 65f86f41dedbbbb7030e2f37ce3e001bbca4923a Mon Sep 17 00:00:00 2001
From: chengxiangling <291105840@qq.com>
Date: 星期四, 15 五月 2025 13:03:25 +0800
Subject: [PATCH] 查询日历带适用工厂
---
src/views/mainPlan/pipeProduceStatics/index.vue | 104 +++++++++++++++++++++++++++++----------------------
1 files changed, 59 insertions(+), 45 deletions(-)
diff --git a/src/views/mainPlan/pipeProduceStatics/index.vue b/src/views/mainPlan/pipeProduceStatics/index.vue
index ec50b8d..d99e07c 100644
--- a/src/views/mainPlan/pipeProduceStatics/index.vue
+++ b/src/views/mainPlan/pipeProduceStatics/index.vue
@@ -6,51 +6,55 @@
ref="queryRef"
:inline="true"
v-show="showSearch"
- :label-width="locale === 'zh' ? '68px' : '134px'"
+ label-position="left"
>
- <el-row type="flex" justify="left">
- <el-form-item :label="$t('plan.query.statistical')">
- <el-select
- v-model="queryParams.searchType"
- style="width: 200px"
- placeholder="Select"
- @change="handleChangeSelectType"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('plan.query.selectDateRange')">
- <div v-if="!dayCom">
- <el-date-picker
- v-model="queryParams.monthRange"
- type="monthrange"
- :range-separator="$t('plan.placeholder.to')"
- :start-placeholder="$t('plan.placeholder.startMonth')"
- :end-placeholder="$t('plan.placeholder.endMonth')"
- />
- </div>
- <div v-else>
- <el-date-picker
- v-model="queryParams.monthDays"
- type="month"
- :placeholder="$t('plan.placeholder.selectMonth')"
- />
- </div>
- </el-form-item>
-
- <el-form-item class="column-with-margin">
- <el-button type="primary" icon="Search" @click="handleQuery">{{
- $t("common.common.query")
- }}</el-button>
- <el-button icon="Refresh" @click="resetQuery">{{
- $t("common.common.reset")
- }}</el-button>
- </el-form-item>
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item :label="$t('plan.query.statistical')" :style="{ width: '100%' }">
+ <el-select
+ v-model="queryParams.searchType"
+ placeholder="Select"
+ @change="handleChangeSelectType"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item :label="$t('plan.query.selectDateRange')" :style="{ width: '100%' }">
+ <div v-if="!dayCom">
+ <el-date-picker
+ v-model="queryParams.monthRange"
+ type="monthrange"
+ :range-separator="$t('plan.placeholder.to')"
+ :start-placeholder="$t('plan.placeholder.startMonth')"
+ :end-placeholder="$t('plan.placeholder.endMonth')"
+ />
+ </div>
+ <div v-else>
+ <el-date-picker
+ v-model="queryParams.monthDays"
+ type="month"
+ :placeholder="$t('plan.placeholder.selectMonth')"
+ />
+ </div>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8" style="text-align: right">
+ <el-form-item class="column-with-margin">
+ <el-button type="primary" icon="Search" @click="handleQuery">{{
+ $t("common.common.query")
+ }}</el-button>
+ <el-button icon="Refresh" @click="resetQuery">{{
+ $t("common.common.reset")
+ }}</el-button>
+ </el-form-item>
+ </el-col>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
@@ -154,7 +158,14 @@
},
];
queryParams.value.searchType = t("plan.options.monthlyStatic");
- handleQuery();
+ if (
+ (!queryParams.value.monthRange && dayCom.value == false) ||
+ (!queryParams.value.monthDays && dayCom.value == true)
+ ) {
+ return;
+ }
+ // queryParams.value.pageNum = 1;
+ getPipeList();
},
{ immediate: true, deep: true }
);
@@ -435,6 +446,9 @@
// getList();
</script>
<style lang="scss" scoped>
+.column-with-margin {
+ margin-right: 0px;
+}
.box_container {
width: 100%;
margin: 20px auto;
--
Gitblit v1.9.3