fix: 隐藏容器集群操作

develop
时启龙 2024-09-09 14:28:43 +08:00
parent 2d310224c8
commit 4db64f287b
7 changed files with 15 additions and 113 deletions

View File

@ -1,91 +0,0 @@
<template>
<div>
<el-dialog title="新增集群" width="40%" :close-on-click-modal="false" v-if="addData.dialog" :visible.sync="addData.dialog">
<cb-form :model="addData.data" ref="data">
<el-row :gutter="10">
<el-col :span="24">
<cb-form-item label="地域:" prop="region" validate="required" required-message="">
<el-select v-model="addData.data.region" filterable>
<el-option v-for="(item, index) in regions" :key="index" :label="item.regionName" :value="item.alias"></el-option>
</el-select>
</cb-form-item>
</el-col>
</el-row>
</cb-form>
<div slot="footer" class="dialog-footer">
<el-button type="ghost" @click.native="addData.dialog = false">取消</el-button>
<el-button type="primary" @click.native="ok">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
/* global $ */
import { modifyInstance, getTKERegions } from 'views/resource/ctstack/services/tke.js'
export default {
props: {
addData: {
type: Object,
default: function () {
return {
data: {
name: '',
vendorId: -1
},
dialog: false
}
}
},
vendorId: {
type: Number,
default: 0
},
platformObject: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
regions: []
}
},
methods: {
getRegionList() {
this.regions = []
getTKERegions({
vendorId: this.vendorId
}).then(data => {
if (data.success) {
this.regions = data.data.regionInstanceSet
}
})
},
ok() {
this.$refs.data.validate(valid => {
if (valid) {
const param = {
id: this.addData.data.id,
newName: this.addData.data.name
}
}
})
}
},
created() {},
watch: {
'addData.dialog': {
handler(newVal, oldVal) {
if (newVal) {
this.getRegionList()
}
},
deep: true,
immediate: true
}
}
}
</script>

View File

