From d8e4bea595e2aac3a1ea1bf7750ee7846f545f51 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期二, 12 十一月 2024 15:41:55 +0800 Subject: [PATCH] 模型运行输出配置 --- src/views/model/pre/dm/index.vue | 135 ++++++++++++++++++++++---------------------- 1 files changed, 67 insertions(+), 68 deletions(-) diff --git a/src/views/model/pre/dm/index.vue b/src/views/model/pre/dm/index.vue index dd14eee..77ebac9 100644 --- a/src/views/model/pre/dm/index.vue +++ b/src/views/model/pre/dm/index.vue @@ -19,20 +19,20 @@ </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 type="primary" plain @click="openForm('create')" - v-hasPermi="['system:tenant: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,20 +42,19 @@ <!-- 列表 --> <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 link type="primary" @click="openForm('update', scope.row.id)" - v-hasPermi="['system:tenant:update']" + v-hasPermi="['model:pre-module:update']" > 编辑 </el-button> @@ -63,7 +62,7 @@ link type="danger" @click="handleDelete(scope.row.id)" - v-hasPermi="['system:tenant:delete']" + v-hasPermi="['model:pre-module:delete']" > 删除 </el-button> @@ -80,7 +79,7 @@ </ContentWrap> <!-- 表单弹窗:添加/修改 --> - <DmModuleForm ref="formRef" @success="getList" /> + <DmModuleForm ref="formRef" @success="getList"/> </template> <script lang="ts" setup> @@ -89,66 +88,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