mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
--fix bug
This commit is contained in:
@@ -217,7 +217,7 @@ export function useRowsPage(_url, params, init = true) {
|
||||
};
|
||||
}
|
||||
|
||||
export function usePage(_url, params, init = true) {
|
||||
export function usePage(_url, params, init = true,listing = false) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
@@ -227,7 +227,7 @@ export function usePage(_url, params, init = true) {
|
||||
loading: false
|
||||
});
|
||||
|
||||
if (isRef(params)) {
|
||||
if (isRef(params) && listing) {
|
||||
watch(params.value, () => {
|
||||
fetch();
|
||||
});
|
||||
|
||||
@@ -17,10 +17,17 @@
|
||||
}}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color:#999">授课教师</span>:{{ formData.teacherName || ''}}
|
||||
<span style="color:#999">授课教师</span>:{{ formData.teacherName || "" }}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color:#999">审核状态</span>:{{ {1:'草稿',2:'待审核',3:'审核不通过',5:'审核通过'}[formData.status] || '' }}
|
||||
<span style="color:#999">审核状态</span>:{{
|
||||
{
|
||||
1: "草稿",
|
||||
2: "待审核",
|
||||
3: "审核不通过",
|
||||
5: "审核通过"
|
||||
}[formData.status] || ""
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableStudent">
|
||||
@@ -106,13 +113,14 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, defineExpose, defineProps, ref, watch} from "vue";
|
||||
import {boeRequest,request, usePage} from "@/api/request";
|
||||
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";
|
||||
import {useResetRef} from "@/utils/useCommon";
|
||||
|
||||
const props = defineProps({
|
||||
permissions: {
|
||||
@@ -130,20 +138,17 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const visiable = ref(false);
|
||||
const visiable = ref(true);
|
||||
const store = useStore();
|
||||
|
||||
const initParams = {
|
||||
const searchParams = useResetRef({
|
||||
studentName: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
type: props.type || "",
|
||||
types: props.types,
|
||||
pid: props.id || "",
|
||||
};
|
||||
|
||||
const searchParams = ref(initParams);
|
||||
const searchName = ref("");
|
||||
});
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -253,9 +258,9 @@ const columns = ref([
|
||||
const formData = ref({});
|
||||
|
||||
watch(formData, () => {
|
||||
request(ONLINE_COURSE_TEACHER, { courseId: formData.value.id }).then(res=>{
|
||||
formData.value.teacherName = res.data
|
||||
})
|
||||
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));
|
||||
@@ -305,16 +310,11 @@ const closeDrawer = () => {
|
||||
};
|
||||
|
||||
function reset() {
|
||||
searchParams.value = initParams;
|
||||
searchName.value = "";
|
||||
searchParams.reset({ pid: searchParams.value.pid });
|
||||
searchStu();
|
||||
}
|
||||
|
||||
watch(visiable, () => {
|
||||
visiable.value && searchStu();
|
||||
searchParams.value = initParams;
|
||||
});
|
||||
|
||||
function exportStu(){
|
||||
function exportStu() {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${props.id}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user