| | |
| | | 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-select |
| | | v-model="queryParams.searchType" |
| | | placeholder="Select" |
| | | @change="handleChangeSelectType" |
| | | |
| | | <el-form |
| | | class="responsive-form" |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-position="left" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item |
| | | :label="$t('plan.query.statistical')" |
| | | :style="{ width: '100%' }" |
| | | > |
| | | <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=" |
| | | !dayCom |
| | | ? $t('plan.query.selectDateRange') |
| | | : $t('plan.query.selectDateMonth') |
| | | " |
| | | :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" v-if="dayCom"> |
| | | <el-form-item |
| | | :label="$t('basic.table.applicableFactories')" |
| | | prop="plant" |
| | | :style="{ width: '100%' }" |
| | | > |
| | | <el-select |
| | | clearable |
| | | v-model="queryParams.applicableFactory" |
| | | :placeholder="$t('basic.table.applicableFactories')" |
| | | <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="6"> |
| | | <el-form-item |
| | | :style="{ width: '100%' }" |
| | | :label=" |
| | | !dayCom |
| | | ? $t('plan.query.selectDateRange') |
| | | : $t('plan.query.selectDateMonth') |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="item in aps_factory" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="6" style="text-align:right;"> |
| | | <div v-if="!dayCom"> |
| | | <el-date-picker |
| | | :style="{ width: '250px' }" |
| | | 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 |
| | | :style="{ width: '100%' }" |
| | | v-model="queryParams.monthDays" |
| | | type="month" |
| | | :placeholder="$t('plan.placeholder.selectMonth')" |
| | | /> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" v-if="dayCom"> |
| | | <el-form-item |
| | | :label="$t('basic.table.applicableFactories')" |
| | | prop="plant" |
| | | :style="{ width: '100%' }" |
| | | > |
| | | <el-select |
| | | clearable |
| | | v-model="queryParams.applicableFactory" |
| | | :placeholder="$t('basic.table.applicableFactories')" |
| | | > |
| | | <el-option |
| | | v-for="item in aps_factory" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="6" 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-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | </el-row> |
| | | </el-form> |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | |
| | | 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); |
| | |
| | | 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(""); |
| | |
| | | ], |
| | | width: 160, |
| | | }); |
| | | }else{ |
| | | } else { |
| | | colList.push({ |
| | | field: "dateCol", |
| | | title: t("plan.table.dateYearMonth"), |
| | |
| | | title: t("plan.table.processName"), |
| | | width: 250, |
| | | type: "html", |
| | | } |
| | | }, |
| | | ], |
| | | width: 160, |
| | | }); |
| | |
| | | // ? `<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)]); |
| | | }else{ |
| | | item[`resourceName`] = key |
| | | item[`resourceGroupName`] = formatTypeLabelPlant([ |
| | | key.slice(lastIndex + 1), |
| | | ]); |
| | | } else { |
| | | item[`resourceName`] = key; |
| | | } |
| | | } |
| | | dataList.push(item); |