Commit 52b1530a authored by zhengke's avatar zhengke

修改

parent 838463e0
......@@ -12,19 +12,19 @@
</div>
<div class="col-6">
<q-select stack-label color="primary" filled clearable label="选择事项类型" option-value="Id" option-label="Name"
:options="itemTypeOptions" v-model="msg.ItemType" ref="ItemType" :rules="[val => !!val || '请选择事项类型']" />
:options="itemTypeOptions" v-model="msg.ItemType" ref="ItemType" emit-value map-options :rules="[val => !!val || '请选择事项类型']" />
</div>
</div>
<div class="row wrap">
<div class="col-6">
<q-select stack-label v-model="FrequencyArr" multiple :options="frequencyOptions" color="primary" filled
clearable label="选择班次" option-label="Name" option-value="Id" ref="Shifts"
@input="getSchoolListByFrequencyIds" :rules="[val => !!val || '请选择班次']" class="col-6 q-pr-lg q-pb-lg" />
@input="getSchoolListByFrequencyIds" emit-value map-options :rules="[val => !!val || '请选择班次']" class="col-6 q-pr-lg q-pb-lg" />
</div>
<div class="col-6">
<q-select stack-label v-model="schoolArr" multiple :options="schoolOptions" color="primary" filled clearable
label="选择校区" option-label="SName" option-value="SId" ref="ItemSchools"
@input="getDutyFrequencyBySchoolIds" :rules="[val => !!val || '请选择校区']" />
@input="getDutyFrequencyBySchoolIds" emit-value map-options :rules="[val => !!val || '请选择校区']" />
</div>
</div>
</q-card-section>
......@@ -97,10 +97,10 @@
this.msg.ItemType = tempData.ItemType;
this.msg.Shifts = tempData.Shifts;
if (tempData.ShiftList && tempData.ShiftList.length > 0) {
this.FrequencyArr = tempData.ShiftList;
this.FrequencyArr = tempData.ShiftList.map(i => i * 1);
}
if (tempData.SchoolList && tempData.SchoolList.length > 0) {
this.schoolArr = tempData.SchoolList;
this.schoolArr = tempData.SchoolList.map(i => i * 1);
}
}
}
......@@ -109,14 +109,6 @@
this.clearMsg();
}
},
//获取班次列表
getDutyFrequencyList() {
getDutyFrequencyList({}).then(res => {
if (res.Code == 1) {
this.frequencyOptions = res.Data;
}
})
},
//获取值班事项类型枚举
queryItemTypeEnumList() {
getItemTypeEnumList({}).then(res => {
......@@ -160,16 +152,17 @@
},
//根据班次获取学校信息
getSchoolListByFrequencyIds() {
let Shifts = this.FrequencyArr.map(item => item.Id).toString();
let Shifts = this.FrequencyArr.toString();
getSchoolListByFrequencyIds({
Shifts: Shifts
}).then((res) => {
this.schoolOptions = res.Data;
this.schoolArr=[];
})
},
//根据学校id获取对应的班次
getDutyFrequencyBySchoolIds() {
let SchoolIds = this.schoolArr.map(item => item.SId).toString();
let SchoolIds = this.schoolArr.toString();
getDutyFrequencyBySchoolIds({
SchoolIds: SchoolIds
}).then((res) => {
......
......@@ -52,7 +52,7 @@
</template>
</q-table>
</div>
<AddDutyItem v-if="isShowAdd" @close="resetSearch" :save-obj="itemObj" @success="resetSearch">
<AddDutyItem v-if="isShowAdd" @close="closeAddDuty" :save-obj="itemObj" @success="resetSearch">
</AddDutyItem>
</div>
</template>
......@@ -180,6 +180,10 @@
this.isShowAdd = true;
this.itemObj = obj;
},
//关闭
closeAddDuty(){
this.isShowAdd=false;
}
}
}
......
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