Browse Source

水稻补贴合并之后

twl 1 year ago
parent
commit
ab5709e7d8

+ 1 - 0
.env.development

@@ -9,3 +9,4 @@ VITE_APP_BASE_ADDR = 'http://10.108.3.5:8080'
 
 VITE_APP_MAP_SERVICE = 'http://10.108.3.5'
 VITE_APP_MAP_SERVICE2 = 'http://101.132.114.72:8080'
+VITE_APP_MAP_RICE_MB = 'http://10.108.3.5:8080/res/muban.xlsx'

+ 1 - 0
.env.production

@@ -10,3 +10,4 @@ VITE_APP_BASE_ADDR = 'http://10.244.107.145:8081'
 
 VITE_APP_MAP_SERVICE = 'http://10.244.107.145:8083'
 VITE_APP_MAP_SERVICE2 = 'http://10.244.107.145:8081'
+VITE_APP_MAP_RICE_MB = 'http://10.244.107.145:8081/fujian/res/muban.xlsx'

+ 1 - 0
.env.test

@@ -10,3 +10,4 @@ VITE_APP_BASE_ADDR = 'http://10.108.3.5:8080'
 VITE_APP_MAP_SERVICE = 'http://10.108.3.5'
 
 VITE_APP_MAP_SERVICE2 = 'http://101.132.114.72:8080'
+VITE_APP_MAP_RICE_MB = 'http://10.108.3.5:8080/res/muban.xlsx'

+ 63 - 2
src/api/riceSubsidies.js

@@ -1,11 +1,12 @@
 import request, {setConfigInstance} from "./index";
 /* *********补贴情况上传********** */
 // 列表
-export function GetBtqkList(pageNum, pageSize) {
+export function GetBtqkList(params) {
   return request({
     url: '/sdbt/list',
     params: {
-      pageNum, pageSize
+      ...params
+
     },
     method: "get"
   })
@@ -80,3 +81,63 @@ export function getBtMjSdReport() {
 
   })
 }
+export function getRiceSlideAllYear(){
+  return  setConfigInstance({
+    method:'get'
+  })({
+    url:'/sdbtnf/list'
+  })
+}
+export function getBtMjSdReportFile2(btnfid,btlx='水稻') {
+
+  return setConfigInstance({
+    method:'get'
+  })({
+    url:`/sdbt/export`,
+    params:{
+      btnfid,
+      btlx
+    }
+  })
+}
+export function getBtMjSdReportFile(btnfid) {
+
+  return setConfigInstance({
+    method:'get'
+  })({
+    url:`/sdbt/export2`,
+    params:{
+      btnfid,
+      // btlx
+    }
+  })
+}
+export function editYearInfo(nfid,nf,active = true){
+  return request({
+    method:'put',
+    url:`/sdbtnf/update/${nfid}`,
+    data:{
+      active:active,
+      nf:nf
+    }
+  })
+}
+export function addYearInfo(nf){
+  return request({
+    method:'post',
+    url:`/sdbtnf/create`,
+    data:{
+      active:false,
+      nf:nf
+    }
+  })
+}
+export function delYearInfo(nfids){
+  return setConfigInstance({
+
+  })({
+    method:'delete',
+    url:`/sdbtnf/delete/${nfids}`,
+
+  })
+}

+ 6 - 0
src/assets/styles/gobal.scss

@@ -215,3 +215,9 @@
 h8{
   display: block;
 }
+.inline-b{
+
+}
+.is-flex{
+  display: flex;
+}

+ 2 - 1
src/router/index.js

