mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 13:26:45 +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({
|
const state = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
@@ -227,7 +227,7 @@ export function usePage(_url, params, init = true) {
|
|||||||
loading: false
|
loading: false
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isRef(params)) {
|
if (isRef(params) && listing) {
|
||||||
watch(params.value, () => {
|
watch(params.value, () => {
|
||||||
fetch();
|
fetch();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,10 +17,17 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span style="color:#999">授课教师</span>:{{ formData.teacherName || ''}}
|
<span style="color:#999">授课教师</span>:{{ formData.teacherName || "" }}
|
||||||
</div>
|
</div>
|
||||||
<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>
|
</div>
|
||||||
<div class="TableStudent">
|
<div class="TableStudent">
|
||||||
@@ -113,6 +120,7 @@ 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";
|
import {useStore} from "vuex";
|
||||||
|
import {useResetRef} from "@/utils/useCommon";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
permissions: {
|
permissions: {
|
||||||
@@ -130,20 +138,17 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const visiable = ref(false);
|
const visiable = ref(true);
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|
||||||
const initParams = {
|
const searchParams = useResetRef({
|
||||||
studentName: "",
|
studentName: "",
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: props.type || "",
|
type: props.type || "",
|
||||||
types: props.types,
|
types: props.types,
|
||||||
pid: props.id || "",
|
pid: props.id || "",
|
||||||
};
|
});
|
||||||
|
|
||||||
const searchParams = ref(initParams);
|
|
||||||
const searchName = ref("");
|
|
||||||
|
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@@ -254,8 +259,8 @@ const formData = ref({});
|
|||||||
|
|
||||||
watch(formData, () => {
|
watch(formData, () => {
|
||||||
request(ONLINE_COURSE_TEACHER, { courseId: formData.value.id }).then(res => {
|
request(ONLINE_COURSE_TEACHER, { courseId: formData.value.id }).then(res => {
|
||||||
formData.value.teacherName = res.data
|
formData.value.teacherName = res.data;
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const sysTypeOption1 = computed(() => store.state.content_type.find(({ code }) => code == formData.value.sysType1));
|
const sysTypeOption1 = computed(() => store.state.content_type.find(({ code }) => code == formData.value.sysType1));
|
||||||
@@ -305,15 +310,10 @@ const closeDrawer = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
searchParams.value = initParams;
|
searchParams.reset({ pid: searchParams.value.pid });
|
||||||
searchName.value = "";
|
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}`);
|
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