From ce70bd97c7f2577f0978b39b9da1ccdd8d5b768f Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 19 九月 2025 22:50:14 +0800
Subject: [PATCH] 机床增加设备编号

---
 src/views/wel/shemi.vue |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index c9192de..855fab8 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -176,7 +176,13 @@
       <el-table :data="hisFileTableData" ref="hisFilesTable" border @row-click="showHisContent" max-height="200" highlight-current-row>
         <el-table-column type="index" label="#" width="40" align="center"/>
         <el-table-column prop="name" label="鏂囦欢鍚嶇О"></el-table-column>
-        <el-table-column prop="createTime" label="鍒涘缓鏃堕棿"></el-table-column>
+        <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="180"></el-table-column>
+        <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center">
+            <template #default="scope">
+                <a style="color: blue;cursor: pointer;font-size: 12px;margin-right: 4px;" type="text" size="small"
+                    @click.stop="handleDownload(scope.row)">涓嬭浇</a>
+            </template>
+        </el-table-column>
       </el-table>
       <h4>绋嬪簭鍐呭</h4>
       <div v-html="hisFileContent" class="app-content"></div>
@@ -635,7 +641,7 @@
     handleDownload(row){
       NProgress.start();
       exportBlob(
-          `/blade-mdm/program/node/download-by-nodeid?nodeId=${row.id}`
+          `/blade-mdm/program/nodehis/download-by-nodeid?nodeId=${row.id}`
       ).then(res => {
           if (res.status !== 200) {
               return this.$message.error(res.msg);
@@ -798,7 +804,12 @@
       res => {
         
         if(res.data.code === 200) {
-          this.hisFileTableData = res.data.data
+          this.hisFileTableData = res.data.data;
+          if(this.hisFileTableData.length > 0){
+            this.showHisContent(this.hisFileTableData[0])
+            this.$refs.hisFilesTable.setCurrentRow(this.hisFileTableData[0]);
+          }
+          
         } else {
           this.$message.error('绋嬪簭鍐呭鍔犺浇澶辫触');
         }
@@ -812,7 +823,7 @@
         params: {nodeId: row.id}
       }).then(
       res => {
-        console.log(res)
+        
         if(res.data.code === 200) {
             this.hisFileContent = res.data.data;
         } else {

--
Gitblit v1.9.3