-- fix 权限管理

This commit is contained in:
yuping
2023-03-08 02:13:39 +08:00
parent ea9043889e
commit 49dc8a552e
2 changed files with 27 additions and 10 deletions

View File

@@ -11,13 +11,16 @@
{{ formData.name }} 课程
</div>
<div>
<span style="color:#999">内容分类</span>12312
<span
style="color:#999">内容分类</span>{{
(sysTypeOption1?.name || "") + "/" + (sysTypeOption2?.name || "") + (sysTypeOption3?.name || "")
}}
</div>
<div>
<span style="color:#999">授课教师</span>{{ formData.sysType1 }}/{{ formData.sysType2 }}/{{ formData.sysType3 }}
<span style="color:#999">授课教师</span>{{ formData.teacherName || ''}}
</div>
<div>
<span style="color:#999">审核状态</span>{{ formData.status }}
<span style="color:#999">审核状态</span>{{ {1:'草稿',2:'待审核',3:'审核不通过',5:'审核通过'}[formData.status] || '' }}
</div>
</div>
<div class="TableStudent">
@@ -96,12 +99,13 @@
</template>
<script setup>
import {computed, defineExpose, defineProps, ref, watch} from "vue";
import {boeRequest, usePage} from "@/api/request";
import {STUDENT_LIST} from "@/api/apis";
import {boeRequest,request, usePage} from "@/api/request";
import {ONLINE_COURSE_TEACHER, STUDENT_LIST} from "@/api/apis";
import CommonStudent from "@/components/student/CommonStudent";
import {checkPer} from "@/utils/utils";
import dialog from "@/utils/dialog";
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
import {useStore} from "vuex";
const props = defineProps({
permissions: {
@@ -120,6 +124,7 @@ const props = defineProps({
});
const visiable = ref(false);
const store = useStore();
const initParams = {
studentName: "",
@@ -240,6 +245,16 @@ const columns = ref([
const formData = ref({});
watch(formData, () => {
request(ONLINE_COURSE_TEACHER, { courseId: formData.value.id }).then(res=>{
formData.value.teacherName = res.data
})
});
const sysTypeOption1 = computed(() => store.state.content_type.find(({ code }) => code == formData.value.sysType1));
const sysTypeOption2 = computed(() => sysTypeOption1.value?.children.find(({ code }) => code == formData.value.sysType2));
const sysTypeOption3 = computed(() => sysTypeOption2.value?.children.find(({ code }) => code == formData.value.sysType2));
const { data: studentList, fetch: searchStu, total, loading } = usePage(STUDENT_LIST, searchParams, false);
const stuPagination = computed(() => ({
@@ -250,7 +265,6 @@ const stuPagination = computed(() => ({
onChange: changePagination
}));
const openDrawer = (raw) => {
console.log(raw);
searchParams.value.pid = raw.id;
@@ -264,13 +278,15 @@ const changePagination = (page) => {
};
function del(id) {
dialog({ content: "确定删除?", ok: async () => {
dialog({
content: "确定删除?", ok: async () => {
if (id) {
loading.value = true;
await boeRequest(ONLINE_COURSE_DEL(id, formData.value.id))
searchStu()
await boeRequest(ONLINE_COURSE_DEL(id, formData.value.id));
searchStu();
}
}});
}
});
}
function submitCall(flag) {