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
812919fd
authored
2025-04-28 14:49:23 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.02版本提交
1 parent
c4d5a5f7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
310 additions
and
94 deletions
src/api/modules/dataInventory.ts
src/components/FileUpload/uploadExcelFile.vue
src/components/Form/index.vue
src/components/Upload/index.vue
src/store/modules/user.ts
src/views/data_asset/contractProgress.vue
src/views/data_asset/qualityEvaluate.vue
src/views/data_asset/registerCatalogDetail.vue
src/views/data_asset/valueEvaluate.vue
src/views/data_inventory/classifyGradeCatalogue.vue
src/views/data_inventory/components/uploadExcelFile.vue
src/views/data_inventory/tableCreateExisting.vue
src/views/data_inventory/tableCreateFile.vue
src/views/importFile.vue
src/api/modules/dataInventory.ts
View file @
812919f
...
...
@@ -615,6 +615,15 @@ export const saveBizRuleConfig = (data) => request({
data
})
/** 业务规则配置-批量新增
* @param {Object}
* @path /biz-rule-config/save
*/
export
const
batchSaveBizRuleConfig
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/biz-rule-config/save-batch`
,
method
:
'post'
,
data
})
/**树形目录
* @param {Object}
...
...
src/components/FileUpload/uploadExcelFile.vue
View file @
812919f
...
...
@@ -29,9 +29,9 @@ const fileFormRef = ref();
const
fileFormItems
:
any
=
ref
([
{
label
:
'选择文件上传'
,
tip
:
'支持扩展名:xlsx、xls,文件大小不超过20MB'
,
tip
:
'支持扩展名:xlsx、xls
、csv
,文件大小不超过20MB'
,
type
:
'upload-file'
,
accept
:
'.xlsx, .xls'
,
accept
:
'.xlsx, .xls
, .csv
'
,
limit
:
1
,
limitSize
:
20
,
isExcel
:
true
,
...
...
src/components/Form/index.vue
View file @
812919f
...
...
@@ -476,7 +476,7 @@ const uploadFile = (file, item) => {
return Promise.resolve();
}
if (item.isExcel) {
const isExcel = file.file.type === 'application/vnd.ms-excel' || file.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const isExcel = file.file.type === 'application/vnd.ms-excel' || file.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|| file.file.type == 'text/csv'
;
if (!isExcel) {
uploadRef.value["ref" + item.field].handleRemove(file);
ElMessage.error('上传文件只能是 .xls, .xlsx 格式');
...
...
src/components/Upload/index.vue
View file @
812919f
...
...
@@ -36,7 +36,7 @@ const toolBar = computed(() => {
})
const
onUpload
=
async
(
file
,
list
)
=>
{
const
isExcel
=
file
.
raw
.
type
===
'application/vnd.ms-excel'
||
file
.
raw
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
;
const
isExcel
=
file
.
raw
.
type
===
'application/vnd.ms-excel'
||
file
.
raw
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
file
.
raw
.
type
==
'text/csv'
;
if
(
!
isExcel
)
{
const
fileUpload
=
fileUploadRef
.
value
[
0
]
||
fileUploadRef
.
value
fileUpload
?.
handleRemove
(
file
)
...
...
src/store/modules/user.ts
View file @
812919f
...
...
@@ -102,7 +102,7 @@ const useUserStore = defineStore(
await
process
();
}
/** 轮询是否需要刷新token。如果是同步多个调用,则不处理错误的信息。 */
setInterval
(
async
()
=>
{
timer
.
value
=
setInterval
(
async
()
=>
{
process
();
},
600000
);
}
...
...
src/views/data_asset/contractProgress.vue
View file @
812919f
...
...
@@ -444,9 +444,11 @@ const handleTableEdit = (scope) => {
drawerInfo
.
value
.
visible
=
true
;
drawerInfo
.
value
.
type
=
'edit'
;
drawerInfo
.
value
.
header
.
title
=
'编辑合同'
;
drawerInfo
.
value
.
footer
.
visible
=
true
;
currTableData
.
value
=
scope
.
row
;
contractEditFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
scope
.
row
[
item
.
field
];
item
.
disabled
=
false
;
if
(
item
.
field
==
'contractNodeCodes'
)
{
item
.
default
=
scope
.
row
.
contractNodeCodes
?.
map
(
c
=>
c
.
code
)
||
[];
item
.
options
=
scope
.
row
.
contractTypeCode
==
'1'
?
registerContractNodesList
.
value
:
(
!
scope
.
row
.
contractTypeCode
?
[]
:
tradeContractNodesList
.
value
);
...
...
@@ -455,6 +457,7 @@ const handleTableEdit = (scope) => {
nodesInfo
.
value
=
scope
.
row
.
contractNodes
?.
map
(
node
=>
{
let
items
=
cloneDeep
(
nodeFormItems
.
value
);
items
.
forEach
(
item
=>
{
item
.
disabled
=
false
;
item
.
default
=
node
[
item
.
field
];
if
(
item
.
field
==
'dateRange'
)
{
item
.
default
=
[
node
.
startDate
,
node
.
endDate
];
...
...
@@ -483,12 +486,44 @@ const handleTableDel = (scope) => {
})
}
const
handleTableView
=
(
scope
)
=>
{
drawerInfo
.
value
.
visible
=
true
;
drawerInfo
.
value
.
type
=
'view'
;
drawerInfo
.
value
.
header
.
title
=
'查看合同'
;
currTableData
.
value
=
scope
.
row
;
contractEditFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
scope
.
row
[
item
.
field
];
item
.
disabled
=
true
;
if
(
item
.
field
==
'contractNodeCodes'
)
{
item
.
default
=
scope
.
row
.
contractNodeCodes
?.
map
(
c
=>
c
.
code
)
||
[];
item
.
options
=
scope
.
row
.
contractTypeCode
==
'1'
?
registerContractNodesList
.
value
:
(
!
scope
.
row
.
contractTypeCode
?
[]
:
tradeContractNodesList
.
value
);
}
})
nodesInfo
.
value
=
scope
.
row
.
contractNodes
?.
map
(
node
=>
{
let
items
=
cloneDeep
(
nodeFormItems
.
value
);
items
.
forEach
(
item
=>
{
item
.
default
=
node
[
item
.
field
];
item
.
disabled
=
true
;
if
(
item
.
field
==
'dateRange'
)
{
item
.
default
=
[
node
.
startDate
,
node
.
endDate
];
}
})
return
Object
.
assign
({},
node
,
{
nodeFormItems
:
items
,
nodeFormRules
:
nodeFormRules
.
value
})
})
||
[];
drawerInfo
.
value
.
footer
.
visible
=
false
;
}
const
handleCreate
=
()
=>
{
drawerInfo
.
value
.
visible
=
true
;
drawerInfo
.
value
.
type
=
'add'
;
drawerInfo
.
value
.
header
.
title
=
'新增合同'
;
drawerInfo
.
value
.
footer
.
visible
=
true
;
contractEditFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
''
;
item
.
disabled
=
false
;
if
(
item
.
field
==
'partyBGuid'
)
{
item
.
default
=
userData
.
tenantGuid
;
}
...
...
@@ -701,8 +736,9 @@ onBeforeMount(() => {
</el-table-column>
<el-table-column
label=
"操作"
width=
"100px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
<span
class=
"text_btn"
@
click=
"handleTableEdit(scope)"
>
编辑
</span>
<span
class=
"text_btn ml4"
@
click=
"handleTableDel(scope)"
>
删除
</span>
<span
v-if=
"!scope.row.createUserId || scope.row.createUserId == userData.userGuid"
class=
"text_btn"
@
click=
"handleTableEdit(scope)"
>
编辑
</span>
<span
v-if=
"!scope.row.createUserId || scope.row.createUserId == userData.userGuid"
class=
"text_btn ml4"
@
click=
"handleTableDel(scope)"
>
删除
</span>
<span
v-if=
"scope.row.createUserId && scope.row.createUserId != userData.userGuid"
class=
"text_btn ml4"
@
click=
"handleTableView(scope)"
>
查看
</span>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -722,7 +758,7 @@ onBeforeMount(() => {
</div>
<!-- 新增按钮 -->
<div
class=
"bottm_tools"
v-show=
"nodesInfo.length
< contractNodeCodes
?.
length
"
@
click=
"addNode"
>
<div
class=
"bottm_tools"
v-show=
"nodesInfo.length
< contractNodeCodes
?.
length
&&
drawerInfo
.
type
!=
'
view
'
"
@
click=
"addNode"
>
<el-icon>
<Plus
/>
</el-icon>
...
...
src/views/data_asset/qualityEvaluate.vue
View file @
812919f
...
...
@@ -15,12 +15,13 @@ import {
qualityAllow
,
deleteQuality
,
updatQuality
,
getTenantList
getTenantList
,
}
from
"@/api/modules/dataAsset"
;
import
useUserStore
from
"@/store/modules/user"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
getStaffDetailInfo
getStaffDetailInfo
,
getSingleList
}
from
"@/api/modules/queryService"
;
import
{
isNeedApprove
,
rejectFlowData
,
revokeFlowData
,
getCamundaDeploymentId
,
getProcessNodesPromise
,
isMyFirstNode
,
passFlowData
}
from
"@/api/modules/workFlowService"
;
...
...
@@ -70,13 +71,10 @@ const deploymentId = ref('');
const
tenantList
:
any
=
ref
([]);
onBeforeMount
(()
=>
{
getTenantList
({
bizState
:
'Y'
,
pageSize
:
-
1
}).
then
((
res
:
any
)
=>
{
tenantList
.
value
=
[];
// 获取质量评估机构
getSingleList
({
pageIndex
:
-
1
,
pageSize
:
-
1
,
tenantType
:
"12505"
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
tenantList
.
value
=
res
.
data
?
.
records
||
[];
tenantList
.
value
=
res
.
data
.
records
||
[];
formItems
.
value
[
1
].
options
=
tenantList
.
value
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
...
...
@@ -181,8 +179,21 @@ const handleCreate = () => {
formItems
.
value
[
0
].
default
=
''
;
formItems
.
value
[
1
].
visible
=
!
needApprove
.
value
;
formItems
.
value
[
1
].
default
=
''
;
formItems
.
value
[
2
].
visible
=
tr
ue
;
formItems
.
value
[
2
].
visible
=
needApprove
.
val
ue
;
formItems
.
value
[
2
].
default
=
[];
if
(
!
needApprove
.
value
)
{
passFormItems
.
value
[
0
].
default
=
null
;
passFormItems
.
value
[
1
].
disabled
=
false
;
passFormItems
.
value
[
1
].
default
=
null
;
passFormItems
.
value
[
2
].
default
=
''
;
passFormItems
.
value
[
3
].
default
=
[];
passFormItems
.
value
[
2
].
placeholder
=
`本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`
;
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
.
concat
(
passFormItems
.
value
);
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
rules
=
Object
.
assign
({},
formRules
.
value
,
passFormRules
.
value
);
}
else
{
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
;
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
rules
=
formRules
.
value
;
}
dialogInfo
.
value
.
visible
=
true
;
dialogInfo
.
value
.
type
=
''
;
if
(
needApprove
.
value
)
{
...
...
@@ -303,8 +314,26 @@ const tableBtnClick = (scope, btn) => {
formItems
.
value
[
0
].
default
=
row
.
damGuid
;
formItems
.
value
[
1
].
visible
=
!
needApprove
.
value
;
formItems
.
value
[
1
].
default
=
row
.
evaluationAgencyGuid
;
formItems
.
value
[
2
].
visible
=
needApprove
.
value
;
formItems
.
value
[
2
].
default
=
row
.
qualityEvaluationFile
||
[];
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
;
if
(
!
needApprove
.
value
)
{
passFormItems
.
value
[
0
].
default
=
row
[
'qualityScore'
];
if
(
row
.
dataStartDate
)
{
passFormItems
.
value
[
1
].
disabled
=
true
;
passFormItems
.
value
[
1
].
default
=
[
row
.
dataStartDate
,
row
.
dataEndDate
];
}
else
{
passFormItems
.
value
[
1
].
disabled
=
false
;
passFormItems
.
value
[
1
].
default
=
null
;
}
passFormItems
.
value
[
2
].
default
=
row
.
evaluationNote
||
''
;
passFormItems
.
value
[
3
].
default
=
row
.
evaluationFile
||
[];
passFormItems
.
value
[
2
].
placeholder
=
`本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`
;
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
.
concat
(
passFormItems
.
value
);
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
rules
=
Object
.
assign
({},
formRules
.
value
,
passFormRules
.
value
);
}
else
{
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
;
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
rules
=
formRules
.
value
;
}
dialogInfo
.
value
.
visible
=
true
;
dialogInfo
.
value
.
type
=
'reSubmit'
;
}
else
{
...
...
@@ -494,7 +523,7 @@ const formRules = ref({
const
dialogInfo
=
ref
({
visible
:
false
,
size
:
5
1
0
,
size
:
5
6
0
,
direction
:
"column"
,
header
:
{
title
:
"质量评价发起"
,
...
...
@@ -519,6 +548,22 @@ const dialogInfo = ref({
},
});
const
handleDialogSelectChange
=
(
val
,
row
,
info
)
=>
{
if
(
row
.
field
==
'damGuid'
)
{
let
selectDam
=
val
&&
assetListData
.
value
.
find
(
a
=>
a
.
guid
==
val
);
formItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
info
[
item
.
field
];
})
passFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
info
[
item
.
field
];
if
(
item
.
field
==
'evaluationRange'
)
{
item
.
disabled
=
!!
selectDam
?.
dataStartDate
;
item
.
default
=
selectDam
?.
dataStartDate
?
[
selectDam
.
dataStartDate
,
selectDam
.
dataEndDate
]
:
null
;
}
})
}
}
/** 编辑质量评价发起资产申请按钮处理。 */
const
dialogBtnClick
=
(
btn
,
info
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
...
...
@@ -538,7 +583,17 @@ const dialogBtnClick = (btn, info) => {
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[]
})
||
[],
qualityScore
:
info
.
qualityScore
,
evaluationRangeStart
:
info
.
evaluationRange
[
0
],
evaluationRangeEnd
:
info
.
evaluationRange
[
1
],
evaluationNote
:
info
.
evaluationNote
,
evaluationFile
:
info
.
evaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
}).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
@@ -563,7 +618,17 @@ const dialogBtnClick = (btn, info) => {
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[]
})
||
[],
qualityScore
:
info
.
qualityScore
,
evaluationRangeStart
:
info
.
evaluationRange
[
0
],
evaluationRangeEnd
:
info
.
evaluationRange
[
1
],
evaluationNote
:
info
.
evaluationNote
,
evaluationFile
:
info
.
evaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
}).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
@@ -796,6 +861,27 @@ const passDialogInfo = ref({
},
});
const
dialogInputChange
=
(
val
,
item
,
info
)
=>
{
if
(
item
.
field
!=
'qualityScore'
)
{
return
;
}
passDialogInputChange
(
val
,
item
);
formItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
info
[
item
.
field
];
})
passFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
info
[
item
.
field
];
})
if
(
!
needApprove
.
value
)
{
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
.
concat
(
passFormItems
.
value
);
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
rules
=
Object
.
assign
({},
formRules
.
value
,
passFormRules
.
value
);
}
else
{
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
;
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
rules
=
formRules
.
value
;
}
}
const
passDialogInputChange
=
(
val
,
item
)
=>
{
if
(
item
.
field
==
'qualityScore'
)
{
passFormItems
.
value
[
2
].
placeholder
=
`本次评估数据资产总体质量得分为
${
val
}
分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`
;
...
...
@@ -986,7 +1072,8 @@ const passCommonDialogBtnClick = (btn, info) => {
<div
class=
"table_panel_wrap"
>
<Table
:tableInfo=
"tableInfo"
@
tableBtnClick=
"tableBtnClick"
@
tablePageChange=
"tablePageChange"
/>
</div>
<Dialog
:dialogInfo=
"dialogInfo"
@
btnClick=
"dialogBtnClick"
/>
<Dialog
:dialogInfo=
"dialogInfo"
@
btnClick=
"dialogBtnClick"
@
inputChange=
"dialogInputChange"
@
selectChange=
"handleDialogSelectChange"
/>
<Dialog
:dialogInfo=
"passDialogInfo"
@
btnClick=
"passDialogBtnClick"
@
inputChange=
passDialogInputChange
/>
<Dialog
:dialogInfo=
"rejectDialogInfo"
@
btnClick=
"rejectDialogBtnClick"
/>
<Dialog
:dialogInfo=
"passCommonDialogInfo"
@
btnClick=
"passCommonDialogBtnClick"
/>
...
...
src/views/data_asset/registerCatalogDetail.vue
View file @
812919f
...
...
@@ -255,7 +255,7 @@ const btnClick = (btn) => {
assessFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
qualityEvaluateFormItems.value[2].placeholder = '本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:';
if (evaDetailInfo.value.dataStartDate) {
qualityEvaluateFormItems.value[1].default = [evaDetailInfo.value.dataStartDate,
a
evaDetailInfo.value.dataEndDate];
qualityEvaluateFormItems.value[1].default = [evaDetailInfo.value.dataStartDate, evaDetailInfo.value.dataEndDate];
qualityEvaluateFormItems.value[1].disabled = true;
} else {
qualityEvaluateFormItems.value[1].default = null;
...
...
@@ -1031,7 +1031,7 @@ const handleClick = () => {
</el-table-column>
</el-table>
</ContentWrap>
<ContentWrap
v-if=
"
route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'
"
id=
"id-assetContent"
<ContentWrap
v-if=
"
(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)
"
id=
"id-assetContent"
title=
"附件信息"
description=
""
style=
"margin: 16px 16px 16px"
>
<div
class=
"list_panel mt4"
>
<div
class=
"list_item isFile"
v-if=
"evaDetailInfo?.qualityEvaluationFile?.length"
:style=
"{ width: '40%' }"
>
...
...
src/views/data_asset/valueEvaluate.vue
View file @
812919f
This diff is collapsed.
Click to expand it.
src/views/data_inventory/classifyGradeCatalogue.vue
View file @
812919f
...
...
@@ -6,6 +6,7 @@
import
{
Warning
}
from
"@element-plus/icons-vue"
;
import
TableTools
from
'@/components/Tools/table_tools.vue'
;
import
{
batchSaveBizRuleConfig
,
saveBizRuleConfig
,
getDbDirTreeList
,
getDbDirTablePageList
,
...
...
@@ -1148,7 +1149,7 @@ const drawerBtnClick = async (btn, info) => {
}
try
{
const
res
:
any
=
await
s
aveBizRuleConfig
(
params
);
const
res
:
any
=
await
batchS
aveBizRuleConfig
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
btn
.
loading
=
false
;
proxy
.
$ElMessage
.
success
(
'配置成功!'
);
...
...
src/views/data_inventory/components/uploadExcelFile.vue
View file @
812919f
...
...
@@ -24,9 +24,9 @@ const fileFormRef = ref();
const
fileFormItems
:
any
=
ref
([
{
label
:
'选择文件上传'
,
tip
:
'支持扩展名:xlsx、xls,文件大小不超过20MB'
,
tip
:
'支持扩展名:xlsx、xls
、csv
,文件大小不超过20MB'
,
type
:
'upload-file'
,
accept
:
'.xlsx, .xls'
,
accept
:
'.xlsx, .xls
, .csv
'
,
limit
:
1
,
limitSize
:
20
,
isExcel
:
true
,
...
...
src/views/data_inventory/tableCreateExisting.vue
View file @
812919f
...
...
@@ -282,7 +282,8 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [],
if
(
item
.
classifyDetailGuid
===
targetGuid
)
{
return
{
path
,
route
route
,
item
};
// 找到目标节点,返回路径
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
...
...
@@ -295,34 +296,11 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [],
return
null
;
// 未找到目标节点
};
// 存储分级数据
const
gradeInfo
=
ref
<
any
>
();
const
handleClassifyChange
=
(
row
,
value
)
=>
{
console
.
log
(
'row2'
,
row
,
value
)
const
pathInfo
=
findDDatabasePath
(
treeSelectOptions
.
value
,
value
)
const
handleCascaderChange
=
(
row
,
value
)
=>
{
const
pathInfo
=
findDDatabasePath
(
treeSelectOptions
.
value
,
value
?.
length
?
value
[
value
.
length
-
1
]
:
''
)
row
.
classifyDetailNameRoutes
=
pathInfo
.
path
;
row
.
classifyDetailGuidRoutes
=
pathInfo
.
route
;
// if (!row.classifyDetailGuid) {
// row.gradeGuid = null;
// row.gradeOptions = [];
// return;
// }
// if (gradeInfo.value) {
// refGradeGuid.value = findRefGradeGuid(treeSelectOptions.value, row.classifyDetailGuid);
// row.classifyDetailName = refGradeGuid.value.classifyName;
// getGradeList({ classifyGradeGuid: refGradeGuid.value.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// if (res.code === proxy.$passCode) {
// row.gradeOptions = res.data.records || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
};
const
handleNodeClick
=
(
row
,
node
,
data
)
=>
{
console
.
log
(
'row1'
,
row
,
node
,
data
)
// 在gradeInfo找到item.guid === row.gradeGuid
let
node
=
pathInfo
.
item
;
if
(
gradeInfo
.
value
)
{
const
matchedItem
=
gradeInfo
.
value
.
find
((
item
)
=>
item
.
guid
===
node
.
gradeGuid
);
if
(
matchedItem
)
{
...
...
@@ -342,8 +320,57 @@ const handleNodeClick = (row, node, data) => {
}
});
}
};
}
// 存储分级数据
const
gradeInfo
=
ref
<
any
>
();
// const handleClassifyChange = (row, value) => {
// console.log('row2', row, value)
// const pathInfo = findDDatabasePath(treeSelectOptions.value, value)
// row.classifyDetailNameRoutes = pathInfo.path;
// row.classifyDetailGuidRoutes = pathInfo.route;
// // if (!row.classifyDetailGuid) {
// // row.gradeGuid = null;
// // row.gradeOptions = [];
// // return;
// // }
// // if (gradeInfo.value) {
// // refGradeGuid.value = findRefGradeGuid(treeSelectOptions.value, row.classifyDetailGuid);
// // row.classifyDetailName = refGradeGuid.value.classifyName;
// // getGradeList({ classifyGradeGuid: refGradeGuid.value.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// // if (res.code === proxy.$passCode) {
// // row.gradeOptions = res.data.records || [];
// // } else {
// // ElMessage.error(res.msg);
// // }
// // });
// // }
// };
// const handleNodeClick = (row, node, data) => {
// console.log('row1', row, node, data)
// // 在gradeInfo找到item.guid === row.gradeGuid
// if (gradeInfo.value) {
// const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
// if (matchedItem) {
// row.gradeDetailGuid = matchedItem.guid;
// row.gradeDetailName = matchedItem.name;
// }
// } else {
// getGradeList({ classifyGradeGuid: node.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// if (res.code === proxy.$passCode) {
// gradeInfo.value = res.data.records || [];
// row.gradeOptions = res.data.records || [];
// const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
// row.gradeDetailGuid = matchedItem.guid;
// row.gradeDetailName = matchedItem.name;
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
// }
const
isPrevious
=
ref
(
false
);
/** 上一步 */
...
...
@@ -983,7 +1010,7 @@ onActivated(() => {
</el-table-column>
<!-- 数据库表列 -->
<el-table-column
prop=
"tableChName"
label=
"数据库表"
width=
"2
8
0"
>
<el-table-column
prop=
"tableChName"
label=
"数据库表"
width=
"2
0
0"
>
<
template
#
header
>
<span>
主题表名称
</span>
<span
style=
"color:red;margin-left: 2px;"
>
*
</span>
...
...
@@ -1165,15 +1192,25 @@ onActivated(() => {
<!-- 分类(不可编辑)classifyName -->
<el-table-column
prop=
"classifyDetailNameRoutes"
label=
"分类"
width=
"
15
0"
show-overflow-tooltip
>
<el-table-column
prop=
"classifyDetailNameRoutes"
label=
"分类"
width=
"
20
0"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
<!-- 如果当前行是编辑状态,显示 tree-select -->
<div
v-if=
"scope.row.isEdit"
>
<el-tree-select
v-model=
"scope.row.classifyDetailGuid"
:data=
"treeSelectOptions"
<el-cascader
ref=
"cascaderRef"
v-model=
"scope.row.classifyDetailGuid"
:options=
"treeSelectOptions"
:props=
"
{
checkStrictly: false,
expandTrigger: 'hover',
label: 'classifyName',
value: 'classifyDetailGuid',
}"
:show-all-levels="true" :disabled="false"
:clearable="true"
@change="val => handleCascaderChange(scope.row, val)" />
<!--
<el-tree-select
v-model=
"scope.row.classifyDetailGuid"
:data=
"treeSelectOptions"
:props=
"treeSelectProps"
placeholder=
"请选择分类"
clearable
filterable
@
change=
"(value) => handleClassifyChange(scope.row, value)"
@
node-click=
"(node, data) => handleNodeClick(scope.row, node, data)"
>
</el-tree-select>
</el-tree-select>
-->
</div>
<!-- 否则直接显示分类名称 -->
<div
v-else
>
...
...
@@ -1360,15 +1397,25 @@ onActivated(() => {
<!-- 分类(不可编辑)classifyName -->
<el-table-column
prop=
"classifyDetailNameRoutes"
label=
"分类"
width=
"
15
0"
show-overflow-tooltip
>
<el-table-column
prop=
"classifyDetailNameRoutes"
label=
"分类"
width=
"
20
0"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
<!-- 如果当前行是编辑状态,显示 tree-select -->
<div
v-if=
"scope.row.isEdit"
>
<el-tree-select
v-model=
"scope.row.classifyDetailGuid"
:data=
"treeSelectOptions"
<el-cascader
ref=
"cascaderRef"
v-model=
"scope.row.classifyDetailGuid"
:options=
"treeSelectOptions"
:props=
"
{
checkStrictly: false,
expandTrigger: 'hover',
label: 'classifyName',
value: 'classifyDetailGuid',
}"
:show-all-levels="true" :disabled="false"
:clearable="true"
@change="val => handleCascaderChange(scope.row, val)" />
<!--
<el-tree-select
v-model=
"scope.row.classifyDetailGuid"
:data=
"treeSelectOptions"
:props=
"treeSelectProps"
placeholder=
"请选择分类"
clearable
filterable
@
change=
"(value) => handleClassifyChange(scope.row, value)"
@
node-click=
"(node, data) => handleNodeClick(scope.row, node, data)"
>
</el-tree-select>
</el-tree-select>
-->
</div>
<!-- 否则直接显示分类名称 -->
<div
v-else
>
...
...
src/views/data_inventory/tableCreateFile.vue
View file @
812919f
...
...
@@ -219,27 +219,27 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [],
};
const
gradeInfo
=
ref
<
any
>
();
const
handleClassifyChange
=
(
row
,
value
)
=>
{
const
pathInfo
=
findDDatabasePath
(
treeSelectOptions
.
value
,
value
)
row
.
classifyDetailNameRoutes
=
pathInfo
.
path
;
row
.
classifyDetailGuidRoutes
=
pathInfo
.
route
;
// 查找选中的节点
// const selectedNode = getTreeNode(treeSelectOptions.value, value);
// if (selectedNode) {
// getGradeList({ classifyGradeGuid: selectedNode.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// if (res.code === proxy.$passCode) {
// gradeInfo.value = res.data.records || [];
// row.gradeOptions = res.data.records || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
// row.classifyDetailName = selectedNode.classifyName;
// } else {
// console.error("未找到对应的节点");
// row.classifyDetailName = ""; // 重置分类名
// }
};
//
const handleClassifyChange = (row, value) => {
//
const pathInfo = findDDatabasePath(treeSelectOptions.value, value)
//
row.classifyDetailNameRoutes = pathInfo.path;
//
row.classifyDetailGuidRoutes = pathInfo.route;
//
// 查找选中的节点
//
// const selectedNode = getTreeNode(treeSelectOptions.value, value);
//
// if (selectedNode) {
//
// getGradeList({ classifyGradeGuid: selectedNode.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
//
// if (res.code === proxy.$passCode) {
//
// gradeInfo.value = res.data.records || [];
//
// row.gradeOptions = res.data.records || [];
//
// } else {
//
// ElMessage.error(res.msg);
//
// }
//
// });
//
// row.classifyDetailName = selectedNode.classifyName;
//
// } else {
//
// console.error("未找到对应的节点");
//
// row.classifyDetailName = ""; // 重置分类名
//
// }
//
};
const
gradeOptions
=
ref
<
any
>
()
// 获取分级
...
...
@@ -253,17 +253,43 @@ const getGrade = async () => {
}
}
const
handleNodeClick
=
(
row
,
node
,
data
)
=>
{
setTimeout
(()
=>
{
// 在gradeInfo找到item.guid === row.gradeGuid
// const handleNodeClick = (row, node, data) => {
// setTimeout(() => {
// // 在gradeInfo找到item.guid === row.gradeGuid
// const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
// if (matchedItem) {
// row.gradeDetailGuid = matchedItem.guid;
// row.gradeDetailName = matchedItem.name;
// }
// }, 300);
// }
const
handleCascaderChange
=
(
row
,
value
)
=>
{
const
pathInfo
=
findDDatabasePath
(
treeSelectOptions
.
value
,
value
?.
length
?
value
[
value
.
length
-
1
]
:
''
)
row
.
classifyDetailNameRoutes
=
pathInfo
.
path
;
row
.
classifyDetailGuidRoutes
=
pathInfo
.
route
;
let
node
=
pathInfo
.
item
;
if
(
gradeInfo
.
value
)
{
const
matchedItem
=
gradeInfo
.
value
.
find
((
item
)
=>
item
.
guid
===
node
.
gradeGuid
);
if
(
matchedItem
)
{
row
.
gradeDetailGuid
=
matchedItem
.
guid
;
row
.
gradeDetailName
=
matchedItem
.
name
;
}
},
300
);
}
}
else
{
getGradeList
({
classifyGradeGuid
:
node
.
refGradeGuid
,
pageIndex
:
1
,
pageSize
:
-
1
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
proxy
.
$passCode
)
{
gradeInfo
.
value
=
res
.
data
.
records
||
[];
row
.
gradeOptions
=
res
.
data
.
records
||
[];
const
matchedItem
=
gradeInfo
.
value
.
find
((
item
)
=>
item
.
guid
===
node
.
gradeGuid
);
row
.
gradeDetailGuid
=
matchedItem
.
guid
;
row
.
gradeDetailName
=
matchedItem
.
name
;
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
});
}
};
const
getTreeNode
=
(
tree
,
value
)
=>
{
for
(
const
node
of
tree
)
{
...
...
@@ -2054,15 +2080,25 @@ const tableSelectFields = computed(() => {
<
div
v
-
else
>
{{
scope
.
row
.
classifyDetailName
||
'--'
}}
<
/div
>
<
/template
>
<
/el-table-column> --
>
<
el
-
table
-
column
prop
=
"classifyDetailNameRoutes"
label
=
"分类"
width
=
"
15
0"
show
-
overflow
-
tooltip
>
<
el
-
table
-
column
prop
=
"classifyDetailNameRoutes"
label
=
"分类"
width
=
"
20
0"
show
-
overflow
-
tooltip
>
<
template
#
default
=
"scope"
>
<!--
如果当前行是编辑状态,显示
tree
-
select
-->
<
div
v
-
if
=
"scope.row.isEdit"
>
<
el
-
tree
-
select
v
-
if
=
"scope.row['isEdit']"
v
-
model
=
"scope.row['classifyDetailGuid']"
<
el
-
cascader
ref
=
"cascaderRef"
v
-
model
=
"scope.row.classifyDetailGuid"
:
options
=
"treeSelectOptions"
:
props
=
"
{
checkStrictly
:
false
,
expandTrigger
:
'hover'
,
label
:
'classifyName'
,
value
:
'classifyDetailGuid'
,
}
"
:show-all-levels="
true
" :disabled="
false
"
:clearable="
true
"
@change="
val
=>
handleCascaderChange
(
scope
.
row
,
val
)
" />
<!-- <el-tree-select v-if="
scope
.
row
[
'isEdit'
]
" v-model="
scope
.
row
[
'classifyDetailGuid'
]
"
:data="
treeSelectOptions
" :props="
treeSelectProps
" placeholder="
请选择分类
" clearable filterable
@change="
(
value
)
=>
handleClassifyChange
(
scope
.
row
,
value
)
"
@node-click="
(
node
,
data
)
=>
handleNodeClick
(
scope
.
row
,
node
,
data
)
"
>
<
/el-tree-select
>
<
/el-tree-select>
--
>
<
/div
>
<!--
否则直接显示分类名称
-->
<
div
v
-
else
>
...
...
src/views/importFile.vue
View file @
812919f
...
...
@@ -582,8 +582,8 @@ const setUploadInfo = () => {
auto
:
false
,
cover
:
true
,
fileList
:
[],
accept
:
'.xlsx, .xls'
,
tips
:
'当前支持xls、xlsx文件,默认使用第一个sheet'
accept
:
'.xlsx, .xls
, .csv
'
,
tips
:
'当前支持xls、xlsx
、csv
文件,默认使用第一个sheet'
}
}
]
...
...
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