提交 3f1b3100 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 fd3f94ff
<script setup lang="ts"> <script setup lang="ts">
import PreviewFiles from './PreviewFiles.vue' import PreviewFiles from './PreviewFiles.vue'
const dialogVisible = ref(false) const dialogVisible = ref(false)
const protocol = ref(false)
const emit = defineEmits(['change'])
const changeProtocol = (flag?: boolean) => {
if (flag !== undefined) {
protocol.value = flag
}
emit('change', protocol)
dialogVisible.value = false
}
</script> </script>
<template> <template>
<div> <div style="display: flex;align-items: center;">
我已阅读并同意<span class="red-color" @click="dialogVisible = true">《紫荆教育用户入驻及网络教学资源协议》</span> <el-checkbox @change="changeProtocol()" v-model="protocol" size="large"> 我已阅读并同意 </el-checkbox>
<span class="red-color" @click="dialogVisible = true">《紫荆教育用户入驻及网络教学资源协议》</span>
</div> </div>
<el-dialog v-model="dialogVisible" title="提示" width="850px"> <el-dialog v-model="dialogVisible" title="提示" width="850px">
<PreviewFiles <PreviewFiles
url="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/%E7%B4%AB%E8%8D%86%E6%95%99%E8%82%B2%E7%94%A8%E6%88%B7%E5%85%A5%E9%A9%BB%E5%8F%8A%E7%BD%91%E7%BB%9C%E6%95%99%E5%AD%A6%E8%B5%84%E6%BA%90%E5%8D%8F%E8%AE%AE(1).docx" url="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/%E7%B4%AB%E8%8D%86%E6%95%99%E8%82%B2%E7%94%A8%E6%88%B7%E5%85%A5%E9%A9%BB%E5%8F%8A%E7%BD%91%E7%BB%9C%E6%95%99%E5%AD%A6%E8%B5%84%E6%BA%90%E5%8D%8F%E8%AE%AE(1).docx"
></PreviewFiles> ></PreviewFiles>
<template #footer> <template #footer>
<el-button type="primary" @click="dialogVisible = false">我已阅读并同意</el-button> <el-button type="primary" @click="changeProtocol(true)">我已阅读并同意</el-button>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.red-color { .red-color {
color: #aa1941; color: #aa1941;
cursor: pointer;
} }
</style> </style>
...@@ -142,6 +142,10 @@ const createResources = (params: any) => { ...@@ -142,6 +142,10 @@ const createResources = (params: any) => {
// 协议 // 协议
const protocol = ref(false) const protocol = ref(false)
const changeProtocol = (data:any) => {
protocol.value = data.value
}
</script> </script>
<template> <template>
...@@ -183,9 +187,7 @@ const protocol = ref(false) ...@@ -183,9 +187,7 @@ const protocol = ref(false)
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="protocol-box"> <div class="protocol-box">
<el-checkbox v-model="protocol" size="large"> <Protocol @change="changeProtocol"></Protocol>
<Protocol></Protocol>
</el-checkbox>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<div class="confirm" @click="submitForm(ruleFormRef)">保存</div> <div class="confirm" @click="submitForm(ruleFormRef)">保存</div>
......
...@@ -23,7 +23,7 @@ const bytesToSize = (bytes: number) => { ...@@ -23,7 +23,7 @@ const bytesToSize = (bytes: number) => {
<template v-else-if="item.key === 'learn_time_length' || item.key === 'length'"> <template v-else-if="item.key === 'learn_time_length' || item.key === 'length'">
<div class="icon"></div> <div class="icon"></div>
<div class="num"> <div class="num">
{{ Number((item.number / 60).toString().match(/^\d+(?:\.\d{0,2})?/)) }}<span>{{ item.unit }}</span> {{ Number((item.number / 60 / 60).toString().match(/^\d+(?:\.\d{0,2})?/)) }}<span>{{ item.unit }}</span>
</div> </div>
<div class="text">{{ item.text }}</div> <div class="text">{{ item.text }}</div>
</template> </template>
......
...@@ -25,9 +25,9 @@ getUtilData().then(res => { ...@@ -25,9 +25,9 @@ getUtilData().then(res => {
{ key: 'question_count', unit: '个', number: 0, text: '题库资源' }, { key: 'question_count', unit: '个', number: 0, text: '题库资源' },
{ key: 'paper_count', unit: '套', number: 0, text: '试卷资源' }, { key: 'paper_count', unit: '套', number: 0, text: '试卷资源' },
{ key: 'memory_size', unit: '', number: 0, text: '资源总体量' }, { key: 'memory_size', unit: '', number: 0, text: '资源总体量' },
{ key: 'length', unit: '分钟', number: 0, text: '资源总时长' }, { key: 'length', unit: '小时', number: 0, text: '资源总时长' },
{ key: 'learn_times', unit: '万人次', number: 0, text: '总学习人次' }, { key: 'learn_times', unit: '万人次', number: 0, text: '总学习人次' },
{ key: 'learn_time_length', unit: '分钟', number: 0, text: '总学习时长' } { key: 'learn_time_length', unit: '小时', number: 0, text: '总学习时长' }
] ]
data.statistics = statisticsData.map((item: any) => { data.statistics = statisticsData.map((item: any) => {
item.number = res.data[item.key] || 0 item.number = res.data[item.key] || 0
......
...@@ -141,6 +141,10 @@ const createResources = (params: any) => { ...@@ -141,6 +141,10 @@ const createResources = (params: any) => {
// 协议 // 协议
const protocol = ref(false) const protocol = ref(false)
const changeProtocol = (data:any) => {
protocol.value = data.value
}
</script> </script>
<template> <template>
...@@ -181,9 +185,7 @@ const protocol = ref(false) ...@@ -181,9 +185,7 @@ const protocol = ref(false)
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="protocol-box"> <div class="protocol-box">
<el-checkbox v-model="protocol" size="large"> <Protocol @change="changeProtocol"></Protocol>
<Protocol></Protocol>
</el-checkbox>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<div class="confirm" @click="submitForm(ruleFormRef)">保存</div> <div class="confirm" @click="submitForm(ruleFormRef)">保存</div>
......
...@@ -141,6 +141,10 @@ const createResources = (params: any) => { ...@@ -141,6 +141,10 @@ const createResources = (params: any) => {
// 协议 // 协议
const protocol = ref(false) const protocol = ref(false)
const changeProtocol = (data:any) => {
protocol.value = data.value
}
</script> </script>
<template> <template>
...@@ -185,9 +189,7 @@ const protocol = ref(false) ...@@ -185,9 +189,7 @@ const protocol = ref(false)
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="protocol-box"> <div class="protocol-box">
<el-checkbox v-model="protocol" size="large"> <Protocol @change="changeProtocol"></Protocol>
<Protocol></Protocol>
</el-checkbox>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<div class="confirm" @click="submitForm(ruleFormRef)">保存</div> <div class="confirm" @click="submitForm(ruleFormRef)">保存</div>
......
...@@ -150,6 +150,10 @@ const watchSwiper = (index: number) => { ...@@ -150,6 +150,10 @@ const watchSwiper = (index: number) => {
swiperCovers.length === index + 1 ? isSwiperBtn = 1 : isSwiperBtn = 2 swiperCovers.length === index + 1 ? isSwiperBtn = 1 : isSwiperBtn = 2
} }
} }
const changeProtocol = (data:any) => {
protocol.value = data.value
}
</script> </script>
<template> <template>
...@@ -251,9 +255,7 @@ const watchSwiper = (index: number) => { ...@@ -251,9 +255,7 @@ const watchSwiper = (index: number) => {
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="protocol-box"> <div class="protocol-box">
<el-checkbox v-model="protocol" size="large"> <Protocol @change="changeProtocol"></Protocol>
<Protocol></Protocol>
</el-checkbox>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<div class="confirm" @click="submitForm(ruleFormRef)">保存</div> <div class="confirm" @click="submitForm(ruleFormRef)">保存</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论