|
@@ -62,14 +62,14 @@
|
|
>报 表</el-button
|
|
>报 表</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
- <template slot="menu" slot-scope="{ row, label, dic, $index }">
|
|
|
|
|
|
+ <template slot="menu" slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
- v-if="row.$cellEdit"
|
|
|
|
|
|
+ v-if="scope.row.$cellEdit"
|
|
size="small"
|
|
size="small"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
type="text"
|
|
type="text"
|
|
- @click="save(row, label, dic, $index)"
|
|
|
|
- >保 存</el-button
|
|
|
|
|
|
+ @click="rowDel(scope.row,scope.index)"
|
|
|
|
+ >删 除</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
</avue-crud>
|
|
</avue-crud>
|
|
@@ -412,9 +412,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- save(row, label, dic, index) {
|
|
|
|
- console.log(row, label, dic, index);
|
|
|
|
- this.data[index].$cellEdit = false;
|
|
|
|
|
|
+ rowSave(row) {
|
|
|
|
+ console.log(row);
|
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
},
|
|
},
|
|
rowDel(row, index) {
|
|
rowDel(row, index) {
|
|
if (row.id) {
|
|
if (row.id) {
|
|
@@ -459,6 +459,8 @@ export default {
|
|
e.$cellEdit = true;
|
|
e.$cellEdit = true;
|
|
delete e.$index;
|
|
delete e.$index;
|
|
delete e.id;
|
|
delete e.id;
|
|
|
|
+ delete e.isDeleted;
|
|
|
|
+ delete e.status;
|
|
});
|
|
});
|
|
this.selectionList = list;
|
|
this.selectionList = list;
|
|
},
|
|
},
|