yuan
5 天以前 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a
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="操作"
@@ -147,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,
@@ -181,8 +158,8 @@
  // 查询表单
  const searchForm = reactive({
    sysDeptId: "",
    shift: "",
    countId: "",
    locationName: "",
  });
  // 部门选项
@@ -255,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();
  };
  // 分页变更
@@ -278,9 +249,8 @@
  // 重置搜索
  const resetSearch = () => {
    searchForm.sysDeptId = "";
    searchForm.shift = "";
    page.current = 1;
    searchForm.countId = "";
    searchForm.locationName = "";
    fetchData();
  };