You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by so...@apache.org on 2022/03/28 06:51:13 UTC
[dolphinscheduler] branch dev updated: [Fix][UI Next][V1.0.0-Alpha]Fix the rules display incorrect in DATA_QUALITY. (#9236)
This is an automated email from the ASF dual-hosted git repository.
songjian pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 3e82312 [Fix][UI Next][V1.0.0-Alpha]Fix the rules display incorrect in DATA_QUALITY. (#9236)
3e82312 is described below
commit 3e8231271351454dacd3e9b6edab0a17fdc81a68
Author: Amy0104 <97...@users.noreply.github.com>
AuthorDate: Mon Mar 28 14:51:05 2022 +0800
[Fix][UI Next][V1.0.0-Alpha]Fix the rules display incorrect in DATA_QUALITY. (#9236)
* [Fix][UI Next][V1.0.0-Alpha]Fix the rules display incorrect in DATA_QUALITY.
* [Fix][UI Next][V1.0.0-Alpha]Remove the unuse watch.
---
.../projects/task/components/node/fields/use-rules.ts | 3 ++-
.../task/components/node/tasks/use-data-quality.ts | 5 ++++-
.../src/views/projects/task/components/node/use-task.ts | 14 +++++---------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts
index 409cab4..977be85 100644
--- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts
@@ -80,7 +80,8 @@ export function useRules(
field: responseItem.field,
options: responseItem.options,
validate: responseItem.validate,
- props: responseItem.props
+ props: responseItem.props,
+ value: responseItem.value
}
const name = responseItem.name?.replace('$t(', '').replace(')', '')
item.name = name ? t(`project.node.${name}`) : ''
diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts
index bf9598b..d9d2b49 100644
--- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts
@@ -25,13 +25,15 @@ export function useDataQuality({
from = 0,
readonly,
data,
- jsonRef
+ jsonRef,
+ updateElements
}: {
projectCode: number
from?: number
readonly?: boolean
data?: ITaskData
jsonRef: Ref<IJsonItem[]>
+ updateElements: () => void
}) {
const { t } = useI18n()
const model = reactive({
@@ -87,6 +89,7 @@ export function useDataQuality({
...Fields.useTimeoutAlarm(model),
...Fields.useRules(model, (items: IJsonItem[], len: number) => {
jsonRef.value.splice(15, len, ...items)
+ updateElements()
}),
Fields.useDeployMode(),
Fields.useDriverCores(),
diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts
index 82c01e6..b197bd1 100644
--- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { ref, Ref, unref, watch } from 'vue'
+import { ref, Ref, unref } from 'vue'
import nodes from './tasks'
import getElementByJson from '@/components/form/get-elements-by-json'
import { useTaskNodeStore } from '@/store/project/task-node'
@@ -56,7 +56,10 @@ export function useTask({
from,
readonly,
data,
- jsonRef
+ jsonRef,
+ updateElements: () => {
+ getElements()
+ }
}
const { model, json } = nodes[data.taskType || 'SHELL'](params)
@@ -71,12 +74,5 @@ export function useTask({
getElements()
- watch(
- () => jsonRef.value.length,
- () => {
- getElements()
- }
- )
-
return { elementsRef, rulesRef, model }
}