|
@@ -1,10 +1,28 @@
|
|
|
<template>
|
|
|
<div class="edit_box">
|
|
|
- <div class="e_add" v-show="showLeftMenu">
|
|
|
+ <div class="e_add" v-show="showLeftMenu" v-if="false">
|
|
|
<div class="title" style="margin-bottom: 20px">题目添加</div>
|
|
|
- <span class="e_a_foldIcon" style="right: 0;" @click="showLeftMenu=false">
|
|
|
- <svg t="1728443188732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5721" width="200" height="200"><path d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z" p-id="5722"></path></svg>
|
|
|
- </span>
|
|
|
+ <span
|
|
|
+ class="e_a_foldIcon"
|
|
|
+ style="right: 0;"
|
|
|
+ @click="showLeftMenu = false"
|
|
|
+ >
|
|
|
+ <svg
|
|
|
+ t="1728443188732"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="5721"
|
|
|
+ width="200"
|
|
|
+ height="200"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
|
|
|
+ p-id="5722"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
<div class="e_add_box">
|
|
|
<div class="title">基础题型</div>
|
|
|
<div class="e_add_ci">
|
|
@@ -27,7 +45,7 @@
|
|
|
pub_test_btn_course: item.value == 6,
|
|
|
pub_test_btn_eva: item.value == 7,
|
|
|
pub_test_btn_time: item.value == 8,
|
|
|
- pub_test_btn_choose2: item.value == 9,
|
|
|
+ pub_test_btn_choose2: item.value == 9
|
|
|
}"
|
|
|
>
|
|
|
{{ item.label }}
|
|
@@ -49,7 +67,7 @@
|
|
|
<button
|
|
|
class="pub_test_btn"
|
|
|
:class="{
|
|
|
- pub_test_btn_course: item.value == 6 || item.value == 11,
|
|
|
+ pub_test_btn_course: item.value == 6 || item.value == 11
|
|
|
}"
|
|
|
>
|
|
|
{{ item.label }}
|
|
@@ -74,7 +92,7 @@
|
|
|
class="pub_test_btn"
|
|
|
:class="{
|
|
|
pub_test_btn_group: item.type == 1,
|
|
|
- pub_test_btn_page: item.type == 2,
|
|
|
+ pub_test_btn_page: item.type == 2
|
|
|
}"
|
|
|
>
|
|
|
{{ item.name }}
|
|
@@ -85,23 +103,58 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="e_viewFile" v-show="viewFile" :style="`margin-right:${!showLeftMenu?'20px':0};margin-left:${showLeftMenu?'20px':'0'}`">
|
|
|
- <iframe
|
|
|
+ <div
|
|
|
+ class="e_viewFile"
|
|
|
+ v-show="viewFile"
|
|
|
+ :style="
|
|
|
+ `margin-right:${!showLeftMenu ? '20px' : 0};margin-left:${
|
|
|
+ showLeftMenu ? '20px' : '0'
|
|
|
+ }`
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <iframe
|
|
|
ref="viframe"
|
|
|
- v-if="fileData && fileData.url"
|
|
|
+ v-if="fileData && fileData.url"
|
|
|
style="width: 100%; height: 100%; border: none"
|
|
|
:src="
|
|
|
'https://view.officeapps.live.com/op/view.aspx?src=' +
|
|
|
encodeURIComponent(fileData.url)
|
|
|
"
|
|
|
></iframe>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="e_content" :style="`margin-right:${showRightMenu?'20px':0};margin-left:${showLeftMenu?'20px':0};`">
|
|
|
- <div v-if="!isEditing" class="title" @click="editTitle">{{ title ? title : '请填写表单标题' }}</div>
|
|
|
- <input v-if="isEditing" class="titleInput" ref="title" v-model="titleValue" @blur="save" @keyup.enter="save" placeholder="请填写表单标题"/>
|
|
|
- <div v-if="!isEditing2" class="detail" @click="editBref">{{ brief ? brief : '请填写表单说明' }}</div>
|
|
|
- <input v-if="isEditing2" class="briefInput" ref="detail" v-model="briefValue" @blur="save2" @keyup.enter="save2" placeholder="请填写表单说明"/>
|
|
|
+ <div
|
|
|
+ class="e_content"
|
|
|
+ :style="
|
|
|
+ `margin-right:${showRightMenu ? '20px' : '0' };margin-left:${
|
|
|
+ showLeftMenu ? '20px' : '0'
|
|
|
+ };`
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div v-if="!isEditing" class="title" @click="editTitle">
|
|
|
+ {{ title ? title : "请填写表单标题" }}
|
|
|
+ </div>
|
|
|
+ <input
|
|
|
+ v-if="isEditing"
|
|
|
+ class="titleInput"
|
|
|
+ ref="title"
|
|
|
+ v-model="titleValue"
|
|
|
+ @blur="save"
|
|
|
+ @keyup.enter="save"
|
|
|
+ placeholder="请填写表单标题"
|
|
|
+ />
|
|
|
+ <div v-if="!isEditing2" class="detail" @click="editBref">
|
|
|
+ {{ brief ? brief : "请填写表单说明" }}
|
|
|
+ </div>
|
|
|
+ <input
|
|
|
+ v-if="isEditing2"
|
|
|
+ class="briefInput"
|
|
|
+ ref="detail"
|
|
|
+ v-model="briefValue"
|
|
|
+ @blur="save2"
|
|
|
+ @keyup.enter="save2"
|
|
|
+ placeholder="请填写表单说明"
|
|
|
+ />
|
|
|
<div class="e_order_box">
|
|
|
<checkOrder
|
|
|
:checkC.sync="checkC"
|
|
@@ -109,8 +162,12 @@
|
|
|
@changeJson="changeJson"
|
|
|
etype="edit"
|
|
|
:cJson.sync="cJson"
|
|
|
+ @addCheck="addCheck"
|
|
|
+ @addQtype="addQtype"
|
|
|
>
|
|
|
</checkOrder>
|
|
|
+ <addCheckPopover v-if="manualJson.length==0" @addCheck="addCheck" @addQtype="addQtype"/>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="e_order" v-show="showRightMenu">
|
|
@@ -118,9 +175,27 @@
|
|
|
题目排序
|
|
|
<span style="font-size: 14px; color: #373737">总分:{{ score }}分</span>
|
|
|
</div>
|
|
|
- <span class="e_a_foldIcon" style="left: 0;transform: rotate(180deg);" @click="showRightMenu=false">
|
|
|
- <svg t="1728443188732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5721" width="200" height="200"><path d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z" p-id="5722"></path></svg>
|
|
|
- </span>
|
|
|
+ <span
|
|
|
+ class="e_a_foldIcon"
|
|
|
+ style="left: 0;transform: rotate(180deg);"
|
|
|
+ @click="showRightMenu = false"
|
|
|
+ >
|
|
|
+ <svg
|
|
|
+ t="1728443188732"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="5721"
|
|
|
+ width="200"
|
|
|
+ height="200"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
|
|
|
+ p-id="5722"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
<div class="e_order_box" style="margin-top: 20px">
|
|
|
<checkOrder
|
|
|
:checkC.sync="checkC"
|
|
@@ -133,42 +208,82 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <span class="e_outside_foldIcon" v-if="!showLeftMenu" style="left: 0;transform: rotate(180deg);" @click="showLeftMenu = true">
|
|
|
- <svg t="1728443188732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5721" width="200" height="200"><path d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z" p-id="5722"></path></svg>
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="e_outside_foldIcon" v-if="!showRightMenu" style="right: 0;" @click="showRightMenu = true">
|
|
|
- <svg t="1728443188732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5721" width="200" height="200"><path d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z" p-id="5722"></path></svg>
|
|
|
- </span>
|
|
|
-</div>
|
|
|
+ <span
|
|
|
+ class="e_outside_foldIcon"
|
|
|
+ v-if="!showLeftMenu && false"
|
|
|
+ style="left: 0;transform: rotate(180deg);"
|
|
|
+ @click="showLeftMenu = true"
|
|
|
+ >
|
|
|
+ <svg
|
|
|
+ t="1728443188732"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="5721"
|
|
|
+ width="200"
|
|
|
+ height="200"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
|
|
|
+ p-id="5722"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span
|
|
|
+ class="e_outside_foldIcon"
|
|
|
+ v-if="!showRightMenu"
|
|
|
+ style="right: 0;"
|
|
|
+ @click="showRightMenu = true"
|
|
|
+ >
|
|
|
+ <svg
|
|
|
+ t="1728443188732"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="5721"
|
|
|
+ width="200"
|
|
|
+ height="200"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
|
|
|
+ p-id="5722"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import checkOrder from "../../components/checkOrder.vue";
|
|
|
import minxinVue from "../../minxins/minxin";
|
|
|
+import addCheckPopover from "../../../add/components/addCheckPopover.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
checkOrder,
|
|
|
+ addCheckPopover
|
|
|
},
|
|
|
mixins: [minxinVue],
|
|
|
props: {
|
|
|
checkJson: {
|
|
|
- type: Array,
|
|
|
+ type: Array
|
|
|
},
|
|
|
title: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
brief: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ viewFile: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
},
|
|
|
- viewFile:{
|
|
|
- type:Boolean,
|
|
|
- default:false,
|
|
|
- },
|
|
|
- fileData:{
|
|
|
- type:Object,
|
|
|
- default:()=>({fileName:"",url:""})
|
|
|
- },
|
|
|
+ fileData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({ fileName: "", url: "" })
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -179,8 +294,8 @@ export default {
|
|
|
titleValue: "",
|
|
|
isEditing2: false,
|
|
|
briefValue: "",
|
|
|
- showLeftMenu:true,
|
|
|
- showRightMenu:true,
|
|
|
+ showLeftMenu: false,
|
|
|
+ showRightMenu: true
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -188,17 +303,17 @@ export default {
|
|
|
handler(newVal) {
|
|
|
this.manualJson = this.depthCopy(newVal);
|
|
|
},
|
|
|
- deep: true,
|
|
|
- },
|
|
|
+ deep: true
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
score() {
|
|
|
let score = 0;
|
|
|
- this.manualJson.forEach((el) => {
|
|
|
+ this.manualJson.forEach(el => {
|
|
|
if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
|
|
|
- el.array.forEach((item) => {
|
|
|
+ el.array.forEach(item => {
|
|
|
if (item.ttype == 2 && item.array.length > 0) {
|
|
|
- item.array.forEach((item2) => {
|
|
|
+ item.array.forEach(item2 => {
|
|
|
if (item2.ttype == 1 && item2.json) {
|
|
|
score += item2.json.score ? parseFloat(item2.json.score) : 0;
|
|
|
}
|
|
@@ -212,30 +327,34 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
return score > 0 ? score : "未设置分数";
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- editTitle(){
|
|
|
+ editTitle() {
|
|
|
this.isEditing = true;
|
|
|
- this.titleValue = this.title ? JSON.parse(JSON.stringify(this.title)) : ''
|
|
|
+ this.titleValue = this.title
|
|
|
+ ? JSON.parse(JSON.stringify(this.title))
|
|
|
+ : "";
|
|
|
this.$nextTick(() => {
|
|
|
// 聚焦到输入框
|
|
|
- this.$refs['title'].focus();
|
|
|
+ this.$refs["title"].focus();
|
|
|
});
|
|
|
},
|
|
|
- save(){
|
|
|
+ save() {
|
|
|
this.isEditing = false;
|
|
|
this.$emit("updateTitle", this.titleValue);
|
|
|
},
|
|
|
- editBref(){
|
|
|
+ editBref() {
|
|
|
this.isEditing2 = true;
|
|
|
- this.briefValue = this.brief ? JSON.parse(JSON.stringify(this.brief)) : ''
|
|
|
+ this.briefValue = this.brief
|
|
|
+ ? JSON.parse(JSON.stringify(this.brief))
|
|
|
+ : "";
|
|
|
this.$nextTick(() => {
|
|
|
// 聚焦到输入框
|
|
|
- this.$refs['brief'].focus();
|
|
|
+ this.$refs["brief"].focus();
|
|
|
});
|
|
|
},
|
|
|
- save2(){
|
|
|
+ save2() {
|
|
|
this.isEditing2 = false;
|
|
|
this.$emit("updateBrief", this.briefValue);
|
|
|
},
|
|
@@ -245,27 +364,27 @@ export default {
|
|
|
},
|
|
|
addCheck(topicType) {
|
|
|
let type = 1;
|
|
|
- // if(this.manualJson.filter(i=>i.type==6).length>=1){
|
|
|
- // return this.$message.error("一个表单只能添加一个课程组件");
|
|
|
- // }
|
|
|
- function checkType(obj){
|
|
|
- if(obj.filter(i=>i.array).length>0){
|
|
|
- let bol = false;
|
|
|
- obj.forEach(i=>{
|
|
|
- console.log(i.array)
|
|
|
- if(bol)return;
|
|
|
- bol = checkType(i.array);
|
|
|
- })
|
|
|
- return bol;
|
|
|
- }else if(obj.filter(i=>i.type==6).length>=1){
|
|
|
- return true;
|
|
|
- }else{
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- if(topicType == 6 && checkType(this.manualJson)){
|
|
|
- return this.$message.error("一个表单只能添加一个课程组件");
|
|
|
- }
|
|
|
+ // if(this.manualJson.filter(i=>i.type==6).length>=1){
|
|
|
+ // return this.$message.error("一个表单只能添加一个课程组件");
|
|
|
+ // }
|
|
|
+ function checkType(obj) {
|
|
|
+ if (obj.filter(i => i.array).length > 0) {
|
|
|
+ let bol = false;
|
|
|
+ obj.forEach(i => {
|
|
|
+ console.log(i.array);
|
|
|
+ if (bol) return;
|
|
|
+ bol = checkType(i.array);
|
|
|
+ });
|
|
|
+ return bol;
|
|
|
+ } else if (obj.filter(i => i.type == 6).length >= 1) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (topicType == 6 && checkType(this.manualJson)) {
|
|
|
+ return this.$message.error("一个表单只能添加一个课程组件");
|
|
|
+ }
|
|
|
if (this.manualJson.length > 0) {
|
|
|
for (var i = 0; i < this.manualJson.length; i++) {
|
|
|
if (this.manualJson[i].ttype == 2) {
|
|
@@ -279,15 +398,15 @@ export default {
|
|
|
if (this.checkC) {
|
|
|
let _check = this.checkC.replace("x", "").split("-");
|
|
|
let _json = this.manualJson[_check[0]];
|
|
|
- let _topicType = ''
|
|
|
- if(topicType == 9 || topicType == 10){
|
|
|
- _topicType = 1
|
|
|
- }else {
|
|
|
- _topicType = topicType
|
|
|
+ let _topicType = "";
|
|
|
+ if (topicType == 9 || topicType == 10) {
|
|
|
+ _topicType = 1;
|
|
|
+ } else {
|
|
|
+ _topicType = topicType;
|
|
|
}
|
|
|
let json = {
|
|
|
ttype: 1,
|
|
|
- type: _topicType,
|
|
|
+ type: _topicType
|
|
|
};
|
|
|
if (topicType == 1) {
|
|
|
json.json = {
|
|
@@ -295,59 +414,59 @@ export default {
|
|
|
type: 1,
|
|
|
array: [
|
|
|
{ option: "选项1", img: "" },
|
|
|
- { option: "选项2", img: "" },
|
|
|
+ { option: "选项2", img: "" }
|
|
|
],
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 3) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
type: 1,
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 5) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
type: 1,
|
|
|
- detail: "",
|
|
|
+ detail: ""
|
|
|
};
|
|
|
} else if (topicType == 6) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
detail: "",
|
|
|
- courses:[]
|
|
|
+ courses: []
|
|
|
};
|
|
|
} else if (topicType == 7) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
detail: "",
|
|
|
small: 0,
|
|
|
- big: 10,
|
|
|
+ big: 10
|
|
|
};
|
|
|
} else if (topicType == 8) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
- detail: "",
|
|
|
+ detail: ""
|
|
|
};
|
|
|
- }else if (topicType == 9) {
|
|
|
+ } else if (topicType == 9) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
type: 1,
|
|
|
array: [
|
|
|
{ option: "选项1", img: "" },
|
|
|
- { option: "选项2", img: "" },
|
|
|
+ { option: "选项2", img: "" }
|
|
|
],
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
- }else if (topicType == 10) {
|
|
|
+ } else if (topicType == 10) {
|
|
|
json.json = {
|
|
|
title: "标题",
|
|
|
type: 2,
|
|
|
array: [
|
|
|
{ option: "选项1", img: "" },
|
|
|
- { option: "选项2", img: "" },
|
|
|
+ { option: "选项2", img: "" }
|
|
|
],
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 11) {
|
|
|
json.json = {
|
|
@@ -395,15 +514,15 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
if (type == 1) {
|
|
|
- let _topicType = ''
|
|
|
- if(topicType == 9 || topicType == 10){
|
|
|
- _topicType = 1
|
|
|
- }else {
|
|
|
- _topicType = topicType
|
|
|
+ let _topicType = "";
|
|
|
+ if (topicType == 9 || topicType == 10) {
|
|
|
+ _topicType = 1;
|
|
|
+ } else {
|
|
|
+ _topicType = topicType;
|
|
|
}
|
|
|
let json1 = {
|
|
|
ttype: 1,
|
|
|
- type: _topicType,
|
|
|
+ type: _topicType
|
|
|
};
|
|
|
|
|
|
if (topicType == 1) {
|
|
@@ -412,39 +531,39 @@ export default {
|
|
|
type: 1,
|
|
|
array: [
|
|
|
{ option: "选项1", img: "" },
|
|
|
- { option: "选项2", img: "" },
|
|
|
+ { option: "选项2", img: "" }
|
|
|
],
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 3) {
|
|
|
json1.json = {
|
|
|
title: "标题",
|
|
|
type: 1,
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 5) {
|
|
|
json1.json = {
|
|
|
title: "标题",
|
|
|
type: 1,
|
|
|
- detail: "",
|
|
|
+ detail: ""
|
|
|
};
|
|
|
} else if (topicType == 6) {
|
|
|
json1.json = {
|
|
|
title: "标题",
|
|
|
detail: "",
|
|
|
- courses:[]
|
|
|
+ courses: []
|
|
|
};
|
|
|
} else if (topicType == 7) {
|
|
|
json1.json = {
|
|
|
title: "标题",
|
|
|
detail: "",
|
|
|
small: 0,
|
|
|
- big: 10,
|
|
|
+ big: 10
|
|
|
};
|
|
|
} else if (topicType == 8) {
|
|
|
json1.json = {
|
|
|
title: "标题",
|
|
|
- detail: "",
|
|
|
+ detail: ""
|
|
|
};
|
|
|
} else if (topicType == 9) {
|
|
|
json1.json = {
|
|
@@ -452,9 +571,9 @@ export default {
|
|
|
type: 1,
|
|
|
array: [
|
|
|
{ option: "选项1", img: "" },
|
|
|
- { option: "选项2", img: "" },
|
|
|
+ { option: "选项2", img: "" }
|
|
|
],
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 10) {
|
|
|
json1.json = {
|
|
@@ -462,9 +581,9 @@ export default {
|
|
|
type: 2,
|
|
|
array: [
|
|
|
{ option: "选项1", img: "" },
|
|
|
- { option: "选项2", img: "" },
|
|
|
+ { option: "选项2", img: "" }
|
|
|
],
|
|
|
- answer: "",
|
|
|
+ answer: ""
|
|
|
};
|
|
|
} else if (topicType == 11) {
|
|
|
json1.json = {
|
|
@@ -473,14 +592,14 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
this.manualJson.push(json1);
|
|
|
- this.$forceUpdate()
|
|
|
+ this.$forceUpdate();
|
|
|
} else if (type == 3 || type == 2) {
|
|
|
this.$message.error("请选中分页或者分组添加题目");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
topicType = "";
|
|
|
- this.$forceUpdate()
|
|
|
+ this.$forceUpdate();
|
|
|
this.$emit("changeJson", this.manualJson);
|
|
|
},
|
|
|
addQtype(type) {
|
|
@@ -498,7 +617,7 @@ export default {
|
|
|
let json = {
|
|
|
ttype: 2,
|
|
|
array: [],
|
|
|
- isopen: true,
|
|
|
+ isopen: true
|
|
|
};
|
|
|
if (type == 1) {
|
|
|
if (this.checkC) {
|
|
@@ -512,8 +631,8 @@ export default {
|
|
|
{
|
|
|
ttype: 2,
|
|
|
array: this.depthCopy(this.manualJson),
|
|
|
- isopen: true,
|
|
|
- },
|
|
|
+ isopen: true
|
|
|
+ }
|
|
|
];
|
|
|
} else if (type == 3) {
|
|
|
if (this.checkC) {
|
|
@@ -537,8 +656,8 @@ export default {
|
|
|
{
|
|
|
ttype: 2,
|
|
|
array: this.depthCopy(this.manualJson[_check[0]].array),
|
|
|
- isopen: true,
|
|
|
- },
|
|
|
+ isopen: true
|
|
|
+ }
|
|
|
];
|
|
|
} else {
|
|
|
this.manualJson[_check[0]].array.push(json);
|
|
@@ -564,7 +683,7 @@ export default {
|
|
|
let json = {
|
|
|
ttype: 3,
|
|
|
array: [],
|
|
|
- isopen: true,
|
|
|
+ isopen: true
|
|
|
};
|
|
|
if (this.checkC) {
|
|
|
let _check = this.checkC.replace("x", "").split("-");
|
|
@@ -578,17 +697,17 @@ export default {
|
|
|
{
|
|
|
ttype: 3,
|
|
|
array: this.depthCopy(this.manualJson),
|
|
|
- isopen: true,
|
|
|
- },
|
|
|
+ isopen: true
|
|
|
+ }
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
this.$emit("changeJson", this.manualJson);
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.manualJson = this.depthCopy(this.checkJson);
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -601,7 +720,7 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
padding: 0 0 0;
|
|
|
box-sizing: border-box;
|
|
|
- position: relative;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.e_add {
|
|
@@ -613,20 +732,19 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
/* border-right: 1px solid #e5e5e5; */
|
|
|
border-radius: 5px;
|
|
|
- position: relative;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.e_content {
|
|
|
height: 100%;
|
|
|
- flex: 1;
|
|
|
- /* margin: 0 20px; */
|
|
|
+ flex: 1;
|
|
|
+ /* margin: 0 20px; */
|
|
|
/* width: calc(100% - 640px); */
|
|
|
background: #fff;
|
|
|
overflow: auto;
|
|
|
padding: 20px;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.e_content > .title {
|
|
@@ -648,7 +766,7 @@ export default {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
-.briefInput{
|
|
|
+.briefInput {
|
|
|
font-size: 14px;
|
|
|
text-align: center;
|
|
|
width: 100%;
|
|
@@ -664,10 +782,9 @@ export default {
|
|
|
width: 100%;
|
|
|
margin-bottom: 10px;
|
|
|
word-break: break-all;
|
|
|
- color:#00000066;
|
|
|
+ color: #00000066;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
.e_order {
|
|
|
height: 100%;
|
|
|
width: 300px;
|
|
@@ -676,7 +793,7 @@ export default {
|
|
|
padding: 20px 10px;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
- position: relative;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.e_add > .title,
|
|
@@ -732,51 +849,57 @@ export default {
|
|
|
width: 50%;
|
|
|
}
|
|
|
|
|
|
-.e_a_foldIcon{
|
|
|
- width: 30px;
|
|
|
- height: 30px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- position: absolute;
|
|
|
- top: 15px;
|
|
|
- border-radius: 5px 0 0 5px;
|
|
|
- background-color: #409EFF;
|
|
|
- cursor: pointer;
|
|
|
+.e_a_foldIcon {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ position: absolute;
|
|
|
+ top: 15px;
|
|
|
+ border-radius: 5px 0 0 5px;
|
|
|
+ background-color: #409eff;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.e_a_foldIcon > svg {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ fill: #fff;
|
|
|
}
|
|
|
|
|
|
-.e_a_foldIcon>svg{
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- fill: #fff;
|
|
|
+.e_outside_foldIcon {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ position: absolute;
|
|
|
+ top: 15px;
|
|
|
+ border-radius: 5px 0 0 5px;
|
|
|
+ background-color: #409eff;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
-.e_outside_foldIcon{
|
|
|
- width: 40px;
|
|
|
- height: 40px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- position: absolute;
|
|
|
- top: 15px;
|
|
|
- border-radius: 5px 0 0 5px;
|
|
|
- background-color: #409EFF;
|
|
|
- cursor: pointer;
|
|
|
+.e_outside_foldIcon > svg {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ fill: #fff;
|
|
|
}
|
|
|
|
|
|
-.e_outside_foldIcon>svg{
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- fill: #fff;
|
|
|
+.e_viewFile {
|
|
|
+ height: 100%;
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 0px;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 5px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-y: hidden;
|
|
|
}
|
|
|
|
|
|
-.e_viewFile{
|
|
|
- height: 100%;
|
|
|
- flex: 1;
|
|
|
- margin-left: 20px;
|
|
|
- background-color: #FFFFFF;
|
|
|
- border-radius: 5px;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow-y: hidden;
|
|
|
+.e_addBox{
|
|
|
+ width: 400px;
|
|
|
+ height: 300px;
|
|
|
+ background-color: red;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|