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
bb9ed3e8
Commit
bb9ed3e8
authored
Jun 11, 2024
by
mengzixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 月度工程资金计划列表接口对接
parent
5aac56d7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
933 additions
and
3 deletions
+933
-3
monthlyPlan.ts
src/api/project/monthlyPlan.ts
+4
-0
annualPlan.ts
src/router/routes/modules/annualPlan.ts
+10
-0
annualPlanEdit.vue
src/views/annualPlan/annualPlanEdit/annualPlanEdit.vue
+402
-0
tableData.tsx
src/views/annualPlan/annualPlanEdit/tableData.tsx
+263
-0
annualPlanModel.vue
src/views/annualPlan/annualPlanModel/annualPlanModel.vue
+74
-0
data.tsx
src/views/annualPlan/annualPlanModel/data.tsx
+161
-0
index.vue
src/views/annualPlan/index.vue
+19
-3
No files found.
src/api/project/monthlyPlan.ts
View file @
bb9ed3e8
...
...
@@ -3,6 +3,10 @@ import { defHttp } from '@/utils/http/axios';
enum
Api
{
GetList
=
'/pro/monthEngineer/page'
,
GetMonthlyPlanProjectList
=
''
,
}
export
const
getMonthlyPlanList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
export
const
getMonthlyPlanProjectList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetMonthlyPlanProjectList
,
data
:
params
});
src/router/routes/modules/annualPlan.ts
View file @
bb9ed3e8
...
...
@@ -24,6 +24,16 @@ const annualPlan: AppRouteModule = {
orderNo
:
10
,
},
},
{
path
:
'annualPlanEdit'
,
name
:
'annualPlanEdit'
,
component
:
()
=>
import
(
'@/views/annualPlan/annualPlanEdit/annualPlanEdit.vue'
),
meta
:
{
// affix: true,
title
:
'新建计划(储备)'
,
orderNo
:
8
,
},
},
],
};
...
...
src/views/annualPlan/annualPlanEdit/annualPlanEdit.vue
0 → 100644
View file @
bb9ed3e8
<
template
>
<PageWrapper
:title=
"getTitle"
:contentBackground=
"false"
headerSticky
>
<template
#
extra
>
<a-button
type=
"primary"
v-if=
"!disabled"
danger
>
删除
</a-button>
<a-button
type=
"primary"
v-if=
"!disabled"
@
click=
"handleSubmit"
>
提交
</a-button>
</
template
>
<PageCard
v-for=
"(item, index) in tabsFormSchema"
:key=
"index"
:title=
"item.name"
>
<
template
#
right
>
<a-button
type=
"text"
preIcon=
"ant-design:delete-outlined"
danger
v-if=
"!disabled"
@
click=
"deleteItem(index)"
/>
</
template
>
<BasicForm
:loading=
"loading"
@
register=
"item.Form[0]"
/>
<div
style=
"width: 500px"
>
<BasicTable
:ref=
"(el) => setSwipeCellRef(item, index)"
@
register=
"item.table"
:beforeEditSubmit=
"beforeEditSubmit(item, index)"
/>
</div>
</PageCard>
<a-button
v-if=
"!disabled"
type=
"dashed"
@
click=
"add"
preIcon=
"ei:plus"
>
从项目库导入
</a-button>
<a-button
v-if=
"!disabled"
type=
"dashed"
@
click=
"handleAdd"
class=
"ml-2"
preIcon=
"ei:plus"
>
新建项目
</a-button>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<annualPlanModel
@
register=
"register"
@
close=
"handleNewData"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
getBasicColumns
}
from
'./tableData'
;
import
{
ref
,
nextTick
,
onMounted
,
unref
,
computed
,
reactive
}
from
'vue'
;
import
{
demoListApi
}
from
'@/api/demo/table'
;
import
annualPlanModel
from
'../annualPlanModel/annualPlanModel.vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
PageCard
from
'@/components/Page/src/PageCard.vue'
;
import
projectDrawer
from
'@/views/project/projectDrawer.vue'
;
import
{
BasicForm
,
useForm
,
FormProps
,
UseFormReturnType
}
from
'@/components/Form'
;
import
{
formSchema
}
from
'../annualPlanEdit/tableData'
;
import
{
deepMerge
}
from
'@/utils'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
// import { addItem, updateItem, getItem } from '@/api/project/biddingPlan';
import
{
addItem
,
updateItem
,
getItem
}
from
'@/api/project/engineeringProject'
;
import
{
editModel
}
from
'@/api/project/model/engineeringprojectModel'
;
import
{
useModal
}
from
'@/components/Modal'
;
const
getTitle
=
ref
(
''
);
const
engineerId
=
ref
(
''
);
let
show
=
ref
<
Recordable
[]
>
([]);
// function handleSummary(tableData: Recordable[]) {
// const totalNo = tableData.reduce((prev, next) => {
// prev += next.no;
// return prev;
// }, 0);
// return [
// {
// _row: '合计',
// _index: '平均值',
// no: totalNo,
// },
// {
// _row: '合计',
// _index: '平均值',
// no: totalNo,
// },
// ];
// }
// ref数组
const
swipeCellRefList
=
ref
<
HTMLElement
[]
>
([]);
// 动态设置ref
function
setSwipeCellRef
(
item
,
index
)
{
if
(
item
)
{
swipeCellRefList
.
value
[
index
]
=
item
;
}
}
function
beforeEditSubmit
(
item
,
index
)
{
// setSwipeCellRef(item, index);
// console.log('swipeCellRefList', swipeCellRefList.value[index]);
swipeCellRefList
.
value
?.
forEach
((
data
:
any
)
=>
{
// console.log('data.table' + index, data.table);
let
{
getDataSource
}
=
data
.
table
[
1
];
const
res
=
getDataSource
();
// console.log('res', res);
const
totalNo
=
res
.
reduce
((
prev
,
next
)
=>
{
prev
+=
Number
(
next
.
amount
);
return
prev
;
},
0
);
// console.log('totalNo', totalNo);
show
.
value
=
[
{
year
:
'合计'
,
// _row: '合计',
// _index: '合计',
amount
:
totalNo
,
},
];
return
true
;
});
}
// const [registerTable, { getDataSource, setTableData }] = useTable({
// title: '表尾行合计示例',
// // api: demoListApi,
// // rowSelection: { type: 'checkbox' },
// columns: getBasicColumns(),
// showSummary: true,
// summaryData: show,
// maxHeight: 180,
// maxWidth: 200,
// showIndexColumn: false,
// pagination: false,
// // scroll: { x: 2000 },
// // canResize: false,
// // showSelectionBar: true, // 显示多选状态栏
// });
onMounted
(
async
()
=>
{
show
.
value
=
[
{
year
:
'合计'
,
// _row: '合计',
// _index: '合计',
amount
:
'-'
,
},
];
// setTableData([
// {
// year: '2022',
// no: '',
// },
// {
// year: '2023',
// no: '',
// },
// {
// year: '2024',
// no: '',
// },
// ]);
});
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
const
{
createMessage
}
=
useMessage
();
// const getTitle = computed(() =>
// !unref(isUpdate) ? '新增工程项目投资计划(工程)' : '编辑工程项目投资计划(工程)',
// );
getTitle
.
value
=
'新建年度工程资金计划'
;
const
isUpdate
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
formData
=
ref
<
editModel
>
({});
const
disabled
=
ref
(
false
);
onMounted
(
async
()
=>
{
const
route
=
useRoute
();
const
id
=
route
.
query
.
id
;
// 获取名为id的参数
if
(
!
id
)
{
formData
.
value
.
biddingQuarter
=
route
.
query
.
quarter
;
formData
.
value
.
tenderYear
=
route
.
query
.
year
;
formData
.
value
.
investmentPlan
=
[];
// formData.value.data = [];
isUpdate
.
value
=
false
;
console
.
log
(
formData
);
}
else
{
disabled
.
value
=
route
.
query
.
disabled
==
'0'
?
false
:
true
;
if
(
disabled
.
value
)
{
getTitle
.
value
=
'查看年度工程资金计划'
;
}
else
{
getTitle
.
value
=
'编辑年度工程资金计划'
;
}
engineerId
.
value
=
id
;
isUpdate
.
value
=
true
;
let
res
=
await
getItem
({
id
});
console
.
log
(
'getItem'
,
res
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
const
item
=
{
name
:
'序号'
+
(
i
+
1
),
forceRender
:
true
,
Form
:
useForm
(
Object
.
assign
({
schemas
:
formSchema
,
disabled
},
baseFormConfig
)
as
FormProps
,
),
table
:
useTable
({
title
:
'表尾行合计示例'
,
// api: demoListApi,
// rowSelection: { type: 'checkbox' },
columns
:
getBasicColumns
(),
showSummary
:
true
,
summaryData
:
show
,
maxHeight
:
180
,
maxWidth
:
200
,
showIndexColumn
:
false
,
pagination
:
false
,
// scroll: { x: 2000 },
// canResize: false,
// showSelectionBar: true, // 显示多选状态栏
}),
};
const
{
setFieldsValue
}
=
item
.
Form
[
1
];
tabsFormSchema
.
push
(
item
);
const
info
=
res
[
i
];
info
.
time
=
[
info
.
beginTime
,
info
.
endTime
];
const
data
=
{
id
:
info
.
id
,
investmentId
:
info
.
investmentId
,
};
formData
.
value
.
investmentPlan
=
[];
formData
.
value
.
investmentPlan
.
push
(
data
);
console
.
log
(
'info'
,
info
);
const
{
setTableData
}
=
item
.
table
[
1
];
nextTick
(()
=>
{
setTableData
(
info
.
planYear
);
setFieldsValue
(
info
,
// projectName: info.projectName,
// constructionSite: info.constructionSite,
// constructionMode: info.constructionMode,
// projectType: info.projectType,
// constructionScale: info.constructionScale,
// projectOverview: info.projectOverview,
// fundingSource: info.fundingSource,
// implementingEntity: info.implementingEntity,
// filingCycle: info.filingCycle,
// competentDepartment: info.competentDepartment,
// matchingFunds: info.matchingFunds,
// specialBondFunds: info.specialBondFunds,
// planFunds: info.planFunds,
// attribute: info.attribute,
// beginTime: info.time[0],
// endTime: info.time[1],
// schedule: info.schedule,
// completionRemarks: info.completionRemarks,
);
});
}
console
.
log
(
res
);
}
});
type
TabsFormType
=
{
name
:
string
;
forceRender
?:
boolean
;
Form
:
UseFormReturnType
;
table
:
any
;
};
const
baseFormConfig
:
Partial
<
FormProps
>
=
{
showActionButtonGroup
:
false
,
labelWidth
:
100
,
layout
:
'vertical'
,
};
const
tabsFormSchema
=
reactive
<
TabsFormType
[]
>
([]);
async
function
add
()
{
openModal
();
}
async
function
handleNewData
(
info
:
any
)
{
if
(
info
)
{
info
.
map
((
i
)
=>
{
handleNew
(
i
);
});
}
}
/***
*
*/
async
function
handleNew
(
info
:
any
)
{
const
item
=
{
name
:
'序号'
+
(
tabsFormSchema
.
length
+
1
),
forceRender
:
true
,
Form
:
useForm
(
Object
.
assign
({
schemas
:
formSchema
},
baseFormConfig
)
as
FormProps
),
table
:
useTable
({
title
:
'表尾行合计示例'
,
// api: demoListApi,
// rowSelection: { type: 'checkbox' },
columns
:
getBasicColumns
(),
showSummary
:
true
,
summaryData
:
show
,
maxHeight
:
180
,
maxWidth
:
200
,
showIndexColumn
:
false
,
pagination
:
false
,
// scroll: { x: 2000 },
// canResize: false,
// showSelectionBar: true, // 显示多选状态栏
}),
};
const
{
setTableData
}
=
item
.
table
[
1
];
// console.log('item.table',setTableData)
const
{
setFieldsValue
}
=
item
.
Form
[
1
];
tabsFormSchema
.
push
(
item
);
formData
.
value
.
investmentPlan
.
push
({
proId
:
info
.
id
,
});
nextTick
(()
=>
{
setTableData
([
{
year
:
'2022'
,
amount
:
''
,
},
{
year
:
'2023'
,
amount
:
''
,
},
{
year
:
'2024'
,
amount
:
''
,
},
]);
setFieldsValue
({
projectName
:
info
.
projectName
,
constructionSite
:
info
.
constructionSite
,
constructionMode
:
info
.
constructionMode
,
projectType
:
info
.
projectType
,
constructionScale
:
info
.
constructionScale
,
projectOverview
:
info
.
projectOverview
,
fundingSource
:
info
.
fundingSource
,
implementingEntity
:
info
.
implementingEntity
,
// filingCycle: info.filingCycle,
// competentDepartment: info.competentDepartment,
// matchingFunds: info.matchingFunds,
// specialBondFunds: info.specialBondFunds,
// planFunds: info.planFunds,
// attribute: info.attribute,
// beginTime: info.time[0],
// endTime: info.time[1],
// schedule: info.schedule,
// completionRemarks: info.completionRemarks,
});
});
}
async
function
deleteItem
(
index
:
any
)
{
tabsFormSchema
.
splice
(
index
,
1
);
formData
.
value
.
investmentPlan
.
splice
(
index
,
1
);
}
async
function
handleAdd
()
{
openDrawer
(
true
,
{
isUpdate
:
false
,
});
}
async
function
handleSuccess
(
params
:
any
)
{
console
.
log
(
params
);
handleNew
(
params
);
}
async
function
handleSubmit
()
{
console
.
log
(
'tabsFormSchema'
,
tabsFormSchema
);
loading
.
value
=
true
;
try
{
for
(
let
i
=
0
;
i
<
tabsFormSchema
.
length
;
i
++
)
{
let
item
=
tabsFormSchema
[
i
];
const
{
validate
,
getFieldsValue
}
=
item
.
Form
[
1
];
const
{
getDataSource
}
=
item
.
table
[
1
];
await
validate
();
let
res
=
getFieldsValue
();
let
data
=
getDataSource
();
console
.
log
(
' getFieldsValue()'
,
getFieldsValue
());
console
.
log
(
' getDataSource()'
,
getDataSource
());
console
.
log
(
' data111'
,
data
);
data
[
0
].
amount
=
Number
(
data
[
0
].
amount
);
data
[
1
].
amount
=
Number
(
data
[
1
].
amount
);
data
[
2
].
amount
=
Number
(
data
[
2
].
amount
);
// res.biddingPeriod = res.biddingPeriod.join(',');
// res.plannedPeriod = res.plannedPeriod.join(',');
formData
.
value
.
investmentPlan
[
i
]
=
deepMerge
(
formData
.
value
.
investmentPlan
[
i
],
res
);
formData
.
value
.
investmentPlan
[
i
].
planYear
=
data
;
formData
.
value
.
investmentPlan
[
i
].
beginTime
=
res
.
time
[
0
];
formData
.
value
.
investmentPlan
[
i
].
endTime
=
res
.
time
[
1
];
formData
.
value
.
planType
=
'工程'
;
formData
.
value
.
filingCycle
=
'2024'
;
formData
.
value
.
investmentPlan
[
i
].
totalInvestment
=
Number
(
formData
.
value
.
investmentPlan
[
i
].
totalInvestment
,
);
formData
.
value
.
id
=
engineerId
.
value
;
}
formData
.
value
.
proNumber
=
formData
.
value
.
investmentPlan
.
Length
;
console
.
log
(
' formData()'
,
unref
(
formData
));
// console.log(' setTableData()', setTableData);
let
res
=
isUpdate
.
value
?
await
updateItem
(
unref
(
formData
))
:
await
addItem
(
unref
(
formData
));
loading
.
value
=
false
;
console
.
log
(
res
);
createMessage
.
success
(
'提交成功!'
);
}
catch
(
e
)
{
// 验证失败或出错,切换到对应标签页
console
.
log
(
e
);
}
finally
{
loading
.
value
=
false
;
}
}
</
script
>
src/views/annualPlan/annualPlanEdit/tableData.tsx
0 → 100644
View file @
bb9ed3e8
import
{
optionsListApi
}
from
'@/api/demo/select'
;
import
{
FormProps
,
FormSchema
,
BasicColumn
}
from
'@/components/Table'
;
import
{
VxeFormItemProps
,
VxeGridPropTypes
}
from
'@/components/VxeTable'
;
import
{
ref
}
from
'vue'
;
import
{
Input
}
from
'ant-design-vue'
;
export
function
getBasicColumns
():
BasicColumn
[]
{
return
[
{
title
:
'年份'
,
dataIndex
:
'year'
,
width
:
80
,
},
{
title
:
'金额(万元)'
,
dataIndex
:
'amount'
,
width
:
150
,
// sorter: true,
// defaultHidden: true,
edit
:
true
,
},
];
}
export
const
formSchema
:
({
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
readonly
:
boolean
;
style
:
{
border
:
string
}
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
valueFormat
:
string
;
format
:
string
;
style
:
{
width
:
string
};
placeholder
:
string
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
addonAfter
:
string
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
addonAfter
:
string
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
addonAfter
:
string
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
addonAfter
:
string
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
options
:
({
label
:
string
;
value
:
string
}
|
{
label
:
string
;
value
:
string
}
|
{
label
:
string
;
value
:
string
})[]
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
icon
:
string
;
componentProps
:
{
style
:
{
width
:
string
};
placeholder
:
string
[]
};
label
:
string
;
required
:
boolean
}
|
{
colProps
:
{
offset
:
number
;
span
:
number
};
component
:
string
;
field
:
string
;
componentProps
:
{
options
:
({
label
:
string
;
value
:
string
}
|
{
label
:
string
;
value
:
string
}
|
{
label
:
string
;
value
:
string
})[]
};
label
:
string
;
required
:
boolean
})[]
=
[
{
field
:
'projectName'
,
label
:
'项目名称'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'constructionSite'
,
label
:
'建设地点'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'constructionMode'
,
label
:
'建设模式'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'projectType'
,
label
:
'项目类型'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'constructionScale'
,
label
:
'建设规模'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'projectOverview'
,
label
:
'项目概况:'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'fundingSource'
,
label
:
'资金来源:'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'implementingEntity'
,
label
:
'实施主体:'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'projectOverview'
,
label
:
'项目概况:'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
},
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'filingCycle'
,
label
:
'填报年度:'
,
required
:
true
,
component
:
'DatePicker'
,
componentProps
:
{
placeholder
:
'选择填报周期'
,
picker
:
'year'
,
style
:
{
width
:
'100%'
},
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'totalInvestment'
,
label
:
'总投资'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
addonAfter
:
'万元'
,
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'competentDepartment'
,
label
:
'项目主管部门'
,
required
:
true
,
component
:
'Input'
,
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'matchingFunds'
,
label
:
'2024年财政预算匹配资金'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
addonAfter
:
'万元'
,
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'specialBondFunds'
,
label
:
'其中专项债项目2024年预计使用专项债资金'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
addonAfter
:
'万元'
,
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'planFunds'
,
label
:
'2024年计划资金'
,
required
:
true
,
component
:
'Input'
,
componentProps
:
{
addonAfter
:
'万元'
,
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'attribute'
,
label
:
'建设性质'
,
required
:
true
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'新建'
,
value
:
'0'
},
{
label
:
'结转'
,
value
:
'1'
},
{
label
:
'缓建'
,
value
:
'2'
},
],
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
field
:
'time'
,
component
:
'RangePicker'
,
label
:
'开竣工时间'
,
required
:
true
,
icon
:
'healthicons:i-schedule-school-date-time-outline'
,
colProps
:
{
span
:
7
,
offset
:
1
},
componentProps
:
{
placeholder
:
[
'开始日期'
,
'结束日期'
],
style
:
{
width
:
'100%'
},
valueFormat
:
'YYYY-MM-DD'
,
format
:
'YYYY-MM-DD'
,
},
},
{
field
:
'schedule'
,
label
:
'2024年底预计形象进度'
,
required
:
true
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'A(已经立项实施的跨年工程)'
,
value
:
'0'
},
{
label
:
'B(该年度必须建设的项目)'
,
value
:
'1'
},
{
label
:
'C(该年度必须建设的项目)'
,
value
:
'2'
},
],
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
{
label
:
'备注'
,
field
:
'remarks'
,
required
:
true
,
component
:
'InputTextArea'
,
componentProps
:
{
maxlength
:
100
,
showCount
:
true
,
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
// {
// field: 'isReserveProject',
// label: '是否为储备项目',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '是', value: '1' },
// { label: '否', value: '0' },
// ],
// },
// },
// {
// field: 'status',
// label: '状态',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '启用', value: '1' },
// { label: '停用', value: '0' },
// ],
// },
// },
];
src/views/annualPlan/annualPlanModel/annualPlanModel.vue
0 → 100644
View file @
bb9ed3e8
<
template
>
<BasicModal
width=
"70%"
v-bind=
"$attrs"
@
register=
"register"
title=
"选择投资计划"
:minHeight=
"30"
okText=
"导入"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
>
<BasicTable
@
register=
"registerTable"
>
<template
#
bodyCell=
"
{ column, text, record, index }">
<!-- 当前列是序号列时,显示序号 -->
<span
v-if=
"column.dataIndex === 'serialNumber'"
>
{{
index
+
1
}}
</span>
<!-- 其他列正常显示 -->
<span
v-else
>
{{
text
}}
</span>
</
template
>
</BasicTable>
<!-- <button @click="getSelectRowList">获取数据</button>-->
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getListByPage
}
from
'@/api/project/project'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
getMonthlyPlanProjectList
}
from
"@/api/project/monthlyPlan"
;
const
[
registerTable
,
{
reload
,
getSelectRows
}]
=
useTable
({
api
:
getMonthlyPlanProjectList
,
title
:
'123'
,
columns
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
searchFormSchema
,
},
searchInfo
:
{
type
:
'engineering'
},
useSearchForm
:
true
,
showTableSetting
:
false
,
bordered
:
true
,
showIndexColumn
:
false
,
rowSelection
:
{
type
:
'checkbox'
,
},
// actionColumn: {
// width: 80,
// title: '操作',
// dataIndex: 'action',
// // slots: { customRender: 'action' },
// fixed: undefined,
// },
});
const
{
createMessage
}
=
useMessage
();
function
getSelectRowList
()
{
// createMessage.info('请在控制台查看!');
// console.log(getSelectRows());
emit
(
'close'
,
getSelectRows
());
}
const
emit
=
defineEmits
([
'close'
]);
function
handleVisibleChange
(
v
)
{}
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
data
;
});
function
handleSubmit
()
{
getSelectRowList
();
closeModal
();
}
</
script
>
src/views/annualPlan/annualPlanModel/data.tsx
0 → 100644
View file @
bb9ed3e8
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
h
}
from
'vue'
;
import
{
Switch
}
from
'ant-design-vue'
;
import
{
setRoleStatus
}
from
'@/api/demo/system'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
type
CheckedType
=
boolean
|
string
|
number
;
export
const
columns
:
(
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
)[]
=
[
{
title
:
'年度'
,
dataIndex
:
'projectName'
,
width
:
180
,
},
{
title
:
'类型'
,
dataIndex
:
'implementingEntity'
,
width
:
180
,
},
{
title
:
'项目数量'
,
dataIndex
:
'constructionMode'
,
width
:
200
,
},
{
title
:
'总投资'
,
dataIndex
:
'constructionSite'
,
width
:
180
,
},
{
title
:
'合同总额合计'
,
dataIndex
:
'projectType'
,
width
:
180
,
},
{
title
:
'三年滚动投资计划合计'
,
dataIndex
:
'fundingSource'
,
width
:
180
,
},
{
title
:
'公司名称'
,
dataIndex
:
'constructionPurpose'
,
width
:
180
,
},
{
title
:
'最新更新人'
,
dataIndex
:
'constructionScale'
,
width
:
180
,
},
{
title
:
'最新更新时间'
,
dataIndex
:
'constructionScale'
,
width
:
180
,
},
{
title
:
'审核状态'
,
dataIndex
:
'constructionScale'
,
width
:
180
,
},
{
title
:
'审核人'
,
dataIndex
:
'constructionScale'
,
width
:
180
,
},
{
title
:
'审核时间'
,
dataIndex
:
'constructionScale'
,
width
:
180
,
},
];
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'projectName'
,
label
:
''
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'搜索关键字'
,
},
colProps
:
{
span
:
4
},
},
];
export
const
formSchema
:
FormSchema
[]
=
[
{
field
:
'projectName'
,
label
:
'项目名称'
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
placeholder
:
'XXXX项目'
,
disabled
:
true
,
style
:
{
background
:
'none'
,
border
:
'none'
,
},
},
colProps
:
{
span
:
8
},
},
{
field
:
'projectName'
,
label
:
'建设地点'
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
placeholder
:
'华苑片区'
,
disabled
:
true
,
style
:
{
background
:
'none'
,
border
:
'none'
,
},
},
colProps
:
{
span
:
8
},
},
{
field
:
'projectName'
,
label
:
'建设模式'
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
placeholder
:
'自建'
,
disabled
:
true
,
style
:
{
background
:
'none'
,
border
:
'none'
,
},
},
colProps
:
{
span
:
8
},
},
// {
// field: 'isReserveProject',
// label: '是否为储备项目',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '是', value: '1' },
// { label: '否', value: '0' },
// ],
// },
// },
// {
// field: 'status',
// label: '状态',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '启用', value: '1' },
// { label: '停用', value: '0' },
// ],
// },
// },
];
src/views/annualPlan/index.vue
View file @
bb9ed3e8
...
...
@@ -2,7 +2,7 @@
<div>
<BasicTable
@
register=
"registerTable"
:title=
"'年度工程资金计划'"
>
<template
#
toolbar
>
<a-button
class=
"btn"
type=
"primary"
@
click=
"
Import
"
>
新建年度工程资金计划
</a-button>
<a-button
class=
"btn"
type=
"primary"
@
click=
"
addAnnualPlan
"
>
新建年度工程资金计划
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, text, record, index }"
>
...
...
@@ -33,17 +33,23 @@
</
template
>
</template>
</BasicTable>
<yearModal
@
register=
"register"
@
close=
"handleNew"
/>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getAnnualPlanList
}
from
'@/api/project/annualPlan'
;
import
yearModal
from
'@/components/yearModal.vue'
;
import
{
getListByPage
}
from
'@/api/project/biddingPlan'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
router
}
from
"@/router"
;
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
defineOptions
({
name
:
'Performance'
});
...
...
@@ -85,8 +91,18 @@ function handleSuccess() {
reload
();
}
const
Import
=
()
=>
{
console
.
log
(
'新建年度工程资金计划'
);
const
addAnnualPlan
=
()
=>
{
openModal
(
true
,
{
data
:
[
'year'
],
});
};
const
handleNew
=
(
e
)
=>
{
console
.
log
(
'eeee'
,
e
);
router
.
push
({
path
:
'/annualPlan/annualPlanEdit'
,
query
:
e
,
});
};
const
change
=
(
key
:
string
)
=>
{
...
...
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