Browse Source

[Fix-7513] Fix identical numbers and add positive integer judgment (#8032)

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* fix bug_7513

* test

* test

* test

* test

* test

* chinese change
xiangzihao 3 years ago
parent
commit
e45e78d803

+ 8 - 2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue

@@ -71,8 +71,14 @@
     },
     },
     methods: {
     methods: {
       _onChange (o) {
       _onChange (o) {
-        this.$emit('valueEvent', +o)
-        this._setIconState(+o)
+        // positive integer judgment
+        const r = /^\+?[1-9][0-9]*$/
+        if (!r.test(o)) {
+          this.$message.warning(`${i18n.$t('Please enter a positive integer')}`)
+        } else {
+          this.$emit('valueEvent', +o)
+          this._setIconState(+o)
+        }
       },
       },
       _setIconState (value) {
       _setIconState (value) {
         // Whether there is a list
         // Whether there is a list

+ 3 - 3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue

@@ -208,13 +208,13 @@
           <div slot="content">
           <div slot="content">
             <m-select-input
             <m-select-input
               v-model="maxRetryTimes"
               v-model="maxRetryTimes"
-              :list="[0, 1, 2, 3, 4]"
+              :list="[]"
             ></m-select-input>
             ></m-select-input>
             <span>({{ $t("Times") }})</span>
             <span>({{ $t("Times") }})</span>
             <span class="text-b">{{ $t("Failed retry interval") }}</span>
             <span class="text-b">{{ $t("Failed retry interval") }}</span>
             <m-select-input
             <m-select-input
               v-model="retryInterval"
               v-model="retryInterval"
-              :list="[1, 10, 30, 60, 120]"
+              :list="[]"
             ></m-select-input>
             ></m-select-input>
             <span>({{ $t("Minute") }})</span>
             <span>({{ $t("Minute") }})</span>
           </div>
           </div>
@@ -233,7 +233,7 @@
           <div slot="content">
           <div slot="content">
             <m-select-input
             <m-select-input
               v-model="delayTime"
               v-model="delayTime"
-              :list="[0, 1, 5, 10]"
+              :list="[]"
             ></m-select-input>
             ></m-select-input>
             <span>({{ $t("Minute") }})</span>
             <span>({{ $t("Minute") }})</span>
           </div>
           </div>