mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 05:03:49 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -228,7 +228,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { h, reactive, ref } from 'vue';
|
||||
import { h, reactive, ref, onMounted } from 'vue';
|
||||
import { useDialog, useMessage } from 'naive-ui';
|
||||
import { ActionItem, BasicTable, TableAction } from '@/components/Table';
|
||||
import { BasicForm } from '@/components/Form/index';
|
||||
@@ -243,7 +243,7 @@
|
||||
import QrcodeVue from 'qrcode.vue';
|
||||
import AddBalance from './addBalance.vue';
|
||||
import AddIntegral from './addIntegral.vue';
|
||||
import { addNewState, addState, options, register, defaultState } from './model';
|
||||
import { addNewState, addState, options, register, defaultState, loadOptions } from './model';
|
||||
import { usePermission } from '@/hooks/web/usePermission';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { LoginRoute } from '@/router';
|
||||
@@ -518,11 +518,15 @@
|
||||
formParams.value = addNewState(record as addState);
|
||||
}
|
||||
|
||||
function handleInviteQR(code: string) {
|
||||
function handleInviteQR(code: any) {
|
||||
const domain = getNowUrl() + '#';
|
||||
qrParams.value.qrUrl = domain + LoginRoute.path + '?scope=register&inviteCode=' + code;
|
||||
showQrModal.value = true;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await loadOptions();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
@@ -178,7 +178,7 @@ export const options = ref<any>({
|
||||
post: [],
|
||||
});
|
||||
|
||||
async function loadOptions() {
|
||||
export async function loadOptions() {
|
||||
const dept = await getDeptOption();
|
||||
if (dept.list !== undefined) {
|
||||
options.value.dept = dept.list;
|
||||
@@ -187,6 +187,7 @@ async function loadOptions() {
|
||||
const role = await getRoleOption();
|
||||
if (role.list !== undefined) {
|
||||
options.value.role = role.list;
|
||||
options.value.roleTabs = [{ id: -1, name: '全部' }];
|
||||
treeDataToCompressed(role.list);
|
||||
}
|
||||
|
||||
@@ -207,8 +208,5 @@ function treeDataToCompressed(source) {
|
||||
? treeDataToCompressed(source[i].children)
|
||||
: ''; // 子级递归
|
||||
}
|
||||
|
||||
return options.value.roleTabs;
|
||||
}
|
||||
|
||||
await loadOptions();
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
function handleBeforeLeave(tabName: string) {
|
||||
function handleBeforeLeave(tabName: string): boolean | Promise<boolean> {
|
||||
defaultTab.value = tabName;
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user