Coder Social home page Coder Social logo

Comments (10)

onestar1 avatar onestar1 commented on May 30, 2024 1

跟踪代码 发现是丢失 dbo 表的前缀问题。

from easyoc.

onestar1 avatar onestar1 commented on May 30, 2024

@@change="loadAllTables“ 应该是 @@change="loadAllTables()” 吧

from easyoc.

hyzx86 avatar hyzx86 commented on May 30, 2024

应该不是,你改了就好了?

from easyoc.

onestar1 avatar onestar1 commented on May 30, 2024

image
image
{
"statusCode": 200,
"status": 0,
"data": null,
"succeeded": true,
"msg": [
{
"value": "Object reference not set to an instance of an object.",
"type": 3
}
],
"extras": null,
"timestamp": 1709017593415
}

可能是不对的。 没有跟你的演示一样。 生成会错误。

from easyoc.

onestar1 avatar onestar1 commented on May 30, 2024

可能是我用mysql,测试 修改了下 对应的获取数据库表 处理 scheam 然后修改了下对应的js。
1个原因是 mysql前缀不是dbo 。
所以 处理如果没有schema的情况下,传入的值要去掉前面的. 号。

另外就是这边确实要转换成string 才可以赋值
this.recipeText = JSON.stringify(data.data); //必须把对象转成字符串 monacoEditor.getModel().setValue(JSON.stringify(data.data)); // monacoEditor.getAction(['editor.action.formatDocument'])._run(); 无法执行 monacoEditor.getAction('editor.action.formatDocument').run();
`
generateRecipe() {
this.loading = true;
$.get("@href("~/api/RDBMS/GenerateRecipe")", {
connectionConfigId: this.model.connectionConfigId,
tableName: this.model.tableName
}, (data, status) => {
console.log(status)
if (status != "success") {
this.$message("查询失败")
} else {
console.log(data)
this.recipeText = JSON.stringify(data.data);
//必须把对象转成字符串
monacoEditor.getModel().setValue(JSON.stringify(data.data));
// monacoEditor.getAction(['editor.action.formatDocument'])._run();
monacoEditor.getAction('editor.action.formatDocument').run();
}
this.loading = false;
})
},

        `

from easyoc.

onestar1 avatar onestar1 commented on May 30, 2024

为什么我这个没有一个格式化的界面呢
image

from easyoc.

hyzx86 avatar hyzx86 commented on May 30, 2024

你是不是改错了。。这个编辑器里面应该是 recipeContent ,而不是整个返回值

from easyoc.

onestar1 avatar onestar1 commented on May 30, 2024

你是不是改错了。。这个编辑器里面应该是 recipeContent ,而不是整个返回值

没错哈。 是提交给后台的数据错了。
@* data:JSON.stringify({
"json":this.recipeText;
}), *@
修改成这样 : data: this.recipeText, 后台才能接收到。 完美解决
1709188003105
1709188053021
1709188062561

from easyoc.

onestar1 avatar onestar1 commented on May 30, 2024

已经正常生成contentType 。nice!

from easyoc.

hyzx86 avatar hyzx86 commented on May 30, 2024

@onestar1 方便的话提个PR 😁

from easyoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.