mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 10:36:31 +08:00
修复流程返回路由错乱的bug
This commit is contained in:
@@ -5,15 +5,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
const emit = defineEmits<{ close: [] }>();
|
const emit = defineEmits<{ close: [] }>();
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
const onCancel = () => {
|
const onCancel = () => {
|
||||||
// TODO 刷新父页面
|
|
||||||
router.go(-1);
|
|
||||||
emit('close');
|
emit('close');
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -143,6 +143,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject, reactive, ref } from 'vue';
|
import { inject, reactive, ref } from 'vue';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import { ANY_OBJECT } from '@/types/generic';
|
import { ANY_OBJECT } from '@/types/generic';
|
||||||
import { SysDeptPost } from '@/types/upms/department';
|
import { SysDeptPost } from '@/types/upms/department';
|
||||||
import { usePermissions } from '@/common/hooks/usePermission';
|
import { usePermissions } from '@/common/hooks/usePermission';
|
||||||
@@ -159,9 +160,11 @@ import FormSetDeptPost from './formSetDeptPost.vue';
|
|||||||
const Dialog = useDialog();
|
const Dialog = useDialog();
|
||||||
const props = defineProps<{ closeVisible: string; deptId: string }>();
|
const props = defineProps<{ closeVisible: string; deptId: string }>();
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
console.log('返回父级页面');
|
console.log('返回父级页面');
|
||||||
|
router.go(-1);
|
||||||
};
|
};
|
||||||
|
|
||||||
const { checkPermCodeExist } = usePermissions();
|
const { checkPermCodeExist } = usePermissions();
|
||||||
|
|||||||
Reference in New Issue
Block a user