diff --git a/src/views/kc/wjxCswj/WjxCswjHisList.vue b/src/views/kc/wjxCswj/WjxCswjHisList.vue index 9460bf6..4726618 100644 --- a/src/views/kc/wjxCswj/WjxCswjHisList.vue +++ b/src/views/kc/wjxCswj/WjxCswjHisList.vue @@ -101,12 +101,13 @@ import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue' import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; import {useRouter} from "vue-router"; + import {useMessage} from "/@/hooks/web/useMessage"; //当前路由信息 const { currentRoute } = useRouter(); const { query } = unref(currentRoute); const { rwbh,xqxn,typa } = query;//获取传递参数 - + const { createConfirm } = useMessage(); const APagination = Pagination; const queryParam = ref({}); const current = ref(0); @@ -209,20 +210,28 @@ */ function handleFabu(record: Recordable) { defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => { - total.value = 1; - handlePageChange(1); + handleSuccess(); }); } /** * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + createConfirm({ + iconType: 'warning', + title: '删除', + content: '是否删除此测验?', + okText: '确认', + cancelText: '取消', + onOk: () => { + deleteOne({ id: record.id }, handleSuccess2); + } + }); } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.atype = "6"; @@ -236,13 +245,20 @@ } /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + /** * 查询 */ @@ -261,7 +277,7 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/kc/wjxCswj/WjxCswjList.vue b/src/views/kc/wjxCswj/WjxCswjList.vue index c3d058a..cdebb78 100644 --- a/src/views/kc/wjxCswj/WjxCswjList.vue +++ b/src/views/kc/wjxCswj/WjxCswjList.vue @@ -111,13 +111,14 @@ import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue' import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue' import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; + import {useMessage} from "/@/hooks/web/useMessage"; import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue'; //当前路由信息 const { currentRoute } = useRouter(); const { query } = unref(currentRoute); const { rwbh,xqxn,typa } = query;//获取传递参数 - + const { createConfirm } = useMessage(); const APagination = Pagination; const queryParam = ref({}); const current = ref(0); @@ -229,19 +230,27 @@ */ function handleFabu(record: Recordable) { defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => { - total.value = 1; - handlePageChange(1); + handleSuccess(); }); } /** * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + createConfirm({ + iconType: 'warning', + title: '删除', + content: '是否删除此测验?', + okText: '确认', + cancelText: '取消', + onOk: () => { + deleteOne({ id: record.id }, handleSuccess2); + } + }); } function reload(){ - queryParam.value.pageNo = pageNo.value; + queryParam.value.pageNo = current.value; queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; @@ -256,13 +265,20 @@ } /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + /** * 查询 */ @@ -281,7 +297,7 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/kc/wjxCswj/WjxCswjStuList.vue b/src/views/kc/wjxCswj/WjxCswjStuList.vue index 1b9b3b0..460a710 100644 --- a/src/views/kc/wjxCswj/WjxCswjStuList.vue +++ b/src/views/kc/wjxCswj/WjxCswjStuList.vue @@ -133,8 +133,8 @@ } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.atype = "6"; @@ -151,8 +151,7 @@ * 成功回调 */ function handleSuccess() { - total.value = 1; - handlePageChange(1); + reload(); } /** @@ -173,7 +172,7 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/kc/wjxDcwj/WjxDcwjHisList.vue b/src/views/kc/wjxDcwj/WjxDcwjHisList.vue index 25f2bb4..b052093 100644 --- a/src/views/kc/wjxDcwj/WjxDcwjHisList.vue +++ b/src/views/kc/wjxDcwj/WjxDcwjHisList.vue @@ -99,12 +99,13 @@ import WjxWjxxTmlbDjjgsDcModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue' import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; import {useRouter} from "vue-router"; + import {useMessage} from "/@/hooks/web/useMessage"; //当前路由信息 const { currentRoute } = useRouter(); const { query } = unref(currentRoute); const { rwbh,xqxn,typa} = query;//获取传递参数 - + const { createConfirm } = useMessage(); const APagination = Pagination; const queryParam = ref({}); const current = ref(0); @@ -206,20 +207,28 @@ */ function handleFabu(record: Recordable) { defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => { - total.value = 1; - handlePageChange(1); + handleSuccess(); }); } /** * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + createConfirm({ + iconType: 'warning', + title: '删除', + content: '是否删除此问卷?', + okText: '确认', + cancelText: '取消', + onOk: () => { + deleteOne({ id: record.id }, handleSuccess2); + } + }); } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.atype = "1"; @@ -233,13 +242,20 @@ } /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + /** * 查询 */ @@ -258,7 +274,7 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/kc/wjxDcwj/WjxDcwjList.vue b/src/views/kc/wjxDcwj/WjxDcwjList.vue index b13da85..b6400f0 100644 --- a/src/views/kc/wjxDcwj/WjxDcwjList.vue +++ b/src/views/kc/wjxDcwj/WjxDcwjList.vue @@ -111,12 +111,13 @@ import {useRouter} from "vue-router"; import { JInput } from '/@/components/Form'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; + import {useMessage} from "/@/hooks/web/useMessage"; //当前路由信息 const { currentRoute } = useRouter(); const { query } = unref(currentRoute); const { rwbh,xqxn,typa} = query;//获取传递参数 - + const { createConfirm } = useMessage(); const APagination = Pagination; const queryParam = ref({}); const current = ref(0); @@ -218,19 +219,27 @@ */ function handleFabu(record: Recordable) { defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => { - total.value = 1; - handlePageChange(1); + handleSuccess(); }); } /** * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + createConfirm({ + iconType: 'warning', + title: '删除', + content: '是否删除此问卷?', + okText: '确认', + cancelText: '取消', + onOk: () => { + deleteOne({ id: record.id }, handleSuccess2); + } + }); } function reload(){ - queryParam.value.pageNo = pageNo.value; + queryParam.value.pageNo = current.value; queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; @@ -247,13 +256,20 @@ } /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + /** * 查询 */ @@ -272,7 +288,7 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/kc/wjxDcwj/WjxDcwjStuList.vue b/src/views/kc/wjxDcwj/WjxDcwjStuList.vue index ca406ef..05fc249 100644 --- a/src/views/kc/wjxDcwj/WjxDcwjStuList.vue +++ b/src/views/kc/wjxDcwj/WjxDcwjStuList.vue @@ -133,8 +133,8 @@ } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.atype = "1"; @@ -151,8 +151,7 @@ * 成功回调 */ function handleSuccess() { - total.value = 1; - handlePageChange(1); + reload(); } /** @@ -173,7 +172,7 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue index d112b43..f4ab795 100644 --- a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue @@ -42,7 +42,7 @@ - {{(pageNo-1)*pageSize+index+1}}.{{item.question}} + {{(current-1)*pageSize+index+1}}.{{item.question}} @@ -101,7 +101,7 @@ const baseApiUrl = globSetting.domainUrl; const { query } = unref(currentRoute); const { rwbh,xqxn } = query;//获取传递参数 const APagination = Pagination; - const current = ref(0); + const current = ref(1); const total = ref(0); const pageNo = ref(0); const pageSize = ref(3); @@ -141,7 +141,7 @@ const baseApiUrl = globSetting.domainUrl; * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleCjwtOk); + await deleteOne({ id: record.id }, handleCjwtOk2); } function openPdf(record){ @@ -158,25 +158,31 @@ const baseApiUrl = globSetting.domainUrl; window.open(url,"_blank") } - - //常见问题回调刷新 function handleCjwtOk() { // console.log('--------cjwt ok -----------') - cjwtData(1); + cjwtData(); + } + + //常见问题回调刷新 + function handleCjwtOk2() { + total.value = 1; + handlePageChange(1); } //常见问题新增翻页 function handlePageChange(page: number) { - cjwtData(page); + current.value = page; + cjwtData(); } - function cjwtData(arg){ - pageNo.value = arg; - defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn,column:'createTime',order:'desc' } }).then((res) => { + function cjwtData(){ + defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:current.value, rwbh:rwbh,xqxn:xqxn,column:'createTime',order:'desc' } }).then((res) => { // console.log(`🚀 ~ defHttp.get ~ res:`, res) cjwtSource.value = res.records; total.value = res.total; + pageNo.value = res.pages; + current.value = res.current; // console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource) }); } @@ -216,7 +222,7 @@ const baseApiUrl = globSetting.domainUrl; //进入就加载 onMounted(() => { getKcjsJxdg(); - cjwtData(1); + cjwtData(); }); diff --git a/src/views/site/studentWdkc/studentZyxx.vue b/src/views/site/studentWdkc/studentZyxx.vue index 8a2fa6a..319bca4 100644 --- a/src/views/site/studentWdkc/studentZyxx.vue +++ b/src/views/site/studentWdkc/studentZyxx.vue @@ -44,7 +44,7 @@ - {{(pageNo-1)*pageSize+index+1}}.{{item.question}} + {{(current-1)*pageSize+index+1}}.{{item.question}} 答:{{item.answer}} @@ -99,7 +99,7 @@ const baseApiUrl = globSetting.domainUrl; const { query } = unref(currentRoute); const { rwbh,xqxn } = query;//获取传递参数 const APagination = Pagination; - const current = ref(0); + const current = ref(1); const total = ref(0); const pageNo = ref(0); const pageSize = ref(3); @@ -138,7 +138,7 @@ const baseApiUrl = globSetting.domainUrl; * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleCjwtOk); + await deleteOne({ id: record.id }, handleCjwtOk2); } function openPdf(record){ @@ -155,24 +155,25 @@ function openJxrlPdf(record){ window.open(url,"_blank") } - //常见问题回调刷新 - function handleCjwtOk() { - // console.log('--------cjwt ok -----------') - cjwtData(1); + function handleCjwtOk2() { + total.value = 1; + handlePageChange(1); } //常见问题新增翻页 function handlePageChange(page: number) { - cjwtData(page); + current.value = page; + cjwtData(); } - function cjwtData(arg){ - pageNo.value = arg; - defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn,column:'createTime',order:'desc' } }).then((res) => { + function cjwtData(){ + defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:current.value, rwbh:rwbh,xqxn:xqxn,column:'createTime',order:'desc' } }).then((res) => { // console.log(`🚀 ~ defHttp.get ~ res:`, res) cjwtSource.value = res.records; total.value = res.total; + pageNo.value = res.pages; + current.value = res.current; // console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource) }); } @@ -213,7 +214,7 @@ function openJxrlPdf(record){ //进入就加载 onMounted(() => { getKcjsJxdg(); - cjwtData(1); + cjwtData(); }); diff --git a/src/views/zy/zyGonggao/StudentGonggaoList.vue b/src/views/zy/zyGonggao/StudentGonggaoList.vue index 306afa5..8aff5ea 100644 --- a/src/views/zy/zyGonggao/StudentGonggaoList.vue +++ b/src/views/zy/zyGonggao/StudentGonggaoList.vue @@ -101,15 +101,17 @@ //翻页 function handlePageChange(page: number) { - pageNo.value = page; + current.value = page; reload(); } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; + queryParam.value.column="createTime"; + queryParam.value.order="desc"; console.log(`🚀 ~ reload ~ queryParam:`, queryParam) defHttp.get({ url: '/zyGonggao/zyGonggao/list', params: queryParam.value }).then((res) => { console.log(res); diff --git a/src/views/zy/zyGonggao/ZyGonggaoList.vue b/src/views/zy/zyGonggao/ZyGonggaoList.vue index 18c458f..42dead5 100644 --- a/src/views/zy/zyGonggao/ZyGonggaoList.vue +++ b/src/views/zy/zyGonggao/ZyGonggaoList.vue @@ -44,7 +44,8 @@ 删除 撤回 预览 - 历史 + 发布 +
{{item.createTime}}
@@ -63,7 +64,7 @@
- + @@ -73,7 +74,7 @@ import { deleteOne } from './ZyGonggao.api'; import ZyGonggaoModal from './components/ZyGonggaoModal.vue'; import ZyGonggaoYlModal from './components/ZyGonggaoYlModal.vue'; - import ZyGonggaoHistoryModal from './components/ZyGonggaoHistoryModal.vue'; + // import ZyGonggaoHistoryModal from './components/ZyGonggaoHistoryModal.vue'; import { defHttp } from '/@/utils/http/axios'; import { useMessage } from "/@/hooks/web/useMessage"; import { JInput } from '/@/components/Form'; @@ -90,7 +91,7 @@ const queryParam = ref({rwbh, xqxn,"createBy":userName}); const registerModal = ref(); const registerYlModal = ref(); - const registerHistoryModal = ref(); + // const registerHistoryModal = ref(); const current = ref(0); const total = ref(0); const pageNo = ref(0); @@ -137,10 +138,10 @@ /** * 历史通知 */ - function handleHistory(record: Recordable) { - registerHistoryModal.value.disableSubmit = true; - registerHistoryModal.value.edit(record); - } + // function handleHistory(record: Recordable) { + // registerHistoryModal.value.disableSubmit = true; + // registerHistoryModal.value.edit(record); + // } /** * 删除事件 @@ -153,7 +154,7 @@ okText: '确认', cancelText: '取消', onOk: () => { - deleteOne({ id: record.id }, handleSuccess); + deleteOne({ id: record.id }, handleSuccess2); } }); } @@ -191,13 +192,20 @@ } /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + /** * 查询 */ @@ -218,13 +226,13 @@ } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.column="createTime"; diff --git a/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue b/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue index 7f45aee..d4f3eab 100644 --- a/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue +++ b/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue @@ -98,11 +98,9 @@ .then((res) => { if (res.success) { createMessage.success(res.message); - console.log("111111111"); emit('ok'); } else { createMessage.warning(res.message); - console.log("222222"); } }) .finally(() => { diff --git a/src/views/zy/zyInfo/StudentZyInfoList.vue b/src/views/zy/zyInfo/StudentZyInfoList.vue index 4fe4647..1a8cc81 100644 --- a/src/views/zy/zyInfo/StudentZyInfoList.vue +++ b/src/views/zy/zyInfo/StudentZyInfoList.vue @@ -122,7 +122,7 @@ if(record.score){ return "background: #18a689"; }else if(record.stuFilePath){ - return "background: #c6c209"; + return "background: #c6c209"; }else{ return "background: #fe1a1a"; } @@ -172,13 +172,11 @@ XxhbbksListModalPage.value.init(record); } - /** - * 成功回调 + * 成功回调,用于增加、修改、发布和撤回 */ function handleSuccess() { - total.value = 1; - handlePageChange(1); + reload(); } @@ -201,15 +199,15 @@ } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.zyStatus = '1,2,3,4'; queryParam.value.column="createTime"; queryParam.value.order="desc"; defHttp.get({ url: '/zyInfo/zyInfo/stuList', params: queryParam.value }).then(res => { - console.log(`🚀 ~ defHttp.get ~ res:`, res) + // console.log(`🚀 ~ defHttp.get ~ res:`, res) total.value = res.total; pageNo.value = res.pages; current.value = res.current; @@ -219,7 +217,7 @@ function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/zy/zyInfo/SutdentZyInfoHistoryList.vue b/src/views/zy/zyInfo/SutdentZyInfoHistoryList.vue index bf36d07..97d6947 100644 --- a/src/views/zy/zyInfo/SutdentZyInfoHistoryList.vue +++ b/src/views/zy/zyInfo/SutdentZyInfoHistoryList.vue @@ -165,7 +165,7 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + await deleteOne({ id: record.id }, handleSuccess2); } async function handleFabu(record){ @@ -187,13 +187,19 @@ /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } /** * 查询 @@ -214,8 +220,8 @@ } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.sflssj = '1'; @@ -232,7 +238,7 @@ function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/zy/zyInfo/ZyInfoHisList.vue b/src/views/zy/zyInfo/ZyInfoHisList.vue index a18ef3e..90b9052 100644 --- a/src/views/zy/zyInfo/ZyInfoHisList.vue +++ b/src/views/zy/zyInfo/ZyInfoHisList.vue @@ -161,7 +161,7 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + await deleteOne({ id: record.id }, handleSuccess2); } //发布作业 @@ -184,13 +184,20 @@ /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + function handleZySuccess(zyid){ setTimeout(()=>{handleSuccess()}, 1500); @@ -219,8 +226,8 @@ } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; // queryParam.value.sflssj = '0'; @@ -237,7 +244,7 @@ function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/zy/zyInfo/ZyInfoHistoryList.vue b/src/views/zy/zyInfo/ZyInfoHistoryList.vue index 0b0f698..3cfff56 100644 --- a/src/views/zy/zyInfo/ZyInfoHistoryList.vue +++ b/src/views/zy/zyInfo/ZyInfoHistoryList.vue @@ -89,7 +89,7 @@ import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; - + //当前路由信息 const { currentRoute } = useRouter(); const { query } = unref(currentRoute); @@ -107,7 +107,7 @@ const pageNo = ref(0); const pageSize = ref(6); const tableData = ref([]); - + const labelCol = reactive({ xs: { span: 24 }, @@ -125,7 +125,7 @@ registerModal.value.disableSubmit = false; registerModal.value.add(); } - + /** * 编辑事件 */ @@ -133,7 +133,7 @@ registerModal.value.disableSubmit = false; registerModal.value.edit(record); } - + /** * 详情 */ @@ -141,7 +141,7 @@ registerModal.value.disableSubmit = true; registerModal.value.edit(record); } - + //获取选课人数 function openXkrs(record){ console.log(`🚀 ~ openXkrs ~ record:`, record) @@ -152,7 +152,7 @@ function handleZyxx(record){ ZyInfoStudentListModalPage.value.disableSubmit = true; ZyInfoStudentListModalPage.value.init(record); - + } function handleShangchuan(record){ @@ -160,12 +160,12 @@ var param = {mainId:record.id,zyfj:record.filePath} ZyInfoStudentModalPage.value.edit(param); } - + /** * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + await deleteOne({ id: record.id }, handleSuccess2); } async function handleFabu(record){ @@ -184,52 +184,61 @@ } }); } - + /** - * 成功回调 + * 成功回调,用于删除 + */ + function handleSuccess2() { + total.value = 1; + handlePageChange(1); + } + + /** + * 成功回调,用于增加、修改、发布和撤回 */ function handleSuccess() { - reload() + reload(); } - + /** * 查询 */ function searchQuery() { - reload(); + total.value = 1; + handlePageChange(1); } - + /** * 重置 */ function searchReset() { queryParam.value = {}; - //刷新数据 - reload(); + total.value = 1; + handlePageChange(1); } function reload(){ - queryParam.value.pageNo = pageNo; - queryParam.value.pageSize = pageSize; + queryParam.value.pageNo = current.value; + queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; queryParam.value.sflssj = '1'; queryParam.value.column="startTime"; queryParam.value.order="desc"; defHttp.get({ url: '/zyInfo/zyInfo/list', params: queryParam.value }).then(res => { - console.log(`🚀 ~ defHttp.get ~ res:`, res) + // console.log(`🚀 ~ defHttp.get ~ res:`, res) total.value = res.total; pageNo.value = res.pages; current.value = res.current; tableData.value = res.records; }); } - + function handlePageChange(record){ - pageNo.value = record; + current.value = record; searchQuery(); } @@ -271,7 +280,7 @@ .zyCon{ line-height: 30px; } -.rotate { +.rotate { transform: rotate(45deg); background: rgb(28, 132, 198); color: #fff; diff --git a/src/views/zy/zyInfo/ZyInfoList.vue b/src/views/zy/zyInfo/ZyInfoList.vue index 33539bd..0f92a83 100644 --- a/src/views/zy/zyInfo/ZyInfoList.vue +++ b/src/views/zy/zyInfo/ZyInfoList.vue @@ -181,7 +181,16 @@ import dayjs from 'dayjs'; * 删除事件 */ async function handleDelete(record) { - await deleteOne({ id: record.id }, handleSuccess); + createConfirm({ + iconType: 'warning', + title: '删除', + content: '是否删除此作业?', + okText: '确认', + cancelText: '取消', + onOk: () => { + deleteOne({ id: record.id }, handleSuccess2); + } + }); } //发布作业 @@ -204,13 +213,20 @@ import dayjs from 'dayjs'; /** - * 成功回调 + * 成功回调,用于删除 */ - function handleSuccess() { + function handleSuccess2() { total.value = 1; handlePageChange(1); } + /** + * 成功回调,用于增加、修改、发布和撤回 + */ + function handleSuccess() { + reload(); + } + function handleZySuccess(zyid){ setTimeout(()=>{handleSuccess()}, 1500); var url = "/zyInfo/zyInfo/editStudent"; @@ -238,7 +254,7 @@ import dayjs from 'dayjs'; } function reload(){ - queryParam.value.pageNo = pageNo.value; + queryParam.value.pageNo = current.value; queryParam.value.pageSize = pageSize.value; queryParam.value.rwbh = rwbh; queryParam.value.xqxn = xqxn; @@ -249,14 +265,14 @@ import dayjs from 'dayjs'; console.log(`🚀 ~ defHttp.get ~ res:`, res) total.value = res.total; pageNo.value = res.pages; - current.value = res.total; + current.value = res.current; tableData.value = res.records; }); } function handlePageChange(record){ - pageNo.value = record; + current.value = record; reload(); } diff --git a/src/views/zy/zyTlq/StuZyTlqList.vue b/src/views/zy/zyTlq/StuZyTlqList.vue index d4349e5..4c6f1a6 100644 --- a/src/views/zy/zyTlq/StuZyTlqList.vue +++ b/src/views/zy/zyTlq/StuZyTlqList.vue @@ -13,6 +13,7 @@ 查询 + 重置
@@ -25,7 +26,7 @@ - {{index+1}}.{{item.title}} + {{(current-1)*pageSize+index+1}}.{{item.title}} @@ -68,7 +69,7 @@ const toggleSearchStatus = ref(false); const registerModal = ref(); const dataSource = ref([]); - const current = ref(0); + const current = ref(1); const total = ref(0); const pageNo = ref(0); const pageSize = ref(3); @@ -85,20 +86,6 @@ sm: { span: 16 }, }); - /** - * 发布 - */ - function handleFabu(record) { - defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "6" } }).then(res => { - total.value = 1; - pageNo.value = 0; - loadData(1); - }); - } - //新增翻页 - function handlePageChange(page: number) { - loadData(page); - } /** * 新增事件 */ @@ -130,19 +117,40 @@ await deleteOne({ id: record.id }, handleSuccess); } + /** + * 发布 + */ + function handleFabu(record) { + defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "6" } }).then(res => { + handleSuccess(); + }); + } + //新增翻页 + function handlePageChange(page: number) { + current.value = page; + loadData(); + } /** * 成功回调 */ function handleSuccess() { - loadData(1); + loadData(); } + /** + * 成功回调 + */ + function handleSuccess2() { + total.value = 1; + handlePageChange(1); + } /** * 查询 */ function searchQuery() { - loadData(1); + total.value = 1; + handlePageChange(1); } /** @@ -151,22 +159,24 @@ function searchReset() { queryParam.value = {}; //刷新数据 - loadData(1); + total.value = 1; + handlePageChange(1); } - function loadData(arg){ - defHttp.get({ url: '/zyTlq/zyTlq/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn,sffb:'1',column:'createTime',order:'desc' } }).then((res) => { + + function loadData(){ + defHttp.get({ url: '/zyTlq/zyTlq/list', params: { pageSize: 3,pageNo:current.value, rwbh:rwbh,xqxn:xqxn,sffb:'1',column:'createTime',order:'desc' } }).then((res) => { console.log(`🚀 ~ defHttp.get ~ res:`, res) dataSource.value = res.records; total.value = res.total; + pageNo.value = res.pages; + current.value = res.current; }); } //进入就加载 onMounted(() => { - loadData(1); + loadData(); }); - -