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
c24a029e
Commit
c24a029e
authored
Dec 17, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
政策管理
parent
23d06b0e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
595 additions
and
12 deletions
+595
-12
index.ts
src/router/routes/index.ts
+22
-0
detail.data.ts
...ws/servicePlatform/policyManagement/detail/detail.data.ts
+72
-0
detailData.ts
...ews/servicePlatform/policyManagement/detail/detailData.ts
+0
-0
index.vue
src/views/servicePlatform/policyManagement/detail/index.vue
+220
-0
index.vue
src/views/servicePlatform/policyManagement/index.vue
+75
-12
policy.data.ts
src/views/servicePlatform/policyManagement/policy.data.ts
+66
-0
policyData.ts
src/views/servicePlatform/policyManagement/policyData.ts
+140
-0
No files found.
src/router/routes/index.ts
View file @
c24a029e
...
@@ -1319,6 +1319,27 @@ export const ResourceRoute: AppRouteRecordRaw = {
...
@@ -1319,6 +1319,27 @@ export const ResourceRoute: AppRouteRecordRaw = {
},
},
],
],
};
};
/**
* 服务平台
*/
export
const
ServicePlatformRoute
:
AppRouteRecordRaw
=
{
path
:
'/servicePlatform'
,
name
:
'servicePlatform'
,
component
:
LAYOUT
,
meta
:
{
title
:
'服务平台'
,
icon
:
''
,
hidden
:
true
,
currentActiveMenu
:
'/servicePlatform'
,
},
children
:
[
{
path
:
'policyManagement/detail'
,
name
:
'policyManagementDetail'
,
component
:
()
=>
import
(
'@/views/servicePlatform/policyManagement/detail/index.vue'
),
},
],
};
// Basic routing without permission
// Basic routing without permission
// 没有权限要求的基本路由
// 没有权限要求的基本路由
export
const
basicRoutes
=
[
export
const
basicRoutes
=
[
...
@@ -1353,4 +1374,5 @@ export const basicRoutes = [
...
@@ -1353,4 +1374,5 @@ export const basicRoutes = [
processCenterRoute
,
processCenterRoute
,
BenchmarkRoute
,
BenchmarkRoute
,
PCFontRoute
,
PCFontRoute
,
ServicePlatformRoute
,
];
];
src/views/servicePlatform/policyManagement/detail/detail.data.ts
0 → 100644
View file @
c24a029e
import
{
FormSchema
}
from
'@/components/Form'
;
export
const
infoFormSchema
:
FormSchema
[]
=
[
{
label
:
'标题'
,
field
:
'title'
,
component
:
'Input'
,
required
:
true
,
colProps
:
{
span
:
12
},
componentProps
:
{
style
:
{
width
:
'90%'
,
},
},
},
{
label
:
'来源'
,
field
:
'from'
,
component
:
'Input'
,
colProps
:
{
span
:
12
},
componentProps
:
{
style
:
{
width
:
'90%'
,
},
},
},
{
label
:
'编辑人'
,
field
:
'createBy'
,
component
:
'Input'
,
colProps
:
{
span
:
12
},
componentProps
:
{
style
:
{
width
:
'90%'
,
},
},
},
{
label
:
'编辑时间'
,
field
:
'createTime'
,
component
:
'DatePicker'
,
colProps
:
{
span
:
12
},
componentProps
:
{
valueFormat
:
'YYYY-MM-DD HH:mm:ss'
,
showTime
:
'showTime'
,
style
:
{
width
:
'90%'
,
},
},
},
];
export
const
detailFormSchema
:
FormSchema
[]
=
[
{
label
:
'图片'
,
field
:
'imgSrc'
,
slot
:
'imgSrc'
,
colProps
:
{
span
:
24
},
},
{
label
:
'正文'
,
field
:
'details'
,
required
:
true
,
component
:
'InputTextArea'
,
componentProps
:
{
rows
:
4
,
style
:
{
width
:
'95%'
,
},
},
colProps
:
{
span
:
24
},
},
];
src/views/servicePlatform/policyManagement/detail/detailData.ts
0 → 100644
View file @
c24a029e
src/views/servicePlatform/policyManagement/detail/index.vue
0 → 100644
View file @
c24a029e
<
template
>
<PageWrapper
dense
contentBackground
headerSticky
>
<template
#
headerContent
>
<div
class=
"header"
>
<div
class=
"h-title"
>
<FileProtectOutlined
class=
"h-icon"
:color=
"'#6499e9'"
/>
<div
class=
"h-txt"
>
<div
v-if=
"status === 'detail'"
class=
"h-des"
>
{{
data
.
title
}}
</div>
<div
v-if=
"status === 'add'"
class=
"h-des"
>
新增政策
</div>
<div
v-if=
"status === 'edit'"
class=
"h-des"
>
编辑政策
</div>
</div>
</div>
<div
class=
"h-group"
>
<a-button
class=
"btn"
type=
"primary"
v-if=
"['add', 'edit'].includes(status)"
@
click=
"handleSave"
>
保存
</a-button>
<a-button
class=
"btn"
type=
"primary"
:disabled=
"!(['add', 'edit'].includes(status) && isSave)"
v-if=
"['add', 'edit'].includes(status)"
@
click=
"handleUpload"
>
发布
</a-button>
<a-button
class=
"btn"
type=
"primary"
v-if=
"status === 'detail'"
@
click=
"handleEdit"
>
编辑
</a-button>
</div>
</div>
<div
v-show=
"['add', 'edit'].includes(status)"
class=
"pd-body"
>
<div
class=
"title"
>
基本信息
</div>
<BasicForm
@
register=
"infoForm"
/>
<div
class=
"title"
>
正文
</div>
<BasicForm
@
register=
"detailForm"
>
<template
#
imgSrc=
"
{ field, model }">
<Upload
style=
"width: 45%"
v-model:file-list=
"fileList"
list-type=
"picture"
>
<a-button>
<UploadOutlined
/>
选择图片
</a-button>
</Upload>
</
template
>
</BasicForm>
</div>
<div
v-show=
"status === 'detail'"
class=
"pd-detail"
>
<div
class=
"pd-des"
>
<div
class=
"pd-time"
>
{{ data.uploadTime }}
</div>
<div
class=
"pd-from"
>
来源:{{ data.from }}
</div>
</div>
<Divider
style=
"width: 100%"
/>
<div
class=
"pd-txt"
>
<img
v-if=
"fileList[0] && fileList[0].thumbUrl"
:src=
"fileList[0] ? fileList[0].thumbUrl : null"
style=
"width: 80%; height: 200px;"
alt=
""
/>
<div
class=
"des-p"
>
{{ data.details }}
</div>
</div>
</div>
</template>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
ref
}
from
'vue'
;
import
PageWrapper
from
'@/components/Page/src/PageWrapper.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicTable
,
useTable
,
TableAction
,
BasicTableProps
}
from
'@/components/Table'
;
import
{
Input
,
Upload
,
Divider
}
from
'ant-design-vue'
;
import
{
FileProtectOutlined
,
UploadOutlined
}
from
'@ant-design/icons-vue'
;
import
{
policyFormSchema
,
policyTableColumn
,
}
from
'@/views/servicePlatform/policyManagement/policy.data'
;
import
{
policyData
}
from
'@/views/servicePlatform/policyManagement/policyData'
;
import
{
useRoute
,
useRouter
}
from
'vue-router'
;
import
BasicForm
from
'@/components/Form/src/BasicForm.vue'
;
import
{
useForm
}
from
'@/components/Form'
;
import
{
editFormSchema
}
from
'@/views/dataWarehousePlanning/logicalModel/modelDetail/model.data'
;
import
{
detailFormSchema
,
infoFormSchema
,
}
from
'@/views/servicePlatform/policyManagement/detail/detail.data'
;
import
moment
from
'moment'
;
// 初始化
const
route
=
useRoute
();
const
{
createMessage
}
=
useMessage
();
// 数据
const
status
=
ref
(
route
.
query
.
status
);
const
data
=
ref
(
route
.
query
);
const
isSave
=
ref
(
false
);
const
fileList
=
ref
([]);
onMounted
(()
=>
{
console
.
log
(
'date'
,
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
));
setInfoValue
({
...
data
.
value
,
createBy
:
'admin'
,
createTime
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
});
setDetailValue
({
...
data
.
value
,
});
});
/**
* 方法
*/
function
handleImg
()
{
console
.
log
(
'图片'
,
fileList
);
}
async
function
handleSave
()
{
await
infoValidate
();
await
detailValidate
();
createMessage
.
success
(
'保存成功!'
);
isSave
.
value
=
true
;
}
function
handleUpload
()
{
data
.
value
=
{
...
getInfoValue
(),
...
getDetailValue
()
};
createMessage
.
success
(
'发布成功!'
);
status
.
value
=
'detail'
;
}
function
handleEdit
()
{
status
.
value
=
'edit'
;
isSave
.
value
=
false
;
}
/**
* form
*/
const
[
infoForm
,
{
setFieldsValue
:
setInfoValue
,
getFieldsValue
:
getInfoValue
,
validate
:
infoValidate
},
]
=
useForm
({
labelWidth
:
100
,
schemas
:
infoFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
[
detailForm
,
{
setFieldsValue
:
setDetailValue
,
getFieldsValue
:
getDetailValue
,
validate
:
detailValidate
},
]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
25
},
schemas
:
detailFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
</
script
>
<
style
scoped
>
.header
{
display
:
flex
;
flex-direction
:
row
;
gap
:
10px
;
.h-title
{
flex
:
1
;
display
:
flex
;
gap
:
10px
;
.h-icon
{
font-size
:
40px
!important
;
color
:
#0a208a
;
}
.h-des
{
font-size
:
18px
;
font-weight
:
bolder
;
line-height
:
40px
;
}
.h-path
{
font-size
:
12px
;
}
}
.h-group
{
display
:
flex
;
gap
:
10px
;
}
}
.pd-body
{
padding
:
20px
0
;
}
.pd-detail
{
margin-top
:
15px
;
.pd-des
{
display
:
flex
;
gap
:
10px
;
}
.pd-txt
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.des-p
{
width
:
80%
;
font-size
:
16px
;
text-indent
:
2em
;
line-height
:
40px
;
word-wrap
:
break-word
;
/* 防止单词溢出 */
white-space
:
normal
;
/* 允许文本自动换行 */
overflow-wrap
:
break-word
;
/* 确保文本不会溢出 */
}
}
}
.title
{
font-weight
:
bolder
;
font-size
:
16px
;
margin
:
15px
10px
;
}
</
style
>
src/views/servicePlatform/policyManagement/index.vue
View file @
c24a029e
...
@@ -10,12 +10,14 @@
...
@@ -10,12 +10,14 @@
</div>
</div>
<div
class=
"h-group"
>
<div
class=
"h-group"
>
<a-button
class=
"btn"
type=
"primary"
@
click=
"handleAdd"
>
新增
</a-button>
<a-button
class=
"btn"
type=
"primary"
@
click=
"handleAdd"
>
新增
</a-button>
<a-button
class=
"btn"
type=
"primary"
@
click=
"handleDelete"
>
批量删除
</a-button>
<a-button
:disabled=
"getDisabled()"
class=
"btn"
type=
"primary"
@
click=
"handleDelete"
>
批量删除
</a-button>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<div
class=
"h-full"
style=
"padding: 0 25px"
>
<div
class=
"h-full"
style=
"padding: 0 25px"
>
<BasicTable
@
register=
"register
ApplySuccessT
able"
>
<BasicTable
@
register=
"register
Table"
ref=
"t
able"
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
<TableAction
...
@@ -30,6 +32,7 @@
...
@@ -30,6 +32,7 @@
},
},
{
{
label: '删除',
label: '删除',
color: 'error',
onClick: handleRemove.bind(null, record),
onClick: handleRemove.bind(null, record),
},
},
]"
]"
...
@@ -45,42 +48,102 @@
...
@@ -45,42 +48,102 @@
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
PageWrapper
from
'@/components/Page/src/PageWrapper.vue'
;
import
PageWrapper
from
'@/components/Page/src/PageWrapper.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
,
BasicTableProps
}
from
'@/components/Table'
;
import
{
FileProtectOutlined
}
from
'@ant-design/icons-vue'
;
import
{
FileProtectOutlined
}
from
'@ant-design/icons-vue'
;
import
{
policyFormSchema
,
policyTableColumn
,
}
from
'@/views/servicePlatform/policyManagement/policy.data'
;
import
{
policyData
}
from
'@/views/servicePlatform/policyManagement/policyData'
;
import
{
useRouter
}
from
'vue-router'
;
// 初始化
// 初始化
const
{
createMessage
}
=
useMessage
();
const
router
=
useRouter
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
table
=
ref
();
// 数据
// 数据
onMounted
(()
=>
{});
onMounted
(()
=>
{});
// 方法
// 方法
// 获取禁用
function
getDisabled
()
{
if
(
table
.
value
)
{
return
getSelectRows
().
length
<=
0
;
}
else
{
return
true
;
}
}
// 新增
// 新增
function
handleAdd
()
{
function
handleAdd
()
{
router
.
push
({
path
:
'/servicePlatform/policyManagement/detail'
,
query
:
{
status
:
'add'
,
},
});
}
}
// 批量删除
// 批量删除
function
handleDelete
()
{
function
handleDelete
()
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认批量删除'
,
content
:
'确认批量删除选中的数据吗?'
,
onOk
()
{
createMessage
.
success
(
'批量删除成功!'
);
},
});
}
// 详情
function
handleDetail
(
record
)
{
router
.
push
({
path
:
'/servicePlatform/policyManagement/detail'
,
query
:
{
...
record
,
status
:
'detail'
,
},
});
}
// 编辑
function
handleEdit
(
record
)
{
router
.
push
({
path
:
'/servicePlatform/policyManagement/detail'
,
query
:
{
...
record
,
status
:
'edit'
,
},
});
}
// 删除
function
handleRemove
()
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
content
:
'确认删除这条数据吗?'
,
onOk
()
{
createMessage
.
success
(
'删除成功!'
);
},
});
}
}
/**
/**
* table
* table
*/
*/
const
[
registerApplySuccessTable
]
=
useTable
({
const
[
registerTable
,
{
getSelectRows
}]
=
useTable
({
dataSource
:
[],
dataSource
:
policyData
,
columns
:
[],
columns
:
policyTableColumn
,
rowSelection
:
true
,
useSearchForm
:
true
,
useSearchForm
:
true
,
formConfig
:
{
formConfig
:
{
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
schemas
:
[]
,
schemas
:
policyFormSchema
,
autoSubmitOnEnter
:
true
,
autoSubmitOnEnter
:
true
,
},
},
actionColumn
:
{
actionColumn
:
{
width
:
1
2
0
,
width
:
1
5
0
,
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'action'
,
dataIndex
:
'action'
,
},
},
showIndexColumn
:
false
,
showIndexColumn
:
false
,
});
}
as
BasicTableProps
);
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/servicePlatform/policyManagement/policy.data.ts
0 → 100644
View file @
c24a029e
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
export
const
policyTableColumn
:
BasicColumn
[]
=
[
{
title
:
'标题'
,
dataIndex
:
'title'
,
},
{
title
:
'发布时间'
,
dataIndex
:
'uploadTime'
,
},
{
title
:
'发布人'
,
dataIndex
:
'uploadBy'
,
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
},
{
title
:
'来源'
,
dataIndex
:
'from'
,
},
{
title
:
'审核人'
,
dataIndex
:
'auditor'
,
},
];
export
const
policyFormSchema
:
FormSchema
[]
=
[
{
field
:
'title'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'请输入关键字进行搜索'
,
},
style
:
{
width
:
'120px'
,
},
},
{
label
:
' '
,
field
:
'uploadTime'
,
component
:
'RangePicker'
,
labelWidth
:
10
,
style
:
{
width
:
'120px'
,
},
},
{
label
:
' '
,
field
:
'type'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
''
,
value
:
''
,
},
],
},
labelWidth
:
10
,
style
:
{
width
:
'120px'
,
},
},
];
src/views/servicePlatform/policyManagement/policyData.ts
0 → 100644
View file @
c24a029e
This diff is collapsed.
Click to expand it.
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