|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div id="class-info">
|
|
|
<data-form ref="form" :inline="true" :needSave="false" :data="form" :fields="fields" :rules="{}" @save="handleSave" :reset="false">
|
|
|
- <template #options="{item, form}">
|
|
|
+ <!-- <template #options="{item, form}">
|
|
|
<template v-if="item.model == 'headteacherid'">
|
|
|
<el-option-group v-for="(dept, index) in headTeacherList" :label="dept.name" :key="index">
|
|
|
<el-option v-for="(i, tIndex) in dept.list" :key="`${index}-${tIndex}`" :label="i.name" :value="i._id"></el-option>
|
|
@@ -22,6 +22,26 @@
|
|
|
<template v-if="item.model == 'yclocationid'">
|
|
|
<el-option v-for="(place, index) in locationList" :key="`${item.model}${index}`" :label="place.name" :value="place.id"></el-option>
|
|
|
</template>
|
|
|
+ </template> -->
|
|
|
+ <template #custom="{item, form}">
|
|
|
+ <template v-if="item.model == 'headteacherid'">
|
|
|
+ {{ classInfo.headteacher || '暂无' }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.model == 'lyteacherid'">
|
|
|
+ {{ getly(form.lyteacherid) || '暂无' }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.model == 'jslocationid'">
|
|
|
+ {{ classInfo.jslocation || '暂无' }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.model == 'kbyslocationid'">
|
|
|
+ {{ classInfo.kbyslocation || '暂无' }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.model == 'kzjhlocationid'">
|
|
|
+ {{ classInfo.kzjhlocation || '暂无' }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.model == 'yclocationid'">
|
|
|
+ {{ classInfo.yclocation || '暂无' }}
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</data-form>
|
|
|
</div>
|
|
@@ -48,12 +68,12 @@ export default {
|
|
|
fields: [
|
|
|
// { label: '', model: 'name', type: 'text' },
|
|
|
// { label: '人数', model: 'number', type: 'text' },
|
|
|
- { label: '班主任', model: 'headteacherid', type: 'select', options: { disabled: true } },
|
|
|
- { label: '礼仪课教师', model: 'lyteacherid', type: 'select', options: { disabled: true } },
|
|
|
- { label: '教室地点', model: 'jslocationid', type: 'select', options: { disabled: true } },
|
|
|
- { label: '开班地点', model: 'kbyslocationid', type: 'select', options: { disabled: true } },
|
|
|
- { label: '拓展训练地点', model: 'kzjhlocationid', type: 'select', options: { disabled: true } },
|
|
|
- { label: '用餐地点', model: 'yclocationid', type: 'select', options: { disabled: true } },
|
|
|
+ { label: '班主任', model: 'headteacherid', type: 'text', custom: true },
|
|
|
+ { label: '礼仪课教师', model: 'lyteacherid', type: 'text', custom: true },
|
|
|
+ { label: '教室地点', model: 'jslocationid', type: 'text', custom: true },
|
|
|
+ { label: '开班地点', model: 'kbyslocationid', type: 'text', custom: true },
|
|
|
+ { label: '拓展训练地点', model: 'kzjhlocationid', type: 'text', custom: true },
|
|
|
+ { label: '用餐地点', model: 'yclocationid', type: 'text', custom: true },
|
|
|
],
|
|
|
};
|
|
|
},
|
|
@@ -69,6 +89,10 @@ export default {
|
|
|
this.$emit('saveResult', { from: 'info', result: true });
|
|
|
}
|
|
|
},
|
|
|
+ getly(id) {
|
|
|
+ let res = this.lyTeacherList.find(i => (i.id = id));
|
|
|
+ if (res) return res.name;
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|