|
|
@@ -22,8 +22,9 @@
|
|
|
</div>
|
|
|
|
|
|
<el-dialog title="答题卡" :visible.sync="openAnswerFlag" width="30%">
|
|
|
- <template >
|
|
|
- <el-button v-for="(question, index) in questionAnswerDataList" :key="++index" size="medium" @click="selectQuestion(index)" circle>{{index}}</el-button>
|
|
|
+ <template>
|
|
|
+ <el-button v-for="(question, index) in questionAnswerDataList" :key="++index" size="medium"
|
|
|
+ @click="selectQuestion(index)" circle>{{index}}</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
@@ -125,7 +126,7 @@
|
|
|
</template>
|
|
|
-->
|
|
|
<template>
|
|
|
- <el-dialog :visible.sync="dialogVisible" width="80%" top="0" custom-class="GPSREN" :before-close="handleClose">
|
|
|
+ <el-dialog :visible.sync="dialogVisible" fullscreen top="0" custom-class="GPSREN" :before-close="handleClose">
|
|
|
|
|
|
<div slot="title" class="cust-title">
|
|
|
GPS-REN学习法
|
|
|
@@ -145,7 +146,7 @@
|
|
|
style="border: #eee 1px solid;background-color: aliceblue;padding: 10px;border-radius: 10px;">
|
|
|
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
|
|
<span>P</span>
|
|
|
- <span>描述问题</span>
|
|
|
+ <span>问题定义</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-step>
|
|
|
@@ -154,7 +155,7 @@
|
|
|
style="border: #eee 1px solid;background-color: aliceblue;padding: 10px;border-radius: 10px;">
|
|
|
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
|
|
<span>S</span>
|
|
|
- <span>拆解问题</span>
|
|
|
+ <span>系统拆解</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-step>
|
|
|
@@ -163,7 +164,7 @@
|
|
|
style="border: #eee 1px solid;background-color: aliceblue;padding: 10px;border-radius: 10px;">
|
|
|
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
|
|
<span>R</span>
|
|
|
- <span>结果</span>
|
|
|
+ <span>结果整合</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-step>
|
|
|
@@ -172,7 +173,7 @@
|
|
|
style="border: #eee 1px solid;background-color: aliceblue;padding: 10px;border-radius: 10px;">
|
|
|
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
|
|
<span>E</span>
|
|
|
- <span>评估方案</span>
|
|
|
+ <span>结果评估</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-step>
|
|
|
@@ -181,7 +182,7 @@
|
|
|
style="border: #eee 1px solid;background-color: aliceblue;padding: 10px;border-radius: 10px;">
|
|
|
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
|
|
<span>N</span>
|
|
|
- <span>补充了什么新知识</span>
|
|
|
+ <span>总结新知识</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-step>
|
|
|
@@ -189,7 +190,7 @@
|
|
|
<!-- <div>
|
|
|
<el-button icon="el-icon-discover" size="small" type="success">AI助手</el-button>
|
|
|
</div> -->
|
|
|
- <br/>
|
|
|
+ <br />
|
|
|
<el-col :span="24" v-if="active==0">
|
|
|
<el-form-item class="cust-label">
|
|
|
|
|
|
@@ -243,7 +244,7 @@
|
|
|
@click="()=>{active--}">上一步</el-button>
|
|
|
<el-button icon="el-icon-arrow-right" size="small" type="primary" plain v-if="active<4"
|
|
|
@click="onNext">下一步</el-button>
|
|
|
- <el-button type="primary" @click="onNext" size="small" v-if="active==4" >提交</el-button>
|
|
|
+ <el-button type="primary" @click="onNext" size="small" v-if="active==4">提交</el-button>
|
|
|
<el-button @click="dialogVisible = false" size="small">取 消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
@@ -251,7 +252,7 @@
|
|
|
|
|
|
<template>
|
|
|
<el-dialog :visible.sync="dialogResultVisible" width="50%" top="0" custom-class="GPSREN"
|
|
|
- close-on-click-modal="false">
|
|
|
+ close-on-click-modal="false">
|
|
|
<div slot="title" class="cust-title">
|
|
|
AI评价 <i :class="aiTestClass"></i>
|
|
|
</div>
|
|
|
@@ -262,8 +263,8 @@
|
|
|
<el-card>
|
|
|
<h3>{{ item.title }}</h3>
|
|
|
<p style="color:blue;font-weight: bold;">{{item.process}}</p>
|
|
|
- <br>
|
|
|
- <p v-html="item.content"></p>
|
|
|
+ <br>
|
|
|
+ <p v-html="item.content"></p>
|
|
|
</el-card>
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
@@ -272,25 +273,26 @@
|
|
|
<span slot="footer" class="dialog-footer" v-if="aiTestClass=='el-icon-reading'">
|
|
|
<el-button icon="el-icon-arrow-right" size="small" type="primary" plain v-if="active<4"
|
|
|
@click="()=>{active++;dialogResultVisible = false;}">下一步</el-button>
|
|
|
- <!-- <el-button icon="el-icon-arrow-right" size="small" type="primary" plain v-else-if="active==4"
|
|
|
+ <!-- <el-button icon="el-icon-arrow-right" size="small" type="primary" plain v-else-if="active==4"
|
|
|
@click="()=>{active++;dialogResultVisible = false;}">提交</el-button> -->
|
|
|
- <el-button type="primary" @click="()=>{dialogResultVisible = false;dialogVisible = false}" size="small" v-else-if="active==4">提交</el-button>
|
|
|
+ <el-button type="primary" @click="()=>{dialogResultVisible = false;dialogVisible = false}" size="small"
|
|
|
+ v-else-if="active==4">提交</el-button>
|
|
|
<el-button @click="dialogResultVisible = false" size="small">修改</el-button>
|
|
|
<el-button @click="()=>{dialogResultVisible = false; active=0;}" size="small">重新答题</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getDictValueByType } from '../api/dict'
|
|
|
|
|
|
-import { mockAI,steps } from '../mock/gpsren';
|
|
|
+import { mockAI, steps } from '../mock/gpsren';
|
|
|
let thisPage = null
|
|
|
|
|
|
let stepMapToCnt = {}
|
|
|
-
|
|
|
+
|
|
|
export default {
|
|
|
name: 'question-info',
|
|
|
props: {
|
|
|
@@ -352,14 +354,33 @@ export default {
|
|
|
questionAnswerDataList: [], // 试题答案列表
|
|
|
questionTotal: 0,
|
|
|
dialogVisible: false,
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ r:`//根据用户输入的P问题定义,S系统拆解,自动生成代码
|
|
|
+public void startMove() {
|
|
|
+ int n = 3;
|
|
|
+ char start = 'A';
|
|
|
+ char auxiliary = 'B';
|
|
|
+ char target = 'C';
|
|
|
+ hanoi(n, start, auxiliary, target);
|
|
|
+}
|
|
|
+
|
|
|
+public void hanoi(int n, char start, char auxiliary, char target) {
|
|
|
+ if (n == 1) {
|
|
|
+ System.out.printf("Move disk %d from %c to %c%n", n, start, target);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ hanoi(n - 1, start, target, auxiliary);
|
|
|
+ System.out.printf("Move disk %d from %c to %c%n", n, start, target);
|
|
|
+ hanoi(n - 1, auxiliary, start, target);
|
|
|
+}`
|
|
|
+ },
|
|
|
config: {
|
|
|
zIndex: 0
|
|
|
},
|
|
|
active: 0,
|
|
|
dialogResultVisible: false,
|
|
|
aiTestItem: [],
|
|
|
- aiTestClass:"el-icon-reading",
|
|
|
+ aiTestClass: "el-icon-reading",
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -383,36 +404,36 @@ export default {
|
|
|
onNext() {
|
|
|
//下一步,即时AI评价
|
|
|
|
|
|
-
|
|
|
- //弹出AI验证界面
|
|
|
- this.aiTestItem.length = 0
|
|
|
- this.dialogResultVisible = true
|
|
|
- this.aiTestClass = "el-icon-loading"
|
|
|
- let i = 0
|
|
|
-
|
|
|
- let step = steps[this.active]
|
|
|
- stepMapToCnt[step] = stepMapToCnt[step] || 0
|
|
|
-
|
|
|
- let run = () => {
|
|
|
- let st = setTimeout(() => {
|
|
|
- let ts = new Date().toLocaleString()
|
|
|
- let p = Math.floor(50 + Math.random() * 40)
|
|
|
- let data = mockAI[step][stepMapToCnt[step]]
|
|
|
- this.aiTestItem.push({
|
|
|
- title: data.title,
|
|
|
- process: data.aires.p,
|
|
|
- content: data.aires.c,
|
|
|
- time: ts
|
|
|
- })
|
|
|
- this.aiTestClass = "el-icon-reading"
|
|
|
- stepMapToCnt[step]++
|
|
|
- if(stepMapToCnt[step]>=mockAI[step].length){
|
|
|
- stepMapToCnt[step] = mockAI[step].length-1
|
|
|
- }
|
|
|
- }, 2000)
|
|
|
- }
|
|
|
|
|
|
- run()
|
|
|
+ //弹出AI验证界面
|
|
|
+ this.aiTestItem.length = 0
|
|
|
+ this.dialogResultVisible = true
|
|
|
+ this.aiTestClass = "el-icon-loading"
|
|
|
+ let i = 0
|
|
|
+
|
|
|
+ let step = steps[this.active]
|
|
|
+ stepMapToCnt[step] = stepMapToCnt[step] || 0
|
|
|
+
|
|
|
+ let run = () => {
|
|
|
+ let st = setTimeout(() => {
|
|
|
+ let ts = new Date().toLocaleString()
|
|
|
+ let p = Math.floor(50 + Math.random() * 40)
|
|
|
+ let data = mockAI[step][stepMapToCnt[step]]
|
|
|
+ this.aiTestItem.push({
|
|
|
+ title: data.title,
|
|
|
+ process: data.aires.p,
|
|
|
+ content: data.aires.c,
|
|
|
+ time: ts
|
|
|
+ })
|
|
|
+ this.aiTestClass = "el-icon-reading"
|
|
|
+ stepMapToCnt[step]++
|
|
|
+ if (stepMapToCnt[step] >= mockAI[step].length) {
|
|
|
+ stepMapToCnt[step] = mockAI[step].length - 1
|
|
|
+ }
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
+
|
|
|
+ run()
|
|
|
// if (this.active == 3) {
|
|
|
// } else {
|
|
|
// this.active++
|
|
|
@@ -578,7 +599,17 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+.el-dialog__header {
|
|
|
+ background-color: #477efa !important;
|
|
|
+ color: aliceblue !important;
|
|
|
+}
|
|
|
+
|
|
|
+.el-dialog__close{
|
|
|
+ color: aliceblue !important;
|
|
|
+}
|
|
|
+
|
|
|
.GPSREN {
|
|
|
margin-bottom: 0px !important;
|
|
|
|
|
|
@@ -704,19 +735,34 @@ export default {
|
|
|
|
|
|
|
|
|
.typing-effect {
|
|
|
- overflow: hidden; /* 确保超出部分的内容不显示 */
|
|
|
- border-right: .15em solid orange; /* 光标效果 */
|
|
|
- white-space: nowrap; /* 防止文本换行 */
|
|
|
+ overflow: hidden;
|
|
|
+ /* 确保超出部分的内容不显示 */
|
|
|
+ border-right: .15em solid orange;
|
|
|
+ /* 光标效果 */
|
|
|
+ white-space: nowrap;
|
|
|
+ /* 防止文本换行 */
|
|
|
animation: typing 3s steps(20, end), blink-caret .75s step-end infinite;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@keyframes typing {
|
|
|
- from { width: 0 }
|
|
|
- to { width: 100% }
|
|
|
+ from {
|
|
|
+ width: 0
|
|
|
+ }
|
|
|
+
|
|
|
+ to {
|
|
|
+ width: 100%
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@keyframes blink-caret {
|
|
|
- from, to { border-color: transparent }
|
|
|
- 50% { border-color: orange }
|
|
|
+
|
|
|
+ from,
|
|
|
+ to {
|
|
|
+ border-color: transparent
|
|
|
+ }
|
|
|
+
|
|
|
+ 50% {
|
|
|
+ border-color: orange
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|