| | |
| | | import { getCurrentInstance, reactive, toRefs } from "vue"; |
| | | import MaterialDialog from "./components/MaterialDialog.vue"; |
| | | import FileList from "@/components/Dialog/FileList.vue"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | disabled: row => row.planQuantity <= 0, |
| | | disabled: row => { |
| | | if (row.planQuantity <= 0) return true; |
| | | if (!row.userIds) return true; |
| | | try { |
| | | const userIds = |
| | | typeof row.userIds === "string" |
| | | ? JSON.parse(row.userIds) |
| | | : row.userIds; |
| | | if (Array.isArray(userIds)) { |
| | | return !userIds.some(id => String(id) === String(userStore.id)); |
| | | } |
| | | return true; |
| | | } catch (e) { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | userStore.getInfo(); |
| | | getList(); |
| | | // 获取用户列表 |
| | | userListNoPageByTenantId().then(res => { |