-- 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

@@ -7,3 +7,4 @@ export const PROJECT_DETAIL_MODIFY = '/admin/project/projectInfoTemp post';
export const PROJECT_TEMPLATE_DETAIL_MODIFY = '/admin/project/template/editStageAndTask post'; export const PROJECT_TEMPLATE_DETAIL_MODIFY = '/admin/project/template/editStageAndTask post';
export const PROJECT_RELEASE = '/admin/project/realease'; export const PROJECT_RELEASE = '/admin/project/realease';
export const ASYNC_STUDENT_STATUS = '/admin/cache/getStudentAsyncStatus'; export const ASYNC_STUDENT_STATUS = '/admin/cache/getStudentAsyncStatus';
export const ONLINE_COURSE_TEACHER = '/admin/offcourse/getTeacherNamesByCourseId';

View File

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