-
当前课程共有 {{resList.length}} 个标签引用
+
+ 当前课程共有 {{ resList.length }} 个标签引用
+
- {{index + 1}}、 {{ item.title }}
+ {{ index + 1 }}、 {{ item.title }}
- > {{ item1.title }}
+
+ > {{ item1.title }}
- > {{ item2.title }}
+
+ > {{ item2.title }}
- > {{ item3.title }}
-
+
+ > {{ item3.title }}
+
@@ -260,6 +295,65 @@
好 的
+
+
+
+
当前操作的课程:{{ optCourse.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 主任和副主任不可以是同一个人
+
+
+
+
@@ -270,6 +364,15 @@ export default {
data() {
return {
selectType: [],
+ director: {
+ director: null,
+ ddirector: null
+ },
+ directorShow: false,
+ remoteMethodLoading: false,
+ miniClassVisible: false,
+ personSeting: false,
+ userList: [],
options: [
{
id: "all",
@@ -287,11 +390,11 @@ export default {
children: []
}
],
- courseId:"0",
+ courseId: "0",
dataForm: {
- key: "",
+ key: ""
},
- relationProducts:[],
+ relationProducts: [],
query: {
type: "",
categoryId: "",
@@ -311,7 +414,8 @@ export default {
sociologyList: "/master/courseSociology/getCourseSociologyList" //国学
},
resList: [],
- resListVisible: false
+ resListVisible: false,
+ optCourse: {}
};
},
components: {
@@ -328,28 +432,176 @@ export default {
this.getTreeList(this.urlList.sociologyList, 2);
},
methods: {
- delPro(val){
- console.log(val,this.relationProducts)
- let list = this.relationProducts
+ delPro(val) {
+ console.log(val, this.relationProducts);
+ let list = this.relationProducts;
+ this.relationProducts = list.slice(1, 1);
+ },
+ saveDirector() {
+ if(this.director.director == this.director.ddirector && this.director.director != null){
+ this.$message.error('主任与副主任不能是同一人')
+ return
+ }
+ var director = 0;
+ var ddirector = 0;
+ if (this.director.director) {
+ director = this.director.director;
+ }
+ if (this.director.ddirector) {
+ ddirector = this.director.ddirector;
+ }
+ this.$http({
+ url: this.$http.adornUrl("/master/course/editCourseDirector"),
+ method: "post",
+ data: this.$http.adornData({
+ courseId: this.optCourse.id,
+ director: director, //主任,清空时传0
+ ddirector: ddirector //副主任,清空时传0
+ })
+ })
+ .then(res => {
+ if (res.data.code == 0) {
+ this.$message.success("操作成功!");
+ this.closeDirector();
+ }
+ })
+ .catch(e => {
+ this.$message.error("获取课程信息失败");
+ _info = null;
+ });
+ },
+ closeDirector() {
+ this.directorShow = false;
+ setTimeout(() => {
+ this.$nextTick(() => {
+ this.$refs["director"].resetFields();
+ this.director = {
+ director: null,
+ ddirector: null
+ };
+ this.userList = []
+ this.optCourse = {};
+ console.log("director关闭了吗", this.director);
+ })
+
+ },200)
- this.relationProducts = list.slice(1,1)
-
-
},
- pclose(){
- this.relationProducts = []
- this.courseId = null
- console.log('关闭了 ')
+ async showDirectorShow(data) {
+ this.optCourse = data;
+ var obj = await this.getDirectorInfo(data.id);
+ console.log("教务信息", obj);
+ if (obj) {
+ // console.log("有绑定", obj.data.director.tel);
+ if (obj.data.director != null) {
+ var list = this.userList.map( item => { return item.id})
+ console.log('list',list)
+ var i = list.find(function(elem){
+ return elem == obj.data.director.id;
+ });
+ if(!i){
+ this.userList.push({
+ id:obj.data.director.id,
+ tel:obj.data.director.tel
+ })
+ }
+ this.director.director = obj.data.director.id;
+ }
+ else {
+ // this.director.director = null;
+ }
+ if (obj.data.ddirector != null) {
+ console.log('jinlailema')
+ var list = this.userList.map( item => { return item.id})
+ console.log('list',list)
+ var i = list.find(function(elem){
+ return elem == obj.data.ddirector.id;
+ });
+ if(!i){
+ this.userList.push({
+ id:obj.data.ddirector.id,
+ tel:obj.data.ddirector.tel
+ })
+ }
+ this.director.ddirector = obj.data.ddirector.id;
+ }
+ else {
+ // this.ddirector.director = null;
+ }
+
+ } else {
+ console.log("没有绑定");
+ this.director = {
+ director: null,
+ ddirector: null
+ };
+ }
+ this.directorShow = true;
},
- linkList(data){
- console.log('父级',data)
- if(data && data.length > 0){
- this.relationProducts = data
+ // 检索教务信息
+ getDirectorInfo(id) {
+ return new Promise((resolve, reject) => {
+ this.$http({
+ url: this.$http.adornUrl("/master/course/getCourseDirector"),
+ method: "post",
+ data: this.$http.adornData({
+ courseId: id
+ })
+ })
+ .then(res => {
+ resolve(res);
+ // if (res.code === 0) {
+ // _info = res.director;
+ // console.log('教务信息++++res', res.director)
+ // }
+ })
+ .catch(e => {
+ this.$message.error("获取课程信息失败");
+ reject(e);
+ });
+ });
+ },
+ // 搜索用户列表
+ remoteMethod(query) {
+ if (query !== "") {
+ this.remoteMethodLoading = true;
+ this.$http({
+ url: this.$http.adornUrl("/book/user/getUserList"),
+ method: "post",
+ data: this.$http.adornData({
+ page: 1,
+ limit: 10,
+ key: query
+ })
+ })
+ .then(({ data }) => {
+ if (data && data.code === 0) {
+ this.userList = data.user.records;
+ this.remoteMethodLoading = false;
+ }
+ })
+ .catch(e => {
+ this.userList = [];
+ this.remoteMethodLoading = false;
+ });
+ } else {
+ this.userList = [];
}
},
- showProTable(data){
- console.log('data',data)
+ pclose() {
+ this.relationProducts = [];
+ this.courseId = null;
+ console.log("关闭了 ");
+ },
+ linkList(data) {
+ console.log("父级", data);
+ if (data && data.length > 0) {
+ this.relationProducts = data;
+ }
+ },
+ showProTable(data) {
+ console.log("data", data);
this.$nextTick(() => {
this.$refs.commonShopTable.open();
});
@@ -359,7 +611,6 @@ export default {
this.resList = [];
},
showLinkTags(row) {
-
this.$http({
url: this.$http.adornUrl("/master/course/getCourseLableLinkList"),
method: "post",
@@ -370,7 +621,6 @@ export default {
this.resListVisible = true;
if (res.data.code == 0 && res.data.resList.length > 0) {
this.resList = res.data.resList;
-
}
// console.log(row, "row" , res.data.resList,this.resList);
});
@@ -404,7 +654,7 @@ export default {
},
// 获取数据列表
getDataList() {
- this.relationProducts = []
+ this.relationProducts = [];
var data = {
page: this.pageIndex,
limit: this.pageSize,
@@ -466,8 +716,8 @@ export default {
},
// 新增 / 修改
addOrUpdateHandle(row) {
- this.addOrUpdateVisible = true;
- row ? this.courseId = row.id : ''
+ this.addOrUpdateVisible = true;
+ row ? (this.courseId = row.id) : "";
// this.courseId = row.id
this.$nextTick(() => {
this.$refs.addOrUpdate.init(row);
@@ -592,6 +842,15 @@ export default {
this.getDataList();
});
}
+ },
+ computed: {
+ isSameOne() {
+ if(this.director.ddirector == this.director.director && this.director.ddirector != null){
+ return true
+ }else{
+ return false
+ }
+ }
}
};
@@ -601,4 +860,7 @@ export default {
color: #149f97;
}
}
+.flexbox {
+ display: flex;
+}
diff --git a/src/views/modules/miniClass/classAddType.vue b/src/views/modules/miniClass/classAddType.vue
new file mode 100644
index 0000000..61e16de
--- /dev/null
+++ b/src/views/modules/miniClass/classAddType.vue
@@ -0,0 +1,411 @@
+
+
+
+
+
+
+
+ 模型类型:
+
+
+
+
+
+
+
+
+ 名称:*
+
+
+
+
+
+ 课程设置: *
+ 请选择一门课程
+ 可选择多门课程
+
+
+
+
+
+
+
+
+ 教研室成员
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+ 立即创建
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/miniClass/miniClass.vue b/src/views/modules/miniClass/miniClass.vue
new file mode 100644
index 0000000..2d83142
--- /dev/null
+++ b/src/views/modules/miniClass/miniClass.vue
@@ -0,0 +1,634 @@
+
+
+
+
+
+ 基本信息管理成员设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 简介/教学目标
+
+
+
+
+
+
+
+
+
+ 创建班级
+ 保 存开班结班
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/miniClass/miniClassList.vue b/src/views/modules/miniClass/miniClassList.vue
new file mode 100644
index 0000000..6f7f309
--- /dev/null
+++ b/src/views/modules/miniClass/miniClassList.vue
@@ -0,0 +1,352 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 新开小班
+
+
+
+
+
+
+
+
+
+
+ 创建日期:{{scope.row.createTime}}
开班日期
结班日期
+
+
+
+
+ {{scope.row.state | getStatus}}
+
+
+
+
+ 修改
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/miniClass/miniClassType.vue b/src/views/modules/miniClass/miniClassType.vue
new file mode 100644
index 0000000..0c7dc7b
--- /dev/null
+++ b/src/views/modules/miniClass/miniClassType.vue
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 添加班级模型
+
+
+
+
+
+
+
+
+
+
+ 还没有绑定课程
+
+
+
+
+
+
+
+ {{scope.row.director.nickname}}
+ 电话:{{scope.row.director.tel}}
+ 邮箱:{{scope.row.director.email}}
+
+
+
+
+
+
+
+ {{scope.row.ddirector.nickname}}
+ 电话:{{scope.row.ddirector.tel}}
+ 邮箱:{{scope.row.ddirector.email}}
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/config/index.js b/static/config/index.js
index 9e62848..2dffa09 100644
--- a/static/config/index.js
+++ b/static/config/index.js
@@ -5,10 +5,10 @@
window.SITE_CONFIG = {};
// api接口请求地址
- // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川
+ window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11
- window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
+ // window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';//磊哥
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';