Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
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
紫光云
web-project
Commits
3dd98633
Commit
3dd98633
authored
Jul 01, 2024
by
小费同学阿
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
cee930fe
ea38bbe9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
495 additions
and
19 deletions
+495
-19
drawerData.ts
src/views/project/investmentPlanDrawer/drawerData.ts
+351
-1
exportModal.vue
src/views/project/investmentPlanDrawer/exportModal.vue
+101
-0
InvestmentPlan.vue
src/views/project/tabs/InvestmentPlan.vue
+43
-18
No files found.
src/views/project/investmentPlanDrawer/drawerData.ts
View file @
3dd98633
import
{
FormSchema
}
from
'@/components/Table'
;
import
{
FormProps
,
FormSchema
}
from
'@/components/Table'
;
// 1-投资计划详情
// 1-投资计划详情
export
const
columnsFormSchema
:
FormSchema
[]
=
[
export
const
columnsFormSchema
:
FormSchema
[]
=
[
...
@@ -158,3 +158,353 @@ export const columnsFormSchema: FormSchema[] = [
...
@@ -158,3 +158,353 @@ export const columnsFormSchema: FormSchema[] = [
component
:
'Input'
,
component
:
'Input'
,
},
},
];
];
export
const
exportUrl
=
'/pro/export/investmentPlan'
;
//查询条件
export
function
getFormConfig
():
Partial
<
FormProps
>
{
return
{
labelWidth
:
100
,
schemas
:
[
{
field
:
'filingCycle'
,
label
:
'填报年份'
,
component
:
'DatePicker'
,
componentProps
:
{
placeholder
:
'选择填报周期'
,
picker
:
'year'
,
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'项目名称'
,
field
:
'projectName'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'建设地点'
,
field
:
'constructionSite'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'项目概况'
,
field
:
'projectOverview'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'建设规模'
,
field
:
'constructionScale'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'建设目的及项目功能'
,
field
:
'constructionPurpose'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'建设模式'
,
field
:
'constructionMode'
,
labelWidth
:
'140px'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'全部项目'
,
value
:
undefined
,
},
{
label
:
'自建'
,
value
:
'自建'
,
},
{
label
:
'委托建设'
,
value
:
'委托建设'
,
},
{
label
:
'代建'
,
value
:
'代建'
,
},
{
label
:
'承建'
,
value
:
'承建'
,
},
],
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'资金来源'
,
field
:
'fundingSource'
,
labelWidth
:
'140px'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'自筹'
,
value
:
'自筹'
,
key
:
'自筹'
,
},
{
label
:
'财政资金'
,
value
:
'财政资金'
,
key
:
'财政资金'
,
},
{
label
:
'专项债'
,
value
:
'专项债'
,
key
:
'专项债'
,
},
],
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'项目类型'
,
field
:
'projectType'
,
labelWidth
:
'140px'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'公共设施配套类'
,
value
:
'公共设施配套类'
,
key
:
'公共设施配套类'
,
},
{
label
:
'基础设施类'
,
value
:
'基础设施类'
,
key
:
'基础设施类'
,
},
{
label
:
'产业载体类'
,
value
:
'产业载体类'
,
key
:
'产业载体类'
,
},
{
label
:
'房地产类'
,
value
:
'房地产类'
,
key
:
'房地产类'
,
},
{
label
:
'存量盘活类'
,
value
:
'存量盘活类'
,
key
:
'存量盘活类'
,
},
{
label
:
'其他类(零星工程)'
,
value
:
'其他类(零星工程)'
,
key
:
'其他类(零星工程)'
,
},
],
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'总投资'
,
field
:
'totalInvestment'
,
labelWidth
:
'140px'
,
component
:
'InputNumber'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'该年之前总投资额(不含该年)'
,
field
:
'totalBefore'
,
labelWidth
:
'140px'
,
component
:
'InputNumber'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'该年计划投资额'
,
field
:
'planNum'
,
labelWidth
:
'140px'
,
component
:
'InputNumber'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'该年实际完成投资额'
,
field
:
'actualOutputValue'
,
labelWidth
:
'140px'
,
component
:
'InputNumber'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'该年计划资金'
,
field
:
'planFunds'
,
labelWidth
:
'140px'
,
component
:
'InputNumber'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'建设性质'
,
field
:
'attribute'
,
labelWidth
:
'140px'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'新建'
,
value
:
'0'
},
{
label
:
'结转'
,
value
:
'1'
},
{
label
:
'缓建'
,
value
:
'2'
},
],
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'开工竣工时间'
,
field
:
'beginTime'
,
labelWidth
:
'140px'
,
component
:
'DatePicker'
,
componentProps
:
{
picker
:
'date'
,
valueFormat
:
'YYYY-MM-DD'
,
format
:
'YYYY-MM-DD'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'该年底形象进度'
,
field
:
'completionSchedule'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'实施主体'
,
field
:
'implementingEntity'
,
labelWidth
:
'140px'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'了解产品'
,
value
:
'了解产品'
,
key
:
'了解产品'
,
},
{
label
:
'正在跟进'
,
value
:
'正在跟进'
,
key
:
'正在跟进'
,
},
{
label
:
'正在试用'
,
value
:
'正在试用'
,
key
:
'正在试用'
,
},
{
label
:
'准备购买'
,
value
:
'准备购买'
,
key
:
'准备购买'
,
},
{
label
:
'准备付款'
,
value
:
'准备付款'
,
key
:
'准备付款'
,
},
{
label
:
'已经购买'
,
value
:
'已经购买'
,
key
:
'已经购买'
,
},
{
label
:
'暂时闲置'
,
value
:
'暂时闲置'
,
key
:
'暂时闲置'
,
},
],
},
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'项目主管部门'
,
field
:
'competentDepartment'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
{
label
:
'备注'
,
field
:
'completionRemarks'
,
labelWidth
:
'140px'
,
component
:
'Input'
,
colProps
:
{
xl
:
8
,
xxl
:
4
,
},
},
],
};
}
src/views/project/investmentPlanDrawer/exportModal.vue
0 → 100644
View file @
3dd98633
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"导出筛选结果"
:minHeight=
"30"
okText=
"导出"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
nextTick
,
defineProps
,
defineEmits
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
AnnexAdd
}
from
'@/api/project/project'
;
import
{
tenderPlanExport
}
from
'@/api/project/export'
;
import
{
reject
}
from
'lodash-es'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
const
projectId
=
ref
(
0
);
const
schemas
:
FormSchema
[]
=
[
{
field
:
'colums'
,
component
:
'CheckboxGroup'
,
label
:
''
,
required
:
true
,
componentProps
:
{
options
:
[],
},
colProps
:
{
span
:
24
,
},
},
];
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
function
handleVisibleChange
(
v
)
{
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
));
}
const
emit
=
defineEmits
([
'close'
,
'register'
]);
const
modelRef
=
ref
({});
const
[
registerForm
,
{
getFieldsValue
,
validate
,
updateSchema
,
// // setFieldsValue,
// setProps,
},
]
=
useForm
({
labelWidth
:
120
,
schemas
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
console
.
log
(
111
);
data
&&
onDataReceive
(
data
);
});
// function handleVisibleChange(v) {
// v && props.userData && nextTick(() => onDataReceive(props.userData));
// }
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
.
exportData
);
updateSchema
({
field
:
'colums'
,
componentProps
:
{
options
:
data
.
exportData
,
},
});
// console.log(props.userData);
// projectId.value = data.projectId;
// console.log(projectId.value);
}
function
handleSubmit
()
{
validate
().
then
(
async
()
=>
{
const
value
=
getFieldsValue
();
console
.
log
(
value
);
const
data
=
await
tenderPlanExport
({
colums
:
value
.
colums
,
searchField
:
{
biddingType
:
'施工'
},
});
downloadByData
(
data
,
'招标计划.xlsx'
);
emit
(
'close'
);
closeModal
();
});
}
</
script
>
src/views/project/tabs/InvestmentPlan.vue
View file @
3dd98633
<
template
>
<
template
>
<BasicTable
@
register=
"registerTable"
>
<BasicTable
@
register=
"registerTable"
>
<template
#
toolbar
>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleExport"
>
导出筛选结果
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record, index }"
>
<
template
#
bodyCell=
"{ column, record, index }"
>
<template
v-if=
"column.key === 'serialNumber'"
>
<template
v-if=
"column.key === 'serialNumber'"
>
{{
index
+
1
}}
{{
index
+
1
}}
...
@@ -16,15 +19,17 @@
...
@@ -16,15 +19,17 @@
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
<exportModal
@
register=
"registerModal"
/>
<InvestmentPlanDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<InvestmentPlanDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
exportModal
from
'../investmentPlanDrawer/exportModal.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./listData'
;
import
{
columns
,
searchFormSchema
}
from
'./listData'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
inject
}
from
'vue'
;
import
{
inject
}
from
'vue'
;
import
{
investmentPlanList
}
from
'@/api/project/detail/investmentPlan'
;
import
{
investmentPlanList
}
from
'@/api/project/detail/investmentPlan'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
exportUrl
,
getFormConfig
}
from
'@/views/project/investmentPlanDrawer/drawerData'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
InvestmentPlanDrawer
from
'@/views/project/investmentPlanDrawer/investmentPlanDrawer.vue'
;
import
InvestmentPlanDrawer
from
'@/views/project/investmentPlanDrawer/investmentPlanDrawer.vue'
;
...
@@ -33,24 +38,21 @@
...
@@ -33,24 +38,21 @@
console
.
log
(
'投资计划的detailId'
,
detailId
);
console
.
log
(
'投资计划的detailId'
,
detailId
);
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
function
getExportData
()
{
//
function getExportData() {
let
exportData
=
[];
//
let exportData = [];
columns
.
map
((
i
)
=>
{
//
columns.map((i) => {
exportData
.
push
({
//
exportData.push({
label
:
i
.
title
,
//
label: i.title,
value
:
i
.
dataIndex
,
//
value: i.dataIndex,
});
//
});
});
//
});
return
exportData
;
//
return exportData;
}
//
}
getExportData
();
//
getExportData();
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
getForm
}]
=
useTable
({
api
:
investmentPlanList
,
api
:
investmentPlanList
,
columns
,
columns
,
formConfig
:
{
formConfig
:
getFormConfig
(),
labelWidth
:
120
,
schemas
:
searchFormSchema
,
},
searchInfo
:
{
searchInfo
:
{
proId
:
detailId
,
proId
:
detailId
,
},
},
...
@@ -66,12 +68,35 @@
...
@@ -66,12 +68,35 @@
fixed
:
undefined
,
fixed
:
undefined
,
},
},
});
});
function
handleExport
()
{
function
handleExport
()
{
openModal
(
true
,
{
openModal
(
true
,
{
projectId
:
detailId
,
projectId
:
null
,
exportUrl
:
exportUrl
,
title
:
'投资计划'
,
searchData
:
getForm
().
getFieldsValue
(),
exportData
:
getExportData
(),
exportData
:
getExportData
(),
});
});
}
}
//导出相关操作
function
getExportData
()
{
let
exportData
=
[];
columns
.
map
((
i
)
=>
{
exportData
.
push
({
label
:
i
.
title
,
value
:
i
.
dataIndex
,
});
});
return
exportData
;
}
// function handleExport() {
// openModal(true, {
// projectId: detailId,
// exportData: getExportData(),
// });
// }
function
handleDetail
(
record
:
Recordable
,
disabled
:
number
)
{
function
handleDetail
(
record
:
Recordable
,
disabled
:
number
)
{
openDrawer
(
true
,
{
openDrawer
(
true
,
{
record
,
record
,
...
...
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