@@ -111,11 +111,15 @@
@click="handleRemoveRow(groupIndex, rowIndex)" v-if="group.actions.length > 1" />
</div>
</el-form-item>
-
- <!-- 组内添加并且条件按钮 -->
- <el-button type="text" @click="handleAddRow(groupIndex)" class="add-condition-btn">
- + 并且条件
- </el-button>
+ <div class="flex justify-between items-center">
+ <!-- 组内添加并且条件按钮 -->
+ <el-button type="text" @click="handleAddRow(groupIndex)" class="add-condition-btn">
+ + 并且条件
+ </el-button>
+ <el-button v-if="groupIndex!==0" type="text" @click="formData.conditionGroups=formData.conditionGroups.filter(v=>v.groupKey!==group.groupKey)" class="add-condition-btn">
+ 删除
+ </div>
@@ -552,7 +552,7 @@ const toDelete = (ids) => {
confirmButtonClass: 'el-button--danger',
}
).then(() => {
- api.financeApi.deleteIncomesByIds({ ids }).then((res: any) => {
+ api.financeApi.deleteIncomesByIds(ids).then((res: any) => {
if (res.code == 200) {
ElMessage.success('删除成功')
reset()