diff --git a/src/views/mes/cal/calendar/calendarType.vue b/src/views/mes/cal/calendar/calendarType.vue index 1f21f35..403f4de 100644 --- a/src/views/mes/cal/calendar/calendarType.vue +++ b/src/views/mes/cal/calendar/calendarType.vue @@ -62,22 +62,11 @@ export default { workdayList:[],//工作日 selectedType:null, calendarDayList:[ - { - theDay:'2022-06-04', - shiftType: 'SHIFT_TWO', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - }, - { - theDay:'2022-06-13', - shiftType: 'SHIFT_TWO', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - }, - { - theDay:'2022-06-14', - shiftType: 'SHIFT_THREE', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - } ], + teamShiftQueryParams:{ + queryType:'TYPE', + calendarType: null + }, queryParams: { theDay: null, holidayType: null, @@ -90,6 +79,12 @@ export default { date:{ handler(newVal,oldVal){ console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate()); + this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate(); + this.loading = true; + listCalendars(this.teamShiftQueryParams).then(response =>{ + this.calendarDayList = response.data; + this.loading = false; + }); } } }, @@ -119,11 +114,9 @@ export default { //点击班组类型 onSelected(calType){ this.loading = true; - var param = { - queryType: 'TYPE', - calendarType: calType - } - listCalendars(param).then(response =>{ + this.teamShiftQueryParams.calendarType = calType; + this.teamShiftQueryParams.date = this.date; + listCalendars(this.teamShiftQueryParams).then(response =>{ this.calendarDayList = response.data; this.loading = false; }); diff --git a/src/views/mes/cal/calendar/person.vue b/src/views/mes/cal/calendar/person.vue index 8b5a5ae..e68b5c8 100644 --- a/src/views/mes/cal/calendar/person.vue +++ b/src/views/mes/cal/calendar/person.vue @@ -71,22 +71,11 @@ export default { selectedType:null, form:{}, calendarDayList:[ - { - theDay:'2022-06-04', - shiftType: 'SHIFT_TWO', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - }, - { - theDay:'2022-06-13', - shiftType: 'SHIFT_TWO', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - }, - { - theDay:'2022-06-14', - shiftType: 'SHIFT_THREE', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - } + ], + teamShiftQueryParams:{ + queryType:'USER', + }, queryParams: { theDay: null, holidayType: null, @@ -99,6 +88,12 @@ export default { date:{ handler(newVal,oldVal){ console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate()); + this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate(); + this.loading = true; + listCalendars(this.teamShiftQueryParams).then(response =>{ + this.calendarDayList = response.data; + this.loading = false; + }); } } }, @@ -133,11 +128,9 @@ export default { onUserSelected(row){ this.form.nickName = row.nickName; this.loading = true; - var param = { - queryType: 'USER', - userId: row.userId - } - listCalendars(param).then(response =>{ + this.teamShiftQueryParams.userId = row.userId; + this.teamShiftQueryParams.date = this.date; + listCalendars(this.teamShiftQueryParams).then(response =>{ this.calendarDayList = response.data; this.loading = false; }); diff --git a/src/views/mes/cal/calendar/team.vue b/src/views/mes/cal/calendar/team.vue index cef1857..257f278 100644 --- a/src/views/mes/cal/calendar/team.vue +++ b/src/views/mes/cal/calendar/team.vue @@ -64,22 +64,10 @@ export default { workdayList:[],//工作日 selectedType:null, calendarDayList:[ - { - theDay:'2022-06-04', - shiftType: 'SHIFT_TWO', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - }, - { - theDay:'2022-06-13', - shiftType: 'SHIFT_TWO', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - }, - { - theDay:'2022-06-14', - shiftType: 'SHIFT_THREE', - teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}] - } ], + teamShiftQueryParams: { + queryType:'TEAM' + }, queryParams: { theDay: null, holidayType: null, @@ -92,6 +80,12 @@ export default { date:{ handler(newVal,oldVal){ console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate()); + this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate(); + this.loading = true; + listCalendars(this.teamShiftQueryParams).then(response =>{ + this.calendarDayList = response.data; + this.loading = false; + }); } } }, @@ -127,11 +121,9 @@ export default { //点击班组类型 onSelected(teamId){ this.loading = true; - var param = { - queryType: 'TEAM', - teamId: teamId - } - listCalendars(param).then(response =>{ + this.teamShiftQueryParams.teamId = teamId; + this.teamShiftQueryParams.date = this.date; + listCalendars(this.teamShiftQueryParams).then(response =>{ this.calendarDayList = response.data; this.loading = false; }); diff --git a/src/views/mes/cal/plan/index.vue b/src/views/mes/cal/plan/index.vue index bcb31b2..83eff09 100644 --- a/src/views/mes/cal/plan/index.vue +++ b/src/views/mes/cal/plan/index.vue @@ -57,20 +57,9 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['cal:calplan:add']" + v-hasPermi="['mes:cal:calplan:add']" >新增 - - 修改 - 删除 @@ -89,7 +78,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['cal:calplan:export']" + v-hasPermi="['mes:cal:calplan:export']" >导出 @@ -132,13 +121,18 @@ - + + +