From 122deb4a51475b271bd5d4de36593c1c5f925f1d Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期二, 18 三月 2025 17:29:39 +0800
Subject: [PATCH] 1

---
 src/views/dnc/station-file/Log.vue |   56 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/src/views/dnc/station-file/Log.vue b/src/views/dnc/station-file/Log.vue
index 9c36765..c66b0db 100644
--- a/src/views/dnc/station-file/Log.vue
+++ b/src/views/dnc/station-file/Log.vue
@@ -1,34 +1,35 @@
 <!--
  * @Date: 2024-05-22 23:18:15
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-26 16:04:41
+ * @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 >
-            <scTable v-if="id" highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table" :params="params"
-                :apiObj="apiObj" @selection-change="selectionChange" stripe>
+        <el-main>
+            <scTable v-if="id" highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table"
+                :params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe>
                 <el-table-column label="鏂囦欢鍚嶇О" prop="fileName">
                 </el-table-column>
                 <el-table-column label="鐗堟湰" prop="version"></el-table-column>
@@ -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,15 +81,33 @@
                         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: {
-        dataChange (data) {
+        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