|
@@ -1,11 +1,85 @@
|
|
<template>
|
|
<template>
|
|
- <div>
|
|
|
|
- 111
|
|
|
|
- </div>
|
|
|
|
|
|
+ <hc-card title="资金预算计划">
|
|
|
|
+ <template #extra>
|
|
|
|
+ <el-button hc-btn type="primary" @click="addRowClick">新增</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :is-index="false">
|
|
|
|
+ <template #action="{ row }">
|
|
|
|
+ <el-link type="success" @click="editRowClick(row)">修改</el-link>
|
|
|
|
+ <el-link type="danger" @click="delRowClick(row)">删除</el-link>
|
|
|
|
+ </template>
|
|
|
|
+ </hc-table>
|
|
|
|
+ <template #action>
|
|
|
|
+ <hc-pages :pages="searchForm" @change="pageChange" />
|
|
|
|
+ </template>
|
|
|
|
+ </hc-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import { onActivated, ref } from 'vue'
|
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
|
+import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
|
+import { getArrValue } from 'js-fast-way'
|
|
|
|
+import mainApi from '~api/funding/budget'
|
|
|
|
|
|
|
|
+const store = useAppStore()
|
|
|
|
+const projectId = ref(store.getProjectId)
|
|
|
|
+
|
|
|
|
+defineOptions({
|
|
|
|
+ name: 'FundingBudget',
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+onActivated(() => {
|
|
|
|
+ getTableData()
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//搜索表单
|
|
|
|
+const searchForm = ref({ current: 1, size: 20, total: 0 })
|
|
|
|
+
|
|
|
|
+//分页
|
|
|
|
+const pageChange = ({ current, size }) => {
|
|
|
|
+ searchForm.value.current = current
|
|
|
|
+ searchForm.value.size = size
|
|
|
|
+ getTableData()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//表格数据
|
|
|
|
+const tableData = ref([
|
|
|
|
+ { key1:'2023-11', key2: '2024-04' },
|
|
|
|
+])
|
|
|
|
+const tableColumn = ref([
|
|
|
|
+ { key: 'key1', name: '开始时间' },
|
|
|
|
+ { key: 'key2', name: '结束时间' },
|
|
|
|
+ { key: 'action', name: '操作', width: 140, align: 'center' },
|
|
|
|
+])
|
|
|
|
+
|
|
|
|
+//获取表格数据
|
|
|
|
+const tableLoading = ref(false)
|
|
|
|
+const getTableData = async () => {
|
|
|
|
+ /*tableLoading.value = true
|
|
|
|
+ const { data } = await mainApi.getPage({
|
|
|
|
+ ...searchForm.value,
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ })
|
|
|
|
+ tableLoading.value = false
|
|
|
|
+ tableData.value = getArrValue(data?.records)
|
|
|
|
+ searchForm.value.total = data['total'] || 0*/
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//新增数据
|
|
|
|
+const addRowClick = () => {
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//修改数据
|
|
|
|
+const editRowClick = (row) => {
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//删除数据
|
|
|
|
+const delRowClick = (row) => {
|
|
|
|
+
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|