|
@@ -19,7 +19,8 @@
|
|
|
<div class="course_content">
|
|
|
<p>{{ item.title }}<span>上册</span></p>
|
|
|
<div class="class_button" v-if="isupdateCourse">
|
|
|
- <el-button style="width: 30%;background: rgba(240, 242, 245, 1);color: rgba(0, 0, 0, 0.6);">还原</el-button>
|
|
|
+ <el-button
|
|
|
+ style="width: 30%;background: rgba(240, 242, 245, 1);color: rgba(0, 0, 0, 0.6);">还原</el-button>
|
|
|
<el-button style="width: 30%;background: #fff" @click="updateCourse(item.id)">修改</el-button>FF
|
|
|
<el-button class="el_button_active" @click="openCourseDetail(item.id)">查看</el-button>
|
|
|
</div>
|
|
@@ -37,7 +38,8 @@
|
|
|
<p>{{ item.title }} <span>下册</span></p>
|
|
|
</div>
|
|
|
<div class="class_button" v-if="isupdateCourse">
|
|
|
- <el-button style="width: 30%;background: rgba(240, 242, 245, 1);color: rgba(0, 0, 0, 0.6);">还原</el-button>
|
|
|
+ <el-button style="width: 30%;background: rgba(240, 242, 245, 1);color: rgba(0, 0, 0, 0.6);"
|
|
|
+ @click="ReductionCourse(item.id)">还原</el-button>
|
|
|
<el-button style="width: 30%;background: #fff" @click="updateCourse(item.id)">修改</el-button>
|
|
|
<el-button style="width: 30%;" class="el_button_active" @click="openCourseDetail(item.id)">查看</el-button>
|
|
|
</div>
|
|
@@ -46,10 +48,28 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog v-model="dialogVisible" :before-close="handleClose" width=500>
|
|
|
+ <template #header>
|
|
|
+ <div class="dialog-header img_text_middle">
|
|
|
+ <img :src="WarningImg" alt="">
|
|
|
+ <span class="warning_text">操作警告</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <span>启用还原功能将重置当前修改,并将课程内容恢复至标准版本。请确认是否继续执行相关操作。</span>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="updateReduction()">
|
|
|
+ 确认修改
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="dialogVisible = false">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import { ref, onMounted, watchEffect } from 'vue';
|
|
|
import { userInfoStore } from '../../stores/counter'
|
|
|
+import WarningImg from '@/assets/icon/icon.png'
|
|
|
import san1 from '../../assets/img/三下1.png'
|
|
|
import san2 from '@/assets/img/三下2.png'
|
|
|
import san3 from '@/assets/img/三下3.png'
|
|
@@ -101,6 +121,8 @@ const currentData = ref({
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
+const dialogVisible = ref(false)
|
|
|
+const updateReductionId = ref("")
|
|
|
|
|
|
const courseData = {
|
|
|
"三年级": {
|
|
@@ -168,7 +190,7 @@ const courseData = {
|
|
|
}, {
|
|
|
id: "",
|
|
|
title: "猜拳大战",
|
|
|
- url:wu4
|
|
|
+ url: wu4
|
|
|
},
|
|
|
]
|
|
|
},
|
|
@@ -260,9 +282,18 @@ const updateCourse = id => {
|
|
|
top.U.MD.D.I.openInApplication('openCourseUpdate', id)
|
|
|
}
|
|
|
|
|
|
+const ReductionCourse = id => {
|
|
|
+ dialogVisible.value = true
|
|
|
+ updateReductionId.value = id
|
|
|
+}
|
|
|
+
|
|
|
+const updateReduction = () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
watchEffect(() => {
|
|
|
if (JSON.stringify(user.user) != "{}") {
|
|
|
- if (user.user.currentRole == "areaAdministrator" || user.user.currentRole == "userAdministrator" || user.user.currentRole == "securityAuditor" || user.user.currentRole == "schoolAdministrator" || user.user.currentRole == "schoolSecurityAuditor" || user.user.currentRole == "teacher"|| user.user.currentRole == "visitor") {
|
|
|
+ if (user.user.currentRole == "areaAdministrator" || user.user.currentRole == "userAdministrator" || user.user.currentRole == "securityAuditor" || user.user.currentRole == "schoolAdministrator" || user.user.currentRole == "schoolSecurityAuditor" || user.user.currentRole == "teacher" || user.user.currentRole == "visitor") {
|
|
|
isupdateCourse.value = true
|
|
|
}
|
|
|
}
|
|
@@ -348,4 +379,10 @@ watchEffect(() => {
|
|
|
.el-col {
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
+.warning_text{
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ color: rgba(0, 0, 0, 0.9);
|
|
|
+ margin-left: 8px;
|
|
|
+}
|
|
|
</style>
|