From 6dd89246e204fa55c21d52f069191eb1839c19db Mon Sep 17 00:00:00 2001 From: labbomb <739955946@qq.com> Date: Thu, 10 Mar 2022 17:27:12 +0800 Subject: [PATCH] [Bug][UI Next][V1.0.0-Alpha]Fixed the abnormal display of project management user values (#8805) --- .../src/views/projects/list/components/project-modal.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx index 904e8a9f90..68001f7633 100644 --- a/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx @@ -19,6 +19,8 @@ import { defineComponent, PropType, toRefs, onMounted, watch } from 'vue' import { NForm, NFormItem, NInput } from 'naive-ui' import { useForm } from './use-form' import Modal from '@/components/modal' +import { useUserStore } from '@/store/user/user' +import type { UserInfoRes } from '@/service/modules/users/types' const props = { showModalRef: { @@ -42,10 +44,14 @@ const ProjectModal = defineComponent({ setup(props, ctx) { const { variables, t, handleValidate } = useForm(props, ctx) + const userStore = useUserStore() + const cancelModal = () => { if (props.statusRef === 0) { variables.model.projectName = '' variables.model.description = '' + } else { + variables.model.userName = props.row.userName } ctx.emit('cancelModal', props.showModalRef) } @@ -59,9 +65,11 @@ const ProjectModal = defineComponent({ () => { if (props.statusRef === 0) { variables.model.projectName = '' + variables.model.userName = (userStore.getUserInfo as UserInfoRes).userName variables.model.description = '' } else { variables.model.projectName = props.row.name + variables.model.userName = props.row.userName variables.model.description = props.row.description } } @@ -71,6 +79,7 @@ const ProjectModal = defineComponent({ () => props.row, () => { variables.model.projectName = props.row.name + variables.model.userName = props.row.userName variables.model.description = props.row.description } )