提交 8a1bd9c62f297819bb40deb1422fd1df18739b11
Merge branch 'developer/yxly-teacher-genglw-20220713' into develop
正在显示
16 个修改的文件
包含
4164 行增加
和
104 行删除
| @@ -66,10 +66,10 @@ export default { | @@ -66,10 +66,10 @@ export default { | ||
| 66 | this.page++; | 66 | this.page++; |
| 67 | 67 | ||
| 68 | await this._getList(); | 68 | await this._getList(); |
| 69 | - | ||
| 70 | - | 69 | + |
| 70 | + console.log(this.total, this.list.length) | ||
| 71 | // 判断是否全部加载完成 | 71 | // 判断是否全部加载完成 |
| 72 | - if (this.total == 0) { | 72 | + if (this.total == this.list.length) { |
| 73 | this.finished = true; | 73 | this.finished = true; |
| 74 | this.loading = 'nomore'; | 74 | this.loading = 'nomore'; |
| 75 | } else { | 75 | } else { |
| 1 | <template> | 1 | <template> |
| 2 | <view class="u-button"> | 2 | <view class="u-button"> |
| 3 | - <u-button :text="text" color="#0CB17A" :plain="false" :hairline="false" :disabled="disabled" :throttleTime="1500" | ||
| 4 | - type="info" shape="circle" :open-type="openType" @getphonenumber="getPhoneNumber" | 3 | + <u-button :text="text" :color="reversedColor" :plain="false" :hairline="false" :disabled="disabled" |
| 4 | + :throttleTime="1500" type="default" :open-type="openType" @getphonenumber="getPhoneNumber" | ||
| 5 | :custom-style="getCustomStyle" @click="click"> | 5 | :custom-style="getCustomStyle" @click="click"> |
| 6 | </u-button> | 6 | </u-button> |
| 7 | </view> | 7 | </view> |
| @@ -38,51 +38,70 @@ | @@ -38,51 +38,70 @@ | ||
| 38 | default: '' | 38 | default: '' |
| 39 | }, | 39 | }, |
| 40 | 40 | ||
| 41 | + | ||
| 41 | }, | 42 | }, |
| 42 | data() { | 43 | data() { |
| 43 | return {} | 44 | return {} |
| 44 | }, | 45 | }, |
| 45 | 46 | ||
| 46 | - watch: { | ||
| 47 | - buttonType: function(newVal, oldVal) { | 47 | + computed: { |
| 48 | + getCustomStyle() { | ||
| 49 | + | ||
| 50 | + const { | ||
| 51 | + type = '' | ||
| 52 | + } = this; | ||
| 53 | + | ||
| 54 | + let style = {}; | ||
| 55 | + | ||
| 56 | + switch (type) { | ||
| 57 | + case 'confirm': | ||
| 58 | + return Object.assign({}, { | ||
| 59 | + border: 'none', | ||
| 60 | + color: '#FFFFFF', | ||
| 61 | + }, this.customStyle); | ||
| 62 | + break; | ||
| 63 | + | ||
| 64 | + case 'cancel': | ||
| 65 | + return Object.assign({}, { | ||
| 66 | + border: 'none', | ||
| 67 | + color: 'rgba(0, 0, 0, 0.4500)', | ||
| 68 | + }, this.customStyle); | ||
| 69 | + break; | ||
| 70 | + } | ||
| 71 | + }, | ||
| 72 | + | ||
| 73 | + reversedColor() { | ||
| 74 | + | ||
| 75 | + let color = '#0CB17A'; | ||
| 76 | + | ||
| 48 | switch (this.type) { | 77 | switch (this.type) { |
| 49 | case 'confirm': | 78 | case 'confirm': |
| 50 | - this.color = "#0CB17A"; | 79 | + color = "#0CB17A"; |
| 80 | + break; | ||
| 81 | + | ||
| 82 | + case 'cancel': | ||
| 83 | + color = "rgba(0, 0, 0, 0.0600)"; | ||
| 51 | break; | 84 | break; |
| 52 | } | 85 | } |
| 86 | + | ||
| 87 | + return color; | ||
| 53 | } | 88 | } |
| 54 | }, | 89 | }, |
| 55 | 90 | ||
| 56 | - computed: { | ||
| 57 | - // getCustomStyle() { | ||
| 58 | - | ||
| 59 | - // const { | ||
| 60 | - // type = '' | ||
| 61 | - // } = this; | ||
| 62 | - | ||
| 63 | - // let style = {}; | ||
| 64 | - | ||
| 65 | - // switch (type) { | ||
| 66 | - // case 'confirm': | ||
| 67 | - // return Object.assign({}, { | ||
| 68 | - // backgroundColor: '#FF001A', | ||
| 69 | - // borderRadius: '8rpx', | ||
| 70 | - // }, this.customStyle); | ||
| 71 | - // break; | ||
| 72 | - | ||
| 73 | - // case 'cancel': | ||
| 74 | - // return Object.assign({}, { | ||
| 75 | - // backgroundColor: "rgba(0,0,0,0.15)", | ||
| 76 | - // borderRadius: '8rpx', | ||
| 77 | - // }, this.customStyle); | ||
| 78 | - // break; | ||
| 79 | - | ||
| 80 | - // case 'custom': | ||
| 81 | - // return Object.assign({}, this.customStyle); | ||
| 82 | - // break; | ||
| 83 | - // } | ||
| 84 | - // } | ||
| 85 | - }, | 91 | + // watch: { |
| 92 | + // buttonType: function(newVal, oldVal) { | ||
| 93 | + // switch (this.type) { | ||
| 94 | + // case 'confirm': | ||
| 95 | + // this.color = "#0CB17A"; | ||
| 96 | + // break; | ||
| 97 | + | ||
| 98 | + // case 'cancel': | ||
| 99 | + // this.color = "#0CB17A"; | ||
| 100 | + // break; | ||
| 101 | + // } | ||
| 102 | + // } | ||
| 103 | + // }, | ||
| 104 | + | ||
| 86 | methods: { | 105 | methods: { |
| 87 | // 按钮点击 | 106 | // 按钮点击 |
| 88 | click(e) { | 107 | click(e) { |
| @@ -97,5 +116,8 @@ | @@ -97,5 +116,8 @@ | ||
| 97 | </script> | 116 | </script> |
| 98 | 117 | ||
| 99 | <style lang="scss"> | 118 | <style lang="scss"> |
| 100 | - | 119 | + .u-button /deep/ .u-button { |
| 120 | + border: nones; | ||
| 121 | + border-radius: 8rpx; | ||
| 122 | + } | ||
| 101 | </style> | 123 | </style> |
| 1 | <template> | 1 | <template> |
| 2 | <view class="m-loading"> | 2 | <view class="m-loading"> |
| 3 | - <u-loadmore :status="loading" :icon="icon" :loadText="loadText" bgColor="#F7F7F7" marginTop='12rpx' marginBottom='12rpx'></u-loadmore> | 3 | + <u-loadmore :status="loading" :line="true" bgColor="#F7F7F7" fontSize="28rpx" iconSize="34rpx"></u-loadmore> |
| 4 | </view> | 4 | </view> |
| 5 | </template> | 5 | </template> |
| 6 | 6 | ||
| @@ -10,21 +10,7 @@ | @@ -10,21 +10,7 @@ | ||
| 10 | loading: { | 10 | loading: { |
| 11 | type: String, | 11 | type: String, |
| 12 | default: 'loadmore' | 12 | default: 'loadmore' |
| 13 | - }, | ||
| 14 | - icon: { | ||
| 15 | - type: Boolean, | ||
| 16 | - default: true | ||
| 17 | - }, | ||
| 18 | - loadText: { | ||
| 19 | - type: Object, | ||
| 20 | - default () { | ||
| 21 | - return { | ||
| 22 | - loadmore: '点击或上拉加载更多', | ||
| 23 | - loading: '正在加载', | ||
| 24 | - nomore: '没有更多了' | ||
| 25 | - } | ||
| 26 | - } | ||
| 27 | - } | 13 | + }, |
| 28 | }, | 14 | }, |
| 29 | data() { | 15 | data() { |
| 30 | return {}; | 16 | return {}; |
| 1 | <template> | 1 | <template> |
| 2 | - <view class="c-no-data" :style="[wrapStyle]" > | 2 | + <view class="c-no-data" :style="[wrapStyle]"> |
| 3 | <view class="image"> | 3 | <view class="image"> |
| 4 | - <u-image :src="vuex_baseImgUrl+'/nodata.png'" width="260rpx" height="200rpx"></u-image> | 4 | + <u-image :src="vuex_baseImgUrl+'/no_data.png'" width="480rpx" height="480rpx"></u-image> |
| 5 | </view> | 5 | </view> |
| 6 | - <view class="title">{{ title }}</view> | 6 | + <view class="title" :style="[topStyle]">{{ title }}</view> |
| 7 | </view> | 7 | </view> |
| 8 | </template> | 8 | </template> |
| 9 | 9 | ||
| @@ -19,10 +19,10 @@ | @@ -19,10 +19,10 @@ | ||
| 19 | title: { | 19 | title: { |
| 20 | type: String, | 20 | type: String, |
| 21 | default: '暂无数据' | 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 | data() { | 28 | data() { |
| @@ -34,14 +34,21 @@ | @@ -34,14 +34,21 @@ | ||
| 34 | 34 | ||
| 35 | }, | 35 | }, |
| 36 | computed: { | 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 | methods: { | 50 | methods: { |
| 44 | - | 51 | + |
| 45 | 52 | ||
| 46 | } | 53 | } |
| 47 | }; | 54 | }; |
| @@ -50,18 +57,22 @@ | @@ -50,18 +57,22 @@ | ||
| 50 | <style scoped lang="scss"> | 57 | <style scoped lang="scss"> |
| 51 | .c-no-data { | 58 | .c-no-data { |
| 52 | width: 100%; | 59 | width: 100%; |
| 60 | + position: relative; | ||
| 53 | 61 | ||
| 54 | .image { | 62 | .image { |
| 55 | - width: 260rpx; | 63 | + width: 480rpx; |
| 56 | margin: 0 auto; | 64 | margin: 0 auto; |
| 57 | } | 65 | } |
| 58 | 66 | ||
| 59 | .title { | 67 | .title { |
| 60 | - margin: 48rpx 0 0 0; | 68 | + width: 100%; |
| 69 | + position: absolute; | ||
| 70 | + top: 560rpx; | ||
| 71 | + left: 0rpx; | ||
| 61 | text-align: center; | 72 | text-align: center; |
| 62 | - font-size: 28rpx; | ||
| 63 | - line-height: 40rpx; | ||
| 64 | - color: #000000; | 73 | + font-size: 24rpx; |
| 74 | + line-height: 52rpx; | ||
| 75 | + color: #909097; | ||
| 65 | } | 76 | } |
| 66 | } | 77 | } |
| 67 | </style> | 78 | </style> |
| 1 | const http = uni.$u.http | 1 | const http = uni.$u.http |
| 2 | 2 | ||
| 3 | +// 获取oss对应的图片地址 | ||
| 4 | +export const getImgUrlApi = (params) => http.get('/basic/v1/oss/sign_url', { | ||
| 5 | + params: params | ||
| 6 | +}) | ||
| 7 | + | ||
| 8 | +// OssInit初始化 | ||
| 9 | +export const getOssInitApi = (params) => http.get('/basic/v1/oss/policy', { | ||
| 10 | + params: params | ||
| 11 | +}) | ||
| 12 | + | ||
| 3 | // 获取token | 13 | // 获取token |
| 4 | -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 | +}) | ||
| 5 | 19 | ||
| 6 | // 获取用户信息 | 20 | // 获取用户信息 |
| 7 | -export const getUserInfoApi = (data) => http.get('/user/v1/detail', { | ||
| 8 | - params: data | 21 | +export const getUserInfoApi = (params) => http.get('/user/v1/detail', { |
| 22 | + params: params | ||
| 9 | }) | 23 | }) |
| 10 | 24 | ||
| 11 | // 获取短信验证码 | 25 | // 获取短信验证码 |
| 12 | -export const getSmsCodeApi = (data) => http.get('/basic/v1/sms_code/get', { | ||
| 13 | - params: data | 26 | +export const getSmsCodeApi = (params) => http.get('/basic/v1/sms_code/get', { |
| 27 | + params: params | ||
| 28 | +}) | ||
| 29 | + | ||
| 30 | +// 更新用户信息 | ||
| 31 | +export const updateUserInfoApi = (params) => http.put('/user/v1/update', params); | ||
| 32 | + | ||
| 33 | +//注销账户 | ||
| 34 | +export const delAccountApi = (params) => http.delete('/user/v1/annuluser', params); | ||
| 35 | + | ||
| 36 | +//撤销注销账户 | ||
| 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 | +}) | ||
| 46 | + | ||
| 47 | +// 切换老师身份 | ||
| 48 | +export const putTeacherRolesApi = (id, params) => http.put(`/user/v1/teacher/${id}/change_role`, params); | ||
| 49 | + | ||
| 50 | +// 待办事项统计 | ||
| 51 | +export const getTodoListStatisticsApi = (params) => http.get('/internship/v1/index/applet/waitHandleList', { | ||
| 52 | + params: params | ||
| 53 | +}) | ||
| 54 | + | ||
| 55 | +// 实习项目列表 | ||
| 56 | +export const getProjectListApi = (params) => http.get('/internship/v1/project/simpleList', { | ||
| 57 | + params: params | ||
| 58 | +}) | ||
| 59 | + | ||
| 60 | +// 报名审核列表 | ||
| 61 | +export const getRegistrationReviewApi = (params) => http.get('/internship/v1/entry/list', { | ||
| 62 | + params: params | ||
| 63 | +}) | ||
| 64 | + | ||
| 65 | +//报名审核详情 | ||
| 66 | +export const getRegistrationDetailApi = (id, params) => http.get(`/internship/v1/entry/detail/${id}`, { | ||
| 67 | + params: params | ||
| 68 | +}) | ||
| 69 | + | ||
| 70 | +// 报名审核 | ||
| 71 | +export const putRegistrationReviewApi = (params) => http.put(`/internship/v1/entry/audit`, params); | ||
| 72 | + | ||
| 73 | +// 学生签到列表 | ||
| 74 | +export const getStudentSignInListApi = (params) => http.get('/internship/v1/attendance/applet/list', { | ||
| 75 | + params: params | ||
| 76 | +}) | ||
| 77 | + | ||
| 78 | +// 日志批阅列表 | ||
| 79 | +export const getLogReviewListApi = (params) => http.get('/internship/v1/form_log/school/list', { | ||
| 80 | + params: params | ||
| 81 | +}) | ||
| 82 | + | ||
| 83 | +// 实习日志详情 | ||
| 84 | +export const getLogDetailApi = (id, params) => http.get(`/internship/v1/form_log/detail/${id}`, { | ||
| 85 | + params: params | ||
| 86 | +}) | ||
| 87 | + | ||
| 88 | +// 日志批阅 | ||
| 89 | +export const putLogReviewApi = (params) => http.put(`/internship/v1/form_log/approve`, params); | ||
| 90 | + | ||
| 91 | +// 日志回复列表 | ||
| 92 | +export const getLogReplyListApi = (params) => http.get('/internship/v1/form_log_review/list', { | ||
| 93 | + params: params | ||
| 94 | +}) | ||
| 95 | + | ||
| 96 | +// 创建日志回复 | ||
| 97 | +export const postLogReplyApi = (params) => http.post(`/internship/v1/form_log_review/save`, params); | ||
| 98 | + | ||
| 99 | +// 报告批阅列表 | ||
| 100 | +export const getReportReviewListApi = (params) => http.get('/internship/v1/report/list', { | ||
| 101 | + params: params | ||
| 102 | +}) | ||
| 103 | + | ||
| 104 | +// 实习报告详情 | ||
| 105 | +export const getReportDetailApi = (id, params) => http.get(`/internship/v1/report/detail_by_student/${id}`, { | ||
| 106 | + params: params | ||
| 107 | +}) | ||
| 108 | + | ||
| 109 | +//报告批阅 | ||
| 110 | +export const putReportReviewApi = (id, params) => http.put(`/internship/v1/report/examine/${id}`, params); | ||
| 111 | + | ||
| 112 | +//审批记录 | ||
| 113 | +export const getReportApprovalListApi = (formId, params) => http.get(`/internship/v1/report/examine_list/${formId}`, { | ||
| 114 | + params: params | ||
| 115 | +}) | ||
| 116 | + | ||
| 117 | +// 成绩鉴定列表 | ||
| 118 | +export const getAchievementAppraisalListApi = (params) => http.get('/internship/v1/form/achievementAppraisalList', { | ||
| 119 | + params: params | ||
| 120 | +}) | ||
| 121 | + | ||
| 122 | +// 成绩鉴定详情 | ||
| 123 | +export const getAchievementDetailApi = (id, params) => http.get( | ||
| 124 | + `/internship/v1/form/achievementAppraisalDetail/${id}`, { | ||
| 125 | + params: params | ||
| 126 | + }) | ||
| 127 | + | ||
| 128 | +//成绩鉴定 | ||
| 129 | +export const putAchievementAppraisalApi = (params) => http.post(`/internship/v1/form/evaluate`, params); | ||
| 130 | + | ||
| 131 | +// 班级列表 | ||
| 132 | +export const getClassListApi = (params) => http.get('/internship/v1/form/listByTeacherApplet', { | ||
| 133 | + params: params | ||
| 134 | +}) | ||
| 135 | + | ||
| 136 | +// 学生列表 | ||
| 137 | +export const getStudentListApi = (params) => http.get('/internship/v1/form/traineeList', { | ||
| 138 | + params: params | ||
| 139 | +}) | ||
| 140 | + | ||
| 141 | +//实习过程详情 | ||
| 142 | +export const getInternshipProcessDetailApi = (params) => http.get(`/internship/v1/form/internshipProcess`, { | ||
| 143 | + params: params | ||
| 144 | +}) | ||
| 145 | + | ||
| 146 | +// 三方协议列表 | ||
| 147 | +export const getAgreementListApi = (params) => http.get('/internship/v1/treaty/list_by_school', { | ||
| 148 | + params: params | ||
| 149 | +}) | ||
| 150 | + | ||
| 151 | +//三方协议详情 | ||
| 152 | +export const getAgreementDetailApi = (id, params) => http.get(`/internship/v1/treaty/detail/${id}`, { | ||
| 153 | + params: params | ||
| 154 | +}) | ||
| 155 | + | ||
| 156 | +//签到列表 | ||
| 157 | +export const getsignInListApi = (params) => http.get('/internship/v1/attendance/applet/monthAttendanceList', { | ||
| 158 | + params: params | ||
| 159 | +}) | ||
| 160 | + | ||
| 161 | +// 实习岗位列表 | ||
| 162 | +export const getInternshipJobListApi = (params) => http.get('/internship/v1/form/internshipJob', { | ||
| 163 | + params: params | ||
| 164 | +}) | ||
| 165 | + | ||
| 166 | +// 实践课程列表 | ||
| 167 | +export const getPracticalCoursesListApi = (params) => http.get('/internship/v1/form/internshipCourse', { | ||
| 168 | + params: params | ||
| 169 | +}) | ||
| 170 | + | ||
| 171 | +//实习单详情 | ||
| 172 | +export const getInternshipDetailApi = (id, params) => http.get(`/internship/v1/form/detail/${id}`, { | ||
| 173 | + params: params | ||
| 14 | }) | 174 | }) |
| 175 | + | ||
| 176 | + | ||
| 177 | + |
| @@ -5,9 +5,11 @@ module.exports = (vm) => { | @@ -5,9 +5,11 @@ module.exports = (vm) => { | ||
| 5 | /* config 为默认全局配置*/ | 5 | /* config 为默认全局配置*/ |
| 6 | 6 | ||
| 7 | // 测试环境 | 7 | // 测试环境 |
| 8 | - config.baseURL = "http://39.104.52.206:8000"; | 8 | + config.baseURL = "http://47.110.250.177:8000"; |
| 9 | + | ||
| 9 | // 预生产环境 | 10 | // 预生产环境 |
| 10 | - // config.baseURL = "https://api-isxpre.workai.com.cn"; | 11 | + // config.baseURL = "https://api-isxpre.workai.com.cn"; |
| 12 | + | ||
| 11 | // 线上环境 | 13 | // 线上环境 |
| 12 | // config.baseURL = "https://api-isx.workai.com.cn"; | 14 | // config.baseURL = "https://api-isx.workai.com.cn"; |
| 13 | 15 | ||
| @@ -68,15 +70,17 @@ module.exports = (vm) => { | @@ -68,15 +70,17 @@ module.exports = (vm) => { | ||
| 68 | 70 | ||
| 69 | // 响应拦截 | 71 | // 响应拦截 |
| 70 | uni.$u.http.interceptors.response.use((response) => { | 72 | uni.$u.http.interceptors.response.use((response) => { |
| 73 | + | ||
| 71 | /* 对响应成功做点什么 可使用async await 做异步操作*/ | 74 | /* 对响应成功做点什么 可使用async await 做异步操作*/ |
| 72 | const data = response.data | 75 | const data = response.data |
| 73 | 76 | ||
| 74 | // 自定义参数 | 77 | // 自定义参数 |
| 75 | const custom = response.config?.custom | 78 | const custom = response.config?.custom |
| 76 | if (data.code !== 200) { | 79 | if (data.code !== 200) { |
| 80 | + | ||
| 77 | // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 | 81 | // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 |
| 78 | if (custom.toast !== false) { | 82 | if (custom.toast !== false) { |
| 79 | - uni.$u.toast(data.message) | 83 | + uni.$u.toast(data.msg) |
| 80 | } | 84 | } |
| 81 | 85 | ||
| 82 | // 如果需要catch返回,则进行reject | 86 | // 如果需要catch返回,则进行reject |
| @@ -88,8 +92,26 @@ module.exports = (vm) => { | @@ -88,8 +92,26 @@ module.exports = (vm) => { | ||
| 88 | } | 92 | } |
| 89 | } | 93 | } |
| 90 | return data.data === undefined ? {} : data.data | 94 | return data.data === undefined ? {} : data.data |
| 95 | + | ||
| 91 | }, (response) => { | 96 | }, (response) => { |
| 92 | // 对响应错误做点什么 (statusCode !== 200) | 97 | // 对响应错误做点什么 (statusCode !== 200) |
| 98 | + console.log(response) | ||
| 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 | + | ||
| 107 | + vm.$u.vuex('hasLogin', false); | ||
| 108 | + vm.$u.vuex('vuex_token', ''); | ||
| 109 | + | ||
| 110 | + }, 1500) | ||
| 111 | + return false; | ||
| 112 | + | ||
| 113 | + } | ||
| 114 | + | ||
| 93 | return Promise.reject(response) | 115 | return Promise.reject(response) |
| 94 | }) | 116 | }) |
| 95 | } | 117 | } |
| 1 | { | 1 | { |
| 2 | - "name" : "job-sharing", | 2 | + "name" : "yxly-teacher", |
| 3 | "appid" : "__UNI__C6035C1", | 3 | "appid" : "__UNI__C6035C1", |
| 4 | "description" : "多平台快速开发的UI框架", | 4 | "description" : "多平台快速开发的UI框架", |
| 5 | "versionName" : "1.8.5", | 5 | "versionName" : "1.8.5", |
| @@ -102,7 +102,7 @@ | @@ -102,7 +102,7 @@ | ||
| 102 | }, | 102 | }, |
| 103 | "quickapp" : {}, | 103 | "quickapp" : {}, |
| 104 | "mp-weixin" : { | 104 | "mp-weixin" : { |
| 105 | - "appid" : "wx84b71301436652ce", | 105 | + "appid" : "wx6cd2152282abd34c", |
| 106 | "setting" : { | 106 | "setting" : { |
| 107 | "urlCheck" : false, | 107 | "urlCheck" : false, |
| 108 | "es6" : true, | 108 | "es6" : true, |
| @@ -7,23 +7,23 @@ | @@ -7,23 +7,23 @@ | ||
| 7 | "current": 0, //当前激活的模式(list 的索引项) | 7 | "current": 0, //当前激活的模式(list 的索引项) |
| 8 | "list": [{ | 8 | "list": [{ |
| 9 | "name": "defult", //模式名称 | 9 | "name": "defult", //模式名称 |
| 10 | - "path": "pages/main/my/mobileLogin/mobileLogin", | ||
| 11 | - "query": "" | 10 | + "path": "pages/main/internship/signInList/signInList", |
| 11 | + "query": "studentId=1555434161240838146" | ||
| 12 | }] | 12 | }] |
| 13 | }, | 13 | }, |
| 14 | "pages": [{ | 14 | "pages": [{ |
| 15 | "path": "pages/tabBar/home/home", | 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 | { |
| 23 | "path": "pages/tabBar/internship/internship", | 22 | "path": "pages/tabBar/internship/internship", |
| 24 | "style": { | 23 | "style": { |
| 25 | - "navigationStyle": "custom", | ||
| 26 | - "navigationBarTitleText": "" | 24 | + "navigationBarTitleText": "我的实习生", |
| 25 | + "navigationBarTextStyle": "black", | ||
| 26 | + "enablePullDownRefresh": false | ||
| 27 | } | 27 | } |
| 28 | }, | 28 | }, |
| 29 | { | 29 | { |
| @@ -34,26 +34,268 @@ | @@ -34,26 +34,268 @@ | ||
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | ], | 36 | ], |
| 37 | + | ||
| 37 | "subPackages": [{ | 38 | "subPackages": [{ |
| 38 | - "root": "pages/main/my", | ||
| 39 | - "pages": [{ | ||
| 40 | - "path": "login/login", | 39 | + "root": "pages/main/home", |
| 40 | + "pages": [ | ||
| 41 | + | ||
| 42 | + { | ||
| 43 | + "path": "registrationReview/registrationReview", | ||
| 44 | + "style": { | ||
| 45 | + "navigationBarTitleText": "报名审核", | ||
| 46 | + "enablePullDownRefresh": false | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + }, { | ||
| 50 | + "path": "registrationDetail/registrationDetail", | ||
| 51 | + "style": { | ||
| 52 | + "navigationBarTitleText": "报名详情", | ||
| 53 | + "enablePullDownRefresh": false | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + }, { | ||
| 57 | + "path": "studentSignIn/studentSignIn", | ||
| 58 | + "style": { | ||
| 59 | + "navigationBarTitleText": "学生签到", | ||
| 60 | + "enablePullDownRefresh": false | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + }, { | ||
| 64 | + "path": "logReview/logReview", | ||
| 65 | + "style": { | ||
| 66 | + "navigationBarTitleText": "日志批阅", | ||
| 67 | + "enablePullDownRefresh": false | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + }, { | ||
| 71 | + "path": "logDetail/logDetail", | ||
| 72 | + "style": { | ||
| 73 | + "navigationBarTitleText": "日志详情", | ||
| 74 | + "enablePullDownRefresh": false | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + }, { | ||
| 78 | + "path": "reportReview/reportReview", | ||
| 79 | + "style": { | ||
| 80 | + "navigationBarTitleText": "报告批阅", | ||
| 81 | + "enablePullDownRefresh": false | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + }, { | ||
| 85 | + "path": "reportDetail/reportDetail", | ||
| 86 | + "style": { | ||
| 87 | + "navigationBarTitleText": "报告详情", | ||
| 88 | + "enablePullDownRefresh": false | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + }, { | ||
| 92 | + "path": "approvalRecord/approvalRecord", | ||
| 93 | + "style": { | ||
| 94 | + "navigationBarTitleText": "审批记录", | ||
| 95 | + "enablePullDownRefresh": false | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + }, { | ||
| 99 | + "path": "achievementAppraisal/achievementAppraisal", | ||
| 100 | + "style": { | ||
| 101 | + "navigationBarTitleText": "成绩鉴定", | ||
| 102 | + "enablePullDownRefresh": false | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + }, { | ||
| 106 | + "path": "achievementDetail/achievementDetail", | ||
| 107 | + "style": { | ||
| 108 | + "navigationBarTitleText": "鉴定详情", | ||
| 109 | + "enablePullDownRefresh": false | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + } | ||
| 113 | + ] | ||
| 114 | + }, | ||
| 115 | + { | ||
| 116 | + "root": "pages/main/internship", | ||
| 117 | + "pages": [{ | ||
| 118 | + "path": "studentList/studentList", | ||
| 41 | "style": { | 119 | "style": { |
| 42 | - "navigationBarTitleText": "登录", | 120 | + "navigationBarTitleText": "实习生列表", |
| 43 | "enablePullDownRefresh": false | 121 | "enablePullDownRefresh": false |
| 44 | } | 122 | } |
| 45 | 123 | ||
| 46 | - }, | ||
| 47 | - { | ||
| 48 | - "path": "mobileLogin/mobileLogin", | 124 | + }, { |
| 125 | + "path": "traineeDetail/traineeDetail", | ||
| 49 | "style": { | 126 | "style": { |
| 50 | - "navigationBarTitleText": "手机登录", | 127 | + "navigationBarTitleText": "学生信息", |
| 51 | "enablePullDownRefresh": false | 128 | "enablePullDownRefresh": false |
| 52 | } | 129 | } |
| 53 | 130 | ||
| 54 | - } | ||
| 55 | - ] | ||
| 56 | - }], | 131 | + } ,{ |
| 132 | + "path" : "agreementList/agreementList", | ||
| 133 | + "style" : | ||
| 134 | + { | ||
| 135 | + "navigationBarTitleText": "三方协议", | ||
| 136 | + "enablePullDownRefresh": false | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + } | ||
| 140 | + ,{ | ||
| 141 | + "path" : "agreementDetail/agreementDetail", | ||
| 142 | + "style" : | ||
| 143 | + { | ||
| 144 | + "navigationBarTitleText": "协议详情", | ||
| 145 | + "enablePullDownRefresh": false | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + } | ||
| 149 | + ,{ | ||
| 150 | + "path" : "signInList/signInList", | ||
| 151 | + "style" : | ||
| 152 | + { | ||
| 153 | + "navigationBarTitleText": "签到", | ||
| 154 | + "enablePullDownRefresh": false | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + } | ||
| 158 | + ,{ | ||
| 159 | + "path" : "intershipInfo/intershipInfo", | ||
| 160 | + "style" : | ||
| 161 | + { | ||
| 162 | + "navigationBarTitleText": "实习单详情", | ||
| 163 | + "enablePullDownRefresh": false | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + } | ||
| 167 | + ,{ | ||
| 168 | + "path" : "achievementDetail/achievementDetail", | ||
| 169 | + "style" : | ||
| 170 | + { | ||
| 171 | + "navigationBarTitleText": "成绩详情", | ||
| 172 | + "enablePullDownRefresh": false | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + } | ||
| 176 | + ,{ | ||
| 177 | + "path" : "studentLogReview/studentLogReview", | ||
| 178 | + "style" : | ||
| 179 | + { | ||
| 180 | + "navigationBarTitleText": "", | ||
| 181 | + "enablePullDownRefresh": false | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + } | ||
| 185 | + ] | ||
| 186 | + }, | ||
| 187 | + { | ||
| 188 | + "root": "pages/main/my", | ||
| 189 | + "pages": [{ | ||
| 190 | + "path": "login/login", | ||
| 191 | + "style": { | ||
| 192 | + "navigationBarTitleText": "登录", | ||
| 193 | + "enablePullDownRefresh": false | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + }, | ||
| 197 | + { | ||
| 198 | + "path": "mobileLogin/mobileLogin", | ||
| 199 | + "style": { | ||
| 200 | + "navigationBarTitleText": "手机登录", | ||
| 201 | + "enablePullDownRefresh": false | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + }, { | ||
| 205 | + "path": "accountSafe/accountSafe", | ||
| 206 | + "style": { | ||
| 207 | + "navigationBarTitleText": "账号与安全", | ||
| 208 | + "enablePullDownRefresh": false | ||
| 209 | + } | ||
| 210 | + | ||
| 211 | + }, { | ||
| 212 | + "path": "editAccount/editAccount", | ||
| 213 | + "style": { | ||
| 214 | + "navigationBarTitleText": "修改账号", | ||
| 215 | + "enablePullDownRefresh": false | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + }, { | ||
| 219 | + "path": "editMobile/editMobile", | ||
| 220 | + "style": { | ||
| 221 | + "navigationBarTitleText": "修改手机号", | ||
| 222 | + "enablePullDownRefresh": false | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + }, { | ||
| 226 | + "path": "editPassword/editPassword", | ||
| 227 | + "style": { | ||
| 228 | + "navigationBarTitleText": "修改密码", | ||
| 229 | + "enablePullDownRefresh": false | ||
| 230 | + } | ||
| 231 | + | ||
| 232 | + }, { | ||
| 233 | + "path": "removeAccount/removeAccount", | ||
| 234 | + "style": { | ||
| 235 | + "navigationBarTitleText": "注销账户", | ||
| 236 | + "enablePullDownRefresh": false | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + }, { | ||
| 240 | + "path": "againRemove/againRemove", | ||
| 241 | + "style": { | ||
| 242 | + "navigationBarTitleText": "注销账户", | ||
| 243 | + "enablePullDownRefresh": false | ||
| 244 | + } | ||
| 245 | + | ||
| 246 | + }, { | ||
| 247 | + "path": "freezing/freezing", | ||
| 248 | + "style": { | ||
| 249 | + "navigationBarTitleText": "", | ||
| 250 | + "enablePullDownRefresh": false | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + }, { | ||
| 254 | + "path": "writtenOff/writtenOff", | ||
| 255 | + "style": { | ||
| 256 | + "navigationBarTitleText": "", | ||
| 257 | + "enablePullDownRefresh": false | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + }, { | ||
| 261 | + "path": "policiesAgreement/policiesAgreement", | ||
| 262 | + "style": { | ||
| 263 | + "navigationBarTitleText": "政策与协议", | ||
| 264 | + "enablePullDownRefresh": false | ||
| 265 | + } | ||
| 266 | + | ||
| 267 | + }, { | ||
| 268 | + "path": "agreement/agreement", | ||
| 269 | + "style": { | ||
| 270 | + "navigationBarTitleText": "隐私协议", | ||
| 271 | + "enablePullDownRefresh": false | ||
| 272 | + } | ||
| 273 | + | ||
| 274 | + }, { | ||
| 275 | + "path": "userPolicy/userPolicy", | ||
| 276 | + "style": { | ||
| 277 | + "navigationBarTitleText": "用户政策", | ||
| 278 | + "enablePullDownRefresh": false | ||
| 279 | + } | ||
| 280 | + | ||
| 281 | + }, { | ||
| 282 | + "path": "versionInfo/versionInfo", | ||
| 283 | + "style": { | ||
| 284 | + "navigationBarTitleText": "版本信息", | ||
| 285 | + "enablePullDownRefresh": false | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + }, { | ||
| 289 | + "path": "personInfo/personInfo", | ||
| 290 | + "style": { | ||
| 291 | + "navigationBarTitleText": "个人信息", | ||
| 292 | + "enablePullDownRefresh": false | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + } | ||
| 296 | + ] | ||
| 297 | + } | ||
| 298 | + ], | ||
| 57 | 299 | ||
| 58 | "preloadRule": { | 300 | "preloadRule": { |
| 59 | 301 | ||
| @@ -69,7 +311,7 @@ | @@ -69,7 +311,7 @@ | ||
| 69 | 311 | ||
| 70 | "tabBar": { | 312 | "tabBar": { |
| 71 | "color": "#000000", | 313 | "color": "#000000", |
| 72 | - "selectedColor": "#F64114", | 314 | + "selectedColor": "#06B079", |
| 73 | "backgroundColor": "#FFFFFF", | 315 | "backgroundColor": "#FFFFFF", |
| 74 | "borderStyle": "black", | 316 | "borderStyle": "black", |
| 75 | "height": "100rpx", | 317 | "height": "100rpx", |
| @@ -82,8 +324,8 @@ | @@ -82,8 +324,8 @@ | ||
| 82 | }, | 324 | }, |
| 83 | { | 325 | { |
| 84 | "pagePath": "pages/tabBar/internship/internship", | 326 | "pagePath": "pages/tabBar/internship/internship", |
| 85 | - "iconPath": "/static/img/icon/position.png", | ||
| 86 | - "selectedIconPath": "/static/img/icon/positionHL.png", | 327 | + "iconPath": "/static/img/icon/internship.png", |
| 328 | + "selectedIconPath": "/static/img/icon/internshipHL.png", | ||
| 87 | "text": "实习" | 329 | "text": "实习" |
| 88 | }, | 330 | }, |
| 89 | { | 331 | { |
| 1 | +<template> | ||
| 2 | + <view class="registration_review"> | ||
| 3 | + <view class="search_box"> | ||
| 4 | + <view class="top"> | ||
| 5 | + <view class="check"> | ||
| 6 | + <u-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange"> | ||
| 7 | + <u-checkbox :customStyle="{marginBottom: '8px'}" shape="circle" | ||
| 8 | + v-for="(item, index) in checkboxList" :key="index" :label="item.name" :name="item.name" | ||
| 9 | + activeColor="#06B079" size="28rpx" labelSize="28rpx" labelColor="#202131"> | ||
| 10 | + </u-checkbox> | ||
| 11 | + </u-checkbox-group> | ||
| 12 | + </view> | ||
| 13 | + | ||
| 14 | + <view class="search"> | ||
| 15 | + <u-search placeholder="请输入学生姓名/学号/手机号" placeholderColor="#C1C1C9" searchIconSize="36" height="64rpx" | ||
| 16 | + bgColor="#F4F4F4" :showAction="false" shape="square" v-model="keyword" @search="handelSearch"> | ||
| 17 | + </u-search> | ||
| 18 | + </view> | ||
| 19 | + | ||
| 20 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | ||
| 21 | + </view> | ||
| 22 | + </view> | ||
| 23 | + | ||
| 24 | + <view class="list_box" v-if="list.length > 0"> | ||
| 25 | + <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> | ||
| 26 | + | ||
| 27 | + <view class="bg_image" v-if="item.appraisalStatus == 'no_appraisal'"> | ||
| 28 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | ||
| 29 | + <text>待鉴定</text> | ||
| 30 | + </view> | ||
| 31 | + | ||
| 32 | + <view class="bg_image" v-else> | ||
| 33 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | ||
| 34 | + <text>已鉴定</text> | ||
| 35 | + </view> | ||
| 36 | + | ||
| 37 | + <view class="info"> | ||
| 38 | + <view class="avatar">{{getNameLastTwo(item.studentName)}}</view> | ||
| 39 | + <view class="name">{{overflowHide(item.studentName, 6)}}</view> | ||
| 40 | + <view class="number">NO.{{item.studentNumber}}</view> | ||
| 41 | + </view> | ||
| 42 | + <view class="company"> | ||
| 43 | + <text>实习单号</text> | ||
| 44 | + <text>{{item.number || '--'}}</text> | ||
| 45 | + </view> | ||
| 46 | + <view class="company position"> | ||
| 47 | + <text>实习项目</text> | ||
| 48 | + <text>{{item.projectName|| '--'}}</text> | ||
| 49 | + </view> | ||
| 50 | + | ||
| 51 | + <view class="statistics"> | ||
| 52 | + <view> | ||
| 53 | + <text>{{item.uploadCount|| 0}}</text> | ||
| 54 | + <text>三方协议</text> | ||
| 55 | + </view> | ||
| 56 | + <view class="line"></view> | ||
| 57 | + <view> | ||
| 58 | + <text>{{item.weekLogCount|| 0}}</text> | ||
| 59 | + <text>周日志</text> | ||
| 60 | + </view> | ||
| 61 | + <view class="line"></view> | ||
| 62 | + <view> | ||
| 63 | + <text>{{item.internshipReportCount|| 0}}</text> | ||
| 64 | + <text>实习报告</text> | ||
| 65 | + </view> | ||
| 66 | + <view class="line"></view> | ||
| 67 | + <view> | ||
| 68 | + <text>{{item.attendanceCount|| 0}}</text> | ||
| 69 | + <text>签到</text> | ||
| 70 | + </view> | ||
| 71 | + </view> | ||
| 72 | + | ||
| 73 | + </view> | ||
| 74 | + <c-loading :loading="loading"></c-loading> | ||
| 75 | + </view> | ||
| 76 | + <view v-else class="no_data"> | ||
| 77 | + <c-no-data></c-no-data> | ||
| 78 | + </view> | ||
| 79 | + | ||
| 80 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | ||
| 81 | + <view class="popup_search"> | ||
| 82 | + <view class="content"> | ||
| 83 | + <view class="title">按项目筛选</view> | ||
| 84 | + <scroll-view class="scroll" scroll-y="true"> | ||
| 85 | + <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> | ||
| 86 | + <view class="selectItem" v-if="item.id == projectId"> | ||
| 87 | + <text>{{item.name}}</text> | ||
| 88 | + </view> | ||
| 89 | + <view v-else> | ||
| 90 | + <text>{{item.name}}</text> | ||
| 91 | + </view> | ||
| 92 | + </view> | ||
| 93 | + </scroll-view> | ||
| 94 | + <view class="switch"> | ||
| 95 | + <text>待鉴定</text> | ||
| 96 | + <u-switch v-model="switchValue" size="48" activeColor="#06B079" @change="handelChange"> | ||
| 97 | + </u-switch> | ||
| 98 | + </view> | ||
| 99 | + </view> | ||
| 100 | + | ||
| 101 | + <view class="footer"> | ||
| 102 | + <view class="left_btn"> | ||
| 103 | + <c-button type="cancel" text="重置" @click="handelCancel"> | ||
| 104 | + </c-button> | ||
| 105 | + </view> | ||
| 106 | + <view class="right_btn"> | ||
| 107 | + <c-button type="confirm" text="确定" @click="hancelSubmit"> | ||
| 108 | + </c-button> | ||
| 109 | + </view> | ||
| 110 | + </view> | ||
| 111 | + | ||
| 112 | + </view> | ||
| 113 | + </u-popup> | ||
| 114 | + | ||
| 115 | + </view> | ||
| 116 | +</template> | ||
| 117 | + | ||
| 118 | +<script> | ||
| 119 | + import { | ||
| 120 | + mapGetters, | ||
| 121 | + mapState, | ||
| 122 | + mapActions | ||
| 123 | + } from 'vuex' | ||
| 124 | + import listMixin from "@/common/mixins/list-mixin.js"; | ||
| 125 | + | ||
| 126 | + import { | ||
| 127 | + getAchievementAppraisalListApi, | ||
| 128 | + getProjectListApi, | ||
| 129 | + } from '@/config/api.js'; | ||
| 130 | + | ||
| 131 | + export default { | ||
| 132 | + mixins: [listMixin], | ||
| 133 | + data() { | ||
| 134 | + | ||
| 135 | + const d = new Date(); | ||
| 136 | + const year = d.getFullYear(); | ||
| 137 | + let month = d.getMonth() + 1; | ||
| 138 | + month = month < 10 ? `0${month}` : month; | ||
| 139 | + const date = d.getDate(); | ||
| 140 | + | ||
| 141 | + return { | ||
| 142 | + checkboxValue: [], | ||
| 143 | + // 基本案列数据 | ||
| 144 | + checkboxList: [{ | ||
| 145 | + name: '待鉴定', | ||
| 146 | + disabled: false | ||
| 147 | + }], | ||
| 148 | + keyword: '', | ||
| 149 | + show: false, | ||
| 150 | + search: { | ||
| 151 | + //搜索对象必须为key search的对象 | ||
| 152 | + keySearch: "", | ||
| 153 | + appraisalStatus: '', | ||
| 154 | + | ||
| 155 | + }, | ||
| 156 | + showTime: false, | ||
| 157 | + timeValue: `${year}-${month}-${date}`, | ||
| 158 | + defaultDateMultiple: [`${year}-${month}-${date}`], | ||
| 159 | + list: [], //列表必须为key list的数组 | ||
| 160 | + projectId: '', | ||
| 161 | + switchValue: false, | ||
| 162 | + | ||
| 163 | + } | ||
| 164 | + }, | ||
| 165 | + | ||
| 166 | + onLoad(option) { | ||
| 167 | + this.$store.dispatch(`home/getProjectList`, { | ||
| 168 | + pageSize: -1, | ||
| 169 | + }) | ||
| 170 | + | ||
| 171 | + this.search.keySearch = ''; | ||
| 172 | + | ||
| 173 | + if (option && option.appraisalStatus) { | ||
| 174 | + this.search.appraisalStatus = 'no_appraisal'; | ||
| 175 | + this.checkboxValue = ['待鉴定']; | ||
| 176 | + this.switchValue = true; | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + this.finished = false; | ||
| 180 | + this.loading = "loadmore"; | ||
| 181 | + this.page = 0; | ||
| 182 | + this.list = []; | ||
| 183 | + }, | ||
| 184 | + | ||
| 185 | + onShow() { | ||
| 186 | + this._getList(); | ||
| 187 | + }, | ||
| 188 | + | ||
| 189 | + computed: { | ||
| 190 | + ...mapState('home', { | ||
| 191 | + // 箭头函数可使代码更简练 | ||
| 192 | + projectList: 'projectList', | ||
| 193 | + | ||
| 194 | + }), | ||
| 195 | + | ||
| 196 | + }, | ||
| 197 | + | ||
| 198 | + methods: { | ||
| 199 | + | ||
| 200 | + getNameLastTwo(value) { | ||
| 201 | + if (value && value.length > 3) { | ||
| 202 | + return value.substring(value.length - 3) | ||
| 203 | + } else { | ||
| 204 | + return value; | ||
| 205 | + } | ||
| 206 | + }, | ||
| 207 | + | ||
| 208 | + overflowHide(value, num = 4) { | ||
| 209 | + if (value && value.length > num) { | ||
| 210 | + return `${value.slice(0, num)}...` | ||
| 211 | + } else { | ||
| 212 | + return value; | ||
| 213 | + } | ||
| 214 | + }, | ||
| 215 | + | ||
| 216 | + confirm(e) { | ||
| 217 | + this.timeValue = e[0]; | ||
| 218 | + this.showTime = false; | ||
| 219 | + }, | ||
| 220 | + | ||
| 221 | + handelDetail(record) { | ||
| 222 | + this.$u.route({ | ||
| 223 | + url: `pages/main/home/achievementDetail/achievementDetail?&id=${record.id}` | ||
| 224 | + }) | ||
| 225 | + }, | ||
| 226 | + | ||
| 227 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 228 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | ||
| 229 | + }, | ||
| 230 | + | ||
| 231 | + checkboxChange(n) { | ||
| 232 | + console.log('change', n); | ||
| 233 | + | ||
| 234 | + this.search.appraisalStatus = n.length > 0 ? 'no_appraisal' : ''; | ||
| 235 | + | ||
| 236 | + this.switchValue = n.length > 0 ? true : false; | ||
| 237 | + | ||
| 238 | + this.finished = false; | ||
| 239 | + this.loading = "loadmore"; | ||
| 240 | + this.page = 0; | ||
| 241 | + this.list = []; | ||
| 242 | + this._getList(); | ||
| 243 | + }, | ||
| 244 | + | ||
| 245 | + handelSearch(value) { | ||
| 246 | + this.finished = false; | ||
| 247 | + this.loading = "loadmore"; | ||
| 248 | + this.page = 0; | ||
| 249 | + this.list = []; | ||
| 250 | + this._getList(); | ||
| 251 | + }, | ||
| 252 | + | ||
| 253 | + open() { | ||
| 254 | + // console.log('open'); | ||
| 255 | + }, | ||
| 256 | + close() { | ||
| 257 | + this.show = false | ||
| 258 | + // console.log('close'); | ||
| 259 | + }, | ||
| 260 | + // scroll-view到底部加载更多 | ||
| 261 | + onreachBottom() {}, | ||
| 262 | + // 搜索 | ||
| 263 | + searchSubmit() { | ||
| 264 | + // 调用混合搜索 | ||
| 265 | + this._searchData(); | ||
| 266 | + }, | ||
| 267 | + // 模拟后端分页 | ||
| 268 | + async getData(requestParams) { | ||
| 269 | + const { | ||
| 270 | + search = {} | ||
| 271 | + } = requestParams; | ||
| 272 | + | ||
| 273 | + let params = {}; | ||
| 274 | + params.pageNumber = requestParams.page + 1; | ||
| 275 | + params.pageSize = 5; | ||
| 276 | + | ||
| 277 | + if (search.appraisalStatus) { | ||
| 278 | + params.appraisalStatus = search.appraisalStatus; | ||
| 279 | + } | ||
| 280 | + | ||
| 281 | + if (this.keyword) { | ||
| 282 | + params.keySearch = this.keyword | ||
| 283 | + } | ||
| 284 | + | ||
| 285 | + if (this.projectId) { | ||
| 286 | + params.projectId = this.projectId | ||
| 287 | + } | ||
| 288 | + | ||
| 289 | + return await getAchievementAppraisalListApi(params); | ||
| 290 | + }, | ||
| 291 | + // 数据请求(没错就是这么少的代码) | ||
| 292 | + async _getList() { | ||
| 293 | + if (this.page == 0) { | ||
| 294 | + this.list = []; | ||
| 295 | + } | ||
| 296 | + | ||
| 297 | + // 根据实际情况修改自己修改key | ||
| 298 | + let result = await this.getData({ | ||
| 299 | + page: this.page, // 传入页码 | ||
| 300 | + size: this.size, // 传入每页条数 | ||
| 301 | + search: this.search, // 传入搜索的对象 | ||
| 302 | + }); | ||
| 303 | + | ||
| 304 | + this.total = result.total; | ||
| 305 | + | ||
| 306 | + if (this.list.length == 0 && result.records.length == 0) { | ||
| 307 | + this.shownoData = false | ||
| 308 | + } else { | ||
| 309 | + this.shownoData = true | ||
| 310 | + } | ||
| 311 | + | ||
| 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 | + } | ||
| 321 | + }, | ||
| 322 | + | ||
| 323 | + handelClick(values) { | ||
| 324 | + console.log(values); | ||
| 325 | + this.projectId = values.id; | ||
| 326 | + }, | ||
| 327 | + | ||
| 328 | + handelChange(e) { | ||
| 329 | + console.log(e) | ||
| 330 | + this.checkboxValue = e ? ['待鉴定'] : []; | ||
| 331 | + this.search.appraisalStatus = e ? 'no_appraisal' : ''; | ||
| 332 | + | ||
| 333 | + }, | ||
| 334 | + | ||
| 335 | + handelCancel() { | ||
| 336 | + this.switchValue = false; | ||
| 337 | + this.projectId = ''; | ||
| 338 | + }, | ||
| 339 | + | ||
| 340 | + hancelSubmit() { | ||
| 341 | + this.finished = false; | ||
| 342 | + this.loading = "loadmore"; | ||
| 343 | + this.page = 0; | ||
| 344 | + this.list = []; | ||
| 345 | + this._getList(); | ||
| 346 | + | ||
| 347 | + this.show = false; | ||
| 348 | + }, | ||
| 349 | + | ||
| 350 | + } | ||
| 351 | + } | ||
| 352 | +</script> | ||
| 353 | + | ||
| 354 | +<style lang="scss" scoped> | ||
| 355 | + .registration_review { | ||
| 356 | + width: 100%; | ||
| 357 | + min-height: 100%; | ||
| 358 | + height: auto; | ||
| 359 | + background-color: #F7F7F7; | ||
| 360 | + | ||
| 361 | + .search_box { | ||
| 362 | + padding: 36rpx 30rpx 0; | ||
| 363 | + background-color: #FFFFFF; | ||
| 364 | + | ||
| 365 | + .top { | ||
| 366 | + display: flex; | ||
| 367 | + flex-flow: row nowrap; | ||
| 368 | + justify-content: space-between; | ||
| 369 | + padding: 0 0 30rpx 0; | ||
| 370 | + | ||
| 371 | + .check { | ||
| 372 | + padding: 20rpx 0 0 0; | ||
| 373 | + } | ||
| 374 | + | ||
| 375 | + .search { | ||
| 376 | + width: 468rpx; | ||
| 377 | + } | ||
| 378 | + } | ||
| 379 | + | ||
| 380 | + .bottom { | ||
| 381 | + .time { | ||
| 382 | + padding: 30rpx 0 30rpx 40rpx; | ||
| 383 | + } | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | + | ||
| 387 | + } | ||
| 388 | + | ||
| 389 | + .list_box { | ||
| 390 | + padding: 0 0 50rpx 0; | ||
| 391 | + | ||
| 392 | + .item { | ||
| 393 | + position: relative; | ||
| 394 | + width: 630rpx; | ||
| 395 | + margin: 30rpx auto; | ||
| 396 | + padding: 30rpx; | ||
| 397 | + border-radius: 12rpx; | ||
| 398 | + background-color: #FFFFFF; | ||
| 399 | + | ||
| 400 | + .bg_image { | ||
| 401 | + position: absolute; | ||
| 402 | + top: 0; | ||
| 403 | + right: 0; | ||
| 404 | + | ||
| 405 | + text { | ||
| 406 | + position: absolute; | ||
| 407 | + top: 12rpx; | ||
| 408 | + right: 30rpx; | ||
| 409 | + font-size: 24rpx; | ||
| 410 | + line-height: 24rpx; | ||
| 411 | + color: #FFFFFF; | ||
| 412 | + } | ||
| 413 | + } | ||
| 414 | + | ||
| 415 | + .info { | ||
| 416 | + display: flex; | ||
| 417 | + flex-flow: row nowrap; | ||
| 418 | + align-items: center; | ||
| 419 | + margin: 0 0 30rpx 0; | ||
| 420 | + | ||
| 421 | + .avatar { | ||
| 422 | + width: 94rpx; | ||
| 423 | + height: 94rpx; | ||
| 424 | + padding: 0 8rpx; | ||
| 425 | + border-radius: 4rpx; | ||
| 426 | + background-color: #06B079; | ||
| 427 | + font-size: 24rpx; | ||
| 428 | + line-height: 94rpx; | ||
| 429 | + color: #FFFFFF; | ||
| 430 | + text-align: center; | ||
| 431 | + } | ||
| 432 | + | ||
| 433 | + .name { | ||
| 434 | + font-size: 32rpx; | ||
| 435 | + line-height: 44rpx; | ||
| 436 | + color: #202131; | ||
| 437 | + font-weight: 500; | ||
| 438 | + margin: 0 20rpx; | ||
| 439 | + } | ||
| 440 | + | ||
| 441 | + .number { | ||
| 442 | + font-size: 28rpx; | ||
| 443 | + line-height: 32rpx; | ||
| 444 | + color: #909097; | ||
| 445 | + } | ||
| 446 | + } | ||
| 447 | + | ||
| 448 | + .company { | ||
| 449 | + display: flex; | ||
| 450 | + flex-flow: row nowrap; | ||
| 451 | + margin: 0 0 30rpx 0; | ||
| 452 | + | ||
| 453 | + text { | ||
| 454 | + font-size: 28rpx; | ||
| 455 | + line-height: 32rpx; | ||
| 456 | + color: #909097; | ||
| 457 | + margin: 0 0 0 16rpx; | ||
| 458 | + } | ||
| 459 | + | ||
| 460 | + text:last-child { | ||
| 461 | + color: #202131; | ||
| 462 | + margin: 0 0 0 30rpx; | ||
| 463 | + } | ||
| 464 | + } | ||
| 465 | + | ||
| 466 | + .statistics { | ||
| 467 | + border-top: 2rpx solid #E2E2E8; | ||
| 468 | + padding: 28rpx 0 0 0; | ||
| 469 | + display: flex; | ||
| 470 | + flex-flow: row nowrap; | ||
| 471 | + justify-content: space-around; | ||
| 472 | + | ||
| 473 | + view { | ||
| 474 | + text-align: center; | ||
| 475 | + | ||
| 476 | + text { | ||
| 477 | + font-size: 32rpx; | ||
| 478 | + line-height: 32rpx; | ||
| 479 | + color: #06B079; | ||
| 480 | + } | ||
| 481 | + | ||
| 482 | + text:last-child { | ||
| 483 | + display: block; | ||
| 484 | + font-size: 24rpx; | ||
| 485 | + color: #909097; | ||
| 486 | + margin: 16rpx 0 0 0; | ||
| 487 | + } | ||
| 488 | + } | ||
| 489 | + | ||
| 490 | + .line { | ||
| 491 | + height: 32rpx; | ||
| 492 | + border-right: 2rpx solid #E2E2E8; | ||
| 493 | + position: relative; | ||
| 494 | + top: 30rpx; | ||
| 495 | + } | ||
| 496 | + | ||
| 497 | + | ||
| 498 | + } | ||
| 499 | + } | ||
| 500 | + } | ||
| 501 | + | ||
| 502 | + .popup_search { | ||
| 503 | + width: 640rpx; | ||
| 504 | + position: relative; | ||
| 505 | + | ||
| 506 | + .content { | ||
| 507 | + padding: 0 40rpx; | ||
| 508 | + | ||
| 509 | + .title { | ||
| 510 | + padding: 24rpx 0; | ||
| 511 | + font-size: 28rpx; | ||
| 512 | + line-height: 36rpx; | ||
| 513 | + color: #202131; | ||
| 514 | + } | ||
| 515 | + | ||
| 516 | + .scroll { | ||
| 517 | + max-height: 60vh; | ||
| 518 | + | ||
| 519 | + .item { | ||
| 520 | + | ||
| 521 | + view { | ||
| 522 | + display: flex; | ||
| 523 | + flex-flow: row wrap; | ||
| 524 | + align-items: center; | ||
| 525 | + width: 500rpx; | ||
| 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; | ||
| 533 | + padding: 16rpx 20rpx; | ||
| 534 | + } | ||
| 535 | + | ||
| 536 | + .selectItem { | ||
| 537 | + background-color: #06B079; | ||
| 538 | + color: #FFFFFF; | ||
| 539 | + border: 2rpx solid #06B079; | ||
| 540 | + } | ||
| 541 | + } | ||
| 542 | + } | ||
| 543 | + | ||
| 544 | + .time { | ||
| 545 | + padding: 40rpx 0 0 0; | ||
| 546 | + } | ||
| 547 | + | ||
| 548 | + .switch { | ||
| 549 | + display: flex; | ||
| 550 | + flex-flow: row nowrap; | ||
| 551 | + justify-content: space-between; | ||
| 552 | + padding: 40rpx 0 0 0; | ||
| 553 | + | ||
| 554 | + text { | ||
| 555 | + font-size: 28rpx; | ||
| 556 | + line-height: 36rpx; | ||
| 557 | + color: #202131; | ||
| 558 | + } | ||
| 559 | + } | ||
| 560 | + | ||
| 561 | + | ||
| 562 | + } | ||
| 563 | + | ||
| 564 | + .footer { | ||
| 565 | + width: 560rpx; | ||
| 566 | + height: 96rpx; | ||
| 567 | + padding: 28rpx 40rpx; | ||
| 568 | + background: #FFFFFF; | ||
| 569 | + position: fixed; | ||
| 570 | + bottom: 0; | ||
| 571 | + right: 0; | ||
| 572 | + z-index: 99; | ||
| 573 | + border-top: 2rpx solid #E2E2E8; | ||
| 574 | + | ||
| 575 | + view { | ||
| 576 | + display: inline-block; | ||
| 577 | + } | ||
| 578 | + | ||
| 579 | + .left_btn { | ||
| 580 | + width: 194rpx; | ||
| 581 | + margin: 0 20rpx 0 0; | ||
| 582 | + } | ||
| 583 | + | ||
| 584 | + .right_btn { | ||
| 585 | + width: 346rpx; | ||
| 586 | + } | ||
| 587 | + } | ||
| 588 | + } | ||
| 589 | + } | ||
| 590 | +</style> |
| 1 | +<template> | ||
| 2 | + <view class="report_detail"> | ||
| 3 | + <view class="box form_info"> | ||
| 4 | + <view class="info"> | ||
| 5 | + <view class="avatar">{{getNameLastTwo(detail.studentName)}}</view> | ||
| 6 | + <view class="name">{{overflowHide(detail.studentName, 6)}}</view> | ||
| 7 | + <view class="number">NO.{{detail.studentNumber}}</view> | ||
| 8 | + </view> | ||
| 9 | + <view class="company"> | ||
| 10 | + <text>实习单号</text> | ||
| 11 | + <text>{{detail.number || '--'}}</text> | ||
| 12 | + </view> | ||
| 13 | + <view class="company"> | ||
| 14 | + <text>实习项目</text> | ||
| 15 | + <text>{{detail.projectName|| '--'}}</text> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | + | ||
| 19 | + <view class="box attendance"> | ||
| 20 | + <view class="title">考勤</view> | ||
| 21 | + <view class="item_icon"> | ||
| 22 | + <text>考勤天数</text> | ||
| 23 | + <view @click="handelRecord('signin')"> | ||
| 24 | + <text>{{detail.attendanceCount || 0}}天</text> | ||
| 25 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + </view> | ||
| 29 | + | ||
| 30 | + <view class="box attendance"> | ||
| 31 | + <view class="title">提交材料</view> | ||
| 32 | + <view class="item_icon"> | ||
| 33 | + <text>三方协议</text> | ||
| 34 | + <view @click="handelRecord('aggrent')"> | ||
| 35 | + <text>查看</text> | ||
| 36 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> | ||
| 37 | + </view> | ||
| 38 | + </view> | ||
| 39 | + <view class="item_icon"> | ||
| 40 | + <text>日志</text> | ||
| 41 | + <view @click="handelRecord('daily')"> | ||
| 42 | + <text>{{detail.dailyLogCount || 0}}篇</text> | ||
| 43 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> | ||
| 44 | + </view> | ||
| 45 | + </view> | ||
| 46 | + <view class="item_icon"> | ||
| 47 | + <text>周志</text> | ||
| 48 | + <view @click="handelRecord('weekly')"> | ||
| 49 | + <text>{{detail.weekLogCount || 0}}篇</text> | ||
| 50 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> | ||
| 51 | + </view> | ||
| 52 | + </view> | ||
| 53 | + <view class="item_icon"> | ||
| 54 | + <text>月志</text> | ||
| 55 | + <view @click="handelRecord('monthly')"> | ||
| 56 | + <text>{{detail.monthlyLogCount || 0}}篇</text> | ||
| 57 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> | ||
| 58 | + </view> | ||
| 59 | + </view> | ||
| 60 | + <view class="item_icon"> | ||
| 61 | + <text>实习报告</text> | ||
| 62 | + <view @click="handelRecord('report')"> | ||
| 63 | + <text>{{detail.internshipReportCount || 0}}次</text> | ||
| 64 | + <u-icon :style="{margin:'0 0 0 8rpx'}" name="arrow-right" color="#909097" size="28"></u-icon> | ||
| 65 | + </view> | ||
| 66 | + </view> | ||
| 67 | + </view> | ||
| 68 | + | ||
| 69 | + <view class="footer" v-if="detail.appraisalStatus == 'no_appraisal'"> | ||
| 70 | + <view class="right_btn"> | ||
| 71 | + <c-button type="confirm" text="成绩鉴定" @click="showModal = true"> | ||
| 72 | + </c-button> | ||
| 73 | + </view> | ||
| 74 | + </view> | ||
| 75 | + | ||
| 76 | + <u-overlay :show="showModal"> | ||
| 77 | + <view class="modal" v-show="showModal"> | ||
| 78 | + <view class="title">成绩鉴定</view> | ||
| 79 | + <u-form labelPosition="top" :model="form" :rules="rules" :errorType="errorType" ref="uForm"> | ||
| 80 | + | ||
| 81 | + <u-form-item label="成绩" labelWidth="100rpx" borderBottom prop="score" | ||
| 82 | + v-if="detail.markWay == 'centesimal'"> | ||
| 83 | + <u-input v-model="form.score" border="none" type="number" :placeholderStyle="{color: 'C1C1C9'}" | ||
| 84 | + placeholder="请输入" /> | ||
| 85 | + </u-form-item> | ||
| 86 | + | ||
| 87 | + <u-form-item label="成绩" @click="showSex = true" labelWidth="100rpx" borderBottom prop="level" | ||
| 88 | + v-else> | ||
| 89 | + <u-radio-group v-model="form.level" placement="row"> | ||
| 90 | + <u-radio :customStyle="{marginRight: '24rpx'}" size="28rpx" labelSize="28rpx" | ||
| 91 | + v-for="(item, index) in radiolist" :key="index" :label="item.name" :name="item.name" | ||
| 92 | + activeColor="#06B079"> | ||
| 93 | + </u-radio> | ||
| 94 | + </u-radio-group> | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + </u-form-item> | ||
| 98 | + | ||
| 99 | + <u-form-item label="学分" labelWidth="100rpx" borderBottom prop="credit"> | ||
| 100 | + <u-input v-model="form.credit" type="number" border="none" :placeholderStyle="{color: 'C1C1C9'}" | ||
| 101 | + placeholder="请输入" /> | ||
| 102 | + </u-form-item> | ||
| 103 | + | ||
| 104 | + <u-form-item label="评价" labelWidth="100rpx" borderBottom prop="teacherView"> | ||
| 105 | + <u-textarea v-model="form.teacherView" count border="none" :placeholderStyle="{color: 'C1C1C9'}" | ||
| 106 | + placeholder="请输入评价"></u-textarea> | ||
| 107 | + </u-form-item> | ||
| 108 | + | ||
| 109 | + </u-form> | ||
| 110 | + | ||
| 111 | + <view class="moda_footer"> | ||
| 112 | + <view class="left_btn"> | ||
| 113 | + <c-button type="cancel" text="取消" @click="handelCancel"> | ||
| 114 | + </c-button> | ||
| 115 | + </view> | ||
| 116 | + <view class="right_btn"> | ||
| 117 | + <c-button type="confirm" text="确定" @click="hancelSubmit"> | ||
| 118 | + </c-button> | ||
| 119 | + </view> | ||
| 120 | + </view> | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + </view> | ||
| 124 | + </u-overlay> | ||
| 125 | + | ||
| 126 | + </view> | ||
| 127 | +</template> | ||
| 128 | + | ||
| 129 | +<script> | ||
| 130 | + import { | ||
| 131 | + mapGetters, | ||
| 132 | + mapState, | ||
| 133 | + mapActions | ||
| 134 | + } from 'vuex' | ||
| 135 | + import listMixin from "@/common/mixins/list-mixin.js"; | ||
| 136 | + | ||
| 137 | + import { | ||
| 138 | + getAchievementDetailApi, | ||
| 139 | + putAchievementAppraisalApi, | ||
| 140 | + } from '@/config/api.js'; | ||
| 141 | + | ||
| 142 | + export default { | ||
| 143 | + data() { | ||
| 144 | + return { | ||
| 145 | + id: '', | ||
| 146 | + detail: {}, | ||
| 147 | + showModal: false, | ||
| 148 | + errorType: 'toast', | ||
| 149 | + radiolist: [{ | ||
| 150 | + name: '优秀', | ||
| 151 | + disabled: false | ||
| 152 | + }, | ||
| 153 | + { | ||
| 154 | + name: '良好', | ||
| 155 | + disabled: false | ||
| 156 | + }, | ||
| 157 | + { | ||
| 158 | + name: '及格', | ||
| 159 | + disabled: false | ||
| 160 | + }, { | ||
| 161 | + name: '不及格', | ||
| 162 | + disabled: false | ||
| 163 | + } | ||
| 164 | + ], | ||
| 165 | + form: { | ||
| 166 | + score: '', | ||
| 167 | + level: '', | ||
| 168 | + credit: '', | ||
| 169 | + teacherView: '', | ||
| 170 | + | ||
| 171 | + }, | ||
| 172 | + rules: { | ||
| 173 | + score: [{ | ||
| 174 | + required: true, | ||
| 175 | + message: '请输入成绩', | ||
| 176 | + trigger: ['blur', 'change'], | ||
| 177 | + }, { | ||
| 178 | + validator: (rule, value, callback) => { | ||
| 179 | + return this.$u.test.range(value, [0, 100]); | ||
| 180 | + }, | ||
| 181 | + message: '手机号码不正确', | ||
| 182 | + trigger: ['change', 'blur'], | ||
| 183 | + }], | ||
| 184 | + level: [{ | ||
| 185 | + required: true, | ||
| 186 | + message: '请选择成绩', | ||
| 187 | + trigger: ['blur', 'change'], | ||
| 188 | + }, ], | ||
| 189 | + credit: [{ | ||
| 190 | + required: true, | ||
| 191 | + message: '请输入学分', | ||
| 192 | + trigger: ['blur', 'change'], | ||
| 193 | + }], | ||
| 194 | + teacherView: [], | ||
| 195 | + }, | ||
| 196 | + } | ||
| 197 | + }, | ||
| 198 | + | ||
| 199 | + onLoad(option) { | ||
| 200 | + this.id = option.id; | ||
| 201 | + getAchievementDetailApi(option.id).then(data => { | ||
| 202 | + if (data) { | ||
| 203 | + this.detail = data; | ||
| 204 | + this.form.credit = String(data.courseFaceDTO.credit); | ||
| 205 | + } | ||
| 206 | + }) | ||
| 207 | + }, | ||
| 208 | + | ||
| 209 | + onReady() { | ||
| 210 | + this.$refs.uForm.setRules(this.rules); | ||
| 211 | + }, | ||
| 212 | + | ||
| 213 | + methods: { | ||
| 214 | + | ||
| 215 | + getNameLastTwo(value) { | ||
| 216 | + if (value && value.length > 3) { | ||
| 217 | + return value.substring(value.length - 3) | ||
| 218 | + } else { | ||
| 219 | + return value; | ||
| 220 | + } | ||
| 221 | + }, | ||
| 222 | + | ||
| 223 | + overflowHide(value, num = 4) { | ||
| 224 | + if (value && value.length > num) { | ||
| 225 | + return `${value.slice(0, num)}...` | ||
| 226 | + } else { | ||
| 227 | + return value; | ||
| 228 | + } | ||
| 229 | + }, | ||
| 230 | + | ||
| 231 | + handelRecord(type) { | ||
| 232 | + | ||
| 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 : ''}` | ||
| 244 | + }) | ||
| 245 | + break; | ||
| 246 | + | ||
| 247 | + case 'daily': | ||
| 248 | + this.$u.route({ | ||
| 249 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=daily&formId=${this.detail.id}` | ||
| 250 | + }) | ||
| 251 | + break; | ||
| 252 | + | ||
| 253 | + case 'weekly': | ||
| 254 | + this.$u.route({ | ||
| 255 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=weekly&formId=${this.detail.id}` | ||
| 256 | + }) | ||
| 257 | + break; | ||
| 258 | + | ||
| 259 | + case 'monthly': | ||
| 260 | + this.$u.route({ | ||
| 261 | + url: `pages/main/internship/studentLogReview/studentLogReview?category=monthly&formId=${this.detail.id}` | ||
| 262 | + }) | ||
| 263 | + break; | ||
| 264 | + | ||
| 265 | + case 'report': | ||
| 266 | + this.$u.route({ | ||
| 267 | + url: `pages/main/home/reportDetail/reportDetail?id=${this.detail.reportId ? this.detail.reportId : ''}` | ||
| 268 | + }) | ||
| 269 | + break; | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + }, | ||
| 273 | + | ||
| 274 | + handelCancel() { | ||
| 275 | + this.showModal = false; | ||
| 276 | + }, | ||
| 277 | + | ||
| 278 | + hancelSubmit() { | ||
| 279 | + let { | ||
| 280 | + credit = '' | ||
| 281 | + } = this.form; | ||
| 282 | + | ||
| 283 | + console.log(this.form) | ||
| 284 | + | ||
| 285 | + if (String(credit) && credit > this.detail.courseFaceDTO.credit) { | ||
| 286 | + this.$u.toast('学分不正确'); | ||
| 287 | + return; | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + this.$refs.uForm.validate().then(res => { | ||
| 291 | + uni.$u.toast('校验通过'); | ||
| 292 | + | ||
| 293 | + putAchievementAppraisalApi({ | ||
| 294 | + items: [{ | ||
| 295 | + id: this.detail.id, | ||
| 296 | + ...this.form | ||
| 297 | + }] | ||
| 298 | + }).then(data => { | ||
| 299 | + if (data) { | ||
| 300 | + this.showModal = false; | ||
| 301 | + | ||
| 302 | + uni.navigateBack({ | ||
| 303 | + delta: 1 | ||
| 304 | + }); | ||
| 305 | + } | ||
| 306 | + }) | ||
| 307 | + | ||
| 308 | + | ||
| 309 | + }).catch(errors => { | ||
| 310 | + console.log(errors) | ||
| 311 | + }) | ||
| 312 | + | ||
| 313 | + }, | ||
| 314 | + } | ||
| 315 | + } | ||
| 316 | +</script> | ||
| 317 | + | ||
| 318 | +<style lang="scss" scoped> | ||
| 319 | + .report_detail { | ||
| 320 | + width: 100%; | ||
| 321 | + min-height: 100%; | ||
| 322 | + height: auto; | ||
| 323 | + background-color: #F7F7F7; | ||
| 324 | + padding: 20rpx 0 0 0; | ||
| 325 | + | ||
| 326 | + .box { | ||
| 327 | + width: 630rpx; | ||
| 328 | + margin: 20rpx auto; | ||
| 329 | + padding: 30rpx 30rpx 12rpx 30rpx; | ||
| 330 | + border-radius: 12rpx; | ||
| 331 | + background-color: #FFFFFF; | ||
| 332 | + | ||
| 333 | + .title { | ||
| 334 | + font-size: 32rpx; | ||
| 335 | + line-height: 32rpx; | ||
| 336 | + color: #202131; | ||
| 337 | + margin: 0 0 30rpx 0; | ||
| 338 | + } | ||
| 339 | + | ||
| 340 | + .title::before { | ||
| 341 | + content: ""; | ||
| 342 | + display: inline-block; | ||
| 343 | + width: 6rpx; | ||
| 344 | + height: 32rpx; | ||
| 345 | + background-color: #06B079; | ||
| 346 | + margin: 0 12rpx 0 0; | ||
| 347 | + position: relative; | ||
| 348 | + top: 4rpx; | ||
| 349 | + border-radius: 8rpx; | ||
| 350 | + } | ||
| 351 | + | ||
| 352 | + .item { | ||
| 353 | + margin: 0 0 24rpx 0; | ||
| 354 | + | ||
| 355 | + text:first-child { | ||
| 356 | + display: inline-block; | ||
| 357 | + width: 112rpx; | ||
| 358 | + text-align: justify; | ||
| 359 | + text-align-last: justify; | ||
| 360 | + font-size: 28rpx; | ||
| 361 | + line-height: 48rpx; | ||
| 362 | + color: #909097; | ||
| 363 | + vertical-align: top; | ||
| 364 | + } | ||
| 365 | + | ||
| 366 | + text:last-child { | ||
| 367 | + display: inline-block; | ||
| 368 | + width: 440rpx; | ||
| 369 | + font-size: 28rpx; | ||
| 370 | + line-height: 48rpx; | ||
| 371 | + color: #202131; | ||
| 372 | + margin: 0 0 0 78rpx; | ||
| 373 | + } | ||
| 374 | + } | ||
| 375 | + | ||
| 376 | + .item_icon { | ||
| 377 | + margin: 0 0 24rpx 0; | ||
| 378 | + display: flex; | ||
| 379 | + flex-flow: row nowrap; | ||
| 380 | + justify-content: space-between; | ||
| 381 | + | ||
| 382 | + text { | ||
| 383 | + display: inline-block; | ||
| 384 | + width: 112rpx; | ||
| 385 | + text-align: justify; | ||
| 386 | + text-align-last: justify; | ||
| 387 | + font-size: 28rpx; | ||
| 388 | + line-height: 48rpx; | ||
| 389 | + color: #909097; | ||
| 390 | + vertical-align: top; | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + view { | ||
| 394 | + display: flex; | ||
| 395 | + flex-flow: row nowrap; | ||
| 396 | + | ||
| 397 | + text { | ||
| 398 | + display: inline-block; | ||
| 399 | + width: auto; | ||
| 400 | + font-size: 28rpx; | ||
| 401 | + line-height: 48rpx; | ||
| 402 | + color: #202131; | ||
| 403 | + margin: 0 0 0 78rpx; | ||
| 404 | + } | ||
| 405 | + } | ||
| 406 | + } | ||
| 407 | + } | ||
| 408 | + | ||
| 409 | + .form_info { | ||
| 410 | + .info { | ||
| 411 | + display: flex; | ||
| 412 | + flex-flow: row nowrap; | ||
| 413 | + align-items: center; | ||
| 414 | + margin: 0 0 30rpx 0; | ||
| 415 | + | ||
| 416 | + .avatar { | ||
| 417 | + width: 94rpx; | ||
| 418 | + height: 94rpx; | ||
| 419 | + padding: 0 8rpx; | ||
| 420 | + border-radius: 4rpx; | ||
| 421 | + background-color: #06B079; | ||
| 422 | + font-size: 24rpx; | ||
| 423 | + line-height: 94rpx; | ||
| 424 | + color: #FFFFFF; | ||
| 425 | + text-align: center; | ||
| 426 | + } | ||
| 427 | + | ||
| 428 | + .name { | ||
| 429 | + font-size: 32rpx; | ||
| 430 | + line-height: 44rpx; | ||
| 431 | + color: #202131; | ||
| 432 | + font-weight: 500; | ||
| 433 | + margin: 0 20rpx; | ||
| 434 | + } | ||
| 435 | + | ||
| 436 | + .number { | ||
| 437 | + font-size: 28rpx; | ||
| 438 | + line-height: 32rpx; | ||
| 439 | + color: #909097; | ||
| 440 | + } | ||
| 441 | + } | ||
| 442 | + | ||
| 443 | + .company { | ||
| 444 | + display: flex; | ||
| 445 | + flex-flow: row nowrap; | ||
| 446 | + margin: 0 0 30rpx 0; | ||
| 447 | + | ||
| 448 | + text { | ||
| 449 | + font-size: 28rpx; | ||
| 450 | + line-height: 32rpx; | ||
| 451 | + color: #909097; | ||
| 452 | + margin: 0 0 0 16rpx; | ||
| 453 | + } | ||
| 454 | + | ||
| 455 | + text:last-child { | ||
| 456 | + color: #202131; | ||
| 457 | + margin: 0 0 0 30rpx; | ||
| 458 | + } | ||
| 459 | + } | ||
| 460 | + } | ||
| 461 | + | ||
| 462 | + .footer { | ||
| 463 | + width: 100%; | ||
| 464 | + height: 96rpx; | ||
| 465 | + padding: 28rpx 30rpx; | ||
| 466 | + background: #FFFFFF; | ||
| 467 | + position: fixed; | ||
| 468 | + bottom: 0; | ||
| 469 | + left: 0; | ||
| 470 | + z-index: 99; | ||
| 471 | + border-top: 2rpx solid #E2E2E8; | ||
| 472 | + | ||
| 473 | + view { | ||
| 474 | + display: inline-block; | ||
| 475 | + } | ||
| 476 | + | ||
| 477 | + .right_btn { | ||
| 478 | + width: 690rpx; | ||
| 479 | + } | ||
| 480 | + } | ||
| 481 | + | ||
| 482 | + .modal { | ||
| 483 | + width: 570rpx; | ||
| 484 | + position: relative; | ||
| 485 | + display: flex; | ||
| 486 | + flex-direction: column; | ||
| 487 | + margin: 200rpx auto; | ||
| 488 | + padding: 40rpx; | ||
| 489 | + border-radius: 20rpx; | ||
| 490 | + background-color: #fff; | ||
| 491 | + | ||
| 492 | + .title { | ||
| 493 | + text-align: center; | ||
| 494 | + font-size: 36rpx; | ||
| 495 | + line-height: 48rpx; | ||
| 496 | + color: #202131; | ||
| 497 | + margin: 0 0 66rpx 0; | ||
| 498 | + } | ||
| 499 | + | ||
| 500 | + .moda_footer { | ||
| 501 | + width: 590rpx; | ||
| 502 | + height: 96rpx; | ||
| 503 | + padding: 40rpx 0 0 0; | ||
| 504 | + | ||
| 505 | + view { | ||
| 506 | + display: inline-block; | ||
| 507 | + width: 260rpx; | ||
| 508 | + } | ||
| 509 | + | ||
| 510 | + .left_btn { | ||
| 511 | + margin: 0 48rpx 0 0; | ||
| 512 | + } | ||
| 513 | + | ||
| 514 | + .right_btn {} | ||
| 515 | + } | ||
| 516 | + | ||
| 517 | + | ||
| 518 | + } | ||
| 519 | + } | ||
| 520 | +</style> |
| 1 | +<template> | ||
| 2 | + <view class="report_detail"> | ||
| 3 | + <view class="list_box" v-if="list.length > 0"> | ||
| 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> | ||
| 19 | + </view> | ||
| 20 | + | ||
| 21 | + <view class="info"> | ||
| 22 | + <u-image src="/static/img/home/approvalRecordBg.png" width="94rpx" height="94rpx" /> | ||
| 23 | + <view class="title_name"> | ||
| 24 | + <view class="title"> | ||
| 25 | + {{item.title}} | ||
| 26 | + </view> | ||
| 27 | + <view class="time"> | ||
| 28 | + | ||
| 29 | + <text>创建时间</text> | ||
| 30 | + <text> | ||
| 31 | + {{timeFormat(item.createdTime, 'yyyy-mm-dd hh:MM')}} | ||
| 32 | + </text> | ||
| 33 | + </view> | ||
| 34 | + </view> | ||
| 35 | + </view> | ||
| 36 | + | ||
| 37 | + </view> | ||
| 38 | + <c-loading :loading="loading"></c-loading> | ||
| 39 | + </view> | ||
| 40 | + <view v-else class="no_data"> | ||
| 41 | + <c-no-data></c-no-data> | ||
| 42 | + </view> | ||
| 43 | + | ||
| 44 | + <view class="report_info"> | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + </view> | ||
| 48 | + </view> | ||
| 49 | +</template> | ||
| 50 | + | ||
| 51 | +<script> | ||
| 52 | + import { | ||
| 53 | + mapGetters, | ||
| 54 | + mapState, | ||
| 55 | + mapActions | ||
| 56 | + } from 'vuex' | ||
| 57 | + import listMixin from "@/common/mixins/list-mixin.js"; | ||
| 58 | + | ||
| 59 | + import { | ||
| 60 | + getReportApprovalListApi, | ||
| 61 | + } from '@/config/api.js'; | ||
| 62 | + | ||
| 63 | + export default { | ||
| 64 | + data() { | ||
| 65 | + return { | ||
| 66 | + formId: '', | ||
| 67 | + list: [], | ||
| 68 | + } | ||
| 69 | + }, | ||
| 70 | + | ||
| 71 | + onLoad(option) { | ||
| 72 | + this.formId = option.formId; | ||
| 73 | + getReportApprovalListApi(option.formId).then(data => { | ||
| 74 | + if (data) { | ||
| 75 | + this.list = data | ||
| 76 | + } | ||
| 77 | + }) | ||
| 78 | + }, | ||
| 79 | + | ||
| 80 | + methods: { | ||
| 81 | + | ||
| 82 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 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 | + }) | ||
| 90 | + }, | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | +</script> | ||
| 94 | + | ||
| 95 | +<style lang="scss" scoped> | ||
| 96 | + .report_detail { | ||
| 97 | + width: 100%; | ||
| 98 | + min-height: 100%; | ||
| 99 | + height: auto; | ||
| 100 | + background-color: #F7F7F7; | ||
| 101 | + padding: 20rpx 0 0 0; | ||
| 102 | + | ||
| 103 | + .list_box { | ||
| 104 | + padding: 0 0 50rpx 0; | ||
| 105 | + | ||
| 106 | + .item { | ||
| 107 | + position: relative; | ||
| 108 | + width: 630rpx; | ||
| 109 | + margin: 30rpx auto; | ||
| 110 | + padding: 30rpx; | ||
| 111 | + border-radius: 12rpx; | ||
| 112 | + background-color: #FFFFFF; | ||
| 113 | + | ||
| 114 | + .bg_image { | ||
| 115 | + position: absolute; | ||
| 116 | + top: 0; | ||
| 117 | + right: 0; | ||
| 118 | + | ||
| 119 | + text { | ||
| 120 | + position: absolute; | ||
| 121 | + top: 12rpx; | ||
| 122 | + right: 30rpx; | ||
| 123 | + font-size: 24rpx; | ||
| 124 | + line-height: 24rpx; | ||
| 125 | + color: #FFFFFF; | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + .info { | ||
| 130 | + display: flex; | ||
| 131 | + flex-flow: row nowrap; | ||
| 132 | + align-items: center; | ||
| 133 | + margin: 0 0 30rpx 0; | ||
| 134 | + | ||
| 135 | + .title_name { | ||
| 136 | + .title { | ||
| 137 | + font-size: 32rpx; | ||
| 138 | + line-height: 44rpx; | ||
| 139 | + color: #202131; | ||
| 140 | + font-weight: 500; | ||
| 141 | + margin: 0 20rpx; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + .time { | ||
| 145 | + padding: 8rpx 0 0 20rpx; | ||
| 146 | + font-size: 28rpx; | ||
| 147 | + line-height: 32rpx; | ||
| 148 | + color: #909097; | ||
| 149 | + | ||
| 150 | + text:last-child { | ||
| 151 | + padding: 0 0 0 30rpx; | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | +</style> |
pages/main/home/logDetail/logDetail.vue
0 → 100644
| 1 | +<template> | ||
| 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> | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 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> | ||
| 31 | + </view> | ||
| 32 | + | ||
| 33 | + <view class="u-parse"> | ||
| 34 | + <u-parse :content="detail.content"></u-parse> | ||
| 35 | + </view> | ||
| 36 | + | ||
| 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> | ||
| 56 | + </view> | ||
| 57 | + </scroll-view> | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + <view class="nextPage"> | ||
| 62 | + <u-icon name="arrow-down" size="36"></u-icon> | ||
| 63 | + </view> | ||
| 64 | + | ||
| 65 | + <view class="footer"> | ||
| 66 | + <view class="divide_line"></view> | ||
| 67 | + <input class="uni-input" placeholder="这么精彩,不说点什么吗?" :value="reply" confirm-type="send" @confirm="goReply" /> | ||
| 68 | + </view> | ||
| 69 | + </view> | ||
| 70 | +</template> | ||
| 71 | + | ||
| 72 | +<script> | ||
| 73 | + import { | ||
| 74 | + mapGetters, | ||
| 75 | + mapState, | ||
| 76 | + mapActions | ||
| 77 | + } from 'vuex' | ||
| 78 | + | ||
| 79 | + import { | ||
| 80 | + getLogDetailApi, | ||
| 81 | + putLogReviewApi, | ||
| 82 | + getLogReplyListApi, | ||
| 83 | + postLogReplyApi, | ||
| 84 | + } from '@/config/api.js'; | ||
| 85 | + export default { | ||
| 86 | + data() { | ||
| 87 | + return { | ||
| 88 | + id: "", | ||
| 89 | + formLogId: "", | ||
| 90 | + show: false, | ||
| 91 | + reply: '', | ||
| 92 | + content: "", | ||
| 93 | + style: { | ||
| 94 | + // 字符串的形式 | ||
| 95 | + p: 'color: red;font-size:32rpx', | ||
| 96 | + span: 'font-size: 30rpx' | ||
| 97 | + }, | ||
| 98 | + detail: {}, | ||
| 99 | + userType: { | ||
| 100 | + "student": "学生", | ||
| 101 | + "teacher": "学校", | ||
| 102 | + "company": "企业" | ||
| 103 | + }, | ||
| 104 | + commentList: [], | ||
| 105 | + } | ||
| 106 | + }, | ||
| 107 | + | ||
| 108 | + onLoad(option) { | ||
| 109 | + | ||
| 110 | + this.id = option.id; | ||
| 111 | + getLogDetailApi(option.id).then(data => { | ||
| 112 | + if (data) { | ||
| 113 | + this.detail = data | ||
| 114 | + } | ||
| 115 | + }) | ||
| 116 | + | ||
| 117 | + this.getCommentList() | ||
| 118 | + | ||
| 119 | + }, | ||
| 120 | + | ||
| 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 | + | ||
| 133 | + getWeek(dt) { | ||
| 134 | + if (dt > 0) { | ||
| 135 | + let d1 = new Date(dt); | ||
| 136 | + let d2 = new Date(dt); | ||
| 137 | + d2.setMonth(0); | ||
| 138 | + d2.setDate(1); | ||
| 139 | + let rq = d1 - d2; | ||
| 140 | + let days = Math.ceil(rq / (24 * 60 * 60 * 1000)); | ||
| 141 | + let num = Math.ceil(days / 7); | ||
| 142 | + return num; | ||
| 143 | + } else { | ||
| 144 | + return ''; | ||
| 145 | + } | ||
| 146 | + }, | ||
| 147 | + | ||
| 148 | + getNameLastTwo(value) { | ||
| 149 | + | ||
| 150 | + if (value && value.length > 3) { | ||
| 151 | + return value.substring(value.length - 3) | ||
| 152 | + } else { | ||
| 153 | + return value; | ||
| 154 | + } | ||
| 155 | + }, | ||
| 156 | + | ||
| 157 | + overflowHide(value, num = 4) { | ||
| 158 | + if (value && value.length > num) { | ||
| 159 | + return `${value.slice(0, num)}...` | ||
| 160 | + } else { | ||
| 161 | + return value; | ||
| 162 | + } | ||
| 163 | + }, | ||
| 164 | + | ||
| 165 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 166 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | ||
| 167 | + }, | ||
| 168 | + | ||
| 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 | + } | ||
| 180 | + }) | ||
| 181 | + }, | ||
| 182 | + | ||
| 183 | + getCommentList() { | ||
| 184 | + getLogReplyListApi({ | ||
| 185 | + formLogId: this.id | ||
| 186 | + }).then(data => { | ||
| 187 | + if (data) { | ||
| 188 | + this.commentList = data.records; | ||
| 189 | + } | ||
| 190 | + }) | ||
| 191 | + }, | ||
| 192 | + | ||
| 193 | + goReply(e) { //回复评论 | ||
| 194 | + console.log(e) | ||
| 195 | + this.reply = e.target.value | ||
| 196 | + postLogReplyApi({ | ||
| 197 | + formLogId: this.id, | ||
| 198 | + content: e.target.value | ||
| 199 | + }).then(data => { | ||
| 200 | + this.reply = '' | ||
| 201 | + this.getCommentList() | ||
| 202 | + }) | ||
| 203 | + } | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | +</script> | ||
| 207 | + | ||
| 208 | +<style lang="scss" scoped> | ||
| 209 | + .log_detail { | ||
| 210 | + width: 100%; | ||
| 211 | + min-height: 100%; | ||
| 212 | + height: auto; | ||
| 213 | + background-color: #F7F7F7; | ||
| 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 | + | ||
| 224 | + .header_box { | ||
| 225 | + background-color: #FFFFFF; | ||
| 226 | + | ||
| 227 | + .header { | ||
| 228 | + display: flex; | ||
| 229 | + flex-flow: row nowrap; | ||
| 230 | + align-items: center; | ||
| 231 | + padding: 52rpx 0; | ||
| 232 | + margin: 0 30rpx; | ||
| 233 | + position: relative; | ||
| 234 | + border-bottom: 2rpx solid #E2E2E8; | ||
| 235 | + background-color: #FFFFFF; | ||
| 236 | + | ||
| 237 | + .avatar { | ||
| 238 | + width: 94rpx; | ||
| 239 | + height: 94rpx; | ||
| 240 | + border-radius: 4rpx; | ||
| 241 | + background-color: #06B079; | ||
| 242 | + font-size: 24rpx; | ||
| 243 | + line-height: 94rpx; | ||
| 244 | + color: #FFFFFF; | ||
| 245 | + text-align: center; | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + .form_name { | ||
| 249 | + .name { | ||
| 250 | + font-size: 32rpx; | ||
| 251 | + line-height: 44rpx; | ||
| 252 | + color: #202131; | ||
| 253 | + font-weight: 500; | ||
| 254 | + margin: 0 20rpx; | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + .week { | ||
| 258 | + padding: 8rpx 0 0 0; | ||
| 259 | + font-size: 24rpx; | ||
| 260 | + line-height: 32rpx; | ||
| 261 | + color: #909097; | ||
| 262 | + | ||
| 263 | + text { | ||
| 264 | + padding: 8rpx 0 0 20rpx; | ||
| 265 | + } | ||
| 266 | + } | ||
| 267 | + } | ||
| 268 | + | ||
| 269 | + .status { | ||
| 270 | + font-size: 24rpx; | ||
| 271 | + line-height: 34rpx; | ||
| 272 | + color: #FFFFFF; | ||
| 273 | + width: 112rpx; | ||
| 274 | + height: 48rpx; | ||
| 275 | + line-height: 48rpx; | ||
| 276 | + text-align: center; | ||
| 277 | + border-radius: 200rpx; | ||
| 278 | + background-color: #06B079; | ||
| 279 | + position: absolute; | ||
| 280 | + top: 74rpx; | ||
| 281 | + right: 0; | ||
| 282 | + } | ||
| 283 | + } | ||
| 284 | + } | ||
| 285 | + | ||
| 286 | + .content { | ||
| 287 | + | ||
| 288 | + padding: 16rpx 0 150rpx; | ||
| 289 | + | ||
| 290 | + .name_time { | ||
| 291 | + background-color: #FFFFFF; | ||
| 292 | + padding: 26rpx 30rpx; | ||
| 293 | + | ||
| 294 | + .title { | ||
| 295 | + font-size: 36rpx; | ||
| 296 | + line-height: 50rpx; | ||
| 297 | + color: #06B079; | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + .time { | ||
| 301 | + padding: 6rpx 0 0 0; | ||
| 302 | + font-size: 24rpx; | ||
| 303 | + line-height: 32rpx; | ||
| 304 | + color: #909097; | ||
| 305 | + padding: 0 0 26rpx 0; | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + | ||
| 309 | + .u-parse { | ||
| 310 | + background-color: #FFFFFF; | ||
| 311 | + padding: 0 30rpx 50rpx; | ||
| 312 | + font-size: 28rpx; | ||
| 313 | + line-height: 36rpx; | ||
| 314 | + color: #4A4A53; | ||
| 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 | + } | ||
| 353 | + } | ||
| 354 | + } | ||
| 355 | + | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + .footer { | ||
| 359 | + width: 100%; | ||
| 360 | + height: 130rpx; | ||
| 361 | + background: #fff; | ||
| 362 | + position: fixed; | ||
| 363 | + bottom: 0; | ||
| 364 | + left: 0; | ||
| 365 | + z-index: 99; | ||
| 366 | + | ||
| 367 | + .uni-input { | ||
| 368 | + height: 96rpx; | ||
| 369 | + background: rgba(0, 0, 0, 0.04); | ||
| 370 | + border-radius: 8rpx; | ||
| 371 | + margin: 10rpx 32rpx 32rpx 32rpx; | ||
| 372 | + padding: 0 20rpx; | ||
| 373 | + } | ||
| 374 | + } | ||
| 375 | +</style> |
pages/main/home/logReview/logReview.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="registration_review"> | ||
| 3 | + <view class="search_box"> | ||
| 4 | + <view class="check"> | ||
| 5 | + <u-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange"> | ||
| 6 | + <u-checkbox :customStyle="{marginBottom: '8px'}" shape="circle" | ||
| 7 | + v-for="(item, index) in checkboxList" :key="index" :label="item.name" :name="item.name" | ||
| 8 | + activeColor="#06B079" size="28rpx" labelSize="28rpx" labelColor="#202131"> | ||
| 9 | + </u-checkbox> | ||
| 10 | + </u-checkbox-group> | ||
| 11 | + </view> | ||
| 12 | + | ||
| 13 | + <view class="search"> | ||
| 14 | + <u-search placeholder="请输入学生姓名/学号/手机号" placeholderColor="#C1C1C9" searchIconSize="36" height="64rpx" | ||
| 15 | + bgColor="#F4F4F4" :showAction="false" shape="square" v-model="keyword" @search="handelSearch"> | ||
| 16 | + </u-search> | ||
| 17 | + </view> | ||
| 18 | + | ||
| 19 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | ||
| 20 | + </view> | ||
| 21 | + | ||
| 22 | + <u-sticky bgColor="#fff"> | ||
| 23 | + <u-tabs :list="tabs" :scrollable="false" lineWidth="30rpx" lineHeight="4rpx" lineColor="#06B079" | ||
| 24 | + :inactiveStyle="{fontSize:'28rpx', color:'#4A4A53'}" :activeStyle="{fontSize:'36rpx', color:'#06B079'}" | ||
| 25 | + @change="handelTab" :current="current"> | ||
| 26 | + </u-tabs> | ||
| 27 | + </u-sticky> | ||
| 28 | + | ||
| 29 | + <view class="list_box" v-if="list.length > 0"> | ||
| 30 | + <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> | ||
| 31 | + | ||
| 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 | + </view> | ||
| 36 | + | ||
| 37 | + <view class="bg_image" v-else> | ||
| 38 | + <u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image> | ||
| 39 | + <text>已阅</text> | ||
| 40 | + </view> | ||
| 41 | + | ||
| 42 | + <view class="info"> | ||
| 43 | + <view class="avatar">{{getNameLastTwo(item.studentName)}}</view> | ||
| 44 | + <view class="form_name"> | ||
| 45 | + <view class="name">{{overflowHide(item.title, 10)}}</view> | ||
| 46 | + <view class="week"> | ||
| 47 | + <!-- <text>{{timeFormat(item.logTime, 'yyyy年')}}</text> --> | ||
| 48 | + <!-- <text>{{getWeek(item.logTime)}}</text> --> | ||
| 49 | + <text>{{getCreatedTime(item)}}</text> | ||
| 50 | + | ||
| 51 | + </view> | ||
| 52 | + </view> | ||
| 53 | + </view> | ||
| 54 | + <view class="u-content"> | ||
| 55 | + <u-parse :content="item.content"></u-parse> | ||
| 56 | + </view> | ||
| 57 | + <view class="name_time"> | ||
| 58 | + <view class="name"> | ||
| 59 | + <text>学生姓名</text> | ||
| 60 | + <text>{{item.studentName}}</text> | ||
| 61 | + </view> | ||
| 62 | + <view class="time">{{timeFormat(item.createdTime)}}</view> | ||
| 63 | + </view> | ||
| 64 | + | ||
| 65 | + </view> | ||
| 66 | + <c-loading :loading="loading"></c-loading> | ||
| 67 | + </view> | ||
| 68 | + <view v-else class="no_data"> | ||
| 69 | + <c-no-data></c-no-data> | ||
| 70 | + </view> | ||
| 71 | + | ||
| 72 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | ||
| 73 | + <view class="popup_search"> | ||
| 74 | + <view class="content"> | ||
| 75 | + <view class="title">按项目筛选</view> | ||
| 76 | + <scroll-view class="scroll" scroll-y="true"> | ||
| 77 | + <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> | ||
| 78 | + <view class="selectItem" v-if="item.id == projectId"> | ||
| 79 | + <text>{{item.name}}</text> | ||
| 80 | + </view> | ||
| 81 | + <view v-else> | ||
| 82 | + <text>{{item.name}}</text> | ||
| 83 | + </view> | ||
| 84 | + </view> | ||
| 85 | + </scroll-view> | ||
| 86 | + <view class="switch"> | ||
| 87 | + <text>未阅</text> | ||
| 88 | + <u-switch v-model="switchValue" size="48" activeColor="#06B079" @change="handelChange"> | ||
| 89 | + </u-switch> | ||
| 90 | + </view> | ||
| 91 | + </view> | ||
| 92 | + | ||
| 93 | + <view class="footer"> | ||
| 94 | + <view class="left_btn"> | ||
| 95 | + <c-button type="cancel" text="重置" @click="handelCancel"> | ||
| 96 | + </c-button> | ||
| 97 | + </view> | ||
| 98 | + <view class="right_btn"> | ||
| 99 | + <c-button type="confirm" text="确定" @click="hancelSubmit"> | ||
| 100 | + </c-button> | ||
| 101 | + </view> | ||
| 102 | + </view> | ||
| 103 | + </view> | ||
| 104 | + </u-popup> | ||
| 105 | + </view> | ||
| 106 | +</template> | ||
| 107 | + | ||
| 108 | +<script> | ||
| 109 | + import { | ||
| 110 | + mapGetters, | ||
| 111 | + mapState, | ||
| 112 | + mapActions | ||
| 113 | + } from 'vuex' | ||
| 114 | + import listMixin from "@/common/mixins/list-mixin.js"; | ||
| 115 | + | ||
| 116 | + import { | ||
| 117 | + getLogReviewListApi, | ||
| 118 | + getProjectListApi, | ||
| 119 | + } from '@/config/api.js'; | ||
| 120 | + | ||
| 121 | + export default { | ||
| 122 | + mixins: [listMixin], | ||
| 123 | + data() { | ||
| 124 | + return { | ||
| 125 | + studentId: '', | ||
| 126 | + checkboxValue: [], | ||
| 127 | + checkboxList: [{ | ||
| 128 | + name: '未阅', | ||
| 129 | + disabled: false | ||
| 130 | + }], | ||
| 131 | + keyword: '', | ||
| 132 | + search: { | ||
| 133 | + //搜索对象必须为key search的对象 | ||
| 134 | + keySearch: "", | ||
| 135 | + status: '', | ||
| 136 | + category: 'daily', | ||
| 137 | + | ||
| 138 | + }, | ||
| 139 | + show: false, //筛选 | ||
| 140 | + current: 0, | ||
| 141 | + tabs: [{ | ||
| 142 | + name: '日志', | ||
| 143 | + }, { | ||
| 144 | + name: '周志', | ||
| 145 | + }, { | ||
| 146 | + name: '月志' | ||
| 147 | + }], | ||
| 148 | + | ||
| 149 | + list: [], //列表必须为key list的数组 | ||
| 150 | + | ||
| 151 | + projectId: '', | ||
| 152 | + showTime: false, | ||
| 153 | + timeValue: '', | ||
| 154 | + switchValue: false, | ||
| 155 | + | ||
| 156 | + } | ||
| 157 | + }, | ||
| 158 | + | ||
| 159 | + onLoad(option) { | ||
| 160 | + console.log(option) | ||
| 161 | + this.studentId = option.studentId; | ||
| 162 | + this.projectId = option.projectId; | ||
| 163 | + | ||
| 164 | + this.$store.dispatch(`home/getProjectList`, { | ||
| 165 | + pageSize: -1, | ||
| 166 | + }) | ||
| 167 | + | ||
| 168 | + this.search.keySearch = ''; | ||
| 169 | + | ||
| 170 | + if (option && option.category) { | ||
| 171 | + this.search.category = option.category; | ||
| 172 | + this.current = | ||
| 173 | + option.category == 'daily' ? 0 : | ||
| 174 | + option.category == 'weekly' ? 1 : | ||
| 175 | + option.category == 'monthly' ? 2 : | ||
| 176 | + ''; | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + if (option && option.status) { | ||
| 180 | + this.search.status = 'unread'; | ||
| 181 | + this.checkboxValue = ['未阅']; | ||
| 182 | + this.switchValue = true; | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + this.finished = false; | ||
| 186 | + this.loading = "loadmore"; | ||
| 187 | + this.page = 0; | ||
| 188 | + this.list = []; | ||
| 189 | + }, | ||
| 190 | + | ||
| 191 | + onShow() { | ||
| 192 | + this._getList(); | ||
| 193 | + }, | ||
| 194 | + | ||
| 195 | + computed: { | ||
| 196 | + ...mapState('home', { | ||
| 197 | + // 箭头函数可使代码更简练 | ||
| 198 | + projectList: 'projectList', | ||
| 199 | + }), | ||
| 200 | + }, | ||
| 201 | + | ||
| 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 | + }, | ||
| 213 | + | ||
| 214 | + getWeek(dt) { | ||
| 215 | + if (dt > 0) { | ||
| 216 | + let d1 = new Date(dt); | ||
| 217 | + let d2 = new Date(dt); | ||
| 218 | + d2.setMonth(0); | ||
| 219 | + d2.setDate(1); | ||
| 220 | + let rq = d1 - d2; | ||
| 221 | + let days = Math.ceil(rq / (24 * 60 * 60 * 1000)); | ||
| 222 | + let num = Math.ceil(days / 7); | ||
| 223 | + return num; | ||
| 224 | + } else { | ||
| 225 | + return ''; | ||
| 226 | + } | ||
| 227 | + }, | ||
| 228 | + | ||
| 229 | + getNameLastTwo(value) { | ||
| 230 | + if (value && value.length > 3) { | ||
| 231 | + return value.substring(value.length - 3) | ||
| 232 | + } else { | ||
| 233 | + return value; | ||
| 234 | + } | ||
| 235 | + }, | ||
| 236 | + | ||
| 237 | + overflowHide(value, num = 4) { | ||
| 238 | + if (value && value.length > num) { | ||
| 239 | + return `${value.slice(0, num)}...` | ||
| 240 | + } else { | ||
| 241 | + return value; | ||
| 242 | + } | ||
| 243 | + }, | ||
| 244 | + | ||
| 245 | + handelTab(item) { | ||
| 246 | + let category = item.index === 0 ? 'daily' : item.index === 1 ? 'weekly' : item.index === 2 ? 'monthly' : | ||
| 247 | + ''; | ||
| 248 | + | ||
| 249 | + this.search.category = category; | ||
| 250 | + | ||
| 251 | + this.finished = false; | ||
| 252 | + this.loading = "loadmore"; | ||
| 253 | + this.page = 0; | ||
| 254 | + this.list = []; | ||
| 255 | + this._getList(); | ||
| 256 | + | ||
| 257 | + }, | ||
| 258 | + | ||
| 259 | + handelDetail(record) { | ||
| 260 | + this.$u.route({ | ||
| 261 | + url: `pages/main/home/logDetail/logDetail?id=${record.id}&formId=${record.formId}` | ||
| 262 | + }) | ||
| 263 | + }, | ||
| 264 | + | ||
| 265 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 266 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | ||
| 267 | + }, | ||
| 268 | + | ||
| 269 | + checkboxChange(n) { | ||
| 270 | + console.log('change', n); | ||
| 271 | + | ||
| 272 | + this.search.status = n.length > 0 ? 'unread' : ''; | ||
| 273 | + | ||
| 274 | + this.switchValue = n.length > 0 ? true : false; | ||
| 275 | + | ||
| 276 | + this.finished = false; | ||
| 277 | + this.loading = "loadmore"; | ||
| 278 | + this.page = 0; | ||
| 279 | + this.list = []; | ||
| 280 | + this._getList(); | ||
| 281 | + }, | ||
| 282 | + | ||
| 283 | + handelSearch(value) { | ||
| 284 | + this.finished = false; | ||
| 285 | + this.loading = "loadmore"; | ||
| 286 | + this.page = 0; | ||
| 287 | + this.list = []; | ||
| 288 | + this._getList(); | ||
| 289 | + }, | ||
| 290 | + | ||
| 291 | + open() { | ||
| 292 | + | ||
| 293 | + }, | ||
| 294 | + | ||
| 295 | + close() { | ||
| 296 | + this.show = false | ||
| 297 | + }, | ||
| 298 | + | ||
| 299 | + // scroll-view到底部加载更多 | ||
| 300 | + onreachBottom() {}, | ||
| 301 | + // 搜索 | ||
| 302 | + searchSubmit() { | ||
| 303 | + // 调用混合搜索 | ||
| 304 | + this._searchData(); | ||
| 305 | + }, | ||
| 306 | + // 模拟后端分页 | ||
| 307 | + async getData(requestParams) { | ||
| 308 | + const { | ||
| 309 | + search = {} | ||
| 310 | + } = requestParams; | ||
| 311 | + | ||
| 312 | + let params = {}; | ||
| 313 | + params.pageNumber = requestParams.page + 1; | ||
| 314 | + params.pageSize = 5; | ||
| 315 | + | ||
| 316 | + if (search.status) { | ||
| 317 | + params.status = search.status; | ||
| 318 | + } | ||
| 319 | + | ||
| 320 | + if (search.category) { | ||
| 321 | + params.category = search.category; | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + if (this.keyword) { | ||
| 325 | + params.keySearch = this.keyword | ||
| 326 | + } | ||
| 327 | + | ||
| 328 | + if (this.studentId) { | ||
| 329 | + params.studentId = this.studentId | ||
| 330 | + } | ||
| 331 | + | ||
| 332 | + if (this.projectId) { | ||
| 333 | + params.projectId = this.projectId | ||
| 334 | + } | ||
| 335 | + | ||
| 336 | + return await getLogReviewListApi(params); | ||
| 337 | + }, | ||
| 338 | + // 数据请求(没错就是这么少的代码) | ||
| 339 | + async _getList() { | ||
| 340 | + if (this.page == 0) { | ||
| 341 | + this.list = []; | ||
| 342 | + } | ||
| 343 | + | ||
| 344 | + // 根据实际情况修改自己修改key | ||
| 345 | + let result = await this.getData({ | ||
| 346 | + page: this.page, // 传入页码 | ||
| 347 | + size: this.size, // 传入每页条数 | ||
| 348 | + search: this.search, // 传入搜索的对象 | ||
| 349 | + }); | ||
| 350 | + | ||
| 351 | + this.total = result.total; | ||
| 352 | + | ||
| 353 | + if (this.list.length == 0 && result.records.length == 0) { | ||
| 354 | + this.shownoData = false | ||
| 355 | + } else { | ||
| 356 | + this.shownoData = true | ||
| 357 | + } | ||
| 358 | + | ||
| 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 | + } | ||
| 368 | + }, | ||
| 369 | + | ||
| 370 | + handelClick(values) { | ||
| 371 | + this.projectId = values.id; | ||
| 372 | + }, | ||
| 373 | + | ||
| 374 | + handelChange(e) { | ||
| 375 | + this.checkboxValue = e ? ['未阅'] : []; | ||
| 376 | + this.search.status = e ? 'unread' : ''; | ||
| 377 | + | ||
| 378 | + }, | ||
| 379 | + | ||
| 380 | + handelCancel() { | ||
| 381 | + this.switchValue = false; | ||
| 382 | + this.projectId = ''; | ||
| 383 | + }, | ||
| 384 | + | ||
| 385 | + hancelSubmit() { | ||
| 386 | + this.finished = false; | ||
| 387 | + this.loading = "loadmore"; | ||
| 388 | + this.page = 0; | ||
| 389 | + this.list = []; | ||
| 390 | + this._getList(); | ||
| 391 | + | ||
| 392 | + this.show = false; | ||
| 393 | + }, | ||
| 394 | + | ||
| 395 | + } | ||
| 396 | + } | ||
| 397 | +</script> | ||
| 398 | + | ||
| 399 | +<style lang="scss" scoped> | ||
| 400 | + .registration_review { | ||
| 401 | + width: 100%; | ||
| 402 | + min-height: 100%; | ||
| 403 | + height: auto; | ||
| 404 | + background-color: #F7F7F7; | ||
| 405 | + | ||
| 406 | + .search_box { | ||
| 407 | + padding: 36rpx 30rpx 12rpx; | ||
| 408 | + background-color: #FFFFFF; | ||
| 409 | + display: flex; | ||
| 410 | + flex-flow: row nowrap; | ||
| 411 | + justify-content: space-between; | ||
| 412 | + | ||
| 413 | + .check { | ||
| 414 | + padding: 20rpx 0 0 0; | ||
| 415 | + } | ||
| 416 | + | ||
| 417 | + .search { | ||
| 418 | + width: 468rpx; | ||
| 419 | + } | ||
| 420 | + } | ||
| 421 | + | ||
| 422 | + .list_box { | ||
| 423 | + padding: 0 0 50rpx 0; | ||
| 424 | + | ||
| 425 | + .item { | ||
| 426 | + position: relative; | ||
| 427 | + width: 630rpx; | ||
| 428 | + margin: 30rpx auto; | ||
| 429 | + padding: 30rpx; | ||
| 430 | + border-radius: 12rpx; | ||
| 431 | + background-color: #FFFFFF; | ||
| 432 | + | ||
| 433 | + .bg_image { | ||
| 434 | + position: absolute; | ||
| 435 | + top: 0; | ||
| 436 | + right: 0; | ||
| 437 | + | ||
| 438 | + text { | ||
| 439 | + position: absolute; | ||
| 440 | + top: 12rpx; | ||
| 441 | + right: 30rpx; | ||
| 442 | + font-size: 24rpx; | ||
| 443 | + line-height: 24rpx; | ||
| 444 | + color: #FFFFFF; | ||
| 445 | + } | ||
| 446 | + } | ||
| 447 | + | ||
| 448 | + .info { | ||
| 449 | + display: flex; | ||
| 450 | + flex-flow: row nowrap; | ||
| 451 | + align-items: center; | ||
| 452 | + margin: 0 0 30rpx 0; | ||
| 453 | + | ||
| 454 | + .avatar { | ||
| 455 | + width: 94rpx; | ||
| 456 | + height: 94rpx; | ||
| 457 | + border-radius: 4rpx; | ||
| 458 | + background-color: #06B079; | ||
| 459 | + font-size: 24rpx; | ||
| 460 | + line-height: 94rpx; | ||
| 461 | + color: #FFFFFF; | ||
| 462 | + text-align: center; | ||
| 463 | + } | ||
| 464 | + | ||
| 465 | + .form_name { | ||
| 466 | + .name { | ||
| 467 | + font-size: 32rpx; | ||
| 468 | + line-height: 44rpx; | ||
| 469 | + color: #202131; | ||
| 470 | + font-weight: 500; | ||
| 471 | + margin: 0 20rpx; | ||
| 472 | + } | ||
| 473 | + | ||
| 474 | + .week { | ||
| 475 | + padding: 8rpx 0 0 0; | ||
| 476 | + font-size: 20rpx; | ||
| 477 | + line-height: 32rpx; | ||
| 478 | + color: #909097; | ||
| 479 | + | ||
| 480 | + // padding: 0 0 0 20rpx; | ||
| 481 | + text { | ||
| 482 | + padding: 8rpx 0 0 20rpx; | ||
| 483 | + } | ||
| 484 | + } | ||
| 485 | + } | ||
| 486 | + } | ||
| 487 | + | ||
| 488 | + .u-content { | ||
| 489 | + font-size: 24rpx; | ||
| 490 | + line-height: 32rpx; | ||
| 491 | + color: #909097; | ||
| 492 | + margin: 32rpx 0 30rpx 0; | ||
| 493 | + max-height: 100rpx; | ||
| 494 | + overflow: hidden; | ||
| 495 | + } | ||
| 496 | + | ||
| 497 | + .name_time { | ||
| 498 | + border-top: 2rpx solid #E2E2E8; | ||
| 499 | + padding: 28rpx 0 0 0; | ||
| 500 | + display: flex; | ||
| 501 | + flex-flow: row nowrap; | ||
| 502 | + justify-content: space-between; | ||
| 503 | + | ||
| 504 | + | ||
| 505 | + .name { | ||
| 506 | + text { | ||
| 507 | + font-size: 28rpx; | ||
| 508 | + line-height: 32rpx; | ||
| 509 | + color: #909097; | ||
| 510 | + } | ||
| 511 | + | ||
| 512 | + text:last-child { | ||
| 513 | + color: #202131; | ||
| 514 | + margin: 0 0 0 30rpx; | ||
| 515 | + } | ||
| 516 | + } | ||
| 517 | + | ||
| 518 | + .time { | ||
| 519 | + font-size: 28rpx; | ||
| 520 | + line-height: 32rpx; | ||
| 521 | + color: #909097; | ||
| 522 | + } | ||
| 523 | + } | ||
| 524 | + } | ||
| 525 | + } | ||
| 526 | + | ||
| 527 | + .popup_search { | ||
| 528 | + width: 640rpx; | ||
| 529 | + position: relative; | ||
| 530 | + | ||
| 531 | + .content { | ||
| 532 | + padding: 0 40rpx; | ||
| 533 | + | ||
| 534 | + .title { | ||
| 535 | + padding: 24rpx 0; | ||
| 536 | + font-size: 28rpx; | ||
| 537 | + line-height: 36rpx; | ||
| 538 | + color: #202131; | ||
| 539 | + } | ||
| 540 | + | ||
| 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 | + } | ||
| 567 | + } | ||
| 568 | + | ||
| 569 | + .time { | ||
| 570 | + padding: 40rpx 0 0 0; | ||
| 571 | + } | ||
| 572 | + | ||
| 573 | + .switch { | ||
| 574 | + display: flex; | ||
| 575 | + flex-flow: row nowrap; | ||
| 576 | + justify-content: space-between; | ||
| 577 | + padding: 40rpx 0 0 0; | ||
| 578 | + | ||
| 579 | + text { | ||
| 580 | + font-size: 28rpx; | ||
| 581 | + line-height: 36rpx; | ||
| 582 | + color: #202131; | ||
| 583 | + } | ||
| 584 | + } | ||
| 585 | + | ||
| 586 | + | ||
| 587 | + } | ||
| 588 | + | ||
| 589 | + .footer { | ||
| 590 | + width: 560rpx; | ||
| 591 | + height: 96rpx; | ||
| 592 | + padding: 28rpx 40rpx; | ||
| 593 | + background: #FFFFFF; | ||
| 594 | + position: fixed; | ||
| 595 | + bottom: 0; | ||
| 596 | + right: 0; | ||
| 597 | + z-index: 99; | ||
| 598 | + border-top: 2rpx solid #E2E2E8; | ||
| 599 | + | ||
| 600 | + view { | ||
| 601 | + display: inline-block; | ||
| 602 | + } | ||
| 603 | + | ||
| 604 | + .left_btn { | ||
| 605 | + width: 194rpx; | ||
| 606 | + margin: 0 20rpx 0 0; | ||
| 607 | + } | ||
| 608 | + | ||
| 609 | + .right_btn { | ||
| 610 | + width: 346rpx; | ||
| 611 | + } | ||
| 612 | + } | ||
| 613 | + } | ||
| 614 | + } | ||
| 615 | +</style> |
| 1 | +<template> | ||
| 2 | + <view class="registration_detail"> | ||
| 3 | + | ||
| 4 | + <view class="box student_info"> | ||
| 5 | + <view class="title">学生信息</view> | ||
| 6 | + <view class="item"> | ||
| 7 | + <text>学生姓名</text> | ||
| 8 | + <text>{{registrationDetail.studentName}}</text> | ||
| 9 | + </view> | ||
| 10 | + <view class="item"> | ||
| 11 | + <text>手机号</text> | ||
| 12 | + <text>{{registrationDetail.studentPhone}}</text> | ||
| 13 | + </view> | ||
| 14 | + <view class="item"> | ||
| 15 | + <text>学号</text> | ||
| 16 | + <text>{{registrationDetail.studentNumber}}</text> | ||
| 17 | + </view> | ||
| 18 | + <view class="item"> | ||
| 19 | + <text>班级</text> | ||
| 20 | + <text>{{registrationDetail.classInfo}}</text> | ||
| 21 | + </view> | ||
| 22 | + | ||
| 23 | + <view class="icon_item"> | ||
| 24 | + <u-icon size="32rpx" label="实习项目" labelSize="28rpx" labelColor="#909097" | ||
| 25 | + name="/static/img/home/internshipProgramIcon.png"></u-icon> | ||
| 26 | + <text>{{registrationDetail.projectName}}</text> | ||
| 27 | + </view> | ||
| 28 | + | ||
| 29 | + <view class="border_top item"> | ||
| 30 | + <text>申请时间</text> | ||
| 31 | + <text>{{timeFormat(registrationDetail.applyTime, 'yyyy-mm-dd hh:MM')}}</text> | ||
| 32 | + </view> | ||
| 33 | + </view> | ||
| 34 | + | ||
| 35 | + <view class="box company_info"> | ||
| 36 | + <view class="title">单位信息</view> | ||
| 37 | + <view class="icon_item"> | ||
| 38 | + <u-icon size="32rpx" label="实习单位" labelSize="28rpx" labelColor="#909097" | ||
| 39 | + name="/static/img/home/internshipUnitIcon.png"></u-icon> | ||
| 40 | + <text>{{registrationDetail.companyName}}</text> | ||
| 41 | + </view> | ||
| 42 | + <view class="icon_item"> | ||
| 43 | + <u-icon size="32rpx" label="实习岗位" labelSize="28rpx" labelColor="#909097" | ||
| 44 | + name="/static/img/home/internshipJobIcon.png"></u-icon> | ||
| 45 | + <text>{{registrationDetail.jobName}}</text> | ||
| 46 | + </view> | ||
| 47 | + <view class="border_top item"> | ||
| 48 | + <text>联系人</text> | ||
| 49 | + <text>{{jobDetail.contactName}}</text> | ||
| 50 | + </view> | ||
| 51 | + <view class="item"> | ||
| 52 | + <text>联系电话</text> | ||
| 53 | + <text>{{jobDetail.contactPhone}}</text> | ||
| 54 | + </view> | ||
| 55 | + <view class="item"> | ||
| 56 | + <text>所在地区</text> | ||
| 57 | + <text>{{address}}</text> | ||
| 58 | + </view> | ||
| 59 | + <view class="item"> | ||
| 60 | + <text>详细地址</text> | ||
| 61 | + <text>{{jobDetail.workSite}}</text> | ||
| 62 | + </view> | ||
| 63 | + </view> | ||
| 64 | + | ||
| 65 | + <view class="box status"> | ||
| 66 | + <view class="title">状态</view> | ||
| 67 | + <view class="item"> | ||
| 68 | + <text>审核状态</text> | ||
| 69 | + <text>{{reviewStatus}}</text> | ||
| 70 | + </view> | ||
| 71 | + <view class="item"> | ||
| 72 | + <text>审核人</text> | ||
| 73 | + <text>{{registrationDetail.auditTeacherName}}</text> | ||
| 74 | + </view> | ||
| 75 | + <view class="item"> | ||
| 76 | + <text>接受状态</text> | ||
| 77 | + <text>{{receiveStatus}}</text> | ||
| 78 | + </view> | ||
| 79 | + </view> | ||
| 80 | + | ||
| 81 | + <view class="footer" v-if="registrationDetail.status == 'wait'"> | ||
| 82 | + <view class="left_btn"> | ||
| 83 | + <c-button type="cancel" text="审核拒绝" @click="handelCancel"> | ||
| 84 | + </c-button> | ||
| 85 | + </view> | ||
| 86 | + <view class="right_btn"> | ||
| 87 | + <c-button type="confirm" text="审核通过" @click="hancelSubmit"> | ||
| 88 | + </c-button> | ||
| 89 | + </view> | ||
| 90 | + </view> | ||
| 91 | + </view> | ||
| 92 | +</template> | ||
| 93 | + | ||
| 94 | +<script> | ||
| 95 | + import { | ||
| 96 | + getRegistrationDetailApi, | ||
| 97 | + putRegistrationReviewApi, | ||
| 98 | + } from '@/config/api.js'; | ||
| 99 | + | ||
| 100 | + export default { | ||
| 101 | + data() { | ||
| 102 | + return { | ||
| 103 | + registrationDetail: {}, | ||
| 104 | + } | ||
| 105 | + }, | ||
| 106 | + | ||
| 107 | + onLoad(option) { | ||
| 108 | + getRegistrationDetailApi(option.id).then(data => { | ||
| 109 | + if (data) { | ||
| 110 | + console.log(data) | ||
| 111 | + this.registrationDetail = data | ||
| 112 | + } | ||
| 113 | + }) | ||
| 114 | + | ||
| 115 | + }, | ||
| 116 | + | ||
| 117 | + onShow(options) { | ||
| 118 | + | ||
| 119 | + }, | ||
| 120 | + | ||
| 121 | + computed: { | ||
| 122 | + jobDetail: function() { | ||
| 123 | + let { | ||
| 124 | + jobDetail = {} | ||
| 125 | + } = this.registrationDetail | ||
| 126 | + return jobDetail; | ||
| 127 | + }, | ||
| 128 | + | ||
| 129 | + address: function() { | ||
| 130 | + return this.jobDetail && this.jobDetail.province ? | ||
| 131 | + `${this.jobDetail.province}/${this.jobDetail.city}/${this.jobDetail.district}` : ''; | ||
| 132 | + | ||
| 133 | + }, | ||
| 134 | + | ||
| 135 | + reviewStatus: function() { | ||
| 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 | + }, | ||
| 148 | + }, | ||
| 149 | + | ||
| 150 | + methods: { | ||
| 151 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 152 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | ||
| 153 | + }, | ||
| 154 | + | ||
| 155 | + handelCancel() { | ||
| 156 | + putRegistrationReviewApi({ | ||
| 157 | + formIds: [this.registrationDetail.id], | ||
| 158 | + status: 'reject', | ||
| 159 | + }).then(data => { | ||
| 160 | + if (data) { | ||
| 161 | + uni.navigateBack({ | ||
| 162 | + delta: 1 | ||
| 163 | + }); | ||
| 164 | + } | ||
| 165 | + }) | ||
| 166 | + }, | ||
| 167 | + | ||
| 168 | + hancelSubmit() { | ||
| 169 | + putRegistrationReviewApi({ | ||
| 170 | + formIds: [this.registrationDetail.id], | ||
| 171 | + status: 'pass', | ||
| 172 | + }).then(data => { | ||
| 173 | + if (data) { | ||
| 174 | + uni.navigateBack({ | ||
| 175 | + delta: 1 | ||
| 176 | + }); | ||
| 177 | + } | ||
| 178 | + }) | ||
| 179 | + }, | ||
| 180 | + } | ||
| 181 | + } | ||
| 182 | +</script> | ||
| 183 | + | ||
| 184 | +<style lang="scss" scoped> | ||
| 185 | + .registration_detail { | ||
| 186 | + width: 100%; | ||
| 187 | + min-height: 100%; | ||
| 188 | + height: auto; | ||
| 189 | + padding: 20rpx 0 194rpx 0; | ||
| 190 | + background-color: #F7F7F7; | ||
| 191 | + | ||
| 192 | + .box { | ||
| 193 | + width: 630rpx; | ||
| 194 | + margin: 0 auto 20rpx; | ||
| 195 | + padding: 30rpx 30rpx 12rpx 30rpx; | ||
| 196 | + border-radius: 12rpx; | ||
| 197 | + background-color: #FFFFFF; | ||
| 198 | + | ||
| 199 | + .title { | ||
| 200 | + font-size: 32rpx; | ||
| 201 | + line-height: 32rpx; | ||
| 202 | + color: #202131; | ||
| 203 | + margin: 0 0 30rpx 0; | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + .title::before { | ||
| 207 | + content: ""; | ||
| 208 | + display: inline-block; | ||
| 209 | + width: 6rpx; | ||
| 210 | + height: 32rpx; | ||
| 211 | + background-color: #06B079; | ||
| 212 | + margin: 0 12rpx 0 0; | ||
| 213 | + position: relative; | ||
| 214 | + top: 4rpx; | ||
| 215 | + border-radius: 8rpx; | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + .icon_item { | ||
| 219 | + display: flex; | ||
| 220 | + flex-flow: row nowrap; | ||
| 221 | + margin: 0 0 24rpx 0; | ||
| 222 | + | ||
| 223 | + text { | ||
| 224 | + display: inline-block; | ||
| 225 | + width: 460rpx; | ||
| 226 | + font-size: 28rpx; | ||
| 227 | + line-height: 48rpx; | ||
| 228 | + color: #202131; | ||
| 229 | + margin: 0 0 0 40rpx; | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + .item { | ||
| 234 | + margin: 0 0 24rpx 0; | ||
| 235 | + | ||
| 236 | + text:first-child { | ||
| 237 | + display: inline-block; | ||
| 238 | + width: 112rpx; | ||
| 239 | + text-align: justify; | ||
| 240 | + text-align-last: justify; | ||
| 241 | + font-size: 28rpx; | ||
| 242 | + line-height: 48rpx; | ||
| 243 | + color: #909097; | ||
| 244 | + vertical-align: top; | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + text:last-child { | ||
| 248 | + display: inline-block; | ||
| 249 | + width: 440rpx; | ||
| 250 | + font-size: 28rpx; | ||
| 251 | + line-height: 48rpx; | ||
| 252 | + color: #202131; | ||
| 253 | + margin: 0 0 0 78rpx; | ||
| 254 | + } | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + .border_top { | ||
| 258 | + border-top: 2rpx solid #E2E2E8; | ||
| 259 | + padding: 28rpx 0 0 0; | ||
| 260 | + } | ||
| 261 | + } | ||
| 262 | + | ||
| 263 | + .footer { | ||
| 264 | + width: 100%; | ||
| 265 | + height: 96rpx; | ||
| 266 | + padding: 28rpx 30rpx; | ||
| 267 | + background: #FFFFFF; | ||
| 268 | + position: fixed; | ||
| 269 | + bottom: 0; | ||
| 270 | + left: 0; | ||
| 271 | + z-index: 99; | ||
| 272 | + border-top: 2rpx solid #E2E2E8; | ||
| 273 | + | ||
| 274 | + view { | ||
| 275 | + display: inline-block; | ||
| 276 | + } | ||
| 277 | + | ||
| 278 | + .left_btn { | ||
| 279 | + width: 330rpx; | ||
| 280 | + margin: 0 30rpx 0 0; | ||
| 281 | + } | ||
| 282 | + | ||
| 283 | + .right_btn { | ||
| 284 | + width: 330rpx; | ||
| 285 | + } | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + } | ||
| 289 | +</style> |
| 1 | +<template> | ||
| 2 | + <view class="registration_review"> | ||
| 3 | + <view class="search_box"> | ||
| 4 | + <view class="check"> | ||
| 5 | + <u-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange"> | ||
| 6 | + <u-checkbox :customStyle="{marginBottom: '8px'}" shape="circle" | ||
| 7 | + v-for="(item, index) in checkboxList" :key="index" :label="item.name" :name="item.name" | ||
| 8 | + activeColor="#06B079" size="28rpx" labelSize="28rpx" labelColor="#202131"> | ||
| 9 | + </u-checkbox> | ||
| 10 | + </u-checkbox-group> | ||
| 11 | + </view> | ||
| 12 | + | ||
| 13 | + <view class="search"> | ||
| 14 | + <u-search placeholder="请输入学生姓名/学号/手机号" placeholderColor="#C1C1C9" searchIconSize="36" height="64rpx" | ||
| 15 | + bgColor="#F4F4F4" :showAction="false" shape="square" v-model="keyword" @search="handelSearch"> | ||
| 16 | + </u-search> | ||
| 17 | + </view> | ||
| 18 | + | ||
| 19 | + <u-icon slot="icon" size="40" :name="'/static/img/home/selectIcon.png'" @click="show = true"></u-icon> | ||
| 20 | + </view> | ||
| 21 | + | ||
| 22 | + <view class="list_box" v-if="list.length > 0"> | ||
| 23 | + <view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)"> | ||
| 24 | + | ||
| 25 | + <view class="bg_image" v-if="item.status == 'wait'"> | ||
| 26 | + <u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image> | ||
| 27 | + <text>待审核</text> | ||
| 28 | + </view> | ||
| 29 | + | ||
| 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> | ||
| 32 | + <text>已通过</text> | ||
| 33 | + </view> | ||
| 34 | + | ||
| 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> | ||
| 41 | + <view class="company"> | ||
| 42 | + <u-icon size="32rpx" name="/static/img/home/internshipUnitIcon.png"></u-icon> | ||
| 43 | + <text>实习单位</text> | ||
| 44 | + <text>{{item.companyName || '--'}}</text> | ||
| 45 | + </view> | ||
| 46 | + <view class="company position"> | ||
| 47 | + <u-icon size="32rpx" name="/static/img/home/internshipJobIcon.png"></u-icon> | ||
| 48 | + <text>实习岗位</text> | ||
| 49 | + <text>{{item.jobName|| '--'}}</text> | ||
| 50 | + </view> | ||
| 51 | + | ||
| 52 | + <view class="time"> | ||
| 53 | + <text>申请时间</text> | ||
| 54 | + <text>{{timeFormat(item.applyTime, 'yyyy-mm-dd hh:MM')}}</text> | ||
| 55 | + </view> | ||
| 56 | + | ||
| 57 | + </view> | ||
| 58 | + <c-loading :loading="loading"></c-loading> | ||
| 59 | + </view> | ||
| 60 | + <view v-else class="no_data"> | ||
| 61 | + <c-no-data></c-no-data> | ||
| 62 | + </view> | ||
| 63 | + | ||
| 64 | + <u-popup :show="show" mode="right" @close="close" @open="open" :closeOnClickOverlay="false"> | ||
| 65 | + <view class="popup_search"> | ||
| 66 | + <view class="content"> | ||
| 67 | + <view class="title">按项目筛选</view> | ||
| 68 | + <scroll-view class="scroll" scroll-y="true"> | ||
| 69 | + <view class="item" v-for="(item, i) in projectList" :key="i" @click="handelClick(item)"> | ||
| 70 | + <view class="selectItem" v-if="item.id == projectId"> | ||
| 71 | + <text>{{item.name}}</text> | ||
| 72 | + </view> | ||
| 73 | + <view v-else> | ||
| 74 | + <text>{{item.name}}</text> | ||
| 75 | + </view> | ||
| 76 | + </view> | ||
| 77 | + </scroll-view> | ||
| 78 | + <view class="switch"> | ||
| 79 | + <text>待审核</text> | ||
| 80 | + <u-switch v-model="switchValue" size="48" activeColor="#06B079" @change="handelChange"> | ||
| 81 | + </u-switch> | ||
| 82 | + </view> | ||
| 83 | + </view> | ||
| 84 | + | ||
| 85 | + <view class="footer"> | ||
| 86 | + <view class="left_btn"> | ||
| 87 | + <c-button type="cancel" text="重置" @click="handelCancel"> | ||
| 88 | + </c-button> | ||
| 89 | + </view> | ||
| 90 | + <view class="right_btn"> | ||
| 91 | + <c-button type="confirm" text="确定" @click="hancelSubmit"> | ||
| 92 | + </c-button> | ||
| 93 | + </view> | ||
| 94 | + </view> | ||
| 95 | + | ||
| 96 | + </view> | ||
| 97 | + </u-popup> | ||
| 98 | + | ||
| 99 | + </view> | ||
| 100 | +</template> | ||
| 101 | + | ||
| 102 | +<script> | ||
| 103 | + import { | ||
| 104 | + mapGetters, | ||
| 105 | + mapState, | ||
| 106 | + mapActions | ||
| 107 | + } from 'vuex' | ||
| 108 | + import listMixin from "@/common/mixins/list-mixin.js"; | ||
| 109 | + | ||
| 110 | + import { | ||
| 111 | + getRegistrationReviewApi, | ||
| 112 | + getProjectListApi, | ||
| 113 | + } from '@/config/api.js'; | ||
| 114 | + | ||
| 115 | + export default { | ||
| 116 | + mixins: [listMixin], | ||
| 117 | + data() { | ||
| 118 | + return { | ||
| 119 | + checkboxValue: [], | ||
| 120 | + // 基本案列数据 | ||
| 121 | + checkboxList: [{ | ||
| 122 | + name: '待审核', | ||
| 123 | + disabled: false | ||
| 124 | + }], | ||
| 125 | + keyword: '', | ||
| 126 | + show: false, | ||
| 127 | + list: [], //列表必须为key list的数组 | ||
| 128 | + search: { | ||
| 129 | + //搜索对象必须为key search的对象 | ||
| 130 | + keySearch: "", | ||
| 131 | + status: 'wait,pass,reject', | ||
| 132 | + | ||
| 133 | + }, | ||
| 134 | + projectId: '', | ||
| 135 | + switchValue: false, | ||
| 136 | + } | ||
| 137 | + }, | ||
| 138 | + | ||
| 139 | + onLoad(option) { | ||
| 140 | + console.log(option) | ||
| 141 | + this.$store.dispatch(`home/getProjectList`, { | ||
| 142 | + pageSize: -1, | ||
| 143 | + }) | ||
| 144 | + | ||
| 145 | + this.search.keySearch = ''; | ||
| 146 | + | ||
| 147 | + if (option && option.status) { | ||
| 148 | + this.search.status = 'wait'; | ||
| 149 | + this.checkboxValue = ['待审核']; | ||
| 150 | + this.switchValue = true; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + this.finished = false; | ||
| 154 | + this.loading = "loadmore"; | ||
| 155 | + this.page = 0; | ||
| 156 | + this.list = []; | ||
| 157 | + | ||
| 158 | + }, | ||
| 159 | + | ||
| 160 | + onShow() { | ||
| 161 | + this._getList(); | ||
| 162 | + }, | ||
| 163 | + | ||
| 164 | + computed: { | ||
| 165 | + ...mapState('home', { | ||
| 166 | + // 箭头函数可使代码更简练 | ||
| 167 | + projectList: 'projectList', | ||
| 168 | + | ||
| 169 | + }), | ||
| 170 | + | ||
| 171 | + }, | ||
| 172 | + | ||
| 173 | + methods: { | ||
| 174 | + | ||
| 175 | + handelDetail(record) { | ||
| 176 | + this.$u.route({ | ||
| 177 | + url: `pages/main/home/registrationDetail/registrationDetail?&id=${record.id}` | ||
| 178 | + }) | ||
| 179 | + }, | ||
| 180 | + | ||
| 181 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 182 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | ||
| 183 | + }, | ||
| 184 | + | ||
| 185 | + checkboxChange(n) { | ||
| 186 | + console.log('change', n); | ||
| 187 | + | ||
| 188 | + this.search.status = n.length > 0 ? 'wait' : 'wait,pass,reject'; | ||
| 189 | + | ||
| 190 | + this.switchValue = n.length > 0 ? true : false; | ||
| 191 | + | ||
| 192 | + this.finished = false; | ||
| 193 | + this.loading = "loadmore"; | ||
| 194 | + this.page = 0; | ||
| 195 | + this.list = []; | ||
| 196 | + this._getList(); | ||
| 197 | + }, | ||
| 198 | + | ||
| 199 | + handelSearch(value) { | ||
| 200 | + this.finished = false; | ||
| 201 | + this.loading = "loadmore"; | ||
| 202 | + this.page = 0; | ||
| 203 | + this.list = []; | ||
| 204 | + this._getList(); | ||
| 205 | + }, | ||
| 206 | + | ||
| 207 | + open() { | ||
| 208 | + // console.log('open'); | ||
| 209 | + }, | ||
| 210 | + close() { | ||
| 211 | + this.show = false | ||
| 212 | + // console.log('close'); | ||
| 213 | + }, | ||
| 214 | + // scroll-view到底部加载更多 | ||
| 215 | + onreachBottom() {}, | ||
| 216 | + // 搜索 | ||
| 217 | + searchSubmit() { | ||
| 218 | + // 调用混合搜索 | ||
| 219 | + this._searchData(); | ||
| 220 | + }, | ||
| 221 | + // 模拟后端分页 | ||
| 222 | + async getData(requestParams) { | ||
| 223 | + const { | ||
| 224 | + search = {} | ||
| 225 | + } = requestParams; | ||
| 226 | + | ||
| 227 | + let params = {}; | ||
| 228 | + params.pageNumber = requestParams.page + 1; | ||
| 229 | + params.pageSize = 5; | ||
| 230 | + | ||
| 231 | + if (search.status) { | ||
| 232 | + params.status = search.status; | ||
| 233 | + } | ||
| 234 | + | ||
| 235 | + if (this.keyword) { | ||
| 236 | + params.keySearch = this.keyword | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + if (this.projectId) { | ||
| 240 | + params.projectId = this.projectId | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + return await getRegistrationReviewApi(params); | ||
| 244 | + }, | ||
| 245 | + // 数据请求(没错就是这么少的代码) | ||
| 246 | + async _getList() { | ||
| 247 | + if (this.page == 0) { | ||
| 248 | + this.list = []; | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + // 根据实际情况修改自己修改key | ||
| 252 | + let result = await this.getData({ | ||
| 253 | + page: this.page, // 传入页码 | ||
| 254 | + size: this.size, // 传入每页条数 | ||
| 255 | + search: this.search, // 传入搜索的对象 | ||
| 256 | + }); | ||
| 257 | + | ||
| 258 | + this.total = result.total; | ||
| 259 | + | ||
| 260 | + if (this.list.length == 0 && result.records.length == 0) { | ||
| 261 | + this.shownoData = false | ||
| 262 | + } else { | ||
| 263 | + this.shownoData = true | ||
| 264 | + } | ||
| 265 | + | ||
| 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 | + } | ||
| 275 | + }, | ||
| 276 | + | ||
| 277 | + handelClick(values) { | ||
| 278 | + console.log(values); | ||
| 279 | + this.projectId = values.id; | ||
| 280 | + }, | ||
| 281 | + | ||
| 282 | + handelChange(e) { | ||
| 283 | + console.log(e) | ||
| 284 | + this.checkboxValue = e ? ['待审核'] : []; | ||
| 285 | + this.search.status = e ? 'wait' : 'wait,pass,reject'; | ||
| 286 | + | ||
| 287 | + }, | ||
| 288 | + | ||
| 289 | + handelCancel() { | ||
| 290 | + this.switchValue = false; | ||
| 291 | + this.projectId = ''; | ||
| 292 | + }, | ||
| 293 | + | ||
| 294 | + hancelSubmit() { | ||
| 295 | + this.finished = false; | ||
| 296 | + this.loading = "loadmore"; | ||
| 297 | + this.page = 0; | ||
| 298 | + this.list = []; | ||
| 299 | + this._getList(); | ||
| 300 | + | ||
| 301 | + this.show = false; | ||
| 302 | + }, | ||
| 303 | + | ||
| 304 | + } | ||
| 305 | + } | ||
| 306 | +</script> | ||
| 307 | + | ||
| 308 | +<style lang="scss" scoped> | ||
| 309 | + .registration_review { | ||
| 310 | + width: 100%; | ||
| 311 | + min-height: 100%; | ||
| 312 | + height: auto; | ||
| 313 | + background-color: #F7F7F7; | ||
| 314 | + | ||
| 315 | + .search_box { | ||
| 316 | + padding: 36rpx 30rpx 12rpx; | ||
| 317 | + background-color: #FFFFFF; | ||
| 318 | + display: flex; | ||
| 319 | + flex-flow: row nowrap; | ||
| 320 | + justify-content: space-between; | ||
| 321 | + | ||
| 322 | + .check { | ||
| 323 | + padding: 20rpx 0 0 0; | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + .search { | ||
| 327 | + width: 468rpx; | ||
| 328 | + } | ||
| 329 | + } | ||
| 330 | + | ||
| 331 | + .list_box { | ||
| 332 | + padding: 0 0 50rpx 0; | ||
| 333 | + | ||
| 334 | + .item { | ||
| 335 | + position: relative; | ||
| 336 | + width: 630rpx; | ||
| 337 | + margin: 30rpx auto; | ||
| 338 | + padding: 30rpx; | ||
| 339 | + border-radius: 12rpx; | ||
| 340 | + background-color: #FFFFFF; | ||
| 341 | + | ||
| 342 | + .bg_image { | ||
| 343 | + position: absolute; | ||
| 344 | + top: 0; | ||
| 345 | + right: 0; | ||
| 346 | + | ||
| 347 | + text { | ||
| 348 | + position: absolute; | ||
| 349 | + top: 12rpx; | ||
| 350 | + right: 30rpx; | ||
| 351 | + font-size: 24rpx; | ||
| 352 | + line-height: 24rpx; | ||
| 353 | + color: #FFFFFF; | ||
| 354 | + } | ||
| 355 | + } | ||
| 356 | + | ||
| 357 | + .name { | ||
| 358 | + font-size: 32rpx; | ||
| 359 | + line-height: 44rpx; | ||
| 360 | + color: #202131; | ||
| 361 | + font-weight: 500; | ||
| 362 | + margin: 0 0 30rpx 0; | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + .company { | ||
| 366 | + display: flex; | ||
| 367 | + flex-flow: row nowrap; | ||
| 368 | + margin: 0 0 30rpx 0; | ||
| 369 | + | ||
| 370 | + text { | ||
| 371 | + font-size: 28rpx; | ||
| 372 | + line-height: 32rpx; | ||
| 373 | + color: #909097; | ||
| 374 | + margin: 0 0 0 16rpx; | ||
| 375 | + } | ||
| 376 | + | ||
| 377 | + text:last-child { | ||
| 378 | + color: #202131; | ||
| 379 | + margin: 0 0 0 30rpx; | ||
| 380 | + } | ||
| 381 | + } | ||
| 382 | + | ||
| 383 | + .time { | ||
| 384 | + border-top: 2rpx solid #E2E2E8; | ||
| 385 | + padding: 28rpx 0 0 0; | ||
| 386 | + | ||
| 387 | + text { | ||
| 388 | + font-size: 28rpx; | ||
| 389 | + line-height: 32rpx; | ||
| 390 | + color: #909097; | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + text:last-child { | ||
| 394 | + color: #202131; | ||
| 395 | + margin: 0 0 0 78rpx; | ||
| 396 | + } | ||
| 397 | + } | ||
| 398 | + } | ||
| 399 | + } | ||
| 400 | + | ||
| 401 | + .popup_search { | ||
| 402 | + width: 640rpx; | ||
| 403 | + position: relative; | ||
| 404 | + | ||
| 405 | + .content { | ||
| 406 | + padding: 0 40rpx; | ||
| 407 | + | ||
| 408 | + .title { | ||
| 409 | + padding: 24rpx 0; | ||
| 410 | + font-size: 28rpx; | ||
| 411 | + line-height: 36rpx; | ||
| 412 | + color: #202131; | ||
| 413 | + } | ||
| 414 | + | ||
| 415 | + .scroll { | ||
| 416 | + max-height: 60vh; | ||
| 417 | + | ||
| 418 | + .item { | ||
| 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; | ||
| 439 | + } | ||
| 440 | + } | ||
| 441 | + } | ||
| 442 | + | ||
| 443 | + .switch { | ||
| 444 | + display: flex; | ||
| 445 | + flex-flow: row nowrap; | ||
| 446 | + justify-content: space-between; | ||
| 447 | + padding: 40rpx 0 0 0; | ||
| 448 | + | ||
| 449 | + text { | ||
| 450 | + font-size: 28rpx; | ||
| 451 | + line-height: 36rpx; | ||
| 452 | + color: #202131; | ||
| 453 | + } | ||
| 454 | + } | ||
| 455 | + | ||
| 456 | + | ||
| 457 | + } | ||
| 458 | + | ||
| 459 | + .footer { | ||
| 460 | + width: 560rpx; | ||
| 461 | + height: 96rpx; | ||
| 462 | + padding: 28rpx 40rpx; | ||
| 463 | + background: #FFFFFF; | ||
| 464 | + position: fixed; | ||
| 465 | + bottom: 0; | ||
| 466 | + right: 0; | ||
| 467 | + z-index: 99; | ||
| 468 | + border-top: 2rpx solid #E2E2E8; | ||
| 469 | + | ||
| 470 | + view { | ||
| 471 | + display: inline-block; | ||
| 472 | + } | ||
| 473 | + | ||
| 474 | + .left_btn { | ||
| 475 | + width: 194rpx; | ||
| 476 | + margin: 0 20rpx 0 0; | ||
| 477 | + } | ||
| 478 | + | ||
| 479 | + .right_btn { | ||
| 480 | + width: 346rpx; | ||
| 481 | + } | ||
| 482 | + } | ||
| 483 | + } | ||
| 484 | + } | ||
| 485 | +</style> |
| 1 | +<template> | ||
| 2 | + <view class="report_detail"> | ||
| 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> | ||
| 97 | + </view> | ||
| 98 | + | ||
| 99 | + </view> | ||
| 100 | +</template> | ||
| 101 | + | ||
| 102 | +<script> | ||
| 103 | + import { | ||
| 104 | + mapGetters, | ||
| 105 | + mapState, | ||
| 106 | + mapActions | ||
| 107 | + } from 'vuex' | ||
| 108 | + import listMixin from "@/common/mixins/list-mixin.js"; | ||
| 109 | + | ||
| 110 | + import { | ||
| 111 | + getOssInitApi, | ||
| 112 | + getImgUrlApi, | ||
| 113 | + getReportDetailApi, | ||
| 114 | + putReportReviewApi, | ||
| 115 | + } from '@/config/api.js'; | ||
| 116 | + | ||
| 117 | + export default { | ||
| 118 | + data() { | ||
| 119 | + return { | ||
| 120 | + id: '', | ||
| 121 | + formId: '', | ||
| 122 | + detail: {}, | ||
| 123 | + reportAttachments: [], | ||
| 124 | + reviewAttachments: [], | ||
| 125 | + ossInit: {}, | ||
| 126 | + mFileDir: "yxly", | ||
| 127 | + mFileType: ".doc", | ||
| 128 | + fileList: [], | ||
| 129 | + attachments: [], | ||
| 130 | + show: false, | ||
| 131 | + selector: ["上传微信文件", "上传电脑文件"], | ||
| 132 | + maxCount: 9, | ||
| 133 | + textarea: '', | ||
| 134 | + } | ||
| 135 | + }, | ||
| 136 | + | ||
| 137 | + onLoad(option) { | ||
| 138 | + this.id = option.id; | ||
| 139 | + this.formId = option.formId; | ||
| 140 | + | ||
| 141 | + if(!option.id) { | ||
| 142 | + return; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + getOssInitApi({ | ||
| 146 | + "uploadFileType": "report" | ||
| 147 | + }).then(res => { | ||
| 148 | + this.ossInit = res | ||
| 149 | + }) | ||
| 150 | + | ||
| 151 | + getReportDetailApi(option.id).then(data => { | ||
| 152 | + if (data) { | ||
| 153 | + this.detail = data; | ||
| 154 | + if (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; | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + }) | ||
| 161 | + }, | ||
| 162 | + | ||
| 163 | + methods: { | ||
| 164 | + getNameLastTwo(value) { | ||
| 165 | + if (value && value.length > 3) { | ||
| 166 | + return value.substring(value.length - 3) | ||
| 167 | + } else { | ||
| 168 | + return value; | ||
| 169 | + } | ||
| 170 | + }, | ||
| 171 | + | ||
| 172 | + overflowHide(value) { | ||
| 173 | + if (value && value.length > 4) { | ||
| 174 | + return `${value.slice(0, 4)}...` | ||
| 175 | + } else { | ||
| 176 | + return value; | ||
| 177 | + } | ||
| 178 | + }, | ||
| 179 | + | ||
| 180 | + timeFormat(timestamp, format = 'yyyy-mm-dd') { | ||
| 181 | + return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--' | ||
| 182 | + }, | ||
| 183 | + | ||
| 184 | + handelRecord() { | ||
| 185 | + this.$u.route({ | ||
| 186 | + url: `pages/main/home/approvalRecord/approvalRecord?formId=${this.detail.formId}` | ||
| 187 | + }) | ||
| 188 | + }, | ||
| 189 | + | ||
| 190 | + openLink(e) { | ||
| 191 | + var _this = this | ||
| 192 | + this.mFileDir = e.filename.substring(0, e.filename.lastIndexOf('.')) | ||
| 193 | + this.mFileType = e.filename.substring(e.filename.lastIndexOf('.'), e.filename.length) | ||
| 194 | + getImgUrlApi({ | ||
| 195 | + bucket: e.bucket, | ||
| 196 | + filePath: e.object | ||
| 197 | + }).then(data => { | ||
| 198 | + console.log("data...", data) | ||
| 199 | + if (e.mime_type.indexOf("image") != -1) { | ||
| 200 | + _this.openImage(data.url) | ||
| 201 | + } else { | ||
| 202 | + uni.downloadFile({ | ||
| 203 | + url: data.url, | ||
| 204 | + filePath: wx.env.USER_DATA_PATH + '/' + _this.mFileDir + this.mFileType, | ||
| 205 | + success: (res) => { | ||
| 206 | + if (res.statusCode === 200) { | ||
| 207 | + uni.showLoading(); | ||
| 208 | + console.log('download succ', res) | ||
| 209 | + let fileMgr = wx.getFileSystemManager(); | ||
| 210 | + let filePath = res.filePath | ||
| 211 | + uni.saveFile({ | ||
| 212 | + tempFilePath: filePath, | ||
| 213 | + success: function(res) { | ||
| 214 | + var savedFilePath = res.savedFilePath; | ||
| 215 | + /* 删除缓存 */ | ||
| 216 | + fileMgr.unlink({ | ||
| 217 | + filePath: wx.env.USER_DATA_PATH + | ||
| 218 | + '/' + | ||
| 219 | + _this.mFileDir + _this | ||
| 220 | + .mFileType, | ||
| 221 | + success: function(res) { | ||
| 222 | + console.log( | ||
| 223 | + 'unlink success:', | ||
| 224 | + res); | ||
| 225 | + } | ||
| 226 | + }) | ||
| 227 | + _this.openDoc() | ||
| 228 | + }, | ||
| 229 | + fail: function(res) { | ||
| 230 | + console.log('save fail', res); | ||
| 231 | + _this.createFile() | ||
| 232 | + } | ||
| 233 | + }) | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + }); | ||
| 237 | + } | ||
| 238 | + }) | ||
| 239 | + }, | ||
| 240 | + | ||
| 241 | + createFile() { | ||
| 242 | + let fileMgr = wx.getFileSystemManager(); | ||
| 243 | + var _this = this | ||
| 244 | + //利用access方法判断文件是否可用 | ||
| 245 | + fileMgr.access({ | ||
| 246 | + path: wx.env.USER_DATA_PATH + '/' + _this.mFileDir, | ||
| 247 | + success: (res) => { | ||
| 248 | + console.log('check success:', res); | ||
| 249 | + _this.openDoc() | ||
| 250 | + }, | ||
| 251 | + fail: (res) => { | ||
| 252 | + console.log('check fail.', res); | ||
| 253 | + fileMgr.mkdir({ | ||
| 254 | + dirPath: wx.env.USER_DATA_PATH + '/' + _this.mFileDir, | ||
| 255 | + success: (res) => { | ||
| 256 | + console.log('mk dir success:', res); | ||
| 257 | + _this.openDoc() | ||
| 258 | + }, | ||
| 259 | + fail: (res) => { | ||
| 260 | + console.log('mk dir fail:', res); | ||
| 261 | + uni.hideLoading(); | ||
| 262 | + } | ||
| 263 | + }); | ||
| 264 | + } | ||
| 265 | + }); | ||
| 266 | + }, | ||
| 267 | + | ||
| 268 | + openDoc() { | ||
| 269 | + uni.openDocument({ | ||
| 270 | + filePath: wx.env.USER_DATA_PATH + '/' + this.mFileDir + this.mFileType, | ||
| 271 | + showMenu: true, | ||
| 272 | + success: function(res) { | ||
| 273 | + uni.hideLoading(); | ||
| 274 | + console.log('openDoc succ'); | ||
| 275 | + } | ||
| 276 | + }); | ||
| 277 | + }, | ||
| 278 | + | ||
| 279 | + openImage(imgPath) { | ||
| 280 | + let array = new Array(1).fill(imgPath); | ||
| 281 | + uni.previewImage({ | ||
| 282 | + urls: array, | ||
| 283 | + success(res) { | ||
| 284 | + console.log('openImage success'); | ||
| 285 | + }, | ||
| 286 | + fail(res) { | ||
| 287 | + console.log('openImage fail:', res); | ||
| 288 | + } | ||
| 289 | + }); | ||
| 290 | + }, | ||
| 291 | + | ||
| 292 | + deletePic(index) { | ||
| 293 | + this.attachments.splice(index, 1) | ||
| 294 | + }, | ||
| 295 | + | ||
| 296 | + handelFile() { | ||
| 297 | + let _this = this; | ||
| 298 | + | ||
| 299 | + wx.chooseMessageFile({ | ||
| 300 | + count: 9, | ||
| 301 | + extension: ['.doc', '.pdf', '.docx', '.png', 'jpg', 'xlsx', 'xls', '.pptx'], | ||
| 302 | + success(res) { | ||
| 303 | + console.log(res.tempFiles); | ||
| 304 | + | ||
| 305 | + let files = res.tempFiles; | ||
| 306 | + | ||
| 307 | + for (var i = 0; i < files.length; i++) { | ||
| 308 | + uni.uploadFile({ | ||
| 309 | + url: _this.vuex_ossUrl, | ||
| 310 | + filePath: files[i].path, | ||
| 311 | + name: "file", | ||
| 312 | + formData: { | ||
| 313 | + 'key': `${_this.ossInit.dir}${new Date().getTime()}/` + files[i].name, | ||
| 314 | + 'action': `${_this.ossInit.host}`, | ||
| 315 | + 'OSSAccessKeyId': _this.ossInit.accessId, | ||
| 316 | + 'policy': _this.ossInit.policy, | ||
| 317 | + 'signature': _this.ossInit.signature, | ||
| 318 | + 'callback': _this.ossInit.callback, | ||
| 319 | + }, | ||
| 320 | + success: (uploadFileRes) => { | ||
| 321 | + console.log('uploadFileRes...', uploadFileRes) | ||
| 322 | + _this.attachments.push(JSON.parse(uploadFileRes.data)) | ||
| 323 | + | ||
| 324 | + }, | ||
| 325 | + complete: (res) => { | ||
| 326 | + console.log('res...', res) | ||
| 327 | + } | ||
| 328 | + }); | ||
| 329 | + } | ||
| 330 | + | ||
| 331 | + | ||
| 332 | + } | ||
| 333 | + }); | ||
| 334 | + }, | ||
| 335 | + | ||
| 336 | + handelCancel() { | ||
| 337 | + putReportReviewApi(this.id, { | ||
| 338 | + status: 'return', | ||
| 339 | + reviewAttachments: JSON.stringify(this.attachments), | ||
| 340 | + review: this.textarea, | ||
| 341 | + }).then(data => { | ||
| 342 | + if (data) { | ||
| 343 | + uni.navigateBack({ | ||
| 344 | + delta: 1 | ||
| 345 | + }); | ||
| 346 | + } | ||
| 347 | + }) | ||
| 348 | + }, | ||
| 349 | + | ||
| 350 | + hancelSubmit() { | ||
| 351 | + putReportReviewApi(this.id, { | ||
| 352 | + status: 'adopt', | ||
| 353 | + reviewAttachments: JSON.stringify(this.attachments), | ||
| 354 | + review: this.textarea, | ||
| 355 | + }).then(data => { | ||
| 356 | + if (data) { | ||
| 357 | + uni.navigateBack({ | ||
| 358 | + delta: 1 | ||
| 359 | + }); | ||
| 360 | + } | ||
| 361 | + }) | ||
| 362 | + }, | ||
| 363 | + } | ||
| 364 | + } | ||
| 365 | +</script> | ||
| 366 | + | ||
| 367 | +<style lang="scss" scoped> | ||
| 368 | + .report_detail { | ||
| 369 | + width: 100%; | ||
| 370 | + min-height: 100%; | ||
| 371 | + height: auto; | ||
| 372 | + background-color: #F7F7F7; | ||
| 373 | + padding: 20rpx 0 150rpx 0; | ||
| 374 | + | ||
| 375 | + .report_info { | ||
| 376 | + position: relative; | ||
| 377 | + width: 630rpx; | ||
| 378 | + margin: 0 auto; | ||
| 379 | + padding: 30rpx; | ||
| 380 | + border-radius: 12rpx; | ||
| 381 | + background-color: #FFFFFF; | ||
| 382 | + | ||
| 383 | + .bg_image { | ||
| 384 | + position: absolute; | ||
| 385 | + top: 0; | ||
| 386 | + right: 0; | ||
| 387 | + | ||
| 388 | + text { | ||
| 389 | + position: absolute; | ||
| 390 | + top: 12rpx; | ||
| 391 | + right: 30rpx; | ||
| 392 | + font-size: 24rpx; | ||
| 393 | + line-height: 24rpx; | ||
| 394 | + color: #FFFFFF; | ||
| 395 | + } | ||
| 396 | + } | ||
| 397 | + | ||
| 398 | + .info { | ||
| 399 | + display: flex; | ||
| 400 | + flex-flow: row nowrap; | ||
| 401 | + align-items: center; | ||
| 402 | + margin: 0 0 30rpx 0; | ||
| 403 | + | ||
| 404 | + .avatar { | ||
| 405 | + width: 78rpx; | ||
| 406 | + height: 94rpx; | ||
| 407 | + padding: 0 8rpx; | ||
| 408 | + border-radius: 4rpx; | ||
| 409 | + background-color: #06B079; | ||
| 410 | + font-size: 24rpx; | ||
| 411 | + line-height: 94rpx; | ||
| 412 | + color: #FFFFFF; | ||
| 413 | + text-align: center; | ||
| 414 | + } | ||
| 415 | + | ||
| 416 | + .title_name { | ||
| 417 | + .title { | ||
| 418 | + font-size: 32rpx; | ||
| 419 | + line-height: 44rpx; | ||
| 420 | + color: #202131; | ||
| 421 | + font-weight: 500; | ||
| 422 | + margin: 0 20rpx; | ||
| 423 | + } | ||
| 424 | + | ||
| 425 | + .name { | ||
| 426 | + padding: 8rpx 0 0 20rpx; | ||
| 427 | + font-size: 28rpx; | ||
| 428 | + line-height: 32rpx; | ||
| 429 | + color: #909097; | ||
| 430 | + | ||
| 431 | + text:last-child { | ||
| 432 | + padding: 0 0 0 30rpx; | ||
| 433 | + color: #202131; | ||
| 434 | + } | ||
| 435 | + } | ||
| 436 | + } | ||
| 437 | + | ||
| 438 | + } | ||
| 439 | + | ||
| 440 | + .time_record { | ||
| 441 | + border-top: 2rpx solid #E2E2E8; | ||
| 442 | + padding: 28rpx 0 0 0; | ||
| 443 | + display: flex; | ||
| 444 | + flex-flow: row nowrap; | ||
| 445 | + justify-content: space-between; | ||
| 446 | + | ||
| 447 | + text { | ||
| 448 | + font-size: 28rpx; | ||
| 449 | + line-height: 32rpx; | ||
| 450 | + color: #909097; | ||
| 451 | + } | ||
| 452 | + | ||
| 453 | + .record { | ||
| 454 | + display: flex; | ||
| 455 | + flex-flow: row nowrap; | ||
| 456 | + | ||
| 457 | + text { | ||
| 458 | + font-size: 24rpx; | ||
| 459 | + line-height: 32rpx; | ||
| 460 | + color: #06B079; | ||
| 461 | + } | ||
| 462 | + } | ||
| 463 | + } | ||
| 464 | + } | ||
| 465 | + | ||
| 466 | + .box { | ||
| 467 | + width: 630rpx; | ||
| 468 | + margin: 20rpx auto; | ||
| 469 | + padding: 30rpx 30rpx 12rpx 30rpx; | ||
| 470 | + border-radius: 12rpx; | ||
| 471 | + background-color: #FFFFFF; | ||
| 472 | + | ||
| 473 | + .title { | ||
| 474 | + font-size: 32rpx; | ||
| 475 | + line-height: 32rpx; | ||
| 476 | + color: #202131; | ||
| 477 | + margin: 0 0 30rpx 0; | ||
| 478 | + } | ||
| 479 | + | ||
| 480 | + .title::before { | ||
| 481 | + content: ""; | ||
| 482 | + display: inline-block; | ||
| 483 | + width: 6rpx; | ||
| 484 | + height: 32rpx; | ||
| 485 | + background-color: #06B079; | ||
| 486 | + margin: 0 12rpx 0 0; | ||
| 487 | + position: relative; | ||
| 488 | + top: 4rpx; | ||
| 489 | + border-radius: 8rpx; | ||
| 490 | + } | ||
| 491 | + | ||
| 492 | + | ||
| 493 | + | ||
| 494 | + .item { | ||
| 495 | + margin: 0 0 24rpx 0; | ||
| 496 | + | ||
| 497 | + text:first-child { | ||
| 498 | + display: inline-block; | ||
| 499 | + width: 112rpx; | ||
| 500 | + text-align: justify; | ||
| 501 | + text-align-last: justify; | ||
| 502 | + font-size: 28rpx; | ||
| 503 | + line-height: 48rpx; | ||
| 504 | + color: #909097; | ||
| 505 | + vertical-align: top; | ||
| 506 | + } | ||
| 507 | + | ||
| 508 | + text:last-child { | ||
| 509 | + display: inline-block; | ||
| 510 | + width: 440rpx; | ||
| 511 | + word-break: break-word; | ||
| 512 | + font-size: 28rpx; | ||
| 513 | + line-height: 48rpx; | ||
| 514 | + color: #202131; | ||
| 515 | + margin: 0 0 0 78rpx; | ||
| 516 | + } | ||
| 517 | + } | ||
| 518 | + | ||
| 519 | + .border_top { | ||
| 520 | + border-top: 2rpx solid #E2E2E8; | ||
| 521 | + padding: 28rpx 0 0 0; | ||
| 522 | + } | ||
| 523 | + } | ||
| 524 | + | ||
| 525 | + .file { | ||
| 526 | + | ||
| 527 | + .icon_item { | ||
| 528 | + display: flex; | ||
| 529 | + flex-flow: row wrap; | ||
| 530 | + margin: 0 0 12rpx 0; | ||
| 531 | + | ||
| 532 | + text { | ||
| 533 | + display: inline-block; | ||
| 534 | + font-size: 28rpx; | ||
| 535 | + line-height: 36rpx; | ||
| 536 | + margin: 0 8rpx 12rpx 0; | ||
| 537 | + color: #06B079; | ||
| 538 | + } | ||
| 539 | + | ||
| 540 | + } | ||
| 541 | + | ||
| 542 | + .icon_box { | ||
| 543 | + width: 70rpx; | ||
| 544 | + border: 2rpx solid #06B079; | ||
| 545 | + text-align: center; | ||
| 546 | + margin: 0 auto 20rpx; | ||
| 547 | + padding: 20rpx; | ||
| 548 | + | ||
| 549 | + text { | ||
| 550 | + font-size: 34rpx; | ||
| 551 | + | ||
| 552 | + } | ||
| 553 | + } | ||
| 554 | + } | ||
| 555 | + | ||
| 556 | + .footer { | ||
| 557 | + width: 100%; | ||
| 558 | + height: 96rpx; | ||
| 559 | + padding: 28rpx 30rpx; | ||
| 560 | + background: #FFFFFF; | ||
| 561 | + position: fixed; | ||
| 562 | + bottom: 0; | ||
| 563 | + left: 0; | ||
| 564 | + z-index: 99; | ||
| 565 | + border-top: 2rpx solid #E2E2E8; | ||
| 566 | + | ||
| 567 | + view { | ||
| 568 | + display: inline-block; | ||
| 569 | + } | ||
| 570 | + | ||
| 571 | + .left_btn { | ||
| 572 | + width: 330rpx; | ||
| 573 | + margin: 0 30rpx 0 0; | ||
| 574 | + } | ||
| 575 | + | ||
| 576 | + .right_btn { | ||
| 577 | + width: 330rpx; | ||
| 578 | + } | ||
| 579 | + } | ||
| 580 | + } | ||
| 581 | +</style> |
请
注册
或
登录
后发表评论