@@ -103,6 +103,7 @@ const staticRoutes = [
       {
         path: '/subsidyView',
         name: 'SubsidyView',
+        isProd: true,
         component: () => import('../views/sdbtmjsb/subsidyView/Index.vue'),
         meta: { menuId: '4-4' },
       },
@@ -259,7 +260,7 @@ router.beforeEach((to, from, next) => {
   let userToken = getCookie('cmnw_token')
   if (!userToken) {
     if (import.meta.env.VITE_APP_MODE === 'dev') {
-      Login('test1', '123').then(res => {    //开发环境获取token
+      Login('sdsc', '123').then(res => {    //开发环境获取token
         if (res.data) {
           setCookie('cmnw_token', res.data, 3)
           next()

+ 4 - 2
src/views/home/HomeView.vue

@@ -141,10 +141,12 @@ const menuList = ref([
     isProd: true,
     icon: getAssetsFile('home/menu-btmj.png'),
     children: [
-      { menuId: '4-1', name: '水稻补贴上传', route: 'SubsidyUpload',isProd: true, },
+      { menuId: '4-1', name: '水稻补贴上报', route: 'SubsidyUpload',isProd: true, },
+      { menuId: '4-4', name: '水稻补贴查看', route: 'SubsidyView',isProd: true,  },
+
       { menuId: '4-2', name: '水稻补贴汇总', route: 'SubsidySummary',isProd: true, },
       { menuId: '4-3', name: '水稻补贴分析', route: 'SubsidyAnalysis',isProd: true, },
-      { menuId: '4-4', name: '水稻补贴查看', route: 'SubsidyView' },
+
     ]
   },
   {

+ 13 - 8
src/views/sdbtmjsb/subsidyAnalysis/Index.vue

@@ -9,10 +9,10 @@
         <div class="ch-search">
           <el-input v-show="pageType==='jyzt'" v-model="formInline.sfzh" placeholder="请输入主体名称、身份证号或统一社会信用代码查询" clearable></el-input>
           <el-select v-show="pageType==='xz'" v-model="formInline.year_xz">
-            <el-option v-for="item in yearArr" :value="item" :label="item+'年'"></el-option>
+            <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />
           </el-select>
           <el-select v-show="pageType==='jyzt'" v-model="formInline.year_jyzt">
-            <el-option v-for="item in yearArr" :value="item" :label="item+'年'"></el-option>
+            <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />
           </el-select>
           <el-button type="primary" class="btn-default" @click="handleSearch">查询</el-button>
         </div>
@@ -89,16 +89,21 @@
 </template>
 
 <script setup>
-import { ref, reactive, watch, nextTick, computed } from 'vue'
+import {ref, reactive, watch, nextTick, computed, onMounted} from 'vue'
 import { subsidyTypeArr } from '@/utils/data/select-data'
-import {getSubsidiesHomeTableData, getBtfxByTown, GetBthzList} from "@/api/riceSubsidies";
+import {getSubsidiesHomeTableData, getBtfxByTown, GetBthzList, getRiceSlideAllYear} from "@/api/riceSubsidies";
 import { getRecentYears } from '@/utils/date'
 import { setDecimal } from '@/utils/math'
-
+const select_year = ref([])
 const subsidyTypeItems = computed(()=> {
   return [...subsidyTypeArr[0].options, ...subsidyTypeArr[1].options]
 })
-
+onMounted(() => {
+  getRiceSlideAllYear().then(res => {
+    select_year.value = res.data
+    console.log('飒飒撒',res.data)
+  })
+})
 const pageSize = ref(Number.MAX_SAFE_INTEGER)
 const tableTotal = ref(0)
 const currentPage = ref(1)
@@ -140,8 +145,8 @@ watch(pageType, (val) => {
 
 const formInline = reactive({
   sfzh: '',
-  year_xz: new Date().getFullYear(),
-  year_jyzt: new Date().getFullYear()
+  year_xz: '',
+  year_jyzt: ''
 })
 
 const yearArr = ref(getRecentYears(2020))

+ 41 - 11
src/views/sdbtmjsb/subsidySummary/Index.vue

@@ -21,8 +21,11 @@
             <el-option v-for="item in allVillageOptions" :label="item.label" :key="item.label"
               :value="item.label"></el-option>
           </el-select>
-          <el-date-picker v-model="formInline.btnf" value-format="YYYY" style="width: 15%;" type="year" placeholder="补贴年份"
-            clearable />
+          <el-select clearable v-model="formInline.btnfid" class="mr15" placeholder="补贴年份" size="large" style="width: 15%">
+            <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />
+          </el-select>
+<!--          <el-date-picker v-model="formInline.btnf" value-format="YYYY" style="width: 15%;" type="year" placeholder="补贴年份"-->
+<!--            clearable />-->
           <el-input v-model="formInline.sfzh" style="width: 29%;" placeholder="请输入主体名称、身份证号或统一社会信用代码查询"
             clearable></el-input>
         </div>
@@ -41,12 +44,12 @@
 
         <template v-if="subsidyType === 'sdbt'">
           <el-table-column :label="item.label" v-for="item in subsidyTypeArr[0].options">
-            <el-table-column label="补贴面积(亩)" :min-width="120 + item.label.length * 4" show-overflow-tooltip>
+            <el-table-column label="补贴面积(亩)" :min-width="120 + item.label?.length * 4" show-overflow-tooltip>
               <template #default="scope">
                 <span>{{ setDecimal(scope.row[item.label + '面积']) }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="补贴金额(万)" :min-width="120 + item.label.length * 4" show-overflow-tooltip>
+            <el-table-column label="补贴金额(万)" :min-width="120 + item.label?.length * 4" show-overflow-tooltip>
               <template #default="scope">
                 <span>{{ setDecimal(scope.row[item.label + '金额']) }}</span>
               </template>
@@ -55,12 +58,12 @@
         </template>
         <template v-if="subsidyType === 'lfsg'">
           <el-table-column :label="item.label" v-for="item in subsidyTypeArr[1].options">
-            <el-table-column label="补贴面积(亩)" :min-width="120 + item.label.length * 4" show-overflow-tooltip>
+            <el-table-column label="补贴面积(亩)" :min-width="120 + item.label?.length * 4" show-overflow-tooltip>
               <template #default="scope">
                 <span>{{ setDecimal(scope.row[item.label + '面积']) }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="补贴金额(万)" :min-width="120 + item.label.length * 4" show-overflow-tooltip>
+            <el-table-column label="补贴金额(万)" :min-width="120 + item.label?.length * 4" show-overflow-tooltip>
               <template #default="scope">
                 <span>{{ setDecimal(scope.row[item.label + '金额']) }}</span>
               </template>
@@ -76,10 +79,16 @@
 <script setup>
 import { ref, reactive, onMounted, onBeforeMount, computed } from 'vue'
 import { subsidyTypeArr } from '@/utils/data/select-data'
-import { GetBthzList, getBtMjSdReport } from "../../../api/riceSubsidies";
+import {
+  GetBthzList,
+  getBtMjSdReport,
+  getBtMjSdReportFile,
+  getBtMjSdReportFile2,
+  getRiceSlideAllYear
+} from "../../../api/riceSubsidies";
 import { GetTownVillageList } from "@/api/landTransfer";
 import { setDecimal } from '@/utils/math'
-
+const select_year= ref([])
 const pageSize = ref(Number.MAX_SAFE_INTEGER)
 // const pageSize = ref(20)
 const tableTotal = ref(0)
@@ -92,9 +101,26 @@ function pagi_changePage(page) {
   getList()
 }
 function exportM() {
-  getBtMjSdReport().then(res => {
-    window.open(res.data)
+
+  getBtMjSdReportFile2(formInline.value.btnf,subsidyType.value === 'lfsg'?'绿肥':'水稻').then(res => {
+    let isSuccess = false
+    try {
+       isSuccess  =res.code === 200
+    }catch {
+      isSuccess = false
+    }
+    if (!isSuccess){
+      showMessage({
+        type:'error',
+        message:res.msg || '操作失败'
+      })
+    }else {
+      window.open(res.data, "_blank")
+    }
   })
+  // getBtMjSdReport().then(res => {
+  //   window.open(res.data)
+  // })
 }
 function getAllVillage(e) {
   GetTownVillageList('2', e).then(res => {
@@ -111,6 +137,10 @@ function initSearch() {
   getList()
 }
 onMounted(() => {
+  getRiceSlideAllYear().then(res => {
+    select_year.value = res.data
+    console.log('飒飒撒',res.data)
+  })
   getList()
 })
 onBeforeMount(() => {
@@ -126,7 +156,7 @@ onBeforeMount(() => {
 
 function getList() {
   GetBthzList({ ...formInline.value, pageNum: currentPage.value, pageSize: pageSize.value }).then(res => {
-    tableData.value = res.data
+    tableData.value = res.data || []
     // tableTotal.value = res.data.length
     console.log(res)
 

+ 194 - 32
src/views/sdbtmjsb/subsidyUpload/Index.vue

@@ -2,24 +2,75 @@
   <div class="list-page">
     <main class="upload-box-background">
       <div class="box-background"></div>
-      <el-form class="upload-box" :model="form" label-position="left">
+      <el-form class="upload-box" :model="form" label-position="left" >
         <p class="upload-title">水稻补贴面积上报</p>
-        <el-form-item class="select-year">
-          <span class="mr15">年份:</span>
-          <el-select @change="change" v-model="form.region" placeholder="请选择年份">
-            <el-option v-for="item in select_year" :key="item.value" :label="item.label" :value="item.value" />
-          </el-select>
-        </el-form-item>
+        <div class="m-y">
+          <el-form-item class="select-year" >
+            <span class="m-t">{{ isShow ? '激活年份':'年份' }}</span>
+
+            <el-select style="width: 40%" clearable @change="change" v-model="form.year" placeholder="请选择年份">
+              <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />
+            </el-select>
+
+          </el-form-item>
+<!--          <el-form-item class="select-year" >-->
+<!--            <span class="m-t">编辑年份:</span>-->
+<!--            <el-select   @change="change" clearable class="mr15" style="width: 24%" v-model="form.editYearId" placeholder="请选择年份">-->
+<!--              <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />-->
+<!--            </el-select>-->
+<!--            <el-input placeholder="请输入年份"   style="width: 24%" v-model="form.editYearName"/>-->
+<!--            <el-button type="primary" class="bj-btn" @click="editYear">编辑</el-button>-->
 
-        <el-form-item v-show="isShow" class="isActivate">
-          <span class="mr15">是否激活:</span>
+<!--          </el-form-item>-->
+          <template v-if="isShow">
+            <el-form-item class="select-year" >
+              <span class="m-t" >新增年份:</span>
+              <el-input placeholder="请输入年份" class="mr15" clearable  style="width: 24%" v-model="form.addYearName"/>
+              <el-button type="primary" @click="addYear">新增</el-button>
+            </el-form-item>
+            <el-form-item class="select-year" >
+              <span class="m-t">删除年份:</span>
+              <el-select clearable class="mr15"  @change="change" style="width: 24%"  v-model="form.delYear" placeholder="请选择年份">
+                <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />
+              </el-select>
+              <el-button type="danger" @click="delYear">删除</el-button>
+            </el-form-item>
+          </template>
+
+
+        </div>
+
+
+        <el-form-item v-show="isShow && form.year" class="isActivate">
+          <span class="mr15" >是否激活:</span>
           <el-switch @change="changeStatus" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #aaa"
                      v-model="form.status" />
         </el-form-item>
         <div class="upload-view-box">
           <p v-show="!isShow" class="upload-view">
-            <el-upload ref="upload" :multiple="false" :limit="1" action="" :http-request="toUpload"
-                       :on-exceed="handleExceed" :show-file-list="false" class="my-el-upload">水稻补贴上传</el-upload>
+            <span v-if="!form.year || !form.status" @click="getF">水稻补贴上传</span>
+            <el-upload
+              v-else
+              ref="upload"
+              :multiple="false"
+              :limit="1"
+
+              action=""
+              :http-request="toUpload"
+
+              :on-exceed="handleExceed"
+              :show-file-list="false"
+
+              class="my-el-upload"
+            >
+              水稻补贴上传
+              <!--                <template v-for="file in fileList" >-->
+              <!--                  <span :key="file.name">{{ file.name }}</span>-->
+              <!--                </template>-->
+            </el-upload>
+
+            <!--            <el-upload ref="upload" :multiple="false" :limit="1" action="" :http-request="toUpload"-->
+<!--                       :on-exceed="handleExceed" :show-file-list="false" class="my-el-upload">水稻补贴上传</el-upload>-->
           </p>
           <p v-show="!isShow" class="upload-view">
             <router-link to="/subsidyView">水稻补贴查看</router-link>
@@ -38,12 +89,19 @@
 
 <script setup>
 import {ref, reactive, onMounted, computed} from 'vue'
-import { uploadSituationListData } from "../../../api/riceSubsidies";
-import { select_year } from '../../../utils/data/select-data'
+import {
+  addYearInfo, delYearInfo,
+  editYearInfo,
+  getBtMjSdReportFile,
+  getRiceSlideAllYear,
+  uploadSituationListData
+} from "../../../api/riceSubsidies";
+const select_year = ref([])
 
 // import { subsidyTypeArr } from '../../../utils/data/select-data'
 import { genFileId } from 'element-plus'
 import {getRootFun} from "@/utils/data/getRootFun";
+import {elAlert, handleMes, showMessage} from "@/utils/tip";
 
 const isShow = computed(() => {
   return getRootFun('水稻补贴年份新增')
@@ -51,21 +109,97 @@ const isShow = computed(() => {
 
 
 const form = reactive({
-  region: '',
+  year: '',
   status: false,//按钮状态
+  editYearName:'',
+  addYearName:'',
+  delYear:'',
+  editYearId:'',
 })
 // 下拉选项
 function change(e) {
-  console.log(e);
-  console.log(form.region);
+  form.status = Boolean(select_year.value.find(i => i.sdbtnfId ===form.year)?.active)
+  // console.log(e);
+  // console.log(form.year);
+}
+function editYear(status) {
+  // if (!form.editYearId){
+  //   elAlert('请选择要修改的年份')
+  // }else {
+  //   editYearInfo(form.editYearId,form.editYearName).then(res => {
+  //     handleMes(res,() => {
+  //       getAllYear()
+  //     })
+  //   })
+  // }
+  editYearInfo(form.year,select_year.value.find(i => i.sdbtnfId === form.year)?.nf,status).then(res => {
+    handleMes(res,() => {
+      getAllYear()
+    })
+  })
 }
+function addYear() {
+  addYearInfo(form.addYearName).then(res => {
+    handleMes(res,() => {
+      getAllYear()
+    },()=>{},'新增成功','新增失败')
+  })
+}
+function delYear() {
+  if (!form.delYear){
+    elAlert('请选择要删除的年份')
+  }else {
+    delYearInfo(form.delYear).then(res => {
+      handleMes(res,() => {
+        form.delYear = ''
+        form.editYearId = ''
+        form.year = ''
+        getAllYear()
+      })
+    })
+  }
 
+}
+function getF(){
+  if (!form.status){
+    elAlert('请先激活')
+  }
+  else if (!form.year){
+    elAlert('请选择激活年份')
+    return false
+  } else {
+
+  }
+}
+function getAllYear(){
+  getRiceSlideAllYear().then(res => {
+    select_year.value = res.data
+    console.log('飒飒撒',res.data)
+  })
+}
 onMounted(() => {
+  getAllYear()
 })
 
 //上传模板下载
 function getTemplate() {
-  window.open(import.meta.env.VITE_APP_BASE_ADDR + '/res/muban.xlsx', "_blank")
+  // getBtMjSdReportFile(form.year).then(res => {
+  //   let isSuccess = false
+  //   try {
+  //      isSuccess  =res.code === 200
+  //   }catch {
+  //     isSuccess = false
+  //   }
+  //   if (!isSuccess){
+  //     showMessage({
+  //       type:'error',
+  //       message:res.msg || '操作失败'
+  //     })
+  //   }else {
+  //     window.open(res.data, "_blank")
+  //   }
+  // })
+  window.open(import.meta.env.VITE_APP_MAP_RICE_MB, "_blank")
 }
 
 //补贴上传
@@ -81,29 +215,48 @@ function handleExceed(files) {
 }
 
 
-function toUpload(e, el) {
-  console.log('s', e.file, el)
-  uploadSituationListData(e.file).then(res => {
-    getList()
-  })
-}
+// function toUpload(e, el) {
+//   console.log('s', e.file, el)
+//   uploadSituationListData(e.file).then(res => {
+//     getList()
+//   })
+// }
+function toUpload(e,el) {
+
+    console.log('s',e.file,el)
+    uploadSituationListData(e.file,form.year).then(res => {
+      handleMes(res,() => {
 
+      })
+
+    })
+
+
+}
 //开关状态
 function changeStatus(status) {
-  if (status === true) {
+  editYear(status)
+/*  if (status === true) {
     // 镇级可上传
     console.log(1)
   } else {
     //镇级不可上传
     console.log(2)
 
-  }
+  }*/
 
 }
 
 
 </script>
 <style scoped lang="scss">
+.m-t{
+  width: 6em;
+}
+.bj-btn{
+  position: relative;
+  left: 15px;
+}
 .upload-box-background {
   width: 100%;
   height: 100%;
@@ -132,6 +285,7 @@ function changeStatus(status) {
   transform: translate(-50%, -50%);
 
   .upload-title {
+
     font-size: 48px;
     font-family: YSBTH;
     font-weight: 400;
@@ -139,14 +293,21 @@ function changeStatus(status) {
     color: #404040;
     position: absolute;
     left: 136px;
-    top: 116px;
+    top: 50px;
   }
+  .m-y{
+    padding-left: 8%;
+    position: absolute;
 
+    left: 0;
+    width: max-content;
+    right: 0;
+    margin: auto;
+    top: 130px;
+  }
   .select-year {
     color: #404040;
-    position: absolute;
-    left: 136px;
-    top: 208px;
+
 
     span {
       font-size: 18px;
@@ -156,8 +317,8 @@ function changeStatus(status) {
   .isActivate {
     color: #404040;
     position: absolute;
-    left: 136px;
-    top: 290px;
+    left: 435px;
+    top: 131px;
 
     span {
       font-size: 18px;
@@ -165,12 +326,13 @@ function changeStatus(status) {
   }
 
   .upload-view-box {
-    margin-top: 372px;
+    margin-top: 400px;
     display: flex;
     justify-content: space-evenly;
     align-items: center;
 
     .upload-view {
+      cursor: pointer;
       font-size: 24px;
       font-family: Microsoft YaHei UI;
       font-weight: 400;

+ 32 - 21
src/views/sdbtmjsb/subsidyView/Index.vue

@@ -1,24 +1,27 @@
 <template>
   <div class="list-page">
     <header>
-      <div style="text-align: right;">
+      <div class="header-row">
+        <div>
+          <el-input v-model="formInline.ztmc" class="mr15" size="small" clearable placeholder="请输入主体名称"
+                    :suffix-icon="Search" style="width: 18%" />
+          <el-select clearable v-model="formInline.btnf" class="mr15" placeholder="补贴年份" size="large" style="width: 15%">
+            <el-option v-for="item in select_year" :key="item.sdbtnfId" :label="item.nf" :value="item.sdbtnfId" />
+          </el-select>
+          <el-select v-model="formInline.zhen" class="mr15" placeholder="镇" size="large" style="width: 15%" @change="getVillageList" clearable>
+            <el-option v-for="item in townList" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>
+          <el-select v-model="formInline.cun" class="mr15" placeholder="村" size="large" style="width: 15%">
+            <el-option v-for="item in villageList" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>
+        </div>
+        <div style="text-align: right;">
+
+          <el-button type="primary" class="btn-default" @click="getList">查询</el-button>
+          <!--        <el-button type="danger" class="btn-default" @click="screenDelete(true)" style="height: 30px">清空</el-button>-->
+
+        </div>
 
-        <el-button type="primary" class="btn-default">查询</el-button>
-<!--        <el-button type="danger" class="btn-default" @click="screenDelete(true)" style="height: 30px">清空</el-button>-->
-
-      </div>
-      <div>
-        <el-input v-model="formInline.ztmc" class="mr15" size="small" clearable placeholder="请输入主体名称"
-          :suffix-icon="Search" style="width: 18%" />
-        <el-select v-model="formInline.btnf" class="mr15" placeholder="补贴年份" size="large" style="width: 15%">
-          <el-option v-for="item in select_year" :key="item.value" :label="item.label" :value="item.value" />
-        </el-select>
-        <el-select v-model="formInline.zhen" class="mr15" placeholder="镇" size="large" style="width: 15%" @change="getVillageList" clearable>
-          <el-option v-for="item in townList" :key="item.value" :label="item.label" :value="item.value" />
-        </el-select>
-        <el-select v-model="formInline.cun" class="mr15" placeholder="村" size="large" style="width: 15%">
-          <el-option v-for="item in villageList" :key="item.value" :label="item.label" :value="item.value" />
-        </el-select>
       </div>
     </header>
     <main>
@@ -61,12 +64,12 @@
 import { handleMes, showConfirm, showMessage } from "@/utils/tip";
 import { ref, reactive, onMounted } from 'vue'
 import { useRouter } from "vue-router";
-import { delBtSituationListData, GetBtqkList } from "../../../api/riceSubsidies";
+import {delBtSituationListData, GetBtqkList, getRiceSlideAllYear} from "../../../api/riceSubsidies";
 // import { subsidyTypeArr } from '../../../utils/data/select-data'
 import { setDecimal } from '@/utils/math'
-import { select_year } from '../../../utils/data/select-data'
-import { GetTownVillageList } from "../../../api/landTransfer";
 
+import { GetTownVillageList } from "../../../api/landTransfer";
+const select_year = ref([])
 const router = useRouter()
 
 const pageSize = ref(10)
@@ -84,11 +87,19 @@ const formInline = reactive({
 })
 
 onMounted(() => {
+  getRiceSlideAllYear().then(res => {
+    select_year.value = res.data
+    console.log('飒飒撒',res.data)
+  })
   getList()
   getTownList()
 })
 function getList() {
-  GetBtqkList(currentPage.value, pageSize.value).then(res => {
+  GetBtqkList({
+    pageNum:currentPage.value, pageSize:pageSize.value,
+    btnf:formInline.btnf
+
+  }).then(res => {
     console.log(res);
     tableData.value = res.data.list
     tableTotal.value = res.data.total