Browse Source

添加自动填充功能

添加自动填充功能。field字段填充json、数据库表,中文填充数据库表字段描述字段
main
听风 4 years ago
committed by GitHub
parent
commit
8890bb332a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      web/src/view/systemTools/autoCode/component/fieldDialog.vue

17
web/src/view/systemTools/autoCode/component/fieldDialog.vue

@ -103,6 +103,7 @@
</template>
<script>
import { getDict } from "@/utils/dictionary";
import { toSQLLine } from "@/utils/stringFun.js";
import { getSysDictionaryList } from "@/api/sysDictionary";
export default {
name: "FieldDialog",
@ -201,7 +202,21 @@ export default {
});
this.dictOptions = dictRes.data.list
}
},
watch: {
'dialogMiddle.fieldName': function (val) {
if (val.length > 0) {
val = val.replace(val[0], val[0].toLowerCase());
val = toSQLLine(val)
}
this.dialogMiddle.fieldJson = val;
this.dialogMiddle.columnName = val;
},
'dialogMiddle.fieldDesc': function (val) {
this.dialogMiddle.comment = val;
}
},
};
</script>
<style lang="scss">

Loading…
Cancel
Save