duy 1 年之前
父节点
当前提交
b6c277c6b0
共有 2 个文件被更改,包括 100 次插入34 次删除
  1. 43 0
      src/api/modules/agree/land.js
  2. 57 34
      src/views/agree/land/land.vue

+ 43 - 0
src/api/modules/agree/land.js

@@ -0,0 +1,43 @@
+import { httpApi } from '../../request/httpApi'
+export default {
+        //获取补偿协议表单
+        async getPage(form, msg = true) {
+            return httpApi({
+                url: '/api/blade-land/compensationInfo/getTables',
+                method: 'get',
+                params: form,
+            }, msg)
+        },
+        // 填报页面数据保存
+        async saveBussData(form, msg = true) {
+            return httpApi({
+                url: '/api/blade-land/compensationInfo/save_buss_data',
+                method: 'post',
+                data: form,
+            }, msg)
+        },
+        //协议表单-生成html
+        async getExcelHtml(form, msg = true) {
+            return httpApi({
+                url: '/api/blade-land/compensationInfo/get-excel-html_buss',
+                method: 'get',
+                params: form,
+            }, msg)
+        },
+        //协议表单-获取用户保存数据
+        async getBussInfo(form, msg = true) {
+            return httpApi({
+                url: '/api/blade-land/compensationInfo/get-buss-dataInfo',
+                method: 'get',
+                params: form,
+            }, msg)
+        },
+        //协议表单-获取坐标位置
+        async getBussCols(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-land/compensationInfo/get-html-buss-cols',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+}

+ 57 - 34
src/views/agree/land/land.vue

@@ -3,75 +3,85 @@
         <template #left>
             <div class="hc-layout-tree-box">
                 <el-scrollbar>
-                    <HcTreeData @nodeTap="treeNodeTap"/>
+                    <HcTreeData @nodeTap="treeNodeTap" />
                 </el-scrollbar>
             </div>
         </template>
         <HcCard>
             <template #header>
                 <div class="w-52">
-                    <el-input v-model="searchForm.queryValue" clearable placeholder="请输入名称进行查询" size="large"/>
+                    <el-input v-model="searchForm.queryValue" clearable placeholder="请输入名称进行查询" size="large" />
                 </div>
                 <div class="ml-4">
-                    <el-button type="primary" @click="searchClick" size="large">
-                        <HcIcon name="search-2"/>
+                    <el-button type="primary" size="large" @click="searchClick">
+                        <HcIcon name="search-2" />
                         <span>搜索</span>
                     </el-button>
                 </div>
             </template>
             <template #extra>
                 <el-button size="large" type="primary" hc-btn @click="addRowClick">
-                    <HcIcon name="add"/>
+                    <HcIcon name="add" />
                     <span>新增</span>
                 </el-button>
                 <el-button size="large" type="warning" hc-btn>
-                    <HcIcon name="add"/>
+                    <HcIcon name="add" />
                     <span>打印</span>
                 </el-button>
                 <el-button size="large" type="danger" hc-btn>
-                    <HcIcon name="delete-bin"/>
+                    <HcIcon name="delete-bin" />
                     <span>删除</span>
                 </el-button>
             </template>
-            <HcTable :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelectionChange">
-                <template #action="{row,index}">
-                    <el-button size="small" type="primary" @click="editRowClick(row)">修改</el-button>
-                    <el-button size="small" type="warning">查看</el-button>
-                    <el-button size="small" type="danger">删除</el-button>
+            <HcTable :column="tableColumn" :datas="tableData" :loading="tableLoading" is-check @selection-change="tableSelectionChange">
+                <template #action="{ row, index }">
+                    <el-button size="small" type="primary" @click="editRowClick(row)">
+                        修改
+                    </el-button>
+                    <el-button size="small" type="warning">
+                        查看
+                    </el-button>
+                    <el-button size="small" type="danger">
+                        删除
+                    </el-button>
                 </template>
             </HcTable>
             <template #action>
-                <HcPages :pages="searchForm" @change="pageChange"/>
+                <HcPages :pages="searchForm" @change="pageChange" />
             </template>
         </HcCard>
     </HcPageLayout>
 </template>
 
 <script setup>
-import {ref} from "vue";
-import {useRouter} from 'vue-router'
-
+import { ref } from 'vue'
+import { useRouter } from 'vue-router'
+import landApi from '~api/agree/land.js'
+import { useAppStore } from '~src/store'
+import { getArrValue } from 'js-fast-way'
+const useAppState = useAppStore()
+const projectId = ref(useAppState.getProjectId)
 const router = useRouter()
 
 //树节点被点击
-const treeNodeTap = ({node, data}) => {
+const treeNodeTap = ({ node, data }) => {
 
 }
 
 //搜索表单
 const searchForm = ref({
     projectType: null, queryValue: null, startTime: null, endTime: null,
-    current: 1, size: 20, total: 0
+    current: 1, size: 20, total: 0,
 })
 
 //搜索
 const searchClick = () => {
-    searchForm.value.current = 1;
+    searchForm.value.current = 1
     getTableData()
 }
 
 //分页被点击
-const pageChange = ({current, size}) => {
+const pageChange = ({ current, size }) => {
     searchForm.value.current = current
     searchForm.value.size = size
     getTableData()
@@ -80,21 +90,34 @@ const pageChange = ({current, size}) => {
 //获取数据
 const tableLoading = ref(false)
 const tableColumn = [
-    {key: 'key1', name: '协议编号'},
-    {key: 'key2', name: '协议书名称'},
-    {key: 'key3', name: '地类补偿金额'},
-    {key: 'key4', name: '青苗及附着物补偿金额'},
-    {key: 'key5', name: '补偿总金额'},
-    {key: 'action', name: '操作', width: '190', align: 'center'},
+    { key: 'key1', name: '协议编号' },
+    { key: 'key2', name: '协议书名称' },
+    { key: 'key3', name: '地类补偿金额' },
+    { key: 'key4', name: '青苗及附着物补偿金额' },
+    { key: 'key5', name: '补偿总金额' },
+    { key: 'action', name: '操作', width: '190', align: 'center' },
 ]
 const tableData = ref([
-    {id: 1, key1: 'xxxx', key2: 'xxxx', key3: '65632'},
-    {id: 2, key1: 'xxxx', key2: 'xxxx', key3: '65632'},
-    {id: 3, key1: 'xxxx', key2: 'xxxx', key3: '65632'},
-    {id: 4, key1: 'xxxx', key2: 'xxxx', key3: '65632'},
+    { id: 1, key1: 'xxxx', key2: 'xxxx', key3: '65632' },
+    { id: 2, key1: 'xxxx', key2: 'xxxx', key3: '65632' },
+    { id: 3, key1: 'xxxx', key2: 'xxxx', key3: '65632' },
+    { id: 4, key1: 'xxxx', key2: 'xxxx', key3: '65632' },
 ])
-const getTableData = () => {
-
+const getTableData = async () => {
+    // tableLoading.value = true
+    // const { error, code, data } = await landApi.getPage({
+    //     ...searchForm.value,
+    //     projectId: projectId.value,
+    //     type:1,
+    // })
+    // tableLoading.value = false
+    // if (!error && code === 200) {
+    //     tableData.value = getArrValue(data['records'])
+    //     searchForm.value.total = data['total'] || 0
+    // } else {
+    //     tableData.value = []
+    //     searchForm.value.total = 0
+    // }
 }
 
 //多选事件
@@ -105,14 +128,14 @@ const tableSelectionChange = (rows) => {
 //新增
 const addRowClick = () => {
     router.push({
-        name: 'lar-agree-land-form'
+        name: 'lar-agree-land-form',
     })
 }
 
 //编辑
 const editRowClick = (row) => {
     router.push({
-        name: 'lar-agree-land-form'
+        name: 'lar-agree-land-form',
     })
 }
 </script>