enterprisedg.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div id="adviserList">
  3. <enterprisedg-detail
  4. :info="info"
  5. :recruitData="recruitData"
  6. :liebiaoList="liebiaoList"
  7. @onsave="onsaveClick"
  8. :columnName="columnName"
  9. ></enterprisedg-detail>
  10. </div>
  11. </template>
  12. <script>
  13. import enterprisedgDetail from '@/components/enterprise/enterpisedg.vue';
  14. import { createNamespacedHelpers, mapGetters } from 'vuex';
  15. const { mapActions: mapSite } = createNamespacedHelpers('site');
  16. const { mapActions: mapRecruit } = createNamespacedHelpers('enterpriseproject');
  17. export default {
  18. name: 'adviserList',
  19. props: {},
  20. components: {
  21. enterprisedgDetail,
  22. },
  23. data: () => ({
  24. info: {},
  25. liebiaoList: [{ name: '基本信息' }, { name: '消息管理' }, { name: '我的发布' }, { name: '我的订购' }, { name: '注销账号' }],
  26. columnName: '',
  27. recruitData: [],
  28. }),
  29. created() {
  30. this.searchSite();
  31. this.searchColumn();
  32. },
  33. computed: {},
  34. methods: {
  35. ...mapSite(['showInfo']),
  36. ...mapRecruit({ recruitList: 'query' }),
  37. // 查询站点信息
  38. async searchSite() {
  39. let res = await this.showInfo();
  40. let object = JSON.parse(JSON.stringify(res.data));
  41. if (object) {
  42. this.$set(this, `info`, res.data);
  43. } else {
  44. this.$message.error(res.errmsg ? res.errmsg : 'error');
  45. }
  46. },
  47. // 查询科技政务栏目
  48. async searchColumn({ skip = 0, limit = 10, column_id } = {}) {
  49. const res = await this.recruitList({ skip, limit, column_id: this.$route.query.id });
  50. console.log();
  51. if (this.$checkRes(res)) {
  52. this.$set(this, `recruitData`, res.data);
  53. console.log(res.data);
  54. }
  55. },
  56. async onsaveClick({ id }) {
  57. console.log(id);
  58. if (id === '基本信息') {
  59. this.$router.push({ path: '/enterprise/enterprisejb' });
  60. } else if (id === '消息管理') {
  61. this.$router.push({ path: '/enterprise/enterprisexx' });
  62. } else if (id === '我的发布') {
  63. this.$router.push({ path: '/enterprise/enterprisefabu' });
  64. } else if (id === '我的订购') {
  65. this.$router.push({ path: '/enterprise/enterprisedg' });
  66. }
  67. },
  68. },
  69. };
  70. </script>
  71. <style lang="less" scoped></style>