Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
d88247e0
提交
d88247e0
authored
3月 26, 2026
作者:
安云鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
写报
上级
4d4ad3f0
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
writtingAsstaintStore.js
src/stores/writtingAsstaintStore.js
+2
-1
WrittingLeftBox.vue
src/views/writtingAsstaint/components/WrittingLeftBox.vue
+8
-5
WrittingTranslate.vue
src/views/writtingAsstaint/components/WrittingTranslate.vue
+0
-1
index.vue
src/views/writtingAsstaint/index.vue
+1
-1
没有找到文件。
src/stores/writtingAsstaintStore.js
浏览文件 @
d88247e0
...
@@ -134,7 +134,7 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
...
@@ -134,7 +134,7 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
this
.
writeProgressNum
=
0
,
//写报 假进度
this
.
writeProgressNum
=
0
,
//写报 假进度
this
.
tabList
[
1
].
active
=
false
this
.
tabList
[
1
].
active
=
false
this
.
tabList
[
2
].
active
=
false
this
.
tabList
[
2
].
active
=
false
this
.
reportContent
=
''
this
.
reportContent
=
''
//写报内容
},
},
backToInputAndClear
()
{
backToInputAndClear
()
{
...
@@ -390,6 +390,7 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
...
@@ -390,6 +390,7 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
}
}
},
},
onmessage
:
async
(
event
)
=>
{
onmessage
:
async
(
event
)
=>
{
console
.
log
(
event
)
if
(
!
event
||
!
event
.
data
||
event
.
data
.
trim
()
===
''
)
return
;
if
(
!
event
||
!
event
.
data
||
event
.
data
.
trim
()
===
''
)
return
;
let
jsonData
=
null
;
let
jsonData
=
null
;
...
...
src/views/writtingAsstaint/components/WrittingLeftBox.vue
浏览文件 @
d88247e0
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
</div>
</div>
</div>
</div>
<!-- 步骤侧边栏显隐按钮 -->
<!-- 步骤侧边栏显隐按钮 -->
<div
class=
"toggle-steps-btn"
@
click=
"
store.isShowSteps = !store.isShowSteps
"
>
<div
class=
"toggle-steps-btn"
@
click=
"
isShowSteps
"
>
<div
class=
"arrow"
:class=
"{ 'is-active': store.isShowSteps }"
></div>
<div
class=
"arrow"
:class=
"{ 'is-active': store.isShowSteps }"
></div>
</div>
</div>
</div>
</div>
...
@@ -223,6 +223,10 @@ const emit = defineEmits(["generate"]);
...
@@ -223,6 +223,10 @@ const emit = defineEmits(["generate"]);
const
triggerGenerate
=
()
=>
{
const
triggerGenerate
=
()
=>
{
emit
(
"generate"
);
emit
(
"generate"
);
};
};
const
isShowSteps
=
()
=>
{
store
.
isShowSteps
=
!
store
.
isShowSteps
store
.
highlightClauseId
=
''
}
// 数字转中文序号
// 数字转中文序号
const
getChineseNumber
=
(
num
)
=>
{
const
getChineseNumber
=
(
num
)
=>
{
...
@@ -263,9 +267,8 @@ watch(
...
@@ -263,9 +267,8 @@ watch(
const
location
=
findTextInElement
(
element
,
targetText
);
const
location
=
findTextInElement
(
element
,
targetText
);
const
containerRect
=
container
.
getBoundingClientRect
();
const
containerRect
=
container
.
getBoundingClientRect
();
const
itemRect
=
location
;
const
itemRect
=
item
.
getBoundingClientRect
()
;
const
delta
=
itemRect
.
top
-
containerRect
.
top
;
const
delta
=
itemRect
.
top
-
containerRect
.
top
;
const
targetTop
=
container
.
scrollTop
+
delta
;
const
targetTop
=
container
.
scrollTop
+
delta
;
// 让高亮条款的“标题区域”贴到容器顶部
// 让高亮条款的“标题区域”贴到容器顶部
...
@@ -277,7 +280,7 @@ watch(
...
@@ -277,7 +280,7 @@ watch(
);
);
// 👇 核心:在 element 内部找文字位置
// 👇 核心:在 element 内部找文字位置
// =========================================
// =========================================
function
findTextInElement
(
element
,
targetText
)
{
const
findTextInElement
=
(
element
,
targetText
)
=>
{
// 遍历标签内的所有内容
// 遍历标签内的所有内容
const
nodes
=
element
.
childNodes
;
const
nodes
=
element
.
childNodes
;
let
rect
=
''
let
rect
=
''
...
@@ -289,7 +292,7 @@ function findTextInElement(element, targetText ) {
...
@@ -289,7 +292,7 @@ function findTextInElement(element, targetText ) {
const
originalText
=
node
.
textContent
;
const
originalText
=
node
.
textContent
;
function
cleanText
(
str
)
{
const
cleanText
=
(
str
)
=>
{
return
str
return
str
.
replace
(
/(/g
,
'('
)
.
replace
(
/(/g
,
'('
)
.
replace
(
/)/g
,
')'
)
.
replace
(
/)/g
,
')'
)
...
...
src/views/writtingAsstaint/components/WrittingTranslate.vue
浏览文件 @
d88247e0
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
<div
class=
"translation-content"
ref=
"translationContentRef"
>
<div
class=
"translation-content"
ref=
"translationContentRef"
>
<!-- :class="
{ active: store.highlightClauseId === item.payload?.clause_number }"
<!-- :class="
{ active: store.highlightClauseId === item.payload?.clause_number }"
:data-clause-number="item.payload?.clause_number" -->
:data-clause-number="item.payload?.clause_number" -->
<!-- 查找 -->
<!-- 查找 -->
<div
class=
"searchFor"
v-if=
"store.isSsearchFor"
>
<div
class=
"searchFor"
v-if=
"store.isSsearchFor"
>
<el-input
v-model=
"keyword"
style=
"width: 260px;"
placeholder=
"查找原文内容"
/>
<el-input
v-model=
"keyword"
style=
"width: 260px;"
placeholder=
"查找原文内容"
/>
...
...
src/views/writtingAsstaint/index.vue
浏览文件 @
d88247e0
...
@@ -110,7 +110,7 @@ const handleWrite=async ()=>{
...
@@ -110,7 +110,7 @@ const handleWrite=async ()=>{
try
{
try
{
// // 等待DOM更新(确保子组件DOM已挂载)
// // 等待DOM更新(确保子组件DOM已挂载)
store
.
tabList
[
2
].
active
=
true
//写报生成之后放开写报按钮
store
.
tabList
[
2
].
active
=
true
//写报生成之后放开写报按钮
store
.
headerTabType
=
'
translat
e'
store
.
headerTabType
=
'
messag
e'
await
nextTick
();
await
nextTick
();
await
store
.
generateWrite
()
await
store
.
generateWrite
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论