| | |
| | | <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> |
| | |
| | | <!-- 列表 --> |
| | | <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 |
| | |
| | | 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']" |
| | |
| | | </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) // 列表的总页数 |
| | |
| | | getList() |
| | | } |
| | | |
| | | /** 查看数据操作 */ |
| | | const chartView = ref() |
| | | const chartHandle = (raw: object) => { |
| | | chartView.value.open(raw) |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | | const resetQuery = () => { |
| | | queryFormRef.value.resetFields() |
| | |
| | | message.success(t('common.delSuccess')) |
| | | // 刷新列表 |
| | | await getList() |
| | | } catch {} |
| | | } catch { |
| | | } |
| | | } |
| | | |
| | | /** 初始化 **/ |