| | |
| | | <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> |
| | |
| | | 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); |
| | |
| | | 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('程序内容加载失败'); |
| | | } |
| | |
| | | params: {nodeId: row.id} |
| | | }).then( |
| | | res => { |
| | | console.log(res) |
| | | |
| | | if(res.data.code === 200) { |
| | | this.hisFileContent = res.data.data; |
| | | } else { |