From 6e7f226b03fb059971b76d875671e2b662f29f1f Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 25 九月 2024 14:13:47 +0800
Subject: [PATCH] pre

---
 src/views/model/pre/dm/index.vue |  129 +++++++++++++++++++++---------------------
 1 files changed, 64 insertions(+), 65 deletions(-)

diff --git a/src/views/model/pre/dm/index.vue b/src/views/model/pre/dm/index.vue
index cc14b63..77ebac9 100644
--- a/src/views/model/pre/dm/index.vue
+++ b/src/views/model/pre/dm/index.vue
@@ -19,11 +19,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 +32,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 +42,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 +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