Commit 06e50a88 authored by Pan's avatar Pan

refine code

parent c628f45e
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<script> <script>
import { fetchList, fetchPv } from 'api/article_table'; import { fetchList, fetchPv } from 'api/article_table';
import { parseTime, objectMerge } from 'utils'; import { parseTime } from 'utils';
const calendarTypeOptions = [ const calendarTypeOptions = [
{ key: 'FD', display_name: '经济数据' }, { key: 'FD', display_name: '经济数据' },
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
this.dialogFormVisible = true; this.dialogFormVisible = true;
}, },
handleUpdate(row) { handleUpdate(row) {
objectMerge(this.temp, row) this.temp = Object.assign({}, row);
this.dialogStatus = 'update'; this.dialogStatus = 'update';
this.dialogFormVisible = true; this.dialogFormVisible = true;
}, },
...@@ -296,7 +296,8 @@ ...@@ -296,7 +296,8 @@
this.temp.timestamp = +this.temp.timestamp; this.temp.timestamp = +this.temp.timestamp;
for (const v of this.list) { for (const v of this.list) {
if (v.id === this.temp.id) { if (v.id === this.temp.id) {
objectMerge(v, this.temp); const index = this.list.indexOf(v);
this.list.splice(index, 1, this.temp);
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment