organization.vue 970 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view>
  3. <uni-mall-list :dataList="dataList" :defaultHeadList="defaultHeadList" @change="handleChange"
  4. type="preview"></uni-mall-list>
  5. </view>
  6. </template>
  7. <script>
  8. import {
  9. getPartList
  10. } from '@/request/api/organization.js'
  11. import uniMallList from '@/components/uni-mall-list/uni-mall-list.vue';
  12. export default {
  13. components: {
  14. uniMallList
  15. },
  16. data() {
  17. return {
  18. defaultHeadList: {},
  19. dataList: []
  20. };
  21. },
  22. onLoad() {
  23. this.defaultHeadList = {
  24. name: this.$store.getters.organization.name,
  25. id: new Date().getTime()
  26. }
  27. this.init();
  28. },
  29. methods: {
  30. init() {
  31. getPartList(this.$store.getters.organization.id, this.$store.getters.project.id).then(res => {
  32. if (res.code === 200) {
  33. this.dataList = res.data;
  34. }
  35. console.log(res);
  36. })
  37. },
  38. handleChange(item) {
  39. if (item.type === 'user') {
  40. }
  41. }
  42. }
  43. };
  44. </script>
  45. <style></style>