mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-25 16:25:07 +08:00
refactor: vue3.3 defineOptions
This commit is contained in:
@ -21,11 +21,13 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="SystemUserDeptTree" setup>
|
||||
<script lang="ts" setup>
|
||||
import { ElTree } from 'element-plus'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
|
||||
defineOptions({ name: 'SystemUserDeptTree' })
|
||||
|
||||
const deptName = ref('')
|
||||
const deptList = ref<Tree[]>([]) // 树形结构
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||
|
@ -19,11 +19,13 @@
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemUserAssignRoleForm" setup>
|
||||
<script lang="ts" setup>
|
||||
import * as PermissionApi from '@/api/system/permission'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
|
||||
defineOptions({ name: 'SystemUserAssignRoleForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemUserForm" setup>
|
||||
<script lang="ts" setup>
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
@ -103,6 +103,8 @@ import * as PostApi from '@/api/system/post'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
|
||||
defineOptions({ name: 'SystemUserForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
@ -40,11 +40,13 @@
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemUserImportForm" setup>
|
||||
<script lang="ts" setup>
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
import download from '@/utils/download'
|
||||
|
||||
defineOptions({ name: 'SystemUserImportForm' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
|
@ -198,7 +198,7 @@
|
||||
<!-- 分配角色 -->
|
||||
<UserAssignRoleForm ref="assignRoleFormRef" @success="getList" />
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemUser">
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
@ -209,6 +209,9 @@ import UserForm from './UserForm.vue'
|
||||
import UserImportForm from './UserImportForm.vue'
|
||||
import UserAssignRoleForm from './UserAssignRoleForm.vue'
|
||||
import DeptTree from './DeptTree.vue'
|
||||
|
||||
defineOptions({ name: 'SystemUser' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
|
Reference in New Issue
Block a user