服务启用暂停

This commit is contained in:
zxy
2024-02-27 19:21:26 +08:00
parent a0ed079a9b
commit f67cecb553

View File

@@ -98,42 +98,21 @@
size="small" size="small"
@click="showKeyAudience(row)" @click="showKeyAudience(row)"
>服务详情</el-button> >服务详情</el-button>
<el-button type="text"
v-if="row.status == 0"
icon="el-icon-video-play"
size="small"
@click="playServe(row)"
>启用</el-button>
<el-button type="text"
v-if="row.status == 1"
icon="el-icon-video-pause"
size="small"
@click="pauseServe(row)"
>暂停</el-button>
</template> </template>
<!--/父子表--> <!--/父子表-->
</avue-crud> </avue-crud>
<!-- / 重点人群详情 -->
<!-- <el-dialog title="服务详情" :visible.sync="visibleAudience" :close-on-click-modal="false" append-to-body width="70%">
<avue-crud
:data="infoData"
:option="infoOption"
:page.sync="infoPage"
@size-change="infoSizeChange"
@current-change="infoCurrentChange"
class="customPage"
>
<template slot-scope="{row,index}" slot="menu">
<el-button type="text"
icon="el-icon-document"
size="small"
@click="matchWorkStation(row)"
>匹配任务/岗位</el-button>
<el-button type="text"
icon="el-icon-document"
size="small"
@click="matchPolicy(row)"
>匹配政策</el-button>
<el-button type="text"
icon="el-icon-document"
size="small"
@click="serveLog(row)"
>服务日志</el-button>
</template>
</avue-crud>
</el-dialog> -->
<!--批量导入--> <!--批量导入-->
<el-dialog title="导入" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px"> <el-dialog title="导入" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter" <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"
@@ -209,9 +188,7 @@
@current-change="workCurrentChange" @current-change="workCurrentChange"
> >
<template slot="missionDesc" slot-scope="{ row }"> <template slot="missionDesc" slot-scope="{ row }">
<!-- {{ row.missionDesc }} -->
<el-tooltip class="item" effect="dark" :content="row.missionDesc" placement="top-start"> <el-tooltip class="item" effect="dark" :content="row.missionDesc" placement="top-start">
<!-- <el-button>上左</el-button> -->
<span>{{ row.missionDesc.length > 50 ? row.missionDesc.substring(0, 50) : row.missionDesc}}</span> <span>{{ row.missionDesc.length > 50 ? row.missionDesc.substring(0, 50) : row.missionDesc}}</span>
</el-tooltip> </el-tooltip>
</template> </template>
@@ -292,8 +269,6 @@ import ied from "@/views/util/import-error-dialog";
import { excelAccept } from "@/common/accept"; import { excelAccept } from "@/common/accept";
import missionView from "../../mission/Table/missionView.vue"; import missionView from "../../mission/Table/missionView.vue";
import workView from "../../works/Table/missionView.vue" import workView from "../../works/Table/missionView.vue"
// import ServeDetail from './Dialog/ServeDetail.vue'
// import CopyMission from "../mission/Dialog/CopyMission";
const page = { const page = {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@@ -651,12 +626,6 @@ export default {
label: "标签", label: "标签",
prop: "labelsBase", prop: "labelsBase",
}, },
// {
// label: "备注",
// prop: "remarks",
// },
] ]
} }
}, },
@@ -707,7 +676,6 @@ export default {
this.getKeyAudience({ this.getKeyAudience({
id: row.id id: row.id
}) })
// this.$refs.copy.onLoad();
this.drawer = true; this.drawer = true;
}, },
getKeyAudience(params) { getKeyAudience(params) {
@@ -795,8 +763,6 @@ export default {
} }
} }
this.personTotal = res.data.data.sum; this.personTotal = res.data.data.sum;
// this.onLoad();
//this.treeData.push(treeDataOne);
this.loading = false; this.loading = false;
}); });
}, },
@@ -853,10 +819,6 @@ export default {
); );
}) })
.catch(() => { .catch(() => {
// this.$message({
// type: 'info',
// message: '已取消'
// });
}); });
}, },
/*批量转移分组 */ /*批量转移分组 */
@@ -1250,6 +1212,47 @@ export default {
} }
}, },
// 启用服务
playServe(row) {
console.log(row)
update({
id: row.id,
status: 1
}).then(
() => {
// done();
this.$message({
type: "success",
message: "启用成功!",
});
this.refresh();
},
(error) => {
window.console.log(error);
// done();
}
);
},
pauseServe(row) {
console.log(row)
update({
id: row.id,
status: 0
}).then(
() => {
// done();
this.$message({
type: "success",
message: "暂停成功!",
});
this.refresh();
},
(error) => {
window.console.log(error);
// done();
}
);
}
}, },
}; };
</script> </script>