chengxiangling
2025-05-16 444ba76f4cca8a9df3faf61ab33ec631aec7fbba
src/views/mainPlan/pipeProduceStatics/index.vue
@@ -8,14 +8,24 @@
      v-show="showSearch"
      label-position="left"
    >
      <el-form
        class="responsive-form"
        :model="queryParams"
        ref="queryRef"
        :inline="true"
        v-show="showSearch"
        label-position="left"
      >
      <el-row :gutter="20">
        <el-col :span="8">
          <el-form-item :label="$t('plan.query.statistical')" :style="{ width: '100%' }">
          <el-col :span="6">
            <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"
@@ -26,17 +36,18 @@
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-col :span="6">
          <el-form-item
              :style="{ width: '100%' }"
            :label="
              !dayCom
                ? $t('plan.query.selectDateRange')
                : $t('plan.query.selectDateMonth')
            "
            :style="{ width: '100%' }"
          >
            <div v-if="!dayCom">
              <el-date-picker
                  :style="{ width: '250px' }"
                v-model="queryParams.monthRange"
                type="monthrange"
                :range-separator="$t('plan.placeholder.to')"
@@ -46,6 +57,7 @@
            </div>
            <div v-else>
              <el-date-picker
                  :style="{ width: '100%' }"
                v-model="queryParams.monthDays"
                type="month"
                :placeholder="$t('plan.placeholder.selectMonth')"
@@ -53,7 +65,7 @@
            </div>
          </el-form-item>
        </el-col>
        <el-col :span="8" v-if="dayCom">
          <el-col :span="6" v-if="dayCom">
          <el-form-item
            :label="$t('basic.table.applicableFactories')"
            prop="plant"
@@ -84,6 +96,7 @@
          </el-form-item>
        </el-col> -->
      </el-row>
      </el-form>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
@@ -136,7 +149,7 @@
const { aps_factory } = proxy.useDict("aps_factory");
const loading = ref(false);
const gridRef = ref();
const height = ref(document.documentElement.clientHeight - 180 + "px;");
const height = ref(document.documentElement.clientHeight - 170 + "px;");
const headers = ref([]);
const exportData = ref([]);
const showSearch = ref(true);
@@ -236,9 +249,7 @@
  if (list) {
    return list
      .map((type) => {
        const item = aps_factory.value.find(
          (item) => item.value === type
        );
        const item = aps_factory.value.find((item) => item.value === type);
        return item ? item.label : type;
      })
      .join("");
@@ -306,7 +317,7 @@
              title: t("plan.table.processName"),
              width: 250,
              type: "html",
            }
            },
          ],
          width: 160,
        });
@@ -364,11 +375,13 @@
          //   ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot"></sup>${key}</div>`
          //   : key;
          if (!dayCom.value) {
            const lastIndex = key.lastIndexOf('_');
            const lastIndex = key.lastIndexOf("_");
            item[`resourceName`] = key.slice(0, lastIndex);
            item[`resourceGroupName`] = formatTypeLabelPlant([key.slice(lastIndex + 1)]);
            item[`resourceGroupName`] = formatTypeLabelPlant([
              key.slice(lastIndex + 1),
            ]);
          }else{
            item[`resourceName`] = key
            item[`resourceName`] = key;
          }
        }
        dataList.push(item);