Skip to content

Commit 8a0f4c8

Browse files
author
Zhang Jie
committed
增加了一些调试按钮,注释掉以前的数据转换相关的按钮
1 parent 8edf6e9 commit 8a0f4c8

File tree

4 files changed

+254
-94
lines changed

4 files changed

+254
-94
lines changed

config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
assetsPublicPath: '/',
1313
proxyTable: {
1414
'/service/*': {
15-
target: 'http://192.168.12.249:8081',
15+
target: 'http://192.168.12.248:80',
1616
changeOrigin: true
1717
}
1818
},

src/components/Header.vue

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<el-menu-item index="5">
2929
<div @click="run">运行</div>
3030
</el-menu-item>
31+
<el-menu-item index="6">
32+
<div @click="connDebugger">连接QRL-Debugger</div>
33+
</el-menu-item>
3134
</el-menu>
3235
<img :src="logoPath"/>
3336

@@ -63,6 +66,18 @@ export default {
6366
}
6467
})
6568
},
69+
connDebugger(){
70+
this.axios({
71+
url: '/service/connDebugger',
72+
method: 'post',
73+
data: {
74+
path: ''
75+
}
76+
})
77+
.then((res)=>{
78+
console.log('连接至QRL-Debugger成功!');
79+
})
80+
},
6681
6782
saveProject(){
6883
// save stateData
@@ -74,12 +89,13 @@ export default {
7489
7590
// save qrl
7691
let code = blocklyWindow.Blockly.Lua.workspaceToCode(blocklyWindow.Code.workspace);
92+
debugger;
7793
this.axios({
7894
url: '/service/saveProject',
7995
method: 'post',
8096
data: {
8197
stateData: stateData,
82-
blocklyData: stateDataXml, //blocklyData,
98+
blocklyData: blocklyData, //blocklyData,
8399
code: code
84100
}
85101
}).then((res)=>{

src/components/IOPage.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<el-switch v-model="status" active-color="#13ce66" inactive-color="#DCDFE6"></el-switch>
55

66
<el-button type="primary" @click="refresh" style="display: block; margin-left: 100px;margin-top:50px;">刷新</el-button>
7+
<el-button type="primary" @click="setBp" >设置断点</el-button>
78
</div>
89
</template>
910

@@ -31,6 +32,18 @@ export default {
3132
},
3233
refresh(){
3334
this.getStatus();
35+
},
36+
setBp(){
37+
this.axios({
38+
url: "/service/setBreakpoint",
39+
method: "post",
40+
data: {
41+
port: "20103",
42+
line: 23
43+
},
44+
}).then((res) => {
45+
console.log(res);
46+
});
3447
}
3548
},
3649
created(){

0 commit comments

Comments
 (0)