فهرست منبع

列表总数显示更改

zjq 11 ساعت پیش
والد
کامیت
efbc5ac7e8

+ 1 - 1
src/views/courseware/index/index.vue

@@ -199,7 +199,7 @@ const queryList = () => {
 		.then((response: any) => {
             console.log(response)
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/exam/examManage/components/ExamManage-users.vue

@@ -121,7 +121,7 @@ const queryList = () => {
 	getUserListPaged(state.queryParams)
 		.then((res: any) => {
 			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
+			state.total = res.result?.pagination.totalCount ?? 0;
             const rows = [] as any[];
             state.tableCheckbox.forEach(item => {
                 rows.push(state.tableData.find(it => it.id === item.userId));

+ 1 - 1
src/views/examTrain/exam/examManage/index.vue

@@ -171,7 +171,7 @@ const queryList = () => {
 	getExamManageData(requestParams.value)
 		.then((response: any) => {
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/exam/extractRule/index.vue

@@ -129,7 +129,7 @@ const queryList = () => {
 		.then((response: any) => {
             console.log(response)
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/exam/practice/index.vue

@@ -104,7 +104,7 @@ const queryList = () => {
 	getPracticeData(requestParams.value)
 		.then((response: any) => {
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/exam/testPaper/components/TestPaper-optional.vue

@@ -137,7 +137,7 @@ const queryList = () => {
 	getQuestionData(state.queryParams)
 		.then((res: any) => {
 			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
+			state.total = res.result?.pagination.totalCount ?? 0;
 			state.loading = false;
             const rows = [] as any[];
             state.tableCheckbox.forEach(item => {

+ 1 - 1
src/views/examTrain/exam/testPaper/index.vue

@@ -148,7 +148,7 @@ const queryList = () => {
 	getTestPaperData(requestParams.value)
 		.then((response: any) => {
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/exam/userExam/index.vue

@@ -180,7 +180,7 @@ const queryList = () => {
 	getUserExamData(requestParams.value)
 		.then((response: any) => {
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 5 - 5
src/views/examTrain/questionBank/components/Question-course.vue

@@ -56,7 +56,7 @@ const emit = defineEmits(['choose']);
 
 // 定义变量内容
 const state = reactive({
-	tableData: [], // 表格数据
+	tableData: [] as any [], // 表格数据
 	total: 0, // 总条数
 	loading: false, // 加载
 	queryParams: {
@@ -64,7 +64,7 @@ const state = reactive({
 		PageSize: 10, // 每页条数
 		name: null, // 关键字
 	},
-	tableCheckbox: '', // 选择的ID
+	tableCheckbox: [] as any[], // 选择的ID
 });
 const ruleDialogFormRef = ref<FormInstance>(); // 表单
 const dialogVisible = ref(false); // 弹窗
@@ -77,7 +77,7 @@ const openDialog = async (row: any[]) => {
         if (row) {
 			state.tableCheckbox = row;
 		} else {
-			state.tableCheckbox = '';
+			state.tableCheckbox = [];
 		}
 		queryList();
 	} catch (error) {
@@ -96,9 +96,9 @@ const queryList = () => {
 	getCoursewareData(state.queryParams)
 		.then((res: any) => {
 			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
+			state.total = res.result?.pagination.totalCount ?? 0;
 			state.loading = false;
-            const rows = [];
+            const rows = [] as any[];
             state.tableCheckbox.forEach(item => {
                 rows.push(state.tableData.find((it) => it.id === item.sourcewareId));
             })

+ 4 - 4
src/views/examTrain/questionBank/components/Question-knowledge.vue

@@ -61,7 +61,7 @@ const emit = defineEmits(['choose']);
 
 // 定义变量内容
 const state = reactive({
-	tableData: [], // 表格数据
+	tableData: [] as any [], // 表格数据
 	total: 0, // 总条数
 	loading: false, // 加载
 	queryParams: {
@@ -70,7 +70,7 @@ const state = reactive({
 		Keyword: null, // 关键字
 		RetrievalType: '1', // 标题
 	},
-	tableCheckbox: [], // 选择的知识
+	tableCheckbox: [] as any[], // 选择的知识
 });
 const ruleDialogFormRef = ref<FormInstance>(); // 表单
 const dialogVisible = ref(false); // 弹窗
@@ -101,9 +101,9 @@ const queryList = () => {
 		.then((res: any) => {
 			state.tableData = res.result?.items ?? [];
             console.log(state.tableData)
-			state.total = res.result?.total ?? 0;
+			state.total = res.result?.pagination.totalCount ?? 0;
 			state.loading = false;
-            const rows = [];
+            const rows = [] as any [];
             state.tableCheckbox.forEach(item => {
                 rows.push(state.tableData.find((it) => it.id === item.knowladgeId));
             })

+ 1 - 1
src/views/examTrain/questionBank/index.vue

@@ -169,7 +169,7 @@ const queryList = () => {
 	getQuestionData(requestParams.value)
 		.then((response: any) => {
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/train/plan/index.vue

@@ -182,7 +182,7 @@ const queryList = () => {
 		.then((response: any) => {
             console.log(response)
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {

+ 1 - 1
src/views/examTrain/train/template/components/Template-optional.vue

@@ -143,7 +143,7 @@ const queryList = () => {
 	getQuestionData(state.queryParams)
 		.then((res: any) => {
 			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
+			state.total = res.result?.pagination.totalCount ?? 0;
 			state.loading = false;
             const rows = [] as any[];
             state.tableCheckbox.forEach(item => {

+ 1 - 1
src/views/examTrain/train/template/index.vue

@@ -164,7 +164,7 @@ const queryList = () => {
 		.then((response: any) => {
             console.log(response)
 			state.tableData = response?.result.items ?? [];
-			state.total = response?.result.pagination.totalCount;
+			state.total = response?.result.pagination.totalCount ?? 0;
 			state.tableLoading = false;
 		})
 		.catch(() => {