@ -30,11 +30,11 @@
<service ref="serviceTable" v-if="serviceVisible" :vendorId="platformObject.vendorId" :clusterInfo="clusterInfo" @close="closeService"></service> <service ref="serviceTable" v-if="serviceVisible" :vendorId="platformObject.vendorId" :clusterInfo="clusterInfo" @close="closeService"></service>
<modify-cluster :add-data="modifyClusterData" :vendor-id="platformObject.vendorId" v-if="modifyClusterData.dialog"></modify-cluster> <modify-cluster :add-data="modifyClusterData" :vendor-id="platformObject.vendorId" v-if="modifyClusterData.dialog"></modify-cluster>
<delete-cluster :data="deleteClusterData" :vendor-id="platformObject.vendorId" v-if="deleteClusterData.dialog" :clusterInfo="clusterInfo"></delete-cluster> <delete-cluster :data="deleteClusterData" :vendor-id="platformObject.vendorId" v-if="deleteClusterData.dialog" :clusterInfo="clusterInfo"></delete-cluster>
<add-cluster :add-data="addClusterData" :vendor-id="platformObject.vendorId" :platform-object="platformObject" v-if="addClusterData.dialog"></add-cluster>
</div> </div>
</template> </template>
<script> <script>
// container TCE ,
import bind from './bind.vue' import bind from './bind.vue'
import { getClusterList } from 'views/resource/ctstack/services/tke.js' import { getClusterList } from 'views/resource/ctstack/services/tke.js'
import { removeFloatIp, detailFloatIp } from 'views/resource/ctstack/services/floatips.js' import { removeFloatIp, detailFloatIp } from 'views/resource/ctstack/services/floatips.js'
@ -42,9 +42,8 @@ import { getRegion } from 'views/resource/ctstack/services/regions.js'
import service from './service/index.vue' import service from './service/index.vue'
import modifyCluster from './modifyCluster.vue' import modifyCluster from './modifyCluster.vue'
import deleteCluster from './deleteCluster.vue' import deleteCluster from './deleteCluster.vue'
import addCluster from './addCluster.vue'
import webSocket from '@cmp/cmp-common/mixins/getGlobalSocket' import webSocket from '@cmp/cmp-common/mixins/getGlobalSocket'
import detail from './detail' import detail from './detail.vue'
import AssignTenant from 'views/platform/assign/index.vue' import AssignTenant from 'views/platform/assign/index.vue'
const Clustercolumns = [ const Clustercolumns = [
{ {
@ -111,7 +110,6 @@ export default {
service, service,
modifyCluster, modifyCluster,
deleteCluster, deleteCluster,
addCluster,
detail, detail,
AssignTenant AssignTenant
}, },
@ -156,10 +154,6 @@ export default {
dialog: false, dialog: false,
data: {} data: {}
}, },
addClusterData: {
dialog: false,
data: {}
},
deleteClusterData: { deleteClusterData: {
dialog: false, dialog: false,
data: {} data: {}

View File

@ -9,7 +9,7 @@
</template> </template>
</cb-advance-table> </cb-advance-table>
</div> </div>
<div style="padding-top: 20px; padding-ledt: 10px"> <div style="padding-top: 20px; padding-left: 10px">
<el-checkbox disabled checked>销毁按量计费的节点销毁后不可恢复请谨慎操作并提前备份好数据</el-checkbox> <el-checkbox disabled checked>销毁按量计费的节点销毁后不可恢复请谨慎操作并提前备份好数据</el-checkbox>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

View File

@ -48,13 +48,13 @@
<el-tab-pane label="节点管理" name="instance"> <el-tab-pane label="节点管理" name="instance">
<instance :detail="detail"></instance> <instance :detail="detail"></instance>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="伸缩组" name="2"> <el-tab-pane label="伸缩组" name="2" v-if="false">
<flexible :clusterInfo="detail" :vendor-id="detail.vendorId"></flexible> <flexible :clusterInfo="detail" :vendor-id="detail.vendorId"></flexible>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="地域列表" name="3"> <el-tab-pane label="地域列表" name="3" v-if="false">
<region :detail="detail" :platform-object="platformObject"></region> <region :detail="detail" :platform-object="platformObject"></region>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="密钥信息" name="4"> <el-tab-pane label="密钥信息" name="4" v-if="false">
<key :detail="detail"></key> <key :detail="detail"></key>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>

View File

@ -6,7 +6,7 @@
<script> <script>
import cluster from './cluster.vue' import cluster from './cluster.vue'
// TCE // container TCE ,
export default { export default {
props: { props: {
platformObject: { platformObject: {

View File

@ -94,15 +94,15 @@ const columns = [
{ {
label: '创建时间', label: '创建时间',
prop: 'createTime' prop: 'createTime'
},
{
label: '操作',
prop: 'id',
width: '200px',
disabled: true,
showOverflowTooltip: false,
scopedSlots: { customRender: 'operate' }
} }
// {
// label: '',
// prop: 'id',
// width: '200px',
// disabled: true,
// showOverflowTooltip: false,
// scopedSlots: { customRender: 'operate' }
// }
] ]
export default { export default {
components: { components: {

View File

@ -13,7 +13,6 @@ export default {
ctstackFloatIp: () => import('views/resource/ctstack/page/floatIp/index.vue'), ctstackFloatIp: () => import('views/resource/ctstack/page/floatIp/index.vue'),
ctstackSnapshot: () => import('views/resource/ctstack/page/snapshot/index.vue'), ctstackSnapshot: () => import('views/resource/ctstack/page/snapshot/index.vue'),
ctstackContainer: () => import('views/resource/ctstack/page/container/index.vue'), ctstackContainer: () => import('views/resource/ctstack/page/container/index.vue'),
ctstackClusterAdd: () => import('views/resource/ctstack/page/container/addCluster.vue'),
ctstackCreateCluster: () => import('views/resource/ctstack/page/container/creatCluster/index.vue'), ctstackCreateCluster: () => import('views/resource/ctstack/page/container/creatCluster/index.vue'),
ctstackInstanceAdd: () => import('views/resource/ctstack/page/container/instance/create/index.vue'), ctstackInstanceAdd: () => import('views/resource/ctstack/page/container/instance/create/index.vue'),
ctstackAddBareMetal: () => import('views/resource/ctstack/page/bareMetal/addBareMetal.vue'), ctstackAddBareMetal: () => import('views/resource/ctstack/page/bareMetal/addBareMetal.vue'),