From df90c0c5cfa4de114798015b92120ad8ba8b4826 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 22 十一月 2024 10:45:40 +0800 Subject: [PATCH] MEASURE_VALUE_TYPE --- src/views/data/plan/item/index.vue | 47 +++++++++++++++++++++++++++++++++-------------- 1 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/views/data/plan/item/index.vue b/src/views/data/plan/item/index.vue index 5359924..cc85952 100644 --- a/src/views/data/plan/item/index.vue +++ b/src/views/data/plan/item/index.vue @@ -4,11 +4,13 @@ <el-form ref="queryFormRef" :inline="true" :model="queryParams" class="-mb-15px" label-width="68px"> <el-form-item label="计划编码" prop="itemNo"> - <el-input v-model="queryParams.itemNo" class="!w-200px" clearable placeholder="请输入计划编码" + <el-input v-model="queryParams.itemNo" class="!w-200px" clearable + placeholder="请输入计划编码" @keyup.enter="handleQuery"/> </el-form-item> <el-form-item label="计划名称" prop="itemName"> - <el-input v-model="queryParams.itemName" class="!w-200px" clearable placeholder="请输入计划名称" + <el-input v-model="queryParams.itemName" class="!w-200px" clearable + placeholder="请输入计划名称" @keyup.enter="handleQuery"/> </el-form-item> <el-form-item> @@ -36,12 +38,16 @@ <!-- 列表 --> <ContentWrap> <el-table v-loading="loading" :data="list"> - <el-table-column prop="itemNo" label="计划编码" header-align="center" align="center" min-width="80"/> - <el-table-column prop="itemName" label="计划名称" header-align="center" align="center" min-width="120"/> - <el-table-column prop="itemCategoryName" label="计划分类" header-align="center" align="center" min-width="100"/> - <el-table-column prop="timeGranularity" label="时间粒度" header-align="center" align="center" min-width="40"> + <el-table-column prop="itemNo" label="计划编码" header-align="center" align="center" + min-width="80"/> + <el-table-column prop="itemName" label="计划名称" header-align="center" align="center" + min-width="120"/> + <el-table-column prop="itemCategoryName" label="计划分类" header-align="center" align="center" + min-width="100"/> + <el-table-column prop="timeGranularity" label="时间粒度" header-align="center" align="center" + min-width="40"> <template #default="scope"> - <dict-tag :type="DICT_TYPE.TIME_GRANULARITY" :value="scope.row.timeGranularity" /> + <dict-tag :type="DICT_TYPE.TIME_GRANULARITY" :value="scope.row.timeGranularity"/> </template> </el-table-column> <el-table-column @@ -56,8 +62,10 @@ v-hasPermi="['data:ind-item:update']" link type="primary" - @click="openForm('update', scope.row)"> + @click="openForm('update', scope.row.id)"> 修改 + </el-button> + <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">数据 </el-button> <el-button v-hasPermi="['data:ind-item:delete']" @@ -79,21 +87,25 @@ </ContentWrap> <!-- 表单弹窗:添加/修改 --> - <ItemForm ref="formRef" @success="getList" /> + <ItemForm ref="formRef" @success="getList"/> + + <!-- 表单弹窗:计划数据 --> + <ItemChart ref="chartView"/> </template> <script lang="ts" setup> -import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' -import { dateFormatter } from '@/utils/formatTime' +import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from '@/utils/dict' +import {dateFormatter} from '@/utils/formatTime' import ItemForm from './ItemForm.vue' import download from '@/utils/download' import * as ItemApi from '@/api/data/plan/item' import * as CategoryApi from "@/api/data/plan/category"; +import ItemChart from "./ItemChart.vue"; -defineOptions({ name: 'PlanItem' }) +defineOptions({name: 'PlanItem'}) const message = useMessage() // 消息弹窗 -const { t } = useI18n() // 国际化 +const {t} = useI18n() // 国际化 const dataCategoryList = ref([] as CategoryApi.IndItemCategoryVO[]) const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 @@ -127,6 +139,12 @@ getList() } +/** 查看数据操作 */ +const chartView = ref() +const chartHandle = (raw: object) => { + chartView.value.open(raw) +} + /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value.resetFields() @@ -149,7 +167,8 @@ message.success(t('common.delSuccess')) // 刷新列表 await getList() - } catch {} + } catch { + } } /** 初始化 **/ -- Gitblit v1.9.3