Commit 52b1530a authored by zhengke's avatar zhengke

修改

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