chengxiangling
2025-05-15 65f86f41dedbbbb7030e2f37ce3e001bbca4923a
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">
@@ -86,7 +90,7 @@
  </div>
</template>
<script setup name="gasProduceStatics">
<script setup name="PipeProduceStatics">
import {
  listUpdateGasProduceStatics,
  listGasProduceStatics,
@@ -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;