功能优化
This commit is contained in:
parent
487e29604d
commit
efbb633d10
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue