<template>
|
<div v-loading="loading">
|
<el-tabs size="small" v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tab-pane label="基础设置" name="basic"></el-tab-pane>
|
<el-tab-pane label="入会协议" name="license"></el-tab-pane>
|
<el-tab-pane label="自定义文字" name="words"></el-tab-pane>
|
</el-tabs>
|
|
<!--基础设置-->
|
<Basic v-if="activeName == 'basic'" :settingData="settingData"></Basic>
|
<!--入会协议-->
|
<License v-if="activeName == 'license'" :settingData="settingData"></License>
|
<!--入会协议-->
|
<Words v-if="activeName == 'words'" :settingData="settingData"></Words>
|
</div>
|
</template>
|
<script>
|
import BranchApi from '@/api/branch.js';
|
import Basic from './part/Basic';
|
import License from './part/License';
|
import Words from './part/Words';
|
export default {
|
components: {
|
/*编辑组件*/
|
Basic,
|
License,
|
Words
|
},
|
data() {
|
return {
|
/*是否正在加载*/
|
loading:true,
|
/*当前选中*/
|
activeName: '',
|
/*数据对象*/
|
settingData:{}
|
};
|
},
|
created() {
|
if (this.$route.query.type != null) {
|
this.activeName = this.$route.query.type;
|
}
|
this.getData();
|
},
|
methods: {
|
|
/*获取数据*/
|
getData() {
|
let self = this;
|
BranchApi.branchSet({}, true)
|
.then(res => {
|
self.settingData = res.data;
|
self.loading = false;
|
self.activeName = 'basic';
|
})
|
.catch(error => {});
|
},
|
|
handleClick(e) {
|
this.activeName = e.name;
|
}
|
}
|
};
|
</script>
|