1
YM
2024-11-20 4e201651d4a5ca76b66faba9e00f5ee2f9ae484f
src/views/readerPages/webHome.vue
@@ -8,6 +8,7 @@
        <div class="userName" v-if="userInfo.name">{{ userInfo.name }}</div>
        <div v-if="token"><div class="layout hover" @click="layoutBtn">退出</div></div>
        <div v-else><div class="layout hover" @click="goLogin">登录</div></div>
        <div @click="openFormulaDialog">公式</div>
      </div>
    </div>
    <div class="contentBox">
@@ -815,6 +816,10 @@
            </div>
          </div>
        </div>
        <!-- 语音阅读组件 -->
         <!-- <div class="voice-reader">
          <voiceReader />
         </div> -->
      </div>
      <!-- 教学组件 -->
      <div class="toolBox">
@@ -1234,6 +1239,16 @@
      <wrongQuestion />
    </div>
  </el-dialog>
  <el-dialog
    title="公式编辑"
    align-center
    v-model="formulaDialog"
    class="myDialogs"
  >
    <div class="wendabox">
      <formula />
    </div>
  </el-dialog>
  <!-- 答题器 -->
  <examination
    ref="examinationRef"
@@ -1242,6 +1257,10 @@
    :type="examinationData.type"
    :infoType="examinationData.infoType"
  />
  <!-- 计算器 -->
   <el-dialog title="计算器" align-center v-model="calculatorVisble" width="550" style="height:548px">
    <calculator />
   </el-dialog>
</template>
<script setup lang="ts">
@@ -1251,6 +1270,7 @@
import { useRouter, useRoute } from 'vue-router'
import useClipboard from 'vue-clipboard3'
import examination from '../examination/index.vue'
import calculator from '../components/calculator.vue'
const { toClipboard } = useClipboard()
const MG: any = inject('MG')
const toolClass = inject('toolClass')
@@ -1262,7 +1282,9 @@
import moment from 'moment'
import dictionary from '@/views/components/dictionary.vue'
import newWord from '@/views/components/newWord.vue'
import formula from '@/views/components/formula.vue'
import wrongQuestion from '@/views/components/wrongQuestion.vue'
import voiceReader from '@/views/components/voiceReader.vue'
import { ElMessage, ElMessageBox, valueEquals } from 'element-plus'
import logo from '@/assets/images/header/logo.png'
import mulu from '@/assets/images/menu/mulu.png'
@@ -2698,6 +2720,7 @@
const siweiVisble = ref(false)
const modelToolVisble = ref(false)
const shengciVisble = ref(false)
const calculatorVisble = ref(false)
const activeTool = ref(0)
const toolState = reactive({
  open: true
@@ -2726,6 +2749,10 @@
      case '生词卡片':
        resourceUrl.value = bookConfig.value.resourceUrl
        shengciVisble.value = true
        break
      case '计算器':
      calculatorVisble.value = true
      break
    }
  } else {
    ElMessageBox.confirm('请先登录!', {
@@ -4013,6 +4040,11 @@
    })
  }
}
const formulaDialog = ref(false)
const openFormulaDialog = () => {
  formulaDialog.value = true
}
</script>
<style lang="less">
@@ -5129,4 +5161,9 @@
    width: 100%;
  }
}
.voice-reader {
  position:absolute;
  bottom:30px;
  left:50px;
}
</style>