Browse Source

班组出勤统计。

jxq 1 month ago
parent
commit
f0496dbe96
1 changed files with 29 additions and 8 deletions
  1. 29 8
      src/views/plan/attendanceStatistics/index.vue

+ 29 - 8
src/views/plan/attendanceStatistics/index.vue

@@ -21,19 +21,19 @@
   </div>
   </div>
 </template>
 </template>
 <script setup lang="ts">
 <script setup lang="ts">
-import {ref, getCurrentInstance} from "vue";
-import {useCrud} from "@/hooks/userCrud";
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
 
 
 // 传入一个url,后面不带/
 // 传入一个url,后面不带/
-const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
   useCrud({
     src: "/api/v1/attendanceStatistics",
     src: "/api/v1/attendanceStatistics",
   });
   });
-const {dataList, createRow, updateRow, deleteRow, searchChange, resetChange} =
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
   Methords; //增删改查
   Methords; //增删改查
-const {selectionChange, multipleDelete} = Methords; //选中和批量删除事件
-const {checkBtnPerm, downloadTemplate, exportData} = Utils; //按钮权限等工具
-const deptTypes = ref([])
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+const deptTypes = ref([]);
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 
 onMounted(() => {
 onMounted(() => {
@@ -67,12 +67,30 @@ option.value = Object.assign(option.value, {
   border: true,
   border: true,
   index: true,
   index: true,
   delBtn: true,
   delBtn: true,
-  addBtn: false,
+  addBtn: true,
   viewBtn: false,
   viewBtn: false,
   editBtn: false,
   editBtn: false,
   rowKey: "id",
   rowKey: "id",
   column: [
   column: [
     {
     {
+      label: "择班组信息",
+      prop: "toSelect",
+      hide: true,
+      type: "tree",
+      dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/orgTree",
+      // dicMethod: "post",
+      span: 24,
+      props: {
+        label: "deptName", // 下拉菜单显示的字段
+        value: "deptCode", // 下拉菜单值的字段
+      },
+      change: (row) => {
+        if (row && row.item) {
+          form.value.deptName = row.item.deptName;
+        }
+      },
+    },
+    {
       label: "班组名称",
       label: "班组名称",
       prop: "deptName",
       prop: "deptName",
       search: true,
       search: true,
@@ -132,6 +150,9 @@ option.value = Object.assign(option.value, {
           trigger: "trigger",
           trigger: "trigger",
         },
         },
       ],
       ],
+      blur: (row) => {
+        form.value.attendanceRate = "改这个地方";
+      },
     },
     },
     {
     {
       label: "出勤率",
       label: "出勤率",