Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
488b6595
Commit
488b6595
authored
Dec 04, 2024
by
chenjiahao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ab6966ca
c4931b53
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2442 additions
and
93 deletions
+2442
-93
index.ts
src/router/routes/index.ts
+25
-1
addDataConversionRuleModal.vue
...on/dataLoading/fileLoading/addDataConversionRuleModal.vue
+102
-0
dataFilterRuleModal.vue
...tegration/dataLoading/fileLoading/dataFilterRuleModal.vue
+59
-0
file.data.ts
...iews/dataIntegration/dataLoading/fileLoading/file.data.ts
+19
-13
fileData.ts
...views/dataIntegration/dataLoading/fileLoading/fileData.ts
+69
-50
index.vue
src/views/dataIntegration/dataLoading/fileLoading/index.vue
+35
-9
data.ts
...ws/mallResourceDevelopment/dataSet/dataSetByApply/data.ts
+76
-0
datasetByApplyData.ts
...eDevelopment/dataSet/dataSetByApply/datasetByApplyData.ts
+46
-0
index.vue
.../mallResourceDevelopment/dataSet/dataSetByApply/index.vue
+188
-7
index.vue
src/views/mallResourceDevelopment/file/commonFile/index.vue
+1
-1
mock.ts
src/views/mallResourceDevelopment/file/commonFile/mock.ts
+5
-5
data.ts
src/views/mallResourceDevelopment/file/fileByApply/data.ts
+568
-0
downloadModal.vue
...allResourceDevelopment/file/fileByApply/downloadModal.vue
+68
-0
fileByApplyData.ts
...llResourceDevelopment/file/fileByApply/fileByApplyData.ts
+548
-0
fileByApplyDetail.vue
...esourceDevelopment/file/fileByApply/fileByApplyDetail.vue
+445
-0
index.vue
src/views/mallResourceDevelopment/file/fileByApply/index.vue
+188
-7
No files found.
src/router/routes/index.ts
View file @
488b6595
...
...
@@ -231,7 +231,30 @@ export const DatasetByCreateDetailRoute: AppRouteRecordRaw = {
component
:
()
=>
import
(
'@/views/mallResourceDevelopment/dataSet/datasetByCreate/datasetByCreateDetail.vue'
),
meta
:
{
title
:
'数据集详情'
,
title
:
'我创建的数据集详情'
,
icon
:
''
,
},
},
],
};
/**商城资源开发-文件*/
export
const
MallSourceFileRoute
:
AppRouteRecordRaw
=
{
path
:
'/file'
,
name
:
'/file'
,
component
:
LAYOUT
,
meta
:
{
title
:
'文件'
,
icon
:
''
,
hidden
:
true
,
currentActiveMenu
:
'/file'
,
},
children
:
[
{
path
:
'fileByApply/fileByApplyDetail'
,
name
:
'fileByApplyDetail'
,
component
:
()
=>
import
(
'@/views/mallResourceDevelopment/file/fileByApply/fileByApplyDetail.vue'
),
meta
:
{
title
:
'我申请的文件详情'
,
icon
:
''
,
},
},
...
...
@@ -1093,6 +1116,7 @@ export const basicRoutes = [
dataBaseToDataBaseRoute
,
RootRoute
,
sqlExecuteRoute
,
MallSourceFileRoute
,
shellExecuteRoute
,
DatasetByCreateDetailRoute
,
SyncMaintenanceRoute
,
...
...
src/views/dataIntegration/dataLoading/fileLoading/addDataConversionRuleModal.vue
0 → 100644
View file @
488b6595
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
@
ok=
"handleSubmit"
>
<template
#
title
>
<span
style=
"font-size: 23px; font-weight: lighter"
>
新建规则
</span>
</
template
>
<Span
style=
"font-size: 18px"
>
<Icon
style=
"margin-right: 5px; font-size: 18px"
:color=
"'#5cb3ff'"
icon=
"material-symbols:table-convert-outline"
/>
数据转换规则
</Span>
<List>
<Row
:gutter=
"16"
>
<
template
v-for=
"item in cardRuleList"
:key=
"item.title"
>
<Col
:span=
"12"
>
<ListItem>
<Card
:hoverable=
"true"
class=
"sceneSelectionCard"
@
click=
"handleNewModal(item.type)"
>
<div
class=
"sceneSelectionTitle"
>
{{
item
.
title
}}
</div>
<div
class=
"sceneSelectionDescription"
>
{{
item
.
description
}}
</div>
</Card>
</ListItem>
</Col>
</
template
>
</Row>
</List>
</BasicModal>
<NewFieldRuleModal
@
register=
"registerNewFieldRuleModal"
/>
<DataTransformationRuleModal
@
register=
"registerDataTransformationRuleModal"
/>
<DataFilterRuleModal
@
register=
"dataFilterRuleModal"
/>
</template>
<
script
lang=
"ts"
setup
>
import
{
onMounted
}
from
'vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
BasicModal
,
useModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
Card
,
Row
,
Col
,
List
,
ListItem
}
from
'ant-design-vue'
;
import
{
cardRuleList
}
from
'./fileData'
;
import
NewFieldRuleModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/newFieldRuleModal.vue'
;
import
DataTransformationRuleModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/dataTransformationRuleModal.vue'
;
import
SingleTableFieldMappingRuleModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/singleTableFieldMappingRuleModal.vue'
;
import
DataFilterRuleModal
from
'./dataFilterRuleModal.vue'
;
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
()
=>
{});
const
[
registerNewFieldRuleModal
,
{
openModal
:
openNewFieldRuleModal
}]
=
useModal
();
const
[
registerDataTransformationRuleModal
,
{
openModal
:
openDataTransformationRuleModal
}]
=
useModal
();
const
[
dataFilterRuleModal
,
{
openModal
:
openDataFilterRuleModal
}]
=
useModal
();
function
handleNewModal
(
type
)
{
console
.
log
(
type
);
switch
(
type
)
{
case
'newFieldRule'
:
openNewFieldRuleModal
(
true
);
break
;
case
'dataTransformationRule'
:
openDataTransformationRuleModal
(
true
);
break
;
case
'dataFilterRule'
:
openDataFilterRuleModal
(
true
);
break
;
default
:
console
.
log
(
'Unknown rule type'
);
}
}
function
handleSubmit
()
{
closeModal
();
}
onMounted
(()
=>
{
setModalProps
({
canFullscreen
:
false
,
okText
:
'下一步'
});
});
</
script
>
<
style
lang=
"scss"
scoped
>
.sceneSelectionCard
{
height
:
120px
;
flex-direction
:
column
;
}
.sceneSelectionIcon
{
font-size
:
40px
!
important
;
margin-bottom
:
16px
;
}
.sceneSelectionTitle
{
font-size
:
18px
;
font-weight
:
bold
;
margin-bottom
:
8px
;
}
.sceneSelectionDescription
{
font-size
:
14px
;
color
:
#78787c
;
text-align
:
left
;
line-height
:
1
.2
;
}
</
style
>
src/views/dataIntegration/dataLoading/fileLoading/dataFilterRuleModal.vue
0 → 100644
View file @
488b6595
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleCancel"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
dataFilterRuleModalFormSchema
}
from
'@/views/dataIntegration/dataLoading/fileLoading/file.data'
;
const
isUpdate
=
ref
(
false
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
const
getTitle
=
'数据过滤规则'
;
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
getFieldsValue
,
setFieldsValue
,
updateSchema
,
resetFields
,
validate
,
clearValidate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
dataFilterRuleModalFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
await
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
// 塞值
await
setFieldsValue
({
...
data
.
record
,
});
}
});
/**确定按钮*/
async
function
handleSubmit
()
{
await
validate
();
closeModal
();
}
function
handleCancel
()
{
clearValidate
();
}
</
script
>
src/views/dataIntegration/dataLoading/fileLoading/file.data.ts
View file @
488b6595
import
{
FormSchema
}
from
"@/components/Form"
;
import
{
BasicColumn
}
from
"@/components/Table"
;
import
{
InputProps
}
from
"ant-design-vue"
;
export
const
fileUploadSchema
:
FormSchema
[]
=
[
{
...
...
@@ -51,19 +52,7 @@ export const fileUploadSchema: FormSchema[] = [
return
model
.
type
===
'文件系统'
;
},
defaultValue
:
'全量文件加载'
,
component
:
'RadioGroup'
,
componentProps
:
{
options
:
[
{
label
:
'全量文件加载'
,
value
:
'全量文件加载'
,
},
{
label
:
'增量文件加载'
,
value
:
'增量文件加载'
,
},
],
},
slot
:
'loadingType'
,
},
{
label
:
'数据源'
,
...
...
@@ -475,3 +464,20 @@ export const showTableColumn: BasicColumn[] = [
slots
:
{
customRender
:
'targetColumnName'
},
},
];
export
const
dataFilterRuleModalFormSchema
:
FormSchema
[]
=
[
{
label
:
'规则名称'
,
field
:
'name'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'自定义规则'
,
field
:
'rule'
,
component
:
'InputTextArea'
,
componentProps
:
{
placeholder
:
'请输入自定义过滤规则'
,
rows
:
4
,
}
as
InputProps
,
},
];
src/views/dataIntegration/dataLoading/fileLoading/fileData.ts
View file @
488b6595
export
const
fileData
=
[
{
c1
:
'100'
,
c2
:
'1132'
,
c3
:
''
,
c4
:
''
,
c5
:
'1.1'
,
c6
:
''
,
c7
:
''
,
c8
:
''
,
c9
:
''
,
c10
:
''
,
},
{
c1
:
'101'
,
c2
:
'1200'
,
c3
:
''
,
c4
:
''
,
c5
:
'1.1'
,
c6
:
''
,
c7
:
''
,
c8
:
''
,
c9
:
''
,
c10
:
''
,
},
{
c1
:
'102'
,
c2
:
'1200'
,
c3
:
''
,
c4
:
''
,
c5
:
'1.1'
,
c6
:
''
,
c7
:
''
,
c8
:
''
,
c9
:
''
,
c10
:
''
,
},
{
c1
:
'103'
,
c2
:
'1200'
,
c3
:
''
,
c4
:
''
,
c5
:
'1.1'
,
c6
:
''
,
c7
:
''
,
c8
:
''
,
c9
:
''
,
c10
:
''
,
},
];
import
Mock
,
{
Random
}
from
'mockjs'
;
// 自定义函数:生成在指定日期范围内的随机日期
function
getRandomDate
(
start
,
end
)
{
const
startTime
=
new
Date
(
start
).
getTime
();
const
endTime
=
new
Date
(
end
).
getTime
();
const
randomTime
=
new
Date
(
startTime
+
Math
.
random
()
*
(
endTime
-
startTime
));
return
randomTime
.
toISOString
().
slice
(
0
,
19
).
replace
(
'T'
,
' '
);
// 格式化为 "yyyy-MM-dd HH:mm:ss"
}
const
startDate
=
'2023-01-01 00:00:00'
;
// 起始日期
const
endDate
=
'2024-12-31 23:59:59'
;
// 结束日期
export
const
fileData
=
(
num
)
=>
{
return
Mock
.
mock
({
[
`list|
${
num
}
`
]:
[
// 根据 num 动态生成用户数量
{
'c1|+1'
:
1
,
'c2|18-60'
:
1
,
c3
:
'@cname'
,
c4
:
'@pick(["男", "女"])'
,
'c5|170-190'
:
1
,
c6
:
function
()
{
return
getRandomDate
(
startDate
,
endDate
);
},
c7
:
function
()
{
return
getRandomDate
(
startDate
,
endDate
);
},
c8
:
'@cname'
,
c9
:
'@cname'
,
c10
:
'@sentence(5, 10)'
,
},
],
}).
list
;
};
export
const
dataSourceData
=
[
{
businessId
:
1
,
...
...
@@ -77,3 +62,37 @@ export const dataSourceFieldData = [
fieldRemark
:
null
,
},
];
export
const
cardRuleList
=
[
{
title
:
'【全局】新增字段规则'
,
type
:
'newFieldRule'
,
description
:
'为源端所有数据表都新增一个字段,例如为每张表增加一个入库时间列'
,
},
{
title
:
'数据转换规则'
,
type
:
'dataTransformationRule'
,
description
:
'根据业务需求,对源端单张数据表的单个字段进行数据转换操作'
,
},
{
title
:
'数据过滤规则'
,
type
:
'dataFilterRule'
,
description
:
'根据业务需求,对源端单张数据表的数据进行过滤操作'
,
},
];
export
const
mappingRuleConfigurationTableList
=
[
{
businessId
:
1
,
ruleName
:
'[全局] 新增字段规则'
,
ruleContent
:
'新增字段名称:a, 字段类型:string, 字段表达式:asd'
,
},
{
businessId
:
2
,
ruleName
:
'数据转换规则'
,
ruleContent
:
'数据表: table1, 已有字段: field1, 转换规则: 配置规则'
,
},
{
businessId
:
3
,
ruleName
:
'数据过滤规则'
,
ruleContent
:
"自定义规则:field1 != 'axxc'"
,
},
];
src/views/dataIntegration/dataLoading/fileLoading/index.vue
View file @
488b6595
...
...
@@ -3,7 +3,7 @@
<template
#
footer
>
<Tabs
v-model:activeKey=
"activeKey"
>
<TabPane
key=
"1"
tab=
"源端配置"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex
; padding-top: 20px; gap: 20px
"
>
<BasicForm
class=
"w-1/3"
@
register=
"fileForm"
>
<template
#
file=
"
{ field, model }">
<Upload
...
...
@@ -20,6 +20,15 @@
</Upload>
<span
style=
"color: #dbdcdd; font-size: 12px"
>
仅支持上传单个文件或zip包
</span>
</
template
>
<
template
#
loadingType=
"{ field, model }"
>
<RadioGroup
v-model:value=
"model[field]"
:options=
"loadingTypeOptions"
/>
<Alert
v-if=
"model[field] === '增量文件加载'"
show-icon
message=
"仅支持HDFS类型的文件系统"
style=
"margin-top: 15px"
/>
</
template
>
<
template
#
path=
"{ field, model }"
>
<div
style=
"display: flex"
>
<Input
v-model:value=
"model[field]"
/>
...
...
@@ -59,8 +68,12 @@
</BasicForm>
<div
class=
"w-2/3"
>
<Alert
show-icon
message=
"由于数据量太大,只展示前10行数据"
/>
<Alert
show-icon
message=
"当前服务将会表头中把除了下划线以外其他特殊字符转为下划线"
/>
<BasicTable
v-if=
"showFileTable"
@
register=
"fileTable"
>
<Alert
style=
"margin-top: 10px"
show-icon
message=
"当前服务将会表头中把除了下划线以外其他特殊字符转为下划线"
/>
<BasicTable
style=
"margin-top: 15px"
v-if=
"showFileTable"
@
register=
"fileTable"
>
<
template
#
toolbar
>
<div
style=
"flex: 1; display: flex; justify-content: space-between"
>
<Input
style=
"width: 200px"
v-model:value=
"key"
placeholder=
"关键字搜索"
/>
...
...
@@ -400,7 +413,8 @@
import
{
compareColumns
,
compareSearchFormSchema
,
getMetadataColumns
,
mappingRuleConfigurationColumns
,
getMetadataColumns
,
mappingRuleConfigurationColumns
,
tabularPresentationColumns
,
tabularPresentationSearchFormSchema
,
}
from
'@/views/dataIntegration/dataLoading/dataEntryLake/offlineLoading.data'
;
...
...
@@ -412,18 +426,19 @@
dataSourceData
,
dataSourceFieldData
,
fileData
,
mappingRuleConfigurationTableList
,
}
from
'@/views/dataIntegration/dataLoading/fileLoading/fileData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
type
{
UploadChangeParam
}
from
'ant-design-vue'
;
import
{
compareTableList
,
mappingRuleConfigurationTableList
,
compareTableList
,
tabularPresentationTableList
,
}
from
'@/views/dataIntegration/dataLoading/dataEntryLake/mock'
;
import
ViewLogModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/ViewLogModal.vue'
;
import
PartitionedDataProcessingModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/PartitionedDataProcessingModal.vue'
;
import
ClearConfigurationModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/ClearConfigurationModal.vue'
;
import
BatchScaleNameMappingModal
from
'@/views/dataIntegration/dataLoading/dataEntryLake/BatchScaleNameMappingModal.vue'
;
import
AddDataConversionRuleModal
from
'@/views/dataIntegration/dataLoading/
dataEntryLake
/addDataConversionRuleModal.vue'
;
import
AddDataConversionRuleModal
from
'@/views/dataIntegration/dataLoading/
fileLoading
/addDataConversionRuleModal.vue'
;
const
key
=
ref
(
''
);
const
activeKey
=
ref
(
'1'
);
...
...
@@ -444,6 +459,16 @@
model
.
fileName
=
fileList
.
value
[
0
].
name
;
model
.
sheetName
=
'Sheet1,Sheet2,Sheet3'
;
};
const
loadingTypeOptions
=
[
{
label
:
'全量文件加载'
,
value
:
'全量文件加载'
,
},
{
label
:
'增量文件加载'
,
value
:
'增量文件加载'
,
},
];
const
[
fileForm
,
{
validate
:
fileValidate
,
getFieldsValue
:
getFileFormValue
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
...
...
@@ -461,6 +486,7 @@
content
:
'确认覆盖之前的解析结果吗?'
,
onOk
()
{
createMessage
.
success
(
'覆盖成功!'
);
fileReload
();
},
});
}
...
...
@@ -668,16 +694,16 @@
},
];
const
showFileTable
=
ref
(
false
);
const
[
fileTable
]
=
useTable
({
const
[
fileTable
,
{
reload
:
fileReload
}
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'5'
,
pages
:
'1'
,
total
:
fileData
.
length
,
total
:
fileData
(
10
)
.
length
,
code
:
''
,
message
:
''
,
data
:
fileData
,
data
:
fileData
(
10
)
,
};
return
{
...
response
};
},
...
...
src/views/mallResourceDevelopment/dataSet/dataSetByApply/data.ts
0 → 100644
View file @
488b6595
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
export
const
applyColumns
:
BasicColumn
[]
=
[
{
title
:
'资源名称'
,
dataIndex
:
'name'
,
width
:
120
,
},
{
title
:
'编目'
,
dataIndex
:
'cataloging'
,
width
:
120
,
},
{
title
:
'权属机构'
,
dataIndex
:
'workGroup'
,
width
:
120
,
},
{
title
:
'发布者'
,
dataIndex
:
'publisher'
,
width
:
120
,
},
{
title
:
'发布时间'
,
dataIndex
:
'publishTime'
,
width
:
120
,
},
{
title
:
'我的权限'
,
dataIndex
:
'permission'
,
width
:
120
,
},
];
export
const
applyFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
label
:
' '
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'搜索资源名称'
,
},
colProps
:
{
span
:
4
},
},
{
field
:
'workGroup'
,
label
:
' '
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'权属机构'
,
options
:
[
{
label
:
'测试功能部'
,
value
:
'11'
},
{
label
:
'开发部'
,
value
:
'12'
},
{
label
:
'市场部'
,
value
:
'13'
},
{
label
:
'财务部'
,
value
:
'14'
},
],
},
colProps
:
{
span
:
4
},
},
{
field
:
'permission'
,
label
:
''
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'我的权限'
,
options
:
[
{
label
:
'全部'
,
value
:
'1'
},
{
label
:
'创建'
,
value
:
'2'
},
{
label
:
'编辑'
,
value
:
'3'
},
{
label
:
'删除'
,
value
:
'4'
},
{
label
:
'查看'
,
value
:
'5'
},
],
},
colProps
:
{
span
:
4
},
},
];
src/views/mallResourceDevelopment/dataSet/dataSetByApply/datasetByApplyData.ts
0 → 100644
View file @
488b6595
export
const
applySuccessData
:
any
[]
=
[
{
name
:
'年度财务报告'
,
cataloging
:
'财务部/2024/12'
,
workGroup
:
'财务管理部'
,
publisher
:
'张伟'
,
publishTime
:
'2024-12-01'
,
permission
:
'可编辑'
,
},
{
name
:
'市场分析报告'
,
cataloging
:
'市场部/2024/11'
,
workGroup
:
'市场营销部'
,
publisher
:
'李娜'
,
publishTime
:
'2024-11-30'
,
permission
:
'只读'
,
},
{
name
:
'人力资源规划'
,
cataloging
:
'人事部/2024/10'
,
workGroup
:
'人力资源部'
,
publisher
:
'王芳'
,
publishTime
:
'2024-10-15'
,
permission
:
'可编辑'
,
},
];
export
const
applyData
:
any
[]
=
[
{
name
:
'产品开发进度'
,
cataloging
:
'研发部/2024/09'
,
workGroup
:
'产品研发部'
,
publisher
:
'赵强'
,
publishTime
:
'2024-09-28'
,
permission
:
'只读'
,
},
];
export
const
applyFailedData
:
any
[]
=
[
{
name
:
'IT系统维护日志'
,
cataloging
:
'技术部/2024/08'
,
workGroup
:
'信息技术部'
,
publisher
:
'孙丽'
,
publishTime
:
'2024-08-20'
,
permission
:
'可编辑'
,
},
];
src/views/mallResourceDevelopment/dataSet/dataSetByApply/index.vue
View file @
488b6595
<
template
>
<div>
11111
</div>
<PageWrapper
class=
"content-padding"
contentBackground
>
<template
#
headerContent
>
<div
class=
"modal_top"
>
<div>
<Icon
icon=
"hugeicons:file-euro"
:size=
"50"
:color=
"'#64c6e9'"
/>
</div>
<div>
<div
class=
"title"
>
我申请的
</div>
</div>
</div>
</
template
>
<
template
#
footer
>
<a-tabs
v-model:activeKey=
"currentKey"
>
<a-tab-pane
key=
"1"
tab=
"申请成功"
/>
<a-tab-pane
key=
"2"
tab=
"申请中"
/>
<a-tab-pane
key=
"3"
tab=
"申请失败"
/>
</a-tabs>
</
template
>
<div
class=
"pt-4 m-4 desc-wrap"
>
<
template
v-if=
"currentKey == '1'"
>
<BasicTable
@
register=
"registerApplySuccessTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
<
template
v-if=
"currentKey == '2'"
>
<BasicTable
@
register=
"registerApplyTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
<
template
v-if=
"currentKey == '3'"
>
<BasicTable
@
register=
"registerApplyFailedTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
</div>
</PageWrapper>
</template>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useTabs
}
from
'@/hooks/web/useTabs'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
BasicTable
,
TableAction
,
useTable
}
from
'@/components/Table'
;
import
{
applyColumns
,
applyFormSchema
,
}
from
'@/views/mallResourceDevelopment/dataSet/dataSetByApply/data'
;
import
{
applyData
,
applyFailedData
,
applySuccessData
,
}
from
'@/views/mallResourceDevelopment/dataSet/dataSetByApply/datasetByApplyData'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'AccountDetail'
});
const
{
createMessage
}
=
useMessage
();
const
ATabs
=
Tabs
;
const
ATabPane
=
Tabs
.
TabPane
;
const
currentKey
=
ref
(
'1'
);
const
{
setTitle
}
=
useTabs
();
setTitle
(
'我申请的'
);
const
[
registerApplySuccessTable
]
=
useTable
({
dataSource
:
applySuccessData
,
columns
:
applyColumns
,
useSearchForm
:
true
,
formConfig
:
{
showActionButtonGroup
:
false
,
schemas
:
applyFormSchema
,
autoSubmitOnEnter
:
true
,
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
pagination
:
true
,
showIndexColumn
:
false
,
});
<
style
scoped
>
const
[
registerApplyTable
]
=
useTable
({
dataSource
:
applyData
,
columns
:
applyColumns
,
useSearchForm
:
true
,
formConfig
:
{
showActionButtonGroup
:
false
,
schemas
:
applyFormSchema
,
autoSubmitOnEnter
:
true
,
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
pagination
:
true
,
showIndexColumn
:
false
,
});
const
[
registerApplyFailedTable
]
=
useTable
({
dataSource
:
applyFailedData
,
columns
:
applyColumns
,
useSearchForm
:
true
,
formConfig
:
{
showActionButtonGroup
:
false
,
schemas
:
applyFormSchema
,
autoSubmitOnEnter
:
true
,
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
pagination
:
true
,
showIndexColumn
:
false
,
});
function
handleDetail
(
record
:
Recordable
)
{
router
.
push
({
path
:
'/file/fileByApply/fileByApplyDetail'
,
query
:
{
name
:
record
.
name
,
},
});
}
onMounted
(()
=>
{});
</
script
>
<
style
lang=
"scss"
scoped
>
.content-padding
{
background-color
:
white
;
}
.modal_top
{
display
:
flex
;
align-items
:
center
;
.title
{
font-size
:
25px
;
font-weight
:
500
;
margin-left
:
10px
;
margin-top
:
20px
;
}
.path
{
font-size
:
14px
;
color
:
gray
;
}
.buttonGroup
{
margin-left
:
auto
;
display
:
flex
;
gap
:
5px
;
align-items
:
center
;
}
}
.selected-row
{
background-color
:
#5cb3ff
;
/* 可以根据需要调整颜色 */
}
</
style
>
src/views/mallResourceDevelopment/file/commonFile/index.vue
View file @
488b6595
...
...
@@ -5,7 +5,7 @@
<template
#
headerContent
>
<div
class=
"headerContent"
>
<div>
<Icon
icon=
"
fluent:document-folder-16-regular
"
:size=
"40"
:color=
"'#61aaff'"
/>
<Icon
icon=
"
solar:file-bold
"
:size=
"40"
:color=
"'#61aaff'"
/>
</div>
<div>
<div
class=
"title"
>
{{
workSpaceName
}}
</div>
...
...
src/views/mallResourceDevelopment/file/commonFile/mock.ts
View file @
488b6595
...
...
@@ -279,7 +279,7 @@ export const cardList = [
title
:
'基本信息'
,
scene
:
'databaseOfflineLoading'
,
parentWorkSpaceName
:
'党建建设'
,
icon
:
'
majesticons:table
'
,
icon
:
'
tabler:file-3d
'
,
color
:
'#71c8d5'
,
dept
:
'数据资源管理部'
,
description
:
'集团党委会、党委理论学习中心的学习会的组织实操、集团党委、纪委换届选举'
,
...
...
@@ -294,7 +294,7 @@ export const cardList = [
title
:
'党员发展计划'
,
scene
:
'partyDevelopmentPlan'
,
parentWorkSpaceName
:
'党建建设'
,
icon
:
'
majesticons:table
'
,
icon
:
'
tabler:file-3d
'
,
color
:
'#71c8d5'
,
dept
:
'组织人事部'
,
description
:
'制定年度党员发展计划,开展入党积极分子培训'
,
...
...
@@ -309,7 +309,7 @@ export const cardList = [
title
:
'主题教育活动'
,
scene
:
'themeEducationActivity'
,
parentWorkSpaceName
:
'党建建设'
,
icon
:
'
majesticons:table
'
,
icon
:
'
tabler:file-3d
'
,
color
:
'#71c8d5'
,
dept
:
'宣传部'
,
description
:
'举办各类主题教育活动,增强党员意识'
,
...
...
@@ -324,7 +324,7 @@ export const cardList = [
title
:
'党建工作总结'
,
scene
:
'partyWorkSummary'
,
parentWorkSpaceName
:
'党建建设'
,
icon
:
'
majesticons:table
'
,
icon
:
'
tabler:file-3d
'
,
color
:
'#71c8d5'
,
dept
:
'办公室'
,
description
:
'撰写季度党建工作总结报告'
,
...
...
@@ -339,7 +339,7 @@ export const cardList = [
title
:
'党史知识竞赛'
,
scene
:
'partyHistoryQuiz'
,
parentWorkSpaceName
:
'党建建设'
,
icon
:
'
majesticons:table
'
,
icon
:
'
tabler:file-3d
'
,
color
:
'#71c8d5'
,
dept
:
'宣传教育中心'
,
description
:
'组织党史知识竞赛,提升党员历史素养'
,
...
...
src/views/mallResourceDevelopment/file/fileByApply/data.ts
0 → 100644
View file @
488b6595
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
DescItem
}
from
'@/components/Description'
;
export
const
applyColumns
:
BasicColumn
[]
=
[
{
title
:
'资源名称'
,
dataIndex
:
'name'
,
width
:
120
,
},
{
title
:
'编目'
,
dataIndex
:
'cataloging'
,
width
:
120
,
},
{
title
:
'权属机构'
,
dataIndex
:
'workGroup'
,
width
:
120
,
},
{
title
:
'发布者'
,
dataIndex
:
'publisher'
,
width
:
120
,
},
{
title
:
'发布时间'
,
dataIndex
:
'publishTime'
,
width
:
120
,
},
{
title
:
'我的权限'
,
dataIndex
:
'permission'
,
width
:
120
,
},
];
export
const
applyFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
label
:
' '
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'搜索资源名称'
,
},
colProps
:
{
span
:
4
},
},
{
field
:
'workGroup'
,
label
:
' '
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'权属机构'
,
options
:
[
{
label
:
'测试功能部'
,
value
:
'11'
},
{
label
:
'开发部'
,
value
:
'12'
},
{
label
:
'市场部'
,
value
:
'13'
},
{
label
:
'财务部'
,
value
:
'14'
},
],
},
colProps
:
{
span
:
4
},
},
{
field
:
'permission'
,
label
:
' '
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'我的权限'
,
options
:
[
{
label
:
'全部'
,
value
:
'1'
},
{
label
:
'创建'
,
value
:
'2'
},
{
label
:
'编辑'
,
value
:
'3'
},
{
label
:
'删除'
,
value
:
'4'
},
{
label
:
'查看'
,
value
:
'5'
},
],
},
colProps
:
{
span
:
4
},
},
];
export
const
ManagePropertySchema
:
DescItem
[]
=
[
{
field
:
'resourceCataloging'
,
label
:
'资源编目'
,
},
{
field
:
'ownerInstitution'
,
label
:
'权属机构'
,
},
{
field
:
'label'
,
label
:
'Label'
,
},
];
export
const
permissionsInfo
:
DescItem
[]
=
[
{
field
:
'permissions'
,
label
:
'权限'
,
},
];
export
const
BasicInfoSchema
:
DescItem
[]
=
[
{
field
:
'creator'
,
label
:
'创建者'
,
},
{
field
:
'createDate'
,
label
:
'创建时间'
,
},
{
field
:
'updateFrequency'
,
label
:
'更新频率'
,
},
{
field
:
'securityClassification'
,
label
:
'安全分级'
,
},
{
field
:
'sourceDataTable'
,
label
:
'源数据表'
,
},
{
field
:
'sourceTableSize'
,
label
:
'源表大小'
,
},
{
field
:
'releaseStatus'
,
label
:
'发布状态'
,
},
{
field
:
'releaser'
,
label
:
'发布者'
,
},
{
field
:
'releaseDate'
,
label
:
'发布时间'
,
},
{
field
:
'describe'
,
label
:
'描述'
,
},
];
export
const
infoDataColumns
:
BasicColumn
[]
=
[
{
title
:
'id(主键)'
,
type
:
'bigint unsigned'
,
dataIndex
:
'id'
,
width
:
120
,
},
{
title
:
'uuid(编目用UUID)'
,
type
:
'varchar(32)'
,
dataIndex
:
'uuid'
,
width
:
120
,
},
{
title
:
'assets_name(资产名称)'
,
type
:
'varchar(255)'
,
dataIndex
:
'assetsName'
,
width
:
120
,
},
{
title
:
'directory_uuid(资产编目uuid)'
,
type
:
'varchar(32)'
,
dataIndex
:
'directoryUuid'
,
width
:
120
,
},
{
title
:
'business_code(业务编码)'
,
type
:
'varchar(32)'
,
dataIndex
:
'businessCode'
,
width
:
120
,
},
{
title
:
'category'
,
type
:
'varchar(32)'
,
dataIndex
:
'category'
,
width
:
120
,
},
{
title
:
'source(资产来源,枚举值)'
,
type
:
'varchar(32)'
,
dataIndex
:
'source'
,
width
:
120
,
},
{
title
:
'assets_type(资产类型)'
,
type
:
'varchar(32)'
,
dataIndex
:
'assetsType'
,
width
:
120
,
},
{
title
:
'assets_status(资产状态)'
,
type
:
'varchar(32)'
,
dataIndex
:
'assetsStatus'
,
width
:
120
,
},
];
export
const
infoColumns
:
BasicColumn
[]
=
[
{
title
:
'表名'
,
dataIndex
:
'tableName'
,
width
:
120
,
},
{
title
:
'列名'
,
dataIndex
:
'columnsName'
,
width
:
120
,
},
{
title
:
'中文名'
,
dataIndex
:
'CNname'
,
width
:
120
,
// edit: true,
},
{
title
:
'字段描述'
,
dataIndex
:
'remark'
,
width
:
120
,
},
{
title
:
'字段类型'
,
dataIndex
:
'type'
,
width
:
120
,
},
{
title
:
'可空'
,
dataIndex
:
'isNull'
,
width
:
120
,
},
{
title
:
'问题数据固定列'
,
dataIndex
:
'isFixation'
,
width
:
120
,
},
];
export
const
SearchFormSchema
:
FormSchema
[]
=
[
{
field
:
'columnsName'
,
label
:
''
,
componentProps
:
{
placeholder
:
'搜索字段'
,
},
component
:
'Input'
,
colProps
:
{
span
:
5
},
},
];
export
const
reviewColumns
:
BasicColumn
[]
=
[
{
title
:
'操作时间'
,
dataIndex
:
'infoTime'
,
width
:
120
,
},
{
title
:
'操作类型'
,
dataIndex
:
'operationType'
,
width
:
120
,
},
{
title
:
'目标端'
,
dataIndex
:
'target'
,
width
:
120
,
},
{
title
:
'数据范围'
,
dataIndex
:
'mechanism'
,
width
:
120
,
},
{
title
:
'操作状态'
,
dataIndex
:
'status'
,
width
:
120
,
},
];
export
const
infoBasicSchema
:
FormSchema
[]
=
[
{
field
:
'operator'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'操作人'
,
},
component
:
'Input'
,
colProps
:
{
span
:
4
},
},
{
field
:
'mechanism'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'操作人所属机构'
,
options
:
[
{
label
:
'机构1'
,
value
:
'1'
},
{
label
:
'机构2'
,
value
:
'2'
},
{
label
:
'机构3'
,
value
:
'3'
},
{
label
:
'机构4'
,
value
:
'4'
},
],
},
component
:
'Input'
,
colProps
:
{
span
:
4
},
},
{
field
:
'operationType'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'操作类型'
,
options
:
[
{
label
:
'下载'
,
value
:
'1'
},
{
label
:
'推送'
,
value
:
'2'
},
{
label
:
'共享到智能平台'
,
value
:
'3'
},
{
label
:
'API调用'
,
value
:
'4'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
{
field
:
'status'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'状态'
,
options
:
[
{
label
:
'成功'
,
value
:
'1'
},
{
label
:
'失败'
,
value
:
'0'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
{
field
:
'infoTime'
,
label
:
' '
,
labelWidth
:
20
,
component
:
'RangePicker'
,
colProps
:
{
span
:
4
},
},
];
export
const
associationRulesColumns
:
BasicColumn
[]
=
[
{
title
:
'申请人'
,
dataIndex
:
'applicant'
,
width
:
120
,
},
{
title
:
'申请人所属机构'
,
dataIndex
:
'appInstitution'
,
width
:
120
,
},
{
title
:
'申请时间'
,
dataIndex
:
'applicationTime'
,
width
:
120
,
// edit: true,
},
{
title
:
'申请类型'
,
dataIndex
:
'applicationType'
,
width
:
120
,
},
{
title
:
'申请标题'
,
dataIndex
:
'titleApplication'
,
width
:
120
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
width
:
120
,
},
];
export
const
associationSearchFormSchema
:
FormSchema
[]
=
[
{
field
:
'appInstitution'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'申请人所属机构'
,
options
:
[
{
label
:
'机构1'
,
value
:
'1'
},
{
label
:
'机构2'
,
value
:
'2'
},
{
label
:
'机构3'
,
value
:
'3'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
{
field
:
'applicationType'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'申请类型'
,
options
:
[
{
label
:
'上线'
,
value
:
'1'
},
{
label
:
'下线'
,
value
:
'2'
},
{
label
:
'推送'
,
value
:
'3'
},
{
label
:
'下载'
,
value
:
'4'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
{
field
:
'status'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'状态'
,
options
:
[
{
label
:
'待审核'
,
value
:
'1'
},
{
label
:
'已通过'
,
value
:
'2'
},
{
label
:
'已驳回'
,
value
:
'3'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
];
export
const
associationRulesInfoColumns
:
BasicColumn
[]
=
[
{
title
:
'权限类型'
,
dataIndex
:
'applicationType'
,
width
:
120
,
},
{
title
:
'目标端'
,
dataIndex
:
'target'
,
width
:
120
,
},
{
title
:
'用户名'
,
dataIndex
:
'name'
,
width
:
120
,
},
{
title
:
'对应申请'
,
dataIndex
:
'titleApplication'
,
width
:
120
,
},
{
title
:
'数据范围'
,
dataIndex
:
'appInstitution'
,
width
:
120
,
},
{
title
:
'权限状态'
,
dataIndex
:
'status'
,
width
:
120
,
},
{
title
:
'无效原因'
,
dataIndex
:
'invalidReason'
,
width
:
120
,
},
];
export
const
associationSearchInfoFormSchema
:
FormSchema
[]
=
[
{
field
:
'nameAndTitle'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'搜索用户名或申请标题'
,
},
component
:
'Input'
,
colProps
:
{
span
:
4
},
},
{
field
:
'applicationType'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'权限类型'
,
options
:
[
{
label
:
'上线'
,
value
:
'1'
},
{
label
:
'下线'
,
value
:
'2'
},
{
label
:
'推送'
,
value
:
'3'
},
{
label
:
'下载'
,
value
:
'4'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
{
field
:
'status'
,
label
:
' '
,
labelWidth
:
20
,
componentProps
:
{
placeholder
:
'权限状态'
,
options
:
[
{
label
:
'待审核'
,
value
:
'1'
},
{
label
:
'已通过'
,
value
:
'2'
},
{
label
:
'已驳回'
,
value
:
'3'
},
],
},
component
:
'Select'
,
colProps
:
{
span
:
4
},
},
];
export
const
pushTypeColumns
:
BasicColumn
[]
=
[
{
title
:
'目标端'
,
dataIndex
:
'target'
,
width
:
120
,
},
{
title
:
'推送类型'
,
dataIndex
:
'pushType'
,
width
:
120
,
},
];
export
const
dataRangeSchema
:
DescItem
[]
=
[
{
field
:
'custom'
,
label
:
'自定义条件'
,
},
{
field
:
'institutions'
,
label
:
'机构'
,
},
{
field
:
'time'
,
label
:
'时间'
,
},
];
export
const
dataRangeColumns
:
BasicColumn
[]
=
[
{
title
:
'调度时间'
,
dataIndex
:
'time'
,
width
:
140
,
},
{
title
:
'执行时间'
,
dataIndex
:
'executeTime'
,
width
:
140
,
},
{
title
:
'执行时长'
,
dataIndex
:
'duration'
,
width
:
120
,
},
{
title
:
'执行模式'
,
dataIndex
:
'mode'
,
width
:
120
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
width
:
120
,
},
];
export
const
downloadColumns
:
BasicColumn
[]
=
[
{
title
:
'申请名称'
,
dataIndex
:
'name'
,
width
:
120
,
},
{
title
:
'数据范围'
,
dataIndex
:
'dataRange'
,
width
:
120
,
},
{
title
:
'申请时间'
,
dataIndex
:
'time'
,
width
:
120
,
},
];
src/views/mallResourceDevelopment/file/fileByApply/downloadModal.vue
0 → 100644
View file @
488b6595
<
template
>
<BasicModal
width=
"55%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"title"
@
ok=
"handleSubmit"
>
<BasicTable
@
register=
"registerTable"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
downloadColumns
}
from
'@/views/mallResourceDevelopment/file/fileByApply/data'
;
import
{
downloadData
}
from
'@/views/mallResourceDevelopment/file/fileByApply/fileByApplyData'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
title
=
ref
();
const
tableData
=
ref
([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerTable
,
{
reload
}]
=
useTable
({
title
:
'选择下载范围'
,
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
tableData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
tableData
.
value
;
return
{
...
response
,
data
:
data
};
},
rowSelection
:
{
type
:
'radio'
,
},
striped
:
false
,
pagination
:
false
,
columns
:
downloadColumns
,
useSearchForm
:
false
,
showTableSetting
:
false
,
bordered
:
true
,
showIndexColumn
:
false
,
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
await
reload
();
setModalProps
({
confirmLoading
:
false
});
title
.
value
=
data
.
title
;
});
async
function
handleSubmit
()
{
closeModal
();
createMessage
.
success
(
'提交成功'
);
}
onMounted
(()
=>
{
tableData
.
value
=
downloadData
;
});
</
script
>
src/views/mallResourceDevelopment/file/fileByApply/fileByApplyData.ts
0 → 100644
View file @
488b6595
export
const
applySuccessData
:
any
[]
=
[
{
name
:
'年度财务报告'
,
cataloging
:
'财务部/2024/12'
,
workGroup
:
'财务管理部'
,
publisher
:
'张伟'
,
publishTime
:
'2024-12-01'
,
permission
:
'可编辑'
,
},
{
name
:
'市场分析报告'
,
cataloging
:
'市场部/2024/11'
,
workGroup
:
'市场营销部'
,
publisher
:
'李娜'
,
publishTime
:
'2024-11-30'
,
permission
:
'只读'
,
},
{
name
:
'人力资源规划'
,
cataloging
:
'人事部/2024/10'
,
workGroup
:
'人力资源部'
,
publisher
:
'王芳'
,
publishTime
:
'2024-10-15'
,
permission
:
'可编辑'
,
},
];
export
const
applyData
:
any
[]
=
[
{
name
:
'产品开发进度'
,
cataloging
:
'研发部/2024/09'
,
workGroup
:
'产品研发部'
,
publisher
:
'赵强'
,
publishTime
:
'2024-09-28'
,
permission
:
'只读'
,
},
];
export
const
applyFailedData
:
any
[]
=
[
{
name
:
'IT系统维护日志'
,
cataloging
:
'技术部/2024/08'
,
workGroup
:
'信息技术部'
,
publisher
:
'孙丽'
,
publishTime
:
'2024-08-20'
,
permission
:
'可编辑'
,
},
];
export
const
BasicInfoData
=
{
creator
:
'admin'
,
createDate
:
'2024-11-29 13:41:11'
,
updateFrequency
:
'每月'
,
securityClassification
:
'DATASET.SHARED.SECURITY_LEVEL_通用/G4'
,
sourceDataTable
:
'kundbnew/foresight_foresight1/fs_assets'
,
sourceTableSize
:
'4 rows'
,
releaseStatus
:
'已发布'
,
releaser
:
'admin'
,
releaseDate
:
'2024-11-29 13:41:11'
,
describe
:
'公司人力资源信息表'
,
};
export
const
permissionsData
=
{
permissions
:
'上线,共享,下载'
,
};
export
const
ManagePropertyData
=
{
resourceCataloging
:
'test1'
,
ownerInstitution
:
'机构管理/系统管理'
,
label
:
'-'
,
};
export
const
fileData
:
any
[]
=
[
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
300
,
username
:
'file1'
,
nickName
:
'测试文件流1'
,
name
:
'测试文件流1'
,
fileSize
:
1024
,
holder
:
'admin'
,
createDate
:
'2024-10-24 10:04:04'
,
updateDate
:
'2024-10-24 10:04:04'
,
institutionId
:
105
,
institutionName
:
'财务部门'
,
menuList
:
[],
},
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
301
,
username
:
'file2'
,
nickName
:
'测试文件流2'
,
name
:
'测试文件流2'
,
fileSize
:
1024
,
holder
:
'admin'
,
createDate
:
'2024-10-24 10:04:04'
,
updateDate
:
'2024-10-24 10:04:04'
,
institutionId
:
105
,
institutionName
:
'财务部门'
,
menuList
:
[],
},
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
302
,
username
:
'file3'
,
nickName
:
'测试文件流3'
,
name
:
'测试文件流3'
,
fileSize
:
1024
,
holder
:
'admin'
,
createDate
:
'2024-10-24 10:04:04'
,
updateDate
:
'2024-10-24 10:04:04'
,
institutionId
:
105
,
institutionName
:
'财务部门'
,
menuList
:
[],
},
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
303
,
username
:
'file4'
,
nickName
:
'测试文件流4'
,
name
:
'测试文件流4'
,
fileSize
:
1024
,
holder
:
'admin'
,
createDate
:
'2024-10-24 10:04:04'
,
updateDate
:
'2024-10-24 10:04:04'
,
institutionId
:
105
,
institutionName
:
'财务部门'
,
menuList
:
[],
},
];
export
const
infoData
:
any
[]
=
[
{
tableName
:
'st'
,
columnsName
:
'user_id'
,
CNname
:
'用户ID'
,
type
:
'INT'
,
length
:
11
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'用户的唯一标识符'
,
primaryKey
:
'YES'
,
foreignKey
:
'NO'
,
dataType
:
'整数型'
,
safeLevel
:
'高'
,
sensitiveStatus
:
'敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'username'
,
CNname
:
'用户名'
,
type
:
'VARCHAR'
,
length
:
50
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'用户的登录名称'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'字符串型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'password'
,
CNname
:
'密码'
,
type
:
'VARCHAR'
,
length
:
100
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'用户登录密码(加密存储)'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'字符串型'
,
safeLevel
:
'极高'
,
sensitiveStatus
:
'非常敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'email'
,
CNname
:
'邮箱地址'
,
type
:
'VARCHAR'
,
length
:
100
,
precision
:
null
,
isNull
:
'YES'
,
remark
:
'用户注册邮箱地址'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'字符串型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'created_at'
,
CNname
:
'创建时间'
,
type
:
'DATETIME'
,
length
:
null
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'账户创建的时间戳'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'日期时间型'
,
safeLevel
:
'低'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'false'
,
},
{
tableName
:
'st'
,
columnsName
:
'updated_at'
,
CNname
:
'最后更新时间'
,
type
:
'DATETIME'
,
length
:
null
,
precision
:
null
,
isNull
:
'YES'
,
remark
:
'账户信息最后更新的时间戳'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'日期时间型'
,
safeLevel
:
'低'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'is_active'
,
CNname
:
'账户状态'
,
type
:
'TINYINT'
,
length
:
1
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'账户是否处于激活状态(0-未激活,1-已激活)'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'布尔型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'is_deleted'
,
CNname
:
'删除标记'
,
type
:
'TINYINT'
,
length
:
1
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'账户是否被标记为删除(0-未删除,1-已删除)'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'布尔型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
];
export
const
samplingInfoData
:
any
[]
=
[
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
{
id
:
'1'
,
uuid
:
'1'
,
assetsName
:
'TEST1'
,
directoryUuid
:
'-'
,
businessCode
:
'03000001'
,
category
:
'ASSET'
,
source
:
'CATELOG'
,
assetsType
:
'DATASET'
,
assetsStatus
:
'9'
,
},
];
export
const
associationRulesData
:
any
[]
=
[
{
applicant
:
'admin'
,
appInstitution
:
'机构1'
,
applicationTime
:
'2024-11-29 13:53:58'
,
applicationType
:
'上线'
,
titleApplication
:
'人力资源信息'
,
status
:
'审核中'
,
},
{
applicant
:
'admin'
,
appInstitution
:
'机构1'
,
applicationTime
:
'2024-11-19 13:53:58'
,
applicationType
:
'推送'
,
titleApplication
:
'人力资源信息'
,
status
:
'已驳回'
,
},
{
applicant
:
'admin'
,
appInstitution
:
'机构1'
,
applicationTime
:
'2024-11-22 13:53:58'
,
applicationType
:
'下线'
,
titleApplication
:
'人力资源信息'
,
status
:
'审核中'
,
},
{
applicant
:
'admin'
,
appInstitution
:
'机构1'
,
applicationTime
:
'2024-11-27 13:53:58'
,
applicationType
:
'下载'
,
titleApplication
:
'人力资源信息'
,
status
:
'已通过'
,
},
];
export
const
associationRulesInfoData
:
any
[]
=
[
{
name
:
'admin'
,
appInstitution
:
'机构1'
,
target
:
'https://127.0.01'
,
applicationTime
:
'2024-11-29 13:53:58'
,
applicationType
:
'上线'
,
invalidReason
:
'-'
,
titleApplication
:
'人力资源信息'
,
status
:
'审核中'
,
},
{
name
:
'admin'
,
appInstitution
:
'机构1'
,
target
:
'https://127.0.01'
,
applicationTime
:
'2024-11-19 13:53:58'
,
applicationType
:
'推送'
,
invalidReason
:
'-'
,
titleApplication
:
'人力资源信息'
,
status
:
'已驳回'
,
},
{
name
:
'admin'
,
target
:
'https://127.0.01'
,
appInstitution
:
'机构1'
,
invalidReason
:
'-'
,
applicationTime
:
'2024-11-22 13:53:58'
,
applicationType
:
'下线'
,
titleApplication
:
'人力资源信息'
,
status
:
'审核中'
,
},
{
name
:
'admin'
,
appInstitution
:
'机构1'
,
target
:
'https://127.0.01'
,
invalidReason
:
'-'
,
applicationTime
:
'2024-11-27 13:53:58'
,
applicationType
:
'下载'
,
titleApplication
:
'人力资源信息'
,
status
:
'已通过'
,
},
];
export
const
reviewData
:
any
[]
=
[
{
operator
:
'admin'
,
mechanism
:
'-'
,
infoTime
:
'2024-11-29 13:41:11'
,
operationType
:
'下载'
,
target
:
'https://127.0.0.1'
,
status
:
'成功'
,
},
{
operator
:
'admin'
,
mechanism
:
'-'
,
infoTime
:
'2024-11-29 13:41:11'
,
operationType
:
'推送'
,
target
:
'https://127.0.0.2'
,
status
:
'成功'
,
},
{
operator
:
'admin'
,
mechanism
:
'-'
,
infoTime
:
'2024-11-29 13:41:11'
,
operationType
:
'共享到智能平台'
,
target
:
'https://127.0.0.3'
,
status
:
'成功'
,
},
{
operator
:
'admin'
,
mechanism
:
'-'
,
infoTime
:
'2024-11-29 13:41:11'
,
operationType
:
'API调用'
,
target
:
'https://127.0.0.4'
,
status
:
'成功'
,
},
];
export
const
pushTypeData
:
any
[]
=
[
{
target
:
'admin-个人工作区/inceptor/db-001/table1'
,
pushType
:
'增量'
,
},
{
target
:
'admin-个人工作区/inceptor/db-001/table1'
,
pushType
:
'增量'
,
},
{
target
:
'admin-个人工作区/inceptor/db-001/table1'
,
pushType
:
'增量'
,
},
{
target
:
'admin-个人工作区/inceptor/db-001/table1'
,
pushType
:
'增量'
,
},
{
target
:
'admin-个人工作区/inceptor/db-001/table1'
,
pushType
:
'增量'
,
},
{
target
:
'admin-个人工作区/inceptor/db-001/table1'
,
pushType
:
'增量'
,
},
];
export
const
dataRangeData
=
{
custom
:
'id>200'
,
institutions
:
'本单位'
,
time
:
'2024-10-28 16:35:22-2024-10-31 12:12:12'
,
};
export
const
rangeData
:
any
[]
=
[
{
time
:
'2024-12-03 09:00'
,
executeTime
:
'2024-12-03 09:05'
,
duration
:
'158ms'
,
mode
:
'系统调度'
,
status
:
'成功'
,
},
{
time
:
'2024-12-03 09:00'
,
executeTime
:
'2024-12-03 09:05'
,
duration
:
'158ms'
,
mode
:
'系统调度'
,
status
:
'成功'
,
},
{
time
:
'2024-12-03 09:00'
,
executeTime
:
'2024-12-03 09:05'
,
duration
:
'158ms'
,
mode
:
'系统调度'
,
status
:
'成功'
,
},
{
time
:
'2024-12-03 09:00'
,
executeTime
:
'2024-12-03 09:05'
,
duration
:
'158ms'
,
mode
:
'系统调度'
,
status
:
'成功'
,
},
{
time
:
'2024-12-03 09:00'
,
executeTime
:
'2024-12-03 09:05'
,
duration
:
'158ms'
,
mode
:
'系统调度'
,
status
:
'成功'
,
},
];
export
const
downloadData
:
any
[]
=
[
{
name
:
'申请下载:2020下半年新能源汽车销售'
,
dataRange
:
'自定义条件:id>200
\
n机构:本单位
\
n时间:2022-10-28 16:35:22 - 2022-10-31 12:12:00'
,
time
:
'2022-10-31 12:12:00'
,
},
{
name
:
'申请下载:2020下半年新能源汽车销售'
,
dataRange
:
'自定义条件:id>200
\
n机构:本单位'
,
time
:
'2022-10-31 12:12:00'
,
},
{
name
:
'申请下载:2020下半年新能源汽车销售'
,
dataRange
:
'机构:本单位'
,
time
:
'2022-10-31 12:12:00'
,
},
{
name
:
'申请下载:2020下半年新能源汽车销售'
,
dataRange
:
'时间:2022-10-28 16:35:22 - 2022-10-31 12:12:00'
,
time
:
'2022-10-31 12:12:00'
,
},
];
src/views/mallResourceDevelopment/file/fileByApply/fileByApplyDetail.vue
0 → 100644
View file @
488b6595
<
template
>
<PageWrapper
contentBackground
>
<template
#
headerContent
>
<div
class=
"header_info"
>
<div
class=
"left_section"
>
<Icon
@
click=
"handleGoBack"
class=
"backBtn"
icon=
"ant-design:left-outlined"
:size=
"20"
:color=
"'#666C81'"
/>
<Icon
@
click=
"handleGoBack"
icon=
"pepicons-pop:file"
class=
"header_icon"
size=
"40px"
/>
<div>
<div>
{{
title
}}
</div>
</div>
</div>
<div
class=
"right_section"
>
<a-button
class=
"header_button"
type=
"primary"
@
click=
"handleDownload"
>
下载
</a-button>
<a-button
class=
"header_button"
type=
"primary"
@
click=
"handleUpdate"
>
推送
</a-button>
</div>
</div>
</
template
>
<Description
size=
"middle"
title=
"基本信息"
:bordered=
"false"
:column=
"3"
:data=
"BasicInfoData"
:schema=
"BasicInfoSchema"
/>
<Description
size=
"middle"
title=
"管理属性"
:bordered=
"false"
:column=
"3"
:data=
"ManagePropertyData"
:schema=
"ManagePropertySchema"
/>
<Description
size=
"middle"
title=
"权限信息"
:bordered=
"false"
:column=
"3"
:data=
"permissionsData"
:schema=
"permissionsInfo"
/>
<div
class=
"mianBodyEditContainer"
>
<Tabs
v-model:activeKey=
"page"
size=
"large"
>
<a-tab-pane
key=
"1"
tab=
"采样数据"
>
<div
v-if=
"page === '1'"
>
<BasicTable
@
register=
"registerColumnInformationDataTable"
>
<
template
#
fileName=
"{ text }"
>
<div>
{{
text
}}
<Switch
:checked=
"'1' === '1'"
/>
</div>
</
template
>
<
template
#
headerCell=
"{ column, title }"
>
<span>
{{
title
}}
</span
><br
/>
<span
style=
"font-size: 12px"
>
{{
column
.
type
}}
</span>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'id' || column.key === 'uuid'"
>
<Tag
color=
"orange"
>
{{
'敏感信息'
}}
</Tag>
</
template
>
</template>
</BasicTable>
</div>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"列信息"
>
<div
v-if=
"page === '2'"
>
<BasicTable
@
register=
"registerColumnInformationTable"
>
<
template
#
fileName=
"{ text }"
>
<div>
{{
text
}}
<Switch
:checked=
"'1' === '1'"
/>
</div>
</
template
>
</BasicTable>
</div>
</a-tab-pane>
<a-tab-pane
key=
"3"
tab=
"我的权限"
>
<div
v-if=
"page === '3'"
>
<BasicTable
@
register=
"registerAssociationRulesInfoTable"
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"handleCancelStatus"
>
批量取消权限
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
// label: '取消',
icon: 'iwwa:delete',
onClick: handleReject.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</div>
</a-tab-pane>
<a-tab-pane
key=
"4"
tab=
"我的使用记录"
>
<div
v-if=
"page === '4'"
>
<div>
<BasicTable
@
register=
"registerReviewTable"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key == 'status'"
>
<template
v-if=
"record.status === '成功'"
>
<Icon
icon=
"grommet-icons:status-good"
color=
"green"
/><span>
成功
</span>
</
template
>
<
template
v-if=
"record.status === '失败'"
>
<Icon
icon=
"carbon:error-outline"
color=
"red"
/><span>
失败
</span>
</
template
>
</template>
</template>
</BasicTable>
</div>
<span
style=
"font-size: 16px; margin-left: 35px"
>
推送记录
</span>
<div
class=
"flex"
>
<div
style=
"width: 45%"
>
<BasicTable
@
register=
"registerPushTypeTable"
/>
</div>
<div
style=
"width: 55%"
>
<Description
size=
"middle"
title=
"数据范围"
:bordered=
"false"
:column=
"1"
:data=
"dataRangeData"
:schema=
"dataRangeSchema"
/>
<BasicTable
@
register=
"registerDataRangeTable"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key == 'status'"
>
<template
v-if=
"record.status === '成功'"
>
<Icon
icon=
"grommet-icons:status-good"
color=
"green"
/><span>
成功
</span>
</
template
>
<
template
v-if=
"record.status === '失败'"
>
<Icon
icon=
"carbon:error-outline"
color=
"red"
/><span>
失败
</span>
</
template
>
</template>
</template>
</BasicTable>
</div>
</div>
</div>
</a-tab-pane>
<a-tab-pane
key=
"5"
tab=
"我的申请记录"
>
<div
v-if=
"page === '5'"
>
<BasicTable
@
register=
"registerAssociationRulesTable"
/>
</div>
</a-tab-pane>
</Tabs>
</div>
<DownloadModal
@
register=
"registerDownloadModal"
/>
</PageWrapper>
</template>
<
script
setup
lang=
"ts"
>
import
{
Tabs
,
Switch
,
Tag
}
from
'ant-design-vue'
;
import
{
associationRulesColumns
,
associationRulesInfoColumns
,
associationSearchFormSchema
,
associationSearchInfoFormSchema
,
BasicInfoSchema
,
dataRangeColumns
,
dataRangeSchema
,
infoBasicSchema
,
infoColumns
,
infoDataColumns
,
ManagePropertySchema
,
permissionsInfo
,
pushTypeColumns
,
reviewColumns
,
SearchFormSchema
,
}
from
'./data'
;
import
{
BasicInfoData
,
permissionsData
,
ManagePropertyData
,
infoData
,
samplingInfoData
,
reviewData
,
associationRulesData
,
associationRulesInfoData
,
pushTypeData
,
dataRangeData
,
rangeData
,
}
from
'./fileByApplyData'
;
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
PageWrapper
from
'@/components/Page/src/PageWrapper.vue'
;
import
Description
from
'@/components/Description/src/Description.vue'
;
import
TableAction
from
'@/components/Table/src/components/TableAction.vue'
;
import
{
router
}
from
'@/router'
;
import
{
useRoute
}
from
'vue-router'
;
import
DownloadModal
from
'./downloadModal.vue'
;
const
{
createMessage
}
=
useMessage
();
const
page
=
ref
(
'1'
);
const
tableData
=
ref
(
infoData
);
const
samplingTableData
=
ref
(
samplingInfoData
);
const
title
=
ref
(
''
);
const
route
=
useRoute
();
const
associationData
=
ref
(
associationRulesData
);
const
associationInfoData
=
ref
(
associationRulesInfoData
);
const
[
registerDownloadModal
,
{
openModal
:
openDownloadModal
}]
=
useModal
();
const
[
registerColumnInformationDataTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
samplingTableData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
samplingTableData
.
value
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
return
{
...
response
,
data
:
data
};
},
columns
:
infoDataColumns
,
pagination
:
false
,
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
handleSearchInfoFn
(
info
)
{
tableData
.
value
=
infoData
.
filter
((
item
)
=>
item
.
columnsName
.
includes
(
info
.
columnsName
));
return
info
;
},
});
const
[
registerColumnInformationTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
tableData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
return
{
...
response
,
data
:
data
};
},
columns
:
infoColumns
,
useSearchForm
:
true
,
pagination
:
false
,
formConfig
:
{
labelWidth
:
120
,
showActionButtonGroup
:
false
,
schemas
:
SearchFormSchema
,
autoSubmitOnEnter
:
true
,
},
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
handleSearchInfoFn
(
info
)
{
tableData
.
value
=
infoData
.
filter
((
item
)
=>
item
.
columnsName
.
includes
(
info
.
columnsName
));
return
info
;
},
});
const
[
registerPushTypeTable
]
=
useTable
({
dataSource
:
pushTypeData
,
columns
:
pushTypeColumns
,
pagination
:
false
,
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
});
const
[
registerDataRangeTable
]
=
useTable
({
dataSource
:
rangeData
,
columns
:
dataRangeColumns
,
pagination
:
false
,
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
});
const
[
registerReviewTable
]
=
useTable
({
title
:
'下载&API调用-拉取'
,
dataSource
:
reviewData
,
columns
:
reviewColumns
,
pagination
:
true
,
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
});
const
[
registerAssociationRulesTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
associationData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
associationData
.
value
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
return
{
...
response
,
data
:
data
};
},
// dataSource: infoData,
columns
:
associationRulesColumns
,
useSearchForm
:
true
,
pagination
:
false
,
formConfig
:
{
labelWidth
:
120
,
showActionButtonGroup
:
false
,
schemas
:
associationSearchFormSchema
,
autoSubmitOnEnter
:
true
,
},
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
handleSearchInfoFn
(
info
)
{
associationData
.
value
=
associationRulesData
.
filter
((
item
)
=>
item
.
ruleName
.
includes
(
info
.
ruleName
),
);
return
info
;
},
});
const
[
registerAssociationRulesInfoTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
associationData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
associationInfoData
.
value
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
return
{
...
response
,
data
:
data
};
},
// dataSource: infoData,
columns
:
associationRulesInfoColumns
,
useSearchForm
:
true
,
pagination
:
false
,
formConfig
:
{
labelWidth
:
120
,
showActionButtonGroup
:
false
,
schemas
:
associationSearchInfoFormSchema
,
autoSubmitOnEnter
:
true
,
},
showIndexColumn
:
false
,
rowSelection
:
true
,
scroll
:
{
y
:
400
},
actionColumn
:
{
width
:
120
,
title
:
'取消权限'
,
dataIndex
:
'action'
,
},
handleSearchInfoFn
(
info
)
{
associationData
.
value
=
associationRulesData
.
filter
((
item
)
=>
item
.
ruleName
.
includes
(
info
.
ruleName
),
);
return
info
;
},
});
function
handleGoBack
()
{
router
.
go
(
-
1
);
}
function
handleReject
()
{
console
.
log
();
}
function
handleCancelStatus
()
{
console
.
log
();
}
function
handleDownload
()
{
openDownloadModal
(
true
,
{
title
:
'下载'
,
});
}
function
handleUpdate
()
{
createMessage
.
success
(
'推送成功!'
);
}
function
handleReload
()
{
console
.
log
();
}
onMounted
(()
=>
{
title
.
value
=
route
.
query
.
name
;
});
</
script
>
<
style
scoped
lang=
"scss"
>
.editor
{
background-color
:
white
;
height
:
560px
;
border
:
1px
solid
#d9d9d9
;
padding
:
16px
;
margin-bottom
:
8px
;
}
.editor
textarea
{
width
:
100%
;
height
:
100%
;
border
:
none
;
outline
:
none
;
font-size
:
16px
;
resize
:
none
;
}
.header_info
{
display
:
flex
;
align-items
:
center
;
/* 垂直居中对齐 */
justify-content
:
space-between
;
/* 在主轴方向上分配空间,左侧和右侧的元素分开 */
}
.left_section
{
display
:
flex
;
align-items
:
center
;
/* 确保图标和文字在垂直方向居中对齐 */
}
.header_icon
{
margin-left
:
10px
;
/* 图标和文字之间的间距 */
}
.right_section
{
display
:
flex
;
gap
:
10px
;
/* 两个按钮之间的间距 */
}
.header_button
{
/* 可以设置按钮的大小或其他样式 */
}
</
style
>
src/views/mallResourceDevelopment/file/fileByApply/index.vue
View file @
488b6595
<
template
>
<div>
11111
</div>
<PageWrapper
class=
"content-padding"
contentBackground
>
<template
#
headerContent
>
<div
class=
"modal_top"
>
<div>
<Icon
icon=
"hugeicons:file-euro"
:size=
"50"
:color=
"'#64c6e9'"
/>
</div>
<div>
<div
class=
"title"
>
我申请的
</div>
</div>
</div>
</
template
>
<
template
#
footer
>
<a-tabs
v-model:activeKey=
"currentKey"
>
<a-tab-pane
key=
"1"
tab=
"申请成功"
/>
<a-tab-pane
key=
"2"
tab=
"申请中"
/>
<a-tab-pane
key=
"3"
tab=
"申请失败"
/>
</a-tabs>
</
template
>
<div
class=
"pt-4 m-4 desc-wrap"
>
<
template
v-if=
"currentKey == '1'"
>
<BasicTable
@
register=
"registerApplySuccessTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
<
template
v-if=
"currentKey == '2'"
>
<BasicTable
@
register=
"registerApplyTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
<
template
v-if=
"currentKey == '3'"
>
<BasicTable
@
register=
"registerApplyFailedTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
</div>
</PageWrapper>
</template>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useTabs
}
from
'@/hooks/web/useTabs'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
BasicTable
,
TableAction
,
useTable
}
from
'@/components/Table'
;
import
{
applyColumns
,
applyFormSchema
,
}
from
'@/views/mallResourceDevelopment/file/fileByApply/data'
;
import
{
applyData
,
applyFailedData
,
applySuccessData
,
}
from
'@/views/mallResourceDevelopment/file/fileByApply/fileByApplyData'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'AccountDetail'
});
const
{
createMessage
}
=
useMessage
();
const
ATabs
=
Tabs
;
const
ATabPane
=
Tabs
.
TabPane
;
const
currentKey
=
ref
(
'1'
);
const
{
setTitle
}
=
useTabs
();
setTitle
(
'我申请的'
);
const
[
registerApplySuccessTable
]
=
useTable
({
dataSource
:
applySuccessData
,
columns
:
applyColumns
,
useSearchForm
:
true
,
formConfig
:
{
showActionButtonGroup
:
false
,
schemas
:
applyFormSchema
,
autoSubmitOnEnter
:
true
,
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
pagination
:
true
,
showIndexColumn
:
false
,
});
<
style
scoped
>
const
[
registerApplyTable
]
=
useTable
({
dataSource
:
applyData
,
columns
:
applyColumns
,
useSearchForm
:
true
,
formConfig
:
{
showActionButtonGroup
:
false
,
schemas
:
applyFormSchema
,
autoSubmitOnEnter
:
true
,
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
pagination
:
true
,
showIndexColumn
:
false
,
});
const
[
registerApplyFailedTable
]
=
useTable
({
dataSource
:
applyFailedData
,
columns
:
applyColumns
,
useSearchForm
:
true
,
formConfig
:
{
showActionButtonGroup
:
false
,
schemas
:
applyFormSchema
,
autoSubmitOnEnter
:
true
,
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
pagination
:
true
,
showIndexColumn
:
false
,
});
function
handleDetail
(
record
:
Recordable
)
{
router
.
push
({
path
:
'/file/fileByApply/fileByApplyDetail'
,
query
:
{
name
:
record
.
name
,
},
});
}
onMounted
(()
=>
{});
</
script
>
<
style
lang=
"scss"
scoped
>
.content-padding
{
background-color
:
white
;
}
.modal_top
{
display
:
flex
;
align-items
:
center
;
.title
{
font-size
:
25px
;
font-weight
:
500
;
margin-left
:
10px
;
margin-top
:
20px
;
}
.path
{
font-size
:
14px
;
color
:
gray
;
}
.buttonGroup
{
margin-left
:
auto
;
display
:
flex
;
gap
:
5px
;
align-items
:
center
;
}
}
.selected-row
{
background-color
:
#5cb3ff
;
/* 可以根据需要调整颜色 */
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment