Commit 775d77bd authored by guo's avatar guo

智能批改

parent 616acd3f
......@@ -24,6 +24,14 @@ const router = createRouter({
},
component: () => import('../views/parents/homeWorkStatistics/index.vue'),
},
{
path: '/parents/AICorrect',
name: 'AICorrect',
meta: {
title: '智能批改',
},
component: () => import('../views/parents/AICorrect/index.vue'),
},
],
})
......
<template>
<div class="main">
<van-form @submit="onSubmit">
<div class="title">上传作业</div>
<div class="item txt">
<van-field class="t-textarea" v-model="form.t1" rows="6" autosize type="textarea" placeholder="xxx"
show-word-limit />
<div class="btns">
<div class="btn" @click="uploadFile1">
<div class="icon">
<van-icon name="photograph" />
</div>
<div class="t">拍照识文字</div>
</div>
<div class="btn" @click="uploadFile2">
<div class="icon">
<van-icon name="photo" />
</div>
<div class="t">图片识文字</div>
</div>
<div class="btn" @click="uploadFile3">
<div class="icon">
<van-icon name="link-o" />
</div>
<div class="t">文件</div>
</div>
</div>
</div>
<div class="title">每日小结</div>
<div class="item txt2">
<van-field class="t-textarea" v-model="form.t2" rows="6" autosize type="textarea" placeholder="xxx"
show-word-limit />
</div>
</van-form>
<input type="file" style="display: none;" id="file1" capture="camera" accept="image/*">
<input type="file" style="display: none;" id="file2" accept="image/*">
<input type="file" style="display: none;" id="file3">
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const form = ref({
t1: '',
t2: '',
t3: ''
})
function onSubmit() { }
function uploadFile1() {
let file = document.getElementById('file1')
file.value = ''
file.click()
}
function uploadFile2() {
let file = document.getElementById('file2')
file.value = ''
file.click()
}
function uploadFile3() {
let file = document.getElementById('file3')
file.value = ''
file.click()
}
</script>
<style lang="scss" scoped>
.main {
padding: 20px;
}
.title {
font-size: 16px;
line-height: 1;
margin-bottom: 20px;
font-weight: bold;
}
.item {
position: relative;
margin-bottom: 20px;
border-radius: 10px;
background: #fff;
overflow: hidden;
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.1);
&.txt {
padding-bottom: 100px;
}
:deep(.t-textarea .van-field__control) {
height: 150px !important;
}
&.txt2 :deep(.van-field__control) {
height: 250px !important;
}
.btns {
position: absolute;
display: flex;
left: 20px;
bottom: 10px;
.btn {
text-align: center;
margin-right: 10px;
.icon {
width: 80px;
background: #f2f2f2;
line-height: 50px;
border-radius: 10px;
margin-bottom: 5px;
font-size: 20px;
}
.t {
font-size: 12px;
}
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment