From efbb633d10209ad0063e2897216596b8ae158844 Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Mon, 18 Nov 2024 13:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/process/workReport/index.vue | 29 ++++---------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/views/process/workReport/index.vue b/src/views/process/workReport/index.vue index 1828d74..7fbd146 100644 --- a/src/views/process/workReport/index.vue +++ b/src/views/process/workReport/index.vue @@ -378,7 +378,9 @@ export default { typeList:[{value:'1',label:'固定班制'},{value:'2',label:'自由工时'}], attDayList:[{id:0,label:'周一'},{id:1,label:'周二'},{id:2,label:'周三'},{id:3,label:'周四'},{id:4,label:'周五'},{id:5,label:'周六'},{id:6,label:'周日'}], // 表单参数 - form: {}, + form: { + userName: '' + }, // 表单校验 rules: { userName:[ @@ -563,7 +565,7 @@ export default { }, handleClick(type,row) { this.tableDialogList=[]; - this.userName=''; + this.form.userName = ''; // 处理点击事件 this.open = true; if (type==='轮休'){ @@ -641,29 +643,6 @@ export default { this.$set(this.form,"id",row.id); this.form.content=content; }, - handleView(row) { - this.reset(); - const Id = row.id - const userId = this.$store.state.user.id; - let postName; - getPostName(userId).then(response => { - postName = response.data.postName; - return getHoliday(Id); - }).then(holidayResponse => { - // 更新表单的 holiday 信息 - this.form = holidayResponse.data; - console.log(this.form); - - // 转换 hostUserId 字段为整数数组 - let numArr = this.form.hostUserId.split(","); - let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码 - this.$set(this.form, "hostUserId", num); - this.$set(this.form,"postName",postName) - this.open = true; - this.isView = true; - this.title = "查看"; - }); - }, //选择部门 changDept(e){ console.log(e)