Skip to content

Commit

Permalink
fix: 修复字典类型保存bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jan 12, 2021
1 parent 5ffd4fc commit 2125400
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/views/devTools/Dict.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<el-input v-model="entity.typeName"></el-input>
</el-form-item>
<el-form-item label="排序码">
<el-input-number v-model="entity.codeOrder"></el-input-number>
<el-input-number v-model="entity.order"></el-input-number>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" v-model="entity.remark"></el-input>
Expand Down Expand Up @@ -183,14 +183,15 @@ export default class Dict extends Vue {
}
save() {
this.entity.codeValue = this.entity.codeName;
const opt = JSON.parse(JSON.stringify(this.entity));
delete opt.children;
if (this.dialogStatus === STATUS.CREATE) {
crud(DML.INSERT, 'ad_codelist_type', this.entity).then(() => {
crud(DML.INSERT, 'ad_codelist_type', opt).then(() => {
this.fetchDictType();
this.dialogFormVisible = false;
});
} else {
crud(DML.UPDATE, 'ad_codelist_type', this.entity).then(() => {
crud(DML.UPDATE, 'ad_codelist_type', opt).then(() => {
this.fetchDictType();
this.dialogFormVisible = false;
});
Expand Down

0 comments on commit 2125400

Please sign in to comment.