过程项问题修改

dev-scheduling
zhangdi 2 months ago
parent a58e3022c7
commit 73782370cd
  1. 3
      src/views/processManagement/components/addinPlantMaintenanceDialog.vue
  2. 12
      src/views/processManagement/components/inPlantMaintenance.vue

@ -180,6 +180,7 @@ export default {
showDialog: { type: Boolean, default: false }, showDialog: { type: Boolean, default: false },
moldAddMore: { type: Boolean, default: false }, moldAddMore: { type: Boolean, default: false },
tabPosition: { type: String, default: '' }, tabPosition: { type: String, default: '' },
itemData: { type: Array, default: () => [] },
}, },
data() { data() {
return { return {
@ -230,6 +231,8 @@ export default {
// //
if (this.moldAddMore && this.form.tableData.length === 0) { if (this.moldAddMore && this.form.tableData.length === 0) {
this.addTable(); this.addTable();
}else{
this.form.tableData = this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : [];
} }
}, },
methods: { methods: {

@ -25,7 +25,9 @@
<template #menu-right> <template #menu-right>
<el-button type="primary" @click="handleImport">导入 </el-button> <el-button type="primary" @click="handleImport">导入 </el-button>
</template> </template>
<template #menu="scope"> </template> <template #menu="scope">
<el-button type="text" @click="handleEdit(scope.row)">修改 </el-button>
</template>
</avue-crud> </avue-crud>
<!-- 导入 --> <!-- 导入 -->
<basic-import <basic-import
@ -39,7 +41,7 @@
></basic-import> ></basic-import>
<!-- 新增 --> <!-- 新增 -->
<addinPlantMaintenanceDialog v-if="showAddDialog" :showDialog="showAddDialog" :moldAddMore="moldAddMore" @closeDialog="closeAddDialog"></addinPlantMaintenanceDialog> <addinPlantMaintenanceDialog v-if="showAddDialog" :showDialog="showAddDialog" :moldAddMore="moldAddMore" @closeDialog="closeAddDialog" :itemData="itemData"></addinPlantMaintenanceDialog>
</div> </div>
</template> </template>
@ -292,9 +294,15 @@ export default {
}, },
query: {}, query: {},
loading: false, loading: false,
itemData:[],
}; };
}, },
methods: { methods: {
handleEdit(row){
this.showAddDialog = true
this.moldAddMore = false
this.itemData = [row]
},
handleAdd(){ handleAdd(){
this.showAddDialog = true this.showAddDialog = true
}, },

Loading…
Cancel
Save