ZaiZai 1 жил өмнө
parent
commit
495eeb0c92

+ 2 - 18
src/views/funding/modules/plan-data.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <hc-dialog v-model="isShow" ui="hc-funding-budget-dialog" is-table widths="80%" :title="isNullES(rowInfo.id) ? '新增' : '修改'" @close="cancelClick">
+    <hc-dialog v-model="isShow" ui="hc-funding-plan-dialog" is-table widths="500px" title="新增资金预算期" @close="cancelClick">
         <div>准备写弹窗</div>
         <div>准备写弹窗</div>
         <template #footer>
         <template #footer>
             <el-button @click="cancelClick">取消</el-button>
             <el-button @click="cancelClick">取消</el-button>
@@ -11,16 +11,8 @@
 <script setup>
 <script setup>
 import { ref, watch } from 'vue'
 import { ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { useAppStore } from '~src/store'
-import { getArrValue, isNullES } from 'js-fast-way'
 import mainApi from '~api/funding/budget'
 import mainApi from '~api/funding/budget'
 
 
-const props = defineProps({
-    info: {
-        type: Object,
-        default: () => ({}),
-    },
-})
-
 //事件
 //事件
 const emit = defineEmits(['finish', 'close'])
 const emit = defineEmits(['finish', 'close'])
 
 
@@ -34,12 +26,6 @@ const store = useAppStore()
 const projectId = ref(store.getProjectId)
 const projectId = ref(store.getProjectId)
 const contractId = ref(store.getContractId)
 const contractId = ref(store.getContractId)
 
 
-//监听数据
-const rowInfo = ref(props.info)
-watch(() => props.info, (data) => {
-    rowInfo.value = data
-}, { immediate: true, deep: true })
-
 //监听显示
 //监听显示
 watch(isShow, (val) => {
 watch(isShow, (val) => {
     if (val) setInitData()
     if (val) setInitData()
@@ -49,7 +35,6 @@ watch(isShow, (val) => {
 const setInitData = () => {
 const setInitData = () => {
     projectId.value = store.getProjectId
     projectId.value = store.getProjectId
     contractId.value = store.getContractId
     contractId.value = store.getContractId
-    console.log(rowInfo.value)
 }
 }
 
 
 //确认提交保存
 //确认提交保存
@@ -62,13 +47,12 @@ const confirmClick = () => {
 //取消并关闭弹窗
 //取消并关闭弹窗
 const cancelClick = () => {
 const cancelClick = () => {
     isShow.value = false
     isShow.value = false
-    rowInfo.value = {}
     emit('close')
     emit('close')
 }
 }
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-.el-dialog.hc-funding-budget-dialog .el-dialog__body .hc-new-dialog-body{
+.el-dialog.hc-funding-plan-dialog .el-dialog__body .hc-new-dialog-body{
     padding: 10px 0;
     padding: 10px 0;
 }
 }
 </style>
 </style>

+ 7 - 34
src/views/funding/plan.vue

@@ -1,26 +1,20 @@
 <template>
 <template>
-    <hc-card title="资金预算计划">
+    <hc-card title="资金预算">
         <template #extra>
         <template #extra>
             <el-button hc-btn type="primary" @click="addRowClick">新增</el-button>
             <el-button hc-btn type="primary" @click="addRowClick">新增</el-button>
         </template>
         </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>
+        <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" />
         <template #action>
         <template #action>
             <hc-pages :pages="searchForm" @change="pageChange" />
             <hc-pages :pages="searchForm" @change="pageChange" />
         </template>
         </template>
         <!-- 新增/修改 -->
         <!-- 新增/修改 -->
-        <HcPlanData v-model="isBudgetDataShow" :info="budgetRowData" @finish="getTableData" />
+        <HcPlanData v-model="isBudgetDataShow" @finish="getTableData" />
     </hc-card>
     </hc-card>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
 import { onActivated, ref } from 'vue'
 import { onActivated, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { useAppStore } from '~src/store'
-import { HcDelMsg } from 'hc-vue3-ui'
 import { getArrValue } from 'js-fast-way'
 import { getArrValue } from 'js-fast-way'
 import HcPlanData from './modules/plan-data.vue'
 import HcPlanData from './modules/plan-data.vue'
 import mainApi from '~api/funding/budget'
 import mainApi from '~api/funding/budget'
@@ -53,12 +47,11 @@ const pageChange = ({ current, size }) => {
 
 
 //表格数据
 //表格数据
 const tableData = ref([
 const tableData = ref([
-    { key1:'2023-11', key2: '2024-04' },
+    { key1:'2024年资金预算', key2: '2024' },
 ])
 ])
 const tableColumn = ref([
 const tableColumn = ref([
-    { key: 'key1', name: '开始时间' },
-    { key: 'key2', name: '结束时间' },
-    { key: 'action', name: '操作', width: 140, align: 'center' },
+    { key: 'key1', name: '期名称' },
+    { key: 'key2', name: '年份' },
 ])
 ])
 
 
 //获取表格数据
 //获取表格数据
@@ -74,31 +67,11 @@ const getTableData = async () => {
     searchForm.value.total = data['total'] || 0*/
     searchForm.value.total = data['total'] || 0*/
 }
 }
 
 
-//新增/修改弹窗
-const isBudgetDataShow = ref(false)
-const budgetRowData = ref({})
-
 //新增数据
 //新增数据
+const isBudgetDataShow = ref(false)
 const addRowClick = () => {
 const addRowClick = () => {
-    budgetRowData.value = {}
     isBudgetDataShow.value = true
     isBudgetDataShow.value = true
 }
 }
-
-//修改数据
-const editRowClick = (row) => {
-    budgetRowData.value = row
-    isBudgetDataShow.value = true
-}
-
-//删除数据
-const delRowClick = (row) => {
-    HcDelMsg(async (resolve) => {
-        console.log('删除中...')
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-        }, 3000)
-    })
-}
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">