|
@@ -1,3 +1,4 @@
|
|
|
|
+
|
|
<template>
|
|
<template>
|
|
<div class="syllabus-main center">
|
|
<div class="syllabus-main center">
|
|
<div class="content-wrap">
|
|
<div class="content-wrap">
|
|
@@ -21,74 +22,84 @@
|
|
<div class="list-wrap">
|
|
<div class="list-wrap">
|
|
<!-- 左边科目列表 -->
|
|
<!-- 左边科目列表 -->
|
|
<div class="list-col list-left">
|
|
<div class="list-col list-left">
|
|
- <div v-for="item in currentSubjectList" :class='["subject-item", item.rowKey==s_click_id ? "term-item-active" : ""]' @click="subjectClick(item)">
|
|
|
|
- <span class="subject-name">
|
|
|
|
- <Input v-if="item.rowKey==c_edit_id" clearable type="text" v-model="item.name"
|
|
|
|
- @on-blur="editSubject(item)"
|
|
|
|
- @on-enter="editSubject(item)"
|
|
|
|
- @click.stop.native="inputFocus($event)" />
|
|
|
|
- <span v-else>{{item.name}}</span>
|
|
|
|
-
|
|
|
|
- <span class="s-block-tools" v-show="item.rowKey==c_subject_id">
|
|
|
|
- <Icon type="md-create" @click="handleEditSubject(item,$event)" />
|
|
|
|
- <Icon type="md-trash" @click="handleDeleteSubject" />
|
|
|
|
|
|
+ <Spin fix v-show="subjectLoading"></Spin>
|
|
|
|
+ <template v-if="currentSubjectList.length > 0">
|
|
|
|
+ <div v-for="item in currentSubjectList" :class='["subject-item", item.rowKey==s_click_id ? "term-item-active" : ""]' @click="subjectClick(item)">
|
|
|
|
+ <span class="subject-name">
|
|
|
|
+ <Input v-if="item.rowKey==c_edit_id" clearable type="text" v-model="item.name"
|
|
|
|
+ @on-blur="editSubject(item)"
|
|
|
|
+ @keyup.enter.native="$event.target.blur"
|
|
|
|
+ @click.stop.native="inputFocus($event)" />
|
|
|
|
+ <span v-else>{{item.name}}</span>
|
|
|
|
+
|
|
|
|
+ <span class="s-block-tools" v-show="item.rowKey==c_subject_id">
|
|
|
|
+ <Icon type="md-create" @click="handleEditSubject(item,$event)" />
|
|
|
|
+ <Icon type="md-trash" @click="handleDeleteSubject(item)" />
|
|
|
|
+ </span>
|
|
</span>
|
|
</span>
|
|
- </span>
|
|
|
|
- <span class="subject-term-num">册数 | {{item.termNum?item.termNum:0}}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <span class="subject-term-num">册数 | {{item.termNum?item.termNum:0}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <div v-else class="no-data-text">暂无数据</div>
|
|
</div>
|
|
</div>
|
|
<!-- 中间册别列表 -->
|
|
<!-- 中间册别列表 -->
|
|
<div class="list-col list-middle">
|
|
<div class="list-col list-middle">
|
|
- <div v-for="item in volumesList" :class='["subject-item", "term-item", item.rowKey==c_click_id ? "term-item-active" : ""]' @click="volumesClick(item)">
|
|
|
|
- <span class="subject-name term-name">
|
|
|
|
- <Input v-if="item.rowKey==t_edit_id" clearable type="text" v-model="item.name"
|
|
|
|
- @on-blur="editTerm(item)"
|
|
|
|
- @on-enter="editTerm(item)"
|
|
|
|
- @click.stop.native="inputFocus($event)" />
|
|
|
|
- <span v-else class="term-name-title">{{item.name}} | {{item.termCode}}</span>
|
|
|
|
- <span class="s-block-tools" v-show="item.rowKey==c_term_id">
|
|
|
|
- <Icon type="md-create" @click="handleEditTerm(item,$event)" />
|
|
|
|
- <Icon type="md-trash" @click="handleDeleteSubject" />
|
|
|
|
|
|
+ <Spin fix v-show="volumesLoading"></Spin>
|
|
|
|
+ <template v-if="volumesList.length > 0">
|
|
|
|
+ <div v-for="item in volumesList" :class='["subject-item", "term-item", item.rowKey==c_click_id ? "term-item-active" : ""]' @click="volumesClick(item)">
|
|
|
|
+ <span class="subject-name term-name">
|
|
|
|
+ <Input v-if="item.rowKey==t_edit_id" clearable type="text" v-model="item.name"
|
|
|
|
+ @on-blur="editTerm(item)"
|
|
|
|
+ @keyup.enter.native="$event.target.blur"
|
|
|
|
+ @click.stop.native="inputFocus($event)" />
|
|
|
|
+ <span v-else class="term-name-title">{{item.name}} | {{item.termCode}}</span>
|
|
|
|
+ <span class="s-block-tools" v-show="item.rowKey==c_term_id">
|
|
|
|
+ <Icon type="md-create" @click="handleEditTerm(item,$event)" />
|
|
|
|
+ <Icon type="md-trash" @click="handleDeleteVolumes(item)" />
|
|
|
|
+ </span>
|
|
</span>
|
|
</span>
|
|
- </span>
|
|
|
|
- <span class="term-period">{{item.periodName}} | {{item.gradeName + item.termName}} <Icon type="md-arrow-dropdown" v-show="item.rowKey==c_click_id" size="18" style="margin-bottom:3px" /></span>
|
|
|
|
- <div class="term-userNum">
|
|
|
|
- <span>共编使用者数 | {{item.termCode}} 名</span>
|
|
|
|
- <Poptip content="content" placement="bottom-end" theme="dark">
|
|
|
|
- <span class="term-add-user" v-show="item.id==c_click_id">添加共编使用者</span>
|
|
|
|
- <div class="pop-content" slot="content" style="padding-bottom:10px;">
|
|
|
|
- <Tabs value="filter" :animated="false">
|
|
|
|
- <TabPane label="选择老师" name="filter">
|
|
|
|
- <template>
|
|
|
|
- <Select v-model="selectGrade" style="width:100%" @on-change="handleGradeChange">
|
|
|
|
- <Option v-for="item in gradeList" :value="item.name" :key="item.name">{{ item.name }}</Option>
|
|
|
|
- </Select>
|
|
|
|
- </template>
|
|
|
|
- <CheckboxGroup v-model="tearchList" @on-change="handleTeacherCheck">
|
|
|
|
- <Checkbox v-for="(item,index) in userList" :key="index" :label="item.index">{{item.name}}{{item.role}}</Checkbox>
|
|
|
|
- </CheckboxGroup>
|
|
|
|
- </TabPane>
|
|
|
|
- <TabPane label="选择群组" name="orderBy">
|
|
|
|
-
|
|
|
|
- </TabPane>
|
|
|
|
- </Tabs>
|
|
|
|
|
|
+ <span class="term-period">{{item.periodName}} | {{item.gradeName + item.termName}} <Icon type="md-arrow-dropdown" v-show="item.rowKey==c_click_id" size="18" style="margin-bottom:3px" /></span>
|
|
|
|
+ <div class="term-userNum">
|
|
|
|
+ <span>共编使用者数 | {{item.termCode}} 名</span>
|
|
|
|
+ <Poptip content="content" placement="bottom-end" theme="dark">
|
|
|
|
+ <span class="term-add-user" v-show="item.id==c_click_id">添加共编使用者</span>
|
|
|
|
+ <div class="pop-content" slot="content" style="padding-bottom:10px;">
|
|
|
|
+ <Tabs value="filter" :animated="false">
|
|
|
|
+ <TabPane label="选择老师" name="filter">
|
|
|
|
+ <template>
|
|
|
|
+ <Select v-model="selectGrade" style="width:100%" @on-change="handleGradeChange">
|
|
|
|
+ <Option v-for="item in gradeList" :value="item.name" :key="item.name">{{ item.name }}</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </template>
|
|
|
|
+ <CheckboxGroup v-model="tearchList" @on-change="handleTeacherCheck">
|
|
|
|
+ <Checkbox v-for="(item,index) in userList" :key="index" :label="item.index">{{item.name}}{{item.role}}</Checkbox>
|
|
|
|
+ </CheckboxGroup>
|
|
|
|
+ </TabPane>
|
|
|
|
+ <TabPane label="选择群组" name="orderBy">
|
|
|
|
+
|
|
|
|
+ </TabPane>
|
|
|
|
+ </Tabs>
|
|
|
|
+ </div>
|
|
|
|
+ </Poptip>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 使用者列表 -->
|
|
|
|
+ <transition enter-active-class="animated slideInDown" leave-active-class="d-none">
|
|
|
|
+ <div class="term-users" v-show="item.id==c_click_id">
|
|
|
|
+ <div class="term-user-item center" v-for="user in userList">
|
|
|
|
+ <img class="term-user-img" :src="user.headImg" />
|
|
|
|
+ <span class="term-user-name">{{user.name}} {{user.role}}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </Poptip>
|
|
|
|
|
|
+ </transition>
|
|
</div>
|
|
</div>
|
|
- <!-- 使用者列表 -->
|
|
|
|
- <transition enter-active-class="animated slideInDown" leave-active-class="d-none">
|
|
|
|
- <div class="term-users" v-show="item.id==c_click_id">
|
|
|
|
- <div class="term-user-item center" v-for="user in userList">
|
|
|
|
- <img class="term-user-img" :src="user.headImg" />
|
|
|
|
- <span class="term-user-name">{{user.name}} {{user.role}}</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </transition>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ <div v-else class="no-data-text">暂无数据</div>
|
|
</div>
|
|
</div>
|
|
<!-- 右侧树形列表 -->
|
|
<!-- 右侧树形列表 -->
|
|
<div class="list-col list-right">
|
|
<div class="list-col list-right">
|
|
- <Tree></Tree>
|
|
|
|
|
|
+ <Spin fix v-show="syllabusLoading"></Spin>
|
|
|
|
+ <Tree :treeDatas="treeDatas" :volumeCode="volumeCode" v-if="volumesList.length > 0 && treeDatas.length > 0"></Tree>
|
|
|
|
+ <div v-else class="no-data-text">暂无数据</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -100,6 +111,11 @@
|
|
cancel-text="取消"
|
|
cancel-text="取消"
|
|
@on-ok="handleAddSubject"
|
|
@on-ok="handleAddSubject"
|
|
@on-cancel="">
|
|
@on-cancel="">
|
|
|
|
+ <p class="modal-title" v-show="currentSubjectList.length > 0">当前已选科目</p>
|
|
|
|
+ <CheckboxGroup v-model="currentSubjectList" v-show="currentSubjectList.length > 0">
|
|
|
|
+ <Checkbox v-for="(item,index) in currentSubjectList" :label="index" :key="index" disabled>{{item.name}}</Checkbox>
|
|
|
|
+ </CheckboxGroup>
|
|
|
|
+
|
|
<p class="modal-title">请选择需要添加的新科目</p>
|
|
<p class="modal-title">请选择需要添加的新科目</p>
|
|
<CheckboxGroup v-model="newSubjectList">
|
|
<CheckboxGroup v-model="newSubjectList">
|
|
<Checkbox v-for="(item,index) in subjectList" :label="index" :key="index">{{item.name}}</Checkbox>
|
|
<Checkbox v-for="(item,index) in subjectList" :label="index" :key="index">{{item.name}}</Checkbox>
|
|
@@ -135,7 +151,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import Tree from './Tree.vue'
|
|
|
|
|
|
+ import Tree from '@/components/syllabus/Tree.vue'
|
|
import { all } from 'q';
|
|
import { all } from 'q';
|
|
import { setTimeout } from 'core-js';
|
|
import { setTimeout } from 'core-js';
|
|
export default {
|
|
export default {
|
|
@@ -153,6 +169,11 @@ import { setTimeout } from 'core-js';
|
|
volumesList: [],//册别列表
|
|
volumesList: [],//册别列表
|
|
treeData: [],//课纲数据
|
|
treeData: [],//课纲数据
|
|
userList: [],//共编使用者列表
|
|
userList: [],//共编使用者列表
|
|
|
|
+ treeDatas: [],
|
|
|
|
+ volumeCode: "",
|
|
|
|
+ subjectLoading: true,
|
|
|
|
+ volumesLoading: true,
|
|
|
|
+ syllabusLoading:true,
|
|
|
|
|
|
findPeriodsList:[],
|
|
findPeriodsList:[],
|
|
findGradesList:[],
|
|
findGradesList:[],
|
|
@@ -180,28 +201,41 @@ import { setTimeout } from 'core-js';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[1]; //默认选中第一个学校
|
|
|
|
|
|
+ this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[0]; //默认选中第一个学校
|
|
let schoolClaims = this.schoolInfo.claim;
|
|
let schoolClaims = this.schoolInfo.claim;
|
|
for (let i in schoolClaims) {
|
|
for (let i in schoolClaims) {
|
|
if (schoolClaims[i].claimType == "SchoolCode") {
|
|
if (schoolClaims[i].claimType == "SchoolCode") {
|
|
this.schoolInfo = schoolClaims[i]
|
|
this.schoolInfo = schoolClaims[i]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- //查找全部科目
|
|
|
|
- this.$api.FindSubjectsByDict({}).then(res => {
|
|
|
|
- this.subjectList = res.result.data;
|
|
|
|
- })
|
|
|
|
|
|
|
|
- //查找当前学校已有科目
|
|
|
|
- this.$api.FindSchoolSubjectsByDict({ SchoolCode: this.schoolInfo.claimCode }).then(res => {
|
|
|
|
- this.currentSubjectList = res.result.data;
|
|
|
|
- this.subjectInfo = res.result.data[0];
|
|
|
|
- this.subjectClick(res.result.data[0]);
|
|
|
|
- })
|
|
|
|
|
|
+ this.findAllSubjects();
|
|
|
|
+ this.findSchoolSubjectsByDict();
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- //科目点击事件
|
|
|
|
|
|
+ //查找全部科目
|
|
|
|
+ findAllSubjects() {
|
|
|
|
+ this.$api.FindSubjectsByDict({}).then(res => {
|
|
|
|
+ this.subjectList = res.result.data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //查找当前学校已有科目
|
|
|
|
+ findSchoolSubjectsByDict() {
|
|
|
|
+ this.$api.FindSchoolSubjectsByDict({ SchoolCode: this.schoolInfo.claimCode,Status:1 }).then(res => {
|
|
|
|
+ this.currentSubjectList = res.result.data;
|
|
|
|
+ if (res.result.data.length > 0) {
|
|
|
|
+ this.subjectInfo = res.result.data[0];
|
|
|
|
+ this.subjectClick(res.result.data[0]);
|
|
|
|
+ }
|
|
|
|
+ this.subjectLoading = false;
|
|
|
|
+ this.volumesLoading = false;
|
|
|
|
+ this.syllabusLoading = false;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //点击科目
|
|
subjectClick(data) {
|
|
subjectClick(data) {
|
|
|
|
+ this.volumesLoading = true;
|
|
this.subjectInfo = data;
|
|
this.subjectInfo = data;
|
|
this.s_click_id = data.rowKey;
|
|
this.s_click_id = data.rowKey;
|
|
this.c_subject_id = data.rowKey;
|
|
this.c_subject_id = data.rowKey;
|
|
@@ -209,22 +243,32 @@ import { setTimeout } from 'core-js';
|
|
let defaultData = {
|
|
let defaultData = {
|
|
SchoolCode: this.schoolInfo.claimCode,
|
|
SchoolCode: this.schoolInfo.claimCode,
|
|
PartitionKey: data.partitionKey,
|
|
PartitionKey: data.partitionKey,
|
|
- SubjectCode: data.code
|
|
|
|
|
|
+ SubjectCode: data.code,
|
|
|
|
+ Status:1
|
|
}
|
|
}
|
|
this.$api.FindSchoolVolumesByDict(defaultData).then(res => {
|
|
this.$api.FindSchoolVolumesByDict(defaultData).then(res => {
|
|
this.volumesList = res.result.data;
|
|
this.volumesList = res.result.data;
|
|
if (res.result.data.length > 0) {
|
|
if (res.result.data.length > 0) {
|
|
this.volumesClick(res.result.data[0]);
|
|
this.volumesClick(res.result.data[0]);
|
|
}
|
|
}
|
|
|
|
+ this.volumesLoading = false;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
//点击编辑科目
|
|
//点击编辑科目
|
|
handleEditSubject(data, e) {
|
|
handleEditSubject(data, e) {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
this.c_edit_id = data.rowKey;
|
|
this.c_edit_id = data.rowKey;
|
|
},
|
|
},
|
|
- //册别点击事件
|
|
|
|
|
|
+
|
|
|
|
+ //点击册别
|
|
volumesClick(data) {
|
|
volumesClick(data) {
|
|
|
|
+ this.syllabusLoading = true;
|
|
|
|
+ this.$api.FindSyllabusByVolumeCode({ VolumeCode: data.rowKey, Status:1 }).then(res => {
|
|
|
|
+ this.treeDatas = res.result.data;
|
|
|
|
+ this.volumeCode = data.rowKey;
|
|
|
|
+ this.syllabusLoading = false;
|
|
|
|
+ })
|
|
this.c_click_id = data.rowKey;
|
|
this.c_click_id = data.rowKey;
|
|
this.c_term_id = data.rowKey;
|
|
this.c_term_id = data.rowKey;
|
|
this.t_edit_id = null;
|
|
this.t_edit_id = null;
|
|
@@ -236,11 +280,21 @@ import { setTimeout } from 'core-js';
|
|
this.t_edit_id = data.rowKey;
|
|
this.t_edit_id = data.rowKey;
|
|
},
|
|
},
|
|
//编辑科目input失焦
|
|
//编辑科目input失焦
|
|
- editSubject() {
|
|
|
|
|
|
+ editSubject(data) {
|
|
|
|
+ this.$api.SaveOrUpdateSchoolSubject(data).then(res => {
|
|
|
|
+ if (res.result.message == "Success") {
|
|
|
|
+ this.$Message.success("修改成功");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.c_edit_id = null;
|
|
this.c_edit_id = null;
|
|
},
|
|
},
|
|
//编辑册别input失焦
|
|
//编辑册别input失焦
|
|
- editTerm() {
|
|
|
|
|
|
+ editTerm(data) {
|
|
|
|
+ this.$api.SaveOrUpdateSchoolVolume(data).then(res => {
|
|
|
|
+ if (res.result.message == "Success") {
|
|
|
|
+ this.$Message.success("修改成功");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.t_edit_id = null;
|
|
this.t_edit_id = null;
|
|
},
|
|
},
|
|
//input聚焦
|
|
//input聚焦
|
|
@@ -250,14 +304,21 @@ import { setTimeout } from 'core-js';
|
|
//点击添加科目
|
|
//点击添加科目
|
|
addSubject() {
|
|
addSubject() {
|
|
let currentList = this.currentSubjectList;
|
|
let currentList = this.currentSubjectList;
|
|
- let allList = this.subjectList;
|
|
|
|
- for (let i in allList) {
|
|
|
|
- for (let j in currentList) {
|
|
|
|
- if (allList[i].rowKey == currentList[j].code) {
|
|
|
|
- allList.splice(i, 1);
|
|
|
|
|
|
+ this.$api.FindSubjectsByDict({}).then(res => {
|
|
|
|
+ this.subjectList = res.result.data;
|
|
|
|
+ let tempList = this.subjectList.slice(0);
|
|
|
|
+ if (currentList.length > 0) {
|
|
|
|
+ for (let i in tempList) {
|
|
|
|
+ for (let j in currentList) {
|
|
|
|
+ if (tempList[i].rowKey == currentList[j].code) {
|
|
|
|
+ this.subjectList.splice(this.subjectList.indexOf(tempList[i]), 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
this.addSubjectModal = true;
|
|
this.addSubjectModal = true;
|
|
this.newSubjectList = [];
|
|
this.newSubjectList = [];
|
|
|
|
|
|
@@ -266,20 +327,20 @@ import { setTimeout } from 'core-js';
|
|
//确认添加科目
|
|
//确认添加科目
|
|
handleAddSubject() {
|
|
handleAddSubject() {
|
|
let newList = this.newSubjectList;
|
|
let newList = this.newSubjectList;
|
|
- let currentList = this.currentSubjectList;
|
|
|
|
for (let i of newList) {
|
|
for (let i of newList) {
|
|
let defaultSubject = {
|
|
let defaultSubject = {
|
|
schoolCode: this.schoolInfo.claimCode,
|
|
schoolCode: this.schoolInfo.claimCode,
|
|
partitionKey: this.subjectList[i].partitionKey,
|
|
partitionKey: this.subjectList[i].partitionKey,
|
|
name: this.subjectList[i].name,
|
|
name: this.subjectList[i].name,
|
|
code: this.subjectList[i].rowKey,
|
|
code: this.subjectList[i].rowKey,
|
|
|
|
+ status:1,
|
|
schoolName:this.schoolInfo.claimName
|
|
schoolName:this.schoolInfo.claimName
|
|
};
|
|
};
|
|
this.$api.SaveOrUpdateSchoolSubject(defaultSubject).then(res => {
|
|
this.$api.SaveOrUpdateSchoolSubject(defaultSubject).then(res => {
|
|
- currentList.push(res.result.data);
|
|
|
|
|
|
+ this.currentSubjectList.push(res.result.data);
|
|
|
|
+ this.subjectClick(this.currentSubjectList[0]); //默认展开第一个
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.subjectClick(this.currentSubjectList[0]); //默认展开第一个
|
|
|
|
},
|
|
},
|
|
|
|
|
|
//点击添加册别
|
|
//点击添加册别
|
|
@@ -306,7 +367,6 @@ import { setTimeout } from 'core-js';
|
|
|
|
|
|
//发送请求添加册别
|
|
//发送请求添加册别
|
|
handleAddTerm() {
|
|
handleAddTerm() {
|
|
- let that = this;
|
|
|
|
//查询是否已存在此类册别
|
|
//查询是否已存在此类册别
|
|
this.$api.FindSchoolVolumesByDict({
|
|
this.$api.FindSchoolVolumesByDict({
|
|
SchoolCode: this.addVolumesData.schoolCode,
|
|
SchoolCode: this.addVolumesData.schoolCode,
|
|
@@ -324,6 +384,7 @@ import { setTimeout } from 'core-js';
|
|
okText: "确认",
|
|
okText: "确认",
|
|
cancelText:"取消",
|
|
cancelText:"取消",
|
|
onOk: () => {
|
|
onOk: () => {
|
|
|
|
+ //存在即更新册别名字
|
|
this.$api.SaveOrUpdateSchoolVolume(this.addVolumesData).then(res => {
|
|
this.$api.SaveOrUpdateSchoolVolume(this.addVolumesData).then(res => {
|
|
this.c_term_id = res.result.data.rowKey;
|
|
this.c_term_id = res.result.data.rowKey;
|
|
this.c_click_id = res.result.data.rowKey;
|
|
this.c_click_id = res.result.data.rowKey;
|
|
@@ -333,11 +394,10 @@ import { setTimeout } from 'core-js';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- },
|
|
|
|
- onCancel: () => {
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
|
|
+ //不存在则直接加入列表
|
|
this.$api.SaveOrUpdateSchoolVolume(this.addVolumesData).then(res => {
|
|
this.$api.SaveOrUpdateSchoolVolume(this.addVolumesData).then(res => {
|
|
this.volumesList.push(res.result.data);
|
|
this.volumesList.push(res.result.data);
|
|
this.c_term_id = res.result.data.rowKey;
|
|
this.c_term_id = res.result.data.rowKey;
|
|
@@ -345,18 +405,48 @@ import { setTimeout } from 'core-js';
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
- handleDeleteSubject() {
|
|
|
|
|
|
+ //删除科目,修改科目状态
|
|
|
|
+ handleDeleteSubject(data) {
|
|
|
|
+ data.status = 0;
|
|
this.$Modal.confirm({
|
|
this.$Modal.confirm({
|
|
title: '删除科目',
|
|
title: '删除科目',
|
|
content: '<p>确认删除该科目?</p>',
|
|
content: '<p>确认删除该科目?</p>',
|
|
|
|
+ okText: "确认",
|
|
|
|
+ cancelText:"取消",
|
|
|
|
+ onOk: () => {
|
|
|
|
+ this.$api.SaveOrUpdateSchoolSubject(data).then(res => {
|
|
|
|
+ data.status = 1;
|
|
|
|
+ this.$Message.success("删除成功");
|
|
|
|
+ this.currentSubjectList.splice(data, 1);
|
|
|
|
+ this.subjectList.push(data);
|
|
|
|
+ this.findSchoolSubjectsByDict();
|
|
|
|
+ if (this.currentSubjectList.length == 0) {
|
|
|
|
+ this.volumesList = [];
|
|
|
|
+ this.treeData = [];
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ onCancel: () => {
|
|
|
|
+ this.$Message.info('Clicked cancel');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //删除册别,修改册别状态
|
|
|
|
+ handleDeleteVolumes(data) {
|
|
|
|
+ data.status = 0;
|
|
|
|
+ this.$Modal.confirm({
|
|
|
|
+ title: '删除科目',
|
|
|
|
+ content: '<p>确认删除该册别?</p>',
|
|
|
|
+ okText: "确认",
|
|
|
|
+ cancelText:"取消",
|
|
onOk: () => {
|
|
onOk: () => {
|
|
- this.$Message.info('Clicked ok');
|
|
|
|
|
|
+ this.$api.SaveOrUpdateSchoolVolume(data).then(res => {
|
|
|
|
+ this.$Message.success("删除成功");
|
|
|
|
+ this.subjectClick(this.subjectInfo);
|
|
|
|
+ })
|
|
},
|
|
},
|
|
onCancel: () => {
|
|
onCancel: () => {
|
|
this.$Message.info('Clicked cancel');
|
|
this.$Message.info('Clicked cancel');
|
|
@@ -430,265 +520,5 @@ import { setTimeout } from 'core-js';
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
- .syllabus-main {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- background: #fff;
|
|
|
|
- padding: 20px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .content-wrap {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- border: 2px solid #464646;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .header-wrap {
|
|
|
|
- position:relative;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 50px;
|
|
|
|
- display:flex;
|
|
|
|
- flex-direction:row;
|
|
|
|
- justify-content:space-between;
|
|
|
|
- border-bottom: 2px solid #464646;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .header-wrap /deep/ .ivu-input {
|
|
|
|
- height: 48px;
|
|
|
|
- border: 0;
|
|
|
|
- padding-left:15px;
|
|
|
|
- border-radius: 0 !important;
|
|
|
|
- border-right: 2px solid #464646;
|
|
|
|
- font-size: 14px;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #464646;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .header-wrap /deep/ .ivu-input::-webkit-input-placeholder {
|
|
|
|
- color: #464646;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .header-wrap /deep/ .ivu-input-suffix i {
|
|
|
|
- line-height: 50px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .header-right {
|
|
|
|
- height:100%;
|
|
|
|
- display:flex;
|
|
|
|
- flex-direction:row;
|
|
|
|
- justify-content:center;
|
|
|
|
- align-items:center;
|
|
|
|
- }
|
|
|
|
|
|
|
|
- .header-right-item {
|
|
|
|
- margin-right:25px;
|
|
|
|
- font-weight:500;
|
|
|
|
- font-size:12px;
|
|
|
|
- cursor:pointer;
|
|
|
|
- }
|
|
|
|
|
|
|
|
- /deep/ .subject-modal .ivu-checkbox{
|
|
|
|
- margin:10px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-wrap {
|
|
|
|
- width:100%;
|
|
|
|
- height:100%;
|
|
|
|
- display:flex;
|
|
|
|
- flex-direction:row;
|
|
|
|
- padding-bottom:50px;
|
|
|
|
- }
|
|
|
|
- .list-col {
|
|
|
|
- height: 100%;
|
|
|
|
- overflow-y:auto;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-col /deep/ .ivu-input-wrapper{
|
|
|
|
- width:60%;
|
|
|
|
- }
|
|
|
|
- .term-userNum /deep/ .ivu-input-wrapper {
|
|
|
|
- width:100%;
|
|
|
|
- }
|
|
|
|
- .pop-content .ivu-checkbox-group {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- margin-top:20px;
|
|
|
|
- }
|
|
|
|
- .pop-content .ivu-checkbox-group-item {
|
|
|
|
- margin:5px 10px;
|
|
|
|
- }
|
|
|
|
- .pop-content /deep/ .ivu-checkbox {
|
|
|
|
- margin-right:10px;
|
|
|
|
- }
|
|
|
|
- .pop-content .ivu-tabs-tabpane {
|
|
|
|
- max-height:300px;
|
|
|
|
- overflow:auto;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-left {
|
|
|
|
- width: 20%;
|
|
|
|
- background-color: rgb(204,204,204);
|
|
|
|
- margin-right:0px;
|
|
|
|
- }
|
|
|
|
- .list-middle {
|
|
|
|
- width: 35%;
|
|
|
|
- background-color: rgb(230,230,230);
|
|
|
|
- border-left: 2px solid #464646;
|
|
|
|
- border-right: 1px solid #464646;
|
|
|
|
- }
|
|
|
|
- .list-right {
|
|
|
|
- width: 45%;
|
|
|
|
- background-color: rgb(242,242,242);
|
|
|
|
- }
|
|
|
|
- .subject-item {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 80px;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- justify-content: center;
|
|
|
|
- padding-left: 15px;
|
|
|
|
- border-bottom: 1px solid #464646;
|
|
|
|
- cursor: pointer;
|
|
|
|
- }
|
|
|
|
- .subject-item:hover{
|
|
|
|
- background:#fff;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .subject-name {
|
|
|
|
- font-size:18px;
|
|
|
|
- font-weight:600;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .term-item {
|
|
|
|
- height:auto;
|
|
|
|
- padding:10px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .term-item-active {
|
|
|
|
- background:#fff;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .term-period {
|
|
|
|
- margin: 5px 0;
|
|
|
|
- font-size:14px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .term-name-title {
|
|
|
|
- font-size:18px;
|
|
|
|
- font-weight:600;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .term-add-user {
|
|
|
|
- text-decoration:underline;
|
|
|
|
- cursor:pointer;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .term-users {
|
|
|
|
- width: 100%;
|
|
|
|
- background: #fff;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: row;
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
- margin-top: 10px;
|
|
|
|
- }
|
|
|
|
- .term-user-item {
|
|
|
|
- padding:5px;
|
|
|
|
- margin:5px;
|
|
|
|
- }
|
|
|
|
- .term-user-img {
|
|
|
|
- width: 20px;
|
|
|
|
- height: 20px;
|
|
|
|
- border-radius: 50%;
|
|
|
|
- }
|
|
|
|
- .term-user-name {
|
|
|
|
- margin-left: 5px;
|
|
|
|
- color: rgb(139, 139, 139);
|
|
|
|
- }
|
|
|
|
- .centerCol {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
- }
|
|
|
|
- .center {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: row;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-col::-webkit-scrollbar { /*滚动条整体样式*/
|
|
|
|
- width: 0px; /*高宽分别对应横竖滚动条的尺寸*/
|
|
|
|
- height: 1px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-col:hover .ztree_box::-webkit-scrollbar {
|
|
|
|
- width: 5px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-col::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
|
|
|
|
- border-radius: 10px;
|
|
|
|
- -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
|
|
- background: #ffffff26;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list-col::-webkit-scrollbar-track { /*滚动条里面轨道*/
|
|
|
|
- background: #f4f4f400;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .s-block-tools {
|
|
|
|
- margin-left: 10px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .s-block-tools .ivu-icon {
|
|
|
|
- margin-left: 5px;
|
|
|
|
- margin-bottom:2px;
|
|
|
|
- font-size: 16px;
|
|
|
|
- color: rgb(185, 185, 185);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .modal-title {
|
|
|
|
- margin:10px 5px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .animated {
|
|
|
|
- animation-duration: 0.2s;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @-webkit-keyframes slideInDown {
|
|
|
|
- from {
|
|
|
|
- -webkit-transform: translate3d(0,-40%, 0);
|
|
|
|
- transform: translate3d(0, -40%, 0) !important;
|
|
|
|
- visibility: visible;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- to {
|
|
|
|
- -webkit-transform: translate3d(0, 0%, 0);
|
|
|
|
- transform: translate3d(0, 0%, 0);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @keyframes slideInDown {
|
|
|
|
- from {
|
|
|
|
- -webkit-transform: translate3d(0, -20%, 0);
|
|
|
|
- transform: translate3d(0, -20%, 0) !important;
|
|
|
|
- visibility: visible;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- to {
|
|
|
|
- -webkit-transform: translate3d(0, 0%, 0);
|
|
|
|
- transform: translate3d(0, 0%, 0);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .slideInDown {
|
|
|
|
- -webkit-animation-name: slideInDown;
|
|
|
|
- animation-name: slideInDown;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .d-none {
|
|
|
|
- display:none;
|
|
|
|
- }
|
|
|
|
-</style>
|
|
|