From 5cf9d9fd9972c88757b4821dfb3882720fe55c14 Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Fri, 8 Sep 2023 19:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=85=8D=E8=A7=92=E8=89=B2=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/UserTab/UserTab.vue | 53 +++--- components/timeScreen/timeScreen.vue | 28 ++- components/user-info/user-info.vue | 5 +- .../tabbar/examSimulation/comp/examSimulation.vue | 153 --------------- pages/tabbar/examSimulation/comp/simulation.vue | 209 +++++++++++++++++++++ pages/tabbar/examSimulation/index.vue | 10 +- pages/tabbar/mine/index.vue | 17 +- pages/tabbar/statistics/index.vue | 14 +- pages/tabbar/student/index.vue | 4 +- pages/userCenter/login/login.vue | 10 +- 10 files changed, 298 insertions(+), 205 deletions(-) delete mode 100644 pages/tabbar/examSimulation/comp/examSimulation.vue create mode 100644 pages/tabbar/examSimulation/comp/simulation.vue diff --git a/components/UserTab/UserTab.vue b/components/UserTab/UserTab.vue index f1097d4..8506f0f 100644 --- a/components/UserTab/UserTab.vue +++ b/components/UserTab/UserTab.vue @@ -29,79 +29,82 @@ - if (uni.getStorageSync('identity') == '1') { + if (uni.getStorageSync('identity') == '实操教练') { //教练 _this.list = [{ "pagePath": "/pages/tabbar/statistics/index", "text": "首页", - "iconPath": "../../static/images/tabbar/tj.png", - "selectedIconPath": "../../static/images/tabbar/tjActive.png" + "iconPath": require("../../static/images/tabbar/tj.png"), + "selectedIconPath": require("../../static/images/tabbar/tjActive.png") }, { "pagePath": "/pages/tabbar/examSimulation/index", "text": "考场模拟", - "iconPath": "../../static/images/tabbar/kc.png", - "selectedIconPath": "../../static/images/tabbar/kcActive.png" + "iconPath": require("../../static/images/tabbar/kc.png"), + "selectedIconPath": require("../../static/images/tabbar/kcActive.png") }, { "pagePath": "/pages/tabbar/operateTrain/index", "text": "实操训练", - "iconPath": "../../static/images/tabbar/sc.png", - "selectedIconPath": "../../static/images/tabbar/scActive.png" + "iconPath": require("../../static/images/tabbar/sc.png"), + "selectedIconPath": require("../../static/images/tabbar/scActive.png") }, { "pagePath": "/pages/tabbar/student/index", "text": "学员", - "iconPath": "../../static/images/tabbar/xy.png", - "selectedIconPath": "../../static/images/tabbar/xyActive.png" + "iconPath": require("../../static/images/tabbar/xy.png"), + "selectedIconPath": require("../../static/images/tabbar/xyActive.png") }, { "pagePath": "/pages/tabbar/mine/index", "text": "我的", - "iconPath": "../../static/images/tabbar/wd.png", - "selectedIconPath": "../../static/images/tabbar/wdActive.png" + "iconPath": require("../../static/images/tabbar/wd.png"), + "selectedIconPath": require("../../static/images/tabbar/wdActive.png") } ] - } else if(uni.getStorageSync('identity') == '2') { + } else if(uni.getStorageSync('identity') == '校长') { //校长 _this.list = [{ "pagePath": "/pages/tabbar/statistics/index", "text": "统计", - "iconPath": "../../static/images/tabbar/tj.png", - "selectedIconPath": "../../static/images/tabbar/tjActive.png" + "iconPath": require("../../static/images/tabbar/tj.png"), + "selectedIconPath": require("../../static/images/tabbar/tjActive.png") }, { "pagePath": "/pages/tabbar/student/index", "text": "学员", - "iconPath": "../../static/images/tabbar/xy.png", - "selectedIconPath": "../../static/images/tabbar/xyActive.png" + "iconPath": require("../../static/images/tabbar/xy.png"), + "selectedIconPath": require("../../static/images/tabbar/xyActive.png") }, { "pagePath": "/pages/tabbar/mine/index", "text": "我的", - "iconPath": "../../static/images/tabbar/wd.png", - "selectedIconPath": "../../static/images/tabbar/wdActive.png" + "iconPath": require("../../static/images/tabbar/wd.png"), + "selectedIconPath": require("../../static/images/tabbar/wdActive.png") } ] - }else { + }else if(uni.getStorageSync('identity') == '考场模拟教练'){ _this.list = [{ "pagePath": "/pages/tabbar/statistics/index", "text": "统计", - "iconPath": "../../static/images/tabbar/tj.png", - "selectedIconPath": "../../static/images/tabbar/tjActive.png" + "iconPath": require("../../static/images/tabbar/tj.png"), + "selectedIconPath": require("../../static/images/tabbar/tjActive.png") }, { "pagePath": "/pages/tabbar/examSimulation/index", "text": "预约记录", - "iconPath": "../../static/images/tabbar/kc.png", - "selectedIconPath": "../../static/images/tabbar/kcActive.png" + "iconPath": require("../../static/images/tabbar/kc.png"), + "selectedIconPath": require("../../static/images/tabbar/kcActive.png") }, { "pagePath": "/pages/tabbar/mine/index", "text": "我的", - "iconPath": "../../static/images/tabbar/wd.png", - "selectedIconPath": "../../static/images/tabbar/wdActive.png" + "iconPath": require("../../static/images/tabbar/wd.png"), + "selectedIconPath": require("../../static/images/tabbar/wdActive.png") }] + }else { + // 模拟器老师 + } }, methods: { diff --git a/components/timeScreen/timeScreen.vue b/components/timeScreen/timeScreen.vue index 3bae95f..25ebe92 100644 --- a/components/timeScreen/timeScreen.vue +++ b/components/timeScreen/timeScreen.vue @@ -42,10 +42,16 @@ currentPopTab: 1, showDatePicker: false, value1: '', - currentBtnDate: '' + currentBtnDate: '', + date1: '', + date2: '', + date3: '', } }, methods: { + changePopTab(num) { + this.currentPopTab = num + }, // 1打开时间选择器 showDatePickerFn(num) { this.showDate = false @@ -60,7 +66,27 @@ date = uni.$u.date(val.value, 'yyyy-mm') } this['date'+this.currentBtnDate] = date + this.$emit('confirmDatePicker') }, + // 3确定筛选时间 + selectDateClick() { + let obj = { + date1: this.date1, + date2: this.date2, + date3: this.date3, + } + if(this.currentPopTab==2) { + if(!this.date2) return this.$u.toast('请选择开始时间') + if(!this.date3) return this.$u.toast('请选择结束时间') + if(new Date(this.date2)*1>new Date(this.date3)*1) return this.$u.toast('开始时间不能大于结束时间') + delete obj.date1 + }else { + if(!this.date1) return this.$u.toast('请选择时间') + delete obj.date2 + delete obj.date3 + } + this.$emit('selectDateClick', obj) + } } } diff --git a/components/user-info/user-info.vue b/components/user-info/user-info.vue index 01d517a..b8cef7e 100644 --- a/components/user-info/user-info.vue +++ b/components/user-info/user-info.vue @@ -5,7 +5,7 @@ - 大乔教练 + 大乔{{identity=='校长'?'校长': '教练'}} @@ -15,7 +15,8 @@ 翔力驾校 - 合作教练 + 驾校校长 + 合作教练 diff --git a/pages/tabbar/examSimulation/comp/examSimulation.vue b/pages/tabbar/examSimulation/comp/examSimulation.vue deleted file mode 100644 index 9218166..0000000 --- a/pages/tabbar/examSimulation/comp/examSimulation.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/tabbar/examSimulation/comp/simulation.vue b/pages/tabbar/examSimulation/comp/simulation.vue new file mode 100644 index 0000000..b2b03e2 --- /dev/null +++ b/pages/tabbar/examSimulation/comp/simulation.vue @@ -0,0 +1,209 @@ + + + + + \ No newline at end of file diff --git a/pages/tabbar/examSimulation/index.vue b/pages/tabbar/examSimulation/index.vue index 1e568d8..60729c3 100644 --- a/pages/tabbar/examSimulation/index.vue +++ b/pages/tabbar/examSimulation/index.vue @@ -1,15 +1,17 @@