|
@@ -5,7 +5,7 @@
|
5
|
5
|
<div class="flex-item flex-h">
|
6
|
6
|
<!-- <el-button size="mini" type="success" @click="addSchedule">新增排课</el-button> -->
|
7
|
7
|
</div>
|
8
|
|
- <ul>
|
|
8
|
+ <ul v-if="courseid===''">
|
9
|
9
|
<li>
|
10
|
10
|
<el-select v-model="CaseId" placeholder="请选择案场">
|
11
|
11
|
<el-option
|
|
@@ -116,6 +116,7 @@ export default {
|
116
|
116
|
return {
|
117
|
117
|
caseid: '',
|
118
|
118
|
seldate: '',
|
|
119
|
+ courseid: '',
|
119
|
120
|
currentCourseItem: {},
|
120
|
121
|
centerDialogVisible: false,
|
121
|
122
|
}
|
|
@@ -165,10 +166,11 @@ export default {
|
165
|
166
|
...mapScheduleActions([
|
166
|
167
|
'GetDetailList',
|
167
|
168
|
'UpdateDetail',
|
168
|
|
- 'DelDetail'
|
|
169
|
+ 'DelDetail',
|
|
170
|
+ 'SetListNull',
|
169
|
171
|
]),
|
170
|
172
|
dayClick (day, jsEvent) { // 点击某天进入排课
|
171
|
|
- this.$router.push({ name: 'editSchedule', query: {caseid: this.CaseId, date: this.toolClass.dateFormat(day, 'yyyy-MM-dd')} })
|
|
173
|
+ this.$router.push({ name: 'editSchedule', query: {caseid: this.CaseId, courseid: this.courseid, date: this.toolClass.dateFormat(day, 'yyyy-MM-dd')} })
|
172
|
174
|
},
|
173
|
175
|
eventClick (event, jsEvent, pos) { // 点击日历
|
174
|
176
|
this.currentCourseItem = {...event.detail}
|
|
@@ -182,10 +184,15 @@ export default {
|
182
|
184
|
this.getList()
|
183
|
185
|
},
|
184
|
186
|
getList () {
|
185
|
|
- this.GetDetailList({
|
186
|
|
- caseid: this.CaseId,
|
187
|
|
- date: this.CurrentMonth,
|
188
|
|
- })
|
|
187
|
+ if (this.CaseId !== '' || this.courseid !== '') {
|
|
188
|
+ this.GetDetailList({
|
|
189
|
+ caseid: this.CaseId,
|
|
190
|
+ date: this.CurrentMonth,
|
|
191
|
+ courseid: this.courseid,
|
|
192
|
+ })
|
|
193
|
+ } else {
|
|
194
|
+ this.SetListNull()
|
|
195
|
+ }
|
189
|
196
|
},
|
190
|
197
|
handlUpdateDetail () {
|
191
|
198
|
this.UpdateDetail({...this.currentCourseItem,
|
|
@@ -214,6 +221,10 @@ export default {
|
214
|
221
|
},
|
215
|
222
|
mounted () {
|
216
|
223
|
this.$nextTick(function () {
|
|
224
|
+ const { id } = this.$route.query
|
|
225
|
+ if (id && id !== '') {
|
|
226
|
+ this.courseid = id
|
|
227
|
+ }
|
217
|
228
|
this.getList()
|
218
|
229
|
})
|
219
|
230
|
}
|