enterprisexx.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div id="adviserList">
  3. <enterprisexx-detail :info="info" :liebiaoList="liebiaoList" @onsave="onsaveClick"></enterprisexx-detail>
  4. <!-- @detailcm="clickDetailcm" -->
  5. </div>
  6. </template>
  7. <script>
  8. import enterprisexxDetail from '@/components/enterprise/enterprisexx.vue';
  9. import { createNamespacedHelpers, mapGetters } from 'vuex';
  10. const { mapActions: mapSite } = createNamespacedHelpers('site');
  11. const { mapActions: mapRecruit } = createNamespacedHelpers('market');
  12. export default {
  13. name: 'adviserList',
  14. props: {},
  15. components: {
  16. enterprisexxDetail,
  17. },
  18. data: () => ({
  19. info: {},
  20. liebiaoList: [{ name: '基本信息' }, { name: '消息管理' }, { name: '我的发布' }, { name: '我的订购' }, { name: '注销账号' }],
  21. columnName: '',
  22. recruitData: [],
  23. }),
  24. created() {
  25. this.searchSite();
  26. },
  27. computed: {},
  28. methods: {
  29. ...mapSite(['showInfo']),
  30. ...mapRecruit({ columnList: 'query', columnInfo: 'fetch' }),
  31. // 查询站点信息
  32. async searchSite() {
  33. let res = await this.showInfo();
  34. let object = JSON.parse(JSON.stringify(res.data));
  35. if (object) {
  36. this.$set(this, `info`, res.data);
  37. } else {
  38. this.$message.error(res.errmsg ? res.errmsg : 'error');
  39. }
  40. },
  41. async onsaveClick({ id }) {
  42. console.log(id);
  43. if (id === '基本信息') {
  44. this.$router.push({ path: '/enterprise/enterprisejb' });
  45. } else if (id === '消息管理') {
  46. this.$router.push({ path: '/enterprise/enterprisexx' });
  47. } else if (id === '我的发布') {
  48. this.$router.push({ path: '/enterprise/enterprisefabu' });
  49. } else if (id === '我的订购') {
  50. this.$router.push({ path: '/enterprise/enterprisedg' });
  51. }
  52. },
  53. },
  54. };
  55. </script>
  56. <style lang="less" scoped></style>