Files
wvp-platform/web_src/src/components/dialog/shareChannel.vue
2024-09-18 11:09:40 +08:00

86 lines
2.2 KiB
Vue
Executable File

<template>
<div id="chooseChannel" >
<el-dialog title="通道共享" v-loading="loading" v-if="showDialog" top="2rem" width="80%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
<el-row>
<el-col :span="24">
<el-container>
<el-main v-bind:style="{backgroundColor: '#FFF', maxHeight: winHeight + 'px'}">
<shareChannelAdd ref="shareChannelAdd" :platformId="platformId"></shareChannelAdd>
</el-main>
</el-container>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import shareChannelAdd from "./shareChannelAdd.vue";
export default {
name: 'chooseChannel',
props: {},
components: {shareChannelAdd},
computed: {},
data() {
return {
loading: false,
tabActiveName: "gbChannel",
catalogTabActiveName: "addShare",
platformId: "",
showDialog: false,
chooseData: {},
winHeight: window.innerHeight - 250,
};
},
methods: {
openDialog(platformId, closeCallback) {
this.platformId = platformId
this.showDialog = true
this.closeCallback = closeCallback
},
tabClick (tab, event){
},
close: function() {
this.closeCallback()
},
search: function() {
},
save: function() {
this.$axios({
method:"post",
url:"/api/platform/update_channel_for_gb",
data:{
platformId: this.platformId,
channelReduces: this.chooseData
}
}).then((res)=>{
if (res.data.code === 0) {
this.$message({
showClose: true,
message: '保存成功,',
type: 'success'
});
}
}).catch(function (error) {
console.log(error);
});
},
catalogIdChange: function (id, name) {
this.catalogId = id;
this.catalogName = name;
},
}
};
</script>
<style>
</style>