Commit 8f1b80df authored by 沈翠玲's avatar 沈翠玲

排班计划查询详情bug

parent 911e9aa3
......@@ -232,10 +232,10 @@
</el-form>
<el-tabs type="border-card">
<el-tab-pane label="班次">
<Shift v-if="open" ref="shiftTab" :planCode="form.planCode" :shiftType="form.shiftType" :optType="optType"></Shift>
<Shift v-if="open" ref="shiftTab" :planId="form.planId" :shiftType="form.shiftType" :optType="optType"></Shift>
</el-tab-pane>
<el-tab-pane v-if="open" label="工作单元">
<Team v-if="open" ref="teamTab" :planId="form.planId" :form="form" :calendarType="form.calendarType" :optType="optType"></Team>
<Team v-if="open" ref="teamTab" :planId="form.planId" :planCode="form.planCode" :form="form" :calendarType="form.calendarType" :optType="optType"></Team>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
......@@ -383,7 +383,6 @@ export default {
const planId = row.planId || this.ids
getCalplan(planId).then(response => {
this.form = response.data;
console.log('this.form', this.form)
this.open = true;
this.title = "查看排班计划";
this.optType = "view";
......
......@@ -150,7 +150,7 @@ export default {
dicts: ['SHIFT_TYPE'],
props: {
shiftType: null,
planCode: null,
planId: null,
optType: null
},
watch: {
......@@ -159,7 +159,7 @@ export default {
handler (newName, oldName) {
console.log(newName, 'shiftType')
if (newName) {
if (this.planCode&&!this.editShiftType) {
if (this.planId&&!this.editShiftType) {
this.getEditList();
} else if ((this.optType === 'view' || this.optType === 'edit')&&(this.editShiftType && this.editShiftType === newName)) {
this.getEditList();
......@@ -170,7 +170,7 @@ export default {
},
immediate: true
},
planCode: {
planId: {
handler (newName, oldName) {
if (newName) {
this.editShiftType = this.shiftType
......@@ -254,7 +254,7 @@ export default {
/** 查询计划班次列表 */
getEditList() {
this.loading = true;
listEditShift({planCode: this.planCode}).then(response => {
listEditShift({planId: this.planId}).then(response => {
this.shiftList = response.rows;
this.loading = false;
});
......
......@@ -40,6 +40,7 @@ export default {
components:{TeamSelect},
props:{
planId:null,
planCode: null,
optType:null,
form: null,
calendarType:null
......@@ -56,7 +57,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
planId: this.planId || ''
planCode: this.planCode || ''
},
total: 0
}
......@@ -66,7 +67,7 @@ export default {
},
methods:{
getTeamList(){
if (!this.planId) {
if (!this.planCode) {
return
}
this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment