From 83d251608828d17dbb9a8d480c13a1a7c0a20eb5 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Wed, 29 Apr 2026 16:20:18 +0800
Subject: [PATCH] 修改主页跳转

---
 src/views/build/conpanyFunctionConsult/environment/controlFactors/index.vue |   49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/src/views/build/conpanyFunctionConsult/environment/controlFactors/index.vue b/src/views/build/conpanyFunctionConsult/environment/controlFactors/index.vue
index 74c53dc..8df6b48 100644
--- a/src/views/build/conpanyFunctionConsult/environment/controlFactors/index.vue
+++ b/src/views/build/conpanyFunctionConsult/environment/controlFactors/index.vue
@@ -8,9 +8,10 @@
               plain
               icon="Plus"
               @click="openDialog('add',{})"
+              v-hasPermi="['controlFactors:list:add']"
           >新增</el-button>
         </el-form-item>
-        <el-form-item label="企业名称:" v-if="data.isAdmin" style="margin-left: 20px">
+        <el-form-item label="单位名称:" v-if="data.isAdmin" style="margin-left: 20px">
           <el-select v-model="data.queryParams.companyId" placeholder="请选择" filterable clearable>
             <el-option
                 v-for="item in data.companyList"
@@ -21,23 +22,28 @@
           </el-select>
         </el-form-item>
         <el-form-item label="年份:" style="margin-left: 20px">
-          <el-select
+          <el-date-picker
               v-model="data.queryParams.year"
-              placeholder="请选择年份"
-              style="width: 240px"
-              filterable
-              allow-create
-              default-first-option
-              :reserve-keyword="false"
-              @change="handleChangeNum"
-          >
-            <el-option
-                v-for="item in data.yearList"
-                :key="item.value"
-                :label="item.label"
-                :value="item.label"
-            />
-          </el-select>
+              type="year"
+              value-format="YYYY"
+          />
+<!--          <el-select-->
+<!--              v-model="data.queryParams.year"-->
+<!--              placeholder="请选择年份"-->
+<!--              style="width: 240px"-->
+<!--              filterable-->
+<!--              allow-create-->
+<!--              default-first-option-->
+<!--              :reserve-keyword="false"-->
+<!--              @change="handleChangeNum"-->
+<!--          >-->
+<!--            <el-option-->
+<!--                v-for="item in data.yearList"-->
+<!--                :key="item.value"-->
+<!--                :label="item.label"-->
+<!--                :value="item.label"-->
+<!--            />-->
+<!--          </el-select>-->
         </el-form-item>
         <el-form-item>
           <el-button type="primary" style="margin-left: 30px" @click="searchClick">查询</el-button>
@@ -65,8 +71,8 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
         <template #default="scope">
           <el-button link type="primary"  @click="openDialog('review',scope.row)" >查看</el-button>
-          <el-button link type="primary"  @click="openDialog('edit',scope.row)" >编辑</el-button>
-          <el-button link type="danger"  @click="handleDelete(scope.row)" >删除</el-button>
+          <el-button link type="primary"  @click="openDialog('edit',scope.row)" v-hasPermi="['controlFactors:list:edit']">编辑</el-button>
+          <el-button link type="danger"  @click="handleDelete(scope.row)" v-hasPermi="['controlFactors:list:del']">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -149,11 +155,15 @@
   }else {
     data.queryParams.companyId = userInfo.companyId
   }
+  getNowYear()
   getList();
   if(data.isAdmin){
     getCompanyList()
   }
 });
+const getNowYear = () =>{
+  data.queryParams.year = new Date().getFullYear().toString()
+}
 const getList = async () => {
   loading.value = true;
   const res = await getControl(data.queryParams);
@@ -230,6 +240,7 @@
       type: ''
     }
   }
+  getNowYear()
   getList();
 
 }

--
Gitblit v1.9.2