Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zrch-risk-39
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
zrch-risk-39
Commits
db81d638
提交
db81d638
authored
2月 04, 2026
作者:
kxjia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
2a980e8a
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
103 行增加
和
15 行删除
+103
-15
Tb6.vue
...isk-client-39/src/views/baosong/report/components/Tb6.vue
+103
-15
没有找到文件。
zrch-risk-client-39/src/views/baosong/report/components/Tb6.vue
浏览文件 @
db81d638
...
@@ -233,8 +233,7 @@
...
@@ -233,8 +233,7 @@
</vxe-checkbox-group>
</vxe-checkbox-group>
<template
v-if=
"ccopt.otherOption"
>
<template
v-if=
"ccopt.otherOption"
>
<div
style=
"margin-top: 5px; margin-left: 20px"
>
<div
style=
"margin-top: 5px; margin-left: 20px"
>
其他:
其他:
<vxe-input
<vxe-input
v-model=
"formData[row.code + '_' + ccopt.otherField]"
v-model=
"formData[row.code + '_' + ccopt.otherField]"
:disabled=
"
:disabled=
"
!(
!(
...
@@ -254,8 +253,7 @@
...
@@ -254,8 +253,7 @@
</vxe-radio-group>
</vxe-radio-group>
<template
v-if=
"ccopt.otherOption && formData[row.code + '_' + ccopt.field] === '其他'"
>
<template
v-if=
"ccopt.otherOption && formData[row.code + '_' + ccopt.field] === '其他'"
>
<div
style=
"margin-top: 5px; margin-left: 20px"
>
<div
style=
"margin-top: 5px; margin-left: 20px"
>
其他:
其他:
<vxe-input
v-model=
"formData[row.code + '_' + ccopt.otherField]"
style=
"width: 200px"
></vxe-input>
<vxe-input
v-model=
"formData[row.code + '_' + ccopt.otherField]"
style=
"width: 200px"
></vxe-input>
</div>
</div>
</
template
>
</
template
>
</template>
</template>
...
@@ -276,11 +274,12 @@
...
@@ -276,11 +274,12 @@
/>
/>
<span
class=
"unit"
>
{{
item
.
unit
}}
</span>
<span
class=
"unit"
>
{{
item
.
unit
}}
</span>
<!-- 帮助图标 -->
<!-- 帮助图标 -
修改这里 -
->
<span
<span
v-if=
"
item.hasValidFormula
"
v-if=
"
showHelpIcon(row.code, item.field, item)
"
class=
"help-icon"
class=
"help-icon"
@
click
.
stop=
"toggleTooltip(row.code, item.field)"
@
click
.
stop=
"toggleTooltip(row.code, item.field)"
title=
"点击查看校验规则"
>
>
?
?
</span>
</span>
...
@@ -290,6 +289,7 @@
...
@@ -290,6 +289,7 @@
v-if=
"inputErrors[getFieldKey(row.code, item.field)]"
v-if=
"inputErrors[getFieldKey(row.code, item.field)]"
class=
"error-icon"
class=
"error-icon"
@
click
.
stop=
"toggleErrorTooltip(row.code, item.field)"
@
click
.
stop=
"toggleErrorTooltip(row.code, item.field)"
title=
"点击查看错误详情"
>
>
<i
class=
"vxe-icon-error"
>
✗
</i>
<i
class=
"vxe-icon-error"
>
✗
</i>
</span>
</span>
...
@@ -315,7 +315,7 @@
...
@@ -315,7 +315,7 @@
<!-- 校验规则提示 -->
<!-- 校验规则提示 -->
<div
<div
v-if=
"showTooltip && hoveredKey === getFieldKey(row.code, item.field)"
v-if=
"showTooltip && hoveredKey === getFieldKey(row.code, item.field)
&& item.matchedFormula
"
class=
"tooltip"
class=
"tooltip"
@
click
.
stop
@
click
.
stop
>
>
...
@@ -345,7 +345,7 @@
...
@@ -345,7 +345,7 @@
import
HistoryFillCheck
from
'./check/historyFillCheck.vue'
;
import
HistoryFillCheck
from
'./check/historyFillCheck.vue'
;
import
ValidationDrawer
from
'./check/ValidationDrawer.vue'
;
import
ValidationDrawer
from
'./check/ValidationDrawer.vue'
;
import
{
tableFormData
}
from
'../../data/tb6.data'
;
import
{
tableFormData
}
from
'../../data/tb6.data'
;
import
{
ref
,
reactive
,
nextTick
,
onMounted
,
toRaw
,
computed
}
from
'vue'
;
import
{
ref
,
reactive
,
nextTick
,
onMounted
,
toRaw
,
computed
,
watch
}
from
'vue'
;
import
{
VxeUI
,
VxeToolbarInstance
,
VxeToolbarPropTypes
}
from
'vxe-table'
;
import
{
VxeUI
,
VxeToolbarInstance
,
VxeToolbarPropTypes
}
from
'vxe-table'
;
import
{
batchSaveOrUpdate
,
queryRecord
,
batchSaveOrUpdateBeforeDelete
}
from
'../../record/BaosongTaskRecord.api'
;
import
{
batchSaveOrUpdate
,
queryRecord
,
batchSaveOrUpdateBeforeDelete
}
from
'../../record/BaosongTaskRecord.api'
;
import
{
queryAllTplItemForUser
,
findUserRightForTplItem
}
from
'../../alloc/BaosongTaskAlloc.api'
;
import
{
queryAllTplItemForUser
,
findUserRightForTplItem
}
from
'../../alloc/BaosongTaskAlloc.api'
;
...
@@ -377,6 +377,7 @@
...
@@ -377,6 +377,7 @@
const
hoveredKey
=
ref
(
''
);
const
hoveredKey
=
ref
(
''
);
const
showErrorTooltip
=
ref
(
false
);
const
showErrorTooltip
=
ref
(
false
);
const
hoveredErrorKey
=
ref
(
''
);
const
hoveredErrorKey
=
ref
(
''
);
const
isInitialized
=
ref
(
false
);
interface
FormData
{
interface
FormData
{
id
:
number
|
null
;
id
:
number
|
null
;
...
@@ -428,6 +429,9 @@
...
@@ -428,6 +429,9 @@
validFormula
.
value
=
await
getTblvalidFormula
({
validFormula
.
value
=
await
getTblvalidFormula
({
tplid
:
queryParam
.
value
.
tplId
,
tplid
:
queryParam
.
value
.
tplId
,
});
});
console
.
log
(
'获取到的权限:'
,
userAllocItems
.
value
.
length
);
console
.
log
(
'获取到的公式:'
,
validFormula
.
value
.
length
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'获取权限或验证公式失败:'
,
error
);
console
.
error
(
'获取权限或验证公式失败:'
,
error
);
}
}
...
@@ -435,6 +439,14 @@
...
@@ -435,6 +439,14 @@
await
setTplItemMap
();
await
setTplItemMap
();
await
setFormItemRight
();
await
setFormItemRight
();
await
setData
();
await
setData
();
// 标记初始化完成
isInitialized
.
value
=
true
;
// 延迟刷新一次,确保问号图标显示
setTimeout
(()
=>
{
refreshHelpIcons
();
},
300
);
});
});
const
loading
=
ref
(
false
);
const
loading
=
ref
(
false
);
...
@@ -448,6 +460,23 @@
...
@@ -448,6 +460,23 @@
return
`
${
rowCode
}
_
${
field
}
`
;
return
`
${
rowCode
}
_
${
field
}
`
;
};
};
// 添加帮助图标显示条件计算
const
showHelpIcon
=
(
rowCode
:
string
,
field
:
string
,
item
:
any
):
boolean
=>
{
// 如果已经有 hasValidFormula 属性,直接使用
if
(
item
.
hasValidFormula
!==
undefined
)
{
return
item
.
hasValidFormula
===
true
;
}
// 否则重新计算
const
key
=
getFieldKey
(
rowCode
,
field
);
const
hasRight
=
userAllocItems
.
value
.
includes
(
key
);
if
(
!
hasRight
)
return
false
;
const
formulaResult
=
findEarliestFormulaForField
(
validFormula
.
value
,
field
);
return
!!
formulaResult
.
formula
;
};
const
saveBatch
=
async
()
=>
{
const
saveBatch
=
async
()
=>
{
try
{
try
{
formValues
.
value
=
[];
formValues
.
value
=
[];
...
@@ -458,7 +487,7 @@
...
@@ -458,7 +487,7 @@
}
else
{
}
else
{
VxeUI
.
modal
.
message
({
content
:
'没有需要保存的数据'
,
status
:
'warning'
});
VxeUI
.
modal
.
message
({
content
:
'没有需要保存的数据'
,
status
:
'warning'
});
}
}
}
catch
(
error
)
{
}
catch
(
error
:
any
)
{
VxeUI
.
modal
.
message
({
content
:
`保存失败:
${
error
.
message
}
`
,
status
:
'error'
});
VxeUI
.
modal
.
message
({
content
:
`保存失败:
${
error
.
message
}
`
,
status
:
'error'
});
}
finally
{
}
finally
{
loading
.
value
=
false
;
loading
.
value
=
false
;
...
@@ -673,6 +702,10 @@
...
@@ -673,6 +702,10 @@
};
};
const
setFormItemRight
=
()
=>
{
const
setFormItemRight
=
()
=>
{
console
.
log
(
'开始设置表单权限...'
);
console
.
log
(
'userAllocItems 数量:'
,
userAllocItems
.
value
.
length
);
console
.
log
(
'validFormula 数量:'
,
validFormula
.
value
.
length
);
tableFormData
.
forEach
((
row
:
any
)
=>
{
tableFormData
.
forEach
((
row
:
any
)
=>
{
if
(
row
.
content
&&
Array
.
isArray
(
row
.
content
))
{
if
(
row
.
content
&&
Array
.
isArray
(
row
.
content
))
{
row
.
content
.
forEach
((
item
:
any
)
=>
{
row
.
content
.
forEach
((
item
:
any
)
=>
{
...
@@ -680,15 +713,25 @@
...
@@ -680,15 +713,25 @@
const
key
=
getFieldKey
(
row
.
code
,
item
.
field
);
const
key
=
getFieldKey
(
row
.
code
,
item
.
field
);
item
.
hasRight
=
userAllocItems
.
value
.
includes
(
key
);
item
.
hasRight
=
userAllocItems
.
value
.
includes
(
key
);
console
.
log
(
`字段
${
key
}
: hasRight =
${
item
.
hasRight
}
`
);
if
(
item
.
hasRight
)
{
if
(
item
.
hasRight
)
{
const
{
formula
}
=
findEarliestFormulaForField
(
validFormula
.
value
,
item
.
field
);
const
formulaResult
=
findEarliestFormulaForField
(
validFormula
.
value
,
item
.
field
);
item
.
hasValidFormula
=
!!
formula
;
item
.
matchedFormula
=
formula
;
item
.
hasValidFormula
=
!!
formulaResult
.
formula
;
item
.
matchedFormula
=
formulaResult
.
formula
||
null
;
console
.
log
(
`字段
${
key
}
: hasValidFormula =
${
item
.
hasValidFormula
}
`
);
}
else
{
item
.
hasValidFormula
=
false
;
item
.
matchedFormula
=
null
;
}
}
}
}
});
});
}
}
});
});
console
.
log
(
'表单权限设置完成'
);
};
};
const
findEarliestFormulaForField
=
(
const
findEarliestFormulaForField
=
(
...
@@ -729,6 +772,35 @@
...
@@ -729,6 +772,35 @@
historyDrawerVisible
.
value
=
false
;
historyDrawerVisible
.
value
=
false
;
};
};
// 添加刷新帮助图标的方法
const
refreshHelpIcons
=
()
=>
{
console
.
log
(
'刷新帮助图标...'
);
tableFormData
.
forEach
((
row
:
any
)
=>
{
if
(
row
.
content
&&
Array
.
isArray
(
row
.
content
))
{
row
.
content
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
field
)
{
const
key
=
getFieldKey
(
row
.
code
,
item
.
field
);
const
hasRight
=
userAllocItems
.
value
.
includes
(
key
);
if
(
hasRight
)
{
const
formulaResult
=
findEarliestFormulaForField
(
validFormula
.
value
,
item
.
field
);
item
.
hasValidFormula
=
!!
formulaResult
.
formula
;
item
.
matchedFormula
=
formulaResult
.
formula
||
null
;
}
else
{
item
.
hasValidFormula
=
false
;
item
.
matchedFormula
=
null
;
}
}
});
}
});
// 强制更新视图
nextTick
(()
=>
{
console
.
log
(
'帮助图标刷新完成'
);
});
};
// 原有检查方法
// 原有检查方法
async
function
checkDataOrig
()
{
async
function
checkDataOrig
()
{
let
tplName
=
queryParam
.
value
.
tplName
;
let
tplName
=
queryParam
.
value
.
tplName
;
...
@@ -837,7 +909,7 @@
...
@@ -837,7 +909,7 @@
nextTick
();
nextTick
();
child
.
setFormData
(
tableDatas
);
child
.
setFormData
(
tableDatas
);
}
}
}
catch
(
error
)
{
}
catch
(
error
:
any
)
{
VxeUI
.
modal
.
message
({
VxeUI
.
modal
.
message
({
content
:
`加载数据失败:
${
error
.
message
}
`
,
content
:
`加载数据失败:
${
error
.
message
}
`
,
status
:
'error'
,
status
:
'error'
,
...
@@ -859,7 +931,7 @@
...
@@ -859,7 +931,7 @@
let
strKey
=
item
.
pcode
+
'_'
+
item
.
xmlcode
;
let
strKey
=
item
.
pcode
+
'_'
+
item
.
xmlcode
;
tplItemMap
.
value
[
strKey
]
=
{
pid
:
item
.
pid
,
itemid
:
item
.
id
,
formTp
:
item
.
formTp
,
code
:
item
.
xmlcode
};
tplItemMap
.
value
[
strKey
]
=
{
pid
:
item
.
pid
,
itemid
:
item
.
id
,
formTp
:
item
.
formTp
,
code
:
item
.
xmlcode
};
});
});
}
catch
(
error
)
{
}
catch
(
error
:
any
)
{
VxeUI
.
modal
.
message
({
content
:
`加载数据失败:
${
error
.
message
}
`
,
status
:
'error'
});
VxeUI
.
modal
.
message
({
content
:
`加载数据失败:
${
error
.
message
}
`
,
status
:
'error'
});
}
finally
{
}
finally
{
}
}
...
@@ -1098,9 +1170,24 @@
...
@@ -1098,9 +1170,24 @@
background: #e6f7ff;
background: #e6f7ff;
border-radius: 50%;
border-radius: 50%;
transition: all 0.3s;
transition: all 0.3s;
opacity: 0;
animation: fadeIn 0.5s forwards;
animation-delay: 0.3s;
&:hover {
&:hover {
background: #bae7ff;
background: #bae7ff;
transform: scale(1.1);
}
}
@keyframes fadeIn {
from {
opacity: 0;
transform: scale(0.8);
}
to {
opacity: 1;
transform: scale(1);
}
}
}
}
...
@@ -1167,4 +1254,4 @@
...
@@ -1167,4 +1254,4 @@
border-color: transparent transparent #8b0000 transparent;
border-color: transparent transparent #8b0000 transparent;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论