Browse Source

删除冗余信息

SJA-develop
liwei 3 years ago
parent
commit
807c77916f
1 changed files with 69 additions and 56 deletions
  1. +69
    -56
      src/views/etcd/index.vue

+ 69
- 56
src/views/etcd/index.vue View File

@ -1,8 +1,16 @@
<template>
<div>
<SearchTemplate>
<el-button icon="el-icon-refresh" size="mini" class="reset-button-style" @click="getList">刷新</el-button>
<el-button icon="el-icon-plus" class="add-button-style" @click="handleAdd">新增</el-button>
<el-button
icon="el-icon-refresh"
size="mini"
class="reset-button-style"
@click="getList"
>刷新</el-button
>
<el-button icon="el-icon-plus" class="add-button-style" @click="handleAdd"
>新增</el-button
>
</SearchTemplate>
<!-- 页面主题容器 -->
<ContentContainer>
@ -74,13 +82,18 @@
</template>
</el-table-column>
</el-table>
<AddOrEdit v-if="isShowDialog" :item="item" :isShowDialog="isShowDialog" @editCallBack="completeCallBack"/>
<AddOrEdit
v-if="isShowDialog"
:item="item"
:isShowDialog="isShowDialog"
@editCallBack="completeCallBack"
/>
</ContentContainer>
</div>
</template>
<script>
import SearchTemplate from "../../components/SearchTemplate.vue"
import SearchTemplate from "../../components/SearchTemplate.vue";
import ContentContainer from "../../components/ContentContainer.vue";
import { ListMixin } from "@/mixins/ListMixin";
import AddOrEdit from "./AddOrEdit.vue";
@ -107,7 +120,7 @@ export default {
};
},
created() {
this.pagination.path='/services';
this.pagination.path = "/services";
},
methods: {
// status
@ -117,68 +130,68 @@ export default {
},
//
handleAdd() {
this.changeDialogStatus('add');
this.changeDialogStatus("add");
},
//
cmdStart(item) {
this.loading=true,
get('/v1/keys/cmd', {
cmd:'start',
service_path:item.service_path
}).then(({code, data})=>{
this.loading=false;
if(code==200){
this.msgSuccess("启动成功,请稍后刷新列表数据");
this.getList();
}
})
(this.loading = true),
get("/v1/keys/cmd", {
cmd: "start",
service_path: item.service_path,
}).then(({ code }) => {
this.loading = false;
if (code == 200) {
this.msgSuccess("启动成功,请稍后刷新列表数据");
this.getList();
}
});
},
//
cmdPause(item){
this.loading=true,
get('/v1/keys/cmd', {
cmd:'pause',
service_path:item.service_path
}).then(({code, data})=>{
this.loading=false;
if(code==200){
this.msgSuccess("暂停成功,请稍后刷新列表数据");
this.getList();
}
})
cmdPause(item) {
(this.loading = true),
get("/v1/keys/cmd", {
cmd: "pause",
service_path: item.service_path,
}).then(({ code }) => {
this.loading = false;
if (code == 200) {
this.msgSuccess("暂停成功,请稍后刷新列表数据");
this.getList();
}
});
},
//
cmdRecover(item){
this.loading=true,
get('/v1/keys/cmd', {
cmd:'recover',
service_path:item.service_path
}).then(({code, data})=>{
this.loading=false;
if(code==200){
this.msgSuccess("恢复成功,请稍后刷新列表数据");
this.getList();
}
})
cmdRecover(item) {
(this.loading = true),
get("/v1/keys/cmd", {
cmd: "recover",
service_path: item.service_path,
}).then(({ code }) => {
this.loading = false;
if (code == 200) {
this.msgSuccess("恢复成功,请稍后刷新列表数据");
this.getList();
}
});
},
//
cmdStop(item){
this.loading=true,
get('/v1/keys/cmd', {
cmd:'stop',
service_path:item.service_path
}).then(({code, data})=>{
this.loading=false;
if(code==200){
this.msgSuccess("停止成功,请稍后刷新列表数据");
this.getList();
}
})
cmdStop(item) {
(this.loading = true),
get("/v1/keys/cmd", {
cmd: "stop",
service_path: item.service_path,
}).then(({ code }) => {
this.loading = false;
if (code == 200) {
this.msgSuccess("停止成功,请稍后刷新列表数据");
this.getList();
}
});
},
//
handleDelete(row) {
this.delHanle('/v1/keys', {service_path: row.service_path})
}
handleDelete(row) {
this.delHanle("/v1/keys", { service_path: row.service_path });
},
},
};
</script>

Loading…
Cancel
Save