Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0e184ae7
authored
2025-01-17 14:15:36 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fiix
1 parent
2c28a99b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
135 deletions
src/api/modules/dataAsset.ts
src/components/Dialog/index.vue
src/components/Form/index.vue
src/views/data_asset/qualityEvaluate.vue
src/views/data_asset/valueEvaluate.vue
src/views/security_menu/index.vue
src/api/modules/dataAsset.ts
View file @
0e184ae
...
...
@@ -164,8 +164,14 @@ export const deleteCostAssess = (params) => request({
});
/** 通过价值评估审批 */
// export const costAssessAllow = (params) => request({
// url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
// method: 'post',
// data: params
// });
/** 质量评价审批通过 */
export
const
costAssessAllow
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/cost-assessment/
al
low`
,
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/cost-assessment/
submit-f
low`
,
method
:
'post'
,
data
:
params
});
...
...
src/components/Dialog/index.vue
View file @
0e184ae
...
...
@@ -72,7 +72,7 @@ const textareVal = ref("");
const
headerSearchInputValue
=
ref
(
""
);
const
dialogVisible
=
computed
(()
=>
{
return
props
.
dialogInfo
.
visible
;
return
props
.
dialogInfo
?
.
visible
;
});
const
showClose
=
computed
(()
=>
{
return
props
.
dialogInfo
.
showClose
??
true
;
...
...
@@ -99,10 +99,10 @@ const dialogHeight = computed(() => {
return
props
.
dialogInfo
.
height
??
"auto"
;
});
const
dialogTitle
=
computed
(()
=>
{
return
props
.
dialogInfo
.
header
.
title
;
return
props
.
dialogInfo
.
header
?
.
title
;
});
const
headerSearchInputVisible
=
computed
(()
=>
{
return
props
.
dialogInfo
.
header
.
headerSearchInputVisible
??
false
;
return
props
.
dialogInfo
.
header
?
.
headerSearchInputVisible
??
false
;
});
const
headerSearchInputPlaceholder
=
computed
(()
=>
{
return
(
...
...
@@ -579,7 +579,7 @@ defineExpose({
<span>
{{
bar
.
label
}}
</span>
</span>
<template
v-else
>
<el-popover
v-if=
"bar.popover"
:visible=
"bar.popover.visible"
:title=
"bar.popover.title"
<el-popover
v-if=
"bar.popover"
:visible=
"bar.popover
?
.visible"
:title=
"bar.popover.title"
:content=
"bar.popover.content"
placement=
"bottom-start"
:width=
"bar.popover.width ?? 200"
trigger=
"click"
>
<template
#
reference
>
...
...
@@ -692,7 +692,7 @@ defineExpose({
</div>
</div>
</div>
<
template
#
footer
v-if=
"footer.visible ?? true"
>
<
template
#
footer
v-if=
"footer
?
.visible ?? true"
>
<div
class=
"dialog-footer"
:class=
"
{ between: footer.textBtns }">
<div
v-if=
"footer.textBtns"
>
<span
class=
"text_btn"
v-for=
"btn in footer.textBtns"
:disabled=
"btn.disabled ?? false"
...
...
@@ -700,7 +700,7 @@ defineExpose({
</div>
<div>
<template
v-for=
"btn in footer.btns"
>
<el-button
v-if=
"btn.visible ?? true"
:type=
"btn.type"
:disabled=
"btn.disabled ?? false"
<el-button
v-if=
"btn
?
.visible ?? true"
:type=
"btn.type"
:disabled=
"btn.disabled ?? false"
:loading=
"btn.loading ?? btnLoading"
@
click=
"btnClick(btn, null)"
v-preReClick
>
{{
btn
.
label
}}
</el-button>
</
template
>
</div>
...
...
src/components/Form/index.vue
View file @
0e184ae
...
...
@@ -197,6 +197,19 @@ const inputChange = (val, row) => {
formInline
.
value
[
row
.
field
]
=
val
=
parseFloat
(
val
||
0
).
toFixed
(
2
);
}
}
if
(
row
.
inputType
==
'scoreNumber'
&&
parseFloat
(
val
)
>
100
)
{
// 先去除非数字和小数点字符
val
=
val
.
replace
(
/
[^\d
.
]
/g
,
""
);
// 限制最多保留两位小数
val
=
val
.
replace
(
/
\.{2,}
/g
,
"."
);
val
=
val
.
replace
(
/^
(\d
+
)\.(\d{2})
.*$/
,
"$1.$2"
);
let
num
=
parseFloat
(
val
);
if
(
num
>
100
)
{
num
=
100
;
// 超过100时将其设置为100
val
=
num
.
toFixed
(
2
);
// 保证显示为两位小数
}
formInline
.
value
[
row
.
field
]
=
val
;
}
// 新增的 inputType 处理逻辑:integerWithComma
if
(
row
.
inputType
==
"integerWithComma"
)
{
val
=
val
.
replace
(
/
[^\d]
/g
,
""
);
// 移除非数字字符
...
...
@@ -604,7 +617,7 @@ const panelChange = (scope, row) => {
required_mark: item.required,
}">
{{
item
.
label
}}
</span>
}}
</span>
</span>
<div
class=
"header_title_tooltip"
style=
"width: auto"
v-if=
"item.tooltip"
>
...
...
@@ -697,7 +710,7 @@ const panelChange = (scope, row) => {
<div
class=
"item_panel"
:class=
"
{ is_block: panel.block }" v-for="panel in item.children">
<label
:class=
"
{ required_mark: panel.required }">
{{
panel
.
label
}}
</label>
}}
</label>
<el-checkbox
v-if=
"panel.type == 'checkbox'"
v-model=
"formInline[panel.field]"
:disabled=
"panel.disabled || readonly"
:true-label=
"panel.trueValue ?? true"
:false-label=
"panel.falseValue ?? false"
>
{{
panel
.
placeholder
}}
</el-checkbox>
...
...
@@ -780,7 +793,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
v-if=
"child.label"
:class=
"{ required_mark: child.required }"
>
{{
child.label
}}
</span>
}}
</span>
</span>
<el-select
v-if=
"child.type == 'select'"
v-model=
"formInline[child.field]"
:placeholder=
"child.placeholder"
:disabled=
"child.disabled || readonly"
:filterable=
"child.filterable"
...
...
@@ -839,7 +852,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<el-cascader
v-if=
"child.type == 'cascader'"
v-model=
"formInline[child.field]"
:props=
"child.props"
:options=
"child.options"
:show-all-levels=
"child.showAllLevels ?? true"
...
...
@@ -882,7 +895,7 @@ const panelChange = (scope, row) => {
<div
class=
"item_panel"
v-for=
"child in item.children"
>
<label
:class=
"{ required_mark: child.required }"
>
{{
child.label
}}
</label>
}}
</label>
<div
class=
"tool_item"
>
<el-select
v-model=
"formInline[child.field]"
:class=
"{ is_block: child.block }"
:placeholder=
"child.placeholder"
:multiple=
"child.multiple"
:collapse-tags=
"child.collapse"
...
...
@@ -957,7 +970,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<el-input
:class=
"[child.col,
{ is_block: child.block }]" v-model="formInline[child.field]"
:rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder"
...
...
@@ -981,8 +994,7 @@ const panelChange = (scope, row) => {
</div>
</div>
<div
v-if=
"item.example"
class=
"panel_header-expample"
>
{{
item
.
example
}}
</div>
<el-input
ref=
"exampleTextareaRef"
:id=
"item.field"
:class=
"[item.col,
{ is_block: item.block }]"
<el-input
ref=
"exampleTextareaRef"
:id=
"item.field"
:class=
"[item.col,
{ is_block: item.block }]"
v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
:disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
:maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
...
...
@@ -1014,7 +1026,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<div
class=
"input_group"
:class=
"[child.col]"
v-if=
"child.type == 'input-group'"
>
<template
v-for=
"(group, c) in child.children"
>
...
...
@@ -1023,7 +1035,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: group.required }">
{{
group
.
label
}}
</span>
}}
</span>
</span>
<el-select
v-if=
"group.type == 'select'"
v-model=
"formInline[group.field]"
:placeholder=
"group.placeholder"
:clearable=
"group.clearable"
...
...
@@ -1164,7 +1176,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<el-select
v-if=
"child.type == 'select'"
v-model=
"formInline[child.field]"
:placeholder=
"child.placeholder"
:clearable=
"child.clearable"
:disabled=
"child.disabled || readonly"
...
...
@@ -1215,7 +1227,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
:class=
"[child.col]"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<div
class=
"input_popover_panel"
v-if=
"child.type == 'input-popover-panel'"
>
<el-popover
placement=
"bottom-start"
width=
"100%"
trigger=
"click"
:teleported=
"false"
>
...
...
@@ -1269,7 +1281,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<template
v-if=
"child.type == 'upload-image'"
>
<el-upload
:class=
"[child.col, 'avatar-uploader',
{ is_block: child.block }]" action="#"
...
...
src/views/data_asset/qualityEvaluate.vue
View file @
0e184ae
...
...
@@ -223,6 +223,7 @@ const tableBtnClick = (scope, btn) => {
const
type
=
btn
.
value
;
const
row
=
scope
.
row
;
currTableData
.
value
=
row
;
console
.
log
(
row
,
'-------'
);
if
(
type
==
"redit"
)
{
dialogInfo
.
value
.
visible
=
true
;
dialogInfo
.
value
.
type
=
'reSubmit'
;
...
...
@@ -618,12 +619,12 @@ const passDialogBtnClick = (btn, info) => {
evaluationRangeStart
:
info
.
evaluationRange
[
0
],
evaluationRangeEnd
:
info
.
evaluationRange
[
1
],
evaluationNote
:
info
.
evaluationNote
,
evaluationFile
:
info
.
evaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
evaluationFile
:
info
.
evaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
}).
then
((
res
:
any
)
=>
{
passDialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
src/views/data_asset/valueEvaluate.vue
View file @
0e184ae
This diff is collapsed.
Click to expand it.
src/views/security_menu/index.vue
View file @
0e184ae
...
...
@@ -76,117 +76,90 @@ const tableInfo = ref({
/**弹窗配置 */
const
newCreateGradeFormItems
=
ref
<
any
>
([{
label
:
'标签名'
,
type
:
'input'
,
placeholder
:
'请选择'
,
field
:
'label'
,
default
:
''
,
required
:
true
,
filterable
:
true
,
clearable
:
true
,
visible
:
true
,
block
:
true
,
},
{
label
:
'分类'
,
type
:
'tree-select'
,
placeholder
:
'请选择'
,
field
:
'classifyDetailGuid'
,
default
:
''
,
options
:
[],
props
:
{
label
:
"classifyName"
,
value
:
"guid"
,
const
formItems
=
ref
([
{
label
:
'附件上传'
,
tip
:
'支持格式:pdf,单个文件不能超过10MB '
,
type
:
'upload-file'
,
accept
:
'.pdf'
,
field
:
'costAssessmentFile'
,
templateUrl
:
''
,
required
:
true
,
block
:
true
,
visible
:
true
,
default
:
[],
},
{
label
:
'附件上传'
,
tip
:
'支持格式:pdf,单个文件不能超过10MB '
,
type
:
'upload-file'
,
accept
:
'.pdf'
,
field
:
'costAssessmentFile1'
,
templateUrl
:
''
,
required
:
true
,
block
:
true
,
visible
:
true
,
default
:
[],
},
required
:
true
,
checkStricty
:
true
,
lazy
:
false
,
filterable
:
true
,
clearable
:
true
,
visible
:
true
,
block
:
true
,
},
{
label
:
'分级'
,
type
:
'select'
,
maxlength
:
19
,
placeholder
:
'请输入'
,
field
:
'gradeDetailGuid'
,
default
:
''
,
options
:
[],
props
:
{
label
:
'name'
,
value
:
'guid'
,
{
label
:
'附件上传'
,
tip
:
'支持格式:pdf,单个文件不能超过10MB '
,
type
:
'upload-file'
,
accept
:
'.pdf'
,
field
:
'costAssessmentFile2'
,
templateUrl
:
''
,
required
:
true
,
block
:
true
,
visible
:
true
,
default
:
[],
},
clearable
:
true
,
required
:
true
,
block
:
true
,
},
// {
// label: ' ',
// type: 'label',
// default: '规则配置',
// block: true,
// col: 'title-label'
// },
// {
// label: '精确匹配',
// type: 'textarea',
// maxlength: 200,
// placeholder: '请输入字段中文,中间用英文“,”分号隔开',
// field: 'matchChValue',
// default: '',
// clearable: true,
// required: false,
// },
// {
// label: '',
// type: 'textarea',
// maxlength: 200,
// placeholder: '请输入字段中文,中间用英文“,”分号隔开',
// field: 'matchEnValue',
// default: '',
// clearable: true,
// required: false,
// }
]);
const
newCreateGradeFormRules
=
ref
({
label
:
[
{
required
:
true
,
message
:
'请输入标签名'
,
trigger
:
'change'
}
],
detailGuid
:
[
{
required
:
true
,
message
:
'请选择分类'
,
trigger
:
'change'
}
],
gradeDetailGuid
:
[
{
required
:
true
,
message
:
'请选择分级'
,
trigger
:
'change'
}
const
formRules
=
ref
({
registerGuid
:
[
{
required
:
true
,
trigger
:
'change'
,
message
:
"请填写资产名称"
}
],
costAssessmentFile
:
[{
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
!
value
?.
length
)
{
callback
(
new
Error
(
'请上传数据价值评估附件'
))
}
else
{
callback
();
}
},
trigger
:
'change'
}]
});
const
newCreateGradeStandardD
ialogInfo
=
ref
({
const
d
ialogInfo
=
ref
({
visible
:
false
,
size
:
600
,
title
:
"添加标签"
,
type
:
""
,
formInfo
:
{
id
:
"grade-form"
,
items
:
newCreateGradeFormItems
.
value
,
rules
:
newCreateGradeFormRules
.
value
,
size
:
510
,
direction
:
"column"
,
header
:
{
title
:
"价值评估发起"
,
},
submitBtnLoading
:
false
,
btns
:
{
cancel
:
()
=>
{
newCreateGradeStandardDialogInfo
.
value
.
visible
=
false
;
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
},
submit
:
async
(
btn
,
info
)
=>
{
type
:
''
,
//标识是否是重新提交
contents
:
[
{
type
:
'form'
,
title
:
''
,
formInfo
:
{
id
:
'quality-coss-level'
,
items
:
formItems
.
value
,
rules
:
formRules
.
value
}
}
}
})
],
footer
:
{
btns
:
[
{
type
:
"default"
,
label
:
"取消"
,
value
:
"cancel"
},
{
type
:
"primary"
,
label
:
"确定"
,
value
:
"submit"
},
],
},
});
const
dialogBtnClick
=
()
=>
{
console
.
log
(
'handleSelectChange'
);
};
const
classSearchItemList
=
ref
<
any
>
([
...
...
@@ -244,13 +217,7 @@ const searchClass = async (val: any, clear: boolean = false) => {
};
const
addNewLabel
=
()
=>
{
newCreateGradeStandardDialogInfo
.
value
.
visible
=
true
;
newCreateGradeStandardDialogInfo
.
value
.
title
=
'新增标签'
;
newCreateGradeFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
''
;
item
.
disabled
=
false
;
});
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
dialogInfo
.
value
.
visible
=
true
;
}
...
...
@@ -276,8 +243,7 @@ const addNewLabel = () => {
</div>
</div>
</div>
<Dialog
_form
ref=
"dialogLabelFormRef"
:dialogConfigInfo=
"newCreateGradeStandardDialogInfo"
class=
"v-dialog-form"
>
<
/Dialog_form>
<Dialog
:dialogInfo=
"dialogInfo"
@
btnClick=
"dialogBtnClick"
/>
</div>
</
template
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment