|
@@ -92,7 +92,7 @@
|
|
|
<div class="title">
|
|
|
<el-tooltip :content="selectType(item)" placement="top" effect="dark">
|
|
|
<span class="test_icon"
|
|
|
- :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5 }"></span>
|
|
|
+ :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7 }"></span>
|
|
|
</el-tooltip>
|
|
|
<span>{{ item.title }}</span>
|
|
|
</div>
|
|
@@ -162,37 +162,59 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content4" v-if="item.type == 6">
|
|
|
- <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
|
|
|
- <div class="tup">
|
|
|
- <img :src="item.cover != null && item.cover != ''
|
|
|
- ? JSON.parse(item.cover).length > 0
|
|
|
- ? JSON.parse(item.cover)[0].url
|
|
|
- : mr
|
|
|
- : mr
|
|
|
- " alt />
|
|
|
- <div class="bottom_box">
|
|
|
- <div>
|
|
|
- <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
|
|
|
- <span>{{ item.title }}</span>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
- <div class="kc_t">
|
|
|
- <span>{{ item.username }}</span>
|
|
|
- <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
|
|
|
- </div>
|
|
|
- <div class="kc_time">
|
|
|
- <span style="color: #717C8D">创建日期:</span>{{ item.time }}
|
|
|
- </div>
|
|
|
- <div class="kc_time">
|
|
|
- <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
|
|
|
+ <div class="tup">
|
|
|
+ <img :src="item.cover != null && item.cover != ''
|
|
|
+ ? JSON.parse(item.cover).length > 0
|
|
|
+ ? JSON.parse(item.cover)[0].url
|
|
|
+ : mr
|
|
|
+ : mr
|
|
|
+ " alt />
|
|
|
+ <div class="bottom_box">
|
|
|
+ <div>
|
|
|
+ <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
|
|
|
+ <span>{{ item.title }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div class="kc_t">
|
|
|
+ <span>{{ item.username }}</span>
|
|
|
+ <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="kc_time">
|
|
|
+ <span style="color: #717C8D">创建日期:</span>{{ item.time }}
|
|
|
+ </div>
|
|
|
+ <div class="kc_time">
|
|
|
+ <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
|
|
|
{{ courses }}
|
|
|
</div> -->
|
|
|
</div>
|
|
|
+ <div class="content1" v-if="item.type == 7">
|
|
|
+ <div class="left">
|
|
|
+ <div class="title">
|
|
|
+ <span>评分</span>
|
|
|
+ <span>小计</span>
|
|
|
+ <span>比例</span>
|
|
|
+ </div>
|
|
|
+ <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
|
|
|
+ <span>
|
|
|
+ <span>{{ data.name }}</span>
|
|
|
+ </span>
|
|
|
+ <span>{{ data.count }}</span>
|
|
|
+ <span>
|
|
|
+ <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
|
|
|
+ :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <checkPie :dataJ="item.array"></checkPie>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="table_content" v-if="stype == 2">
|
|
@@ -412,6 +434,10 @@ export default {
|
|
|
return '问答题'
|
|
|
} else if (item.type == 5) {
|
|
|
return '附件'
|
|
|
+ } else if (item.type == 6) {
|
|
|
+ return '课程'
|
|
|
+ } else if (item.type == 7) {
|
|
|
+ return '评分'
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -540,11 +566,12 @@ export default {
|
|
|
let cJson = this.setJSON(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
|
|
|
if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
|
|
|
let _json = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
|
|
|
-
|
|
|
- for(var ja = 0; ja < _json.length; ja++){
|
|
|
+
|
|
|
+ for (var ja = 0; ja < _json.length; ja++) {
|
|
|
let _json2 = _json[ja].json
|
|
|
- if(_json[ja].type == 6){
|
|
|
- _json2.answer2 = await this.getCourse(_json2.answer2)
|
|
|
+ if (_json[ja].type == 6) {
|
|
|
+ let _cjson = await this.getCourse(_json2.answer2)
|
|
|
+ _json2.answer2 = _cjson.title
|
|
|
}
|
|
|
}
|
|
|
array.push({
|
|
@@ -571,6 +598,8 @@ export default {
|
|
|
answer: el.json ? el.json.answer : '',
|
|
|
count: 0,
|
|
|
courses: el.json ? el.json.courses : [],
|
|
|
+ small: el.json ? el.json.small : '',
|
|
|
+ big: el.json ? el.json.big : '',
|
|
|
}
|
|
|
if (topic.type == 1) {
|
|
|
for (var t = 0; t < topic.choice.length; t++) {
|
|
@@ -584,15 +613,22 @@ export default {
|
|
|
} else if (topic.type == 5) {
|
|
|
|
|
|
} else if (topic.type == 6) {
|
|
|
- let _answer = topic.courses
|
|
|
- topic.array = _answer
|
|
|
- topic.courseArray = [];
|
|
|
- topic.array.forEach(async i=>{
|
|
|
- let data = await this.getCourseDetail(i)
|
|
|
- data.update_at = new Date(data.update_at).toLocaleString().replace('/','-')
|
|
|
- topic.courseArray.push(data)
|
|
|
- })
|
|
|
+ let _answer = topic.courses
|
|
|
+ topic.array = _answer
|
|
|
+ topic.courseArray = [];
|
|
|
+ topic.array.forEach(async i => {
|
|
|
+ let data = await this.getCourse(i)
|
|
|
+ data.update_at = new Date(data.update_at).toLocaleString().replace('/', '-')
|
|
|
+ topic.courseArray.push(data)
|
|
|
+ })
|
|
|
+ } else if (topic.type == 7) {
|
|
|
+ for (var t = parseInt(topic.small); t <= parseInt(topic.big); t++) {
|
|
|
+ topic.array.push({
|
|
|
+ name: t,
|
|
|
+ count: 0
|
|
|
+ })
|
|
|
}
|
|
|
+ }
|
|
|
for (var j = 0; j < array.length; j++) {
|
|
|
let el2 = array[j]
|
|
|
if (topic.type == 1) {
|
|
@@ -625,9 +661,15 @@ export default {
|
|
|
for (var k = 0; k < _answer.length; k++) {
|
|
|
topic.array.push(_answer[k])
|
|
|
}
|
|
|
+ } else if (topic.type == 7) {
|
|
|
+ if(el2.array[i].json.answer2){
|
|
|
+ let _answer = el2.array[i].json.answer2
|
|
|
+ topic.array[_answer].count++
|
|
|
+ topic.count++
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- console.log(topic)
|
|
|
+ console.log(topic)
|
|
|
testArray.push(topic)
|
|
|
}
|
|
|
this.testArray = testArray
|
|
@@ -942,6 +984,13 @@ export default {
|
|
|
let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
|
|
|
_test += _option
|
|
|
}
|
|
|
+ } else if (item.type == 6 && item.json.answer2) {
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
|
|
|
+ _test += _option
|
|
|
+ } else if (item.type == 7 && item.json.answer2 ) {
|
|
|
+ let _score = this.getScore2(item.json)
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
|
|
|
+ _test += _option
|
|
|
}
|
|
|
}
|
|
|
_test += `</div>`
|
|
@@ -978,6 +1027,13 @@ export default {
|
|
|
let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
|
|
|
_test += _option
|
|
|
}
|
|
|
+ } else if (item.type == 6 && item.json.answer2) {
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
|
|
|
+ _test += _option
|
|
|
+ } else if (item.type == 7 && item.json.answer2 ) {
|
|
|
+ let _score = this.getScore2(item.json)
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
|
|
|
+ _test += _option
|
|
|
}
|
|
|
}
|
|
|
_test += `</div>`
|
|
@@ -1047,13 +1103,20 @@ export default {
|
|
|
let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
|
|
|
_test += _option
|
|
|
}
|
|
|
+ } else if (item.type == 6 && item.json.answer2) {
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
|
|
|
+ _test += _option
|
|
|
+ } else if (item.type == 7 && item.json.answer2 ) {
|
|
|
+ let _score = this.getScore2(item.json)
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
|
|
|
+ _test += _option
|
|
|
}
|
|
|
}
|
|
|
_test += `</div>`
|
|
|
let _html = _title + _content + _detail + _test;
|
|
|
return this.exportToWordAll(_data.name + '-' + _data.time, _html);
|
|
|
},
|
|
|
- setWordHtmlAll2(data) {
|
|
|
+ async setWordHtmlAll2(data) {
|
|
|
let _data = data
|
|
|
_data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
|
|
|
let _title = `<div style="font-size:40px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
|
|
@@ -1083,6 +1146,14 @@ export default {
|
|
|
let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
|
|
|
_test += _option
|
|
|
}
|
|
|
+ } else if (item.type == 6 && item.json.answer2) {
|
|
|
+ let _cjson = await this.getCourse(item.json.answer2)
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${_cjson.title}</div>`
|
|
|
+ _test += _option
|
|
|
+ } else if (item.type == 7 && item.json.answer2 ) {
|
|
|
+ let _score = this.getScore2(item.json)
|
|
|
+ let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
|
|
|
+ _test += _option
|
|
|
}
|
|
|
}
|
|
|
_test += `</div>`
|
|
@@ -1213,6 +1284,11 @@ export default {
|
|
|
files.push(file + 1 + '.' + check.name + '----' + check.url)
|
|
|
}
|
|
|
_json[j + 1 + "." + chapters[j].json.title] = files.join('\n')
|
|
|
+ } else if (res[i].array[j].type == 6 && res[i].array[j].json.answer2) {
|
|
|
+ _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
|
|
|
+ } else if (res[i].array[j].type == 7 && res[i].array[j].json.answer2) {
|
|
|
+ let _score = this.getScore2(res[i].array[j].json)
|
|
|
+ _json[j + 1 + "." + chapters[j].json.title] = _score
|
|
|
}
|
|
|
}
|
|
|
array.push(_json);
|
|
@@ -1257,16 +1333,15 @@ export default {
|
|
|
cid: id,
|
|
|
};
|
|
|
let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTest", params)
|
|
|
- return res.data[0][0].title
|
|
|
- },
|
|
|
- async getCourseDetail(id){
|
|
|
- let params = {
|
|
|
- cid: id,
|
|
|
- };
|
|
|
- let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTest", params)
|
|
|
-
|
|
|
return res.data[0][0]
|
|
|
- }
|
|
|
+ },
|
|
|
+ getScore2(item) {
|
|
|
+ let array = []
|
|
|
+ for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
|
|
|
+ array.push(i)
|
|
|
+ }
|
|
|
+ return item.answer2 ? array[item.answer2] : ''
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
document.getElementsByTagName('html')[0].style.overflow = ''
|
|
@@ -1861,136 +1936,136 @@ export default {
|
|
|
background: #f6f8ff;
|
|
|
}
|
|
|
|
|
|
-.content4{
|
|
|
- width: 100%;
|
|
|
- height: auto;
|
|
|
- display: flex;
|
|
|
- flex-wrap: nowrap;
|
|
|
- overflow: auto;
|
|
|
+.content4 {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ overflow: auto;
|
|
|
}
|
|
|
|
|
|
.out_box {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- flex-wrap: nowrap;
|
|
|
- /* width: 200px; */
|
|
|
- width: 280px;
|
|
|
- background: #fff;
|
|
|
- /* background-color: white; */
|
|
|
- margin-right: 15px;
|
|
|
- /* border: 1px solid #ccc; */
|
|
|
- height: fit-content;
|
|
|
- box-sizing: border-box;
|
|
|
- border-radius: 0px 0px 5px 5px;
|
|
|
- /* overflow: hidden; */
|
|
|
- margin-bottom: 15px;
|
|
|
- position: relative;
|
|
|
- border-radius: 8px;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow: hidden;
|
|
|
- border: 1px solid #3682fc00;
|
|
|
- cursor: pointer;
|
|
|
- border: 1px solid #6a9ff5;
|
|
|
- height: auto;
|
|
|
- }
|
|
|
-
|
|
|
- .out_boxActive{
|
|
|
- box-sizing: border-box;
|
|
|
- border: 3px solid #3681FC !important;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .out_box:hover {
|
|
|
- border: 1px solid #3681FC;
|
|
|
- }
|
|
|
-
|
|
|
- .out_box:nth-child(5n) {
|
|
|
- margin-right: 0;
|
|
|
- }
|
|
|
- .bottom_box {
|
|
|
- width:100%;
|
|
|
- display: flex;
|
|
|
- padding: 10px;
|
|
|
- flex-direction: column;
|
|
|
- box-sizing: border-box;
|
|
|
- height: 121px;
|
|
|
- flex-wrap: nowrap;
|
|
|
- justify-content: space-evenly;
|
|
|
- }
|
|
|
-
|
|
|
- .bottom_box>div:nth-child(1) {
|
|
|
- width: 100%;
|
|
|
- /* overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ /* width: 200px; */
|
|
|
+ min-width: 280px;
|
|
|
+ width: 280px;
|
|
|
+ background: #fff;
|
|
|
+ /* background-color: white; */
|
|
|
+ margin-right: 15px;
|
|
|
+ /* border: 1px solid #ccc; */
|
|
|
+ height: fit-content;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 0px 0px 5px 5px;
|
|
|
+ /* overflow: hidden; */
|
|
|
+ margin-bottom: 15px;
|
|
|
+ position: relative;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
+ border: 1px solid #3682fc00;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid #6a9ff5;
|
|
|
+ height: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.out_boxActive {
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 3px solid #3681FC !important;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.out_box:hover {
|
|
|
+ border: 1px solid #3681FC;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.bottom_box {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ padding: 10px;
|
|
|
+ flex-direction: column;
|
|
|
+ box-sizing: border-box;
|
|
|
+ height: 121px;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ justify-content: space-evenly;
|
|
|
+}
|
|
|
+
|
|
|
+.bottom_box>div:nth-child(1) {
|
|
|
+ width: 100%;
|
|
|
+ /* overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
font-weight: bold; */
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- }
|
|
|
-
|
|
|
- .bottom_box>div:nth-child(1)>span:nth-child(1) {
|
|
|
- max-width: 100%;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
-
|
|
|
- .bottom_box>div:nth-child(1)>span:nth-child(2) {
|
|
|
- min-width: fit-content;
|
|
|
- font-size: 14px;
|
|
|
- color: #8c8c8c;
|
|
|
- }
|
|
|
-
|
|
|
- .tup {
|
|
|
- width: 100%;
|
|
|
- height: auto;
|
|
|
- margin: 0 auto;
|
|
|
- overflow: hidden;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- padding: 10px;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
-
|
|
|
- .tup>img {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- object-fit: cover;
|
|
|
- }
|
|
|
-
|
|
|
- .kc_time {
|
|
|
- margin-top: 8px;
|
|
|
- font-size: 14px;
|
|
|
- color: #717C8D;
|
|
|
- }
|
|
|
-
|
|
|
- .kc_time+.kc_time {
|
|
|
- margin-top: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .kc_t {
|
|
|
- margin-top: 5px;
|
|
|
- width: 100%;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- }
|
|
|
- .kc_t>span:nth-child(1) {
|
|
|
- max-width: 100%;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
-
|
|
|
- .kc_t>span:nth-child(2) {
|
|
|
- min-width: fit-content;
|
|
|
- font-size: 14px;
|
|
|
- color: #8c8c8c;
|
|
|
- }
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.bottom_box>div:nth-child(1)>span:nth-child(1) {
|
|
|
+ max-width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+.bottom_box>div:nth-child(1)>span:nth-child(2) {
|
|
|
+ min-width: fit-content;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #8c8c8c;
|
|
|
+}
|
|
|
+
|
|
|
+.tup {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ margin: 0 auto;
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.tup>img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+}
|
|
|
+
|
|
|
+.kc_time {
|
|
|
+ margin-top: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #717C8D;
|
|
|
+}
|
|
|
+
|
|
|
+.kc_time+.kc_time {
|
|
|
+ margin-top: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.kc_t {
|
|
|
+ margin-top: 5px;
|
|
|
+ width: 100%;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.kc_t>span:nth-child(1) {
|
|
|
+ max-width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+
|
|
|
+.kc_t>span:nth-child(2) {
|
|
|
+ min-width: fit-content;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #8c8c8c;
|
|
|
+}
|
|
|
</style>
|