|
@@ -207,16 +207,19 @@
|
|
|
添加权限
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <div style="flex: 0.5 1 0%; margin: 0">
|
|
|
+ <div
|
|
|
+ style="flex: 0.5 1 0%; margin: 0"
|
|
|
+ v-if="courseUserid != '' ? courseUserid == userid : true"
|
|
|
+ >
|
|
|
<div class="bInfo_title">协同编辑</div>
|
|
|
<div
|
|
|
class="addPeople"
|
|
|
- @click="isNoFinsh"
|
|
|
+ @click="dialogVisibleMember = true"
|
|
|
style="background: #6b92c9"
|
|
|
>
|
|
|
添加协同成员
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -745,7 +748,7 @@
|
|
|
:class="
|
|
|
itemTool.toolType == 0 ? 'isChooseActive' : ''
|
|
|
"
|
|
|
- @click="itemTool.toolType = 0"
|
|
|
+ @click="itemTool.toolType = 0,$forceUpdate();"
|
|
|
>
|
|
|
展示类
|
|
|
</div>
|
|
@@ -753,7 +756,7 @@
|
|
|
:class="
|
|
|
itemTool.toolType == 1 ? 'isChooseActive' : ''
|
|
|
"
|
|
|
- @click="itemTool.toolType = 1"
|
|
|
+ @click="itemTool.toolType = 1,$forceUpdate();"
|
|
|
>
|
|
|
思维类
|
|
|
</div>
|
|
@@ -761,7 +764,7 @@
|
|
|
:class="
|
|
|
itemTool.toolType == 2 ? 'isChooseActive' : ''
|
|
|
"
|
|
|
- @click="itemTool.toolType = 2"
|
|
|
+ @click="itemTool.toolType = 2,$forceUpdate();"
|
|
|
>
|
|
|
评价类
|
|
|
</div>
|
|
@@ -769,7 +772,7 @@
|
|
|
:class="
|
|
|
itemTool.toolType == 3 ? 'isChooseActive' : ''
|
|
|
"
|
|
|
- @click="itemTool.toolType = 3"
|
|
|
+ @click="itemTool.toolType = 3,$forceUpdate();"
|
|
|
>
|
|
|
创作类
|
|
|
</div>
|
|
@@ -1354,9 +1357,9 @@
|
|
|
<!-- <div>您的课程编号</div>
|
|
|
<div class="number">{{ number }}</div> -->
|
|
|
<div class="success_button">
|
|
|
- <div class="look_course" @click="isNoFinsh">
|
|
|
+ <!-- <div class="look_course" @click="isNoFinsh">
|
|
|
邀请老师协同编辑
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="attend_others" @click="goCourse">预览课程</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1560,6 +1563,52 @@
|
|
|
<el-button type="primary" @click="isAddClass">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="添加协同成员"
|
|
|
+ :visible.sync="dialogVisibleMember"
|
|
|
+ :append-to-body="true"
|
|
|
+ width="25%"
|
|
|
+ height="80%"
|
|
|
+ :before-close="handleClose"
|
|
|
+ class="addNewPP customWidth"
|
|
|
+ >
|
|
|
+ <div class="people">
|
|
|
+ <div class="people_top">
|
|
|
+ <div class="people_nav">选择成员</div>
|
|
|
+ <div class="people_top_right">
|
|
|
+ <div class="people_search">
|
|
|
+ <el-input
|
|
|
+ placeholder="搜索成员"
|
|
|
+ v-model="searchTN"
|
|
|
+ @keyup.enter.native="getTeacher"
|
|
|
+ ></el-input>
|
|
|
+ <div class="search_img" @click="getTeacher">
|
|
|
+ <img src="../../assets/icon/search.png" alt />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="checkboxList3"
|
|
|
+ class="people_name"
|
|
|
+ v-if="teacherJuri.length"
|
|
|
+ >
|
|
|
+ <el-checkbox
|
|
|
+ v-for="item in teacherJuri"
|
|
|
+ :key="item.userid"
|
|
|
+ :label="item.userid"
|
|
|
+ >{{
|
|
|
+ (item.name ? item.name : "暂无姓名") + " " + item.username
|
|
|
+ }}</el-checkbox
|
|
|
+ >
|
|
|
+ </el-checkbox-group>
|
|
|
+ <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisibleMember = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog
|
|
|
title="创建问卷调查"
|
|
|
:visible.sync="dialogVisible5"
|
|
@@ -1933,8 +1982,10 @@ export default {
|
|
|
dialogVisible7: false,
|
|
|
dialogVisible8: false,
|
|
|
dialogVisibleClass: false,
|
|
|
+ dialogVisibleMember: false,
|
|
|
publicTool: 0,
|
|
|
searchPeople: "",
|
|
|
+ searchTN: "",
|
|
|
userid: this.$route.query.userid,
|
|
|
oid: this.$route.query.oid,
|
|
|
cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
|
|
@@ -1990,8 +2041,10 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
studentJuri: [],
|
|
|
+ teacherJuri: [],
|
|
|
checkboxList: [],
|
|
|
checkboxList2: [],
|
|
|
+ checkboxList3: [],
|
|
|
number: "",
|
|
|
tTitle: "",
|
|
|
tdetail: "",
|
|
@@ -2012,6 +2065,8 @@ export default {
|
|
|
cidType: 0,
|
|
|
answerQ: "",
|
|
|
grade: [],
|
|
|
+ courseUserid: "",
|
|
|
+ timer: null,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -2628,6 +2683,28 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ getTeacher() {
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ cu: "",
|
|
|
+ cn: this.searchTN,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectTeacherAdd", params)
|
|
|
+ .then((res) => {
|
|
|
+ let teacherJuri = res.data[0];
|
|
|
+ for (var i = 0; i < teacherJuri.length; i++) {
|
|
|
+ if (teacherJuri[i].userid == this.userid) {
|
|
|
+ teacherJuri.splice(i, 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.teacherJuri = teacherJuri;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
searchStudent() {
|
|
|
this.getStudent();
|
|
|
},
|
|
@@ -2738,10 +2815,12 @@ export default {
|
|
|
chapters: JSON.stringify(this.unitJson).replaceAll(/%/g, "%25"),
|
|
|
template: this.cTemplate != "undefined" ? this.cTemplate : "",
|
|
|
courseType: JSON.stringify(this.courseTypeId),
|
|
|
+ ateacher:
|
|
|
+ this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
|
|
|
},
|
|
|
];
|
|
|
this.ajax
|
|
|
- .post(this.$store.state.api + "addWorkNew2", params)
|
|
|
+ .post(this.$store.state.api + "addWorkNew3", params)
|
|
|
.then((res) => {
|
|
|
this.$message({
|
|
|
message: "新增成功",
|
|
@@ -2788,10 +2867,12 @@ export default {
|
|
|
template: this.myWord != "undefined" ? this.myWord : [],
|
|
|
uid: this.userid,
|
|
|
courseType: JSON.stringify(this.courseTypeId),
|
|
|
+ ateacher:
|
|
|
+ this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
|
|
|
},
|
|
|
];
|
|
|
this.ajax
|
|
|
- .post(this.$store.state.api + "updateWorkNew2", params)
|
|
|
+ .post(this.$store.state.api + "updateWorkNew3", params)
|
|
|
.then((res) => {
|
|
|
this.$message({
|
|
|
message: "修改成功",
|
|
@@ -2863,6 +2944,9 @@ export default {
|
|
|
isAddClass() {
|
|
|
this.dialogVisibleClass = false;
|
|
|
},
|
|
|
+ isAddPPTeacher() {
|
|
|
+ this.dialogVisibleMember = false;
|
|
|
+ },
|
|
|
getTemplate() {
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "getCourseTemplateT", "")
|
|
@@ -3347,17 +3431,28 @@ export default {
|
|
|
// res.data[0][0].course_student.length > 0
|
|
|
// ? JSON.parse(res.data[0][0].course_student)
|
|
|
// : [];
|
|
|
- this.checkboxList2 =
|
|
|
- res.data[0][0].juri ? res.data[0][0].juri.split(",") : [];
|
|
|
+ this.checkboxList2 = res.data[0][0].juri
|
|
|
+ ? res.data[0][0].juri.split(",")
|
|
|
+ : [];
|
|
|
+ this.checkboxList3 = res.data[0][0].course_teacher
|
|
|
+ ? res.data[0][0].course_teacher.split(",")
|
|
|
+ : [];
|
|
|
this.isTeacherSee =
|
|
|
res.data[0][0].is_teacher_look == 0 ? true : false;
|
|
|
this.myWord = res.data[0][0].template;
|
|
|
this.templateC.id = "123";
|
|
|
+ this.courseUserid = res.data[0][0].userid;
|
|
|
this.nbOrder = res.data[0][0].ordernumber;
|
|
|
for (var i = 0; i < res.data[1].length; i++) {
|
|
|
this.courseTypeId.push(res.data[1][i].typeid);
|
|
|
}
|
|
|
console.log(this.courseTypeId);
|
|
|
+ // if (this.timer) clearInterval(this.timer);
|
|
|
+ if (this.timer) clearTimeout(this.timer);
|
|
|
+ this.timer = null;
|
|
|
+ // this.timer = setInterval(() => {
|
|
|
+ this.seleteCourseUpdate();
|
|
|
+ // }, 5000);
|
|
|
this.$forceUpdate();
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -3365,6 +3460,31 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ seleteCourseUpdate() {
|
|
|
+ let params = {
|
|
|
+ cid: this.cid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "select_course_detail", params)
|
|
|
+ .then((res) => {
|
|
|
+ let unitJson = JSON.parse(res.data[0][0].chapters);
|
|
|
+ let _unitIndex = this.unitIndex;
|
|
|
+ for (let i = 0; i < unitJson.length; i++) {
|
|
|
+ if (i == _unitIndex) {
|
|
|
+ continue;
|
|
|
+ } else {
|
|
|
+ this.unitJson[i] = unitJson[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.seleteCourseUpdate();
|
|
|
+ }, 5000);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
getTypeName() {
|
|
|
console.log(this.courseTypeId);
|
|
|
this.$forceUpdate();
|
|
@@ -3416,8 +3536,18 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
},
|
|
|
+ beforeDestroy() {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.timer = null;
|
|
|
+ },
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.timer = null;
|
|
|
+ next();
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getStudent();
|
|
|
+ this.getTeacher();
|
|
|
this.getClass();
|
|
|
this.getTemplate();
|
|
|
this.selectType();
|