ap-dev 1.2.23 → 1.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -273,6 +273,24 @@ export default {
273
273
  tableSchema: selectedTable.tableSchema
274
274
  })
275
275
  }
276
+
277
+ let tableSchema = tableList[0].tableSchema;
278
+ let javaPath = this.userConfig.fdJavaPath;
279
+ let projectName = javaPath.substring(javaPath.lastIndexOf('\\') + 1);
280
+ // 项目名和数据库不一致,警告
281
+ if (projectName.indexOf(tableSchema) > -1) {
282
+ this.getBackgroundCode(tableList);
283
+ return;
284
+ }
285
+ this.$confirm(`警告:项目【${projectName}】和数据库【${tableSchema}】不匹配!`, '提示', {
286
+ confirmButtonText: '确认生成',
287
+ cancelButtonText: '取消',
288
+ type: 'error'
289
+ }).then(() => {
290
+ this.getBackgroundCode(tableList);
291
+ });
292
+ },
293
+ getBackgroundCode(tableList) {
276
294
  this.$request({
277
295
  url: '/apd/dev/DevGenerateCode/getBackgroundCode',
278
296
  method: 'post',
@@ -293,6 +311,7 @@ export default {
293
311
  this.createFile(this.userConfig.fdJavaHref, response.data)
294
312
  })
295
313
  }
314
+
296
315
  }
297
316
  }
298
317
  </script>
@@ -55,7 +55,6 @@
55
55
  methods: {
56
56
  handleClick(tab, event) {
57
57
  this[tab.name] = true;
58
- console.log(tab.name);
59
58
  },
60
59
  }
61
60
  }