|
@@ -2707,38 +2707,120 @@
|
|
|
v-model="testJson.testJson[index1].answer"
|
|
|
v-if="testJson.testJson[index1].type == 1"
|
|
|
>
|
|
|
- <el-radio
|
|
|
- v-for="(item2, checkIndex) in testJson.testJson[index1]
|
|
|
- .testItem"
|
|
|
- :key="checkIndex"
|
|
|
- :label="checkIndex"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="testJson.testJson[index1].checkList[checkIndex]"
|
|
|
- placeholder="请输入选项..."
|
|
|
- style="width: 300px; margin-right: 10px"
|
|
|
- ></el-input>
|
|
|
- </el-radio>
|
|
|
+ <div class="radioBox">
|
|
|
+ <el-radio
|
|
|
+ v-for="(item2, checkIndex) in testJson.testJson[index1]
|
|
|
+ .testItem"
|
|
|
+ :key="checkIndex"
|
|
|
+ :label="checkIndex"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ style="margin-right: 10px; width: 300px"
|
|
|
+ v-if="
|
|
|
+ testJson.testJson[index1].checkList[checkIndex] &&
|
|
|
+ testJson.testJson[index1].checkList[checkIndex]
|
|
|
+ .imgType &&
|
|
|
+ testJson.testJson[index1].checkList[checkIndex]
|
|
|
+ .imgType == 1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="inImg">
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ testJson.testJson[index1].checkList[checkIndex]
|
|
|
+ .src
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="
|
|
|
+ testJson.testJson[index1].checkList[checkIndex]
|
|
|
+ "
|
|
|
+ placeholder="请输入选项..."
|
|
|
+ style="width: 300px; margin-right: 10px"
|
|
|
+ ></el-input>
|
|
|
+ <!-- <div>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="addImg($event)"
|
|
|
+ >上传图片
|
|
|
+ <input
|
|
|
+ type="file"
|
|
|
+ accept="image/*"
|
|
|
+ style="display: none"
|
|
|
+ @change="beforeUploadTi($event, index1, checkIndex)"
|
|
|
+ />
|
|
|
+ </el-button>
|
|
|
+ </div> -->
|
|
|
+ </el-radio>
|
|
|
+ </div>
|
|
|
</el-radio-group>
|
|
|
<el-checkbox-group
|
|
|
v-model="testJson.testJson[index1].answer"
|
|
|
v-if="testJson.testJson[index1].type == '2'"
|
|
|
>
|
|
|
- <el-checkbox
|
|
|
- v-for="(item2, checkIndex) in testJson.testJson[index1]
|
|
|
- .testItem"
|
|
|
- :key="checkIndex"
|
|
|
- :label="checkIndex"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="testJson.testJson[index1].checkList[checkIndex]"
|
|
|
- placeholder="请输入选项..."
|
|
|
- style="width: 300px; margin-right: 10px"
|
|
|
- ></el-input>
|
|
|
- </el-checkbox>
|
|
|
+ <div class="radioBox">
|
|
|
+ <el-checkbox
|
|
|
+ v-for="(item2, checkIndex1) in testJson.testJson[index1]
|
|
|
+ .testItem"
|
|
|
+ :key="checkIndex1"
|
|
|
+ :label="checkIndex1"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ style="margin-right: 10px; width: 300px"
|
|
|
+ v-if="
|
|
|
+ testJson.testJson[index1].checkList[checkIndex1] &&
|
|
|
+ testJson.testJson[index1].checkList[checkIndex1]
|
|
|
+ .imgType &&
|
|
|
+ testJson.testJson[index1].checkList[checkIndex1]
|
|
|
+ .imgType == 1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="inImg">
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ testJson.testJson[index1].checkList[checkIndex1]
|
|
|
+ .src
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="
|
|
|
+ testJson.testJson[index1].checkList[checkIndex1]
|
|
|
+ "
|
|
|
+ placeholder="请输入选项..."
|
|
|
+ style="width: 300px; margin-right: 10px"
|
|
|
+ ></el-input>
|
|
|
+ <!-- <div>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="addImg($event)"
|
|
|
+ >上传图片
|
|
|
+ <input
|
|
|
+ type="file"
|
|
|
+ accept="image/*"
|
|
|
+ style="display: none"
|
|
|
+ @change="
|
|
|
+ beforeUploadTi($event, index1, checkIndex1)
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </el-button>
|
|
|
+ </div> -->
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
- <div class="a_add_body_div">
|
|
|
+ <div class="a_add_body_div" style="margin-bottom: 3px">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
@@ -3527,9 +3609,12 @@
|
|
|
:before-close="handleClose"
|
|
|
class="dialog_diy"
|
|
|
>
|
|
|
- <div
|
|
|
- >
|
|
|
- <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
|
|
|
+ <div>
|
|
|
+ <Time
|
|
|
+ :preTime="preTime"
|
|
|
+ @updateTimeNum="updateTime"
|
|
|
+ v-if="dialogVisiblePreTime"
|
|
|
+ ></Time>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisiblePreTime = false">取 消</el-button>
|
|
@@ -3603,7 +3688,7 @@ import Time from "../tools/time.vue";
|
|
|
import Sunburst from "../tools/sunburst";
|
|
|
import SeeBoard from "../tools/seeBoard";
|
|
|
export default {
|
|
|
- components: { EditorBar, Mind,Time, Sunburst, SeeBoard, Table },
|
|
|
+ components: { EditorBar, Mind, Time, Sunburst, SeeBoard, Table },
|
|
|
data() {
|
|
|
return {
|
|
|
checkAll: false,
|
|
@@ -3632,7 +3717,7 @@ export default {
|
|
|
courseName: "",
|
|
|
isTeacherSee: true,
|
|
|
courseText: "",
|
|
|
- preTime:0,
|
|
|
+ preTime: 0,
|
|
|
formLabelWidth: "100px",
|
|
|
choosePicVisible: false,
|
|
|
sysPicVisible: false,
|
|
@@ -3669,7 +3754,7 @@ export default {
|
|
|
dialogVisibleTable: false,
|
|
|
tableJson: { text: "" },
|
|
|
dialogVisibleMoreUpload: false,
|
|
|
- dialogVisiblePreTime:false,
|
|
|
+ dialogVisiblePreTime: false,
|
|
|
uploadJson: [],
|
|
|
classJuri: [],
|
|
|
cover: [], //项目封面
|
|
@@ -3905,7 +3990,10 @@ export default {
|
|
|
handleClose(done) {
|
|
|
done();
|
|
|
},
|
|
|
-
|
|
|
+ imgChange2(i, j) {
|
|
|
+ var _tmp = this.testJson.testJson[i].checkList[j];
|
|
|
+ this.noneBtnImg = _tmp.length >= 1;
|
|
|
+ },
|
|
|
imgChange1(file, fileList, type, itemTaskIndex) {
|
|
|
if (type == 1) {
|
|
|
var _tmp = this.cover;
|
|
@@ -4315,6 +4403,55 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
this.dialogVisible7 = true;
|
|
|
},
|
|
|
+ beforeUploadTi(event, i, j) {
|
|
|
+ const loading = this.openLoading();
|
|
|
+ var file = event.target.files[0];
|
|
|
+ var credentials = {
|
|
|
+ accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
+ secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
|
+ }; //秘钥形式的登录上传
|
|
|
+ window.AWS.config.update(credentials);
|
|
|
+ window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
+
|
|
|
+ var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
|
|
|
+ var _this = this;
|
|
|
+
|
|
|
+ if (file) {
|
|
|
+ var params = {
|
|
|
+ Key:
|
|
|
+ file.name.split(".")[0] +
|
|
|
+ new Date().getTime() +
|
|
|
+ "." +
|
|
|
+ file.name.split(".")[file.name.split(".").length - 1],
|
|
|
+ ContentType: file.type,
|
|
|
+ Body: file,
|
|
|
+ "Access-Control-Allow-Credentials": "*",
|
|
|
+ ACL: "public-read",
|
|
|
+ }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
|
|
|
+ var options = {
|
|
|
+ partSize: 2048 * 1024 * 1024,
|
|
|
+ queueSize: 2,
|
|
|
+ leavePartsOnError: true,
|
|
|
+ };
|
|
|
+ bucket
|
|
|
+ .upload(params, options)
|
|
|
+ .on("httpUploadProgress", function (evt) {
|
|
|
+ //这里可以写进度条
|
|
|
+ // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
|
+ })
|
|
|
+ .send(function (err, data) {
|
|
|
+ loading.close();
|
|
|
+ if (err) {
|
|
|
+ _this.$message.error("上传失败");
|
|
|
+ } else {
|
|
|
+ _this.testJson.testJson[i].checkList[j] = {};
|
|
|
+ _this.testJson.testJson[i].checkList[j].src = data.Location;
|
|
|
+ _this.testJson.testJson[i].checkList[j].imgType = 1;
|
|
|
+ _this.imgChange2(i, j);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
beforeUpload1(event, type) {
|
|
|
const loading = this.openLoading();
|
|
|
var file = event.target.files[0];
|
|
@@ -5453,8 +5590,7 @@ export default {
|
|
|
this.sentenceList = sentenceList;
|
|
|
}
|
|
|
this.dialogVisibleSentence = true;
|
|
|
- }
|
|
|
- else if (i == 48) {
|
|
|
+ } else if (i == 48) {
|
|
|
if (
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
|
|
|
.toolChoose[toolIndex].tableJson
|
|
@@ -5471,8 +5607,7 @@ export default {
|
|
|
this.tableJson = tableJson;
|
|
|
}
|
|
|
this.dialogVisibleTable = true;
|
|
|
- }
|
|
|
- else if (i == 50) {
|
|
|
+ } else if (i == 50) {
|
|
|
if (
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
|
|
|
.toolChoose[toolIndex].uploadJson
|
|
@@ -6412,6 +6547,55 @@ export default {
|
|
|
console.log(this.courseTypeId);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ selectAllType() {
|
|
|
+ let params = {
|
|
|
+ org: this.org && this.org != "" ? this.org : "",
|
|
|
+ oid: this.oid && this.oid != "" ? this.oid : "",
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectAllType", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.CourseType = res.data;
|
|
|
+ for (var i = 0; i < res.data[0].length; i++) {
|
|
|
+ if (!this.cid) {
|
|
|
+ this.courseTypeId[res.data[0][i].id] = [];
|
|
|
+ }
|
|
|
+ if (!this.CourseTypeJson[res.data[0][i].id]) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id] = [];
|
|
|
+ }
|
|
|
+ if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
|
|
|
+ if (res.data[0][i].name == "栏目") {
|
|
|
+ this.CourseType[0][i].name = "主题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.data[2].length == 0 && res.data[3].length == 0) {
|
|
|
+ for (var j = 0; j < res.data[1].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[1][j].pid) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (res.data[2].length > 0) {
|
|
|
+ for (var j = 0; j < res.data[2].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[2][j].pid) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.data[3].length > 0) {
|
|
|
+ for (var j = 0; j < res.data[3].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[3][j].pid) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
selectType() {
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "selectType")
|
|
@@ -6753,7 +6937,7 @@ export default {
|
|
|
this.addTools(50, this.taskCount, this.toolIndex);
|
|
|
}
|
|
|
},
|
|
|
- addPreTime(){
|
|
|
+ addPreTime() {
|
|
|
if (this.preTime == 0) {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
|
|
|
this.taskCount
|
|
@@ -6812,7 +6996,7 @@ export default {
|
|
|
this.addTools(49, this.taskCount, this.toolIndex);
|
|
|
}
|
|
|
},
|
|
|
- updateTime(preTime){
|
|
|
+ updateTime(preTime) {
|
|
|
this.preTime = preTime;
|
|
|
},
|
|
|
},
|
|
@@ -6834,7 +7018,8 @@ export default {
|
|
|
this.getTeacher();
|
|
|
this.getClass();
|
|
|
this.getTemplate();
|
|
|
- this.selectType();
|
|
|
+ // this.selectType();
|
|
|
+ this.selectAllType();
|
|
|
this.selectEva();
|
|
|
this.loading = false;
|
|
|
this.timer2 = setInterval(() => {
|
|
@@ -9372,4 +9557,24 @@ ol {
|
|
|
.groupContent >>> .el-input-number.is-without-controls .el-input__inner {
|
|
|
text-align: left;
|
|
|
}
|
|
|
+.radioBox > div {
|
|
|
+ margin: 10px 0 0 10px;
|
|
|
+}
|
|
|
+.radioBox >>> .el-radio__input,
|
|
|
+.radioBox >>> .el-checkbox__inner {
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+.radioBox >>> .el-radio__label,
|
|
|
+.radioBox >>> .el-checkbox__label {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.inImg {
|
|
|
+ width: 100px;
|
|
|
+}
|
|
|
+.inImg > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+}
|
|
|
</style>
|