knowledgeSet.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. bucket_id:''
  28. },
  29. };
  30. },
  31. mounted(){
  32. this.queryForm.bucket_id=this.$route.query.id
  33. },
  34. methods: {
  35. checkAuth(path) {
  36. if (this.roleInfo.is_admin == 1) {
  37. return true;
  38. }
  39. /* let auth=this.authList.filter(o=>o.type==999 && o.path==path);
  40. if(auth.length>0){
  41. return true;
  42. } */
  43. return true;
  44. },
  45. setQuery(e) {
  46. this.queryForm = e;
  47. },
  48. },
  49. };
  50. </script>
  51. <style lang="scss">
  52. .project-search {
  53. padding: 30px;
  54. font-size: 12px;
  55. }
  56. </style>