功能优化

This commit is contained in:
zxy
2024-02-27 20:33:33 +08:00
parent 857390a8d6
commit 865e22bfcd
3 changed files with 27 additions and 37 deletions

View File

@@ -63,7 +63,10 @@
</template>
<template slot="status" slot-scope="{ row }">
<div>
<span>
<span v-if="row.status == 1" style="color: green">
<b>{{ statusArr[row.status] }}</b>
</span>
<span v-if="row.status == 0" style="color: red">
<b>{{ statusArr[row.status] }}</b>
</span>
</div>
@@ -109,7 +112,7 @@
icon="el-icon-video-pause"
size="small"
@click="pauseServe(row)"
>暂停</el-button>
>关闭</el-button>
</template>
<!--/父子表-->
</avue-crud>
@@ -222,10 +225,10 @@
:append-to-body="true"
:before-close="handleCloseLog"
:visible.sync="innerDrawer3">
<div>
<!-- <div>
<span>姓名</span>
<span>身份证号</span>
</div>
</div> -->
<avue-crud
:data="logData"
:option="logOption"
@@ -1214,13 +1217,14 @@ export default {
},
// 启用服务
playServe(row) {
console.log(row)
update({
id: row.id,
status: 1
}).then(
() => {
// done();
this.$confirm('是否确认启用该服务?', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
return update({id: row.id, status: 1})
}).then(
() => {
this.$message({
type: "success",
message: "启用成功!",
@@ -1229,29 +1233,26 @@ export default {
},
(error) => {
window.console.log(error);
// done();
}
);
})
},
pauseServe(row) {
console.log(row)
update({
id: row.id,
status: 0
}).then(
() => {
// done();
this.$confirm('是否确认关闭该服务?', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
return update({id: row.id, status: 0})
}).then(
() => {
this.$message({
type: "success",
message: "暂停成功!",
message: "关闭成功!",
});
this.refresh();
},
(error) => {
window.console.log(error);
// done();
}
);
})
}
},
};