|
@@ -154,14 +154,13 @@ const items = ref({
|
|
|
type: 'combobox',
|
|
|
key: 'schoolClassId',
|
|
|
value: null,
|
|
|
- label: '所在班级 *',
|
|
|
+ label: '所在班级',
|
|
|
outlined: true,
|
|
|
clearable: true,
|
|
|
canBeInputted: true,
|
|
|
itemTextName: 'schoolClassName',
|
|
|
itemText: 'name',
|
|
|
itemValue: 'id',
|
|
|
- rules: [v => !!v || '请选择所在班级'],
|
|
|
items: []
|
|
|
},
|
|
|
{
|
|
@@ -306,6 +305,7 @@ const getQuery = async () => {
|
|
|
items.value.options.forEach(e => {
|
|
|
if (Object.prototype.hasOwnProperty.call(e, 'data')) return obj[e.key] = e.data
|
|
|
if (e.key === 'schoolClassId') {
|
|
|
+ if (!e.value) return obj[e.key] = null
|
|
|
const classObj = e.items.find(k => k[e.itemValue] === e.value)
|
|
|
if (!classObj) {
|
|
|
obj[e.key] = null
|