平台件项目详情--设定 添加多个空数据点击确定,时间轴不展示

This commit is contained in:
zyx.net
2023-09-28 10:05:19 +08:00
parent 71a31e83ac
commit 47b5c99cfb
@@ -17,9 +17,14 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('Nodename')">{{$t('Nodename')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel"
:prop="'list.'+index+'.nodeName'"
:rules="[{ required:true,
message: $t('Nodename') + $t('cannotEmpty'), trigger: 'blur'}]"
>
<a-input class="box-input"
v-model="item.nodeName"
:maxLength="200"
@@ -114,20 +119,17 @@
})
},
handleOk() {
if(this.formInline.list){
this.formInline.list.forEach((item,index) => {
item.projectId = this.$route.query.id
console.log(item.nodeName)
console.log(item.nodeTime)
if((item.nodeName == '' || item.nodeName == undefined) && (item.nodeTime == ''| item.nodeTime == undefined)){
console.log(index)
this.formInline.list.splice(index, 1) // 调用splice方法删除指定的对象
}
})
this.formInline.list = this.formInline.list
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
if(this.formInline.list){
this.formInline.list.forEach((item,index) => {
item.projectId = this.$route.query.id
if((item.nodeName == '' || item.nodeName == undefined) && (item.nodeTime == ''| item.nodeTime == undefined)){
this.formInline.list.splice(index, 1) // 调用splice方法删除指定的对象
}
})
this.formInline.list = this.formInline.list
}
let query = {
...this.formInline,
// projectId: this.$route.query.id