提交 1b85bcf918ebff3e09880d60010864234777b55e

作者 genglw
1 个父辈 7e0d7b04

fix: bug

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

819 Bytes | 宽: | 高:

1.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

1.5 KB | 宽: | 高:

1.0 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

876 Bytes | 宽: | 高:

1.5 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

1.8 KB | 宽: | 高:

1.1 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
@@ -14,7 +14,7 @@ try { @@ -14,7 +14,7 @@ try {
14 } 14 }
15 15
16 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名 16 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
17 -let saveStateKeys = ['hasLogin', 'vuex_user', 'vuex_token', 'vuex_phone', 'vuex_weixinUserInfo']; 17 +let saveStateKeys = ['hasLogin', 'vuex_user', 'vuex_token', 'refresh_token', 'vuex_phone', 'vuex_weixinUserInfo'];
18 18
19 // 保存变量到本地存储中 19 // 保存变量到本地存储中
20 const saveLifeData = function(key, value) { 20 const saveLifeData = function(key, value) {
@@ -43,6 +43,7 @@ const store = new Vuex.Store({ @@ -43,6 +43,7 @@ const store = new Vuex.Store({
43 vuex_user: lifeData.vuex_user ? lifeData.vuex_user : '', 43 vuex_user: lifeData.vuex_user ? lifeData.vuex_user : '',
44 vuex_weixinUserInfo: lifeData.vuex_weixinUserInfo ? lifeData.vuex_weixinUserInfo : '', 44 vuex_weixinUserInfo: lifeData.vuex_weixinUserInfo ? lifeData.vuex_weixinUserInfo : '',
45 vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '', 45 vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
  46 + refresh_token: lifeData.refresh_token ? lifeData.refresh_token : '',
46 vuex_phone: lifeData.vuex_phone ? lifeData.vuex_phone : '', 47 vuex_phone: lifeData.vuex_phone ? lifeData.vuex_phone : '',
47 // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式 48 // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
48 vuex_version: '1.0.1', 49 vuex_version: '1.0.1',
@@ -65,23 +66,45 @@ const store = new Vuex.Store({ @@ -65,23 +66,45 @@ const store = new Vuex.Store({
65 66
66 }, 67 },
67 getters: { 68 getters: {
68 - doneRoles: state => {  
69 - if (state.vuex_user) {  
70 - const { 69 + doneRolesLength: state => {
  70 + if (state && state.vuex_user && state.vuex_user.teacher) {
  71 + let {
71 teacher = {} 72 teacher = {}
72 } = state.vuex_user; 73 } = state.vuex_user;
  74 + if (teacher && teacher.roles && teacher.roles.length > 0) {
  75 +
  76 + return teacher.roles.length
  77 + } else {
  78 + return 0
  79 + }
  80 + } else {
  81 + return 0
  82 + }
  83 + },
  84 +
  85 + doneRolesName: state => {
73 86
  87 + if (state && state.vuex_user && state.vuex_user.teacher) {
  88 + let {
  89 + teacher = {}
  90 + } = state.vuex_user;
74 if (teacher && teacher.roles && teacher.roles.length > 0) { 91 if (teacher && teacher.roles && teacher.roles.length > 0) {
75 let selectRoles = teacher.roles.filter(item => item.id == teacher.roleId); 92 let selectRoles = teacher.roles.filter(item => item.id == teacher.roleId);
76 return selectRoles[0].name 93 return selectRoles[0].name
77 } else { 94 } else {
78 return '' 95 return ''
79 } 96 }
80 - } else {  
81 - return '' 97 + } else {
  98 + return ''
82 } 99 }
  100 + },
83 101
84 - 102 + doneSchoolName: state => {
  103 + if (state && state.vuex_user && state.vuex_user.teacher) {
  104 + return state.vuex_user.teacher.schoolName;
  105 + } else {
  106 + return '';
  107 + }
85 }, 108 },
86 }, 109 },
87 mutations: { 110 mutations: {
1 -import { 1 +import {
  2 + getSchoolListApi,
2 getProjectListApi, 3 getProjectListApi,
3 -} from '@/config/api.js';  
4 - 4 +} from '@/config/api.js';
  5 +
5 const state = () => ({ 6 const state = () => ({
  7 + schoolList: [],
6 projectList: [], 8 projectList: [],
7 }) 9 })
8 10
9 const getters = { 11 const getters = {
10 - 12 +
11 } 13 }
12 14
13 const actions = { 15 const actions = {
14 16
  17 +
  18 +
  19 + async getSchoolList({
  20 + commit,
  21 + dispatch,
  22 + state
  23 + }, params) {
  24 + const result = await getSchoolListApi(params);
  25 + if (result && result.records) {
  26 + commit('setSchoolList', result);
  27 + return result;
  28 + }
  29 + },
  30 +
15 async getProjectList({ 31 async getProjectList({
16 commit, 32 commit,
17 dispatch, 33 dispatch,
18 state 34 state
19 }, params) { 35 }, params) {
20 - const result = await getProjectListApi(params);  
21 - if (result&& result.records) {  
22 - commit('setProjectList', result); 36 + const result = await getProjectListApi(params);
  37 + if (result && result.records) {
  38 + commit('setProjectList', result);
23 return result; 39 return result;
24 - } 40 + }
25 }, 41 },
26 42
27 } 43 }
28 44
29 const mutations = { 45 const mutations = {
30 46
31 - setProjectList(state, result) { 47 + setSchoolList(state, result) {
  48 + state.schoolList = result.records;
  49 + },
  50 +
  51 + setProjectList(state, result) {
32 state.projectList = result.records; 52 state.projectList = result.records;
33 }, 53 },
34 54
@@ -4,23 +4,13 @@ import { @@ -4,23 +4,13 @@ import {
4 } from '@/config/api.js'; 4 } from '@/config/api.js';
5 5
6 const state = () => ({ 6 const state = () => ({
7 - openid: '',  
8 - isReg: '',  
9 - id: '',  
10 - name: '',  
11 - number: '',  
12 - password: '',  
13 - phone: '',  
14 - status: '',  
15 - type: '',  
16 - username: '', 7 + loginInfo: {},
17 userInfo: {}, 8 userInfo: {},
18 userBasicInfo: {}, 9 userBasicInfo: {},
19 -  
20 }) 10 })
21 11
22 const getters = { 12 const getters = {
23 - 13 +
24 } 14 }
25 15
26 // actions 16 // actions
@@ -37,7 +27,9 @@ const actions = { @@ -37,7 +27,9 @@ const actions = {
37 custom: { 27 custom: {
38 auth: false 28 auth: false
39 } 29 }
40 - }); 30 + });
  31 +
  32 + console.log(login_result)
41 33
42 if (login_result) { 34 if (login_result) {
43 35
@@ -80,17 +72,21 @@ const actions = { @@ -80,17 +72,21 @@ const actions = {
80 72
81 break; 73 break;
82 } 74 }
  75 +
  76 + return login_result;
83 } 77 }
84 78
85 79
  80 +
  81 +
86 }, 82 },
87 83
88 async loginOut({ 84 async loginOut({
89 commit, 85 commit,
90 dispatch, 86 dispatch,
91 state 87 state
92 - }, params) {  
93 - 88 + }, params) {
  89 +
94 await commit('setLoginOut', {}); 90 await commit('setLoginOut', {});
95 uni.$u.route('/pages/main/my/login/login'); 91 uni.$u.route('/pages/main/my/login/login');
96 }, 92 },
@@ -101,8 +97,8 @@ const actions = { @@ -101,8 +97,8 @@ const actions = {
101 state 97 state
102 }, params) { 98 }, params) {
103 99
104 - const result = await getUserInfoApi();  
105 - 100 + const result = await getUserInfoApi();
  101 +
106 commit('setUserInfo', result); 102 commit('setUserInfo', result);
107 103
108 uni.$u.vuex('vuex_user', result); 104 uni.$u.vuex('vuex_user', result);
@@ -117,22 +113,23 @@ const mutations = { @@ -117,22 +113,23 @@ const mutations = {
117 setLogin(state, result) { 113 setLogin(state, result) {
118 let vuex_token = `Bearer ${result.access_token}` 114 let vuex_token = `Bearer ${result.access_token}`
119 uni.$u.vuex('vuex_token', vuex_token); 115 uni.$u.vuex('vuex_token', vuex_token);
  116 + uni.$u.vuex('refresh_token', result.refresh_token);
120 uni.$u.vuex('vuex_phone', result.phone); 117 uni.$u.vuex('vuex_phone', result.phone);
121 uni.$u.vuex('hasLogin', true); 118 uni.$u.vuex('hasLogin', true);
122 - },  
123 -  
124 - setLoginOut(state, result) {  
125 - uni.$u.vuex('vuex_token', '');  
126 - uni.$u.vuex('vuex_phone', '');  
127 - uni.$u.vuex('vuex_user', {});  
128 - uni.$u.vuex('hasLogin', false);  
129 - },  
130 -  
131 - setUserInfo(state, result) {  
132 - state.userInfo = result;  
133 - },  
134 -  
135 - 119 + },
  120 +
  121 + setLoginOut(state, result) {
  122 + uni.$u.vuex('vuex_token', '');
  123 + uni.$u.vuex('vuex_phone', '');
  124 + uni.$u.vuex('vuex_user', {});
  125 + uni.$u.vuex('hasLogin', false);
  126 + },
  127 +
  128 + setUserInfo(state, result) {
  129 + state.userInfo = result;
  130 + },
  131 +
  132 +
136 133
137 } 134 }
138 135
@@ -253,6 +253,8 @@ export default { @@ -253,6 +253,8 @@ export default {
253 this.monthNum, 253 this.monthNum,
254 this.getMonths(minDate, maxDate) 254 this.getMonths(minDate, maxDate)
255 ) 255 )
  256 +
  257 + console.log('months...',months)
256 // 先清空数组 258 // 先清空数组
257 this.months = [] 259 this.months = []
258 for (let i = 0; i < months; i++) { 260 for (let i = 0; i < months; i++) {
@@ -194,7 +194,8 @@ @@ -194,7 +194,8 @@
194 const formItemProps = this.children.map( 194 const formItemProps = this.children.map(
195 (item) => item.prop 195 (item) => item.prop
196 ); 196 );
197 - this.validateField(formItemProps, (errors) => { 197 + this.validateField(formItemProps, (errors) => {
  198 +
198 if(errors.length) { 199 if(errors.length) {
199 // 如果错误提示方式为toast,则进行提示 200 // 如果错误提示方式为toast,则进行提示
200 this.errorType === 'toast' && uni.$u.toast(errors[0].message) 201 this.errorType === 'toast' && uni.$u.toast(errors[0].message)
注册登录 后发表评论