|
|
|
@ -204,7 +204,8 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
// import { getUserId, getToken } from "@/utils/auth.js";
|
|
|
|
// import { getUserId, getToken } from "@/utils/auth.js";\
|
|
|
|
|
|
|
|
import { getUserInfo,getToken } from '@/utils/auth'
|
|
|
|
import * as commonality from "@/api/commonality.js";
|
|
|
|
import * as commonality from "@/api/commonality.js";
|
|
|
|
import {getAssetsFile} from '@/utils/index.js'
|
|
|
|
import {getAssetsFile} from '@/utils/index.js'
|
|
|
|
import { ref } from "vue";
|
|
|
|
import { ref } from "vue";
|
|
|
|
@ -235,7 +236,7 @@ const Identifyimg=ref('szjj/setpt2.png')
|
|
|
|
const dialogShowbtn = () => {
|
|
|
|
const dialogShowbtn = () => {
|
|
|
|
getlist();
|
|
|
|
getlist();
|
|
|
|
if(restartCount.value>0) return
|
|
|
|
if(restartCount.value>0) return
|
|
|
|
commonality.getImgEcho({module:'图像识别',userId:'487'}).then((res) => {
|
|
|
|
commonality.getImgEcho({module:'图像识别',userId:JSON.parse(getUserInfo()).userId}).then((res) => {
|
|
|
|
if(res.data.length<0) return
|
|
|
|
if(res.data.length<0) return
|
|
|
|
Answer.value = res.data[0].selectPicture;
|
|
|
|
Answer.value = res.data[0].selectPicture;
|
|
|
|
value.value = res.data[0].selectText;
|
|
|
|
value.value = res.data[0].selectText;
|
|
|
|
@ -243,10 +244,10 @@ const dialogShowbtn = () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const getlist = () => {
|
|
|
|
const getlist = () => {
|
|
|
|
commonality.getImgList({ userId: '487', module: "图像识别" }).then((res) => {
|
|
|
|
commonality.getImgList({ userId: JSON.parse(getUserInfo()).userId, module: "图像识别" }).then((res) => {
|
|
|
|
topicList.value = res.data;
|
|
|
|
topicList.value = res.data;
|
|
|
|
if( topicList.value[0].studentAnswer!==null||topicList.value[0].studentAnswer!=='') step.value=1
|
|
|
|
if( topicList.value[0].studentAnswer!==null||topicList.value[0].studentAnswer!=='') step.value=1
|
|
|
|
topicList.value.userId = '487';
|
|
|
|
topicList.value.userId = JSON.parse(getUserInfo()).userId;
|
|
|
|
if(restartCount.value>0){
|
|
|
|
if(restartCount.value>0){
|
|
|
|
topicList.value.forEach((item) => {
|
|
|
|
topicList.value.forEach((item) => {
|
|
|
|
item.studentAnswer = null;
|
|
|
|
item.studentAnswer = null;
|
|
|
|
@ -256,7 +257,7 @@ const getlist = () => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
// 答题
|
|
|
|
// 答题
|
|
|
|
const submit = () => {
|
|
|
|
const submit = () => {
|
|
|
|
topicList.value[0].userId = '487';
|
|
|
|
topicList.value[0].userId = JSON.parse(getUserInfo()).userId;
|
|
|
|
step.value=1
|
|
|
|
step.value=1
|
|
|
|
restartCount.value=0
|
|
|
|
restartCount.value=0
|
|
|
|
commonality
|
|
|
|
commonality
|
|
|
|
@ -285,7 +286,7 @@ const Choiceimg = () => {
|
|
|
|
proxy.$modal.msgSuccess("选择识别成功");
|
|
|
|
proxy.$modal.msgSuccess("选择识别成功");
|
|
|
|
dialogVisible.value = false;
|
|
|
|
dialogVisible.value = false;
|
|
|
|
step.value=2
|
|
|
|
step.value=2
|
|
|
|
commonality.uploadImg({irisName:value.value||null, module: "图像识别" ,order:Answer.value||null ,userId: '487'})
|
|
|
|
commonality.uploadImg({irisName:value.value||null, module: "图像识别" ,order:Answer.value||null ,userId: JSON.parse(getUserInfo()).userId})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const selectChange = () => {
|
|
|
|
const selectChange = () => {
|
|
|
|
if (Answer.value == "") {
|
|
|
|
if (Answer.value == "") {
|
|
|
|
@ -293,7 +294,7 @@ const selectChange = () => {
|
|
|
|
value.value = "";
|
|
|
|
value.value = "";
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
commonality.uploadImg({irisName:value.value||null, module: "图像识别" ,order:Answer.value ||null,userId: '487'})
|
|
|
|
commonality.uploadImg({irisName:value.value||null, module: "图像识别" ,order:Answer.value ||null,userId: JSON.parse(getUserInfo()).userId})
|
|
|
|
if (Answer.value == 1 || Answer.value == 2) {
|
|
|
|
if (Answer.value == 1 || Answer.value == 2) {
|
|
|
|
if(value.value=='变色鸢尾花'){
|
|
|
|
if(value.value=='变色鸢尾花'){
|
|
|
|
proxy.$modal.msgSuccess("识别成功")
|
|
|
|
proxy.$modal.msgSuccess("识别成功")
|
|
|
|
@ -321,7 +322,7 @@ const submitTask = () => {
|
|
|
|
module: "人工智能",
|
|
|
|
module: "人工智能",
|
|
|
|
numberOfErrors: errrCount.value > 10 ? 10 : errrCount.value ,
|
|
|
|
numberOfErrors: errrCount.value > 10 ? 10 : errrCount.value ,
|
|
|
|
taskName: "图像识别",
|
|
|
|
taskName: "图像识别",
|
|
|
|
userId: '487',
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
.then((response) => {
|
|
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
|
|
|