Commit 9e1cc19c authored by 黎博's avatar 黎博

修复服务展示问题,新增formatImages方法

parent ca5c5371
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="image" label="镜像"> <el-table-column prop="image" label="镜像">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.image.split('/')[2] }} {{ scope.row.image | formatImages }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createdAt" width="200" label="创建时间" /> <el-table-column prop="createdAt" width="200" label="创建时间" />
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="image" label="镜像"> <el-table-column prop="image" label="镜像">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.image.split(':')[1] }} {{ scope.row.image | formatImages }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createdAt" width="200" label="创建时间" /> <el-table-column prop="createdAt" width="200" label="创建时间" />
...@@ -415,10 +415,15 @@ export default { ...@@ -415,10 +415,15 @@ export default {
}) })
}, },
methods: { methods: {
// 格式化镜像名
formatImages(images) {
return images.replace('ccr.ccs.tencentyun.com/qa-base/', '')
},
indexMethod(index) { indexMethod(index) {
return index + 1 return index + 1
}, },
array2Object(original) { array2Object(original) {
console.log('original: ', original)
// 将数组转成对象存储 // 将数组转成对象存储
this.FormatTabledata = {} this.FormatTabledata = {}
original.forEach((item, index) => { original.forEach((item, index) => {
...@@ -433,6 +438,7 @@ export default { ...@@ -433,6 +438,7 @@ export default {
} }
} }
}) })
console.log(this.FormatTabledata)
}, },
// 获取服务列表 // 获取服务列表
getServiceList() { getServiceList() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment