修改shell部分

This commit is contained in:
junleea 2025-07-30 23:25:31 +08:00
parent 759b24fe43
commit 1e54834c15
1 changed files with 20 additions and 3 deletions

View File

@ -80,6 +80,12 @@ export default {
if (data !== undefined && data !== null) { if (data !== undefined && data !== null) {
this.tableData = data; this.tableData = data;
} }
for(let i = 0;i<this.tableData.length;i++) {
this.tableData[i].UpdatedAt = this.formattedTime(this.tableData[i].UpdatedAt);
this.tableData[i].CreatedAt = this.formattedTime(this.tableData[i].CreatedAt)
//console.log('this.ConfigFileList:',this.ConfigFileList);
}
this.currentPageData(); this.currentPageData();
}, },
addConfigFileV() { addConfigFileV() {
@ -159,6 +165,17 @@ export default {
console.log(e); console.log(e);
} }
}, },
formattedTime(isoTime) {
const date = new Date(isoTime);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
const seconds = String(date.getSeconds()).padStart(2, "0");
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
async updateConfigShell(index) { async updateConfigShell(index) {
//console.log("index:", index); //console.log("index:", index);
let cf = this.ConfigFileCurrentPageData[index]; let cf = this.ConfigFileCurrentPageData[index];
@ -610,7 +627,7 @@ export default {
> >
<el-tag <el-tag
v-if="scope.row.Status === 1" v-if="scope.row.Status === 1"
type="info" type="warning"
>正在运行</el-tag> >正在运行</el-tag>
<el-tag <el-tag
v-if="scope.row.Status === 2" v-if="scope.row.Status === 2"
@ -635,11 +652,11 @@ export default {
label="上次更新" label="上次更新"
width="160" width="160"
></el-table-column> ></el-table-column>
<el-table-column <!-- <el-table-column
prop="AuthID" prop="AuthID"
label="创建用户ID" label="创建用户ID"
width="40" width="40"
></el-table-column> ></el-table-column> -->
<el-table-column label="操作" width="270"> <el-table-column label="操作" width="270">
<template #default="scope"> <template #default="scope">
<el-button <el-button