|
@@ -23,7 +23,7 @@
|
|
|
</EditDialog>
|
|
</EditDialog>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
|
|
|
|
+import { ref, computed } from 'vue'
|
|
|
import PagingTable from '@/components/PagingTable.vue'
|
|
import PagingTable from '@/components/PagingTable.vue'
|
|
|
import { useTimeFormatter } from '@/utils/formatter'
|
|
import { useTimeFormatter } from '@/utils/formatter'
|
|
|
import { Plus } from '@vicons/tabler'
|
|
import { Plus } from '@vicons/tabler'
|
|
@@ -39,7 +39,13 @@ import { storeToRefs } from 'pinia'
|
|
|
import { useUserStore } from '@/stores/user'
|
|
import { useUserStore } from '@/stores/user'
|
|
|
|
|
|
|
|
const { user } = storeToRefs(useUserStore())
|
|
const { user } = storeToRefs(useUserStore())
|
|
|
-const where = ref({})
|
|
|
|
|
|
|
+const role = computed(() => user.value?.roles[0])
|
|
|
|
|
+const where = computed(() => {
|
|
|
|
|
+ if (role.value === 'admin') return {}
|
|
|
|
|
+ return {
|
|
|
|
|
+ orgId: user.value.orgId
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
const timeFormatter = useTimeFormatter()
|
|
const timeFormatter = useTimeFormatter()
|
|
|
const table = ref(null)
|
|
const table = ref(null)
|
|
|
const model = ref({})
|
|
const model = ref({})
|