From 1a8882edce6d4c4c83163915fed6a48c48e6898b Mon Sep 17 00:00:00 2001
From: lSun <15893999301@qq.com>
Date: Wed, 4 Dec 2024 18:27:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=89=93=E5=8D=A1?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/process/evection/index.vue | 2 +-
src/views/process/leaveReporting/index.vue | 2 +-
src/views/process/orgApply/index.vue | 87 +++++++++++++------
src/views/process/orgExam/index.vue | 50 ++---------
src/views/process/wechatEvection/index.vue | 11 +--
.../process/wechatLeaveReporting/index.vue | 10 +--
6 files changed, 78 insertions(+), 84 deletions(-)
diff --git a/src/views/process/evection/index.vue b/src/views/process/evection/index.vue
index c4ee568..5e70436 100644
--- a/src/views/process/evection/index.vue
+++ b/src/views/process/evection/index.vue
@@ -76,7 +76,7 @@
-
diff --git a/src/views/process/leaveReporting/index.vue b/src/views/process/leaveReporting/index.vue
index 0327c0a..9c98636 100644
--- a/src/views/process/leaveReporting/index.vue
+++ b/src/views/process/leaveReporting/index.vue
@@ -76,7 +76,7 @@
-
diff --git a/src/views/process/orgApply/index.vue b/src/views/process/orgApply/index.vue
index 8ef9694..996b523 100644
--- a/src/views/process/orgApply/index.vue
+++ b/src/views/process/orgApply/index.vue
@@ -131,7 +131,7 @@
-
+
@@ -152,20 +152,13 @@
-
-
-
+
-
+
-
+
@@ -203,7 +196,8 @@
+ placeholder="变更生效日期"
+ :picker-options="pickerOptions">
@@ -211,7 +205,7 @@
-
+
@@ -219,7 +213,7 @@
-
+
@@ -237,9 +231,12 @@
listOrg, getOrg, delOrg, addOrg, updateOrg, changeOrgStatus, exportOrg, getPostName,
getAttGroupList,
} from "@/api/process/orgApply";
+ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+ import {listDept} from "@/api/system/dept";
export default {
name: "OrgApply",
+ components: { Treeselect },
data() {
return {
//申请人
@@ -306,19 +303,22 @@
isChangeAttGroup:[
{ required: true, message: "是否考勤规则组变更不能为空", trigger: "blur" }
],
+ attGroupName:[
+ { required: true, message: "变更前规则组不能为空", trigger: "blur" }
+ ],
newAttGroup:[
{ required: true, message: "变更后规则组不能为空", trigger: "blur" }
]
},
- // 结束日期选择限制
- endPickerOptions: {
- disabledDate: (v) => {
- if(this.form.changeEffectiveDate) {
- return v.getTime() < new Date(this.form.changeEffectiveDate).getTime() - 86400000; // - 86400000是否包括当天
- }
- },
- },
+ // 部门树选项
+ deptOptions: [],
+ pickerOptions: {
+ disabledDate(time) {
+ // 返回 true 表示禁用这个日期
+ return time.getTime() < Date.now() - 86400000; // 禁用今天之前的所有日期
+ }
+ }
};
},
created() {
@@ -401,25 +401,33 @@
getPostName(Id).then(response => {
this.form.postName = response.data.postName;
//变更前部门
+ console.log(this.$store.state.user.attGroupId)
+ console.log(this.$store.state.user.attGroupName)
this.form.attGroupId = this.$store.state.user.attGroupId;
this.form.attGroupName = this.$store.state.user.attGroupName;
- this.open = true;
- this.isView = false;
- this.title = "新增";
+ console.log(this.form.attGroupName)
+ listDept().then(response => {
+ this.deptOptions = this.handleTree(response.data, "id");
+ this.open = true;
+ this.isView = false;
+ this.title = "新增";
+ });
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const Id = row.id
+ listDept().then(response => {
+ this.deptOptions = this.handleTree(response.data, "id");
+ });
getOrg(Id).then(orgResponse => {
-
// 更新表单的 org 信息
this.form ={
...orgResponse.data,
newAttGroup:orgResponse.data.newAttGroup?Number(orgResponse.data.newAttGroup):""
};
- this.form.attGroupName = orgResponse.data.oldOrgName;
+ this.form.attGroupName = orgResponse.data.oldAttGroupName;
// 更新视图状态
this.open = true;
this.isView = false;
@@ -429,17 +437,21 @@
handleView(row) {
this.reset();
const Id = row.id
+ listDept().then(response => {
+ this.deptOptions = this.handleTree(response.data, "id");
+ });
getOrg(Id).then(orgResponse => {
// 更新表单的 org 信息
this.form ={
...orgResponse.data,
newAttGroup:orgResponse.data.newAttGroup?Number(orgResponse.data.newAttGroup):""
};
- this.form.attGroupName = orgResponse.data.oldOrgName;
+ this.form.attGroupName = orgResponse.data.oldAttGroupName;
// 更新视图状态
this.open = true;
this.isView = true;
this.title = "查看";
+
});
},
//选择部门
@@ -507,6 +519,25 @@
})
},
+ /** 转换部门数据结构 */
+ normalizer(node) {
+ if (node.children && !node.children.length) {
+ delete node.children;
+ }
+ return {
+ id: node.id,
+ label: node.orgName,
+ children: node.children
+ };
+ },
+
}
};
+
+
diff --git a/src/views/process/orgExam/index.vue b/src/views/process/orgExam/index.vue
index 55cfd4d..fc06931 100644
--- a/src/views/process/orgExam/index.vue
+++ b/src/views/process/orgExam/index.vue
@@ -36,17 +36,6 @@
-
- 新增
-
-
-
+
-
-
-
+
@@ -141,20 +123,13 @@
-
-
-
+
-
+
-
+
-
-
-
+
@@ -190,7 +158,7 @@
@@ -200,7 +168,7 @@
-
+
@@ -208,7 +176,7 @@
-
+
diff --git a/src/views/process/wechatEvection/index.vue b/src/views/process/wechatEvection/index.vue
index ef0d731..a784f20 100644
--- a/src/views/process/wechatEvection/index.vue
+++ b/src/views/process/wechatEvection/index.vue
@@ -16,11 +16,6 @@
搜索
重置
-
-
-
-
-
导出
-
+
+
+
@@ -61,7 +58,7 @@
-
diff --git a/src/views/process/wechatLeaveReporting/index.vue b/src/views/process/wechatLeaveReporting/index.vue
index 8170c5a..9c7b6e1 100644
--- a/src/views/process/wechatLeaveReporting/index.vue
+++ b/src/views/process/wechatLeaveReporting/index.vue
@@ -16,11 +16,7 @@
搜索
重置
-
-
-
-
导出
-
+
+
+
@@ -61,7 +59,7 @@
-