fix 修复 vue 类型识别问题

This commit is contained in:
ahao
2023-12-27 12:12:51 +08:00
parent 321f21c498
commit 3922c16601
19 changed files with 204 additions and 91 deletions

View File

@ -131,6 +131,7 @@ import { optionselect as getDictOptionselect, getType } from '@/api/system/dict/
import { listData, getData, delData, addData, updateData } from '@/api/system/dict/data';
import { DictTypeVO } from '@/api/system/dict/type/types';
import { DictDataForm, DictDataQuery, DictDataVO } from '@/api/system/dict/data/types';
import { RouteLocationNormalized } from 'vue-router';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const route = useRoute();
@ -168,7 +169,7 @@ const initFormData: DictDataForm = {
dictLabel: '',
dictValue: '',
cssClass: '',
listClass: 'default',
listClass: '',
dictSort: 0,
remark: ''
};
@ -228,7 +229,17 @@ const handleQuery = () => {
};
/** 返回按钮操作 */
const handleClose = () => {
const obj = { path: '/system/dict' };
const obj: RouteLocationNormalized = {
fullPath: '',
hash: '',
matched: [],
meta: undefined,
name: undefined,
params: undefined,
query: undefined,
redirectedFrom: undefined,
path: '/system/dict'
};
proxy?.$tab.closeOpenPage(obj);
};
/** 重置按钮操作 */

View File

@ -69,6 +69,7 @@ import { allocatedUserList, authUserCancel, authUserCancelAll } from '@/api/syst
import { UserQuery } from '@/api/system/user/types';
import { UserVO } from '@/api/system/user/types';
import SelectUser from './selectUser.vue';
import { RouteLocationNormalized } from 'vue-router';
const route = useRoute();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -102,7 +103,17 @@ const getList = async () => {
};
// 返回按钮
const handleClose = () => {
const obj = { path: '/system/role' };
const obj: RouteLocationNormalized = {
path: '/system/role',
fullPath: '',
hash: '',
matched: [],
meta: undefined,
name: undefined,
params: undefined,
query: undefined,
redirectedFrom: undefined
};
proxy?.$tab.closeOpenPage(obj);
};
/** 搜索按钮操作 */

View File

@ -58,6 +58,7 @@
import { RoleVO } from '@/api/system/role/types';
import { getAuthRole, updateAuthRole } from '@/api/system/user';
import { UserForm } from '@/api/system/user/types';
import { RouteLocationNormalized } from 'vue-router';
const route = useRoute();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -91,7 +92,17 @@ const getRowKey = (row: RoleVO): string => {
};
/** 关闭按钮 */
const close = () => {
const obj = { path: '/system/user' };
const obj: RouteLocationNormalized = {
fullPath: '',
hash: '',
matched: [],
meta: undefined,
name: undefined,
params: undefined,
query: undefined,
redirectedFrom: undefined,
path: '/system/user'
};
proxy?.$tab.closeOpenPage(obj);
};
/** 提交按钮 */

View File

@ -119,6 +119,7 @@ import { optionselect as getDictOptionselect } from '@/api/system/dict/type';
import { DictTypeVO } from '@/api/system/dict/type/types';
import BasicInfoForm from './basicInfoForm.vue';
import GenInfoForm from './genInfoForm.vue';
import { RouteLocationNormalized } from 'vue-router';
const route = useRoute();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -167,7 +168,17 @@ const getFormPromise = (form: any) => {
});
};
const close = () => {
const obj = { path: '/tool/gen', query: { t: Date.now(), pageNum: route.query.pageNum } };
const obj: RouteLocationNormalized = {
path: '/tool/gen',
fullPath: '',
hash: '',
matched: [],
meta: undefined,
name: undefined,
params: undefined,
redirectedFrom: undefined,
query: { t: Date.now().toString(), pageNum: route.query.pageNum }
};
proxy?.$tab.closeOpenPage(obj);
};

View File

@ -143,7 +143,10 @@ const queryParams = ref<TableQuery>({
dataName: ''
});
const preview = ref<any>({
const preview = ref<{
data: Record<string, string>;
activeName: string;
}>({
data: {},
activeName: 'domain.java'
});