From fa3d2503f8c34049159058a19e941192e47fb89e Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期四, 02 一月 2025 14:19:28 +0800 Subject: [PATCH] 调度模型下发数据类型字典 --- src/views/model/pre/dm/index.vue | 130 +++++++++++++++++++++--------------------- 1 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/views/model/pre/dm/index.vue b/src/views/model/pre/dm/index.vue index cc14b63..27df07a 100644 --- a/src/views/model/pre/dm/index.vue +++ b/src/views/model/pre/dm/index.vue @@ -7,6 +7,7 @@ ref="queryFormRef" :inline="true" label-width="68px" + @submit.prevent > <el-form-item label="名称" prop="modulename"> <el-input @@ -19,11 +20,11 @@ </el-form-item> <el-form-item> <el-button @click="handleQuery"> - <Icon icon="ep:search" class="mr-5px" /> + <Icon icon="ep:search" class="mr-5px"/> 搜索 </el-button> <el-button @click="resetQuery"> - <Icon icon="ep:refresh" class="mr-5px" /> + <Icon icon="ep:refresh" class="mr-5px"/> 重置 </el-button> <el-button @@ -32,7 +33,7 @@ @click="openForm('create')" v-hasPermi="['model:pre-module:create']" > - <Icon icon="ep:plus" class="mr-5px" /> + <Icon icon="ep:plus" class="mr-5px"/> 新增 </el-button> </el-form-item> @@ -42,13 +43,12 @@ <!-- 列表 --> <ContentWrap> <el-table v-loading="loading" :data="list"> - <el-table-column label="名称" align="center" prop="modulename" /> - <el-table-column label="类型" align="center" prop="moduletype" /> - <el-table-column label="周期" align="center" prop="cycle" /> - <el-table-column label="模块配置" align="center" prop="modulenavconfig" /> - <el-table-column label="预测时间" align="center" prop="predicttime" /> - <el-table-column label="采集时间" align="center" prop="collecttime" /> - + <el-table-column label="名称" header-align="center" align="left" min-width="100" prop="modulename"/> + <el-table-column label="类型" header-align="center" align="left" min-width="100" prop="moduletype"/> + <el-table-column label="周期" align="center" prop="cycle"/> + <el-table-column label="模块配置" align="center" prop="modulenavconfig"/> + <el-table-column label="预测时间" align="center" prop="predicttime"/> + <el-table-column label="采集时间" align="center" prop="collecttime"/> <el-table-column label="操作" align="center" min-width="110" fixed="right"> <template #default="scope"> <el-button @@ -80,7 +80,7 @@ </ContentWrap> <!-- 表单弹窗:添加/修改 --> - <DmModuleForm ref="formRef" @success="getList" /> + <DmModuleForm ref="formRef" @success="getList"/> </template> <script lang="ts" setup> @@ -89,66 +89,66 @@ defineOptions({name: 'DataDmModule'}) - const message = useMessage() // 消息弹窗 - const {t} = useI18n() // 国际化 +const message = useMessage() // 消息弹窗 +const {t} = useI18n() // 国际化 - const loading = ref(true) // 列表的加载中 - const total = ref(0) // 列表的总页数 - const list = ref([]) // 列表的数据 - const queryParams = reactive({ - pageNo: 1, - pageSize: 10, - modulename: undefined, - }) - const queryFormRef = ref() // 搜索的表单 - const exportLoading = ref(false) // 导出的加载中 +const loading = ref(true) // 列表的加载中 +const total = ref(0) // 列表的总页数 +const list = ref([]) // 列表的数据 +const queryParams = reactive({ + pageNo: 1, + pageSize: 10, + modulename: undefined, +}) +const queryFormRef = ref() // 搜索的表单 +const exportLoading = ref(false) // 导出的加载中 - /** 查询列表 */ - const getList = async () => { - loading.value = true - try { - const page = await DmModule.getDmModulePage(queryParams) - list.value = page.list - total.value = page.total - } finally { - loading.value = false - } +/** 查询列表 */ +const getList = async () => { + loading.value = true + try { + const page = await DmModule.getDmModulePage(queryParams) + list.value = page.list + total.value = page.total + } finally { + loading.value = false } +} - /** 搜索按钮操作 */ - const handleQuery = () => { - queryParams.pageNo = 1 - getList() - } +/** 搜索按钮操作 */ +const handleQuery = () => { + queryParams.pageNo = 1 + getList() +} - /** 重置按钮操作 */ - const resetQuery = () => { - queryFormRef.value.resetFields() - handleQuery() - } +/** 重置按钮操作 */ +const resetQuery = () => { + queryFormRef.value.resetFields() + handleQuery() +} - /** 添加/修改操作 */ - const formRef = ref() - const openForm = (type: string, id?: number) => { - formRef.value.open(type, id) - } +/** 添加/修改操作 */ +const formRef = ref() +const openForm = (type: string, id?: number) => { + formRef.value.open(type, id) +} - /** 删除按钮操作 */ - const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await DmModule.deleteDmModule(id) - message.success(t('common.delSuccess')) - // 刷新列表 - await getList() - } catch { - } - } - - /** 初始化 **/ - onMounted(async () => { +/** 删除按钮操作 */ +const handleDelete = async (id: number) => { + try { + // 删除的二次确认 + await message.delConfirm() + // 发起删除 + await DmModule.deleteDmModule(id) + message.success(t('common.delSuccess')) + // 刷新列表 await getList() - }) + } catch { + } +} + +/** 初始化 **/ +onMounted(async () => { + await getList() +}) </script> -- Gitblit v1.9.3