Commit d89156fb authored by 智勇's avatar 智勇

eslint fix

parent 9bf62b68
module.exports = {
NODE_ENV: '"development"',
ENV_CONFIG: '"dev"',
// QA_API: '"http://172.30.220.22:3003"',
QA_API: '"http://127.0.0.1:3003"',
//QA_API: '"http://qaapi.liangkebang.com"',
TESTDATA_API: '"http://172.30.220.22:3333"',
PIPELINE_API:'"http://pipes.liangkebang.com"'
QA_API: '"http://127.0.0.1:3003"',
//QA_API: '"http://qaapi.liangkebang.com"',
TESTDATA_API: '"http://172.30.220.22:3333"',
PIPELINE_API:'"http://pipes.liangkebang.com"'
}
......@@ -67,7 +67,8 @@ export function formatStatus(tsatus) {
}
}
export function formatImages(images) {
return images.replace('ccr.ccs.tencentyun.com/qa-base/', '')
return images.map(i => i.split(':')[1]).join(',')
// return images.replace('ccr.ccs.tencentyun.com/qa-base/', '')
}
export function filterTag(image) {
......
......@@ -17,7 +17,7 @@
</el-form-item>
<el-form-item label="环境归属" >
<el-select v-model="group" style="width:100%" placeholder="请输入,必选">
<el-select v-model="group" style="width:100%" placeholder="请选择,必选">
<el-option v-for="item in groups" :value="item" :key="item" />
</el-select>
</el-form-item>
......
......@@ -160,7 +160,7 @@
prop="image"
label="镜像">
<template slot-scope="scope">
{{ scope.row.image | filterTag }}
{{ scope.row.image | formatImages }}
</template>
</el-table-column>
<el-table-column
......
<template>
<div class="app-container">
<div class="filter-container">
<el-input v-model="listQuery.project_name" placeholder="项目名称" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter"/>
<el-input v-model="listQuery.project_name" placeholder="项目名称" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getProjects"/>
<el-select v-model="listQuery.type" placeholder="项目类型" clearable style="width: 200px" class="filter-item" >
<el-option v-for="item in typeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-select v-model="listQuery.is_active" placeholder="是否服役" clearable style="width: 200px" class="filter-item" >
<el-option v-for="item in avtiveOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-select v-model="listQuery.sort" style="width: 140px" class="filter-item" @change="handleFilter">
<el-select v-model="listQuery.sort" style="width: 140px" class="filter-item" >
<el-option v-for="item in sortOptions" :key="item.key" :label="item.label" :value="item.key"/>
</el-select>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">{{ $t('table.search') }}</el-button>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getProjects">{{ $t('table.search') }}</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleCreate">添加</el-button>
</div>
......@@ -27,7 +27,7 @@
</template>
</el-table-column>
<el-table-column label="服务名称" align="center">
<el-table-column label="服务名称" align="center" >
<template slot-scope="scope">
<span class="link-type" @click="handleUpdate(scope.row)">{{ scope.row.project_name }}</span>
</template>
......@@ -259,9 +259,16 @@ export default {
deployOptions
}
},
created() {
this.getProjects()
watch: {
listQuery: {
handler: 'getProjects',
immediate: true,
deep: true
}
},
// created() {
// this.getProjects()
// },
methods: {
getProjects() {
for (const prop in this.listQuery) {
......@@ -273,9 +280,6 @@ export default {
this.proconfigs = res.data
})
},
handleFilter() {
this.getProjects()
},
openUrl(data) {
window.open(`${data}`, '_blank')
......@@ -293,7 +297,7 @@ export default {
} else {
this.listQuery.sort = '-project_name'
}
this.handleFilter()
this.getProjects()
},
resetTemp() {
this.temp = {
......
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