NEZ-1168 fix; Endpoint relabel 配置修改,前端校验错误
This commit is contained in:
@@ -170,7 +170,7 @@ export function checkExprTempAge (rule, value, callback) {
|
|||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function arrLength (rule, value, callback) { // 校验经纬度
|
export function arrLength (rule, value, callback) { // 校验数组
|
||||||
if (value.length > 0) {
|
if (value.length > 0) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -257,7 +257,7 @@
|
|||||||
class="half-form-item" :label="'Source labels'"
|
class="half-form-item" :label="'Source labels'"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required: item.action === 'replace' || item.action === 'keep' || item.action === 'drop', message: $t('validate.required'), trigger: 'change' },
|
{ required: item.action === 'replace' || item.action === 'keep' || item.action === 'drop', message: $t('validate.required'), trigger: 'change' },
|
||||||
{ validator: item.action === 'replace' || item.action === 'keep' || item.action === 'drop'? arrLength : '', trigger: 'change' }
|
{ validator: item.action === 'replace' || item.action === 'keep' || item.action === 'drop'? arrLength : requirdRelabel, trigger: 'change' }
|
||||||
]">
|
]">
|
||||||
<vue-tags-input
|
<vue-tags-input
|
||||||
v-model="item.tags"
|
v-model="item.tags"
|
||||||
@@ -587,6 +587,7 @@ import pipelineSelect from './pipelineSelect'
|
|||||||
import selectWalk from '../popBox/selectWalk'
|
import selectWalk from '../popBox/selectWalk'
|
||||||
import editRigthBox from '../mixin/editRigthBox'
|
import editRigthBox from '../mixin/editRigthBox'
|
||||||
import VueTagsInput from '@johmun/vue-tags-input'
|
import VueTagsInput from '@johmun/vue-tags-input'
|
||||||
|
import vm from "@/main";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'editEndpointBoxNew',
|
name: 'editEndpointBoxNew',
|
||||||
@@ -816,6 +817,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
arrLength: arrLength,
|
arrLength: arrLength,
|
||||||
port: port,
|
port: port,
|
||||||
|
requirdRelabel (rule, value, callback) {
|
||||||
|
callback()
|
||||||
|
},
|
||||||
selectWalk (walk) {
|
selectWalk (walk) {
|
||||||
if (this.editEndpoint.configs[0].config.walk.indexOf(walk) != -1) {
|
if (this.editEndpoint.configs[0].config.walk.indexOf(walk) != -1) {
|
||||||
this.editEndpoint.configs[0].config.walk.splice(this.editEndpoint.configs[0].config.walk.indexOf(walk), 1)
|
this.editEndpoint.configs[0].config.walk.splice(this.editEndpoint.configs[0].config.walk.indexOf(walk), 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user