diff --git a/src/api/device/flow.js b/src/api/device/flow.js
index e1ad731..4ab636d 100644
--- a/src/api/device/flow.js
+++ b/src/api/device/flow.js
@@ -60,4 +60,12 @@ export function flowStop(instId) {
url: `/flow/stop/${instId}`,
method: 'post'
})
+}
+
+export function getArmStatus(params) {
+ return request({
+ url: '/api/arm/getPose',
+ method: 'get',
+ params: params
+ })
}
\ No newline at end of file
diff --git a/src/views/corpusManger/speech_synthesis/components/MainWorkspace.vue b/src/views/corpusManger/speech_synthesis/components/MainWorkspace.vue
index ef5addc..1ca38e6 100644
--- a/src/views/corpusManger/speech_synthesis/components/MainWorkspace.vue
+++ b/src/views/corpusManger/speech_synthesis/components/MainWorkspace.vue
@@ -69,6 +69,7 @@
+
@@ -196,7 +197,7 @@ const handleClose = (tag) => {
const form = ref({
tags: [],
model: '科大讯飞',
- voice: 'xiaoyan',
+ voice: 'x4_xiaoyan',
speed: 50,
volume: 50,
pitch: 50,
@@ -236,7 +237,10 @@ const dialectOption = ref([
const voiceOption = ref([
{
label: '女声',
- value: 'xiaoyan'
+ value: 'x4_xiaoyan'
+ }, {
+ label: '男声',
+ value: 'x4_lingbosong'
}
])
diff --git a/src/views/device/register/components/LogicFlow/customFlowNode.js b/src/views/device/register/components/LogicFlow/customFlowNode.js
index 447800b..fa19f30 100644
--- a/src/views/device/register/components/LogicFlow/customFlowNode.js
+++ b/src/views/device/register/components/LogicFlow/customFlowNode.js
@@ -119,7 +119,7 @@ class CustomFlowHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = 'none';
- style.hover.stroke = 'none';
+ // style.hover.stroke = 'none';
return style;
}
}
diff --git a/src/views/flow/components/ParamsDrawer.vue b/src/views/flow/components/ParamsDrawer.vue
index 7cb660d..3e325b9 100644
--- a/src/views/flow/components/ParamsDrawer.vue
+++ b/src/views/flow/components/ParamsDrawer.vue
@@ -59,14 +59,14 @@ defineExpose({ confirmSave })
// 保存成功 / 失败处理
const handleSaveSuccess = () => {
emitter.emit('setProperties', { id: props.data.id })
- emitter.emit("throwAnError", { id: props.data.id, hasError: false });
+ emitter.emit("throwAnError", { id: props.data.id, hasError: false, type: props.data.type });
// 无错误,关闭抽屉
emits('close')
}
const handleSaveError = () => {
emitter.emit('setProperties', { id: props.data.id })
- emitter.emit("throwAnError", { id: props.data.id, hasError: true });
+ emitter.emit("throwAnError", { id: props.data.id, hasError: true, type: props.data.type });
emits('close')
}
diff --git a/src/views/flow/index.vue b/src/views/flow/index.vue
index 6abb021..0b5209d 100644
--- a/src/views/flow/index.vue
+++ b/src/views/flow/index.vue
@@ -542,8 +542,16 @@ const initFlow = () => {
keys: ["backspace", "delete"], // 覆盖删除键
callback: () => {
const activeElem = document.activeElement;
- if (activeElem.tagName === "INPUT" || activeElem.tagName === "TEXTAREA") {
- return; // 不处理输入框内的删除
+ if (["INPUT", "TEXTAREA"].includes(activeElem.tagName)) {
+ return false
+ }
+
+ const { nodes } = lf.getSelectElements();
+ // 拦截起止节点删除
+ const hasProtectedNode = nodes.some(node => ["start", "end"].includes(node.type));
+ if (hasProtectedNode) {
+ lf.selectElementById(null);
+ return false;
}
const { nodes, edges } = lf.getSelectElements();
@@ -555,7 +563,7 @@ const initFlow = () => {
if (hasProtectedNode) {
lf.selectElementById(null); // 取消选中
- return; // 阻断删除
+ return false; // 阻断删除
}
// 默认删除逻辑
@@ -571,7 +579,7 @@ const initFlow = () => {
// 删除节点所有的边
lf.deleteEdgeByNodeId(node.id);
});
- return;
+ return false;
}
if (nodes.length === 0 && edges.length > 0) {
edges.forEach((node) => {
@@ -584,12 +592,12 @@ const initFlow = () => {
{
keys: ["ctrl+z"], // 自定义快捷键
callback: () => {
- return false;
+ return true;
},
},
{
keys: ["ctrl+shift+z"],
- callback: () => false,
+ callback: () => true,
},
],
},
@@ -789,8 +797,23 @@ onMounted(() => {
emitter.on("throwAnError", (data) => {
// 处理错误抛出逻辑
- const { id, hasError } = data;
- const element = document.getElementsByClassName(`node__container ${id}`)[0].parentElement;
+ const { id, hasError, type } = data;
+ let element
+ if (type === 'loop') {
+ const tt = document.getElementsByClassName(`group__container ${id}`)[0];
+ if (tt?.parentElement) {
+ element = tt.parentElement;
+ } else {
+ element = tt
+ }
+ } else {
+ const tt = document.getElementsByClassName(`node__container ${id}`)[0]
+ if (tt?.parentElement) {
+ element = tt.parentElement;
+ } else {
+ element = tt
+ }
+ }
if (hasError) {
if (!nodeErrorList.value.includes(id)) {
nodeErrorList.value.push(id);
@@ -889,10 +912,12 @@ onUnmounted(() => {
.node__container {
border-color: #8dc99d;
+ // pointer-events: none;
}
.group__container {
border-color: #8dc99d;
+ // pointer-events: none;
}
}
}
diff --git a/src/views/flow/nodes/common/endNode.js b/src/views/flow/nodes/common/endNode.js
index 5533405..7286351 100644
--- a/src/views/flow/nodes/common/endNode.js
+++ b/src/views/flow/nodes/common/endNode.js
@@ -181,7 +181,7 @@ class EndNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/common/serviceNode.js b/src/views/flow/nodes/common/serviceNode.js
index 529dbb8..0099304 100644
--- a/src/views/flow/nodes/common/serviceNode.js
+++ b/src/views/flow/nodes/common/serviceNode.js
@@ -198,7 +198,7 @@ class ServiceNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/common/startNode.js b/src/views/flow/nodes/common/startNode.js
index a0310f6..47edd56 100644
--- a/src/views/flow/nodes/common/startNode.js
+++ b/src/views/flow/nodes/common/startNode.js
@@ -180,7 +180,7 @@ class StartNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = 'none';
- style.hover.stroke = 'none';
+ // style.hover.stroke = 'none';
return style;
}
}
diff --git a/src/views/flow/nodes/function/codeNode.js b/src/views/flow/nodes/function/codeNode.js
index 1610a2e..e7a084a 100644
--- a/src/views/flow/nodes/function/codeNode.js
+++ b/src/views/flow/nodes/function/codeNode.js
@@ -198,7 +198,7 @@ class CodeNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/currentLoopNode.js b/src/views/flow/nodes/function/currentLoopNode.js
index cd434f8..de359d3 100644
--- a/src/views/flow/nodes/function/currentLoopNode.js
+++ b/src/views/flow/nodes/function/currentLoopNode.js
@@ -204,7 +204,7 @@ class CurrentLoopNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/httpNode.js b/src/views/flow/nodes/function/httpNode.js
index fea939b..c0df743 100644
--- a/src/views/flow/nodes/function/httpNode.js
+++ b/src/views/flow/nodes/function/httpNode.js
@@ -198,7 +198,7 @@ class HttpNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/loop.js b/src/views/flow/nodes/function/loop.js
index f3af0a8..7dc17eb 100644
--- a/src/views/flow/nodes/function/loop.js
+++ b/src/views/flow/nodes/function/loop.js
@@ -45,7 +45,6 @@ class loopBodyModel extends GroupNodeModel {
// 计算子节点的包围盒(包含所有子节点的最小矩形区域)
getChildrenBBox() {
const children = this.getAllValidChildren(this.children, this.graphModel)
- console.log('children', children)
// Array.from(this.children).forEach((id) => {
// const node = this.graphModel.getNodeModelById(id)
// if (node) {
@@ -109,14 +108,16 @@ class loopBodyModel extends GroupNodeModel {
return [
{
x: x + width / 2 ,
- y: y + height / 2,
+ // y: y + height / 2,
+ y:y,
name: "right",
id: "".concat(this.id, "_1"),
properties: { connectionType: "source" },
},
{
x: x - width / 2,
- y: y + height / 2,
+ // y: y + height / 2,
+ y:y,
name: "left",
id: "".concat(this.id, "_3"),
properties: { connectionType: "target" },
@@ -241,6 +242,13 @@ class loopBodyView extends HtmlNode {
return svgH('g', {}, anchorShapes);
}
+ getOutlineStyle() {
+ const style = super.getOutlineStyle();
+ style.stroke = "none";
+ // style.hover.stroke = "none";
+ return style;
+ }
+
/**
* 将 HTML 内容设置到指定的根元素上
* @param rootEl 根元素
diff --git a/src/views/flow/nodes/function/loop.vue b/src/views/flow/nodes/function/loop.vue
index da2880d..87fad7c 100644
--- a/src/views/flow/nodes/function/loop.vue
+++ b/src/views/flow/nodes/function/loop.vue
@@ -87,13 +87,13 @@ onUnmounted(() => {
.group__container {
width: 100%;
height: 100%;
- min-height: 420px;
+ // min-height: 420px;
background: #fff;
padding: 12px;
cursor: default;
border-radius: 12px;
border: 2px solid white;
- box-shadow: 0 5px 15px 0#00000008;
+ // box-shadow: 0 5px 15px 0#00000008;
display: flex;
flex-direction: column;
position: relative;
diff --git a/src/views/flow/nodes/function/sdAgent.js b/src/views/flow/nodes/function/sdAgent.js
index 7e03ca0..76e5c1b 100644
--- a/src/views/flow/nodes/function/sdAgent.js
+++ b/src/views/flow/nodes/function/sdAgent.js
@@ -198,7 +198,7 @@ class SdAgentNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/sleep.js b/src/views/flow/nodes/function/sleep.js
index edd5049..b9d6b93 100644
--- a/src/views/flow/nodes/function/sleep.js
+++ b/src/views/flow/nodes/function/sleep.js
@@ -198,7 +198,7 @@ class SleepNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/stopLoop.js b/src/views/flow/nodes/function/stopLoop.js
index 83370be..0b50170 100644
--- a/src/views/flow/nodes/function/stopLoop.js
+++ b/src/views/flow/nodes/function/stopLoop.js
@@ -176,7 +176,7 @@ class StopLoopHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/subEnd.js b/src/views/flow/nodes/function/subEnd.js
index fd7c6ae..3c8f66b 100644
--- a/src/views/flow/nodes/function/subEnd.js
+++ b/src/views/flow/nodes/function/subEnd.js
@@ -171,7 +171,7 @@ class SubEndNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/subStart.js b/src/views/flow/nodes/function/subStart.js
index 9006d2a..9abc6fc 100644
--- a/src/views/flow/nodes/function/subStart.js
+++ b/src/views/flow/nodes/function/subStart.js
@@ -170,7 +170,7 @@ class SubStartNodeHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/flow/nodes/function/switch.js b/src/views/flow/nodes/function/switch.js
index e7ac4f5..1bc40a4 100644
--- a/src/views/flow/nodes/function/switch.js
+++ b/src/views/flow/nodes/function/switch.js
@@ -303,7 +303,7 @@ class SwitchHtmlModel extends HtmlNodeModel {
getOutlineStyle() {
const style = super.getOutlineStyle();
style.stroke = "none";
- style.hover.stroke = "none";
+ // style.hover.stroke = "none";
return style;
}
}
diff --git a/src/views/vi/testProject/plan/index.vue b/src/views/vi/testProject/plan/index.vue
index 4812955..e3498b9 100644
--- a/src/views/vi/testProject/plan/index.vue
+++ b/src/views/vi/testProject/plan/index.vue
@@ -192,12 +192,13 @@
语料配置({{ form.sceneType == 2 ? "单次" : "连续" }})
-
+ /> -->
+
{
};
const getSelectRows = (arr) => {
- const corpusIds = arr.map((item) => item.parentId);
+ const corpusIds = arr.map((item) => item.id);
form.value.corpusIds = corpusIds.toString();
};
diff --git a/src/views/vi/testProject/plan/single.vue b/src/views/vi/testProject/plan/single.vue
new file mode 100644
index 0000000..07a70f9
--- /dev/null
+++ b/src/views/vi/testProject/plan/single.vue
@@ -0,0 +1,187 @@
+
+
+
+ 配置语料
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+