From 2b0722ca2665708f7b35cf627a6aa20f3af32082 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期三, 09 十月 2024 20:30:12 +0800
Subject: [PATCH] update

---
 src/views/dnc/station-file/Log.vue |   48 ++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/src/views/dnc/station-file/Log.vue b/src/views/dnc/station-file/Log.vue
index 03df8ea..c66b0db 100644
--- a/src/views/dnc/station-file/Log.vue
+++ b/src/views/dnc/station-file/Log.vue
@@ -1,29 +1,30 @@
 <!--
  * @Date: 2024-05-22 23:18:15
  * @LastEditors: Sneed
- * @LastEditTime: 2024-06-05 21:21:55
+ * @LastEditTime: 2024-06-05 23:03:45
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/Log.vue
 -->
 <template>
     <el-container>
         <el-header>
-            <el-input v-model="params.name" style="width: 240px;margin-left: 8px;" placeholder="Please input">
+            <el-input v-model="params.fileName" style="width: 240px;margin-left: 8px;" placeholder="">
                 <template #prefix>鏂囦欢鍚嶇О</template>
             </el-input>
-            <el-select v-model="params.typeId" style="width: 240px;margin-left: 8px;">
+            <el-select v-model="params.fileType" style="width: 240px;margin-left: 8px;">
                 <template #prefix>
                     鏂囦欢绫诲瀷
                 </template>
-                <el-option v-for="item in options.typeId" :key="item.value" :label="item.label" :value="item.value" />
+                <el-option v-for="item in options.fileType" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
-            <el-date-picker style="width: 260px;flex-grow: 0;margin-left: 8px;" v-model="params.name" type="daterange"
+            <el-date-picker style="width: 260px;flex-grow: 0;margin-left: 8px;" v-model="params.time" type="daterange"
                 range-separator="-" start-placeholder="鎿嶄綔寮�濮嬫椂闂�" end-placeholder="鎿嶄綔缁撴潫鏃堕棿">
             </el-date-picker>
-            <el-select v-model="params.typeId" style="width: 240px;margin-left: 8px;margin-right: auto;">
+            <el-select v-model="params.operationType" style="width: 240px;margin-left: 8px;margin-right: auto;">
                 <template #prefix>
                     鎿嶄綔绫诲瀷
                 </template>
-                <el-option v-for="item in options.typeId" :key="item.value" :label="item.label" :value="item.value" />
+                <el-option v-for="item in options.operationType" :key="item.value" :label="item.label"
+                    :value="item.value" />
             </el-select>
         </el-header>
         <el-main>
@@ -55,15 +56,24 @@
             this.$nextTick(() => {
                 val && this.$refs?.table?.reload()
             })
+        },
+        params: {
+            handler() {
+                this.$refs.table.reload()
+            },
+            deep: true
         }
     },
     data() {
         return {
             params: {
-                name: ''
+                fileName: '',
+                fileType: '',
+                time: [],
+                operationType: ''
             },
             options: {
-                typeId: []
+                fileType: []
             },
             apiObj: {
                 get: async (data) => {
@@ -71,14 +81,32 @@
                         current: data.current,
                         size: data.size
                     }
-                    return await this.$HTTP.post(`/api/blade-dnc/operation-file/page/${this.id}`, {}, { params, data: this.params }).then(res => {
+                    let dataNew = {
+                        ...this.params,
+                        operationStartTime: this.params[0] || "",
+                        operationEndTime: this.params[1] || ""
+                    }
+                    return await this.$HTTP.post(`/api/blade-dnc/operation-file/page/${this.id}`, {}, { params, data: dataNew }).then(res => {
                         return res
                     })
                 }
             }
         }
     },
+    created() {
+        this.init()
+    },
     methods: {
+        init() {
+            this.$HTTP.get(`/api/blade-dnc/operation-file/list/suffix`).then(res => {
+                this.options.fileType = res.data.suffix.map(v => {
+                    return {
+                        value: v,
+                        label: v
+                    }
+                })
+            })
+        },
         dataChange(data) {
             console.log(data)
         }

--
Gitblit v1.9.3