|
@@ -3,7 +3,7 @@
|
|
|
<div class="sm-school-name dark-iview-select ">
|
|
|
<span class="setting-title">{{$t('schoolBaseInfo.schoolNameLabel')}}</span>
|
|
|
<div class="editable">
|
|
|
- <EditableLabel ref="schoolName" class="school-name" :content="schoolSetting.schoolName" @editComplete="handleEditSchoolName($event,-1)">
|
|
|
+ <EditableLabel ref="schoolName" class="school-name" :content="schoolSetting.name" @editComplete="handleEditSchoolName($event,-1)">
|
|
|
</EditableLabel>
|
|
|
<Icon type="md-create" class="edit-btn" title="编辑" @click="changeSchoolNameStatus()" v-if="$access.ability('admin','schoolSetting-upd').validateAll" />
|
|
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
<transition-group name='flip-list'>
|
|
|
<div class="period-item list-group-item" v-for="(item,index) in schoolSetting.period" :key="index" @click.capture="choosePeriod(index)" :class="index == curPriodIndex ? 'block-bg-active block-bg':'block-bg'">
|
|
|
<p class="period-item-name semester-name-label dark-iview-input" @click.stop>
|
|
|
- <Input v-model="item.name" :disabled="editPrdIndex !== index" placeholder="设置学段..." style="width: 180px" />
|
|
|
+ <Input v-model="item.periodName" :disabled="editPrdIndex !== index" placeholder="设置学段..." style="width: 180px" />
|
|
|
<span class="campus-label" @click="setCampus">
|
|
|
{{item.campusCode === null ? '请设置校区': $JSONPath.query(schoolSetting, "$..campuses[?(@.campusCode=='" + item.campusCode + "')]").length > 0 ? $JSONPath.query(schoolSetting, "$..campuses[?(@.campusCode=='" + item.campusCode + "')]")[0].campusName : '请设置校区' }}
|
|
|
</span>
|
|
@@ -57,7 +57,7 @@
|
|
|
<div v-for="(item,index) in schoolSetting.period[curPriodIndex].semesters" :key="index" :class="index == curSemIndex ? 'term-item block-bg block-bg-active':'term-item block-bg'" @click.capture="chooseSemester(index)">
|
|
|
<span class="term-item-name-line" :style="{backgroundColor: colorList[index]}"></span>
|
|
|
<p class="semester-name-label" @click.stop>
|
|
|
- <Input v-model="item.name" :disabled="editSemIndex !== index" placeholder="设置学期..." style="width: 180px" />
|
|
|
+ <Input v-model="item.semesterName" :disabled="editSemIndex !== index" placeholder="设置学期..." style="width: 180px" />
|
|
|
</p>
|
|
|
<div class="term-item-start" @click.stop>
|
|
|
<span>{{$t('schoolBaseInfo.startDate')}}</span>
|
|
@@ -113,7 +113,7 @@
|
|
|
<transition-group name='flip-list'>
|
|
|
<div class="grade-item list-group-item" v-for="(item,index) in schoolSetting.period[curPriodIndex].grades" :key="index">
|
|
|
<span class="grade-order">{{index + 1}}</span>
|
|
|
- <Input class="grade-name" v-model="item.name" :disabled="!editGraStatus" placeholder="设置年级..." :style="{width: getWidth(index,item.name)+'px'}" />
|
|
|
+ <Input class="grade-name" v-model="item.gradeName" :disabled="!editGraStatus" placeholder="设置年级..." :style="{width: getWidth(index,item.gradeName)+'px'}" />
|
|
|
<Icon type="md-close" @click="showDelGrade(index)" style="cursor:pointer;flex:0.1" v-show="delGraStatus" />
|
|
|
</div>
|
|
|
</transition-group>
|
|
@@ -131,7 +131,7 @@
|
|
|
<div class="subject-body dark-iview-input disabled-iview-input">
|
|
|
<div class="subject-item item-active" @click.stop v-for="(item,index) in schoolSetting.period[curPriodIndex].subjects" :key="index">
|
|
|
<span class="subject-item-icon"></span>
|
|
|
- <Input v-model="item.name" :disabled="!editSubStatus" placeholder="设置学科..." :style="{width: getWidth(index,item.name)+'px'}" />
|
|
|
+ <Input v-model="item.subjectName" :disabled="!editSubStatus" placeholder="设置学科..." :style="{width: getWidth(index,item.subjectName)+'px'}" />
|
|
|
<Icon type="md-close" @click="showDelSubject(index)" v-show="delSubStatus" />
|
|
|
</div>
|
|
|
<EmptyData v-if="schoolSetting.period[curPriodIndex].subjects.length == 0" textContent="暂无学科"></EmptyData>
|
|
@@ -149,28 +149,27 @@
|
|
|
</EditableLabel>
|
|
|
<Icon type="md-create" class="campus-btn-edit" title="编辑" size="20" @click="changeCampusStatus(index)" />
|
|
|
</p>
|
|
|
-
|
|
|
<Icon type="md-add-circle" size="40" style="margin:auto;cursor:pointer;margin-top:30px;" @click="addCampus" />
|
|
|
</Modal>
|
|
|
<Modal v-model="delPeriodStatus"
|
|
|
title="删除学段"
|
|
|
@on-ok="delPeriod(curPriodIndex)">
|
|
|
- <p>删除学段后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].name}} 吗?</p>
|
|
|
+ <p>删除学段后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].periodName}} 吗?</p>
|
|
|
</Modal>
|
|
|
<Modal v-model="delSemesterStatus"
|
|
|
title="删除学期"
|
|
|
@on-ok="delSemester(curSemIndex)">
|
|
|
- <p>删除学期后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].semesters[curSemIndex].name}} 吗?</p>
|
|
|
+ <p>删除学期后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].semesters[curSemIndex].semesterName}} 吗?</p>
|
|
|
</Modal>
|
|
|
<Modal v-model="delGraShow"
|
|
|
title="删除年级"
|
|
|
@on-ok="delGrade(delGraIndex)">
|
|
|
- <p v-if="delGraShow">删除年级后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].grades[delGraIndex].name}} 吗?</p>
|
|
|
+ <p v-if="delGraShow">删除年级后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].grades[delGraIndex].gradeName}} 吗?</p>
|
|
|
</Modal>
|
|
|
<Modal v-model="delSubShow"
|
|
|
title="删除科目"
|
|
|
@on-ok="delSubject(delSubIndex)">
|
|
|
- <p v-if="delSubShow">删除科目后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].subjects[delSubIndex].name}} 吗?</p>
|
|
|
+ <p v-if="delSubShow">删除科目后,与之关联的数据将不能查询,确认删除 {{schoolSetting.period[curPriodIndex].subjects[delSubIndex].subjectName}} 吗?</p>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
|
|
@@ -242,7 +241,7 @@
|
|
|
isInit: true,
|
|
|
schoolSetting: {
|
|
|
schoolCode: '',
|
|
|
- schoolName: '',
|
|
|
+ name: '',
|
|
|
period: [],
|
|
|
campuses: []
|
|
|
},
|
|
@@ -464,10 +463,10 @@
|
|
|
initData() {
|
|
|
this.schoolSetting.schoolCode = this.$store.state.userInfo.schoolCode
|
|
|
this.schoolSetting.code = this.$store.state.userInfo.schoolCode
|
|
|
- this.schoolSetting.schoolName = this.$store.state.userInfo.school
|
|
|
+ this.schoolSetting.name = this.$store.state.userInfo.school
|
|
|
this.schoolSetting.period.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetPeriod') + '1',
|
|
|
- id: this.guid(),
|
|
|
+ periodName: this.$t('schoolBaseInfo.presetPeriod') + '1',
|
|
|
+ periodCode: this.guid(),
|
|
|
gradeCount: 0,
|
|
|
semesterCount: 0,
|
|
|
subjectCount: 0,
|
|
@@ -477,44 +476,44 @@
|
|
|
campuses: []
|
|
|
})
|
|
|
this.schoolSetting.period[0].semesters.push({
|
|
|
- name: this.$t('schoolBaseInfo.persetSemester'),
|
|
|
- id: this.guid(),
|
|
|
+ semesterName: this.$t('schoolBaseInfo.persetSemester'),
|
|
|
+ semesterCode: this.guid(),
|
|
|
month: 1,
|
|
|
day: 1
|
|
|
})
|
|
|
this.schoolSetting.period[0].grades.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetGrade1'),
|
|
|
- id: this.guid()
|
|
|
+ gradeName: this.$t('schoolBaseInfo.presetGrade1'),
|
|
|
+ gradeCode: this.guid()
|
|
|
})
|
|
|
this.schoolSetting.period[0].grades.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetGrade2'),
|
|
|
- id: this.guid()
|
|
|
+ gradeName: this.$t('schoolBaseInfo.presetGrade2'),
|
|
|
+ gradeCode: this.guid()
|
|
|
})
|
|
|
this.schoolSetting.period[0].grades.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetGrade3'),
|
|
|
- id: this.guid()
|
|
|
+ gradeName: this.$t('schoolBaseInfo.presetGrade3'),
|
|
|
+ gradeCode: this.guid()
|
|
|
})
|
|
|
this.schoolSetting.period[0].subjects.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetSubject1'),
|
|
|
- id: this.guid()
|
|
|
+ subjectName: this.$t('schoolBaseInfo.presetSubject1'),
|
|
|
+ subjectCode: this.guid()
|
|
|
})
|
|
|
this.schoolSetting.period[0].subjects.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetSubject2'),
|
|
|
- id: this.guid()
|
|
|
+ subjectName: this.$t('schoolBaseInfo.presetSubject2'),
|
|
|
+ subjectCode: this.guid()
|
|
|
})
|
|
|
this.schoolSetting.period[0].subjects.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetSubject3'),
|
|
|
- id: this.guid()
|
|
|
+ subjectName: this.$t('schoolBaseInfo.presetSubject3'),
|
|
|
+ subjectCode: this.guid()
|
|
|
})
|
|
|
this.updated = false
|
|
|
},
|
|
|
//改变年级编辑状态
|
|
|
changeGradeEditStatus(index) {
|
|
|
- this.$refs.name[index].handleEdit()
|
|
|
+ this.$refs.gradeName[index].handleEdit()
|
|
|
},
|
|
|
//改变学科编辑状态
|
|
|
changeSubjectEditStatus(index) {
|
|
|
- this.$refs.name[index].handleEdit()
|
|
|
+ this.$refs.subjectName[index].handleEdit()
|
|
|
},
|
|
|
//选择学期
|
|
|
chooseSemester(index) {
|
|
@@ -628,65 +627,9 @@
|
|
|
this.schoolSetting.period[i].subjectCount = this.schoolSetting.period[i].subjects.length
|
|
|
}
|
|
|
},
|
|
|
- handleEditGrade(val, index) {
|
|
|
- let flag = false
|
|
|
- this.schoolSetting.period[this.curPriodIndex].grades.forEach((v, i) => {
|
|
|
- if (v.name == val) {
|
|
|
- flag = true
|
|
|
- }
|
|
|
- })
|
|
|
- if (flag) {
|
|
|
- this.$Message.warning(this.$t('schoolBaseInfo.ssTips4'))
|
|
|
- } else {
|
|
|
- this.schoolSetting.period[this.curPriodIndex].grades[index].name = val
|
|
|
- }
|
|
|
- },
|
|
|
- handleEditSubject(val, index) {
|
|
|
- let flag = false
|
|
|
- this.schoolSetting.period[this.curPriodIndex].subjects.forEach((v, i) => {
|
|
|
- if (v.name == val) {
|
|
|
- flag = true
|
|
|
- }
|
|
|
- })
|
|
|
- if (flag) {
|
|
|
- this.$Message.warning(this.$t('schoolBaseInfo.ssTips4'))
|
|
|
- } else {
|
|
|
- this.schoolSetting.period[this.curPriodIndex].subjects[index].name = val
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
handleEditSchoolName(val) {
|
|
|
- this.schoolSetting.schoolName = val
|
|
|
- },
|
|
|
- handleEditPeriod(val, index) {
|
|
|
- let flag = false
|
|
|
- this.schoolSetting.period.forEach((v, i) => {
|
|
|
- if (index != i) {
|
|
|
- if (v.name == val) {
|
|
|
- flag = true
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- if (flag) {
|
|
|
- this.$Message.warning(this.$t('schoolBaseInfo.ssTips4'))
|
|
|
- } else {
|
|
|
- this.schoolSetting.period[index].name = val
|
|
|
- }
|
|
|
- },
|
|
|
- handleEditSemester(val, index) {
|
|
|
- let flag = false
|
|
|
- this.schoolSetting.period[this.curPriodIndex].semesters.forEach((v, i) => {
|
|
|
- if (v.name == val) {
|
|
|
- flag = true
|
|
|
- }
|
|
|
- })
|
|
|
- if (flag) {
|
|
|
- this.$Message.warning(this.$t('schoolBaseInfo.ssTips4'))
|
|
|
- } else {
|
|
|
- this.schoolSetting.period[this.curPriodIndex].semesters[index].name = val
|
|
|
- }
|
|
|
- },
|
|
|
- changePeriodEditStatus(index) {
|
|
|
- this.$refs.name[index].handleEdit()
|
|
|
+ this.schoolSetting.name = val
|
|
|
},
|
|
|
changeSchoolNameStatus() {
|
|
|
this.$refs.schoolName.handleEdit()
|
|
@@ -698,8 +641,8 @@
|
|
|
if (this.termList.length < this.TERM_MAX_LENGTH) {
|
|
|
let newTerm = Object.assign({}, defaultTerm)
|
|
|
this.schoolSetting.period[this.curPriodIndex].subjects.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetSubject') + (this.schoolSetting.period[this.curPriodIndex].subjects.length + 1),
|
|
|
- id: this.guid()
|
|
|
+ subjectName: this.$t('schoolBaseInfo.presetSubject') + (this.schoolSetting.period[this.curPriodIndex].subjects.length + 1),
|
|
|
+ subjectCode: this.guid()
|
|
|
})
|
|
|
} else {
|
|
|
this.$Message.info(this.$t('schoolBaseInfo.ssTips5'))
|
|
@@ -715,8 +658,8 @@
|
|
|
if (this.termList.length < this.TERM_MAX_LENGTH) {
|
|
|
let newTerm = Object.assign({}, defaultTerm)
|
|
|
this.schoolSetting.period[this.curPriodIndex].grades.push({
|
|
|
- name: this.$t('schoolBaseInfo.persetGrade') + (this.schoolSetting.period[this.curPriodIndex].grades.length),
|
|
|
- id: this.guid()
|
|
|
+ gradeName: this.$t('schoolBaseInfo.persetGrade') + (this.schoolSetting.period[this.curPriodIndex].grades.length),
|
|
|
+ gradeCode: this.guid()
|
|
|
})
|
|
|
} else {
|
|
|
this.$Message.info(this.$t('schoolBaseInfo.ssTips6'))
|
|
@@ -724,8 +667,8 @@
|
|
|
},
|
|
|
addPeriod() {
|
|
|
this.schoolSetting.period.push({
|
|
|
- name: this.$t('schoolBaseInfo.presetPeriod') + (this.schoolSetting.period.length + 1),
|
|
|
- id: this.guid(),
|
|
|
+ periodName: this.$t('schoolBaseInfo.presetPeriod') + (this.schoolSetting.period.length + 1),
|
|
|
+ periodCode: this.guid(),
|
|
|
gradeCount: 0,
|
|
|
semesterCount: 0,
|
|
|
subjectCount: 0,
|
|
@@ -750,11 +693,11 @@
|
|
|
let newTerm = Object.assign({}, defaultTerm)
|
|
|
let defMonth = this.schoolSetting.period[this.curPriodIndex].semesters.length == 0 ? 1 : this.schoolSetting.period[this.curPriodIndex].semesters[this.curSemIndex].month + 1
|
|
|
this.schoolSetting.period[this.curPriodIndex].semesters.push({
|
|
|
- name: this.$t('schoolBaseInfo.persetSemester') + (this.schoolSetting.period[this.curPriodIndex].semesters.length + 1),
|
|
|
+ semesterName: this.$t('schoolBaseInfo.persetSemester') + (this.schoolSetting.period[this.curPriodIndex].semesters.length + 1),
|
|
|
studentCount: '学生人数',
|
|
|
month: defMonth,
|
|
|
day: 26,
|
|
|
- id: this.guid()
|
|
|
+ semesterCode: this.guid()
|
|
|
})
|
|
|
this.countSemDays()
|
|
|
} else {
|
|
@@ -882,9 +825,9 @@
|
|
|
//计算时区设置宽度
|
|
|
tzWidth() {
|
|
|
if (this.schoolSetting.timeZone && this.schoolSetting.timeZone.label) {
|
|
|
- return this.getWidth(0, this.schoolSetting.timeZone.label) - 40
|
|
|
+ return this.getWidth(0, this.schoolSetting.timeZone.label)
|
|
|
} else {
|
|
|
- return 100
|
|
|
+ return 150
|
|
|
}
|
|
|
},
|
|
|
dayList() {
|