Commit cf1615c4 authored by 罗超's avatar 罗超

1

parent 7764d8ce
<template>
<div class="page-body">
<div class="page-content">
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" :pagination='pagination'
separator="none" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">班次管理</div>
......@@ -22,7 +22,7 @@
</q-td>
</template>
</q-table>
<AddClassList v-if="isShowsetForm" @close="closeruleset" :save-obj="ruleObj" @success="refreshRule" :schoolOptions="schoolOptions">
<AddClassList v-if="isShowsetForm" @close="closeruleset" :save-obj="ruleObj" @success="refreshRule" :schoolOptions="schoolOptions" >
</AddClassList>
</div>
</div>
......@@ -43,7 +43,11 @@
loading: false,
isShowsetForm: false,
ruleObj: {}, //传入参数
pagination:{
rowsPerPage:0
},
schoolOptions:[],
columns: [{
name: 'SchoolName',
label: '学校名称',
......
......@@ -2,7 +2,7 @@
<div class="page-body">
<div class="page-content">
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="dataList" :columns="columns" row-key="name" inline>
separator="none" :data="dataList" :columns="columns" row-key="name" inline :pagination='pagination'>
<template v-slot:top="props">
<div class="col-2 q-table__title">值班事项管理</div>
<q-space />
......@@ -49,7 +49,7 @@
option-value="Id"
option-label="Name"
:options="frequencyOptions"
v-model="props.row.ShiftsName"
v-model="props.row.Shifts"
ref="Shifts"
:rules="[val => !!val || '请选择归属班次']"
......@@ -69,7 +69,7 @@
option-value="SId"
option-label="SName"
:options="schoolOptions"
v-model="props.row.SchoolName"
v-model="props.row.ItemSchools"
ref="school"
:rules="[val => !!val || '请选择归属校区']"
/>
......@@ -203,6 +203,9 @@
schoolOptions:[],//校区
itemTypeOptions:[],//事项类型
frequencyOptions:[],//班次列表
pagination:{
rowsPerPage:0
},
columns: [{
name: 'ItemName',
label: '事项名称',
......@@ -261,7 +264,16 @@
getList() {
getDutyItemList({}).then(res => {
if (res.Code == 1) {
res.Data.map(item=>{
item.Shifts=item.Shifts.split(",").map(_item=>{ _item= parseInt(_item)
return _item
})
item.ItemSchools=item.ItemSchools.split(",").map(_item=>{ _item= parseInt(_item)
return _item
})
item.isEdit=false
return item
})
......@@ -315,19 +327,16 @@
})
},
save(item){
let msg=JSON.parse(JSON.stringify(item))
if(item.isEdit){
item.isEdit=false
}
// let msg={
// Id:item.Id,
// ItemName:item.ItemName,
// Shifts:item.Shifts,
// ItemSchools:item.ItemSchools,
// ItemType:item.ItemType
// }
// console.log(item)
getSetDutyItemModel(item).then((res)=>{
msg.Shifts=item.Shifts.join(",")
msg.ItemSchools=item.ItemSchools.join(",")
getSetDutyItemModel(msg).then((res)=>{
this.getList();
})
},
......@@ -363,9 +372,12 @@
let msg=JSON.parse(JSON.stringify(this.msg))
msg.ItemSchools=this.msg.ItemSchools.toString(),
msg.Shifts=this.msg.Shifts.toString(),
// this.save(msg)
console.log(msg)
getSetDutyItemModel(msg).then((res)=>{
this.getList();
this.hide();
})
}
},
......
......@@ -14,7 +14,7 @@
<template>
<div class="page-body">
<div class="page-content">
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" :pagination='pagination'
separator="none" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">设置</div>
......@@ -62,6 +62,9 @@
loading: false,
isShowsetForm: false,
ruleObj: {}, //传入参数
pagination:{
rowsPerPage:0
},
schoolOptions:[],
frequencyOptions:[],
EmployeeListOption:[],
......
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