Lines 25-31
Link Here
|
25 |
|
25 |
|
26 |
<script> |
26 |
<script> |
27 |
import Toolbar from "./EHoldingsLocalPackagesToolbar.vue" |
27 |
import Toolbar from "./EHoldingsLocalPackagesToolbar.vue" |
28 |
import { inject, ref } from "vue" |
28 |
import { inject, ref, reactive } from "vue" |
29 |
import { storeToRefs } from "pinia" |
29 |
import { storeToRefs } from "pinia" |
30 |
import { APIClient } from "../../fetch/api-client.js" |
30 |
import { APIClient } from "../../fetch/api-client.js" |
31 |
import { useDataTable } from "../../composables/datatables" |
31 |
import { useDataTable } from "../../composables/datatables" |
Lines 42-53
export default {
Link Here
|
42 |
const { setConfirmationDialog, setMessage } = inject("mainStore") |
42 |
const { setConfirmationDialog, setMessage } = inject("mainStore") |
43 |
|
43 |
|
44 |
const table = ref() |
44 |
const table = ref() |
|
|
45 |
const filters = reactive({ |
46 |
package_name: "", |
47 |
content_type: "", |
48 |
}) |
45 |
|
49 |
|
46 |
return { |
50 |
return { |
47 |
vendors, |
51 |
vendors, |
48 |
get_lib_from_av, |
52 |
get_lib_from_av, |
49 |
map_av_dt_filter, |
53 |
map_av_dt_filter, |
50 |
table, |
54 |
table, |
|
|
55 |
filters, |
51 |
setConfirmationDialog, |
56 |
setConfirmationDialog, |
52 |
setMessage, |
57 |
setMessage, |
53 |
escape_str, |
58 |
escape_str, |
Lines 55-67
export default {
Link Here
|
55 |
} |
60 |
} |
56 |
}, |
61 |
}, |
57 |
data: function () { |
62 |
data: function () { |
|
|
63 |
this.filters = { |
64 |
package_name: this.$route.query.package_name || "", |
65 |
content_type: this.$route.query.content_type || "", |
66 |
} |
67 |
let filters = this.filters |
58 |
return { |
68 |
return { |
59 |
package_count: [], |
69 |
package_count: [], |
60 |
initialized: false, |
70 |
initialized: false, |
61 |
tableOptions: { |
71 |
tableOptions: { |
62 |
columns: this.getTableColumns(), |
72 |
columns: this.getTableColumns(), |
63 |
url: "/api/v1/erm/eholdings/local/packages", |
73 |
url: "/api/v1/erm/eholdings/local/packages", |
64 |
options: { embed: "resources+count,vendor.name" }, |
74 |
options: { |
|
|
75 |
embed: "resources+count,vendor.name", |
76 |
searchCols: [ |
77 |
{ search: filters.package_name }, |
78 |
null, |
79 |
null, |
80 |
{ search: filters.content_type }, |
81 |
null, |
82 |
null, |
83 |
], |
84 |
}, |
65 |
table_settings: this.eholdings_packages_table_settings, |
85 |
table_settings: this.eholdings_packages_table_settings, |
66 |
add_filters: true, |
86 |
add_filters: true, |
67 |
filters_options: { |
87 |
filters_options: { |
68 |
- |
|
|