fix: 优化场景联动
This commit is contained in:
parent
f87bef89c3
commit
9fc1a55def
|
@ -1,7 +1,7 @@
|
|||
import server from '@/utils/request';
|
||||
|
||||
// 当前登录用户权限信息
|
||||
export const getMe_api = () => server.get(`/authorize/me`);
|
||||
export const getMe_api = () => server.get<{ user: any, [key : string]: any }>(`/authorize/me`);
|
||||
// 设置登录用户选择的页面
|
||||
export const setView_api = (data:object) => server.patch(`/user/settings/view/user`, data);
|
||||
// 当前登录用户选择的页面
|
||||
|
|
|
@ -10,7 +10,7 @@ export const config = () => server.get(`/authorize/captcha/config`)
|
|||
* 获取验证码图片
|
||||
* @returns
|
||||
*/
|
||||
export const code = () => server.get(`/authorize/captcha/image?width=130&height=30`)
|
||||
export const code = () => server.get<{ base64: string, key: string }>(`/authorize/captcha/image?width=130&height=30`)
|
||||
|
||||
/**
|
||||
* 登录
|
||||
|
@ -57,3 +57,7 @@ export const userDetail = () => server.get<any>('/user/detail')
|
|||
* 退出登录
|
||||
*/
|
||||
export const loginout_api = () => server.get<any>('/user-token/reset')
|
||||
|
||||
export const getOAuth2 = (params: any) => server.get<any>('/oauth2/authorize', params)
|
||||
|
||||
export const initApplication = (clientId: string | number) => server.get<{name: string}>(`/application/${clientId}/info`)
|
||||
|
|
|
@ -110,8 +110,6 @@ const jump = (item: any) => {
|
|||
path = item.path
|
||||
}
|
||||
|
||||
console.log(item, history.state)
|
||||
console.log(path)
|
||||
// jumpPage(slotProps.route.path)
|
||||
router.push(path)
|
||||
}
|
||||
|
@ -119,8 +117,7 @@ const jump = (item: any) => {
|
|||
const breadcrumb = computed(() =>
|
||||
{
|
||||
const paths = router.currentRoute.value.name as string
|
||||
console.log(router.currentRoute)
|
||||
console.log(route)
|
||||
|
||||
const metas = findRouteMeta(paths)
|
||||
return metas.map((item, index) => {
|
||||
return {
|
||||
|
|
|
@ -4,6 +4,7 @@ export const AccountCenterBindPath = '/account/center/bind'
|
|||
export const InitLicense = '/init-license'
|
||||
export const NotificationSubscriptionCode = 'account/NotificationSubscription'
|
||||
export const NotificationRecordCode = 'account/NotificationRecord'
|
||||
export const OauthPath = '/oauth'
|
||||
|
||||
export const AccountMenu = {
|
||||
path: '/account',
|
||||
|
@ -70,6 +71,13 @@ export default [
|
|||
{
|
||||
path: InitLicense,
|
||||
component: () => import('@/views/system/License/index.vue')
|
||||
},
|
||||
{
|
||||
path: OauthPath,
|
||||
meta: {
|
||||
title: '授权页'
|
||||
},
|
||||
component: () => import('@/views/oauth/index.vue')
|
||||
}
|
||||
|
||||
]
|
|
@ -348,6 +348,7 @@ const termAdd = () => {
|
|||
}
|
||||
|
||||
const onDelete = () => {
|
||||
const key = formModel.value.branches?.[props.branchName]?.then?.[props.thenName]?.actions?.[props.actionName].terms?.[props.termsName].terms?.[props.name].key
|
||||
formModel.value.branches?.[props.branchName]?.then?.[props.thenName]?.actions?.[props.actionName].terms?.[props.termsName].terms?.splice(props.name, 1)
|
||||
const _options = formModel.value.branches![props.branchName].then[props.thenName].actions[props.name].options
|
||||
const termsColumns = _options?.termsColumns || []
|
||||
|
|
|
@ -107,8 +107,11 @@ const onKeys: string[] = EventSubscribeKeys({
|
|||
action: props.actionName
|
||||
})
|
||||
|
||||
const handleRequest = () => {
|
||||
const handleRequest = (e: any) => {
|
||||
const hasDelete = 'isDelete' in e
|
||||
if (!hasDelete) {
|
||||
columnRequest()
|
||||
}
|
||||
}
|
||||
|
||||
EventEmitter.subscribe(onKeys, handleRequest)
|
||||
|
|
|
@ -461,11 +461,14 @@ const termsOptions = computed(() => {
|
|||
});
|
||||
|
||||
const onDelete = () => {
|
||||
const key = _data.value.branches![props.branchesName].then[props.thenName].actions[props.name].key
|
||||
EventEmitter.emit(key!, { isDelete: true })
|
||||
if (props.name !== 0 && !props.parallel) { // 清空上一个串行执行动作中的options.termsColumns和terms
|
||||
_data.value.branches![props.branchesName].then[props.thenName].actions[props.name - 1].options!.termsColumns = []
|
||||
_data.value.branches![props.branchesName].then[props.thenName].actions[props.name - 1].options!.terms = []
|
||||
_data.value.branches![props.branchesName].then[props.thenName].actions[props.name - 1].terms = []
|
||||
}
|
||||
|
||||
emit('delete');
|
||||
};
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ export const EventEmitterKeys = (params: Params): string => {
|
|||
* @constructor
|
||||
*/
|
||||
export const EventSubscribeKeys = (params: Params): string[] => {
|
||||
const sceneStore = useSceneStore()
|
||||
|
||||
let keys: string[] = []
|
||||
|
||||
if (params.action === 0) {
|
||||
|
@ -75,10 +77,14 @@ export const EventSubscribeKeys = (params: Params): string[] => {
|
|||
}
|
||||
|
||||
for (let i = 0; i <= params.action; i++) {
|
||||
let key = sceneStore.data.branches?.[params.branch].then[params.branchGroup].actions[i]?.key
|
||||
if (!key) {
|
||||
const _b = `branches_${params.branch}` // branchesName
|
||||
const _t = `then_${params.branchGroup}` // thenName
|
||||
const _a = `then_${i}` // actionName
|
||||
keys.push(`${_b}_${_t}_${_a}`)
|
||||
key = `${_b}_${_t}_${_a}`
|
||||
}
|
||||
keys.push(key)
|
||||
}
|
||||
|
||||
return keys
|
||||
|
|
Loading…
Reference in New Issue