12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <div id="adviserList">
- <enterprisejb-detail
- :info="info"
- :form="form"
- @onSubmit="onSubmit"
- :liebiaoList="liebiaoList"
- @onsave="onsaveClick"
- :userinfo="userinfo"
- ></enterprisejb-detail>
- </div>
- </template>
- <script>
- import enterprisejbDetail from '@/components/enterprise/enterprisejb.vue';
- import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
- const { mapActions: login } = createNamespacedHelpers('login');
- const { mapActions: market } = createNamespacedHelpers('market');
- export default {
- name: 'adviserList',
- props: {},
- components: {
- enterprisejbDetail,
- },
- data: () => ({
- form: {},
- info: {},
- liebiaoList: [
- { name: '基本信息' },
- { name: '消息管理' },
- { name: '我的发布' },
- { name: '事项管理' },
- { name: '展会管理' },
- // { name: '返回首页' },
- { name: '修改密码' },
- { name: '注销账号' },
- ],
- userinfo: {},
- }),
- created() {
- this.searchInfo();
- },
- computed: {
- ...mapState(['user']),
- },
- methods: {
- ...market(['fetch', 'update']),
- ...login({ logout: 'logout', transactiondtetle: 'delete' }),
- // 查询基本信息
- async searchInfo() {
- let res = await this.fetch(this.user.userid);
- if (res.errcode === 0) {
- this.$set(this, `form`, res.data);
- }
- },
- async onSubmit({ data }) {
- console.log(data);
- let res;
- let msg;
- res = await this.update(data);
- },
- async onsaveClick({ id }) {
- console.log(id);
- if (id === '基本信息') {
- this.$router.push({ path: '/enterprise/enterprisejb' });
- } else if (id === '消息管理') {
- this.$router.push({ path: '/enterprise/enterprisexx' });
- } else if (id === '我的发布') {
- this.$router.push({ path: '/enterprise/enterprisefabu' });
- } else if (id === '事项管理') {
- this.$router.push({ path: '/enterprise/enterprisedg' });
- } else if (id === '展会管理') {
- this.$router.push({ path: '/enterprise/appointment' });
- } else if (id === '修改密码') {
- this.$router.push({ path: '/enterprise/xiugai' });
- } else if (id === '返回首页') {
- this.$router.push({ path: '/' });
- } else if (id === '注销账号') {
- this.logout();
- this.$message({
- message: '注销成功',
- type: 'success',
- });
- this.toLogin();
- }
- },
- async toLogin() {
- this.$router.push({ path: '/platlive' });
- },
- },
- };
- </script>
- <style lang="less" scoped></style>
|