From 5f22ad31f92b939ca3a1ee54bd690104a0a318e2 Mon Sep 17 00:00:00 2001 From: markma <750975972@qq.com> Date: Fri, 28 Jan 2022 11:54:20 +0800 Subject: [PATCH] 08 debug and beautiful --- src/views/OuterAppDetail.vue | 10 ++--- src/views/OuterHistory.vue | 14 +++---- src/views/StudentAppForm.vue | 48 ++++++++++++++++------ src/views/StudentApplication.vue | 68 +++++++++++++++++++++++--------- src/views/StudentHistory.vue | 59 +++++++++++++++++++++------ src/views/TeacherApplication.vue | 27 ++++++------- src/views/TeacherHistory.vue | 16 ++++---- 7 files changed, 168 insertions(+), 74 deletions(-) diff --git a/src/views/OuterAppDetail.vue b/src/views/OuterAppDetail.vue index 0fe7a0c..ae2baa0 100644 --- a/src/views/OuterAppDetail.vue +++ b/src/views/OuterAppDetail.vue @@ -80,9 +80,9 @@ export default { let id = window.location.pathname.split('/')[3]; let school_id = $_GET('school_id', window.location.href); console.log(school_id); - axios.get('http://localhost:8181/leaveDetail/findFromSIDTimeLimit/' + school_id + "/" + (currentPage) + '/6').then(function (resp) { + axios.get('http://localhost:8181/leaveDetail/findFromSIDTimeLimit/' + school_id + "/" + (currentPage) + '/20').then(function (resp) { _this.tableData = resp.data - _this.pageSize = 6 + _this.pageSize = 20 _this.total = resp.data.length }) }, @@ -110,7 +110,7 @@ export default { }, data() { return { - pageSize: 6, + pageSize: 20, total: 11, tableData: [{}] } @@ -120,9 +120,9 @@ export default { let id = window.location.pathname.split('/')[3]; let school_id = $_GET('school_id', window.location.href); console.log(school_id); - axios.get('http://localhost:8181/leaveDetail/findFromSIDTimeLimit/' + school_id + '/1/6').then(function (resp) { + axios.get('http://localhost:8181/leaveDetail/findFromSIDTimeLimit/' + school_id + '/1/20').then(function (resp) { _this.tableData = resp.data - _this.pageSize = 6 + _this.pageSize = 20 _this.total = resp.data.length }) } diff --git a/src/views/OuterHistory.vue b/src/views/OuterHistory.vue index a2785da..d16547b 100644 --- a/src/views/OuterHistory.vue +++ b/src/views/OuterHistory.vue @@ -73,18 +73,18 @@ export default { page(currentPage) { const _this = this let id = window.location.pathname.split('/')[3]; - axios.get('http://localhost:8181/outDetail/findAndReturnOLDs/' + (currentPage) + '/6').then(function (resp) { + axios.get('http://localhost:8181/outDetail/findAndReturnOLDs/' + (currentPage) + '/20').then(function (resp) { _this.tableData = resp.data - _this.pageSize = 6 + _this.pageSize = 20 }) - axios.get('http://localhost:8181/outDetail/findAndReturnOLDsNum/' + (currentPage) + '/6').then(function (resp) { + axios.get('http://localhost:8181/outDetail/findAndReturnOLDsNum/' + (currentPage) + '/20').then(function (resp) { _this.total = resp.data }) } }, data() { return { - pageSize: 6, + pageSize: 20, total: 1, tableData: [{ id: 1, @@ -102,11 +102,11 @@ export default { created() { const _this = this let id = window.location.pathname.split('/')[3]; - axios.get('http://localhost:8181/outDetail/findAndReturnOLDs/1/6').then(function (resp) { + axios.get('http://localhost:8181/outDetail/findAndReturnOLDs/1/20').then(function (resp) { _this.tableData = resp.data - _this.pageSize = 6 + _this.pageSize = 20 }) - axios.get('http://localhost:8181/outDetail/findAndReturnOLDsNum/1/6').then(function (resp) { + axios.get('http://localhost:8181/outDetail/findAndReturnOLDsNum/1/20').then(function (resp) { _this.total = resp.data }) } diff --git a/src/views/StudentAppForm.vue b/src/views/StudentAppForm.vue index bc42637..55889fb 100644 --- a/src/views/StudentAppForm.vue +++ b/src/views/StudentAppForm.vue @@ -3,8 +3,7 @@

默认您已经遵守防疫规定。

-
- 离开时间 + -
-
- 返回时间 + + -
+ - + +

@@ -49,6 +53,7 @@ export default { reason: '', type: '审核中' }, + places: [], pickerOptions: { shortcuts: [{ text: '今早八点', @@ -116,22 +121,43 @@ export default { _this.$router.push('/user/student/' + id + '/history') } }) - } - else if(resp.data == 'time failed'){ + } else if (resp.data == 'time failed') { _this.$alert('时间错误', '消息', { confirmButtonText: '确定', }) } }) - } - else { + } else { return false; } }); }, resetForm(formName) { this.$refs[formName].resetFields(); + }, + querySearch(queryString, cb) { + var places = this.places; + var results = queryString ? places.filter(this.createFilter(queryString)) : places; + // 调用 callback 返回建议列表的数据 + cb(results); + }, + createFilter(queryString) { + return (places) => { + return (places.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0); + }; + }, + loadAll() { + return [ + {"value": "一号院"}, + {"value": "万家丽"} + ] + }, + handleSelect(item) { + console.log(item); } + }, + mounted() { + this.places = this.loadAll(); } } diff --git a/src/views/StudentApplication.vue b/src/views/StudentApplication.vue index dcd45af..a7384d0 100644 --- a/src/views/StudentApplication.vue +++ b/src/views/StudentApplication.vue @@ -1,11 +1,15 @@