|
@ -32,7 +32,9 @@ |
|
|
:approved="approved" |
|
|
:approved="approved" |
|
|
:disabled="currentDoc ? false : true" |
|
|
:disabled="currentDoc ? false : true" |
|
|
/> |
|
|
/> |
|
|
<filter-button /> |
|
|
|
|
|
|
|
|
<filter-button |
|
|
|
|
|
v-model="filterOption" |
|
|
|
|
|
/> |
|
|
<guideline-button /> |
|
|
<guideline-button /> |
|
|
</v-col> |
|
|
</v-col> |
|
|
<v-spacer /> |
|
|
<v-spacer /> |
|
@ -92,12 +94,13 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
drawerLeft: null, |
|
|
drawerLeft: null, |
|
|
|
|
|
filterOption: null, |
|
|
limit: 10 |
|
|
limit: 10 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters('projects', ['getLink', 'getCurrentUserRole']), |
|
|
|
|
|
|
|
|
...mapGetters('projects', ['getLink', 'getCurrentUserRole', 'getFilterOption']), |
|
|
...mapState('documents', ['loading', 'total']), |
|
|
...mapState('documents', ['loading', 'total']), |
|
|
...mapGetters('documents', ['currentDoc', 'approved']), |
|
|
...mapGetters('documents', ['currentDoc', 'approved']), |
|
|
page: { |
|
|
page: { |
|
@ -124,15 +127,14 @@ export default { |
|
|
watch: { |
|
|
watch: { |
|
|
offset: { |
|
|
offset: { |
|
|
handler() { |
|
|
handler() { |
|
|
this.getDocumentList({ |
|
|
|
|
|
projectId: this.$route.params.id, |
|
|
|
|
|
limit: this.limit, |
|
|
|
|
|
offset: this.offset, |
|
|
|
|
|
q: this.$route.query.q |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.search() |
|
|
}, |
|
|
}, |
|
|
immediate: true |
|
|
immediate: true |
|
|
}, |
|
|
}, |
|
|
|
|
|
filterOption() { |
|
|
|
|
|
this.page = 1 |
|
|
|
|
|
this.search() |
|
|
|
|
|
}, |
|
|
current: { |
|
|
current: { |
|
|
handler() { |
|
|
handler() { |
|
|
this.setCurrent(this.current) |
|
|
this.setCurrent(this.current) |
|
@ -148,7 +150,17 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
...mapActions('projects', ['setCurrentProject']), |
|
|
...mapActions('projects', ['setCurrentProject']), |
|
|
...mapActions('documents', ['getDocumentList']), |
|
|
...mapActions('documents', ['getDocumentList']), |
|
|
...mapMutations('documents', ['setCurrent']) |
|
|
|
|
|
|
|
|
...mapMutations('documents', ['setCurrent']), |
|
|
|
|
|
search() { |
|
|
|
|
|
this.getDocumentList({ |
|
|
|
|
|
projectId: this.$route.params.id, |
|
|
|
|
|
limit: this.limit, |
|
|
|
|
|
offset: this.offset, |
|
|
|
|
|
q: this.$route.query.q, |
|
|
|
|
|
isChecked: this.filterOption, |
|
|
|
|
|
filterName: this.getFilterOption |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
validate({ params, query }) { |
|
|
validate({ params, query }) { |
|
|