|
@@ -580,16 +580,18 @@ export default {
|
|
|
},
|
|
|
//批量添加指标
|
|
|
async saveListHandle(){
|
|
|
- //判断是否都选择了指标
|
|
|
+ //只添加选择了指标的
|
|
|
const targetCheck = this.targetList.filter(item=>item.target)
|
|
|
- if(targetCheck.length!==this.targetList.length){
|
|
|
+ /* if(targetCheck.length!==this.targetList.length){
|
|
|
this.$message.warning('请选择指标')
|
|
|
return
|
|
|
- }
|
|
|
- //判断每一项form-rules
|
|
|
+ } */
|
|
|
+ //只验证选择了指标的form-rules
|
|
|
for(let i = 0;i<targetCheck.length;i++){
|
|
|
- await this.$refs[`list_form_${i}`][0].validate();
|
|
|
+ const index = tag_arr.findIndex(item=>item===targetCheck[i].tag)
|
|
|
+ await this.$refs[`list_form_${index}`][0].validate();
|
|
|
}
|
|
|
+
|
|
|
this.loading = true
|
|
|
const params = targetCheck.map(item=>{
|
|
|
return {
|