- 1、字段配置中表存在生成的字段为表内列的信息,并且主键、伪删除字段不允许设置为列,主键默认展示在列表中,伪删除字段不允许展示
+
+ 1、字段配置中表存在生成的字段为表内列的信息,并且主键、伪删除字段不允许设置为列,主键默认展示在列表中,伪删除字段不允许展示
+
2、在字段配置中新建表时,主键不需要增加列,会在生成的时候默认自带主键id
- 3、在字段配置中新建表时,字段类型为addTimestamps会自动创建create_time、update_time字段,字段类型为:timestamp
- 4、在字段配置中新建表时,字段类型为addSoftDelete会字段创建delete_time字段,字段类型为:timestamp,作用是伪删除
+
+ 3、在字段配置中新建表时,字段类型为addTimestamps会自动创建create_time、update_time字段,字段类型为:timestamp
+
+
+ 4、在字段配置中新建表时,字段类型为addSoftDelete会字段创建delete_time字段,字段类型为:timestamp,作用是伪删除
+
5、在字段配置中,表单类型为frameImageOne时属于图片单选,frameImages时为图片多选
6、在字段配置中,表单类型为不生成时创建后不会生成对应的表单项
@@ -29,11 +35,15 @@
@@ -65,11 +75,7 @@
>
{{ row.field }}
-
+
{{ row.field_type }}
@@ -79,51 +85,27 @@
{{ row.limit }}
-
+
{{ row.default }}
-
+
{{ row.comment }}
-
+
-
+
-
+
-
+
-
@@ -156,6 +138,7 @@ export default {
foundationRules: {
// pid: [{ required: true, message: '请输入菜单', trigger: 'blur' }],
tableName: [{ required: true, message: '请输入表名', trigger: 'blur' }],
+ modelName: [{ required: true, message: '请输入模块名', trigger: 'blur' }],
},
menusList: [],
columnTypeList: [],
@@ -258,13 +241,13 @@ export default {
},
mounted() {},
methods: {
- disabledInput(index){
+ disabledInput(index) {
let fieldInfo = this.tableField[index];
- let res = ['addTimestamps', 'addSoftDelete'].includes(this.tableField[index].field_type)
+ let res = ['addTimestamps', 'addSoftDelete'].includes(this.tableField[index].field_type);
if (fieldInfo.primaryKey) {
res = true;
}
- if (fieldInfo.field==='delete_time' && fieldInfo.field_type === 'timestamp') {
+ if (fieldInfo.field === 'delete_time' && fieldInfo.field_type === 'timestamp') {
res = true;
}
return res;
diff --git a/template/admin/src/pages/system/codeGeneration/index.vue b/template/admin/src/pages/system/codeGeneration/index.vue
index c67a53451..6ff0e7ef7 100644
--- a/template/admin/src/pages/system/codeGeneration/index.vue
+++ b/template/admin/src/pages/system/codeGeneration/index.vue
@@ -59,6 +59,7 @@ export default {
foundation: {
pid: '',
tableName: '',
+ modelName: '',
isTable: 1,
menuName: '',
},
@@ -87,6 +88,7 @@ export default {
if (this.currentTab == 0) {
// if (!this.formItem.foundation.pid) return this.$Message.warning('请选择菜单');
if (!this.formItem.foundation.tableName) return this.$Message.warning('请输入表名');
+ if (!this.formItem.foundation.modelName) return this.$Message.warning('请输入模块名');
if (!this.formItem.foundation.isTable) {
if (!this.$refs.Foundation.tableField.length) return this.$Message.warning('请先添加表数据');
if (this.$refs.Foundation.tableField.length)
@@ -109,8 +111,6 @@ export default {
...this.formItem.foundation,
filePath: this.formItem.storage,
tableField: this.$refs.Foundation.tableField,
- // columnField: this.$refs.Field.dataList,
- // fromField: this.$refs.FormItem.dataList,
};
this.reqloading = true;
codeCrud(data)
@@ -168,7 +168,10 @@ export default {
padding-left: 7px;
}
/deep/ .ivu-form-item {
- margin-bottom: 15px;
+ margin-bottom: 17px;
+}
+/deep/ .ivu-form-item-error-tip {
+ padding-top: 2px;
}
/deep/ .tip {
color: #bbb;
diff --git a/template/uni-app/App.vue b/template/uni-app/App.vue
index 9ac4667c4..c3e89caa2 100644
--- a/template/uni-app/App.vue
+++ b/template/uni-app/App.vue
@@ -124,7 +124,7 @@
uni.hideTabBar()
let that = this;
// #ifdef H5
- if (option.query.hasOwnProperty('type') && option.query.type == "iframeWindow") {
+ if (option.query.hasOwnProperty('mdType') && option.query.mdType == "iframeWindow") {
this.globalData.isIframe = true;
} else {
this.globalData.isIframe = false;