temList.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="project-search">
  3. <dataSearch @bindSetQuery="setQuery"></dataSearch>
  4. <dataList
  5. :queryForm="queryForm"
  6. :allowEdit="checkAuth('/document/update')"
  7. :allowDelete="checkAuth('/document/delete')"
  8. ></dataList>
  9. </div>
  10. </template>
  11. <script>
  12. import { mapGetters } from "vuex";
  13. import { dataSearch, dataList } from "./components";
  14. export default {
  15. components: {
  16. dataSearch,
  17. dataList,
  18. },
  19. computed: {
  20. ...mapGetters(["roleInfo", "authList"]),
  21. },
  22. data() {
  23. return {
  24. queryForm: {
  25. page: 1,
  26. pageSize: 10,
  27. title: "",
  28. category_id: "",
  29. status: "",
  30. },
  31. };
  32. },
  33. methods: {
  34. checkAuth(path) {
  35. /* if (this.roleInfo.is_admin == 1) {
  36. return true;
  37. } */
  38. /* let auth=this.authList.filter(o=>o.type==999 && o.path==path);
  39. if(auth.length>0){
  40. return true;
  41. } */
  42. return true;
  43. },
  44. setQuery(e) {
  45. this.queryForm = e;
  46. },
  47. },
  48. };
  49. </script>
  50. <style lang="scss">
  51. .project-search {
  52. padding: 30px;
  53. font-size: 12px;
  54. }
  55. </style>