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. 15
      web/src/view/systemTools/autoCode/component/fieldDialog.vue

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

@ -103,6 +103,7 @@
</template> </template>
<script> <script>
import { getDict } from "@/utils/dictionary"; import { getDict } from "@/utils/dictionary";
import { toSQLLine } from "@/utils/stringFun.js";
import { getSysDictionaryList } from "@/api/sysDictionary"; import { getSysDictionaryList } from "@/api/sysDictionary";
export default { export default {
name: "FieldDialog", name: "FieldDialog",
@ -201,7 +202,21 @@ export default {
}); });
this.dictOptions = dictRes.data.list 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> </script>
<style lang="scss"> <style lang="scss">

Loading…
Cancel
Save