功能优化

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();
}
);
})
}
},
};

View File

@@ -340,7 +340,7 @@ export default {
label: "手机号",
prop: "telphone",
span: 24,
hide: true,
hide: false,
rules: [
{
required: true,

View File

@@ -16,18 +16,7 @@
:value="item.value"
></el-option>
</el-select>
<!-- <el-radio-group v-model="search.status" size="small">
<el-radio-button v-for="(item,key,index) in missionTypes" :key="index" :label="item.value">{{item.label}}
</el-radio-button>
</el-radio-group> -->
</el-form-item>
<!-- <el-form-item label="任务编号:">
<el-input v-model="search.missionNo" placeholder="任务编号" clearable></el-input>
</el-form-item> -->
<el-form-item label="">
<el-select v-model="search.state" placeholder="请选择搜索时间类型" style="width: 100%" @change="date">
<el-option