正在显示
71 个修改的文件
包含
2265 行增加
和
879 行删除
| 1 | 1 | <template> |
| 2 | - <view class="c-no-data" :style="[wrapStyle]" > | |
| 2 | + <view class="c-no-data" :style="[wrapStyle]"> | |
| 3 | 3 | <view class="image"> |
| 4 | 4 | <u-image :src="vuex_baseImgUrl+'/no_data.png'" width="480rpx" height="480rpx"></u-image> |
| 5 | 5 | </view> |
| 6 | - <view class="title">{{ title }}</view> | |
| 6 | + <view class="title" :style="[topStyle]">{{ title }}</view> | |
| 7 | 7 | </view> |
| 8 | 8 | </template> |
| 9 | 9 | |
| ... | ... | @@ -19,10 +19,10 @@ |
| 19 | 19 | title: { |
| 20 | 20 | type: String, |
| 21 | 21 | default: '暂无数据' |
| 22 | - }, | |
| 23 | - paddingTop: { | |
| 24 | - type: String, | |
| 25 | - default: "180rpx" | |
| 22 | + }, | |
| 23 | + paddingTop: { | |
| 24 | + type: String, | |
| 25 | + default: "180" | |
| 26 | 26 | }, |
| 27 | 27 | }, |
| 28 | 28 | data() { |
| ... | ... | @@ -34,14 +34,21 @@ |
| 34 | 34 | |
| 35 | 35 | }, |
| 36 | 36 | computed: { |
| 37 | - wrapStyle() { | |
| 38 | - let style = {}; | |
| 39 | - style.paddingTop = this.paddingTop | |
| 40 | - return style; | |
| 37 | + wrapStyle() { | |
| 38 | + let style = {}; | |
| 39 | + style.paddingTop = this.paddingTop + 'rpx'; | |
| 40 | + return style; | |
| 41 | + }, | |
| 42 | + | |
| 43 | + topStyle() { | |
| 44 | + let style = {}; | |
| 45 | + style.top = (Number(this.paddingTop) + 360) + 'rpx'; | |
| 46 | + return style; | |
| 41 | 47 | }, |
| 48 | + | |
| 42 | 49 | }, |
| 43 | 50 | methods: { |
| 44 | - | |
| 51 | + | |
| 45 | 52 | |
| 46 | 53 | } |
| 47 | 54 | }; |
| ... | ... | @@ -49,7 +56,7 @@ |
| 49 | 56 | |
| 50 | 57 | <style scoped lang="scss"> |
| 51 | 58 | .c-no-data { |
| 52 | - width: 100%; | |
| 59 | + width: 100%; | |
| 53 | 60 | position: relative; |
| 54 | 61 | |
| 55 | 62 | .image { |
| ... | ... | @@ -58,9 +65,10 @@ |
| 58 | 65 | } |
| 59 | 66 | |
| 60 | 67 | .title { |
| 61 | - position: absolute; | |
| 62 | - top: 560rpx; | |
| 63 | - left: 326rpx; | |
| 68 | + width: 100%; | |
| 69 | + position: absolute; | |
| 70 | + top: 560rpx; | |
| 71 | + left: 0rpx; | |
| 64 | 72 | text-align: center; |
| 65 | 73 | font-size: 24rpx; |
| 66 | 74 | line-height: 52rpx; | ... | ... |
| ... | ... | @@ -11,7 +11,11 @@ export const getOssInitApi = (params) => http.get('/basic/v1/oss/policy', { |
| 11 | 11 | }) |
| 12 | 12 | |
| 13 | 13 | // 获取token |
| 14 | -export const postTokenApi = (params, config = {}) => http.post('/auth/v1/login', params, config) | |
| 14 | +export const postTokenApi = (params, config = {}) => http.post('/auth/v1/login', params, config).then(res => { | |
| 15 | + console.log(res) | |
| 16 | + | |
| 17 | + return res; | |
| 18 | +}) | |
| 15 | 19 | |
| 16 | 20 | // 获取用户信息 |
| 17 | 21 | export const getUserInfoApi = (params) => http.get('/user/v1/detail', { |
| ... | ... | @@ -30,7 +34,15 @@ export const updateUserInfoApi = (params) => http.put('/user/v1/update', params) |
| 30 | 34 | export const delAccountApi = (params) => http.delete('/user/v1/annuluser', params); |
| 31 | 35 | |
| 32 | 36 | //撤销注销账户 |
| 33 | -export const cancelDelAccountApi = (params) => http.put('/user/v1/annulusercancel', params); | |
| 37 | +export const cancelDelAccountApi = (params) => http.put('/user/v1/annulusercancel', params); | |
| 38 | + | |
| 39 | +// 更新老师头像 | |
| 40 | +export const updateAvatarUrlApi = (params) => http.put('/user/v1/teacher/update_avatar_url', params); | |
| 41 | + | |
| 42 | +// 学校列表 | |
| 43 | +export const getSchoolListApi = (params) => http.get('/user/v1/schoolList', { | |
| 44 | + params: params | |
| 45 | +}) | |
| 34 | 46 | |
| 35 | 47 | // 切换老师身份 |
| 36 | 48 | export const putTeacherRolesApi = (id, params) => http.put(`/user/v1/teacher/${id}/change_role`, params); |
| ... | ... | @@ -41,7 +53,7 @@ export const getTodoListStatisticsApi = (params) => http.get('/internship/v1/ind |
| 41 | 53 | }) |
| 42 | 54 | |
| 43 | 55 | // 实习项目列表 |
| 44 | -export const getProjectListApi = (params) => http.get('/internship/v1/project/list', { | |
| 56 | +export const getProjectListApi = (params) => http.get('/internship/v1/project/simpleList', { | |
| 45 | 57 | params: params |
| 46 | 58 | }) |
| 47 | 59 | |
| ... | ... | @@ -71,7 +83,10 @@ export const getLogReviewListApi = (params) => http.get('/internship/v1/form_log |
| 71 | 83 | // 实习日志详情 |
| 72 | 84 | export const getLogDetailApi = (id, params) => http.get(`/internship/v1/form_log/detail/${id}`, { |
| 73 | 85 | params: params |
| 74 | -}) | |
| 86 | +}) | |
| 87 | + | |
| 88 | +// 日志批阅 | |
| 89 | +export const putLogReviewApi = (params) => http.put(`/internship/v1/form_log/approve`, params); | |
| 75 | 90 | |
| 76 | 91 | // 日志回复列表 |
| 77 | 92 | export const getLogReplyListApi = (params) => http.get('/internship/v1/form_log_review/list', { | ... | ... |
| ... | ... | @@ -80,7 +80,7 @@ module.exports = (vm) => { |
| 80 | 80 | |
| 81 | 81 | // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 |
| 82 | 82 | if (custom.toast !== false) { |
| 83 | - uni.$u.toast(data.message) | |
| 83 | + uni.$u.toast(data.msg) | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | // 如果需要catch返回,则进行reject |
| ... | ... | @@ -97,16 +97,20 @@ module.exports = (vm) => { |
| 97 | 97 | // 对响应错误做点什么 (statusCode !== 200) |
| 98 | 98 | console.log(response) |
| 99 | 99 | |
| 100 | - // if (response.statusCode == 401) { | |
| 101 | - // // 假设401为token失效,这里跳转登录 | |
| 102 | - // vm.$u.toast('未登录,请重新登录!'); | |
| 103 | - // setTimeout(() => { | |
| 104 | - // // 此为uView的方法,详见路由相关文档 | |
| 105 | - // vm.$u.route('/pages/main/my/login/login') | |
| 106 | - // }, 1500) | |
| 107 | - // return false; | |
| 100 | + if (response.statusCode == 401) { | |
| 101 | + // 假设401为token失效,这里跳转登录 | |
| 102 | + vm.$u.toast('登录失效,请重新登录!'); | |
| 103 | + setTimeout(() => { | |
| 104 | + // 此为uView的方法,详见路由相关文档 | |
| 105 | + // vm.$u.route('/pages/main/my/login/login'); | |
| 106 | + | |
| 107 | + vm.$u.vuex('hasLogin', false); | |
| 108 | + vm.$u.vuex('vuex_token', ''); | |
| 109 | + | |
| 110 | + }, 1500) | |
| 111 | + return false; | |
| 108 | 112 | |
| 109 | - // } | |
| 113 | + } | |
| 110 | 114 | |
| 111 | 115 | return Promise.reject(response) |
| 112 | 116 | }) | ... | ... |
| ... | ... | @@ -7,16 +7,15 @@ |
| 7 | 7 | "current": 0, //当前激活的模式(list 的索引项) |
| 8 | 8 | "list": [{ |
| 9 | 9 | "name": "defult", //模式名称 |
| 10 | - "path": "pages/main/internship/traineeDetail/traineeDetail", | |
| 11 | - "query": "studentId=1519965286978138113" | |
| 10 | + "path": "pages/main/internship/signInList/signInList", | |
| 11 | + "query": "studentId=1555434161240838146" | |
| 12 | 12 | }] |
| 13 | 13 | }, |
| 14 | 14 | "pages": [{ |
| 15 | 15 | "path": "pages/tabBar/home/home", |
| 16 | - "style": { | |
| 17 | - "navigationBarTitleText": "校职通", | |
| 18 | - "navigationBarTextStyle": "black", | |
| 19 | - "enablePullDownRefresh": false | |
| 16 | + "style": { | |
| 17 | + "navigationStyle": "custom", | |
| 18 | + "navigationBarTitleText": "" | |
| 20 | 19 | } |
| 21 | 20 | }, |
| 22 | 21 | { |
| ... | ... | @@ -174,6 +173,15 @@ |
| 174 | 173 | } |
| 175 | 174 | |
| 176 | 175 | } |
| 176 | + ,{ | |
| 177 | + "path" : "studentLogReview/studentLogReview", | |
| 178 | + "style" : | |
| 179 | + { | |
| 180 | + "navigationBarTitleText": "", | |
| 181 | + "enablePullDownRefresh": false | |
| 182 | + } | |
| 183 | + | |
| 184 | + } | |
| 177 | 185 | ] |
| 178 | 186 | }, |
| 179 | 187 | { |
| ... | ... | @@ -303,7 +311,7 @@ |
| 303 | 311 | |
| 304 | 312 | "tabBar": { |
| 305 | 313 | "color": "#000000", |
| 306 | - "selectedColor": "#F64114", | |
| 314 | + "selectedColor": "#06B079", | |
| 307 | 315 | "backgroundColor": "#FFFFFF", |
| 308 | 316 | "borderStyle": "black", |
| 309 | 317 | "height": "100rpx", |
| ... | ... | @@ -316,8 +324,8 @@ |
| 316 | 324 | }, |
| 317 | 325 | { |
| 318 | 326 | "pagePath": "pages/tabBar/internship/internship", |
| 319 | - "iconPath": "/static/img/icon/position.png", | |
| 320 | - "selectedIconPath": "/static/img/icon/positionHL.png", | |
| 327 | + "iconPath": "/static/img/icon/internship.png", | |
| 328 | + "selectedIconPath": "/static/img/icon/internshipHL.png", | |
| 321 | 329 | "text": "实习" |
| 322 | 330 | }, |
| 323 | 331 | { | ... | ... |
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | </u-search> |
| 18 | 18 | </view> |
| 19 | 19 | |
| 20 | - <u-icon slot="icon" size="32" :name="'/static/img/home/筛选icon@2x.png'" @click="show = true"></u-icon> | |
| 20 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | |
| 21 | 21 | </view> |
| 22 | 22 | </view> |
| 23 | 23 | |
| ... | ... | @@ -25,12 +25,12 @@ |
| 25 | 25 | <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> |
| 26 | 26 | |
| 27 | 27 | <view class="bg_image" v-if="item.appraisalStatus == 'no_appraisal'"> |
| 28 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 28 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 29 | 29 | <text>待鉴定</text> |
| 30 | 30 | </view> |
| 31 | 31 | |
| 32 | 32 | <view class="bg_image" v-else> |
| 33 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 33 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 34 | 34 | <text>已鉴定</text> |
| 35 | 35 | </view> |
| 36 | 36 | |
| ... | ... | @@ -77,13 +77,13 @@ |
| 77 | 77 | <c-no-data></c-no-data> |
| 78 | 78 | </view> |
| 79 | 79 | |
| 80 | - <u-popup :show="show" mode="right" @close="close" @open="open"> | |
| 80 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 81 | 81 | <view class="popup_search"> |
| 82 | 82 | <view class="content"> |
| 83 | 83 | <view class="title">按项目筛选</view> |
| 84 | 84 | <scroll-view class="scroll" scroll-y="true"> |
| 85 | 85 | <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> |
| 86 | - <view :style="{backgroundColor: '#06B079',color: '#FFFFFF'}" v-if="item.id == projectId"> | |
| 86 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 87 | 87 | <text>{{item.name}}</text> |
| 88 | 88 | </view> |
| 89 | 89 | <view v-else> |
| ... | ... | @@ -163,20 +163,26 @@ |
| 163 | 163 | } |
| 164 | 164 | }, |
| 165 | 165 | |
| 166 | - onLoad() {}, | |
| 167 | - | |
| 168 | - onShow() { | |
| 169 | - | |
| 166 | + onLoad(option) { | |
| 170 | 167 | this.$store.dispatch(`home/getProjectList`, { |
| 171 | 168 | pageSize: -1, |
| 172 | 169 | }) |
| 173 | 170 | |
| 174 | 171 | this.search.keySearch = ''; |
| 175 | 172 | |
| 173 | + if (option && option.appraisalStatus) { | |
| 174 | + this.search.appraisalStatus = 'no_appraisal'; | |
| 175 | + this.checkboxValue = ['待鉴定']; | |
| 176 | + this.switchValue = true; | |
| 177 | + } | |
| 178 | + | |
| 176 | 179 | this.finished = false; |
| 177 | 180 | this.loading = "loadmore"; |
| 178 | 181 | this.page = 0; |
| 179 | 182 | this.list = []; |
| 183 | + }, | |
| 184 | + | |
| 185 | + onShow() { | |
| 180 | 186 | this._getList(); |
| 181 | 187 | }, |
| 182 | 188 | |
| ... | ... | @@ -304,6 +310,14 @@ |
| 304 | 310 | } |
| 305 | 311 | |
| 306 | 312 | this.list = this.list.concat(result.records) |
| 313 | + | |
| 314 | + // 判断是否全部加载完成 | |
| 315 | + if (this.total == this.list.length) { | |
| 316 | + this.finished = true; | |
| 317 | + this.loading = 'nomore'; | |
| 318 | + } else { | |
| 319 | + this.loading = 'loadmore'; | |
| 320 | + } | |
| 307 | 321 | }, |
| 308 | 322 | |
| 309 | 323 | handelClick(values) { |
| ... | ... | @@ -503,26 +517,27 @@ |
| 503 | 517 | max-height: 60vh; |
| 504 | 518 | |
| 505 | 519 | .item { |
| 506 | - width: 540rpx; | |
| 507 | - height: 96rpx; | |
| 508 | - border-radius: 4rpx; | |
| 509 | - border: 2rpx solid #C1C1C9; | |
| 510 | - margin: 0 10rpx 20rpx; | |
| 511 | - font-size: 24rpx; | |
| 512 | - line-height: 32rpx; | |
| 513 | - color: #C0C0C9; | |
| 514 | - display: flex; | |
| 515 | - flex-flow: row wrap; | |
| 516 | - align-items: center; | |
| 517 | 520 | |
| 518 | - text { | |
| 519 | - display: inline-block; | |
| 521 | + view { | |
| 522 | + display: flex; | |
| 523 | + flex-flow: row wrap; | |
| 524 | + align-items: center; | |
| 520 | 525 | width: 500rpx; |
| 521 | - height: 64rpx; | |
| 526 | + height: 74rpx; | |
| 527 | + border-radius: 4rpx; | |
| 528 | + border: 2rpx solid #C1C1C9; | |
| 529 | + margin: 0 10rpx 20rpx; | |
| 530 | + font-size: 24rpx; | |
| 531 | + line-height: 32rpx; | |
| 532 | + color: #C0C0C9; | |
| 522 | 533 | padding: 16rpx 20rpx; |
| 523 | 534 | } |
| 524 | 535 | |
| 525 | - | |
| 536 | + .selectItem { | |
| 537 | + background-color: #06B079; | |
| 538 | + color: #FFFFFF; | |
| 539 | + border: 2rpx solid #06B079; | |
| 540 | + } | |
| 526 | 541 | } |
| 527 | 542 | } |
| 528 | 543 | ... | ... |
| ... | ... | @@ -20,8 +20,8 @@ |
| 20 | 20 | <view class="title">考勤</view> |
| 21 | 21 | <view class="item_icon"> |
| 22 | 22 | <text>考勤天数</text> |
| 23 | - <view @click="handelRecord('daily')"> | |
| 24 | - <text>38天</text> | |
| 23 | + <view @click="handelRecord('signin')"> | |
| 24 | + <text>{{detail.attendanceCount || 0}}天</text> | |
| 25 | 25 | <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> |
| 26 | 26 | </view> |
| 27 | 27 | </view> |
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | <u-overlay :show="showModal"> |
| 77 | 77 | <view class="modal" v-show="showModal"> |
| 78 | 78 | <view class="title">成绩鉴定</view> |
| 79 | - <u-form labelPosition="top" :model="form" :rules="rules" :error-type="errorType" ref="uForm"> | |
| 79 | + <u-form labelPosition="top" :model="form" :rules="rules" :errorType="errorType" ref="uForm"> | |
| 80 | 80 | |
| 81 | 81 | <u-form-item label="成绩" labelWidth="100rpx" borderBottom prop="score" |
| 82 | 82 | v-if="detail.markWay == 'centesimal'"> |
| ... | ... | @@ -145,7 +145,7 @@ |
| 145 | 145 | id: '', |
| 146 | 146 | detail: {}, |
| 147 | 147 | showModal: false, |
| 148 | - errorType: ['toast'], | |
| 148 | + errorType: 'toast', | |
| 149 | 149 | radiolist: [{ |
| 150 | 150 | name: '优秀', |
| 151 | 151 | disabled: false |
| ... | ... | @@ -201,7 +201,7 @@ |
| 201 | 201 | getAchievementDetailApi(option.id).then(data => { |
| 202 | 202 | if (data) { |
| 203 | 203 | this.detail = data; |
| 204 | - this.form.credit = String(data.credit); | |
| 204 | + this.form.credit = String(data.courseFaceDTO.credit); | |
| 205 | 205 | } |
| 206 | 206 | }) |
| 207 | 207 | }, |
| ... | ... | @@ -230,34 +230,41 @@ |
| 230 | 230 | |
| 231 | 231 | handelRecord(type) { |
| 232 | 232 | |
| 233 | - switch (type) { | |
| 234 | - case 'aggrent': | |
| 235 | - this.$u.route({ | |
| 236 | - url: `pages/main/home/approvalRecord/approvalRecord?formId=${this.detail.id}` | |
| 233 | + switch (type) { | |
| 234 | + | |
| 235 | + case 'signin': | |
| 236 | + this.$u.route({ | |
| 237 | + url: `pages/main/internship/signInList/signInList?studentId=${this.detail.studentId}&projectId=${this.detail.projectId}` | |
| 238 | + }) | |
| 239 | + break; | |
| 240 | + | |
| 241 | + case 'aggrent': | |
| 242 | + this.$u.route({ | |
| 243 | + url: `pages/main/internship/agreementDetail/agreementDetail?&id=${this.detail.treatyId ? this.detail.treatyId : ''}` | |
| 237 | 244 | }) |
| 238 | 245 | break; |
| 239 | 246 | |
| 240 | 247 | case 'daily': |
| 241 | 248 | this.$u.route({ |
| 242 | - url: `pages/main/home/logReview/logReview?cagegory=daily` | |
| 249 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=daily&formId=${this.detail.id}` | |
| 243 | 250 | }) |
| 244 | 251 | break; |
| 245 | 252 | |
| 246 | 253 | case 'weekly': |
| 247 | 254 | this.$u.route({ |
| 248 | - url: `pages/main/home/logReview/logReview?cagegory=weekly` | |
| 255 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=weekly&formId=${this.detail.id}` | |
| 249 | 256 | }) |
| 250 | 257 | break; |
| 251 | 258 | |
| 252 | 259 | case 'monthly': |
| 253 | 260 | this.$u.route({ |
| 254 | - url: `pages/main/home/logReview/logReview?cagegory=monthly` | |
| 261 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=monthly&formId=${this.detail.id}` | |
| 255 | 262 | }) |
| 256 | 263 | break; |
| 257 | 264 | |
| 258 | 265 | case 'report': |
| 259 | 266 | this.$u.route({ |
| 260 | - url: `pages/main/home/logDetail/logDetail?id=${this.detail.reportId}` | |
| 267 | + url: `pages/main/home/reportDetail/reportDetail?id=${this.detail.reportId ? this.detail.reportId : ''}` | |
| 261 | 268 | }) |
| 262 | 269 | break; |
| 263 | 270 | } |
| ... | ... | @@ -275,7 +282,7 @@ |
| 275 | 282 | |
| 276 | 283 | console.log(this.form) |
| 277 | 284 | |
| 278 | - if (String(credit) && credit > this.detail.credit) { | |
| 285 | + if (String(credit) && credit > this.detail.courseFaceDTO.credit) { | |
| 279 | 286 | this.$u.toast('学分不正确'); |
| 280 | 287 | return; |
| 281 | 288 | } |
| ... | ... | @@ -290,18 +297,17 @@ |
| 290 | 297 | }] |
| 291 | 298 | }).then(data => { |
| 292 | 299 | if (data) { |
| 293 | - this.showModal = false; | |
| 294 | - | |
| 295 | - this.$u.route({ | |
| 296 | - url: `pages/main/home/achievementAppraisal/achievementAppraisal` | |
| 297 | - }) | |
| 300 | + this.showModal = false; | |
| 301 | + | |
| 302 | + uni.navigateBack({ | |
| 303 | + delta: 1 | |
| 304 | + }); | |
| 298 | 305 | } |
| 299 | 306 | }) |
| 300 | 307 | |
| 301 | 308 | |
| 302 | 309 | }).catch(errors => { |
| 303 | 310 | console.log(errors) |
| 304 | - uni.$u.toast('校验失败') | |
| 305 | 311 | }) |
| 306 | 312 | |
| 307 | 313 | }, | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="report_detail"> |
| 3 | 3 | <view class="list_box" v-if="list.length > 0"> |
| 4 | - <view class="item" v-for="(item, i) in list" :key="i"> | |
| 5 | - | |
| 6 | - <view class="bg_image" v-if="item.status == 'adopt'"> | |
| 7 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 8 | - <text>已批阅</text> | |
| 9 | - </view> | |
| 10 | - | |
| 11 | - <view class="bg_image" v-else> | |
| 12 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 13 | - <text>待批阅</text> | |
| 4 | + <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> | |
| 5 | + | |
| 6 | + <view class="bg_image" v-if="item.status == 'stay_examine'"> | |
| 7 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 8 | + <text>待审核</text> | |
| 9 | + </view> | |
| 10 | + | |
| 11 | + <view class="bg_image" v-else-if="item.status == 'adopt'"> | |
| 12 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 13 | + <text>已通过</text> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + <view class="bg_image" v-else> | |
| 17 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 18 | + <text>已退回</text> | |
| 14 | 19 | </view> |
| 15 | 20 | |
| 16 | 21 | <view class="info"> |
| 17 | - <u-image src="/static/img/home/报告@2x.png" width="94rpx" height="94rpx" /> | |
| 22 | + <u-image src="/static/img/home/approvalRecordBg.png" width="94rpx" height="94rpx" /> | |
| 18 | 23 | <view class="title_name"> |
| 19 | 24 | <view class="title"> |
| 20 | 25 | {{item.title}} |
| ... | ... | @@ -76,8 +81,13 @@ |
| 76 | 81 | |
| 77 | 82 | timeFormat(timestamp, format = 'yyyy-mm-dd') { |
| 78 | 83 | return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' |
| 84 | + }, | |
| 85 | + | |
| 86 | + handelDetail(record) { | |
| 87 | + this.$u.route({ | |
| 88 | + url: `pages/main/home/reportDetail/reportDetail?id=${record.id}&formId=${record.formId}` | |
| 89 | + }) | |
| 79 | 90 | }, |
| 80 | - | |
| 81 | 91 | } |
| 82 | 92 | } |
| 83 | 93 | </script> | ... | ... |
| 1 | 1 | <template> |
| 2 | - <view class=".log_detail"> | |
| 3 | - | |
| 4 | - <view class="header_box"> | |
| 5 | - <view class="header"> | |
| 6 | - <view class="avatar">{{getNameLastTwo(detail.studentName)}}</view> | |
| 7 | - <view class="form_name"> | |
| 8 | - <view class="name">{{overflowHide(detail.studentName, 4)}}</view> | |
| 9 | - <view class="week"> | |
| 10 | - <text>{{timeFormat(detail.logTime, 'yyyy年')}}</text> | |
| 11 | - <text>{{getWeek(detail.logTime)}}</text> | |
| 2 | + <view class="log_detail"> | |
| 3 | + | |
| 4 | + <scroll-view scroll-y="true" style="height: 100vh;" :scroll-with-animation="true"> | |
| 5 | + <view class="header_box"> | |
| 6 | + <view class="header"> | |
| 7 | + <view class="avatar">{{getNameLastTwo(detail.studentName)}}</view> | |
| 8 | + <view class="form_name"> | |
| 9 | + <view class="name">{{overflowHide(detail.studentName, 4)}}</view> | |
| 10 | + <view class="week"> | |
| 11 | + <!-- <text>{{timeFormat(detail.logTime, 'yyyy年')}}</text> --> | |
| 12 | + <!-- <text>{{getWeek(detail.logTime)}}</text> --> | |
| 13 | + <text>{{getCreatedTime(detail)}}</text> | |
| 14 | + </view> | |
| 15 | + </view> | |
| 16 | + <view class="status" :style="{color:'#909097', backgroundColor:'#EAEAEC'}" | |
| 17 | + v-if="detail.status == 'read'"> | |
| 18 | + <text>已阅</text> | |
| 19 | + </view> | |
| 20 | + | |
| 21 | + <view class="status" v-else @click="putLog"> | |
| 22 | + <text>未阅</text> | |
| 12 | 23 | </view> |
| 13 | 24 | </view> |
| 14 | - <view class="status" v-if="detail.status == 'read'"> | |
| 15 | - <text>已阅</text> | |
| 25 | + </view> | |
| 26 | + | |
| 27 | + <view class="content"> | |
| 28 | + <view class="name_time"> | |
| 29 | + <view class="title">{{detail.title}}</view> | |
| 30 | + <view class="time">创建时间:{{timeFormat(detail.createdTime)}}</view> | |
| 16 | 31 | </view> |
| 17 | 32 | |
| 18 | - <view class="status" v-else> | |
| 19 | - <text>未阅</text> | |
| 33 | + <view class="u-parse"> | |
| 34 | + <u-parse :content="detail.content"></u-parse> | |
| 20 | 35 | </view> |
| 21 | - </view> | |
| 22 | - </view> | |
| 23 | 36 | |
| 24 | - <view class="content"> | |
| 25 | - <view class="name_time"> | |
| 26 | - <view class="title">{{detail.title}}</view> | |
| 27 | - <view class="time">创建时间:{{timeFormat(detail.createdTime)}}</view> | |
| 37 | + <view v-if="commentList.length>0" class="reply"> | |
| 38 | + <view class="title">评论</view> | |
| 39 | + <view v-for="(item,index) in commentList" :key="index"> | |
| 40 | + <view v-if="index!=0" class="divide_line_padding"></view> | |
| 41 | + <view class="list"> | |
| 42 | + <view style="margin-top: 8rpx;" class="userInfo"> | |
| 43 | + <text> {{item.name?item.name:"佚名"}}</text> | |
| 44 | + <text>({{userType[item.userType]}})</text> | |
| 45 | + </view> | |
| 46 | + <view class="replyTime" style="margin-top: 8rpx;">{{timeFormat(item.createdTime)}}</view> | |
| 47 | + <view class="describe" style="margin-top: 8rpx;">{{item.content}}</view> | |
| 48 | + <view v-if="false" class="" v-for="(item1,index) in item.replies"> | |
| 49 | + <view class="reply_bg"> | |
| 50 | + {{item1}} | |
| 51 | + </view> | |
| 52 | + </view> | |
| 53 | + </view> | |
| 54 | + </view> | |
| 55 | + </view> | |
| 28 | 56 | </view> |
| 57 | + </scroll-view> | |
| 29 | 58 | |
| 30 | - <view class="u-parse"> | |
| 31 | - <u-parse :content="detail.content"></u-parse> | |
| 32 | - </view> | |
| 33 | - | |
| 34 | - <view v-if="commentList.length>0" class="reply"> | |
| 35 | - <view class="title">评论</view> | |
| 36 | - <view v-for="(item,index) in commentList" :key="index"> | |
| 37 | - <view v-if="index!=0" class="divide_line_padding"></view> | |
| 38 | - <view class="list"> | |
| 39 | - <view style="margin-top: 8rpx;" class="userInfo"> | |
| 40 | - <text> {{item.name?item.name:"佚名"}}</text> | |
| 41 | - <text>({{userType[item.userType]}})</text> | |
| 42 | - </view> | |
| 43 | - <view class="replyTime" style="margin-top: 8rpx;">{{timeFormat(item.createdTime)}}</view> | |
| 44 | - <view class="describe" style="margin-top: 8rpx;">{{item.content}}</view> | |
| 45 | - <view v-if="false" class="" v-for="(item1,index) in item.replies"> | |
| 46 | - <view class="reply_bg"> | |
| 47 | - {{item1}} | |
| 48 | - </view> | |
| 49 | - </view> | |
| 50 | - </view> | |
| 51 | - </view> | |
| 52 | - </view> | |
| 53 | 59 | |
| 60 | + | |
| 61 | + <view class="nextPage"> | |
| 62 | + <u-icon name="arrow-down" size="36"></u-icon> | |
| 54 | 63 | </view> |
| 55 | 64 | |
| 56 | - | |
| 57 | 65 | <view class="footer"> |
| 58 | 66 | <view class="divide_line"></view> |
| 59 | 67 | <input class="uni-input" placeholder="这么精彩,不说点什么吗?" :value="reply" confirm-type="send" @confirm="goReply" /> |
| ... | ... | @@ -70,7 +78,8 @@ |
| 70 | 78 | |
| 71 | 79 | import { |
| 72 | 80 | getLogDetailApi, |
| 73 | - getLogReplyListApi, | |
| 81 | + putLogReviewApi, | |
| 82 | + getLogReplyListApi, | |
| 74 | 83 | postLogReplyApi, |
| 75 | 84 | } from '@/config/api.js'; |
| 76 | 85 | export default { |
| ... | ... | @@ -96,22 +105,33 @@ |
| 96 | 105 | } |
| 97 | 106 | }, |
| 98 | 107 | |
| 99 | - onLoad(option) { | |
| 100 | - | |
| 108 | + onLoad(option) { | |
| 109 | + | |
| 101 | 110 | this.id = option.id; |
| 102 | 111 | getLogDetailApi(option.id).then(data => { |
| 103 | 112 | if (data) { |
| 104 | 113 | this.detail = data |
| 105 | 114 | } |
| 106 | - }) | |
| 107 | - | |
| 115 | + }) | |
| 116 | + | |
| 108 | 117 | this.getCommentList() |
| 109 | 118 | |
| 110 | 119 | }, |
| 111 | 120 | |
| 112 | 121 | methods: { |
| 122 | + getCreatedTime(e) { | |
| 123 | + console.log(e) | |
| 124 | + let time = this.$u.timeFormat(e.logTime / 1000, 'yyyy/mm/dd'); | |
| 125 | + if (e.category == "weekly") { | |
| 126 | + time = new Date(e.logTime).getFullYear() + "年第" + (this.getWeek(e.logTime) + 1) + "周"; | |
| 127 | + } else if (e.category == "monthly") { | |
| 128 | + time = this.$u.timeFormat(e.logTime / 1000, 'yyyy年mm月'); | |
| 129 | + } | |
| 130 | + return time | |
| 131 | + }, | |
| 132 | + | |
| 113 | 133 | getWeek(dt) { |
| 114 | - if (dt && dt > 0) { | |
| 134 | + if (dt > 0) { | |
| 115 | 135 | let d1 = new Date(dt); |
| 116 | 136 | let d2 = new Date(dt); |
| 117 | 137 | d2.setMonth(0); |
| ... | ... | @@ -119,7 +139,7 @@ |
| 119 | 139 | let rq = d1 - d2; |
| 120 | 140 | let days = Math.ceil(rq / (24 * 60 * 60 * 1000)); |
| 121 | 141 | let num = Math.ceil(days / 7); |
| 122 | - return `第${num}周`; | |
| 142 | + return num; | |
| 123 | 143 | } else { |
| 124 | 144 | return ''; |
| 125 | 145 | } |
| ... | ... | @@ -146,19 +166,28 @@ |
| 146 | 166 | return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' |
| 147 | 167 | }, |
| 148 | 168 | |
| 149 | - getCommentList() { | |
| 150 | - getLogReplyListApi({ | |
| 151 | - formLogId: this.id | |
| 152 | - }).then(data => { | |
| 153 | - console.log(data) | |
| 154 | - if (data) { | |
| 155 | - this.commentList = data.records; | |
| 156 | - } | |
| 169 | + putLog() { | |
| 170 | + putLogReviewApi({ | |
| 171 | + ids: [this.id] | |
| 172 | + }).then(data => { | |
| 173 | + if (data) { | |
| 174 | + getLogDetailApi(this.id).then(result => { | |
| 175 | + if (result) { | |
| 176 | + this.detail = result | |
| 177 | + } | |
| 178 | + }) | |
| 179 | + } | |
| 157 | 180 | }) |
| 158 | 181 | }, |
| 159 | 182 | |
| 160 | - getCreatedTime(e) { | |
| 161 | - return this.$u.timeFormat(e / 1000, 'yyyy/mm/dd'); | |
| 183 | + getCommentList() { | |
| 184 | + getLogReplyListApi({ | |
| 185 | + formLogId: this.id | |
| 186 | + }).then(data => { | |
| 187 | + if (data) { | |
| 188 | + this.commentList = data.records; | |
| 189 | + } | |
| 190 | + }) | |
| 162 | 191 | }, |
| 163 | 192 | |
| 164 | 193 | goReply(e) { //回复评论 |
| ... | ... | @@ -183,6 +212,15 @@ |
| 183 | 212 | height: auto; |
| 184 | 213 | background-color: #F7F7F7; |
| 185 | 214 | |
| 215 | + .nextPage { | |
| 216 | + position: fixed; | |
| 217 | + bottom: 20vh; | |
| 218 | + right: 30rpx; | |
| 219 | + background-color: #FFFFFF; | |
| 220 | + padding: 12rpx; | |
| 221 | + border-radius: 8rpx; | |
| 222 | + } | |
| 223 | + | |
| 186 | 224 | .header_box { |
| 187 | 225 | background-color: #FFFFFF; |
| 188 | 226 | |
| ... | ... | @@ -246,12 +284,13 @@ |
| 246 | 284 | } |
| 247 | 285 | |
| 248 | 286 | .content { |
| 249 | - | |
| 287 | + | |
| 250 | 288 | padding: 16rpx 0 150rpx; |
| 251 | 289 | |
| 252 | - .name_time { | |
| 253 | - background-color: #FFFFFF; | |
| 290 | + .name_time { | |
| 291 | + background-color: #FFFFFF; | |
| 254 | 292 | padding: 26rpx 30rpx; |
| 293 | + | |
| 255 | 294 | .title { |
| 256 | 295 | font-size: 36rpx; |
| 257 | 296 | line-height: 50rpx; |
| ... | ... | @@ -267,50 +306,50 @@ |
| 267 | 306 | } |
| 268 | 307 | } |
| 269 | 308 | |
| 270 | - .u-parse { | |
| 271 | - background-color: #FFFFFF; | |
| 309 | + .u-parse { | |
| 310 | + background-color: #FFFFFF; | |
| 272 | 311 | padding: 0 30rpx 50rpx; |
| 273 | 312 | font-size: 28rpx; |
| 274 | 313 | line-height: 36rpx; |
| 275 | 314 | color: #4A4A53; |
| 276 | - } | |
| 277 | - | |
| 278 | - .reply { | |
| 279 | - background-color: #fff; | |
| 280 | - padding: 50rpx 30rpx 150rpx; | |
| 281 | - margin: 16rpx 0 0 0; | |
| 282 | - | |
| 283 | - .title { | |
| 284 | - font-size: 34rpx; | |
| 285 | - line-height: 48rpx; | |
| 286 | - color: #202131; | |
| 287 | - } | |
| 288 | - | |
| 289 | - .list { | |
| 290 | - padding: 32rpx; | |
| 291 | - border-bottom: 2rpx solid #E2E2E8; | |
| 292 | - | |
| 293 | - .userInfo { | |
| 294 | - color: rgba(0, 0, 0, 0.4500); | |
| 295 | - font-size: 28rpx; | |
| 296 | - line-height: 40rpx; | |
| 297 | - } | |
| 298 | - | |
| 299 | - .replyTime { | |
| 300 | - color: rgba(0, 0, 0, 0.4500); | |
| 301 | - font-size: 26rpx; | |
| 302 | - line-height: 36rpx; | |
| 303 | - } | |
| 304 | - | |
| 305 | - | |
| 306 | - } | |
| 307 | - | |
| 308 | - .reply_bg { | |
| 309 | - background: rgba(0, 0, 0, 0.03); | |
| 310 | - border-radius: 8rpx; | |
| 311 | - padding: 20rpx 32rpx; | |
| 312 | - margin-top: 16rpx; | |
| 313 | - } | |
| 315 | + } | |
| 316 | + | |
| 317 | + .reply { | |
| 318 | + background-color: #fff; | |
| 319 | + padding: 50rpx 30rpx 150rpx; | |
| 320 | + margin: 16rpx 0 0 0; | |
| 321 | + | |
| 322 | + .title { | |
| 323 | + font-size: 34rpx; | |
| 324 | + line-height: 48rpx; | |
| 325 | + color: #202131; | |
| 326 | + } | |
| 327 | + | |
| 328 | + .list { | |
| 329 | + padding: 32rpx; | |
| 330 | + border-bottom: 2rpx solid #E2E2E8; | |
| 331 | + | |
| 332 | + .userInfo { | |
| 333 | + color: rgba(0, 0, 0, 0.4500); | |
| 334 | + font-size: 28rpx; | |
| 335 | + line-height: 40rpx; | |
| 336 | + } | |
| 337 | + | |
| 338 | + .replyTime { | |
| 339 | + color: rgba(0, 0, 0, 0.4500); | |
| 340 | + font-size: 26rpx; | |
| 341 | + line-height: 36rpx; | |
| 342 | + } | |
| 343 | + | |
| 344 | + | |
| 345 | + } | |
| 346 | + | |
| 347 | + .reply_bg { | |
| 348 | + background: rgba(0, 0, 0, 0.03); | |
| 349 | + border-radius: 8rpx; | |
| 350 | + padding: 20rpx 32rpx; | |
| 351 | + margin-top: 16rpx; | |
| 352 | + } | |
| 314 | 353 | } |
| 315 | 354 | } |
| 316 | 355 | ... | ... |
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | </u-search> |
| 17 | 17 | </view> |
| 18 | 18 | |
| 19 | - <u-icon slot="icon" size="32" :name="'/static/img/home/筛选icon@2x.png'" @click="show = true"></u-icon> | |
| 19 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | |
| 20 | 20 | </view> |
| 21 | 21 | |
| 22 | 22 | <u-sticky bgColor="#fff"> |
| ... | ... | @@ -29,23 +29,25 @@ |
| 29 | 29 | <view class="list_box" v-if="list.length > 0"> |
| 30 | 30 | <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> |
| 31 | 31 | |
| 32 | - <view class="bg_image" v-if="item.status == 'read'"> | |
| 33 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 34 | - <text>已阅</text> | |
| 32 | + <view class="bg_image" v-if="item.status == 'unread'"> | |
| 33 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 34 | + <text>未阅</text> | |
| 35 | 35 | </view> |
| 36 | 36 | |
| 37 | 37 | <view class="bg_image" v-else> |
| 38 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 39 | - <text>未阅</text> | |
| 38 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 39 | + <text>已阅</text> | |
| 40 | 40 | </view> |
| 41 | 41 | |
| 42 | 42 | <view class="info"> |
| 43 | 43 | <view class="avatar">{{getNameLastTwo(item.studentName)}}</view> |
| 44 | 44 | <view class="form_name"> |
| 45 | - <view class="name">{{overflowHide(item.projectName, 10)}}</view> | |
| 45 | + <view class="name">{{overflowHide(item.title, 10)}}</view> | |
| 46 | 46 | <view class="week"> |
| 47 | - <text>{{timeFormat(item.logTime, 'yyyy年')}}</text> | |
| 48 | - <text>{{getWeek(item.logTime)}}</text> | |
| 47 | + <!-- <text>{{timeFormat(item.logTime, 'yyyy年')}}</text> --> | |
| 48 | + <!-- <text>{{getWeek(item.logTime)}}</text> --> | |
| 49 | + <text>{{getCreatedTime(item)}}</text> | |
| 50 | + | |
| 49 | 51 | </view> |
| 50 | 52 | </view> |
| 51 | 53 | </view> |
| ... | ... | @@ -67,13 +69,13 @@ |
| 67 | 69 | <c-no-data></c-no-data> |
| 68 | 70 | </view> |
| 69 | 71 | |
| 70 | - <u-popup :show="show" mode="right" @close="close" @open="open"> | |
| 72 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 71 | 73 | <view class="popup_search"> |
| 72 | 74 | <view class="content"> |
| 73 | 75 | <view class="title">按项目筛选</view> |
| 74 | 76 | <scroll-view class="scroll" scroll-y="true"> |
| 75 | 77 | <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> |
| 76 | - <view :style="{backgroundColor: '#06B079',color: '#FFFFFF'}" v-if="item.id == projectId"> | |
| 78 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 77 | 79 | <text>{{item.name}}</text> |
| 78 | 80 | </view> |
| 79 | 81 | <view v-else> |
| ... | ... | @@ -119,7 +121,8 @@ |
| 119 | 121 | export default { |
| 120 | 122 | mixins: [listMixin], |
| 121 | 123 | data() { |
| 122 | - return { | |
| 124 | + return { | |
| 125 | + studentId: '', | |
| 123 | 126 | checkboxValue: [], |
| 124 | 127 | checkboxList: [{ |
| 125 | 128 | name: '未阅', |
| ... | ... | @@ -130,7 +133,7 @@ |
| 130 | 133 | //搜索对象必须为key search的对象 |
| 131 | 134 | keySearch: "", |
| 132 | 135 | status: '', |
| 133 | - cagegory: 'daily', | |
| 136 | + category: 'daily', | |
| 134 | 137 | |
| 135 | 138 | }, |
| 136 | 139 | show: false, //筛选 |
| ... | ... | @@ -154,7 +157,9 @@ |
| 154 | 157 | }, |
| 155 | 158 | |
| 156 | 159 | onLoad(option) { |
| 157 | - console.log(option) | |
| 160 | + console.log(option) | |
| 161 | + this.studentId = option.studentId; | |
| 162 | + this.projectId = option.projectId; | |
| 158 | 163 | |
| 159 | 164 | this.$store.dispatch(`home/getProjectList`, { |
| 160 | 165 | pageSize: -1, |
| ... | ... | @@ -162,26 +167,29 @@ |
| 162 | 167 | |
| 163 | 168 | this.search.keySearch = ''; |
| 164 | 169 | |
| 165 | - if (option && option.cagegory) { | |
| 166 | - this.search.cagegory = option.cagegory; | |
| 170 | + if (option && option.category) { | |
| 171 | + this.search.category = option.category; | |
| 167 | 172 | this.current = |
| 168 | - option.cagegory == 'daily' ? 0 : | |
| 169 | - option.cagegory == 'weekly' ? 1 : | |
| 170 | - option.cagegory == 'monthly' ? 2 : | |
| 173 | + option.category == 'daily' ? 0 : | |
| 174 | + option.category == 'weekly' ? 1 : | |
| 175 | + option.category == 'monthly' ? 2 : | |
| 171 | 176 | ''; |
| 177 | + } | |
| 178 | + | |
| 179 | + if (option && option.status) { | |
| 180 | + this.search.status = 'unread'; | |
| 181 | + this.checkboxValue = ['未阅']; | |
| 182 | + this.switchValue = true; | |
| 172 | 183 | } |
| 173 | 184 | |
| 174 | 185 | this.finished = false; |
| 175 | 186 | this.loading = "loadmore"; |
| 176 | 187 | this.page = 0; |
| 177 | 188 | this.list = []; |
| 178 | - this._getList(); | |
| 179 | 189 | }, |
| 180 | 190 | |
| 181 | - onShow(option) { | |
| 182 | - | |
| 183 | - console.log(option) | |
| 184 | - | |
| 191 | + onShow() { | |
| 192 | + this._getList(); | |
| 185 | 193 | }, |
| 186 | 194 | |
| 187 | 195 | computed: { |
| ... | ... | @@ -191,7 +199,17 @@ |
| 191 | 199 | }), |
| 192 | 200 | }, |
| 193 | 201 | |
| 194 | - methods: { | |
| 202 | + methods: { | |
| 203 | + | |
| 204 | + getCreatedTime(e) { | |
| 205 | + let time = this.$u.timeFormat(e.logTime / 1000, 'yyyy/mm/dd'); | |
| 206 | + if (e.category == "weekly") { | |
| 207 | + time = new Date(e.logTime).getFullYear() + "年第" + (this.getWeek(e.logTime) + 1) + "周"; | |
| 208 | + } else if (e.category == "monthly") { | |
| 209 | + time = this.$u.timeFormat(e.logTime / 1000, 'yyyy年mm月'); | |
| 210 | + } | |
| 211 | + return time | |
| 212 | + }, | |
| 195 | 213 | |
| 196 | 214 | getWeek(dt) { |
| 197 | 215 | if (dt > 0) { |
| ... | ... | @@ -202,7 +220,7 @@ |
| 202 | 220 | let rq = d1 - d2; |
| 203 | 221 | let days = Math.ceil(rq / (24 * 60 * 60 * 1000)); |
| 204 | 222 | let num = Math.ceil(days / 7); |
| 205 | - return `第${num}周`; | |
| 223 | + return num; | |
| 206 | 224 | } else { |
| 207 | 225 | return ''; |
| 208 | 226 | } |
| ... | ... | @@ -225,10 +243,10 @@ |
| 225 | 243 | }, |
| 226 | 244 | |
| 227 | 245 | handelTab(item) { |
| 228 | - let cagegory = item.index === 0 ? 'daily' : item.index === 1 ? 'weekly' : item.index === 2 ? 'monthly' : | |
| 246 | + let category = item.index === 0 ? 'daily' : item.index === 1 ? 'weekly' : item.index === 2 ? 'monthly' : | |
| 229 | 247 | ''; |
| 230 | 248 | |
| 231 | - this.search.cagegory = cagegory; | |
| 249 | + this.search.category = category; | |
| 232 | 250 | |
| 233 | 251 | this.finished = false; |
| 234 | 252 | this.loading = "loadmore"; |
| ... | ... | @@ -299,12 +317,16 @@ |
| 299 | 317 | params.status = search.status; |
| 300 | 318 | } |
| 301 | 319 | |
| 302 | - if (search.cagegory) { | |
| 303 | - params.cagegory = search.cagegory; | |
| 320 | + if (search.category) { | |
| 321 | + params.category = search.category; | |
| 304 | 322 | } |
| 305 | 323 | |
| 306 | 324 | if (this.keyword) { |
| 307 | 325 | params.keySearch = this.keyword |
| 326 | + } | |
| 327 | + | |
| 328 | + if (this.studentId) { | |
| 329 | + params.studentId = this.studentId | |
| 308 | 330 | } |
| 309 | 331 | |
| 310 | 332 | if (this.projectId) { |
| ... | ... | @@ -334,7 +356,15 @@ |
| 334 | 356 | this.shownoData = true |
| 335 | 357 | } |
| 336 | 358 | |
| 337 | - this.list = this.list.concat(result.records) | |
| 359 | + this.list = this.list.concat(result.records) | |
| 360 | + | |
| 361 | + // 判断是否全部加载完成 | |
| 362 | + if (this.total == this.list.length) { | |
| 363 | + this.finished = true; | |
| 364 | + this.loading = 'nomore'; | |
| 365 | + } else { | |
| 366 | + this.loading = 'loadmore'; | |
| 367 | + } | |
| 338 | 368 | }, |
| 339 | 369 | |
| 340 | 370 | handelClick(values) { |
| ... | ... | @@ -459,7 +489,9 @@ |
| 459 | 489 | font-size: 24rpx; |
| 460 | 490 | line-height: 32rpx; |
| 461 | 491 | color: #909097; |
| 462 | - margin: 32rpx 0 30rpx 0; | |
| 492 | + margin: 32rpx 0 30rpx 0; | |
| 493 | + max-height: 100rpx; | |
| 494 | + overflow: hidden; | |
| 463 | 495 | } |
| 464 | 496 | |
| 465 | 497 | .name_time { |
| ... | ... | @@ -506,31 +538,32 @@ |
| 506 | 538 | color: #202131; |
| 507 | 539 | } |
| 508 | 540 | |
| 509 | - .scroll { | |
| 510 | - max-height: 60vh; | |
| 511 | - | |
| 512 | - .item { | |
| 513 | - width: 540rpx; | |
| 514 | - height: 96rpx; | |
| 515 | - border-radius: 4rpx; | |
| 516 | - border: 2rpx solid #C1C1C9; | |
| 517 | - margin: 0 10rpx 20rpx; | |
| 518 | - font-size: 24rpx; | |
| 519 | - line-height: 32rpx; | |
| 520 | - color: #C0C0C9; | |
| 521 | - display: flex; | |
| 522 | - flex-flow: row wrap; | |
| 523 | - align-items: center; | |
| 524 | - | |
| 525 | - text { | |
| 526 | - display: inline-block; | |
| 527 | - width: 500rpx; | |
| 528 | - height: 64rpx; | |
| 529 | - padding: 16rpx 20rpx; | |
| 530 | - } | |
| 531 | - | |
| 532 | - | |
| 533 | - } | |
| 541 | + .scroll { | |
| 542 | + max-height: 60vh; | |
| 543 | + | |
| 544 | + .item { | |
| 545 | + | |
| 546 | + view { | |
| 547 | + display: flex; | |
| 548 | + flex-flow: row wrap; | |
| 549 | + align-items: center; | |
| 550 | + width: 500rpx; | |
| 551 | + height: 74rpx; | |
| 552 | + border-radius: 4rpx; | |
| 553 | + border: 2rpx solid #C1C1C9; | |
| 554 | + margin: 0 10rpx 20rpx; | |
| 555 | + font-size: 24rpx; | |
| 556 | + line-height: 32rpx; | |
| 557 | + color: #C0C0C9; | |
| 558 | + padding: 16rpx 20rpx; | |
| 559 | + } | |
| 560 | + | |
| 561 | + .selectItem { | |
| 562 | + background-color: #06B079; | |
| 563 | + color: #FFFFFF; | |
| 564 | + border: 2rpx solid #06B079; | |
| 565 | + } | |
| 566 | + } | |
| 534 | 567 | } |
| 535 | 568 | |
| 536 | 569 | .time { | ... | ... |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | |
| 23 | 23 | <view class="icon_item"> |
| 24 | 24 | <u-icon size="32rpx" label="实习项目" labelSize="28rpx" labelColor="#909097" |
| 25 | - name="/static/img/home/实习项目icon@2x.png"></u-icon> | |
| 25 | + name="/static/img/home/internshipProgramIcon.png"></u-icon> | |
| 26 | 26 | <text>{{registrationDetail.projectName}}</text> |
| 27 | 27 | </view> |
| 28 | 28 | |
| ... | ... | @@ -36,12 +36,12 @@ |
| 36 | 36 | <view class="title">单位信息</view> |
| 37 | 37 | <view class="icon_item"> |
| 38 | 38 | <u-icon size="32rpx" label="实习单位" labelSize="28rpx" labelColor="#909097" |
| 39 | - name="/static/img/home/实习项目icon@2x.png"></u-icon> | |
| 39 | + name="/static/img/home/internshipUnitIcon.png"></u-icon> | |
| 40 | 40 | <text>{{registrationDetail.companyName}}</text> |
| 41 | 41 | </view> |
| 42 | 42 | <view class="icon_item"> |
| 43 | 43 | <u-icon size="32rpx" label="实习岗位" labelSize="28rpx" labelColor="#909097" |
| 44 | - name="/static/img/home/实习项目icon@2x.png"></u-icon> | |
| 44 | + name="/static/img/home/internshipJobIcon.png"></u-icon> | |
| 45 | 45 | <text>{{registrationDetail.jobName}}</text> |
| 46 | 46 | </view> |
| 47 | 47 | <view class="border_top item"> |
| ... | ... | @@ -72,9 +72,13 @@ |
| 72 | 72 | <text>审核人</text> |
| 73 | 73 | <text>{{registrationDetail.auditTeacherName}}</text> |
| 74 | 74 | </view> |
| 75 | + <view class="item"> | |
| 76 | + <text>接受状态</text> | |
| 77 | + <text>{{receiveStatus}}</text> | |
| 78 | + </view> | |
| 75 | 79 | </view> |
| 76 | 80 | |
| 77 | - <view class="footer"> | |
| 81 | + <view class="footer" v-if="registrationDetail.status == 'wait'"> | |
| 78 | 82 | <view class="left_btn"> |
| 79 | 83 | <c-button type="cancel" text="审核拒绝" @click="handelCancel"> |
| 80 | 84 | </c-button> |
| ... | ... | @@ -129,11 +133,18 @@ |
| 129 | 133 | }, |
| 130 | 134 | |
| 131 | 135 | reviewStatus: function() { |
| 132 | - return this.registrationDetail == 'apply' ? '待报名' : | |
| 133 | - this.registrationDetail == 'wait' ? '待审核' : | |
| 134 | - this.registrationDetail == 'pass' ? '已审核' : | |
| 135 | - this.registrationDetail == 'reject' ? '已拒绝' : ''; | |
| 136 | - } | |
| 136 | + return this.registrationDetail.status == 'apply' ? '待报名' : | |
| 137 | + this.registrationDetail.status == 'wait' ? '待审核' : | |
| 138 | + this.registrationDetail.status == 'pass' ? '已审核' : | |
| 139 | + this.registrationDetail.status == 'reject' ? '已拒绝' : ''; | |
| 140 | + }, | |
| 141 | + | |
| 142 | + receiveStatus: function() { | |
| 143 | + return this.registrationDetail.receiveStatus == 'received' ? '已接收' : | |
| 144 | + this.registrationDetail.receiveStatus == 'wait' ? '待处理' : | |
| 145 | + this.registrationDetail.receiveStatus == 'reject' ? '已拒绝' : | |
| 146 | + ''; | |
| 147 | + }, | |
| 137 | 148 | }, |
| 138 | 149 | |
| 139 | 150 | methods: { |
| ... | ... | @@ -144,12 +155,12 @@ |
| 144 | 155 | handelCancel() { |
| 145 | 156 | putRegistrationReviewApi({ |
| 146 | 157 | formIds: [this.registrationDetail.id], |
| 147 | - schoolAuditStatus: 'reject', | |
| 158 | + status: 'reject', | |
| 148 | 159 | }).then(data => { |
| 149 | 160 | if (data) { |
| 150 | - this.$u.route({ | |
| 151 | - url: `pages/main/home/registrationReview/registrationReview` | |
| 152 | - }) | |
| 161 | + uni.navigateBack({ | |
| 162 | + delta: 1 | |
| 163 | + }); | |
| 153 | 164 | } |
| 154 | 165 | }) |
| 155 | 166 | }, |
| ... | ... | @@ -157,12 +168,12 @@ |
| 157 | 168 | hancelSubmit() { |
| 158 | 169 | putRegistrationReviewApi({ |
| 159 | 170 | formIds: [this.registrationDetail.id], |
| 160 | - schoolAuditStatus: 'pass', | |
| 171 | + status: 'pass', | |
| 161 | 172 | }).then(data => { |
| 162 | 173 | if (data) { |
| 163 | - this.$u.route({ | |
| 164 | - url: `pages/main/home/registrationReview/registrationReview` | |
| 165 | - }) | |
| 174 | + uni.navigateBack({ | |
| 175 | + delta: 1 | |
| 176 | + }); | |
| 166 | 177 | } |
| 167 | 178 | }) |
| 168 | 179 | }, | ... | ... |
| ... | ... | @@ -12,33 +12,39 @@ |
| 12 | 12 | |
| 13 | 13 | <view class="search"> |
| 14 | 14 | <u-search placeholder="请输入学生姓名/学号/手机号" placeholderColor="#C1C1C9" searchIconSize="36" height="64rpx" |
| 15 | - bgColor="#F4F4F4" :showAction="false" shape="square" v-model="keyword" @search="handelSearch"></u-search> | |
| 15 | + bgColor="#F4F4F4" :showAction="false" shape="square" v-model="keyword" @search="handelSearch"> | |
| 16 | + </u-search> | |
| 16 | 17 | </view> |
| 17 | 18 | |
| 18 | - <u-icon slot="icon" size="32" :name="'/static/img/home/筛选icon@2x.png'" @click="show = true"></u-icon> | |
| 19 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | |
| 19 | 20 | </view> |
| 20 | 21 | |
| 21 | 22 | <view class="list_box" v-if="list.length > 0"> |
| 22 | 23 | <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> |
| 23 | 24 | |
| 24 | 25 | <view class="bg_image" v-if="item.status == 'wait'"> |
| 25 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 26 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 26 | 27 | <text>待审核</text> |
| 27 | 28 | </view> |
| 28 | 29 | |
| 29 | - <view class="bg_image" v-else> | |
| 30 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 30 | + <view class="bg_image" v-if="item.status == 'pass'"> | |
| 31 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 31 | 32 | <text>已通过</text> |
| 32 | 33 | </view> |
| 33 | 34 | |
| 34 | - <view class="name">{{item.name}}</view> | |
| 35 | + <view class="bg_image" v-if="item.status == 'reject'"> | |
| 36 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 37 | + <text>已拒绝</text> | |
| 38 | + </view> | |
| 39 | + | |
| 40 | + <view class="name">{{item.studentName}}</view> | |
| 35 | 41 | <view class="company"> |
| 36 | - <u-icon size="32rpx" name="/static/img/home/实习单位icon@2x.png"></u-icon> | |
| 42 | + <u-icon size="32rpx" name="/static/img/home/internshipUnitIcon.png"></u-icon> | |
| 37 | 43 | <text>实习单位</text> |
| 38 | 44 | <text>{{item.companyName || '--'}}</text> |
| 39 | 45 | </view> |
| 40 | 46 | <view class="company position"> |
| 41 | - <u-icon size="32rpx" name="/static/img/home/实习岗位icon@2x.png"></u-icon> | |
| 47 | + <u-icon size="32rpx" name="/static/img/home/internshipJobIcon.png"></u-icon> | |
| 42 | 48 | <text>实习岗位</text> |
| 43 | 49 | <text>{{item.jobName|| '--'}}</text> |
| 44 | 50 | </view> |
| ... | ... | @@ -55,13 +61,13 @@ |
| 55 | 61 | <c-no-data></c-no-data> |
| 56 | 62 | </view> |
| 57 | 63 | |
| 58 | - <u-popup :show="show" mode="right" @close="close" @open="open"> | |
| 64 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 59 | 65 | <view class="popup_search"> |
| 60 | 66 | <view class="content"> |
| 61 | 67 | <view class="title">按项目筛选</view> |
| 62 | 68 | <scroll-view class="scroll" scroll-y="true"> |
| 63 | 69 | <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> |
| 64 | - <view :style="{backgroundColor: '#06B079',color: '#FFFFFF'}" v-if="item.id == projectId"> | |
| 70 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 65 | 71 | <text>{{item.name}}</text> |
| 66 | 72 | </view> |
| 67 | 73 | <view v-else> |
| ... | ... | @@ -70,7 +76,7 @@ |
| 70 | 76 | </view> |
| 71 | 77 | </scroll-view> |
| 72 | 78 | <view class="switch"> |
| 73 | - <text>未审核</text> | |
| 79 | + <text>待审核</text> | |
| 74 | 80 | <u-switch v-model="switchValue" size="48" activeColor="#06B079" @change="handelChange"> |
| 75 | 81 | </u-switch> |
| 76 | 82 | </view> |
| ... | ... | @@ -130,20 +136,28 @@ |
| 130 | 136 | } |
| 131 | 137 | }, |
| 132 | 138 | |
| 133 | - onLoad() {}, | |
| 134 | - | |
| 135 | - onShow() { | |
| 136 | - | |
| 139 | + onLoad(option) { | |
| 140 | + console.log(option) | |
| 137 | 141 | this.$store.dispatch(`home/getProjectList`, { |
| 138 | 142 | pageSize: -1, |
| 139 | 143 | }) |
| 140 | 144 | |
| 141 | 145 | this.search.keySearch = ''; |
| 142 | 146 | |
| 147 | + if (option && option.status) { | |
| 148 | + this.search.status = 'wait'; | |
| 149 | + this.checkboxValue = ['待审核']; | |
| 150 | + this.switchValue = true; | |
| 151 | + } | |
| 152 | + | |
| 143 | 153 | this.finished = false; |
| 144 | 154 | this.loading = "loadmore"; |
| 145 | 155 | this.page = 0; |
| 146 | 156 | this.list = []; |
| 157 | + | |
| 158 | + }, | |
| 159 | + | |
| 160 | + onShow() { | |
| 147 | 161 | this._getList(); |
| 148 | 162 | }, |
| 149 | 163 | |
| ... | ... | @@ -171,8 +185,8 @@ |
| 171 | 185 | checkboxChange(n) { |
| 172 | 186 | console.log('change', n); |
| 173 | 187 | |
| 174 | - this.search.status = n.length > 0 ? 'wait' : 'wait,pass,reject'; | |
| 175 | - | |
| 188 | + this.search.status = n.length > 0 ? 'wait' : 'wait,pass,reject'; | |
| 189 | + | |
| 176 | 190 | this.switchValue = n.length > 0 ? true : false; |
| 177 | 191 | |
| 178 | 192 | this.finished = false; |
| ... | ... | @@ -220,10 +234,10 @@ |
| 220 | 234 | |
| 221 | 235 | if (this.keyword) { |
| 222 | 236 | params.keySearch = this.keyword |
| 223 | - } | |
| 224 | - | |
| 225 | - if (this.projectId) { | |
| 226 | - params.projectId = this.projectId | |
| 237 | + } | |
| 238 | + | |
| 239 | + if (this.projectId) { | |
| 240 | + params.projectId = this.projectId | |
| 227 | 241 | } |
| 228 | 242 | |
| 229 | 243 | return await getRegistrationReviewApi(params); |
| ... | ... | @@ -250,6 +264,14 @@ |
| 250 | 264 | } |
| 251 | 265 | |
| 252 | 266 | this.list = this.list.concat(result.records) |
| 267 | + | |
| 268 | + // 判断是否全部加载完成 | |
| 269 | + if (this.total == this.list.length) { | |
| 270 | + this.finished = true; | |
| 271 | + this.loading = 'nomore'; | |
| 272 | + } else { | |
| 273 | + this.loading = 'loadmore'; | |
| 274 | + } | |
| 253 | 275 | }, |
| 254 | 276 | |
| 255 | 277 | handelClick(values) { |
| ... | ... | @@ -258,8 +280,8 @@ |
| 258 | 280 | }, |
| 259 | 281 | |
| 260 | 282 | handelChange(e) { |
| 261 | - console.log(e) | |
| 262 | - this.checkboxValue = e ? ['待审核'] : []; | |
| 283 | + console.log(e) | |
| 284 | + this.checkboxValue = e ? ['待审核'] : []; | |
| 263 | 285 | this.search.status = e ? 'wait' : 'wait,pass,reject'; |
| 264 | 286 | |
| 265 | 287 | }, |
| ... | ... | @@ -270,12 +292,12 @@ |
| 270 | 292 | }, |
| 271 | 293 | |
| 272 | 294 | hancelSubmit() { |
| 273 | - this.finished = false; | |
| 274 | - this.loading = "loadmore"; | |
| 275 | - this.page = 0; | |
| 276 | - this.list = []; | |
| 277 | - this._getList(); | |
| 278 | - | |
| 295 | + this.finished = false; | |
| 296 | + this.loading = "loadmore"; | |
| 297 | + this.page = 0; | |
| 298 | + this.list = []; | |
| 299 | + this._getList(); | |
| 300 | + | |
| 279 | 301 | this.show = false; |
| 280 | 302 | }, |
| 281 | 303 | |
| ... | ... | @@ -394,26 +416,27 @@ |
| 394 | 416 | max-height: 60vh; |
| 395 | 417 | |
| 396 | 418 | .item { |
| 397 | - width: 540rpx; | |
| 398 | - height: 96rpx; | |
| 399 | - border-radius: 4rpx; | |
| 400 | - border: 2rpx solid #C1C1C9; | |
| 401 | - margin: 0 10rpx 20rpx; | |
| 402 | - font-size: 24rpx; | |
| 403 | - line-height: 32rpx; | |
| 404 | - color: #C0C0C9; | |
| 405 | - display: flex; | |
| 406 | - flex-flow: row wrap; | |
| 407 | - align-items: center; | |
| 408 | - | |
| 409 | - text { | |
| 410 | - display: inline-block; | |
| 411 | - width: 500rpx; | |
| 412 | - height: 64rpx; | |
| 413 | - padding: 16rpx 20rpx; | |
| 419 | + | |
| 420 | + view { | |
| 421 | + display: flex; | |
| 422 | + flex-flow: row wrap; | |
| 423 | + align-items: center; | |
| 424 | + width: 500rpx; | |
| 425 | + height: 74rpx; | |
| 426 | + border-radius: 4rpx; | |
| 427 | + border: 2rpx solid #C1C1C9; | |
| 428 | + margin: 0 10rpx 20rpx; | |
| 429 | + font-size: 24rpx; | |
| 430 | + line-height: 32rpx; | |
| 431 | + color: #C0C0C9; | |
| 432 | + padding: 16rpx 20rpx; | |
| 433 | + } | |
| 434 | + | |
| 435 | + .selectItem { | |
| 436 | + background-color: #06B079; | |
| 437 | + color: #FFFFFF; | |
| 438 | + border: 2rpx solid #06B079; | |
| 414 | 439 | } |
| 415 | - | |
| 416 | - | |
| 417 | 440 | } |
| 418 | 441 | } |
| 419 | 442 | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="report_detail"> |
| 3 | - <view class="report_info"> | |
| 4 | - | |
| 5 | - <view class="bg_image" v-if="detail.status == 'stay_examine'"> | |
| 6 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 7 | - <text>待审核</text> | |
| 8 | - </view> | |
| 9 | - | |
| 10 | - <view class="bg_image" v-else-if="detail.status == 'adopt'"> | |
| 11 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 12 | - <text>已通过</text> | |
| 13 | - </view> | |
| 14 | - | |
| 15 | - <view class="bg_image" v-else> | |
| 16 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 17 | - <text>已退回</text> | |
| 18 | - </view> | |
| 19 | - | |
| 20 | - <view class="info"> | |
| 21 | - <view class="avatar">{{getNameLastTwo(detail.studentName)}}</view> | |
| 22 | - <view class="title_name"> | |
| 23 | - <view class="title">{{detail.title}}</view> | |
| 24 | - <view class="name"> | |
| 25 | - <text>学生姓名</text> | |
| 26 | - <text>{{detail.studentName}}</text> | |
| 27 | - </view> | |
| 28 | - </view> | |
| 29 | - </view> | |
| 30 | - | |
| 31 | - <view class="time_record"> | |
| 32 | - <text> | |
| 33 | - {{timeFormat(detail.createdTime, 'yyyy-mm-dd hh:MM')}} | |
| 34 | - </text> | |
| 35 | - <view class="record" @click="handelRecord"> | |
| 36 | - <text>审批记录</text> | |
| 37 | - <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#06B079" size="28"></u-icon> | |
| 38 | - </view> | |
| 39 | - </view> | |
| 40 | - </view> | |
| 41 | - | |
| 42 | - <view class="box"> | |
| 43 | - <view class="title">附件</view> | |
| 44 | - <view class="item" v-for="(item,index) in reportAttachments"> | |
| 45 | - <text>报告附件</text> | |
| 46 | - <text :style="{color:'#06B079'}" @click="openLink(item)">{{item.filename}}</text> | |
| 47 | - </view> | |
| 48 | - </view> | |
| 49 | - | |
| 50 | - <view class="box file"> | |
| 51 | - <view class="title">反馈附件</view> | |
| 52 | - <view class="icon_item" v-for="(item,index) in attachments" @click="deletePic(index)"> | |
| 53 | - <text>{{item.filename}}</text> | |
| 54 | - <u-icon name="close" width="28rpx" color="red" size="28"></u-icon> | |
| 55 | - </view> | |
| 56 | - <view class="icon_box" @click="handelFile"> | |
| 57 | - <u-icon name="plus" width="28rpx" label="添加" labelPos="bottom" labelColor="#06B079" color="#06B079" | |
| 58 | - size="28"></u-icon> | |
| 59 | - </view> | |
| 60 | - | |
| 61 | - </view> | |
| 62 | - | |
| 63 | - <view class="box" :style="{padding:'30rpx'}"> | |
| 64 | - <view class="title">反馈信息</view> | |
| 65 | - <u-textarea v-model="textarea" placeholder="请输入内容" count></u-textarea> | |
| 66 | - </view> | |
| 67 | - | |
| 68 | - <view class="footer" v-if="detail.status == 'stay_examine'"> | |
| 69 | - <view class="left_btn"> | |
| 70 | - <c-button type="cancel" text="退回" @click="handelCancel"> | |
| 71 | - </c-button> | |
| 72 | - </view> | |
| 73 | - <view class="right_btn"> | |
| 74 | - <c-button type="confirm" text="通过" @click="hancelSubmit"> | |
| 75 | - </c-button> | |
| 76 | - </view> | |
| 3 | + <view v-if="id"> | |
| 4 | + <view class="report_info"> | |
| 5 | + | |
| 6 | + <view class="bg_image" v-if="detail.status == 'stay_examine'"> | |
| 7 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 8 | + <text>待审核</text> | |
| 9 | + </view> | |
| 10 | + | |
| 11 | + <view class="bg_image" v-else-if="detail.status == 'adopt'"> | |
| 12 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 13 | + <text>已通过</text> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + <view class="bg_image" v-else> | |
| 17 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 18 | + <text>已退回</text> | |
| 19 | + </view> | |
| 20 | + | |
| 21 | + <view class="info"> | |
| 22 | + <view class="avatar">{{getNameLastTwo(detail.studentName)}}</view> | |
| 23 | + <view class="title_name"> | |
| 24 | + <view class="title">{{detail.title}}</view> | |
| 25 | + <view class="name"> | |
| 26 | + <text>学生姓名</text> | |
| 27 | + <text>{{detail.studentName}}</text> | |
| 28 | + </view> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + | |
| 32 | + <view class="time_record"> | |
| 33 | + <text> | |
| 34 | + {{timeFormat(detail.createdTime, 'yyyy-mm-dd hh:MM')}} | |
| 35 | + </text> | |
| 36 | + <view class="record" @click="handelRecord"> | |
| 37 | + <text>审批记录</text> | |
| 38 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#06B079" size="28"></u-icon> | |
| 39 | + </view> | |
| 40 | + </view> | |
| 41 | + </view> | |
| 42 | + | |
| 43 | + <view class="box"> | |
| 44 | + <view class="title">附件</view> | |
| 45 | + <view class="item" v-for="(item,index) in reportAttachments"> | |
| 46 | + <text>报告附件</text> | |
| 47 | + <text :style="{color:'#06B079'}" @click="openLink(item)">{{item.filename}}</text> | |
| 48 | + </view> | |
| 49 | + </view> | |
| 50 | + | |
| 51 | + <view> | |
| 52 | + <view class="box file" v-if="detail.status == 'stay_examine'"> | |
| 53 | + <view class="title">反馈附件</view> | |
| 54 | + <view class="icon_item" v-for="(item,index) in attachments"> | |
| 55 | + <text @click="openLink(item)">{{item.filename}}</text> | |
| 56 | + <u-icon name="close" @click="deletePic(index)" width="28rpx" color="red" size="28"></u-icon> | |
| 57 | + </view> | |
| 58 | + <view class="icon_box" @click="handelFile"> | |
| 59 | + <u-icon name="plus" width="28rpx" label="添加" labelPos="bottom" labelColor="#06B079" color="#06B079" | |
| 60 | + size="28"></u-icon> | |
| 61 | + </view> | |
| 62 | + </view> | |
| 63 | + | |
| 64 | + <view class="box file" v-else> | |
| 65 | + <view class="title">反馈附件</view> | |
| 66 | + <view class="icon_item" v-for="(item,index) in reviewAttachments"> | |
| 67 | + <text @click="openLink(item)">{{item.filename}}</text> | |
| 68 | + </view> | |
| 69 | + </view> | |
| 70 | + </view> | |
| 71 | + | |
| 72 | + <view> | |
| 73 | + <view class="box" :style="{padding:'30rpx'}" v-if="detail.status == 'stay_examine'"> | |
| 74 | + <view class="title">反馈信息</view> | |
| 75 | + <u-textarea v-model="textarea" placeholder="请输入内容" count></u-textarea> | |
| 76 | + </view> | |
| 77 | + <view class="box" :style="{padding:'30rpx'}" v-else> | |
| 78 | + <view class="title">反馈信息</view> | |
| 79 | + <u-textarea v-model="textarea" :disabled="true" placeholder="请输入内容" count></u-textarea> | |
| 80 | + </view> | |
| 81 | + </view> | |
| 82 | + | |
| 83 | + <view class="footer" v-if="detail.status == 'stay_examine'"> | |
| 84 | + <view class="left_btn"> | |
| 85 | + <c-button type="cancel" text="退回" @click="handelCancel"> | |
| 86 | + </c-button> | |
| 87 | + </view> | |
| 88 | + <view class="right_btn"> | |
| 89 | + <c-button type="confirm" text="通过" @click="hancelSubmit"> | |
| 90 | + </c-button> | |
| 91 | + </view> | |
| 92 | + </view> | |
| 93 | + </view> | |
| 94 | + | |
| 95 | + <view v-else class="no_data"> | |
| 96 | + <c-no-data></c-no-data> | |
| 77 | 97 | </view> |
| 78 | 98 | |
| 79 | 99 | </view> |
| ... | ... | @@ -101,6 +121,7 @@ |
| 101 | 121 | formId: '', |
| 102 | 122 | detail: {}, |
| 103 | 123 | reportAttachments: [], |
| 124 | + reviewAttachments: [], | |
| 104 | 125 | ossInit: {}, |
| 105 | 126 | mFileDir: "yxly", |
| 106 | 127 | mFileType: ".doc", |
| ... | ... | @@ -115,7 +136,11 @@ |
| 115 | 136 | |
| 116 | 137 | onLoad(option) { |
| 117 | 138 | this.id = option.id; |
| 118 | - this.formId = option.formId; | |
| 139 | + this.formId = option.formId; | |
| 140 | + | |
| 141 | + if(!option.id) { | |
| 142 | + return; | |
| 143 | + } | |
| 119 | 144 | |
| 120 | 145 | getOssInitApi({ |
| 121 | 146 | "uploadFileType": "report" |
| ... | ... | @@ -127,7 +152,9 @@ |
| 127 | 152 | if (data) { |
| 128 | 153 | this.detail = data; |
| 129 | 154 | if (data.reportAttachments) { |
| 130 | - this.reportAttachments = JSON.parse(data.reportAttachments) | |
| 155 | + this.reportAttachments = data.reportAttachments ? JSON.parse(data.reportAttachments) : []; | |
| 156 | + this.reviewAttachments = data.reviewAttachments ? JSON.parse(data.reviewAttachments) : []; | |
| 157 | + this.textarea = data.review; | |
| 131 | 158 | } |
| 132 | 159 | } |
| 133 | 160 | }) |
| ... | ... | @@ -313,9 +340,9 @@ |
| 313 | 340 | review: this.textarea, |
| 314 | 341 | }).then(data => { |
| 315 | 342 | if (data) { |
| 316 | - this.$u.route({ | |
| 317 | - url: `pages/main/home/reportReview/reportReview` | |
| 318 | - }) | |
| 343 | + uni.navigateBack({ | |
| 344 | + delta: 1 | |
| 345 | + }); | |
| 319 | 346 | } |
| 320 | 347 | }) |
| 321 | 348 | }, |
| ... | ... | @@ -327,9 +354,9 @@ |
| 327 | 354 | review: this.textarea, |
| 328 | 355 | }).then(data => { |
| 329 | 356 | if (data) { |
| 330 | - this.$u.route({ | |
| 331 | - url: `pages/main/home/reportReview/reportReview` | |
| 332 | - }) | |
| 357 | + uni.navigateBack({ | |
| 358 | + delta: 1 | |
| 359 | + }); | |
| 333 | 360 | } |
| 334 | 361 | }) |
| 335 | 362 | }, |
| ... | ... | @@ -500,7 +527,7 @@ |
| 500 | 527 | .icon_item { |
| 501 | 528 | display: flex; |
| 502 | 529 | flex-flow: row wrap; |
| 503 | - margin: 0 0 24rpx 0; | |
| 530 | + margin: 0 0 12rpx 0; | |
| 504 | 531 | |
| 505 | 532 | text { |
| 506 | 533 | display: inline-block; | ... | ... |
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | </u-search> |
| 18 | 18 | </view> |
| 19 | 19 | |
| 20 | - <u-icon slot="icon" size="32" :name="'/static/img/home/筛选icon@2x.png'" @click="show = true"></u-icon> | |
| 20 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | |
| 21 | 21 | </view> |
| 22 | 22 | </view> |
| 23 | 23 | |
| ... | ... | @@ -25,17 +25,17 @@ |
| 25 | 25 | <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> |
| 26 | 26 | |
| 27 | 27 | <view class="bg_image" v-if="item.status == 'stay_examine'"> |
| 28 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 28 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 29 | 29 | <text>待审核</text> |
| 30 | 30 | </view> |
| 31 | 31 | |
| 32 | 32 | <view class="bg_image" v-else-if="item.status == 'adopt'"> |
| 33 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 33 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 34 | 34 | <text>已通过</text> |
| 35 | 35 | </view> |
| 36 | 36 | |
| 37 | 37 | <view class="bg_image" v-else> |
| 38 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 38 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 39 | 39 | <text>已退回</text> |
| 40 | 40 | </view> |
| 41 | 41 | |
| ... | ... | @@ -61,13 +61,13 @@ |
| 61 | 61 | <c-no-data></c-no-data> |
| 62 | 62 | </view> |
| 63 | 63 | |
| 64 | - <u-popup :show="show" mode="right" @close="close" @open="open"> | |
| 64 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 65 | 65 | <view class="popup_search"> |
| 66 | 66 | <view class="content"> |
| 67 | 67 | <view class="title">按项目筛选</view> |
| 68 | 68 | <scroll-view class="scroll" scroll-y="true"> |
| 69 | 69 | <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> |
| 70 | - <view :style="{backgroundColor: '#06B079',color: '#FFFFFF'}" v-if="item.id == projectId"> | |
| 70 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 71 | 71 | <text>{{item.name}}</text> |
| 72 | 72 | </view> |
| 73 | 73 | <view v-else> |
| ... | ... | @@ -157,17 +157,22 @@ |
| 157 | 157 | pageSize: -1, |
| 158 | 158 | }) |
| 159 | 159 | |
| 160 | - this.search.keySearch = ''; | |
| 160 | + this.search.keySearch = ''; | |
| 161 | + | |
| 162 | + if (option && option.status) { | |
| 163 | + this.search.status = 'stay_examine'; | |
| 164 | + this.checkboxValue = ['待批阅']; | |
| 165 | + this.switchValue = true; | |
| 166 | + } | |
| 161 | 167 | |
| 162 | 168 | this.finished = false; |
| 163 | 169 | this.loading = "loadmore"; |
| 164 | 170 | this.page = 0; |
| 165 | 171 | this.list = []; |
| 166 | - this._getList(); | |
| 167 | 172 | }, |
| 168 | 173 | |
| 169 | 174 | onShow() { |
| 170 | - | |
| 175 | + this._getList(); | |
| 171 | 176 | }, |
| 172 | 177 | |
| 173 | 178 | computed: { |
| ... | ... | @@ -296,7 +301,15 @@ |
| 296 | 301 | this.shownoData = true |
| 297 | 302 | } |
| 298 | 303 | |
| 299 | - this.list = this.list.concat(result.records) | |
| 304 | + this.list = this.list.concat(result.records) | |
| 305 | + | |
| 306 | + // 判断是否全部加载完成 | |
| 307 | + if (this.total == this.list.length) { | |
| 308 | + this.finished = true; | |
| 309 | + this.loading = 'nomore'; | |
| 310 | + } else { | |
| 311 | + this.loading = 'loadmore'; | |
| 312 | + } | |
| 300 | 313 | }, |
| 301 | 314 | |
| 302 | 315 | handelClick(values) { |
| ... | ... | @@ -345,7 +358,7 @@ |
| 345 | 358 | display: flex; |
| 346 | 359 | flex-flow: row nowrap; |
| 347 | 360 | justify-content: space-between; |
| 348 | - padding: 30rpx; | |
| 361 | + padding: 0 0 30rpx 0; | |
| 349 | 362 | |
| 350 | 363 | .check { |
| 351 | 364 | padding: 20rpx 0 0 0; |
| ... | ... | @@ -460,31 +473,32 @@ |
| 460 | 473 | color: #202131; |
| 461 | 474 | } |
| 462 | 475 | |
| 463 | - .scroll { | |
| 464 | - max-height: 60vh; | |
| 465 | - | |
| 466 | - .item { | |
| 467 | - width: 540rpx; | |
| 468 | - height: 96rpx; | |
| 469 | - border-radius: 4rpx; | |
| 470 | - border: 2rpx solid #C1C1C9; | |
| 471 | - margin: 0 10rpx 20rpx; | |
| 472 | - font-size: 24rpx; | |
| 473 | - line-height: 32rpx; | |
| 474 | - color: #C0C0C9; | |
| 475 | - display: flex; | |
| 476 | - flex-flow: row wrap; | |
| 477 | - align-items: center; | |
| 478 | - | |
| 479 | - text { | |
| 480 | - display: inline-block; | |
| 481 | - width: 500rpx; | |
| 482 | - height: 64rpx; | |
| 483 | - padding: 16rpx 20rpx; | |
| 484 | - } | |
| 485 | - | |
| 486 | - | |
| 487 | - } | |
| 476 | + .scroll { | |
| 477 | + max-height: 60vh; | |
| 478 | + | |
| 479 | + .item { | |
| 480 | + | |
| 481 | + view { | |
| 482 | + display: flex; | |
| 483 | + flex-flow: row wrap; | |
| 484 | + align-items: center; | |
| 485 | + width: 500rpx; | |
| 486 | + height: 74rpx; | |
| 487 | + border-radius: 4rpx; | |
| 488 | + border: 2rpx solid #C1C1C9; | |
| 489 | + margin: 0 10rpx 20rpx; | |
| 490 | + font-size: 24rpx; | |
| 491 | + line-height: 32rpx; | |
| 492 | + color: #C0C0C9; | |
| 493 | + padding: 16rpx 20rpx; | |
| 494 | + } | |
| 495 | + | |
| 496 | + .selectItem { | |
| 497 | + background-color: #06B079; | |
| 498 | + color: #FFFFFF; | |
| 499 | + border: 2rpx solid #06B079; | |
| 500 | + } | |
| 501 | + } | |
| 488 | 502 | } |
| 489 | 503 | |
| 490 | 504 | .time { | ... | ... |
| ... | ... | @@ -17,33 +17,47 @@ |
| 17 | 17 | </u-search> |
| 18 | 18 | </view> |
| 19 | 19 | |
| 20 | - <u-icon slot="icon" size="32" :name="'/static/img/home/筛选icon@2x.png'" @click="show = true"></u-icon> | |
| 20 | + <view class="icon"> | |
| 21 | + <view :style="{position:'relative', top:'14rpx', right:'18rpx'}"> | |
| 22 | + <u-icon slot="icon" size="40" :name="'/static/img/home/dateIcon.png'" @click="showTime = true"> | |
| 23 | + </u-icon> | |
| 24 | + </view> | |
| 25 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"> | |
| 26 | + </u-icon> | |
| 27 | + </view> | |
| 28 | + | |
| 29 | + | |
| 21 | 30 | </view> |
| 22 | - <view class="bottom"> | |
| 23 | - <u-calendar :show="showTime" :defaultDate="defaultDateMultiple" @close="showTime = false" | |
| 24 | - :showSubtitle="false" color="#06B079" @confirm="confirm"> | |
| 31 | + <view class="bottom" :style="{padding:'0 0 20rpx 0'}"> | |
| 32 | + <u-calendar :minDate="minDate" :maxDate="maxDate" :monthNum="25" :show="showTime" | |
| 33 | + :defaultDate="defaultDateMultiple" @close="showTime = false" :showSubtitle="false" color="#06B079" | |
| 34 | + @confirm="confirm"> | |
| 25 | 35 | </u-calendar> |
| 26 | - <view class="time" @click="showTime = true">{{timeValue}}</view> | |
| 36 | + <!-- <view class="time">{{timeValue}}</view> --> | |
| 27 | 37 | </view> |
| 28 | 38 | </view> |
| 29 | 39 | |
| 30 | 40 | <view class="list_box" v-if="list.length > 0"> |
| 31 | - <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> | |
| 41 | + <view class="item" v-for="(item, i) in list" :key="i"> | |
| 32 | 42 | |
| 33 | - <view class="bg_image" v-if="item.waitAttendance == 'attendance'"> | |
| 34 | - <u-image src="/static/img/home/标签背景-绿@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 35 | - <text>已签到</text> | |
| 43 | + <view class="bg_image" v-if="item.waitAttendance == 'not_attendance'"> | |
| 44 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 45 | + <text>未签到</text> | |
| 36 | 46 | </view> |
| 37 | 47 | |
| 38 | 48 | <view class="bg_image" v-else> |
| 39 | - <u-image src="/static/img/home/标签背景-灰@2x.png" width="142rpx" height="48rpx"></u-image> | |
| 40 | - <text>未签到</text> | |
| 49 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 50 | + <text>已签到</text> | |
| 41 | 51 | </view> |
| 42 | 52 | |
| 43 | 53 | <view class="info"> |
| 44 | 54 | <view class="avatar">{{getNameLastTwo(item.studentName)}}</view> |
| 45 | 55 | <view class="name">{{overflowHide(item.studentName)}}</view> |
| 46 | - <view class="number">{{item.id}}</view> | |
| 56 | + <view class="number">{{item.studentNumber}}</view> | |
| 57 | + </view> | |
| 58 | + <view class="company"> | |
| 59 | + <text>实习项目</text> | |
| 60 | + <text>{{item.projectName || '--'}}</text> | |
| 47 | 61 | </view> |
| 48 | 62 | <view class="company"> |
| 49 | 63 | <text>班级</text> |
| ... | ... | @@ -66,13 +80,13 @@ |
| 66 | 80 | <c-no-data></c-no-data> |
| 67 | 81 | </view> |
| 68 | 82 | |
| 69 | - <u-popup :show="show" mode="right" @close="close" @open="open"> | |
| 83 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 70 | 84 | <view class="popup_search"> |
| 71 | 85 | <view class="content"> |
| 72 | 86 | <view class="title">按项目筛选</view> |
| 73 | 87 | <scroll-view class="scroll" scroll-y="true"> |
| 74 | 88 | <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> |
| 75 | - <view :style="{backgroundColor: '#06B079',color: '#FFFFFF'}" v-if="item.id == projectId"> | |
| 89 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 76 | 90 | <text>{{item.name}}</text> |
| 77 | 91 | </view> |
| 78 | 92 | <view v-else> |
| ... | ... | @@ -111,6 +125,7 @@ |
| 111 | 125 | mapActions |
| 112 | 126 | } from 'vuex' |
| 113 | 127 | import listMixin from "@/common/mixins/list-mixin.js"; |
| 128 | + import miment from 'miment' | |
| 114 | 129 | |
| 115 | 130 | import { |
| 116 | 131 | getStudentSignInListApi, |
| ... | ... | @@ -140,9 +155,12 @@ |
| 140 | 155 | //搜索对象必须为key search的对象 |
| 141 | 156 | keySearch: "", |
| 142 | 157 | waitAttendance: '', |
| 158 | + time: '', | |
| 143 | 159 | |
| 144 | 160 | }, |
| 145 | 161 | showTime: false, |
| 162 | + minDate: `${year-2}-${month}-${date+1}`, | |
| 163 | + maxDate: `${year}-${month}-${date+1}`, | |
| 146 | 164 | timeValue: `${year}-${month}-${date}`, |
| 147 | 165 | defaultDateMultiple: [`${year}-${month}-${date}`], |
| 148 | 166 | list: [], //列表必须为key list的数组 |
| ... | ... | @@ -152,10 +170,7 @@ |
| 152 | 170 | } |
| 153 | 171 | }, |
| 154 | 172 | |
| 155 | - onLoad() {}, | |
| 156 | - | |
| 157 | - onShow() { | |
| 158 | - | |
| 173 | + onLoad(option) { | |
| 159 | 174 | this.$store.dispatch(`home/getProjectList`, { |
| 160 | 175 | pageSize: -1, |
| 161 | 176 | }) |
| ... | ... | @@ -166,6 +181,12 @@ |
| 166 | 181 | this.loading = "loadmore"; |
| 167 | 182 | this.page = 0; |
| 168 | 183 | this.list = []; |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + }, | |
| 188 | + | |
| 189 | + onShow() { | |
| 169 | 190 | this._getList(); |
| 170 | 191 | }, |
| 171 | 192 | |
| ... | ... | @@ -180,24 +201,32 @@ |
| 180 | 201 | |
| 181 | 202 | methods: { |
| 182 | 203 | |
| 183 | - getNameLastTwo(value) { | |
| 184 | - if (value && value.length > 3) { | |
| 185 | - return value.substring(value.length - 3) | |
| 186 | - } else { | |
| 187 | - return value; | |
| 188 | - } | |
| 189 | - }, | |
| 190 | - | |
| 191 | - overflowHide(value, num = 4) { | |
| 192 | - if (value && value.length > num) { | |
| 193 | - return `${value.slice(0, num)}...` | |
| 194 | - } else { | |
| 195 | - return value; | |
| 196 | - } | |
| 204 | + getNameLastTwo(value) { | |
| 205 | + if (value && value.length > 3) { | |
| 206 | + return value.substring(value.length - 3) | |
| 207 | + } else { | |
| 208 | + return value; | |
| 209 | + } | |
| 210 | + }, | |
| 211 | + | |
| 212 | + overflowHide(value, num = 4) { | |
| 213 | + if (value && value.length > num) { | |
| 214 | + return `${value.slice(0, num)}...` | |
| 215 | + } else { | |
| 216 | + return value; | |
| 217 | + } | |
| 197 | 218 | }, |
| 198 | 219 | |
| 199 | 220 | confirm(e) { |
| 200 | 221 | this.timeValue = e[0]; |
| 222 | + this.time = miment(e[0]).valueOf(); | |
| 223 | + | |
| 224 | + this.finished = false; | |
| 225 | + this.loading = "loadmore"; | |
| 226 | + this.page = 0; | |
| 227 | + this.list = []; | |
| 228 | + this._getList(); | |
| 229 | + | |
| 201 | 230 | this.showTime = false; |
| 202 | 231 | }, |
| 203 | 232 | |
| ... | ... | @@ -269,6 +298,10 @@ |
| 269 | 298 | params.projectId = this.projectId |
| 270 | 299 | } |
| 271 | 300 | |
| 301 | + if (this.time) { | |
| 302 | + params.time = this.time | |
| 303 | + } | |
| 304 | + | |
| 272 | 305 | return await getStudentSignInListApi(params); |
| 273 | 306 | }, |
| 274 | 307 | // 数据请求(没错就是这么少的代码) |
| ... | ... | @@ -293,6 +326,14 @@ |
| 293 | 326 | } |
| 294 | 327 | |
| 295 | 328 | this.list = this.list.concat(result.records) |
| 329 | + | |
| 330 | + // 判断是否全部加载完成 | |
| 331 | + if (this.total == this.list.length) { | |
| 332 | + this.finished = true; | |
| 333 | + this.loading = 'nomore'; | |
| 334 | + } else { | |
| 335 | + this.loading = 'loadmore'; | |
| 336 | + } | |
| 296 | 337 | }, |
| 297 | 338 | |
| 298 | 339 | handelClick(values) { |
| ... | ... | @@ -302,9 +343,8 @@ |
| 302 | 343 | |
| 303 | 344 | handelChange(e) { |
| 304 | 345 | console.log(e) |
| 305 | - this.checkboxValue = e ? ['待审核'] : []; | |
| 306 | - this.search.waitAttendance = e ? 'wait' : 'wait,pass,reject'; | |
| 307 | - | |
| 346 | + this.checkboxValue = e ? ['未签到'] : []; | |
| 347 | + this.search.waitAttendance = e ? 'not_attendance' : ''; | |
| 308 | 348 | }, |
| 309 | 349 | |
| 310 | 350 | handelCancel() { |
| ... | ... | @@ -347,7 +387,12 @@ |
| 347 | 387 | } |
| 348 | 388 | |
| 349 | 389 | .search { |
| 350 | - width: 468rpx; | |
| 390 | + width: 410rpx; | |
| 391 | + } | |
| 392 | + | |
| 393 | + .icon { | |
| 394 | + display: flex; | |
| 395 | + flex-flow: row nowrap; | |
| 351 | 396 | } |
| 352 | 397 | } |
| 353 | 398 | |
| ... | ... | @@ -424,14 +469,21 @@ |
| 424 | 469 | flex-flow: row nowrap; |
| 425 | 470 | margin: 0 0 30rpx 0; |
| 426 | 471 | |
| 427 | - text { | |
| 472 | + text { | |
| 473 | + width: 130rpx; | |
| 428 | 474 | font-size: 28rpx; |
| 429 | 475 | line-height: 32rpx; |
| 430 | 476 | color: #909097; |
| 431 | 477 | margin: 0 0 0 16rpx; |
| 478 | + } | |
| 479 | + | |
| 480 | + text:first-child { | |
| 481 | + text-align: justify; | |
| 482 | + text-align-last: justify; | |
| 432 | 483 | } |
| 433 | 484 | |
| 434 | - text:last-child { | |
| 485 | + text:last-child { | |
| 486 | + width: 400rpx; | |
| 435 | 487 | color: #202131; |
| 436 | 488 | margin: 0 0 0 30rpx; |
| 437 | 489 | } |
| ... | ... | @@ -469,31 +521,32 @@ |
| 469 | 521 | color: #202131; |
| 470 | 522 | } |
| 471 | 523 | |
| 472 | - .scroll { | |
| 473 | - max-height: 60vh; | |
| 474 | - | |
| 475 | - .item { | |
| 476 | - width: 540rpx; | |
| 477 | - height: 96rpx; | |
| 478 | - border-radius: 4rpx; | |
| 479 | - border: 2rpx solid #C1C1C9; | |
| 480 | - margin: 0 10rpx 20rpx; | |
| 481 | - font-size: 24rpx; | |
| 482 | - line-height: 32rpx; | |
| 483 | - color: #C0C0C9; | |
| 484 | - display: flex; | |
| 485 | - flex-flow: row wrap; | |
| 486 | - align-items: center; | |
| 487 | - | |
| 488 | - text { | |
| 489 | - display: inline-block; | |
| 490 | - width: 500rpx; | |
| 491 | - height: 64rpx; | |
| 492 | - padding: 16rpx 20rpx; | |
| 493 | - } | |
| 494 | - | |
| 495 | - | |
| 496 | - } | |
| 524 | + .scroll { | |
| 525 | + max-height: 60vh; | |
| 526 | + | |
| 527 | + .item { | |
| 528 | + | |
| 529 | + view { | |
| 530 | + display: flex; | |
| 531 | + flex-flow: row wrap; | |
| 532 | + align-items: center; | |
| 533 | + width: 500rpx; | |
| 534 | + height: 74rpx; | |
| 535 | + border-radius: 4rpx; | |
| 536 | + border: 2rpx solid #C1C1C9; | |
| 537 | + margin: 0 10rpx 20rpx; | |
| 538 | + font-size: 24rpx; | |
| 539 | + line-height: 32rpx; | |
| 540 | + color: #C0C0C9; | |
| 541 | + padding: 16rpx 20rpx; | |
| 542 | + } | |
| 543 | + | |
| 544 | + .selectItem { | |
| 545 | + background-color: #06B079; | |
| 546 | + color: #FFFFFF; | |
| 547 | + border: 2rpx solid #06B079; | |
| 548 | + } | |
| 549 | + } | |
| 497 | 550 | } |
| 498 | 551 | |
| 499 | 552 | .time { | ... | ... |
| ... | ... | @@ -19,12 +19,12 @@ |
| 19 | 19 | </view> |
| 20 | 20 | <view style="margin-top: 32rpx;"> |
| 21 | 21 | <text>考评人</text> |
| 22 | - <text class="value_type">{{interDetail.assessorName}}</text> | |
| 22 | + <text class="value_type">{{interDetail.assessorName ? interDetail.assessorName : '--'}}</text> | |
| 23 | 23 | </view> |
| 24 | 24 | |
| 25 | 25 | <view style="margin-top: 32rpx;"> |
| 26 | 26 | <text>评价</text> |
| 27 | - <text class="value_type">{{interDetail.teacherView}}</text> | |
| 27 | + <text class="value_type">{{interDetail.teacherView ? interDetail.teacherView : '--'}}</text> | |
| 28 | 28 | </view> |
| 29 | 29 | |
| 30 | 30 | </view> | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="agreemen_detail"> |
| 3 | - <view class="box"> | |
| 4 | - <view class="title">{{detail.title}}</view> | |
| 5 | - <view class="item"> | |
| 6 | - <text>创建时间</text> | |
| 7 | - <text>{{timeFormat(detail.createdTime)}}</text> | |
| 8 | - </view> | |
| 9 | - </view> | |
| 10 | - | |
| 11 | - <view class="list_box"> | |
| 12 | - <view class="item"> | |
| 13 | - <view class="company"> | |
| 14 | - <text>实习单号</text> | |
| 15 | - <text :style="{color:'#06B079'}">{{detail.formNumber || '--'}}</text> | |
| 16 | - </view> | |
| 17 | - <view class="company"> | |
| 18 | - <text>学生姓名</text> | |
| 19 | - <text>{{detail.studentName|| '--'}}</text> | |
| 20 | - </view> | |
| 21 | - <view class="company"> | |
| 22 | - <text>项目名称</text> | |
| 23 | - <text>{{detail.projectName|| '--'}}</text> | |
| 24 | - </view> | |
| 25 | - <view class="company"> | |
| 26 | - <text>三方协议</text> | |
| 27 | - <view class="item_box"> | |
| 28 | - <text :style="{color:'#06B079'}" v-for="(item,index) in attachments" :key="index" | |
| 29 | - @click="openLink(item)">{{item.filename}}</text> | |
| 30 | - </view> | |
| 31 | - | |
| 32 | - </view> | |
| 33 | - | |
| 34 | - </view> | |
| 3 | + | |
| 4 | + <view v-if="id"> | |
| 5 | + <view class="box"> | |
| 6 | + <view class="title">{{detail.title}}</view> | |
| 7 | + <view class="item"> | |
| 8 | + <text>创建时间</text> | |
| 9 | + <text>{{timeFormat(detail.createdTime)}}</text> | |
| 10 | + </view> | |
| 11 | + </view> | |
| 12 | + | |
| 13 | + <view class="list_box"> | |
| 14 | + <view class="item"> | |
| 15 | + <view class="company"> | |
| 16 | + <text>实习单号</text> | |
| 17 | + <text @click="handelDetail" :style="{color:'#06B079'}">{{detail.formNumber || '--'}}</text> | |
| 18 | + </view> | |
| 19 | + <view class="company"> | |
| 20 | + <text>学生姓名</text> | |
| 21 | + <text>{{detail.studentName|| '--'}}</text> | |
| 22 | + </view> | |
| 23 | + <view class="company"> | |
| 24 | + <text>课程名称</text> | |
| 25 | + <text>{{detail.courseName|| '--'}}</text> | |
| 26 | + </view> | |
| 27 | + <view class="company"> | |
| 28 | + <text>项目名称</text> | |
| 29 | + <text>{{detail.projectName|| '--'}}</text> | |
| 30 | + </view> | |
| 31 | + <view class="company"> | |
| 32 | + <text>三方协议</text> | |
| 33 | + <view class="item_box"> | |
| 34 | + <text :style="{color:'#06B079'}" v-for="(item,index) in attachments" :key="index" | |
| 35 | + @click="openLink(item)">{{item.filename}}</text> | |
| 36 | + </view> | |
| 37 | + | |
| 38 | + </view> | |
| 39 | + | |
| 40 | + </view> | |
| 41 | + </view> | |
| 42 | + </view> | |
| 43 | + | |
| 44 | + <view v-else class="no_data"> | |
| 45 | + <c-no-data></c-no-data> | |
| 35 | 46 | </view> |
| 36 | 47 | |
| 37 | 48 | </view> |
| ... | ... | @@ -59,9 +70,14 @@ |
| 59 | 70 | } |
| 60 | 71 | }, |
| 61 | 72 | |
| 62 | - onLoad(option) { | |
| 73 | + onLoad(option) { | |
| 74 | + | |
| 75 | + this.id = option.id; | |
| 76 | + | |
| 77 | + if(!option.id) { | |
| 78 | + return; | |
| 79 | + } | |
| 63 | 80 | |
| 64 | - this.id = option.id; | |
| 65 | 81 | getAgreementDetailApi(option.id).then(data => { |
| 66 | 82 | if (data) { |
| 67 | 83 | this.detail = data; |
| ... | ... | @@ -75,6 +91,12 @@ |
| 75 | 91 | return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' |
| 76 | 92 | }, |
| 77 | 93 | |
| 94 | + handelDetail(record) { | |
| 95 | + this.$u.route({ | |
| 96 | + url: `pages/main/internship/intershipInfo/intershipInfo?id=${this.detail.formId}` | |
| 97 | + }) | |
| 98 | + }, | |
| 99 | + | |
| 78 | 100 | openLink(e) { |
| 79 | 101 | var _this = this |
| 80 | 102 | this.mFileDir = e.filename.substring(0, e.filename.lastIndexOf('.')) |
| ... | ... | @@ -273,13 +295,16 @@ |
| 273 | 295 | margin: 0 0 0 30rpx; |
| 274 | 296 | } |
| 275 | 297 | |
| 276 | - .item_box { | |
| 298 | + .item_box { | |
| 299 | + width: 450rpx; | |
| 300 | + margin: 0 0 0 30rpx; | |
| 277 | 301 | text { |
| 278 | 302 | display: inline-block; |
| 279 | 303 | width: 450rpx; |
| 280 | 304 | overflow: hidden; |
| 281 | 305 | white-space: nowrap; |
| 282 | - text-overflow: ellipsis; | |
| 306 | + text-overflow: ellipsis; | |
| 307 | + margin: 0; | |
| 283 | 308 | |
| 284 | 309 | } |
| 285 | 310 | } | ... | ... |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </view> |
| 23 | 23 | |
| 24 | 24 | <view class="time"> |
| 25 | - <text>申请时间</text> | |
| 25 | + <text>上传时间</text> | |
| 26 | 26 | <text>{{timeFormat(item.createdTime, 'yyyy-mm-dd hh:MM')}}</text> |
| 27 | 27 | </view> |
| 28 | 28 | |
| ... | ... | @@ -64,6 +64,7 @@ |
| 64 | 64 | |
| 65 | 65 | onLoad(option) { |
| 66 | 66 | this.studentId = option.studentId; |
| 67 | + this.projectId = option.projectId; | |
| 67 | 68 | |
| 68 | 69 | this.finished = false; |
| 69 | 70 | this.loading = "loadmore"; |
| ... | ... | @@ -112,7 +113,11 @@ |
| 112 | 113 | |
| 113 | 114 | if (this.studentId) { |
| 114 | 115 | params.studentId = this.studentId |
| 115 | - } | |
| 116 | + } | |
| 117 | + | |
| 118 | + if (this.projectId) { | |
| 119 | + params.projectId = this.projectId | |
| 120 | + } | |
| 116 | 121 | |
| 117 | 122 | return await getAgreementListApi(params); |
| 118 | 123 | }, |
| ... | ... | @@ -137,7 +142,15 @@ |
| 137 | 142 | this.shownoData = true |
| 138 | 143 | } |
| 139 | 144 | |
| 140 | - this.list = this.list.concat(result.records) | |
| 145 | + this.list = this.list.concat(result.records) | |
| 146 | + | |
| 147 | + // 判断是否全部加载完成 | |
| 148 | + if (this.total == this.list.length) { | |
| 149 | + this.finished = true; | |
| 150 | + this.loading = 'nomore'; | |
| 151 | + } else { | |
| 152 | + this.loading = 'loadmore'; | |
| 153 | + } | |
| 141 | 154 | }, |
| 142 | 155 | |
| 143 | 156 | } | ... | ... |
| ... | ... | @@ -40,16 +40,20 @@ |
| 40 | 40 | <text>学生手机号</text> |
| 41 | 41 | <text class="value_type">{{interDetail.studentPhone}}</text> |
| 42 | 42 | </view> |
| 43 | - <view style="margin-top: 32rpx;"> | |
| 43 | + <view class="item"> | |
| 44 | 44 | <text>班级</text> |
| 45 | 45 | <text class="value_type">{{interDetail.classInfo}}</text> |
| 46 | 46 | </view> |
| 47 | + <view class="item"> | |
| 48 | + <text>实践课程</text> | |
| 49 | + <text class="value_type">{{interDetail.courseName}}</text> | |
| 50 | + </view> | |
| 47 | 51 | <view style="margin-top: 32rpx;"> |
| 48 | 52 | <text>实习成绩</text> |
| 49 | 53 | <text v-if="grades" class="value_type">{{grades}}</text> |
| 50 | 54 | <text v-else class="value_type">--</text> |
| 51 | 55 | </view> |
| 52 | - <view style="margin-top: 32rpx; overflow: hidden;"> | |
| 56 | + <view class="item"> | |
| 53 | 57 | <text>实习评价</text> |
| 54 | 58 | <text v-if="interDetail.teacherView" class="value_type">{{interDetail.teacherView}}</text> |
| 55 | 59 | <text v-else class="value_type">--</text> |
| ... | ... | @@ -59,27 +63,26 @@ |
| 59 | 63 | <text class="text_title">项目信息</text> |
| 60 | 64 | <view class="divide_line"></view> |
| 61 | 65 | <view class="content_box"> |
| 62 | - <view> | |
| 66 | + <view class="item" :style="{margin:'0rpx'}"> | |
| 63 | 67 | <text>开设院系</text> |
| 64 | 68 | <text class="value_type">{{interDetail.departmentName}}</text> |
| 65 | 69 | </view> |
| 66 | - <view style="margin-top: 32rpx;"> | |
| 70 | + <view class="item"> | |
| 67 | 71 | <text>开设学期</text> |
| 68 | 72 | <text class="value_type">{{interDetail.schoolTerm}}</text> |
| 69 | 73 | </view> |
| 70 | - <view style="margin-top: 32rpx;"> | |
| 74 | + <view class="item"> | |
| 71 | 75 | <text>实习计划</text> |
| 72 | 76 | <text class="value_type"><text class="value_type">{{interDetail.planName}}</text></text> |
| 73 | 77 | </view> |
| 74 | - <view style="margin-top: 32rpx;"> | |
| 78 | + <view class="item"> | |
| 75 | 79 | <text>实习项目</text> |
| 76 | 80 | <text class="value_type">{{interDetail.projectName}}</text></text> |
| 77 | 81 | </view> |
| 78 | 82 | <view style="margin-top: 32rpx;"> |
| 79 | 83 | <text>实习形式</text> |
| 80 | 84 | <text v-if="projectDetail.practiceForm == 'oneself'" class="value_type">自主</text> |
| 81 | - <text v-else-if="projectDetail.practiceForm == 'centralize'" | |
| 82 | - class="value_type">集中</text> | |
| 85 | + <text v-else-if="projectDetail.practiceForm == 'centralize'" class="value_type">集中</text> | |
| 83 | 86 | </view> |
| 84 | 87 | <view style="margin-top: 32rpx;"> |
| 85 | 88 | <text>实习开始时间</text> |
| ... | ... | @@ -105,41 +108,28 @@ |
| 105 | 108 | <text class="text_title">单位信息</text> |
| 106 | 109 | <view class="divide_line"></view> |
| 107 | 110 | <view class="content_box"> |
| 108 | - <view> | |
| 111 | + <view class="item" :style="{margin:'0rpx'}"> | |
| 109 | 112 | <text>实习企业</text> |
| 110 | - <text v-if="jobDetail.company" | |
| 111 | - class="value_type">{{jobDetail.company}}</text> | |
| 113 | + <text v-if="jobDetail.company" class="value_type">{{jobDetail.company}}</text> | |
| 112 | 114 | <text v-else class="value_type">--</text> |
| 113 | 115 | </view> |
| 114 | - <view style="margin-top: 32rpx; overflow: hidden;"> | |
| 116 | + <view class="item"> | |
| 115 | 117 | <text>实习岗位</text> |
| 116 | - <text class="value_type" | |
| 117 | - style="width: 60%; white-space: nowrap;overflow: hidden; text-overflow: ellipsis">{{jobDetail.name}}</text> | |
| 118 | + <text class="value_type">{{jobDetail.name}}</text> | |
| 118 | 119 | </view> |
| 119 | - <!-- <view style="margin-top: 32rpx;"> | |
| 120 | - <text>行业方向</text> | |
| 121 | - <text class="value_type">{{interDetail.job.name}}</text> | |
| 122 | - </view> --> | |
| 123 | 120 | <view style="margin-top: 32rpx;"> |
| 124 | 121 | <text>联系人</text> |
| 125 | - <text v-if="jobDetail.contactName" | |
| 126 | - class="value_type">{{jobDetail.contactName}}</text> | |
| 122 | + <text v-if="jobDetail.contactName" class="value_type">{{jobDetail.contactName}}</text> | |
| 127 | 123 | <text v-else class="value_type">--</text> |
| 128 | 124 | </view> |
| 129 | 125 | <view style="margin-top: 32rpx;"> |
| 130 | 126 | <text>联系电话</text> |
| 131 | - <text v-if="jobDetail.contactPhone" | |
| 132 | - class="value_type">{{jobDetail.contactPhone}}</text> | |
| 127 | + <text v-if="jobDetail.contactPhone" class="value_type">{{jobDetail.contactPhone}}</text> | |
| 133 | 128 | <text v-else class="value_type">--</text> |
| 134 | 129 | </view> |
| 135 | - <!-- <view style="margin-top: 32rpx;"> | |
| 136 | - <text>企业邮箱</text> | |
| 137 | - <text class="value_type">{{interDetail.job.contactPhone}}</text> | |
| 138 | - </view> --> | |
| 139 | - <view style="margin-top: 32rpx; overflow: hidden;"> | |
| 130 | + <view class="item"> | |
| 140 | 131 | <text>实习地址</text> |
| 141 | - <text v-if="jobDetail.workSite" | |
| 142 | - class="value_type">{{jobDetail.workSite}}</text> | |
| 132 | + <text v-if="jobDetail.workSite" class="value_type">{{jobDetail.workSite}}</text> | |
| 143 | 133 | <text v-else class="value_type">--</text> |
| 144 | 134 | </view> |
| 145 | 135 | </view> |
| ... | ... | @@ -147,11 +137,11 @@ |
| 147 | 137 | </view> |
| 148 | 138 | </template> |
| 149 | 139 | |
| 150 | -<script> | |
| 151 | - import { | |
| 152 | - getInternshipDetailApi, | |
| 153 | - } from '@/config/api.js'; | |
| 154 | - | |
| 140 | +<script> | |
| 141 | + import { | |
| 142 | + getInternshipDetailApi, | |
| 143 | + } from '@/config/api.js'; | |
| 144 | + | |
| 155 | 145 | export default { |
| 156 | 146 | data() { |
| 157 | 147 | return { |
| ... | ... | @@ -175,7 +165,7 @@ |
| 175 | 165 | this.interDetail = res; |
| 176 | 166 | this.projectDetail = res.projectDetail; |
| 177 | 167 | this.jobDetail = res.jobDetail; |
| 178 | - this.grades = (res.markWay == "hierarchy" ? (res.level ? this.levels[res.level] : "--") : res | |
| 168 | + this.grades = (res.markWay == "hierarchy" ? (res.level ? res.level : "--") : res | |
| 179 | 169 | .score + 0 + "/100") |
| 180 | 170 | }) |
| 181 | 171 | }, |
| ... | ... | @@ -222,6 +212,17 @@ |
| 222 | 212 | width: 100%; |
| 223 | 213 | background-color: #fff; |
| 224 | 214 | |
| 215 | + .item { | |
| 216 | + display: flex; | |
| 217 | + flex-flow: row nowrap; | |
| 218 | + justify-content: space-between; | |
| 219 | + margin: 32rpx 0 0 0; | |
| 220 | + | |
| 221 | + text { | |
| 222 | + display: block; | |
| 223 | + } | |
| 224 | + } | |
| 225 | + | |
| 225 | 226 | .text_title { |
| 226 | 227 | font-size: 32rpx; |
| 227 | 228 | font-family: PingFangSC-Medium, PingFang SC; | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="signin_list"> |
| 3 | - <mi-calendar :leaveDateList="[`2022-8-2`,`2022-8-4`]" :suspensionDateList="[`2022-08-08`]" | |
| 4 | - :normalDateList="[`2022-8-3`]"></mi-calendar> | |
| 3 | + <mi-calendar :suspensionDateList="suspensionDateList" @change="change" @changeMonth="changeMonth"></mi-calendar> | |
| 5 | 4 | |
| 6 | 5 | <view class="steps"> |
| 7 | - <u-steps current="1" direction="column"> | |
| 8 | - <u-steps-item title="已下单" desc="10:30"> | |
| 9 | - </u-steps-item> | |
| 10 | - <u-steps-item title="已出库" desc="10:35"> | |
| 11 | - </u-steps-item> | |
| 12 | - <u-steps-item title="运输中" desc="11:40"></u-steps-item> | |
| 6 | + <u-steps current="1" direction="column" v-if="signList.length> 0"> | |
| 7 | + | |
| 8 | + <view v-for="(item, i) in signList" :key="i"> | |
| 9 | + <u-steps-item :title="timeFormat(item.createdTime, 'yyyy-mm-dd hh:MM')" :desc="item.location" | |
| 10 | + v-if="i == 0"> | |
| 11 | + <u-icon slot="icon" size="38rpx" name="/static/img/internship/currentTime.png"></u-icon> | |
| 12 | + </u-steps-item> | |
| 13 | + <u-steps-item :title="timeFormat(item.createdTime, 'yyyy-mm-dd hh:MM')" :desc="item.location" | |
| 14 | + v-else> | |
| 15 | + <u-icon slot="icon" size="16rpx" name="/static/img/internship/beforeTime.png"></u-icon> | |
| 16 | + </u-steps-item> | |
| 17 | + </view> | |
| 13 | 18 | </u-steps> |
| 19 | + | |
| 20 | + <view v-else class="no_data"> | |
| 21 | + <c-no-data paddingTop="30"></c-no-data> | |
| 22 | + </view> | |
| 23 | + | |
| 14 | 24 | </view> |
| 15 | 25 | </view> |
| 16 | 26 | </template> |
| ... | ... | @@ -30,37 +40,136 @@ |
| 30 | 40 | |
| 31 | 41 | export default { |
| 32 | 42 | data() { |
| 33 | - return { | |
| 34 | 43 | |
| 44 | + const d = new Date(); | |
| 45 | + const year = d.getFullYear(); | |
| 46 | + let month = d.getMonth() + 1; | |
| 47 | + month = month < 10 ? `0${month}` : month; | |
| 48 | + const date = d.getDate(); | |
| 49 | + | |
| 50 | + return { | |
| 51 | + initList: [], | |
| 52 | + nowTime: `${year}-${month}-${date}`, | |
| 53 | + suspensionDateList: [], | |
| 54 | + signList: [], | |
| 35 | 55 | } |
| 36 | 56 | }, |
| 37 | 57 | |
| 38 | 58 | onLoad(option) { |
| 39 | 59 | this.studentId = option.studentId; |
| 60 | + this.projectId = option.projectId; | |
| 40 | 61 | |
| 41 | 62 | getsignInListApi({ |
| 42 | 63 | studentId: option.studentId, |
| 64 | + projectId: option.projectId, | |
| 65 | + }).then(data => { | |
| 66 | + this.initList = data; | |
| 67 | + if (data && data.length > 0) { | |
| 68 | + | |
| 69 | + let suspensionDateList = []; | |
| 70 | + data.map((item, index) => { | |
| 71 | + let suspensionDate = this.timeFormat(item.signIn) | |
| 72 | + console.log(suspensionDate, this.nowTime) | |
| 73 | + suspensionDateList.push(suspensionDate); | |
| 74 | + }) | |
| 75 | + this.suspensionDateList = suspensionDateList; | |
| 76 | + | |
| 77 | + this.filterData(data, this.nowTime); | |
| 78 | + | |
| 79 | + | |
| 80 | + } | |
| 43 | 81 | }) |
| 44 | 82 | |
| 45 | 83 | }, |
| 46 | 84 | |
| 47 | 85 | methods: { |
| 86 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | |
| 87 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | |
| 88 | + }, | |
| 89 | + | |
| 90 | + filterData(data, time) { | |
| 91 | + let signListArr = data.filter(item => this.timeFormat(item.signIn) == time); | |
| 92 | + this.signList = signListArr.length > 0 ? signListArr[0].attendanceList : []; | |
| 93 | + }, | |
| 94 | + | |
| 95 | + change(date) { | |
| 96 | + console.log(date); // 日期 eg:'2022-01-01' | |
| 97 | + this.filterData(this.initList, date); | |
| 98 | + }, | |
| 99 | + | |
| 100 | + changeMonth(year, month) { | |
| 101 | + console.log(year, month); // 日期 eg:2022, 6 | |
| 48 | 102 | |
| 103 | + let monthTime = new Date(year, month - 1); | |
| 104 | + console.log(monthTime.getTime()) | |
| 105 | + | |
| 106 | + getsignInListApi({ | |
| 107 | + studentId: this.studentId, | |
| 108 | + time: monthTime.getTime(), | |
| 109 | + }).then(data => { | |
| 110 | + this.initList = data; | |
| 111 | + if (data && data.length > 0) { | |
| 112 | + | |
| 113 | + let suspensionDateList = []; | |
| 114 | + data.map((item, index) => { | |
| 115 | + let suspensionDate = this.timeFormat(item.signIn) | |
| 116 | + console.log(suspensionDate, this.nowTime) | |
| 117 | + suspensionDateList.push(suspensionDate); | |
| 118 | + }) | |
| 119 | + this.suspensionDateList = suspensionDateList; | |
| 120 | + | |
| 121 | + // let monthFormat = month < 10 ? `${year}-0${month}` : `${year}-${month}`; | |
| 122 | + // if (this.nowTime.indexOf(monthFormat) != -1) { | |
| 123 | + // this.filterData(data, this.nowTime); | |
| 124 | + | |
| 125 | + // } | |
| 126 | + | |
| 127 | + } | |
| 128 | + }) | |
| 129 | + }, | |
| 49 | 130 | } |
| 50 | 131 | } |
| 51 | 132 | </script> |
| 52 | 133 | |
| 53 | 134 | <style lang="scss" scoped> |
| 54 | 135 | .signin_list { |
| 136 | + width: 100%; | |
| 137 | + min-height: 100%; | |
| 138 | + height: auto; | |
| 139 | + background-color: #F7F7F7; | |
| 140 | + padding: 5rpx 0 20rpx 0; | |
| 55 | 141 | |
| 56 | 142 | .steps { |
| 57 | - font-size: 28rpx; | |
| 58 | - line-height: 36rpx; | |
| 59 | - color: #202131; | |
| 143 | + width: 630rpx; | |
| 144 | + min-height: 550rpx; | |
| 145 | + padding: 30rpx; | |
| 146 | + margin: 20rpx auto 0; | |
| 147 | + background-color: #fff; | |
| 148 | + border-radius: 12rpx; | |
| 149 | + box-shadow: 0 3rpx 32rpx 0rpx rgba(0, 0, 0, 0.1); | |
| 60 | 150 | } |
| 61 | 151 | |
| 62 | - .steps /deep/ .u-text__value { | |
| 63 | - font-size: 28rpx; | |
| 152 | + .steps /deep/ .u-steps-item { | |
| 153 | + padding-bottom: 40rpx; | |
| 154 | + | |
| 155 | + .u-steps-item__content { | |
| 156 | + .u-text { | |
| 157 | + | |
| 158 | + .u-text__value { | |
| 159 | + font-size: 28rpx !important; | |
| 160 | + } | |
| 161 | + | |
| 162 | + .u-text__value--content { | |
| 163 | + | |
| 164 | + color: #202131 !important; | |
| 165 | + } | |
| 166 | + | |
| 167 | + .u-text__value--tips { | |
| 168 | + color: #909097 !important; | |
| 169 | + } | |
| 170 | + } | |
| 171 | + } | |
| 64 | 172 | } |
| 173 | + | |
| 65 | 174 | } |
| 66 | 175 | </style> | ... | ... |
| ... | ... | @@ -91,9 +91,6 @@ |
| 91 | 91 | }, |
| 92 | 92 | |
| 93 | 93 | computed: { |
| 94 | - ...mapGetters([ | |
| 95 | - 'doneRoles', | |
| 96 | - ]), | |
| 97 | 94 | ...mapState({ |
| 98 | 95 | hasLogin: 'hasLogin', |
| 99 | 96 | vuex_user: 'vuex_user', |
| ... | ... | @@ -173,7 +170,15 @@ |
| 173 | 170 | }); |
| 174 | 171 | |
| 175 | 172 | this.total = result.total; |
| 176 | - this.list = this.list.concat(result.records) | |
| 173 | + this.list = this.list.concat(result.records) | |
| 174 | + | |
| 175 | + // 判断是否全部加载完成 | |
| 176 | + if (this.total == this.list.length) { | |
| 177 | + this.finished = true; | |
| 178 | + this.loading = 'nomore'; | |
| 179 | + } else { | |
| 180 | + this.loading = 'loadmore'; | |
| 181 | + } | |
| 177 | 182 | }, |
| 178 | 183 | |
| 179 | 184 | handelDetail(record) { | ... | ... |
| 1 | +<template> | |
| 2 | + <view class="registration_review"> | |
| 3 | + | |
| 4 | + <u-sticky bgColor="#fff"> | |
| 5 | + <u-tabs :list="tabs" :scrollable="false" lineWidth="30rpx" lineHeight="4rpx" lineColor="#06B079" | |
| 6 | + :inactiveStyle="{fontSize:'28rpx', color:'#4A4A53'}" :activeStyle="{fontSize:'36rpx', color:'#06B079'}" | |
| 7 | + @change="handelTab" :current="current"> | |
| 8 | + </u-tabs> | |
| 9 | + </u-sticky> | |
| 10 | + | |
| 11 | + <view class="list_box" v-if="list.length > 0"> | |
| 12 | + <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> | |
| 13 | + | |
| 14 | + <view class="bg_image" v-if="item.status == 'unread'"> | |
| 15 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | |
| 16 | + <text>未阅</text> | |
| 17 | + </view> | |
| 18 | + | |
| 19 | + <view class="bg_image" v-else> | |
| 20 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | |
| 21 | + <text>已阅</text> | |
| 22 | + </view> | |
| 23 | + | |
| 24 | + <view class="info"> | |
| 25 | + <view class="avatar">{{getNameLastTwo(item.studentName)}}</view> | |
| 26 | + <view class="form_name"> | |
| 27 | + <view class="name">{{overflowHide(item.title, 10)}}</view> | |
| 28 | + <view class="week"> | |
| 29 | + <!-- <text>{{timeFormat(item.logTime, 'yyyy年')}}</text> --> | |
| 30 | + <!-- <text>{{getWeek(item.logTime)}}</text> --> | |
| 31 | + <text>{{getCreatedTime(item)}}</text> | |
| 32 | + | |
| 33 | + </view> | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + <view class="u-content"> | |
| 37 | + <u-parse :content="item.content"></u-parse> | |
| 38 | + </view> | |
| 39 | + <view class="name_time"> | |
| 40 | + <view class="name"> | |
| 41 | + <text>学生姓名</text> | |
| 42 | + <text>{{item.studentName}}</text> | |
| 43 | + </view> | |
| 44 | + <view class="time">{{timeFormat(item.createdTime)}}</view> | |
| 45 | + </view> | |
| 46 | + | |
| 47 | + </view> | |
| 48 | + <c-loading :loading="loading"></c-loading> | |
| 49 | + </view> | |
| 50 | + <view v-else class="no_data"> | |
| 51 | + <c-no-data></c-no-data> | |
| 52 | + </view> | |
| 53 | + | |
| 54 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 55 | + <view class="popup_search"> | |
| 56 | + <view class="content"> | |
| 57 | + <view class="title">按项目筛选</view> | |
| 58 | + <scroll-view class="scroll" scroll-y="true"> | |
| 59 | + <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> | |
| 60 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 61 | + <text>{{item.name}}</text> | |
| 62 | + </view> | |
| 63 | + <view v-else> | |
| 64 | + <text>{{item.name}}</text> | |
| 65 | + </view> | |
| 66 | + </view> | |
| 67 | + </scroll-view> | |
| 68 | + <view class="switch"> | |
| 69 | + <text>未阅</text> | |
| 70 | + <u-switch v-model="switchValue" size="48" activeColor="#06B079" @change="handelChange"> | |
| 71 | + </u-switch> | |
| 72 | + </view> | |
| 73 | + </view> | |
| 74 | + | |
| 75 | + <view class="footer"> | |
| 76 | + <view class="left_btn"> | |
| 77 | + <c-button type="cancel" text="重置" @click="handelCancel"> | |
| 78 | + </c-button> | |
| 79 | + </view> | |
| 80 | + <view class="right_btn"> | |
| 81 | + <c-button type="confirm" text="确定" @click="hancelSubmit"> | |
| 82 | + </c-button> | |
| 83 | + </view> | |
| 84 | + </view> | |
| 85 | + </view> | |
| 86 | + </u-popup> | |
| 87 | + </view> | |
| 88 | +</template> | |
| 89 | + | |
| 90 | +<script> | |
| 91 | + import { | |
| 92 | + mapGetters, | |
| 93 | + mapState, | |
| 94 | + mapActions | |
| 95 | + } from 'vuex' | |
| 96 | + import listMixin from "@/common/mixins/list-mixin.js"; | |
| 97 | + | |
| 98 | + import { | |
| 99 | + getLogReviewListApi, | |
| 100 | + getProjectListApi, | |
| 101 | + } from '@/config/api.js'; | |
| 102 | + | |
| 103 | + export default { | |
| 104 | + mixins: [listMixin], | |
| 105 | + data() { | |
| 106 | + return { | |
| 107 | + studentId: '', | |
| 108 | + formId: '', | |
| 109 | + checkboxValue: [], | |
| 110 | + checkboxList: [{ | |
| 111 | + name: '未阅', | |
| 112 | + disabled: false | |
| 113 | + }], | |
| 114 | + keyword: '', | |
| 115 | + search: { | |
| 116 | + //搜索对象必须为key search的对象 | |
| 117 | + keySearch: "", | |
| 118 | + status: '', | |
| 119 | + category: 'daily', | |
| 120 | + | |
| 121 | + }, | |
| 122 | + show: false, //筛选 | |
| 123 | + current: 0, | |
| 124 | + tabs: [{ | |
| 125 | + name: '日志', | |
| 126 | + }, { | |
| 127 | + name: '周志', | |
| 128 | + }, { | |
| 129 | + name: '月志' | |
| 130 | + }], | |
| 131 | + | |
| 132 | + list: [], //列表必须为key list的数组 | |
| 133 | + | |
| 134 | + projectId: '', | |
| 135 | + showTime: false, | |
| 136 | + timeValue: '', | |
| 137 | + switchValue: false, | |
| 138 | + | |
| 139 | + } | |
| 140 | + }, | |
| 141 | + | |
| 142 | + onLoad(option) { | |
| 143 | + console.log(option) | |
| 144 | + this.studentId = option.studentId; | |
| 145 | + this.projectId = option.projectId; | |
| 146 | + this.formId = option.formId; | |
| 147 | + | |
| 148 | + this.$store.dispatch(`home/getProjectList`, { | |
| 149 | + pageSize: -1, | |
| 150 | + }) | |
| 151 | + | |
| 152 | + this.search.keySearch = ''; | |
| 153 | + | |
| 154 | + if (option && option.category) { | |
| 155 | + this.search.category = option.category; | |
| 156 | + this.current = | |
| 157 | + option.category == 'daily' ? 0 : | |
| 158 | + option.category == 'weekly' ? 1 : | |
| 159 | + option.category == 'monthly' ? 2 : | |
| 160 | + ''; | |
| 161 | + } | |
| 162 | + | |
| 163 | + if (option && option.status) { | |
| 164 | + this.search.status = 'unread'; | |
| 165 | + this.checkboxValue = ['未阅']; | |
| 166 | + this.switchValue = true; | |
| 167 | + } | |
| 168 | + | |
| 169 | + this.finished = false; | |
| 170 | + this.loading = "loadmore"; | |
| 171 | + this.page = 0; | |
| 172 | + this.list = []; | |
| 173 | + this._getList(); | |
| 174 | + }, | |
| 175 | + | |
| 176 | + onShow() { | |
| 177 | + | |
| 178 | + }, | |
| 179 | + | |
| 180 | + computed: { | |
| 181 | + ...mapState('home', { | |
| 182 | + // 箭头函数可使代码更简练 | |
| 183 | + projectList: 'projectList', | |
| 184 | + }), | |
| 185 | + }, | |
| 186 | + | |
| 187 | + methods: { | |
| 188 | + | |
| 189 | + getCreatedTime(e) { | |
| 190 | + let time = this.$u.timeFormat(e.logTime / 1000, 'yyyy/mm/dd'); | |
| 191 | + if (e.category == "weekly") { | |
| 192 | + time = new Date(e.logTime).getFullYear() + "年第" + (this.getWeek(e.logTime) + 1) + "周"; | |
| 193 | + } else if (e.category == "monthly") { | |
| 194 | + time = this.$u.timeFormat(e.logTime / 1000, 'yyyy年mm月'); | |
| 195 | + } | |
| 196 | + return time | |
| 197 | + }, | |
| 198 | + | |
| 199 | + getWeek(dt) { | |
| 200 | + if (dt > 0) { | |
| 201 | + let d1 = new Date(dt); | |
| 202 | + let d2 = new Date(dt); | |
| 203 | + d2.setMonth(0); | |
| 204 | + d2.setDate(1); | |
| 205 | + let rq = d1 - d2; | |
| 206 | + let days = Math.ceil(rq / (24 * 60 * 60 * 1000)); | |
| 207 | + let num = Math.ceil(days / 7); | |
| 208 | + return num; | |
| 209 | + } else { | |
| 210 | + return ''; | |
| 211 | + } | |
| 212 | + }, | |
| 213 | + | |
| 214 | + getNameLastTwo(value) { | |
| 215 | + if (value && value.length > 3) { | |
| 216 | + return value.substring(value.length - 3) | |
| 217 | + } else { | |
| 218 | + return value; | |
| 219 | + } | |
| 220 | + }, | |
| 221 | + | |
| 222 | + overflowHide(value, num = 4) { | |
| 223 | + if (value && value.length > num) { | |
| 224 | + return `${value.slice(0, num)}...` | |
| 225 | + } else { | |
| 226 | + return value; | |
| 227 | + } | |
| 228 | + }, | |
| 229 | + | |
| 230 | + handelTab(item) { | |
| 231 | + let category = item.index === 0 ? 'daily' : item.index === 1 ? 'weekly' : item.index === 2 ? 'monthly' : | |
| 232 | + ''; | |
| 233 | + | |
| 234 | + this.search.category = category; | |
| 235 | + | |
| 236 | + this.finished = false; | |
| 237 | + this.loading = "loadmore"; | |
| 238 | + this.page = 0; | |
| 239 | + this.list = []; | |
| 240 | + this._getList(); | |
| 241 | + | |
| 242 | + }, | |
| 243 | + | |
| 244 | + handelDetail(record) { | |
| 245 | + this.$u.route({ | |
| 246 | + url: `pages/main/home/logDetail/logDetail?id=${record.id}&formId=${record.formId}` | |
| 247 | + }) | |
| 248 | + }, | |
| 249 | + | |
| 250 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | |
| 251 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | |
| 252 | + }, | |
| 253 | + | |
| 254 | + checkboxChange(n) { | |
| 255 | + console.log('change', n); | |
| 256 | + | |
| 257 | + this.search.status = n.length > 0 ? 'unread' : ''; | |
| 258 | + | |
| 259 | + this.switchValue = n.length > 0 ? true : false; | |
| 260 | + | |
| 261 | + this.finished = false; | |
| 262 | + this.loading = "loadmore"; | |
| 263 | + this.page = 0; | |
| 264 | + this.list = []; | |
| 265 | + this._getList(); | |
| 266 | + }, | |
| 267 | + | |
| 268 | + handelSearch(value) { | |
| 269 | + this.finished = false; | |
| 270 | + this.loading = "loadmore"; | |
| 271 | + this.page = 0; | |
| 272 | + this.list = []; | |
| 273 | + this._getList(); | |
| 274 | + }, | |
| 275 | + | |
| 276 | + open() { | |
| 277 | + | |
| 278 | + }, | |
| 279 | + | |
| 280 | + close() { | |
| 281 | + this.show = false | |
| 282 | + }, | |
| 283 | + | |
| 284 | + // scroll-view到底部加载更多 | |
| 285 | + onreachBottom() {}, | |
| 286 | + // 搜索 | |
| 287 | + searchSubmit() { | |
| 288 | + // 调用混合搜索 | |
| 289 | + this._searchData(); | |
| 290 | + }, | |
| 291 | + // 模拟后端分页 | |
| 292 | + async getData(requestParams) { | |
| 293 | + const { | |
| 294 | + search = {} | |
| 295 | + } = requestParams; | |
| 296 | + | |
| 297 | + let params = {}; | |
| 298 | + params.pageNumber = requestParams.page + 1; | |
| 299 | + params.pageSize = 5; | |
| 300 | + | |
| 301 | + if (search.status) { | |
| 302 | + params.status = search.status; | |
| 303 | + } | |
| 304 | + | |
| 305 | + if (search.category) { | |
| 306 | + params.category = search.category; | |
| 307 | + } | |
| 308 | + | |
| 309 | + if (this.keyword) { | |
| 310 | + params.keySearch = this.keyword | |
| 311 | + } | |
| 312 | + | |
| 313 | + if (this.studentId) { | |
| 314 | + params.studentId = this.studentId | |
| 315 | + } | |
| 316 | + | |
| 317 | + if (this.projectId) { | |
| 318 | + params.projectId = this.projectId | |
| 319 | + } | |
| 320 | + | |
| 321 | + if (this.formId) { | |
| 322 | + params.formId = this.formId | |
| 323 | + } | |
| 324 | + | |
| 325 | + return await getLogReviewListApi(params); | |
| 326 | + }, | |
| 327 | + // 数据请求(没错就是这么少的代码) | |
| 328 | + async _getList() { | |
| 329 | + if (this.page == 0) { | |
| 330 | + this.list = []; | |
| 331 | + } | |
| 332 | + | |
| 333 | + // 根据实际情况修改自己修改key | |
| 334 | + let result = await this.getData({ | |
| 335 | + page: this.page, // 传入页码 | |
| 336 | + size: this.size, // 传入每页条数 | |
| 337 | + search: this.search, // 传入搜索的对象 | |
| 338 | + }); | |
| 339 | + | |
| 340 | + this.total = result.total; | |
| 341 | + | |
| 342 | + if (this.list.length == 0 && result.records.length == 0) { | |
| 343 | + this.shownoData = false | |
| 344 | + } else { | |
| 345 | + this.shownoData = true | |
| 346 | + } | |
| 347 | + | |
| 348 | + this.list = this.list.concat(result.records) | |
| 349 | + | |
| 350 | + // 判断是否全部加载完成 | |
| 351 | + if (this.total == this.list.length) { | |
| 352 | + this.finished = true; | |
| 353 | + this.loading = 'nomore'; | |
| 354 | + } else { | |
| 355 | + this.loading = 'loadmore'; | |
| 356 | + } | |
| 357 | + }, | |
| 358 | + | |
| 359 | + handelClick(values) { | |
| 360 | + this.projectId = values.id; | |
| 361 | + }, | |
| 362 | + | |
| 363 | + handelChange(e) { | |
| 364 | + this.checkboxValue = e ? ['未阅'] : []; | |
| 365 | + this.search.status = e ? 'unread' : ''; | |
| 366 | + | |
| 367 | + }, | |
| 368 | + | |
| 369 | + handelCancel() { | |
| 370 | + this.switchValue = false; | |
| 371 | + this.projectId = ''; | |
| 372 | + }, | |
| 373 | + | |
| 374 | + hancelSubmit() { | |
| 375 | + this.finished = false; | |
| 376 | + this.loading = "loadmore"; | |
| 377 | + this.page = 0; | |
| 378 | + this.list = []; | |
| 379 | + this._getList(); | |
| 380 | + | |
| 381 | + this.show = false; | |
| 382 | + }, | |
| 383 | + | |
| 384 | + } | |
| 385 | + } | |
| 386 | +</script> | |
| 387 | + | |
| 388 | +<style lang="scss" scoped> | |
| 389 | + .registration_review { | |
| 390 | + width: 100%; | |
| 391 | + min-height: 100%; | |
| 392 | + height: auto; | |
| 393 | + background-color: #F7F7F7; | |
| 394 | + | |
| 395 | + .search_box { | |
| 396 | + padding: 36rpx 30rpx 12rpx; | |
| 397 | + background-color: #FFFFFF; | |
| 398 | + display: flex; | |
| 399 | + flex-flow: row nowrap; | |
| 400 | + justify-content: space-between; | |
| 401 | + | |
| 402 | + .check { | |
| 403 | + padding: 20rpx 0 0 0; | |
| 404 | + } | |
| 405 | + | |
| 406 | + .search { | |
| 407 | + width: 468rpx; | |
| 408 | + } | |
| 409 | + } | |
| 410 | + | |
| 411 | + .list_box { | |
| 412 | + padding: 0 0 50rpx 0; | |
| 413 | + | |
| 414 | + .item { | |
| 415 | + position: relative; | |
| 416 | + width: 630rpx; | |
| 417 | + margin: 30rpx auto; | |
| 418 | + padding: 30rpx; | |
| 419 | + border-radius: 12rpx; | |
| 420 | + background-color: #FFFFFF; | |
| 421 | + | |
| 422 | + .bg_image { | |
| 423 | + position: absolute; | |
| 424 | + top: 0; | |
| 425 | + right: 0; | |
| 426 | + | |
| 427 | + text { | |
| 428 | + position: absolute; | |
| 429 | + top: 12rpx; | |
| 430 | + right: 30rpx; | |
| 431 | + font-size: 24rpx; | |
| 432 | + line-height: 24rpx; | |
| 433 | + color: #FFFFFF; | |
| 434 | + } | |
| 435 | + } | |
| 436 | + | |
| 437 | + .info { | |
| 438 | + display: flex; | |
| 439 | + flex-flow: row nowrap; | |
| 440 | + align-items: center; | |
| 441 | + margin: 0 0 30rpx 0; | |
| 442 | + | |
| 443 | + .avatar { | |
| 444 | + width: 94rpx; | |
| 445 | + height: 94rpx; | |
| 446 | + border-radius: 4rpx; | |
| 447 | + background-color: #06B079; | |
| 448 | + font-size: 24rpx; | |
| 449 | + line-height: 94rpx; | |
| 450 | + color: #FFFFFF; | |
| 451 | + text-align: center; | |
| 452 | + } | |
| 453 | + | |
| 454 | + .form_name { | |
| 455 | + .name { | |
| 456 | + font-size: 32rpx; | |
| 457 | + line-height: 44rpx; | |
| 458 | + color: #202131; | |
| 459 | + font-weight: 500; | |
| 460 | + margin: 0 20rpx; | |
| 461 | + } | |
| 462 | + | |
| 463 | + .week { | |
| 464 | + padding: 8rpx 0 0 0; | |
| 465 | + font-size: 20rpx; | |
| 466 | + line-height: 32rpx; | |
| 467 | + color: #909097; | |
| 468 | + | |
| 469 | + // padding: 0 0 0 20rpx; | |
| 470 | + text { | |
| 471 | + padding: 8rpx 0 0 20rpx; | |
| 472 | + } | |
| 473 | + } | |
| 474 | + } | |
| 475 | + } | |
| 476 | + | |
| 477 | + .u-content { | |
| 478 | + font-size: 24rpx; | |
| 479 | + line-height: 32rpx; | |
| 480 | + color: #909097; | |
| 481 | + margin: 32rpx 0 30rpx 0; | |
| 482 | + } | |
| 483 | + | |
| 484 | + .name_time { | |
| 485 | + border-top: 2rpx solid #E2E2E8; | |
| 486 | + padding: 28rpx 0 0 0; | |
| 487 | + display: flex; | |
| 488 | + flex-flow: row nowrap; | |
| 489 | + justify-content: space-between; | |
| 490 | + | |
| 491 | + | |
| 492 | + .name { | |
| 493 | + text { | |
| 494 | + font-size: 28rpx; | |
| 495 | + line-height: 32rpx; | |
| 496 | + color: #909097; | |
| 497 | + } | |
| 498 | + | |
| 499 | + text:last-child { | |
| 500 | + color: #202131; | |
| 501 | + margin: 0 0 0 30rpx; | |
| 502 | + } | |
| 503 | + } | |
| 504 | + | |
| 505 | + .time { | |
| 506 | + font-size: 28rpx; | |
| 507 | + line-height: 32rpx; | |
| 508 | + color: #909097; | |
| 509 | + } | |
| 510 | + } | |
| 511 | + } | |
| 512 | + } | |
| 513 | + | |
| 514 | + .popup_search { | |
| 515 | + width: 640rpx; | |
| 516 | + position: relative; | |
| 517 | + | |
| 518 | + .content { | |
| 519 | + padding: 0 40rpx; | |
| 520 | + | |
| 521 | + .title { | |
| 522 | + padding: 24rpx 0; | |
| 523 | + font-size: 28rpx; | |
| 524 | + line-height: 36rpx; | |
| 525 | + color: #202131; | |
| 526 | + } | |
| 527 | + | |
| 528 | + .scroll { | |
| 529 | + max-height: 60vh; | |
| 530 | + | |
| 531 | + .item { | |
| 532 | + | |
| 533 | + view { | |
| 534 | + display: flex; | |
| 535 | + flex-flow: row wrap; | |
| 536 | + align-items: center; | |
| 537 | + width: 500rpx; | |
| 538 | + height: 74rpx; | |
| 539 | + border-radius: 4rpx; | |
| 540 | + border: 2rpx solid #C1C1C9; | |
| 541 | + margin: 0 10rpx 20rpx; | |
| 542 | + font-size: 24rpx; | |
| 543 | + line-height: 32rpx; | |
| 544 | + color: #C0C0C9; | |
| 545 | + padding: 16rpx 20rpx; | |
| 546 | + } | |
| 547 | + | |
| 548 | + .selectItem { | |
| 549 | + background-color: #06B079; | |
| 550 | + color: #FFFFFF; | |
| 551 | + border: 2rpx solid #06B079; | |
| 552 | + } | |
| 553 | + } | |
| 554 | + } | |
| 555 | + | |
| 556 | + .time { | |
| 557 | + padding: 40rpx 0 0 0; | |
| 558 | + } | |
| 559 | + | |
| 560 | + .switch { | |
| 561 | + display: flex; | |
| 562 | + flex-flow: row nowrap; | |
| 563 | + justify-content: space-between; | |
| 564 | + padding: 40rpx 0 0 0; | |
| 565 | + | |
| 566 | + text { | |
| 567 | + font-size: 28rpx; | |
| 568 | + line-height: 36rpx; | |
| 569 | + color: #202131; | |
| 570 | + } | |
| 571 | + } | |
| 572 | + | |
| 573 | + | |
| 574 | + } | |
| 575 | + | |
| 576 | + .footer { | |
| 577 | + width: 560rpx; | |
| 578 | + height: 96rpx; | |
| 579 | + padding: 28rpx 40rpx; | |
| 580 | + background: #FFFFFF; | |
| 581 | + position: fixed; | |
| 582 | + bottom: 0; | |
| 583 | + right: 0; | |
| 584 | + z-index: 99; | |
| 585 | + border-top: 2rpx solid #E2E2E8; | |
| 586 | + | |
| 587 | + view { | |
| 588 | + display: inline-block; | |
| 589 | + } | |
| 590 | + | |
| 591 | + .left_btn { | |
| 592 | + width: 194rpx; | |
| 593 | + margin: 0 20rpx 0 0; | |
| 594 | + } | |
| 595 | + | |
| 596 | + .right_btn { | |
| 597 | + width: 346rpx; | |
| 598 | + } | |
| 599 | + } | |
| 600 | + } | |
| 601 | + } | |
| 602 | +</style> | ... | ... |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | </u-tabs> |
| 25 | 25 | </view> |
| 26 | 26 | <view class="u-icon" v-if="current == 0"> |
| 27 | - <u-icon slot="icon" size="32" :name="'/static/img/home/筛选icon@2x.png'" @click="show = true"></u-icon> | |
| 27 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | |
| 28 | 28 | </view> |
| 29 | 29 | </view> |
| 30 | 30 | |
| ... | ... | @@ -86,11 +86,11 @@ |
| 86 | 86 | |
| 87 | 87 | <view class="company_box"> |
| 88 | 88 | <view class="company"> |
| 89 | - <u-icon size="32rpx" name="/static/img/home/实习单位icon@2x.png"></u-icon> | |
| 89 | + <u-icon size="32rpx" name="/static/img/home/internshipUnitIcon.png"></u-icon> | |
| 90 | 90 | <text>{{item.companyName}}</text> |
| 91 | 91 | </view> |
| 92 | 92 | <view class="address"> |
| 93 | - <u-icon size="32rpx" name="/static/img/home/实习单位icon@2x.png"></u-icon> | |
| 93 | + <u-icon size="32rpx" name="/static/img/internship/addressIcon.png"></u-icon> | |
| 94 | 94 | <text>{{item.province}}/{{item.city}}/{{item.district}}</text> |
| 95 | 95 | </view> |
| 96 | 96 | </view> |
| ... | ... | @@ -146,13 +146,18 @@ |
| 146 | 146 | </view> |
| 147 | 147 | <view class="projiect"> |
| 148 | 148 | <text>成绩</text> |
| 149 | - <text>{{ele.level|| ''}}</text> | |
| 149 | + <text>{{ele.level|| '--'}}</text> | |
| 150 | 150 | </view> |
| 151 | 151 | |
| 152 | - <view class="projiect"> | |
| 152 | + <view class="projiect" v-if="ele.credit"> | |
| 153 | 153 | <text>学分</text> |
| 154 | 154 | <text @click="handelDetail(ele, 'credit')" |
| 155 | - :style="{color:'#06B079',textDecoration:'underline'}">{{ele.credit|| '0'}}</text> | |
| 155 | + :style="{color:'#06B079'}">{{ele.credit}}</text> | |
| 156 | + </view> | |
| 157 | + | |
| 158 | + <view class="projiect" v-else> | |
| 159 | + <text>学分</text> | |
| 160 | + <text>{{'--'}}</text> | |
| 156 | 161 | </view> |
| 157 | 162 | </view> |
| 158 | 163 | </view> |
| ... | ... | @@ -161,13 +166,13 @@ |
| 161 | 166 | |
| 162 | 167 | </view> |
| 163 | 168 | |
| 164 | - <u-popup :show="show" mode="right" @close="close" @open="open"> | |
| 169 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | |
| 165 | 170 | <view class="popup_search"> |
| 166 | 171 | <view class="content"> |
| 167 | 172 | <view class="title">按项目筛选</view> |
| 168 | 173 | <scroll-view class="scroll" scroll-y="true"> |
| 169 | 174 | <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> |
| 170 | - <view :style="{backgroundColor: '#06B079',color: '#FFFFFF'}" v-if="item.id == projectId"> | |
| 175 | + <view class="selectItem" v-if="item.id == projectId"> | |
| 171 | 176 | <text>{{item.name}}</text> |
| 172 | 177 | </view> |
| 173 | 178 | <view v-else> |
| ... | ... | @@ -302,6 +307,10 @@ |
| 302 | 307 | switch (type) { |
| 303 | 308 | |
| 304 | 309 | case 'signin': |
| 310 | + if(!this.projectId) { | |
| 311 | + this.$u.toast('请先选择实习项目'); | |
| 312 | + return; | |
| 313 | + } | |
| 305 | 314 | this.$u.route({ |
| 306 | 315 | url: `pages/main/internship/signInList/signInList?studentId=${this.detail.studentId}&projectId=${this.projectId}` |
| 307 | 316 | }) |
| ... | ... | @@ -315,19 +324,19 @@ |
| 315 | 324 | |
| 316 | 325 | case 'daily': |
| 317 | 326 | this.$u.route({ |
| 318 | - url: `pages/main/home/logReview/logReview?cagegory=daily` | |
| 327 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=daily&studentId=${this.detail.studentId}&projectId=${this.projectId}` | |
| 319 | 328 | }) |
| 320 | 329 | break; |
| 321 | 330 | |
| 322 | 331 | case 'weekly': |
| 323 | 332 | this.$u.route({ |
| 324 | - url: `pages/main/home/logReview/logReview?cagegory=weekly` | |
| 333 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=weekly&studentId=${this.detail.studentId}&projectId=${this.projectId}` | |
| 325 | 334 | }) |
| 326 | 335 | break; |
| 327 | 336 | |
| 328 | 337 | case 'monthly': |
| 329 | 338 | this.$u.route({ |
| 330 | - url: `pages/main/home/logReview/logReview?cagegory=monthly` | |
| 339 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=monthly&studentId=${this.detail.studentId}&projectId=${this.projectId}` | |
| 331 | 340 | }) |
| 332 | 341 | break; |
| 333 | 342 | |
| ... | ... | @@ -365,7 +374,8 @@ |
| 365 | 374 | projectId: this.projectId, |
| 366 | 375 | }).then(data => { |
| 367 | 376 | if (data) { |
| 368 | - this.detail = data | |
| 377 | + this.detail = data; | |
| 378 | + this.show = false | |
| 369 | 379 | } |
| 370 | 380 | }) |
| 371 | 381 | }, |
| ... | ... | @@ -422,20 +432,28 @@ |
| 422 | 432 | this.shownoData = true |
| 423 | 433 | } |
| 424 | 434 | |
| 425 | - this.list = this.list.concat(result) | |
| 435 | + this.list = this.list.concat(result) | |
| 436 | + | |
| 437 | + // 判断是否全部加载完成 | |
| 438 | + if (this.total == this.list.length) { | |
| 439 | + this.finished = true; | |
| 440 | + this.loading = 'nomore'; | |
| 441 | + } else { | |
| 442 | + this.loading = 'loadmore'; | |
| 443 | + } | |
| 426 | 444 | }, |
| 427 | 445 | |
| 428 | 446 | handelDetail(record, type) { |
| 429 | 447 | switch (type) { |
| 430 | 448 | case 'internship': |
| 431 | 449 | this.$u.route({ |
| 432 | - url: `pages/main/internship/intershipInfo/intershipInfo?id=${this.detail.id}` | |
| 450 | + url: `pages/main/internship/intershipInfo/intershipInfo?id=${record.formId}` | |
| 433 | 451 | }) |
| 434 | 452 | break; |
| 435 | 453 | |
| 436 | 454 | case 'credit': |
| 437 | 455 | this.$u.route({ |
| 438 | - url: `pages/main/internship/achievementDetail/achievementDetail?id=${this.detail.id}` | |
| 456 | + url: `pages/main/internship/achievementDetail/achievementDetail?id=${record.formId}` | |
| 439 | 457 | }) |
| 440 | 458 | break; |
| 441 | 459 | } |
| ... | ... | @@ -507,7 +525,8 @@ |
| 507 | 525 | margin: 0 0 24rpx 0; |
| 508 | 526 | display: flex; |
| 509 | 527 | flex-flow: row nowrap; |
| 510 | - justify-content: space-between; | |
| 528 | + justify-content: space-between; | |
| 529 | + margin: 0 0 50rpx 0; | |
| 511 | 530 | |
| 512 | 531 | text { |
| 513 | 532 | display: inline-block; |
| ... | ... | @@ -515,7 +534,7 @@ |
| 515 | 534 | text-align: justify; |
| 516 | 535 | text-align-last: justify; |
| 517 | 536 | font-size: 28rpx; |
| 518 | - line-height: 48rpx; | |
| 537 | + line-height: 32rpx; | |
| 519 | 538 | color: #909097; |
| 520 | 539 | vertical-align: top; |
| 521 | 540 | } |
| ... | ... | @@ -528,7 +547,7 @@ |
| 528 | 547 | display: inline-block; |
| 529 | 548 | width: auto; |
| 530 | 549 | font-size: 28rpx; |
| 531 | - line-height: 48rpx; | |
| 550 | + line-height: 32rpx; | |
| 532 | 551 | color: #202131; |
| 533 | 552 | margin: 0 0 0 78rpx; |
| 534 | 553 | } |
| ... | ... | @@ -580,7 +599,6 @@ |
| 580 | 599 | font-size: 28rpx; |
| 581 | 600 | line-height: 32rpx; |
| 582 | 601 | color: #909097; |
| 583 | - margin: 0 0 0 16rpx; | |
| 584 | 602 | } |
| 585 | 603 | |
| 586 | 604 | text:last-child { |
| ... | ... | @@ -731,31 +749,32 @@ |
| 731 | 749 | color: #202131; |
| 732 | 750 | } |
| 733 | 751 | |
| 734 | - .scroll { | |
| 735 | - max-height: 60vh; | |
| 736 | - | |
| 737 | - .item { | |
| 738 | - width: 540rpx; | |
| 739 | - height: 96rpx; | |
| 740 | - border-radius: 4rpx; | |
| 741 | - border: 2rpx solid #C1C1C9; | |
| 742 | - margin: 0 10rpx 20rpx; | |
| 743 | - font-size: 24rpx; | |
| 744 | - line-height: 32rpx; | |
| 745 | - color: #C0C0C9; | |
| 746 | - display: flex; | |
| 747 | - flex-flow: row wrap; | |
| 748 | - align-items: center; | |
| 749 | - | |
| 750 | - text { | |
| 751 | - display: inline-block; | |
| 752 | - width: 500rpx; | |
| 753 | - height: 64rpx; | |
| 754 | - padding: 16rpx 20rpx; | |
| 755 | - } | |
| 756 | - | |
| 757 | - | |
| 758 | - } | |
| 752 | + .scroll { | |
| 753 | + max-height: 60vh; | |
| 754 | + | |
| 755 | + .item { | |
| 756 | + | |
| 757 | + view { | |
| 758 | + display: flex; | |
| 759 | + flex-flow: row wrap; | |
| 760 | + align-items: center; | |
| 761 | + width: 500rpx; | |
| 762 | + height: 74rpx; | |
| 763 | + border-radius: 4rpx; | |
| 764 | + border: 2rpx solid #C1C1C9; | |
| 765 | + margin: 0 10rpx 20rpx; | |
| 766 | + font-size: 24rpx; | |
| 767 | + line-height: 32rpx; | |
| 768 | + color: #C0C0C9; | |
| 769 | + padding: 16rpx 20rpx; | |
| 770 | + } | |
| 771 | + | |
| 772 | + .selectItem { | |
| 773 | + background-color: #06B079; | |
| 774 | + color: #FFFFFF; | |
| 775 | + border: 2rpx solid #06B079; | |
| 776 | + } | |
| 777 | + } | |
| 759 | 778 | } |
| 760 | 779 | |
| 761 | 780 | .time { | ... | ... |
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | </view> |
| 13 | 13 | <view class="form input_warp"> |
| 14 | 14 | |
| 15 | - <u-form labelPosition="left" :model="form" :rules="rules" :error-type="errorType" ref="uForm"> | |
| 15 | + <u-form labelPosition="left" :model="form" :rules="rules" :errorType="errorType" ref="uForm"> | |
| 16 | 16 | <u-form-item label="新账号名" labelWidth="150rpx" prop="username" borderBottom> |
| 17 | 17 | <u-input v-model="form.username" @input="handleInput" border="none" :placeholderStyle="{color: 'C1C1C9'}" placeholder="请输入新的账号名"> |
| 18 | 18 | </u-input> |
| ... | ... | @@ -42,7 +42,7 @@ |
| 42 | 42 | data() { |
| 43 | 43 | |
| 44 | 44 | return { |
| 45 | - errorType: ['toast'], | |
| 45 | + errorType: 'toast', | |
| 46 | 46 | disabled: true, |
| 47 | 47 | form: { |
| 48 | 48 | username: '', |
| ... | ... | @@ -90,7 +90,6 @@ |
| 90 | 90 | methods: { |
| 91 | 91 | |
| 92 | 92 | handleInput(value) { |
| 93 | - console.log(value) | |
| 94 | 93 | if (value) { |
| 95 | 94 | this.disabled = false; |
| 96 | 95 | } else { |
| ... | ... | @@ -102,7 +101,7 @@ |
| 102 | 101 | console.log(this.form) |
| 103 | 102 | |
| 104 | 103 | this.$refs.uForm.validate().then(res => { |
| 105 | - uni.$u.toast('校验通过'); | |
| 104 | + // uni.$u.toast('校验通过'); | |
| 106 | 105 | |
| 107 | 106 | updateUserInfoApi({ |
| 108 | 107 | ...this.form, |
| ... | ... | @@ -117,7 +116,6 @@ |
| 117 | 116 | |
| 118 | 117 | }).catch(errors => { |
| 119 | 118 | console.log(errors) |
| 120 | - uni.$u.toast('校验失败') | |
| 121 | 119 | }) |
| 122 | 120 | |
| 123 | 121 | }, | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="edit-mobile"> |
| 3 | 3 | <view class="form input_warp"> |
| 4 | - <u-form labelPosition="left" :model="form" :rules="rules" :error-type="errorType" ref="uForm"> | |
| 4 | + <u-form labelPosition="left" :model="form" :rules="rules" :errorType="errorType" ref="uForm"> | |
| 5 | 5 | <u-form-item label="新手机号" labelWidth="150rpx" borderBottom prop="phone"> |
| 6 | 6 | <u-input v-model="form.phone" @input="handleInput" border="none" |
| 7 | 7 | :placeholderStyle="{color: 'C1C1C9'}" placeholder="请输入手机号码" /> |
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | export default { |
| 37 | 37 | data() { |
| 38 | 38 | return { |
| 39 | - errorType: ['toast'], | |
| 39 | + errorType: 'toast', | |
| 40 | 40 | disabled: true, |
| 41 | 41 | codeText: '发送验证码', |
| 42 | 42 | form: { |
| ... | ... | @@ -155,7 +155,6 @@ |
| 155 | 155 | |
| 156 | 156 | }).catch(errors => { |
| 157 | 157 | console.log(errors) |
| 158 | - uni.$u.toast('校验失败') | |
| 159 | 158 | }) |
| 160 | 159 | } |
| 161 | 160 | } | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="edit-password"> |
| 3 | 3 | <view class="form input_warp"> |
| 4 | - <u-form labelPosition="left" :model="form" :rules="rules" :error-type="errorType" ref="uForm"> | |
| 4 | + <u-form labelPosition="left" :model="form" :rules="rules" :errorType="errorType" ref="uForm"> | |
| 5 | 5 | |
| 6 | 6 | <u-form-item label="密码" labelWidth="150rpx" borderBottom prop="newPwd"> |
| 7 | 7 | <u-input v-model="form.newPwd" @input="handleInput" border="none" :placeholderStyle="{color: 'C1C1C9'}" |
| ... | ... | @@ -60,7 +60,7 @@ |
| 60 | 60 | data() { |
| 61 | 61 | |
| 62 | 62 | return { |
| 63 | - errorType: ['toast'], | |
| 63 | + errorType: 'toast', | |
| 64 | 64 | disabled: true, |
| 65 | 65 | form: { |
| 66 | 66 | newPwd: '', |
| ... | ... | @@ -190,7 +190,6 @@ |
| 190 | 190 | |
| 191 | 191 | }).catch(errors => { |
| 192 | 192 | console.log(errors) |
| 193 | - uni.$u.toast('校验失败') | |
| 194 | 193 | }) |
| 195 | 194 | }, |
| 196 | 195 | ... | ... |
| ... | ... | @@ -121,8 +121,6 @@ |
| 121 | 121 | success: (res) => { |
| 122 | 122 | console.log(res); |
| 123 | 123 | |
| 124 | - // this.getUserProfile(); | |
| 125 | - | |
| 126 | 124 | this.$store.dispatch(`user/login`, { |
| 127 | 125 | way: 'wechat_code', |
| 128 | 126 | type: 'teacher', |
| ... | ... | @@ -133,15 +131,6 @@ |
| 133 | 131 | }) |
| 134 | 132 | }, |
| 135 | 133 | |
| 136 | - phoneLogin() { | |
| 137 | - this.$store.dispatch(`user/login`, { | |
| 138 | - way: 'name', | |
| 139 | - type: 'student', | |
| 140 | - username: this.form.mobile, | |
| 141 | - password: this.form.password, | |
| 142 | - }) | |
| 143 | - }, | |
| 144 | - | |
| 145 | 134 | handelMobileLogin() { |
| 146 | 135 | this.$u.route({ |
| 147 | 136 | url: "/pages/main/my/mobileLogin/mobileLogin", |
| ... | ... | @@ -177,8 +166,9 @@ |
| 177 | 166 | text-align: center; |
| 178 | 167 | margin: 48rpx 0 0 0; |
| 179 | 168 | font-size: 15px; |
| 180 | - font-weight: 400; | |
| 181 | - color: rgba(0, 0, 0, 0.65); | |
| 169 | + font-weight: 400; | |
| 170 | + color: #06B079; | |
| 171 | + | |
| 182 | 172 | } |
| 183 | 173 | |
| 184 | 174 | .agreement { | ... | ... |
| ... | ... | @@ -82,7 +82,7 @@ |
| 82 | 82 | export default { |
| 83 | 83 | data() { |
| 84 | 84 | return { |
| 85 | - errorType: ['toast'], | |
| 85 | + errorType: 'toast', | |
| 86 | 86 | isDisable: true, |
| 87 | 87 | checked: [], |
| 88 | 88 | service: "https://yxlypublic.oss-cn-beijing.aliyuncs.com/WeChat/agreement/%E3%80%8A%E4%BC%98%E5%AD%A6%E4%B9%90%E4%B8%9A%E7%94%A8%E6%88%B7%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE%E3%80%8B.htm", | ... | ... |
| 1 | 1 | <template> |
| 2 | 2 | <view class="account_safe"> |
| 3 | + | |
| 4 | + <view class="avatar"> | |
| 5 | + <u-image @click="show = true" width="190rpx" height="190rpx" shape="circle" | |
| 6 | + :src="avatarUrl? `${vuex_ossUrlPubilc}/${avatarUrl}`:wxAvatarUrl" /> | |
| 7 | + </view> | |
| 8 | + | |
| 3 | 9 | <view class="cell top"> |
| 4 | 10 | <u-cell-group> |
| 5 | 11 | <u-cell title="登录账号" :isLink="true" url="/pages/main/my/editAccount/editAccount" arrow-direction="right" |
| ... | ... | @@ -15,7 +21,8 @@ |
| 15 | 21 | <text slot="value" class="u-slot-value">{{getPhone}}</text> |
| 16 | 22 | </u-cell> |
| 17 | 23 | <u-cell title="工号" arrow-direction="right" :rightIconStyle="{fontSize:'26rpx'}" |
| 18 | - :title-style="{color:'#909097', fontSize:'28rpx'}"> | |
| 24 | + :title-style="{color:'#909097', fontSize:'28rpx'}"> | |
| 25 | + <text slot="value" class="u-slot-value">{{jobNumber}}</text> | |
| 19 | 26 | </u-cell> |
| 20 | 27 | <u-cell title="院系专业" arrow-direction="right" :rightIconStyle="{fontSize:'26rpx'}" |
| 21 | 28 | :title-style="{color:'#909097', fontSize:'28rpx'}"> |
| ... | ... | @@ -24,7 +31,7 @@ |
| 24 | 31 | </u-cell-group> |
| 25 | 32 | </view> |
| 26 | 33 | |
| 27 | - | |
| 34 | + <u-action-sheet :actions="list" @select="chooseImg" :show="show"></u-action-sheet> | |
| 28 | 35 | </view> |
| 29 | 36 | </template> |
| 30 | 37 | |
| ... | ... | @@ -33,6 +40,12 @@ |
| 33 | 40 | mapState, |
| 34 | 41 | mapActions |
| 35 | 42 | } from 'vuex' |
| 43 | + | |
| 44 | + import { | |
| 45 | + getOssInitApi, | |
| 46 | + updateAvatarUrlApi, | |
| 47 | + } from '@/config/api.js'; | |
| 48 | + | |
| 36 | 49 | import { |
| 37 | 50 | replaceTextToStar |
| 38 | 51 | } from '@/common/commonUtil.js' |
| ... | ... | @@ -40,16 +53,36 @@ |
| 40 | 53 | export default { |
| 41 | 54 | data() { |
| 42 | 55 | return { |
| 43 | - | |
| 56 | + show: false, | |
| 57 | + list: [{ | |
| 58 | + name: '拍照' | |
| 59 | + }, { | |
| 60 | + name: '从手机相册选择' | |
| 61 | + }], | |
| 62 | + ossInit: {}, | |
| 63 | + picList: [], | |
| 44 | 64 | } |
| 45 | 65 | }, |
| 46 | 66 | |
| 67 | + onLoad() { | |
| 68 | + getOssInitApi({ | |
| 69 | + "uploadFileType": "other" | |
| 70 | + }).then(res => { | |
| 71 | + this.ossInit = res | |
| 72 | + }) | |
| 73 | + }, | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 47 | 77 | computed: { |
| 48 | 78 | ...mapState({ |
| 79 | + wxAvatarUrl: (state) => state.vuex_weixinUserInfo.avatarUrl ? state.vuex_weixinUserInfo.avatarUrl : '', | |
| 80 | + avatarUrl: (state) => state.vuex_user.teacher.avatarUrl ? state.vuex_user.teacher.avatarUrl : '', | |
| 49 | 81 | accountName: (state) => state.vuex_user.username ? state.vuex_user.username : '', |
| 50 | 82 | teacherName: (state) => state.vuex_user.teacher.name ? state.vuex_user.teacher.name : '', |
| 51 | 83 | jobNumber: (state) => state.vuex_user.teacher.number ? state.vuex_user.teacher.number : '', |
| 52 | - departmentName: (state) => state.vuex_user.teacher.departments[0].name ? state.vuex_user.teacher | |
| 84 | + departmentName: (state) => state.vuex_user.teacher.departments && state.vuex_user.teacher.departments | |
| 85 | + .length > 0 && state.vuex_user.teacher.departments[0].name ? state.vuex_user.teacher | |
| 53 | 86 | .departments[0].name : '', |
| 54 | 87 | |
| 55 | 88 | getPhone(state) { |
| ... | ... | @@ -60,7 +93,84 @@ |
| 60 | 93 | }), |
| 61 | 94 | }, |
| 62 | 95 | |
| 63 | - methods: { | |
| 96 | + methods: { | |
| 97 | + | |
| 98 | + ...mapActions('user', { | |
| 99 | + getUserInfo: 'getUserInfo', | |
| 100 | + }), | |
| 101 | + | |
| 102 | + chooseImg(item) { | |
| 103 | + var _this = this | |
| 104 | + console.log(item) | |
| 105 | + if (item.name == '拍照') { //拍照 | |
| 106 | + uni.chooseImage({ | |
| 107 | + count: 1, | |
| 108 | + sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 | |
| 109 | + sourceType: ['camera'], //从相机选择 | |
| 110 | + success: function(res) { | |
| 111 | + console.log("chooseImage...", JSON.stringify(res.tempFilePaths)); | |
| 112 | + _this.picList = res.tempFilePaths | |
| 113 | + _this.uploadImages() | |
| 114 | + } | |
| 115 | + }); | |
| 116 | + } else if (item.name == '从手机相册选择') { //相册 | |
| 117 | + uni.chooseImage({ | |
| 118 | + count: 1, | |
| 119 | + sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 | |
| 120 | + sourceType: ['album'], //从相册选择 | |
| 121 | + success: function(res) { | |
| 122 | + console.log("chooseImage...", JSON.stringify(res.tempFilePaths)); | |
| 123 | + _this.picList = res.tempFilePaths | |
| 124 | + _this.uploadImages() | |
| 125 | + } | |
| 126 | + }); | |
| 127 | + } | |
| 128 | + }, | |
| 129 | + | |
| 130 | + uploadImages() { //上传图片 | |
| 131 | + var _this = this | |
| 132 | + console.log('begin', this.picList) | |
| 133 | + for (var i = 0; i < this.picList.length; i++) { | |
| 134 | + uni.uploadFile({ | |
| 135 | + url: _this.ossInit.host, | |
| 136 | + filePath: _this.picList[i], | |
| 137 | + name: 'file', | |
| 138 | + formData: { | |
| 139 | + 'key': `${_this.ossInit.dir}${new Date().getTime()}/` + '${filename}', | |
| 140 | + 'action': `${_this.ossInit.host}`, | |
| 141 | + 'OSSAccessKeyId': _this.ossInit.accessId, | |
| 142 | + 'policy': _this.ossInit.policy, | |
| 143 | + 'signature': _this.ossInit.signature, | |
| 144 | + 'callback': _this.ossInit.callback, | |
| 145 | + }, | |
| 146 | + success: (uploadFileRes) => { | |
| 147 | + console.log("--", uploadFileRes) | |
| 148 | + | |
| 149 | + let avatarObj = JSON.parse(uploadFileRes.data) | |
| 150 | + _this.avatarUrl = avatarObj.object; | |
| 151 | + | |
| 152 | + updateAvatarUrlApi({ | |
| 153 | + id: this.vuex_user.teacher.id, | |
| 154 | + avatarUrl: avatarObj.object, | |
| 155 | + }).then(data => { | |
| 156 | + if (data) { | |
| 157 | + _this.getUserInfo() | |
| 158 | + } | |
| 159 | + }) | |
| 160 | + | |
| 161 | + }, | |
| 162 | + fail: (error) => { | |
| 163 | + console.log("-error-", error) | |
| 164 | + }, | |
| 165 | + | |
| 166 | + complete: (res) => { | |
| 167 | + this.show = false; | |
| 168 | + } | |
| 169 | + | |
| 170 | + }); | |
| 171 | + } | |
| 172 | + }, | |
| 173 | + | |
| 64 | 174 | link(type) { |
| 65 | 175 | |
| 66 | 176 | switch (type) { |
| ... | ... | @@ -85,6 +195,12 @@ |
| 85 | 195 | background-color: #F7F7F7; |
| 86 | 196 | padding: 20rpx 0 0 0; |
| 87 | 197 | |
| 198 | + .avatar { | |
| 199 | + width: 190rpx; | |
| 200 | + margin: 0 auto; | |
| 201 | + padding: 50rpx 0; | |
| 202 | + } | |
| 203 | + | |
| 88 | 204 | .top { |
| 89 | 205 | margin: 0 0 20rpx 0; |
| 90 | 206 | } | ... | ... |
| ... | ... | @@ -2,7 +2,21 @@ |
| 2 | 2 | <view class="home_box"> |
| 3 | 3 | <view class="home"> |
| 4 | 4 | |
| 5 | - <view class="bar"></view> | |
| 5 | + <view class="school_box" v-if="hasLogin"> | |
| 6 | + <u-image :src="vuex_baseImgUrl+'/schoolBg.png'" width="750rpx" height="496rpx" /> | |
| 7 | + <view class="school" :style="{top:top}"> | |
| 8 | + <u-icon size="32rpx" name="/static/img/home/changeSchool.png" @click="show = true"></u-icon> | |
| 9 | + <text>{{doneSchoolName}}</text> | |
| 10 | + </view> | |
| 11 | + </view> | |
| 12 | + | |
| 13 | + <view class="school_box" v-else> | |
| 14 | + <u-image :src="vuex_baseImgUrl+'/schoolBg.png'" width="750rpx" height="496rpx" /> | |
| 15 | + <view class="school" :style="{top:top}"> | |
| 16 | + <u-icon size="32rpx" name="/static/img/home/changeSchool.png"></u-icon> | |
| 17 | + <text>校职通</text> | |
| 18 | + </view> | |
| 19 | + </view> | |
| 6 | 20 | |
| 7 | 21 | <view class="info" v-if="hasLogin"> |
| 8 | 22 | <u-row justify="space-between" customStyle="margin-bottom: 24rpx"> |
| ... | ... | @@ -12,10 +26,10 @@ |
| 12 | 26 | <text>老师您好!</text> |
| 13 | 27 | </view> |
| 14 | 28 | </u-col> |
| 15 | - <u-col span="3"> | |
| 29 | + <u-col span="3" v-if="doneRolesLength > 1"> | |
| 16 | 30 | <view class="identity" @click="handelChange"> |
| 17 | - <u-icon size="36rpx" :label="doneRoles" labelPos="right" labelSize="24rpx" | |
| 18 | - labelColor="#202131" name="/static/img/home/切换身份@2x.png"></u-icon> | |
| 31 | + <u-icon size="36rpx" :label="doneRolesName" labelPos="right" labelSize="24rpx" | |
| 32 | + labelColor="#202131" name="/static/img/home/changeAuth.png"></u-icon> | |
| 19 | 33 | </view> |
| 20 | 34 | </u-col> |
| 21 | 35 | </u-row> |
| ... | ... | @@ -37,10 +51,11 @@ |
| 37 | 51 | <u-col span="4"> |
| 38 | 52 | <view class="box"> |
| 39 | 53 | <view class="item review" data-type="review" @click="handelGate"> |
| 40 | - <u-image src="/static/img/home/报名审核背景@2x.png" width="220rpx" height="256rpx" /> | |
| 54 | + <u-image src="/static/img/home/registrationReviewBg.png" width="220rpx" | |
| 55 | + height="256rpx" /> | |
| 41 | 56 | <view class="copywriting"> |
| 42 | 57 | <text>报名审核</text> |
| 43 | - <text>提供简单描述文字</text> | |
| 58 | + <text>审核学生实习报名</text> | |
| 44 | 59 | </view> |
| 45 | 60 | </view> |
| 46 | 61 | </view> |
| ... | ... | @@ -49,19 +64,19 @@ |
| 49 | 64 | <view class="box"> |
| 50 | 65 | <view class="item signIn" :style="{marginBottom:'16rpx'}" data-type="signin" |
| 51 | 66 | @click="handelGate"> |
| 52 | - <u-image src="/static/img/home/学生签到背景@2x.png" width="220rpx" height="120rpx" /> | |
| 67 | + <u-image src="/static/img/home/studentSignInBg.png" width="220rpx" height="120rpx" /> | |
| 53 | 68 | <view> |
| 54 | 69 | <u-icon size="48rpx" label="学生签到" labelPos="right" labelSize="28rpx" |
| 55 | - labelColor="#1F71DE" name="/static/img/home/icon-学生签到@2x.png"></u-icon> | |
| 56 | - <text>提供简单描述文字</text> | |
| 70 | + labelColor="#1F71DE" name="/static/img/home/iconStudentSignIn.png"></u-icon> | |
| 71 | + <text>查看学生签到数据</text> | |
| 57 | 72 | </view> |
| 58 | 73 | </view> |
| 59 | 74 | <view class="item report" data-type="report" @click="handelGate"> |
| 60 | - <u-image src="/static/img/home/报告审批背景@2x.png" width="220rpx" height="120rpx" /> | |
| 75 | + <u-image src="/static/img/home/reportReviewBg.png" width="220rpx" height="120rpx" /> | |
| 61 | 76 | <view> |
| 62 | - <u-icon size="48rpx" label="报告审核" labelPos="right" labelSize="28rpx" | |
| 63 | - labelColor="#FD9A03" name="/static/img/home/icon-报名审批@2x.png"></u-icon> | |
| 64 | - <text>提供简单描述文字</text> | |
| 77 | + <u-icon size="48rpx" label="报告批阅" labelPos="right" labelSize="28rpx" | |
| 78 | + labelColor="#FD9A03" name="/static/img/home/iconReportReview.png"></u-icon> | |
| 79 | + <text>批阅学生实习报告</text> | |
| 65 | 80 | </view> |
| 66 | 81 | </view> |
| 67 | 82 | </view> |
| ... | ... | @@ -70,19 +85,21 @@ |
| 70 | 85 | <view class="box"> |
| 71 | 86 | <view class="item signIn" :style="{marginBottom:'16rpx'}" data-type="log" |
| 72 | 87 | @click="handelGate"> |
| 73 | - <u-image src="/static/img/home/日志批阅背景@2x.png" width="220rpx" height="120rpx" /> | |
| 88 | + <u-image src="/static/img/home/logReviewBg.png" width="220rpx" height="120rpx" /> | |
| 74 | 89 | <view> |
| 75 | 90 | <u-icon size="48rpx" label="日志批阅" labelPos="right" labelSize="28rpx" |
| 76 | - labelColor="#7A7EF9" name="/static/img/home/icon-日志批阅@2x.png"></u-icon> | |
| 77 | - <text>提供简单描述文字</text> | |
| 91 | + labelColor="#7A7EF9" name="/static/img/home/iconLogReview.png"></u-icon> | |
| 92 | + <text>批阅学生周日志</text> | |
| 78 | 93 | </view> |
| 79 | 94 | </view> |
| 80 | 95 | <view class="item report" data-type="achievement" @click="handelGate"> |
| 81 | - <u-image src="/static/img/home/成绩鉴定背景@2x.png" width="220rpx" height="120rpx" /> | |
| 96 | + <u-image src="/static/img/home/achievementAppraisalBg.png" width="220rpx" | |
| 97 | + height="120rpx" /> | |
| 82 | 98 | <view> |
| 83 | 99 | <u-icon size="48rpx" label="成绩鉴定" labelPos="right" labelSize="28rpx" |
| 84 | - labelColor="#FF6363" name="/static/img/home/icon-成绩鉴定@2x.png"></u-icon> | |
| 85 | - <text>提供简单描述文字</text> | |
| 100 | + labelColor="#FF6363" name="/static/img/home/iconAchievementAppraisal.png"> | |
| 101 | + </u-icon> | |
| 102 | + <text>鉴定学生实习成绩</text> | |
| 86 | 103 | </view> |
| 87 | 104 | </view> |
| 88 | 105 | </view> |
| ... | ... | @@ -94,56 +111,66 @@ |
| 94 | 111 | <view class="todoList"> |
| 95 | 112 | <view class="title">待办事项</view> |
| 96 | 113 | <view v-if="hasLogin"> |
| 97 | - <view class="cell"> | |
| 98 | - <u-cell-group :border="false"> | |
| 99 | - <u-cell v-if="statistics && statistics.internshipApply && statistics.internshipApply > 0" | |
| 100 | - :isLink="true" url="/pages/main/home/registrationReview/registrationReview" | |
| 101 | - arrow-direction="right" :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 102 | - <view slot="title" class="u-slot-title"> | |
| 103 | - <view class="u-cell-title">实习申请</view> | |
| 104 | - <view class="u-cell-text"> | |
| 105 | - 您有<text>{{statistics.internshipApply}}</text>条<text>实习申请</text>待处理!</view> | |
| 106 | - </view> | |
| 107 | - <text slot="value" class="u-slot-value">立即处理</text> | |
| 108 | - </u-cell> | |
| 109 | - | |
| 110 | - <u-cell | |
| 111 | - v-if="statistics && statistics.formLogWaitReview && statistics.formLogWaitReview > 0" | |
| 112 | - :isLink="true" url="/pages/main/home/logReview/logReview" arrow-direction="right" | |
| 113 | - :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 114 | - <view slot="title" class="u-slot-title"> | |
| 115 | - <view class="u-cell-title">日志批阅</view> | |
| 116 | - <view class="u-cell-text"> | |
| 117 | - 您有<text>{{statistics.formLogWaitReview}}</text>篇<text>日志</text>待批阅!</view> | |
| 118 | - </view> | |
| 119 | - <text slot="value" class="u-slot-value">立即批阅</text> | |
| 120 | - </u-cell> | |
| 121 | - | |
| 122 | - <u-cell v-if="statistics && statistics.reportWaitReview && statistics.reportWaitReview > 0" | |
| 123 | - :isLink="true" url="/pages/main/home/reportReview/reportReview" arrow-direction="right" | |
| 124 | - :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 125 | - <view slot="title" class="u-slot-title"> | |
| 126 | - <view class="u-cell-title">报告批阅</view> | |
| 127 | - <view class="u-cell-text"> | |
| 128 | - 您有<text>{{statistics.reportWaitReview}}</text>篇<text>实习报告</text>待批阅!</view> | |
| 129 | - </view> | |
| 130 | - <text slot="value" class="u-slot-value">立即批阅</text> | |
| 131 | - </u-cell> | |
| 132 | - | |
| 133 | - <u-cell | |
| 134 | - v-if="statistics && statistics.achievementWaitAppraisal && statistics.achievementWaitAppraisal > 0" | |
| 135 | - :isLink="true" url="/pages/main/home/achievementAppraisal/achievementAppraisal" | |
| 136 | - arrow-direction="right" :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 137 | - <view slot="title" class="u-slot-title"> | |
| 138 | - <view class="u-cell-title">成绩评定</view> | |
| 139 | - <view class="u-cell-text"> | |
| 140 | - 您有<text>{{statistics.achievementWaitAppraisal}}</text>个<text>成绩</text>待评定! | |
| 114 | + <view | |
| 115 | + v-if="statistics && (statistics.internshipApply > 0 || statistics.formLogWaitReview > 0 || statistics.reportWaitReview > 0 || statistics.achievementWaitAppraisal > 0 )"> | |
| 116 | + <view class="cell"> | |
| 117 | + <u-cell-group :border="false"> | |
| 118 | + <u-cell | |
| 119 | + v-if="statistics && statistics.internshipApply && statistics.internshipApply > 0" | |
| 120 | + :isLink="true" | |
| 121 | + url="/pages/main/home/registrationReview/registrationReview?status=wait" | |
| 122 | + arrow-direction="right" :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 123 | + <view slot="title" class="u-slot-title"> | |
| 124 | + <view class="u-cell-title">实习申请</view> | |
| 125 | + <view class="u-cell-text"> | |
| 126 | + 您有<text>{{statistics.internshipApply}}</text>条<text>实习申请</text>待处理!</view> | |
| 141 | 127 | </view> |
| 142 | - </view> | |
| 143 | - <text slot="value" class="u-slot-value">立即评定</text> | |
| 144 | - </u-cell> | |
| 128 | + <text slot="value" class="u-slot-value">立即处理</text> | |
| 129 | + </u-cell> | |
| 130 | + | |
| 131 | + <u-cell | |
| 132 | + v-if="statistics && statistics.formLogWaitReview && statistics.formLogWaitReview > 0" | |
| 133 | + :isLink="true" url="/pages/main/home/logReview/logReview?status=unread" | |
| 134 | + arrow-direction="right" :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 135 | + <view slot="title" class="u-slot-title"> | |
| 136 | + <view class="u-cell-title">日志批阅</view> | |
| 137 | + <view class="u-cell-text"> | |
| 138 | + 您有<text>{{statistics.formLogWaitReview}}</text>篇<text>日志</text>待批阅!</view> | |
| 139 | + </view> | |
| 140 | + <text slot="value" class="u-slot-value">立即批阅</text> | |
| 141 | + </u-cell> | |
| 142 | + | |
| 143 | + <u-cell | |
| 144 | + v-if="statistics && statistics.reportWaitReview && statistics.reportWaitReview > 0" | |
| 145 | + :isLink="true" url="/pages/main/home/reportReview/reportReview?status=stay_examine" | |
| 146 | + arrow-direction="right" :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 147 | + <view slot="title" class="u-slot-title"> | |
| 148 | + <view class="u-cell-title">报告批阅</view> | |
| 149 | + <view class="u-cell-text"> | |
| 150 | + 您有<text>{{statistics.reportWaitReview}}</text>篇<text>实习报告</text>待批阅!</view> | |
| 151 | + </view> | |
| 152 | + <text slot="value" class="u-slot-value">立即批阅</text> | |
| 153 | + </u-cell> | |
| 154 | + | |
| 155 | + <u-cell | |
| 156 | + v-if="statistics && statistics.achievementWaitAppraisal && statistics.achievementWaitAppraisal > 0" | |
| 157 | + :isLink="true" | |
| 158 | + url="/pages/main/home/achievementAppraisal/achievementAppraisal?appraisalStatus=no_appraisal" | |
| 159 | + arrow-direction="right" :rightIconStyle="{fontSize:'24rpx'}" :border="false"> | |
| 160 | + <view slot="title" class="u-slot-title"> | |
| 161 | + <view class="u-cell-title">成绩评定</view> | |
| 162 | + <view class="u-cell-text"> | |
| 163 | + 您有<text>{{statistics.achievementWaitAppraisal}}</text>个<text>成绩</text>待评定! | |
| 164 | + </view> | |
| 165 | + </view> | |
| 166 | + <text slot="value" class="u-slot-value">立即评定</text> | |
| 167 | + </u-cell> | |
| 145 | 168 | |
| 146 | - </u-cell-group> | |
| 169 | + </u-cell-group> | |
| 170 | + </view> | |
| 171 | + </view> | |
| 172 | + <view v-else> | |
| 173 | + <c-no-data paddingTop="30" title="当前无待办事项"></c-no-data> | |
| 147 | 174 | </view> |
| 148 | 175 | </view> |
| 149 | 176 | <view class="no_login" v-else> |
| ... | ... | @@ -153,6 +180,32 @@ |
| 153 | 180 | </view> |
| 154 | 181 | </view> |
| 155 | 182 | </view> |
| 183 | + | |
| 184 | + <u-popup :show="show" mode="left" @close="close" @open="open"> | |
| 185 | + <view class="popup_search"> | |
| 186 | + <view class="content"> | |
| 187 | + <view class="title"> | |
| 188 | + <text>选择学校</text> | |
| 189 | + <text>请选择您想登录管理的学校</text> | |
| 190 | + </view> | |
| 191 | + <scroll-view class="scroll" scroll-y="true"> | |
| 192 | + <view class="item" v-for="(item, i) in schoolList" :key="i" @click="handelClick(item)"> | |
| 193 | + <view v-if="item.id == schoolId"> | |
| 194 | + <u-image src="/static/img/home/schoolAvatar.png" width="104rpx" height="104rpx" /> | |
| 195 | + <text class="fullName">{{item.fullName}}</text> | |
| 196 | + </view> | |
| 197 | + <view v-else> | |
| 198 | + <u-image src="/static/img/home/schoolAvatar.png" width="104rpx" height="104rpx" /> | |
| 199 | + <text class="fullName">{{item.fullName}}</text> | |
| 200 | + </view> | |
| 201 | + </view> | |
| 202 | + </scroll-view> | |
| 203 | + | |
| 204 | + </view> | |
| 205 | + | |
| 206 | + </view> | |
| 207 | + </u-popup> | |
| 208 | + | |
| 156 | 209 | </view> |
| 157 | 210 | </template> |
| 158 | 211 | |
| ... | ... | @@ -172,6 +225,9 @@ |
| 172 | 225 | export default { |
| 173 | 226 | data() { |
| 174 | 227 | return { |
| 228 | + top: '0rpx', | |
| 229 | + show: false, | |
| 230 | + schoolId: '', | |
| 175 | 231 | statistics: {} |
| 176 | 232 | } |
| 177 | 233 | }, |
| ... | ... | @@ -181,7 +237,25 @@ |
| 181 | 237 | }, |
| 182 | 238 | |
| 183 | 239 | onShow() { |
| 240 | + uni.getSystemInfo({ | |
| 241 | + success: (res) => { | |
| 242 | + | |
| 243 | + let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); | |
| 244 | + let menuTop = menuButtonInfo.top | |
| 245 | + | |
| 246 | + // 状态栏高度 | |
| 247 | + let winWidth = res.windowWidth; | |
| 248 | + let proportion = 750 / winWidth; | |
| 249 | + | |
| 250 | + this.top = ((menuTop * proportion) + 16) + 'rpx'; | |
| 251 | + }, | |
| 252 | + complete: function(res) {}, | |
| 253 | + }); | |
| 254 | + | |
| 184 | 255 | if (this.hasLogin) { |
| 256 | + this.$store.dispatch(`home/getSchoolList`, { | |
| 257 | + pageSize: -1, | |
| 258 | + }) | |
| 185 | 259 | getTodoListStatisticsApi().then(data => { |
| 186 | 260 | if (data) { |
| 187 | 261 | this.statistics = data; |
| ... | ... | @@ -192,19 +266,65 @@ |
| 192 | 266 | |
| 193 | 267 | computed: { |
| 194 | 268 | ...mapGetters([ |
| 195 | - 'doneRoles', | |
| 269 | + 'doneRolesLength', | |
| 270 | + 'doneRolesName', | |
| 271 | + 'doneSchoolName', | |
| 196 | 272 | ]), |
| 273 | + | |
| 197 | 274 | ...mapState({ |
| 198 | 275 | hasLogin: 'hasLogin', |
| 199 | 276 | vuex_user: 'vuex_user', |
| 277 | + refresh_token: 'refresh_token', | |
| 200 | 278 | teacher: (state) => state.vuex_user.teacher, |
| 201 | 279 | }), |
| 280 | + ...mapState('home', { | |
| 281 | + // 箭头函数可使代码更简练 | |
| 282 | + schoolList: 'schoolList', | |
| 283 | + | |
| 284 | + }), | |
| 285 | + ...mapState('user', { | |
| 286 | + // 箭头函数可使代码更简练 | |
| 287 | + loginInfo: 'loginInfo', | |
| 288 | + | |
| 289 | + }), | |
| 290 | + | |
| 291 | + | |
| 202 | 292 | |
| 203 | 293 | |
| 204 | 294 | }, |
| 205 | 295 | |
| 206 | 296 | methods: { |
| 207 | 297 | |
| 298 | + handelClick(values) { | |
| 299 | + this.schoolId = values.id; | |
| 300 | + | |
| 301 | + this.$store.dispatch(`user/login`, { | |
| 302 | + way: 'refresh_token', | |
| 303 | + refreshToken: this.refresh_token, | |
| 304 | + schoolId: values.id, | |
| 305 | + }).then(data => { | |
| 306 | + console.log(data) | |
| 307 | + if (data) { | |
| 308 | + | |
| 309 | + getTodoListStatisticsApi().then(data => { | |
| 310 | + if (data) { | |
| 311 | + this.statistics = data; | |
| 312 | + } | |
| 313 | + }) | |
| 314 | + | |
| 315 | + this.show = false; | |
| 316 | + } | |
| 317 | + }) | |
| 318 | + }, | |
| 319 | + | |
| 320 | + open() { | |
| 321 | + | |
| 322 | + }, | |
| 323 | + | |
| 324 | + close() { | |
| 325 | + this.show = false | |
| 326 | + }, | |
| 327 | + | |
| 208 | 328 | handelLOgin() { |
| 209 | 329 | this.$u.route('/pages/main/my/login/login'); |
| 210 | 330 | }, |
| ... | ... | @@ -225,7 +345,13 @@ |
| 225 | 345 | }).then(data => { |
| 226 | 346 | if (data) { |
| 227 | 347 | console.log(data) |
| 228 | - this.$store.dispatch(`user/getUserInfo`) | |
| 348 | + this.$store.dispatch(`user/getUserInfo`); | |
| 349 | + | |
| 350 | + getTodoListStatisticsApi().then(data => { | |
| 351 | + if (data) { | |
| 352 | + this.statistics = data; | |
| 353 | + } | |
| 354 | + }) | |
| 229 | 355 | } |
| 230 | 356 | }) |
| 231 | 357 | } |
| ... | ... | @@ -282,16 +408,6 @@ |
| 282 | 408 | background-color: #FFFFFF; |
| 283 | 409 | border-radius: 12rpx; |
| 284 | 410 | margin: 0 0 20rpx 0; |
| 285 | - | |
| 286 | - // .u-flex { | |
| 287 | - // position: relative; | |
| 288 | - // top: -2rpx; | |
| 289 | - // } | |
| 290 | - | |
| 291 | - // .u-cell_title { | |
| 292 | - // margin: 0 16rpx; | |
| 293 | - // color: rgba(0, 0, 0, 0.65); | |
| 294 | - // } | |
| 295 | 411 | } |
| 296 | 412 | |
| 297 | 413 | .home_box { |
| ... | ... | @@ -300,30 +416,60 @@ |
| 300 | 416 | height: auto; |
| 301 | 417 | |
| 302 | 418 | .home { |
| 303 | - width: 690rpx; | |
| 304 | - margin: 0 auto; | |
| 419 | + width: 100%; | |
| 305 | 420 | |
| 306 | - .bar { | |
| 421 | + .school_box { | |
| 307 | 422 | width: 100%; |
| 308 | - height: 288rpx; | |
| 309 | - background-color: #E4F7F4; | |
| 423 | + height: 496rpx; | |
| 310 | 424 | margin: 0 0 34rpx 0; |
| 425 | + position: relative; | |
| 426 | + | |
| 427 | + .school { | |
| 428 | + position: absolute; | |
| 429 | + top: 0rpx; | |
| 430 | + left: 40rpx; | |
| 431 | + display: flex; | |
| 432 | + flex-flow: row nowrap; | |
| 433 | + | |
| 434 | + text { | |
| 435 | + font-size: 32rpx; | |
| 436 | + line-height: 32rpx; | |
| 437 | + color: #202131; | |
| 438 | + font-weight: 500; | |
| 439 | + width: 600rpx; | |
| 440 | + text-align: center; | |
| 441 | + } | |
| 442 | + } | |
| 311 | 443 | |
| 312 | 444 | } |
| 313 | 445 | |
| 314 | 446 | .info { |
| 447 | + width: 690rpx; | |
| 448 | + margin: 0 auto; | |
| 449 | + | |
| 315 | 450 | .name { |
| 316 | 451 | text { |
| 452 | + display: inline-block; | |
| 453 | + font-size: 24rpx; | |
| 454 | + line-height: 36rpx; | |
| 455 | + color: #909097; | |
| 456 | + margin: 0 0 0 12rpx; | |
| 457 | + } | |
| 458 | + | |
| 459 | + text:first-child { | |
| 460 | + | |
| 317 | 461 | font-size: 36rpx; |
| 318 | 462 | line-height: 52rpx; |
| 319 | 463 | color: #202131; |
| 464 | + width: 150rpx; | |
| 465 | + overflow: hidden; | |
| 466 | + text-overflow: ellipsis; | |
| 467 | + white-space: nowrap; | |
| 468 | + margin: 0; | |
| 320 | 469 | } |
| 321 | 470 | |
| 322 | 471 | text:last-child { |
| 323 | - font-size: 24rpx; | |
| 324 | - line-height: 36rpx; | |
| 325 | - color: #909097; | |
| 326 | - margin: 0 0 0 12rpx; | |
| 472 | + vertical-align: super; | |
| 327 | 473 | } |
| 328 | 474 | } |
| 329 | 475 | |
| ... | ... | @@ -333,7 +479,8 @@ |
| 333 | 479 | } |
| 334 | 480 | |
| 335 | 481 | .gate { |
| 336 | - margin-bottom: 50rpx; | |
| 482 | + width: 690rpx; | |
| 483 | + margin: 0 auto 50rpx; | |
| 337 | 484 | |
| 338 | 485 | .box { |
| 339 | 486 | width: 220rpx; |
| ... | ... | @@ -387,6 +534,9 @@ |
| 387 | 534 | } |
| 388 | 535 | |
| 389 | 536 | .todoList { |
| 537 | + width: 690rpx; | |
| 538 | + margin: 0 auto; | |
| 539 | + | |
| 390 | 540 | .no_login { |
| 391 | 541 | padding: 150rpx 0 0 0; |
| 392 | 542 | text-align: center; |
| ... | ... | @@ -446,5 +596,61 @@ |
| 446 | 596 | |
| 447 | 597 | } |
| 448 | 598 | } |
| 599 | + | |
| 600 | + .popup_search { | |
| 601 | + width: 540rpx; | |
| 602 | + height: 100%; | |
| 603 | + background-color: #F7F7F7; | |
| 604 | + position: relative; | |
| 605 | + | |
| 606 | + .content { | |
| 607 | + padding: 100rpx 40rpx 0; | |
| 608 | + | |
| 609 | + .title { | |
| 610 | + font-size: 48rpx; | |
| 611 | + line-height: 60rpx; | |
| 612 | + color: #202131; | |
| 613 | + | |
| 614 | + text:last-child { | |
| 615 | + display: block; | |
| 616 | + font-size: 24rpx; | |
| 617 | + line-height: 32rpx; | |
| 618 | + color: #909097; | |
| 619 | + margin: 30rpx 0 70rpx 0; | |
| 620 | + } | |
| 621 | + } | |
| 622 | + | |
| 623 | + .scroll { | |
| 624 | + max-height: 60vh; | |
| 625 | + | |
| 626 | + .item { | |
| 627 | + width: 380rpx; | |
| 628 | + height: 100rpx; | |
| 629 | + box-shadow: 0rpx 4rpx 48rpx 0rpx rgba(175, 174, 174, 0.1500); | |
| 630 | + border-radius: 20rpx; | |
| 631 | + margin: 0 0 20rpx 0; | |
| 632 | + padding: 40rpx; | |
| 633 | + background-color: #FFFFFF; | |
| 634 | + | |
| 635 | + | |
| 636 | + view { | |
| 637 | + display: flex; | |
| 638 | + flex-flow: row wrap; | |
| 639 | + align-items: center; | |
| 640 | + | |
| 641 | + text { | |
| 642 | + width: 240rpx; | |
| 643 | + font-size: 40rpx; | |
| 644 | + line-height: 48rpx; | |
| 645 | + color: #202131; | |
| 646 | + margin: 0 0 0 34rpx; | |
| 647 | + } | |
| 648 | + } | |
| 649 | + | |
| 650 | + } | |
| 651 | + } | |
| 652 | + } | |
| 653 | + | |
| 654 | + } | |
| 449 | 655 | } |
| 450 | 656 | </style> | ... | ... |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> |
| 15 | 15 | |
| 16 | 16 | <view class="info"> |
| 17 | - <u-image src="/static/img/internship/班级icon@2x.png" width="88rpx" height="88rpx" /> | |
| 17 | + <u-image src="/static/img/internship/classIcon.png" width="88rpx" height="88rpx" /> | |
| 18 | 18 | <view class="title_name"> |
| 19 | 19 | <view class="title"> |
| 20 | 20 | {{item.startSchoolYear}} |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | </view> |
| 25 | 25 | </view> |
| 26 | 26 | <view class="num"> |
| 27 | - <text>{{item.classInfoTotal || 0}}/{{item.internedTotal || 0}}</text> | |
| 27 | + <text>{{item.internedTotal || 0}}/{{item.classInfoTotal || 0}}</text> | |
| 28 | 28 | <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="24"> |
| 29 | 29 | </u-icon> |
| 30 | 30 | </view> |
| ... | ... | @@ -94,9 +94,6 @@ |
| 94 | 94 | }, |
| 95 | 95 | |
| 96 | 96 | computed: { |
| 97 | - ...mapGetters([ | |
| 98 | - 'doneRoles', | |
| 99 | - ]), | |
| 100 | 97 | ...mapState({ |
| 101 | 98 | hasLogin: 'hasLogin', |
| 102 | 99 | vuex_user: 'vuex_user', |
| ... | ... | @@ -173,7 +170,15 @@ |
| 173 | 170 | this.shownoData = true |
| 174 | 171 | } |
| 175 | 172 | |
| 176 | - this.list = this.list.concat(result.records) | |
| 173 | + this.list = this.list.concat(result.records) | |
| 174 | + | |
| 175 | + // 判断是否全部加载完成 | |
| 176 | + if (this.total == this.list.length) { | |
| 177 | + this.finished = true; | |
| 178 | + this.loading = 'nomore'; | |
| 179 | + } else { | |
| 180 | + this.loading = 'loadmore'; | |
| 181 | + } | |
| 177 | 182 | }, |
| 178 | 183 | |
| 179 | 184 | } | ... | ... |
| ... | ... | @@ -19,34 +19,32 @@ |
| 19 | 19 | </view> |
| 20 | 20 | </view> |
| 21 | 21 | |
| 22 | - <view class="cell"> | |
| 23 | - <u-cell-group :border="false"> | |
| 24 | - <u-cell icon="/static/img/my/school_authen.png" title="账号与安全" :isLink="true" | |
| 25 | - url="/pages/main/my/accountSafe/accountSafe" arrow-direction="right" | |
| 26 | - :rightIconStyle="{fontSize:'36rpx'}" :border="false" | |
| 27 | - :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'36rpx'}"> | |
| 28 | - <u-icon slot="icon" size="64" :name="'/static/img/my/school_authen.png'"></u-icon> | |
| 29 | - </u-cell> | |
| 30 | - <u-cell icon="/static/img/my/school_authen.png" title="政策与协议" :isLink="true" | |
| 31 | - url="/pages/main/my/policiesAgreement/policiesAgreement" arrow-direction="right" | |
| 32 | - :rightIconStyle="{fontSize:'36rpx'}" :border="false" | |
| 33 | - :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'36rpx'}"> | |
| 34 | - <u-icon slot="icon" size="64" :name="'/static/img/my/school_authen.png'"></u-icon> | |
| 35 | - </u-cell> | |
| 36 | - </u-cell-group> | |
| 22 | + <view class="cell"> | |
| 23 | + <u-cell-group :border="false"> | |
| 24 | + <u-cell title="账号与安全" :isLink="true" url="/pages/main/my/accountSafe/accountSafe" | |
| 25 | + arrow-direction="right" :rightIconStyle="{fontSize:'28rpx'}" :border="false" | |
| 26 | + :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'28rpx'}"> | |
| 27 | + <u-icon slot="icon" size="48" :name="'/static/img/my/accountSafe.png'"></u-icon> | |
| 28 | + </u-cell> | |
| 29 | + <u-cell title="政策与协议" :isLink="true" | |
| 30 | + url="/pages/main/my/policiesAgreement/policiesAgreement" arrow-direction="right" | |
| 31 | + :rightIconStyle="{fontSize:'28rpx'}" :border="false" | |
| 32 | + :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'28rpx'}"> | |
| 33 | + <u-icon slot="icon" size="48" :name="'/static/img/my/policiesAgreement.png'"></u-icon> | |
| 34 | + </u-cell> | |
| 35 | + </u-cell-group> | |
| 37 | 36 | </view> |
| 38 | 37 | </view> |
| 39 | 38 | |
| 40 | 39 | <view class="bottom"> |
| 41 | - <view class="cell"> | |
| 42 | - <u-cell-group :border="false"> | |
| 43 | - <u-cell icon="/static/img/my/school_authen.png" title="版本信息" :isLink="true" | |
| 44 | - url="/pages/main/my/versionInfo/versionInfo" arrow-direction="right" | |
| 45 | - :rightIconStyle="{fontSize:'36rpx'}" :border="false" | |
| 46 | - :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'36rpx'}"> | |
| 47 | - <u-icon slot="icon" size="64" :name="'/static/img/my/school_authen.png'"></u-icon> | |
| 48 | - </u-cell> | |
| 49 | - </u-cell-group> | |
| 40 | + <view class="cell"> | |
| 41 | + <u-cell-group :border="false"> | |
| 42 | + <u-cell title="版本信息" :isLink="true" url="/pages/main/my/versionInfo/versionInfo" | |
| 43 | + arrow-direction="right" :rightIconStyle="{fontSize:'28rpx'}" :border="false" | |
| 44 | + :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'28rpx'}"> | |
| 45 | + <u-icon slot="icon" size="48" :name="'/static/img/my/versionInfo.png'"></u-icon> | |
| 46 | + </u-cell> | |
| 47 | + </u-cell-group> | |
| 50 | 48 | </view> |
| 51 | 49 | </view> |
| 52 | 50 | |
| ... | ... | @@ -94,17 +92,15 @@ |
| 94 | 92 | </view> |
| 95 | 93 | </view> |
| 96 | 94 | |
| 97 | - <view class="bottom"> | |
| 98 | - <view class="cell"> | |
| 99 | - <u-cell-group :border="false"> | |
| 100 | - <u-cell icon="/static/img/my/school_authen.png" title="版本信息" :isLink="true" | |
| 101 | - url="/pages/main/my/login/login" arrow-direction="right" | |
| 102 | - :rightIconStyle="{fontSize:'36rpx'}" :border="false" | |
| 103 | - :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'36rpx'}"> | |
| 104 | - <u-icon slot="icon" size="64" :name="'/static/img/my/school_authen.png'"></u-icon> | |
| 105 | - </u-cell> | |
| 106 | - </u-cell-group> | |
| 107 | - </view> | |
| 95 | + <view class="cell bottom"> | |
| 96 | + <u-cell-group :border="false"> | |
| 97 | + <u-cell icon="/static/img/my/school_authen.png" title="版本信息" :isLink="true" | |
| 98 | + url="/pages/main/my/login/login" arrow-direction="right" | |
| 99 | + :rightIconStyle="{fontSize:'36rpx'}" :border="false" | |
| 100 | + :title-style="{padding:'0 0 0 14rpx', color:'#333', fontSize:'36rpx'}"> | |
| 101 | + <u-icon slot="icon" size="64" :name="'/static/img/my/school_authen.png'"></u-icon> | |
| 102 | + </u-cell> | |
| 103 | + </u-cell-group> | |
| 108 | 104 | </view> |
| 109 | 105 | </view> |
| 110 | 106 | </view> |
| ... | ... | @@ -141,19 +137,18 @@ |
| 141 | 137 | vuex_user: 'vuex_user', |
| 142 | 138 | vuex_weixinUserInfo: 'vuex_weixinUserInfo', |
| 143 | 139 | teacher: (state) => state.vuex_user.teacher, |
| 144 | - userBasicInfo: (state) => state.vuex_user.userBasicInfo, | |
| 145 | 140 | vuex_weixinUserInfo: (state) => state.vuex_weixinUserInfo, |
| 146 | 141 | }), |
| 147 | 142 | |
| 148 | 143 | //name |
| 149 | 144 | reversedName() { |
| 150 | - return (this.userBasicInfo && this.userBasicInfo.name) ? this.userBasicInfo.name : this.vuex_user.username; | |
| 145 | + return (this.teacher && this.teacher.name) ? this.teacher.name : this.vuex_user.username; | |
| 151 | 146 | }, |
| 152 | 147 | |
| 153 | 148 | //avatar |
| 154 | 149 | reversedAvatarUrl() { |
| 155 | - if (this.userBasicInfo && this.userBasicInfo.avatarUrl) { | |
| 156 | - return this.vuex_ossUrlPubilc + '/' + this.userBasicInfo.avatarUrl | |
| 150 | + if (this.teacher && this.teacher.avatarUrl) { | |
| 151 | + return this.vuex_ossUrlPubilc + '/' + this.teacher.avatarUrl | |
| 157 | 152 | } |
| 158 | 153 | return (this.vuex_weixinUserInfo && this.vuex_weixinUserInfo.avatarUrl) ? this.vuex_weixinUserInfo |
| 159 | 154 | .avatarUrl : '/static/img/my/default_avatar.png'; |
| ... | ... | @@ -169,25 +164,25 @@ |
| 169 | 164 | handelLOgin() { |
| 170 | 165 | this.$u.route('/pages/main/my/login/login'); |
| 171 | 166 | }, |
| 172 | - | |
| 173 | - link(type) { | |
| 174 | - const { | |
| 175 | - dispatch | |
| 176 | - } = this.$store; | |
| 177 | - | |
| 178 | - switch (type) { | |
| 179 | - | |
| 180 | - case 'person': | |
| 181 | - this.$u.route('/pages/main/my/personInfo/personInfo'); | |
| 182 | - break; | |
| 183 | - | |
| 184 | - case 'loginOut': | |
| 185 | - dispatch(`user/loginOut`); | |
| 186 | - break; | |
| 187 | - | |
| 188 | - | |
| 189 | - } | |
| 190 | - | |
| 167 | + | |
| 168 | + link(type) { | |
| 169 | + const { | |
| 170 | + dispatch | |
| 171 | + } = this.$store; | |
| 172 | + | |
| 173 | + switch (type) { | |
| 174 | + | |
| 175 | + case 'person': | |
| 176 | + this.$u.route('/pages/main/my/personInfo/personInfo'); | |
| 177 | + break; | |
| 178 | + | |
| 179 | + case 'loginOut': | |
| 180 | + dispatch(`user/loginOut`); | |
| 181 | + break; | |
| 182 | + | |
| 183 | + | |
| 184 | + } | |
| 185 | + | |
| 191 | 186 | }, |
| 192 | 187 | |
| 193 | 188 | } |
| ... | ... | @@ -224,6 +219,10 @@ |
| 224 | 219 | position: absolute; |
| 225 | 220 | top: -95rpx; |
| 226 | 221 | left: 32rpx; |
| 222 | + } | |
| 223 | + | |
| 224 | + .cell /deep/ .u-cell { | |
| 225 | + padding: 16rpx 2rpx; | |
| 227 | 226 | } |
| 228 | 227 | |
| 229 | 228 | .top { |
| ... | ... | @@ -233,7 +232,7 @@ |
| 233 | 232 | border-top-right-radius: 20px; |
| 234 | 233 | |
| 235 | 234 | .title { |
| 236 | - padding: 32rpx 0 0 234rpx; | |
| 235 | + padding: 32rpx 0 40rpx 234rpx; | |
| 237 | 236 | display: flex; |
| 238 | 237 | flex-flow: row nowrap; |
| 239 | 238 | justify-content: space-between; |
| ... | ... | @@ -270,13 +269,6 @@ |
| 270 | 269 | } |
| 271 | 270 | } |
| 272 | 271 | |
| 273 | - .cell { | |
| 274 | - margin: 62rpx 0 0 0; | |
| 275 | - } | |
| 276 | - | |
| 277 | - .cell /deep/ .u-cell { | |
| 278 | - padding: 16rpx 2rpx; | |
| 279 | - } | |
| 280 | 272 | } |
| 281 | 273 | |
| 282 | 274 | .bottom { | ... | ... |
static/img/home/changeSchool.png
0 → 100644
799 Bytes
static/img/home/dateIcon.png
0 → 100644
514 Bytes
static/img/home/schoolAvatar.png
0 → 100644
3.1 KB
static/img/icon/internship.png
0 → 100644
1.5 KB
static/img/icon/internshipHL.png
0 → 100644
1.1 KB
static/img/icon/position.png
已删除
100644 → 0
1.1 KB
static/img/icon/positionHL.png
已删除
100644 → 0
1.6 KB
static/img/internship/addressIcon.png
0 → 100644
974 Bytes
static/img/internship/beforeTime.png
0 → 100644
401 Bytes
static/img/internship/currentTime.png
0 → 100644
1.0 KB
static/img/my/accountSafe.png
0 → 100644
1.2 KB
static/img/my/policiesAgreement.png
0 → 100644
897 Bytes
static/img/my/school_authen.png
已删除
100644 → 0
1.9 KB
static/img/my/versionInfo.png
0 → 100644
1.2 KB
| ... | ... | @@ -14,7 +14,7 @@ try { |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | // 需要永久存储,且下次APP启动需要取出的,在state中的变量名 |
| 17 | -let saveStateKeys = ['hasLogin', 'vuex_user', 'vuex_token', 'vuex_phone', 'vuex_weixinUserInfo']; | |
| 17 | +let saveStateKeys = ['hasLogin', 'vuex_user', 'vuex_token', 'refresh_token', 'vuex_phone', 'vuex_weixinUserInfo']; | |
| 18 | 18 | |
| 19 | 19 | // 保存变量到本地存储中 |
| 20 | 20 | const saveLifeData = function(key, value) { |
| ... | ... | @@ -43,6 +43,7 @@ const store = new Vuex.Store({ |
| 43 | 43 | vuex_user: lifeData.vuex_user ? lifeData.vuex_user : '', |
| 44 | 44 | vuex_weixinUserInfo: lifeData.vuex_weixinUserInfo ? lifeData.vuex_weixinUserInfo : '', |
| 45 | 45 | vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '', |
| 46 | + refresh_token: lifeData.refresh_token ? lifeData.refresh_token : '', | |
| 46 | 47 | vuex_phone: lifeData.vuex_phone ? lifeData.vuex_phone : '', |
| 47 | 48 | // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式 |
| 48 | 49 | vuex_version: '1.0.1', |
| ... | ... | @@ -65,23 +66,45 @@ const store = new Vuex.Store({ |
| 65 | 66 | |
| 66 | 67 | }, |
| 67 | 68 | getters: { |
| 68 | - doneRoles: state => { | |
| 69 | - if (state.vuex_user) { | |
| 70 | - const { | |
| 69 | + doneRolesLength: state => { | |
| 70 | + if (state && state.vuex_user && state.vuex_user.teacher) { | |
| 71 | + let { | |
| 71 | 72 | teacher = {} |
| 72 | 73 | } = state.vuex_user; |
| 74 | + if (teacher && teacher.roles && teacher.roles.length > 0) { | |
| 75 | + | |
| 76 | + return teacher.roles.length | |
| 77 | + } else { | |
| 78 | + return 0 | |
| 79 | + } | |
| 80 | + } else { | |
| 81 | + return 0 | |
| 82 | + } | |
| 83 | + }, | |
| 84 | + | |
| 85 | + doneRolesName: state => { | |
| 73 | 86 | |
| 87 | + if (state && state.vuex_user && state.vuex_user.teacher) { | |
| 88 | + let { | |
| 89 | + teacher = {} | |
| 90 | + } = state.vuex_user; | |
| 74 | 91 | if (teacher && teacher.roles && teacher.roles.length > 0) { |
| 75 | 92 | let selectRoles = teacher.roles.filter(item => item.id == teacher.roleId); |
| 76 | 93 | return selectRoles[0].name |
| 77 | 94 | } else { |
| 78 | 95 | return '' |
| 79 | 96 | } |
| 80 | - } else { | |
| 81 | - return '' | |
| 97 | + } else { | |
| 98 | + return '' | |
| 82 | 99 | } |
| 100 | + }, | |
| 83 | 101 | |
| 84 | - | |
| 102 | + doneSchoolName: state => { | |
| 103 | + if (state && state.vuex_user && state.vuex_user.teacher) { | |
| 104 | + return state.vuex_user.teacher.schoolName; | |
| 105 | + } else { | |
| 106 | + return ''; | |
| 107 | + } | |
| 85 | 108 | }, |
| 86 | 109 | }, |
| 87 | 110 | mutations: { | ... | ... |
| 1 | -import { | |
| 1 | +import { | |
| 2 | + getSchoolListApi, | |
| 2 | 3 | getProjectListApi, |
| 3 | -} from '@/config/api.js'; | |
| 4 | - | |
| 4 | +} from '@/config/api.js'; | |
| 5 | + | |
| 5 | 6 | const state = () => ({ |
| 7 | + schoolList: [], | |
| 6 | 8 | projectList: [], |
| 7 | 9 | }) |
| 8 | 10 | |
| 9 | 11 | const getters = { |
| 10 | - | |
| 12 | + | |
| 11 | 13 | } |
| 12 | 14 | |
| 13 | 15 | const actions = { |
| 14 | 16 | |
| 17 | + | |
| 18 | + | |
| 19 | + async getSchoolList({ | |
| 20 | + commit, | |
| 21 | + dispatch, | |
| 22 | + state | |
| 23 | + }, params) { | |
| 24 | + const result = await getSchoolListApi(params); | |
| 25 | + if (result && result.records) { | |
| 26 | + commit('setSchoolList', result); | |
| 27 | + return result; | |
| 28 | + } | |
| 29 | + }, | |
| 30 | + | |
| 15 | 31 | async getProjectList({ |
| 16 | 32 | commit, |
| 17 | 33 | dispatch, |
| 18 | 34 | state |
| 19 | 35 | }, params) { |
| 20 | - const result = await getProjectListApi(params); | |
| 21 | - if (result&& result.records) { | |
| 22 | - commit('setProjectList', result); | |
| 36 | + const result = await getProjectListApi(params); | |
| 37 | + if (result && result.records) { | |
| 38 | + commit('setProjectList', result); | |
| 23 | 39 | return result; |
| 24 | - } | |
| 40 | + } | |
| 25 | 41 | }, |
| 26 | 42 | |
| 27 | 43 | } |
| 28 | 44 | |
| 29 | 45 | const mutations = { |
| 30 | 46 | |
| 31 | - setProjectList(state, result) { | |
| 47 | + setSchoolList(state, result) { | |
| 48 | + state.schoolList = result.records; | |
| 49 | + }, | |
| 50 | + | |
| 51 | + setProjectList(state, result) { | |
| 32 | 52 | state.projectList = result.records; |
| 33 | 53 | }, |
| 34 | 54 | ... | ... |
| ... | ... | @@ -4,23 +4,13 @@ import { |
| 4 | 4 | } from '@/config/api.js'; |
| 5 | 5 | |
| 6 | 6 | const state = () => ({ |
| 7 | - openid: '', | |
| 8 | - isReg: '', | |
| 9 | - id: '', | |
| 10 | - name: '', | |
| 11 | - number: '', | |
| 12 | - password: '', | |
| 13 | - phone: '', | |
| 14 | - status: '', | |
| 15 | - type: '', | |
| 16 | - username: '', | |
| 7 | + loginInfo: {}, | |
| 17 | 8 | userInfo: {}, |
| 18 | 9 | userBasicInfo: {}, |
| 19 | - | |
| 20 | 10 | }) |
| 21 | 11 | |
| 22 | 12 | const getters = { |
| 23 | - | |
| 13 | + | |
| 24 | 14 | } |
| 25 | 15 | |
| 26 | 16 | // actions |
| ... | ... | @@ -37,7 +27,9 @@ const actions = { |
| 37 | 27 | custom: { |
| 38 | 28 | auth: false |
| 39 | 29 | } |
| 40 | - }); | |
| 30 | + }); | |
| 31 | + | |
| 32 | + console.log(login_result) | |
| 41 | 33 | |
| 42 | 34 | if (login_result) { |
| 43 | 35 | |
| ... | ... | @@ -80,17 +72,21 @@ const actions = { |
| 80 | 72 | |
| 81 | 73 | break; |
| 82 | 74 | } |
| 75 | + | |
| 76 | + return login_result; | |
| 83 | 77 | } |
| 84 | 78 | |
| 85 | 79 | |
| 80 | + | |
| 81 | + | |
| 86 | 82 | }, |
| 87 | 83 | |
| 88 | 84 | async loginOut({ |
| 89 | 85 | commit, |
| 90 | 86 | dispatch, |
| 91 | 87 | state |
| 92 | - }, params) { | |
| 93 | - | |
| 88 | + }, params) { | |
| 89 | + | |
| 94 | 90 | await commit('setLoginOut', {}); |
| 95 | 91 | uni.$u.route('/pages/main/my/login/login'); |
| 96 | 92 | }, |
| ... | ... | @@ -101,8 +97,8 @@ const actions = { |
| 101 | 97 | state |
| 102 | 98 | }, params) { |
| 103 | 99 | |
| 104 | - const result = await getUserInfoApi(); | |
| 105 | - | |
| 100 | + const result = await getUserInfoApi(); | |
| 101 | + | |
| 106 | 102 | commit('setUserInfo', result); |
| 107 | 103 | |
| 108 | 104 | uni.$u.vuex('vuex_user', result); |
| ... | ... | @@ -117,22 +113,23 @@ const mutations = { |
| 117 | 113 | setLogin(state, result) { |
| 118 | 114 | let vuex_token = `Bearer ${result.access_token}` |
| 119 | 115 | uni.$u.vuex('vuex_token', vuex_token); |
| 116 | + uni.$u.vuex('refresh_token', result.refresh_token); | |
| 120 | 117 | uni.$u.vuex('vuex_phone', result.phone); |
| 121 | 118 | uni.$u.vuex('hasLogin', true); |
| 122 | - }, | |
| 123 | - | |
| 124 | - setLoginOut(state, result) { | |
| 125 | - uni.$u.vuex('vuex_token', ''); | |
| 126 | - uni.$u.vuex('vuex_phone', ''); | |
| 127 | - uni.$u.vuex('vuex_user', {}); | |
| 128 | - uni.$u.vuex('hasLogin', false); | |
| 129 | - }, | |
| 130 | - | |
| 131 | - setUserInfo(state, result) { | |
| 132 | - state.userInfo = result; | |
| 133 | - }, | |
| 134 | - | |
| 135 | - | |
| 119 | + }, | |
| 120 | + | |
| 121 | + setLoginOut(state, result) { | |
| 122 | + uni.$u.vuex('vuex_token', ''); | |
| 123 | + uni.$u.vuex('vuex_phone', ''); | |
| 124 | + uni.$u.vuex('vuex_user', {}); | |
| 125 | + uni.$u.vuex('hasLogin', false); | |
| 126 | + }, | |
| 127 | + | |
| 128 | + setUserInfo(state, result) { | |
| 129 | + state.userInfo = result; | |
| 130 | + }, | |
| 131 | + | |
| 132 | + | |
| 136 | 133 | |
| 137 | 134 | } |
| 138 | 135 | ... | ... |
请
注册
或
登录
后发表评论