From ebf4e9ffbc3a88a22555411fe9c567452a3711c0 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 29 Apr 2024 16:19:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E7=AB=99=E6=B7=BB=E5=8A=A0=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Sidebar.vue | 1 - src/store/index.js | 34 +- src/views/course/AddCurriculum.vue | 12 +- src/views/course/Curriculum.vue | 662 ++++++++-------- src/views/course/contentSettings.vue | 10 +- src/views/customer/AddCustomer.vue | 13 +- src/views/customer/Order.vue | 288 ++++--- src/views/customer/customer.vue | 23 +- .../information/contentManage/contentList.vue | 431 ++++++----- src/views/match/add/index.vue | 4 +- src/views/match/add/step4.vue | 75 +- src/views/match/list/index.vue | 53 +- src/views/match/manage/index.vue | 2 +- src/views/match/manage/matchArch.vue | 3 +- src/views/match/manage/matchArchList.vue | 24 +- src/views/match/manage/matchRank.vue | 25 +- src/views/match/manage/matchSignup.vue | 7 +- src/views/order/AddOrder.vue | 12 +- src/views/order/Order.vue | 713 ++++++++++-------- src/views/parnerOperation/index.vue | 101 ++- src/views/parnerOperation/info.vue | 339 +++++++++ src/views/parnerOperation/learn.vue | 339 +++++++++ src/views/parnerOperation/learnMg.vue | 10 +- src/views/parnerOperation/mobileRole.vue | 221 ------ src/views/parnerOperation/pcRole.vue | 269 ------- src/views/parnerOperation/plan.vue | 279 +++++++ src/views/parnerOperation/schemeSet.vue | 9 +- src/views/parnerOperation/staff.vue | 268 ------- src/views/serve/Configure.vue | 122 ++- src/views/serve/backstage/index.vue | 2 +- src/views/serve/backstage/model.vue | 10 +- src/views/serve/backstage/sourceModel.vue | 9 +- src/views/serve/projectAdd.vue | 4 +- src/views/serve/projectList.vue | 83 +- src/views/shop/addProduct/index.vue | 9 +- src/views/shop/list/index.vue | 77 +- src/views/shop/list/product/index.vue | 24 +- src/views/theoreticalCourse/add/index.vue | 6 +- .../contentSettings/index.vue | 46 +- .../list/buildPlatform/index.vue | 46 +- .../list/courseManagement/index.vue | 594 ++++++++------- src/views/theoreticalCourse/list/index.vue | 95 +-- src/views/theoreticalCourse/preview/index.vue | 10 +- src/views/user/AddUser.vue | 482 ++++++------ src/views/user/User.vue | 33 +- 45 files changed, 3197 insertions(+), 2682 deletions(-) create mode 100644 src/views/parnerOperation/info.vue create mode 100644 src/views/parnerOperation/learn.vue delete mode 100644 src/views/parnerOperation/mobileRole.vue delete mode 100644 src/views/parnerOperation/pcRole.vue create mode 100644 src/views/parnerOperation/plan.vue delete mode 100644 src/views/parnerOperation/staff.vue diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 8707bb3..be09266 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -138,7 +138,6 @@ export default { methods: { handleSelect (index) { this.onRoutes = index - this.$store.commit('setOrderParam', null) this.$store.commit('setInfoTab', '1') this.$store.commit('setColumnId', '') this.$store.commit('setCompetitionCache', null) diff --git a/src/store/index.js b/src/store/index.js index 32bd85e..d184735 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -21,14 +21,13 @@ const store = new Vuex.Store({ projectFields: {}, btns: [], routes: [], - customerPage: 1, - matchPage: 1, - platformSource: 0, columnId: '', tabId: '1', dataPer: [], - orderParam: null, - competitionCache: null + competitionCache: null, + referrer: '', + innerReferrer: '', + orderParam: null, }, actions: { setSystemId({ state,commit },systemId) { @@ -54,15 +53,6 @@ const store = new Vuex.Store({ SET_USERNAME (state, userName) { state.userName = userName }, - SET_C_PAGE: (state, page) => { - state.customerPage = page - }, - SET_M_PAGE: (state, page) => { - state.matchPage = page - }, - SET_M_SOURCE: (state, platformSource) => { - state.platformSource = platformSource - }, courseData (state, payload) { state.courseId = payload.course_id }, @@ -75,10 +65,6 @@ const store = new Vuex.Store({ configData (state, payload) { state.configId = payload.config_id }, - systemData (state, payload) { - state.systemId = payload.system_id - state.orderId = payload.order_id - }, userLoginData (state, payload) { state.userLoginId = payload.userLogin_id state.userName = payload.userName @@ -105,12 +91,18 @@ const store = new Vuex.Store({ setInfoTab: (state, tabId) => { state.tabId = tabId }, - setOrderParam: (state, orderParam) => { - state.orderParam = orderParam - }, setCompetitionCache: (state, param) => { state.competitionCache = param }, + setReferrer: (state, val) => { + state.referrer = val + }, + setInnerReferrer: (state, val) => { + state.innerReferrer = val + }, + setOrderParam: (state, val) => { + state.orderParam = val + }, } }); diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue index e3609a5..faacdcc 100644 --- a/src/views/course/AddCurriculum.vue +++ b/src/views/course/AddCurriculum.vue @@ -7,7 +7,7 @@
+ @click="back"> 返回 { this.$router.push(`/contentSettings?cid=${res.cid}`); }).catch(() => { - this.backPage() - }) : this.backPage() + this.$router.push('/curriculum') + }) : this.$router.push('/curriculum') }).catch((res) => { this.submiting = false this.loadIns.close() @@ -1059,7 +1059,7 @@ export default { } }); }, - goback () { + back () { const id = this.form.cid const updateTime = this.updateTime // 更改了信息才需要提示 @@ -1078,8 +1078,8 @@ export default { }, // 返回上一页 backPage () { - this.$router.back() - this.loadIns.close() + this.loadIns && this.loadIns.close() + this.$router.push(this.$store.state.referrer || '/curriculum') } } }; diff --git a/src/views/course/Curriculum.vue b/src/views/course/Curriculum.vue index a442781..08bc0bb 100644 --- a/src/views/course/Curriculum.vue +++ b/src/views/course/Curriculum.vue @@ -1,318 +1,371 @@ @@ -320,8 +373,5 @@ export default { .card { min-height: calc(100vh - 300px); } -.mag { - margin-right: 20px; -} diff --git a/src/views/course/contentSettings.vue b/src/views/course/contentSettings.vue index 59e83ec..da6147e 100644 --- a/src/views/course/contentSettings.vue +++ b/src/views/course/contentSettings.vue @@ -3,7 +3,7 @@
-
@@ -432,11 +432,11 @@ export default { // 处理预览资源后返回弹框不会消失的问题 if (window.history && window.history.pushState) { history.pushState(null, null, document.URL); - window.addEventListener("popstate", this.goBack, false); + window.addEventListener("popstate", this.back, false); } }, destroyed () { - window.removeEventListener("popstate", this.goBack, false); + window.removeEventListener("popstate", this.back, false); }, methods: { getData () { @@ -452,7 +452,7 @@ export default { handleSelectionChange (val) { this.multipleSelection = val }, - goBack () { + back () { // 如果是预览则关闭预览 if (this.previewing) { this.closeIframe(); @@ -475,7 +475,7 @@ export default { this.sorting = false } } else { - this.$router.back() + this.$router.push(this.$store.state.referrer || '/curriculum') } } }, diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index f62882a..51ea7d4 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -643,6 +643,7 @@ import pdf from '../../components/pdf.vue' import util from '@/utils/util' import axios from 'axios' +import qs from 'qs' export default { components: { pdf }, data () { @@ -796,9 +797,9 @@ export default { totalProduct: 0, form3: { - orderType: '', - orderStatus: '', - keyword: '' + orderType: +this.$route.query.orderType || '', + orderStatus: +this.$route.query.orderStatus || '', + keyword: this.$route.query.keyword || '' }, // 订单类型 orderTypeList: [{ @@ -1188,6 +1189,7 @@ export default { }, // 订单详情 toOrderDetail (row) { + this.$router.push(`/addcustomer?id=${this.customerId}&type=tab3&${qs.stringify(this.form3)}&page=${this.pageOrder}`) this.$router.push(`/AddOrder?val=watch&orderId=${row.orderId}&orderStatus=${row.orderStatus === '已完成' ? 1 : 0}`) }, @@ -1216,6 +1218,7 @@ export default { }, // 商务经理查看 toOrder (row) { + this.$router.push(`/addcustomer?id=${this.customerId}&type=tab5&keyword=${this.bmsKeyword}&page=${this.pageOrder}`) this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}&teamId=${row.teamId}`) }, @@ -1411,7 +1414,7 @@ export default { }, 1500) this.$store.commit('schoolIdData', { schoolId: this.form.schoolId }) this.$message.success('添加成功') - tab ? this.tabChange(tab, 1) : this.backPage() + tab ? this.tabChange(tab, 1) : this.router.push('list') }).catch((res) => { this.submiting = false }) @@ -1457,7 +1460,7 @@ export default { } }, backPage () { - this.$router.push(`customer?page=${this.$store.state.customerPage}`) + this.$router.push(this.$store.state.referrer || '/customer') } } }; diff --git a/src/views/customer/Order.vue b/src/views/customer/Order.vue index b38681d..b929945 100644 --- a/src/views/customer/Order.vue +++ b/src/views/customer/Order.vue @@ -1,126 +1,179 @@ @@ -131,8 +184,8 @@ export default { .mag { margin-right: 20px; } -.cell{ - white-space:pre-wrap; +.cell { + white-space: pre-wrap; width: 140px; overflow: hidden; text-overflow: ellipsis; @@ -141,10 +194,11 @@ export default { line-clamp: 2; -webkit-box-orient: vertical; } -.tags{ +.tags { border: none; - background: none;color: #000; - white-space:pre-wrap; + background: none; + color: #000; + white-space: pre-wrap; width: 140px; overflow: hidden; text-overflow: ellipsis; diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue index f30e78e..23872a4 100644 --- a/src/views/customer/customer.vue +++ b/src/views/customer/customer.vue @@ -176,6 +176,7 @@ import Setting from '@/setting' import axios from 'axios'; import util from "@/libs/util"; +import qs from 'qs' export default { name: 'customer', data () { @@ -204,10 +205,10 @@ export default { }], listData: [], form: { - customerType: '', - provinces: '', - city: '', - keyword: '' + customerType: +this.$route.query.customerType || '', + provinces: +this.$route.query.provinces || '', + city: +this.$route.query.city || '', + keyword: this.$route.query.keyword || '' }, multipleSelection: [], provinceList: [], @@ -227,6 +228,11 @@ export default { }, }, mounted () { + const { query } = this.$route + if (query.page) { + this.$router.push('/customer').catch(() => { }) + } + this.getData() this.getProvince() }, @@ -258,6 +264,7 @@ export default { this.$get(this.api.queryProvince).then(res => { this.provinceList = res.list this.$store.commit("provinceData", { provinceList: this.provinceList }) + this.form.city && this.getCityData() }).catch(res => { }) }, clearprovince () { @@ -307,13 +314,20 @@ export default { util.downloadFileDirect(`客户列表.xlsx`, new Blob([res.data])) }).catch(res => { }) }, + // 缓存当前页面和参数,详情页返回到列表的时候直接取该url + setReferrer () { + this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`) + }, addcustomer () { + this.setReferrer() this.$router.push('addcustomer') }, edit (row) { + this.setReferrer() this.$router.push(`addcustomer?id=${row.customerId}`) }, show (row) { + this.setReferrer() this.$router.push(`addcustomer?id=${row.customerId}&show=true`) }, handleDelete (row) { @@ -363,7 +377,6 @@ export default { }, handleCurrentChange (val) { this.page = val - this.$store.commit('SET_C_PAGE', val) this.$router.push(`customer?page=${val}`) this.getData() }, diff --git a/src/views/information/contentManage/contentList.vue b/src/views/information/contentManage/contentList.vue index 231cfd5..d77753c 100644 --- a/src/views/information/contentManage/contentList.vue +++ b/src/views/information/contentManage/contentList.vue @@ -1,212 +1,261 @@ diff --git a/src/views/match/add/index.vue b/src/views/match/add/index.vue index 23e2475..061b862 100644 --- a/src/views/match/add/index.vue +++ b/src/views/match/add/index.vue @@ -220,7 +220,7 @@ export default { this.editing = false } } else { - this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) + this.backPage() } }, back () { @@ -240,7 +240,7 @@ export default { } }, backPage () { - this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) + this.$router.push(this.$store.state.referrer || '/match') } } }; diff --git a/src/views/match/add/step4.vue b/src/views/match/add/step4.vue index bcc479c..8783729 100644 --- a/src/views/match/add/step4.vue +++ b/src/views/match/add/step4.vue @@ -1,53 +1,56 @@ \ No newline at end of file diff --git a/src/views/match/list/index.vue b/src/views/match/list/index.vue index 200b294..0b22157 100644 --- a/src/views/match/list/index.vue +++ b/src/views/match/list/index.vue @@ -35,7 +35,7 @@
  • @@ -232,18 +232,16 @@ diff --git a/src/views/match/manage/matchRank.vue b/src/views/match/manage/matchRank.vue index 447815c..69f0866 100644 --- a/src/views/match/manage/matchRank.vue +++ b/src/views/match/manage/matchRank.vue @@ -4,7 +4,7 @@ class="m-b-20 head-card">
    @@ -272,9 +272,7 @@ diff --git a/src/views/match/manage/matchSignup.vue b/src/views/match/manage/matchSignup.vue index c56701b..2ad5180 100644 --- a/src/views/match/manage/matchSignup.vue +++ b/src/views/match/manage/matchSignup.vue @@ -345,7 +345,7 @@ export default { info: { completeCompetitionSetup: {} }, - isDisable: '', + isDisable: this.$route.query.isDisable ? +this.$route.query.isDisable : '', statusList: [ { id: '', @@ -360,10 +360,10 @@ export default { name: '未禁用' } ], - keyword: "", + keyword: this.$route.query.keyword || '', listData: [], multipleSelection: [], - page: 1, + page: +this.$route.query.page || 1, pageSize: 10, total: 0, schoolOrder: '', @@ -813,6 +813,7 @@ export default { }, // 参赛信息 toInfo (row) { + this.$store.commit('setInnerReferrer', `${this.$route.fullPath}&keyword=${this.keyword}&page=${this.page}&isDisable=${this.isDisable}`) this.$router.push(`/matchInfo?id=${this.id}&accountId=${row.accountId}`) }, exportAll () { diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index fb6254c..25443c5 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -9,7 +9,7 @@
    + @click="back"> 返回 {{ titlesw }} @@ -1756,7 +1756,6 @@ export default { cityId: "", phone: "", orderAmount: 0, - // orderId: this.$store.state.orderId, customerName: "",// 客户名称 teamId: '', businessManagerId: '', @@ -2350,7 +2349,7 @@ export default { this.refreshCache() this.$message.success("修改成功"); this.loading = false; - this.$router.back(); + this.back(); }).catch(err => { this.loading = false; }); @@ -2359,7 +2358,7 @@ export default { this.refreshCache() this.$message.success("添加订单成功"); this.loading = false; - this.renewDisabled ? this.$router.push('/order') : this.$router.back(); + this.renewDisabled ? this.$router.push('/order') : this.back(); }).catch(err => { this.loading = false; }); @@ -3005,8 +3004,9 @@ export default { IPSure () { this.ipVisible = false; }, - goBack () { - this.$router.go(-1); + back () { + // this.$router.push(this.$store.state.referrer || '/order') + this.$router.back() }, /** * 添加实训课程产品权限,理论课程 ,数据前瞻平台权限,职站增值应用产品权限,实训课程(非集成),实验工具 diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue index 2aeec33..c6272b4 100644 --- a/src/views/order/Order.vue +++ b/src/views/order/Order.vue @@ -1,332 +1,402 @@ @@ -337,8 +407,8 @@ export default { .mag { margin-right: 20px; } -.cell{ - white-space:pre-wrap; +.cell { + white-space: pre-wrap; width: 140px; overflow: hidden; text-overflow: ellipsis; @@ -347,10 +417,11 @@ export default { line-clamp: 2; -webkit-box-orient: vertical; } -.tags{ +.tags { border: none; - background: none;color: #000; - white-space:pre-wrap; + background: none; + color: #000; + white-space: pre-wrap; width: 140px; overflow: hidden; text-overflow: ellipsis; diff --git a/src/views/parnerOperation/index.vue b/src/views/parnerOperation/index.vue index e28862d..75fd9f3 100644 --- a/src/views/parnerOperation/index.vue +++ b/src/views/parnerOperation/index.vue @@ -1,64 +1,63 @@ diff --git a/src/views/parnerOperation/info.vue b/src/views/parnerOperation/info.vue new file mode 100644 index 0000000..93b2b4e --- /dev/null +++ b/src/views/parnerOperation/info.vue @@ -0,0 +1,339 @@ + + + + + \ No newline at end of file diff --git a/src/views/parnerOperation/learn.vue b/src/views/parnerOperation/learn.vue new file mode 100644 index 0000000..c5ad7d8 --- /dev/null +++ b/src/views/parnerOperation/learn.vue @@ -0,0 +1,339 @@ + + + + + \ No newline at end of file diff --git a/src/views/parnerOperation/learnMg.vue b/src/views/parnerOperation/learnMg.vue index f3dc136..cc11892 100644 --- a/src/views/parnerOperation/learnMg.vue +++ b/src/views/parnerOperation/learnMg.vue @@ -660,6 +660,9 @@ export default { preview () { window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}`) }, + backPage () { + this.$router.push(this.$store.state.referrer || '/parnerOperation') + }, // 返回 back () { this.pass = true @@ -671,17 +674,16 @@ export default { }).then(() => { this.submit(this.form.isRelease) }).catch(() => { - this.$router.back() + this.backPage() }) } else { - this.$router.back() + this.backPage() } }, // 提交 submit (isRelease, next) { if (this.submiting) return false const form = JSON.parse(JSON.stringify(this.form)) - console.log('form=>', form) if (!form.title) return Util.errorMsg('请填写标题') if (this.nameRepeat) return Util.errorMsg('该标题已重复!') // 如果是发布 @@ -702,7 +704,7 @@ export default { delete form.children this.$post(this.api.updateParnerArticle, form).then(res => { Util.successMsg('修改成功') - next ? next() : this.$router.back() + next ? next() : this.backPage() }).catch(err => { this.submiting = false }) diff --git a/src/views/parnerOperation/mobileRole.vue b/src/views/parnerOperation/mobileRole.vue deleted file mode 100644 index 28d6007..0000000 --- a/src/views/parnerOperation/mobileRole.vue +++ /dev/null @@ -1,221 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/parnerOperation/pcRole.vue b/src/views/parnerOperation/pcRole.vue deleted file mode 100644 index 2e2522f..0000000 --- a/src/views/parnerOperation/pcRole.vue +++ /dev/null @@ -1,269 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/parnerOperation/plan.vue b/src/views/parnerOperation/plan.vue new file mode 100644 index 0000000..8635267 --- /dev/null +++ b/src/views/parnerOperation/plan.vue @@ -0,0 +1,279 @@ + + + + + \ No newline at end of file diff --git a/src/views/parnerOperation/schemeSet.vue b/src/views/parnerOperation/schemeSet.vue index 46a2d68..fc54cfa 100644 --- a/src/views/parnerOperation/schemeSet.vue +++ b/src/views/parnerOperation/schemeSet.vue @@ -574,6 +574,9 @@ export default { `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` ) }, + backPage () { + this.$router.push(this.$store.state.referrer || '/parnerOperation?type=plan') + }, // 返回 back () { this.pass = true @@ -585,10 +588,10 @@ export default { }).then(() => { this.submit(this.form.isRelease) }).catch(() => { - this.$router.back() + this.backPage() }) } else { - this.$router.back() + this.backPage() } }, // 更新附件的状态为发布 @@ -622,7 +625,7 @@ export default { if (form.id) { this.$post(this.api.updateScheme, form).then(res => { Util.successMsg('修改成功') - next ? next() : this.$router.back() + next ? next() : this.backPage() }).catch(err => { this.submiting = false }) diff --git a/src/views/parnerOperation/staff.vue b/src/views/parnerOperation/staff.vue deleted file mode 100644 index 0737dfb..0000000 --- a/src/views/parnerOperation/staff.vue +++ /dev/null @@ -1,268 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/serve/Configure.vue b/src/views/serve/Configure.vue index 52b7242..bc4f5b1 100644 --- a/src/views/serve/Configure.vue +++ b/src/views/serve/Configure.vue @@ -12,27 +12,27 @@
    - - + - - + @@ -41,7 +41,7 @@ @@ -56,7 +56,7 @@

    服务列表
    - @@ -73,7 +73,7 @@ label="系统类型" align="center"> + :current-page="page" + :total="total">
    @@ -136,56 +136,32 @@ diff --git a/src/views/serve/backstage/index.vue b/src/views/serve/backstage/index.vue index 7f550f3..f75cb5e 100644 --- a/src/views/serve/backstage/index.vue +++ b/src/views/serve/backstage/index.vue @@ -57,7 +57,7 @@ export default { }) }, back () { - this.$router.push('/configure') + this.$router.push(this.$store.state.referrer || '/configure') } } }; diff --git a/src/views/serve/backstage/model.vue b/src/views/serve/backstage/model.vue index 6e8c8ba..afa11d0 100644 --- a/src/views/serve/backstage/model.vue +++ b/src/views/serve/backstage/model.vue @@ -106,7 +106,6 @@ diff --git a/src/views/shop/list/index.vue b/src/views/shop/list/index.vue index bc63fd2..e06f9e4 100644 --- a/src/views/shop/list/index.vue +++ b/src/views/shop/list/index.vue @@ -1,14 +1,17 @@ \ No newline at end of file diff --git a/src/views/shop/list/product/index.vue b/src/views/shop/list/product/index.vue index efe6a8a..07aeda4 100644 --- a/src/views/shop/list/product/index.vue +++ b/src/views/shop/list/product/index.vue @@ -181,7 +181,6 @@ diff --git a/src/views/theoreticalCourse/list/index.vue b/src/views/theoreticalCourse/list/index.vue index 360854b..a0d6f7a 100644 --- a/src/views/theoreticalCourse/list/index.vue +++ b/src/views/theoreticalCourse/list/index.vue @@ -1,18 +1,22 @@ \ No newline at end of file diff --git a/src/views/theoreticalCourse/preview/index.vue b/src/views/theoreticalCourse/preview/index.vue index 41a17dd..4783799 100644 --- a/src/views/theoreticalCourse/preview/index.vue +++ b/src/views/theoreticalCourse/preview/index.vue @@ -4,7 +4,7 @@
    -
    @@ -185,9 +185,6 @@ export default { this.getChapter(); }, methods: { - goBack () { - this.$router.back(); - }, async getData () { let res = await this.$post(`${this.api.findTheoreticalCourse}?id=${this.id}`); this.courseName = res.data.courseName; @@ -313,7 +310,10 @@ export default { }, loadPdfHandler (e) { this.currentPage = 1; - } + }, + back () { + this.$router.push(this.$store.state.referrer || '/theoreticalCourse') + }, } }; diff --git a/src/views/user/AddUser.vue b/src/views/user/AddUser.vue index 3415ab0..0f3a68d 100644 --- a/src/views/user/AddUser.vue +++ b/src/views/user/AddUser.vue @@ -1,250 +1,278 @@ \ No newline at end of file diff --git a/src/views/user/User.vue b/src/views/user/User.vue index 3f9ba32..065b73e 100644 --- a/src/views/user/User.vue +++ b/src/views/user/User.vue @@ -12,13 +12,6 @@ - import Setting from '@/setting' +import qs from 'qs' export default { name: 'user', data () { @@ -219,18 +213,17 @@ export default { platformId: Setting.platformId, searchTimer: null, form: { - name: '', countries: '中国', - provinces: '', - city: '', - platformId: '', - schoolId: '', + provinces: +this.$route.query.provinces || '', + city: +this.$route.query.provinces || '', + platformId: +this.$route.query.platformId || '', + schoolId: +this.$route.query.schoolId || '', accountRole: '', - keyword: '', - date: '', - startTime: '', - endTime: '', - month: '' + keyword: this.$route.query.keyword || '', + date: this.$route.query.startTime ? [this.$route.query.startTime, this.$route.query.endTime] : [], + startTime: this.$route.query.startTime || '', + endTime: this.$route.query.endTime || '', + month: +this.$route.query.month || '' }, accountRoleList: [{ name: '超级管理员', @@ -323,6 +316,11 @@ export default { } }, mounted () { + const { query } = this.$route + if (query.page) { + this.$router.push('/user').catch(() => { }) + } + this.getData() this.getSchoolData(); }, @@ -418,6 +416,7 @@ export default { this.getData() }, toDetail (row, detail) { + this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`) this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`) }, handleDelete (row) {