过程项问题修改

dev-scheduling
zhangdi 2 months ago
parent 6f8fe43e20
commit 28425174fb
  1. 9
      src/views/processManagement/components/addinPlantMaintenanceDialog.vue

@ -164,7 +164,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :loading="loading"> </el-button>
</span>
</template>
</el-dialog>
@ -184,6 +184,7 @@ export default {
},
data() {
return {
loading: false,
openShow: false,
wcData: [],
equipmentData: [],
@ -232,7 +233,8 @@ export default {
if (this.moldAddMore && this.form.tableData.length === 0) {
this.addTable();
} else {
this.form.tableData = this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : [];
this.form.tableData =
this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : [];
}
},
methods: {
@ -304,6 +306,7 @@ export default {
});
return;
}
this.loading = true;
//
const submitData = this.form.tableData.map(row => {
@ -316,9 +319,11 @@ export default {
console.log('提交数据:', submitData);
add(submitData).then(res => {
this.$message.success('操作成功');
this.loading = false;
this.closeDialog();
});
} catch (err) {
this.loading = false;
this.$message.error(err.message);
console.error('提交失败:', err);
}

Loading…
Cancel
Save