From 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 15:07:02 +0800
Subject: [PATCH] fix: 用河南鹤壁代码覆盖山西长治

---
 src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue |   93 ++++++++++++----------------------------------
 1 files changed, 24 insertions(+), 69 deletions(-)

diff --git a/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue b/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue
index 9658b1f..c47dd2e 100644
--- a/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue
+++ b/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue
@@ -13,37 +13,30 @@
         </el-button>
       </div>
     </div>
-    <el-form :model="searchForm"
+    <!-- 鏌ヨ鏉′欢 -->
+    <!-- <el-form :model="searchForm"
              :inline="true"
              class="search-form mb16">
       <el-form-item label="閮ㄩ棬锛�"
-                    prop="sysDeptId">
-        <el-tree-select v-model="searchForm.sysDeptId"
+                    prop="countId">
+        <el-tree-select v-model="searchForm.countId"
                         :data="deptOptions"
                         :props="{ value: 'id', label: 'label', children: 'children' }"
                         value-key="id"
                         placeholder="璇烽�夋嫨閮ㄩ棬"
                         check-strictly
-                        clearable
                         style="width: 200px" />
       </el-form-item>
-      <el-form-item label="鐝锛�"
-                    prop="shift">
-        <el-select v-model="searchForm.shift"
-                   placeholder="璇烽�夋嫨鐝"
-                   clearable
-                   style="width: 200px">
-          <el-option
-              v-for="item in shifts_list"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-          />
-        </el-select>
+      <el-form-item label="鍦扮偣锛�"
+                    prop="locationName">
+        <el-input v-model="searchForm.locationName"
+                  placeholder="璇疯緭鍏ュ湴鐐瑰悕绉�"
+                  clearable
+                  style="width: 200px" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary"
-                   @click="handleSearch">
+                   @click="fetchData">
           <el-icon>
             <Search />
           </el-icon>
@@ -56,7 +49,7 @@
           閲嶇疆
         </el-button>
       </el-form-item>
-    </el-form>
+    </el-form> -->
     <!-- 鐝鍒楄〃 -->
     <el-card shadow="never"
              class="mb16">
@@ -81,39 +74,23 @@
           </template>
         </el-table-column>
         <el-table-column prop="locationName"
-                         label="鍦扮偣鍚嶇О">
-          <template #default="scope">
-            {{ scope.row.locationName || "-" }}
-          </template>
-        </el-table-column>
+                         label="鍦扮偣鍚嶇О" />
         <el-table-column prop="longitude"
-                         label="缁忓害">
-          <template #default="scope">
-            {{ scope.row.longitude ?? "-" }}
-          </template>
-        </el-table-column>
+                         label="缁忓害" />
         <el-table-column prop="latitude"
-                         label="绾害">
-          <template #default="scope">
-            {{ scope.row.latitude ?? "-" }}
-          </template>
-        </el-table-column>
+                         label="绾害" />
         <el-table-column prop="radius"
-                         label="鎵撳崱鑼冨洿(m)">
-          <template #default="scope">
-            {{ scope.row.radius ?? "-" }}
-          </template>
-        </el-table-column>
+                         label="鎵撳崱鑼冨洿(m)" />
         <el-table-column prop="startAt"
                          label="涓婄彮鏃堕棿">
           <template #default="scope">
-            {{ scope.row.startAt || "-" }}
+            {{ scope.row.startAt }}
           </template>
         </el-table-column>
         <el-table-column prop="endAt"
                          label="涓嬬彮鏃堕棿">
           <template #default="scope">
-            {{ scope.row.endAt || "-" }}
+            {{ scope.row.endAt }}
           </template>
         </el-table-column>
         <el-table-column label="鎿嶄綔"
@@ -123,11 +100,9 @@
           <template #default="scope">
             <el-button type="primary"
                        link
-                       :disabled="isRuleLocked(scope.row)"
                        @click="openForm('edit', scope.row)">缂栬緫</el-button>
             <el-button type="danger"
                        link
-                       :disabled="isRuleLocked(scope.row)"
                        @click="handleDelete(scope.row.id)">鍒犻櫎</el-button>
           </template>
         </el-table-column>
@@ -149,7 +124,7 @@
 </template>
 
 <script setup>
-  import { ref, reactive, onMounted, getCurrentInstance } from "vue";
+  import { ref, reactive, onMounted } from "vue";
   import { ElMessage, ElMessageBox } from "element-plus";
   import {
     Plus,
@@ -183,8 +158,8 @@
 
   // 鏌ヨ琛ㄥ崟
   const searchForm = reactive({
-    sysDeptId: "",
-    shift: "",
+    countId: "",
+    locationName: "",
   });
 
   // 閮ㄩ棬閫夐」
@@ -212,10 +187,6 @@
     if (!value) return "";
     const shift = shifts_list.value.find(item => item.value === value);
     return shift ? shift.label : value;
-  };
-
-  const isRuleLocked = row => {
-    return Boolean(row?.usageLocked || row?.canEdit === false || row?.canDelete === false);
   };
 
   // 鑾峰彇閮ㄩ棬鍒楄〃
@@ -261,18 +232,12 @@
     tableLoading.value = true;
     getAttendanceRules({ ...page, ...searchForm })
       .then(res => {
-        const records = Array.isArray(res?.data?.records) ? res.data.records : [];
-        tableData.value = records.filter(r => String(r?.id) !== "999");
+        tableData.value = res.data.records;
         page.total = res.data.total;
       })
       .finally(() => {
         tableLoading.value = false;
       });
-  };
-
-  const handleSearch = () => {
-    page.current = 1;
-    fetchData();
   };
 
   // 鍒嗛〉鍙樻洿
@@ -284,18 +249,13 @@
 
   // 閲嶇疆鎼滅储
   const resetSearch = () => {
-    searchForm.sysDeptId = "";
-    searchForm.shift = "";
-    page.current = 1;
+    searchForm.countId = "";
+    searchForm.locationName = "";
     fetchData();
   };
 
   // 鎵撳紑琛ㄥ崟
   const openForm = (type, row = {}) => {
-    if (type === "edit" && isRuleLocked(row)) {
-      ElMessage.warning("璇ョ彮娆¢厤缃凡琚帓鐝苟浜х敓鎵撳崱璁板綍锛屼笉鑳界紪杈�");
-      return;
-    }
     operationType.value = type;
     currentRow.value = row;
     dialogVisible.value = true;
@@ -303,11 +263,6 @@
 
   // 鍒犻櫎鐝
   const handleDelete = id => {
-    const row = tableData.value.find(item => String(item.id) === String(id));
-    if (isRuleLocked(row)) {
-      ElMessage.warning("瀛樺湪宸叉帓鐝笖宸叉湁鎵撳崱璁板綍鐨勭彮娆¢厤缃紝涓嶈兘鍒犻櫎");
-      return;
-    }
     ElMessageBox.confirm("纭畾瑕佸垹闄よ繖鏉$彮娆″悧锛�", "鍒犻櫎纭", {
       confirmButtonText: "纭畾",
       cancelButtonText: "鍙栨秷",

--
Gitblit v1.9.3