|
@@ -2129,8 +2129,8 @@
|
|
<div class="worksName">
|
|
<div class="worksName">
|
|
<div
|
|
<div
|
|
style="cursor: pointer"
|
|
style="cursor: pointer"
|
|
|
|
+ @click="openSname(w.sName, w.wid)"
|
|
>
|
|
>
|
|
- <!-- @click="openSname(w.sName, w.wid)" -->
|
|
|
|
{{ w.sName }}
|
|
{{ w.sName }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -6596,7 +6596,7 @@
|
|
提交
|
|
提交
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <!-- <el-dialog
|
|
|
|
|
|
+ <el-dialog
|
|
title="修改名称"
|
|
title="修改名称"
|
|
:visible.sync="dialogVisibleSname"
|
|
:visible.sync="dialogVisibleSname"
|
|
width="500px"
|
|
width="500px"
|
|
@@ -6615,7 +6615,7 @@
|
|
<el-button @click="dialogVisibleSname = false">取 消</el-button>
|
|
<el-button @click="dialogVisibleSname = false">取 消</el-button>
|
|
<el-button type="primary" @click="updateName">确 定</el-button>
|
|
<el-button type="primary" @click="updateName">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
- </el-dialog> -->
|
|
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -7061,47 +7061,6 @@ export default {
|
|
console.error(err);
|
|
console.error(err);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- // addCourseWorks(i) {
|
|
|
|
- // var typesql;
|
|
|
|
- // if (this.fileType === 0) {
|
|
|
|
- // typesql = 1;
|
|
|
|
- // } else if (this.fileType === 1) {
|
|
|
|
- // typesql = 4;
|
|
|
|
- // } else {
|
|
|
|
- // typesql = 5;
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // if (!this.studyJuri[0].cover[0].url) {
|
|
|
|
- // this.$message.error("请上传文件");
|
|
|
|
- // return;
|
|
|
|
- // }
|
|
|
|
- // let params = [
|
|
|
|
- // {
|
|
|
|
- // uid: this.userid,
|
|
|
|
- // cid: this.id,
|
|
|
|
- // stage: this.courseType,
|
|
|
|
- // task: i,
|
|
|
|
- // tool: this.toolindex,
|
|
|
|
- // content: this.studyJuri[0].cover[0].url,
|
|
|
|
- // type: typesql,
|
|
|
|
- // },
|
|
|
|
- // ];
|
|
|
|
- // this.ajax
|
|
|
|
- // .post(this.$store.state.api + "addCourseWorksR", params)
|
|
|
|
- // .then((res) => {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: "提交成功",
|
|
|
|
- // type: "success",
|
|
|
|
- // });
|
|
|
|
- // this.studyJuri[0].cover = [];
|
|
|
|
- // this.dialogVisible = false;
|
|
|
|
- // this.getCourseDetail();
|
|
|
|
- // })
|
|
|
|
- // .catch((err) => {
|
|
|
|
- // this.$message.error("提交失败");
|
|
|
|
- // console.error(err);
|
|
|
|
- // });
|
|
|
|
- // },
|
|
|
|
addCourseWorks(i) {
|
|
addCourseWorks(i) {
|
|
var typesql;
|
|
var typesql;
|
|
if (this.fileType === 0) {
|
|
if (this.fileType === 0) {
|
|
@@ -7116,74 +7075,34 @@ export default {
|
|
this.$message.error("请上传文件");
|
|
this.$message.error("请上传文件");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (this.workTypeA == true) {
|
|
|
|
- this.$confirm(
|
|
|
|
- "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
|
|
|
|
- "提示",
|
|
|
|
- {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning",
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- .then(() => {
|
|
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- uid: this.userid,
|
|
|
|
- cid: this.id,
|
|
|
|
- stage: this.courseType,
|
|
|
|
- task: i,
|
|
|
|
- tool: this.toolindex,
|
|
|
|
- content: this.studyJuri[0].cover[0].url,
|
|
|
|
- type: typesql,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- this.ajax
|
|
|
|
- .post(this.$store.state.api + "addCourseWorks", params)
|
|
|
|
- .then((res) => {
|
|
|
|
- this.$message({
|
|
|
|
- message: "提交成功",
|
|
|
|
- type: "success",
|
|
|
|
- });
|
|
|
|
- this.studyJuri[0].cover = [];
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
- this.getCourseDetail();
|
|
|
|
- })
|
|
|
|
- .catch((err) => {
|
|
|
|
- this.$message.error("提交失败");
|
|
|
|
- console.error(err);
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- .catch(() => {});
|
|
|
|
- } else {
|
|
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- uid: this.userid,
|
|
|
|
- cid: this.id,
|
|
|
|
- stage: this.courseType,
|
|
|
|
- task: i,
|
|
|
|
- tool: this.toolindex,
|
|
|
|
- content: this.studyJuri[0].cover[0].url,
|
|
|
|
- type: typesql,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- this.ajax
|
|
|
|
- .post(this.$store.state.api + "addCourseWorks", params)
|
|
|
|
- .then((res) => {
|
|
|
|
- this.$message({
|
|
|
|
- message: "提交成功",
|
|
|
|
- type: "success",
|
|
|
|
- });
|
|
|
|
- this.studyJuri[0].cover = [];
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
- this.getCourseDetail();
|
|
|
|
- })
|
|
|
|
- .catch((err) => {
|
|
|
|
- this.$message.error("提交失败");
|
|
|
|
- console.error(err);
|
|
|
|
|
|
+ let params = [
|
|
|
|
+ {
|
|
|
|
+ uid: this.userid,
|
|
|
|
+ cid: this.id,
|
|
|
|
+ stage: this.courseType,
|
|
|
|
+ task: i,
|
|
|
|
+ tool: this.toolindex,
|
|
|
|
+ content: this.studyJuri[0].cover[0].url,
|
|
|
|
+ type: typesql,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ this.ajax
|
|
|
|
+ .post(this.$store.state.api + "addCourseWorksR", params)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "提交成功",
|
|
|
|
+ type: "success",
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ this.studyJuri[0].cover = [];
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ this.getCourseDetail();
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ this.$message.error("提交失败");
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
+
|
|
addCourseWorksPl(i) {
|
|
addCourseWorksPl(i) {
|
|
let _files = this.plworkFile;
|
|
let _files = this.plworkFile;
|
|
var c = 1;
|
|
var c = 1;
|
|
@@ -10534,32 +10453,32 @@ export default {
|
|
this.fulltype = type;
|
|
this.fulltype = type;
|
|
this.fullUrl = url;
|
|
this.fullUrl = url;
|
|
},
|
|
},
|
|
- // openSname(n, id) {
|
|
|
|
- // this.snameWid = id;
|
|
|
|
- // this.worksSName = n;
|
|
|
|
- // this.dialogVisibleSname = true;
|
|
|
|
- // },
|
|
|
|
- // updateName() {
|
|
|
|
- // let params = {
|
|
|
|
- // n: this.worksSName,
|
|
|
|
- // cid: this.snameWid,
|
|
|
|
- // };
|
|
|
|
- // this.ajax
|
|
|
|
- // .get(this.$store.state.api + "updateCourseWorksName", params)
|
|
|
|
- // .then((res) => {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: "修改成功",
|
|
|
|
- // type: "success",
|
|
|
|
- // });
|
|
|
|
- // this.dialogVisibleSname = false;
|
|
|
|
- // this.getCourseDetail();
|
|
|
|
- // this.snameWid = "";
|
|
|
|
- // this.worksSName = "";
|
|
|
|
- // })
|
|
|
|
- // .catch((err) => {
|
|
|
|
- // console.error(err);
|
|
|
|
- // });
|
|
|
|
- // },
|
|
|
|
|
|
+ openSname(n, id) {
|
|
|
|
+ this.snameWid = id;
|
|
|
|
+ this.worksSName = n;
|
|
|
|
+ this.dialogVisibleSname = true;
|
|
|
|
+ },
|
|
|
|
+ updateName() {
|
|
|
|
+ let params = {
|
|
|
|
+ n: this.worksSName,
|
|
|
|
+ cid: this.snameWid,
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "updateCourseWorksName", params)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "修改成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ this.dialogVisibleSname = false;
|
|
|
|
+ this.getCourseDetail();
|
|
|
|
+ this.snameWid = "";
|
|
|
|
+ this.worksSName = "";
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
downloadFile(url) {
|
|
downloadFile(url) {
|
|
let _url = "";
|
|
let _url = "";
|
|
if (
|
|
if (
|