提交 7e0d7b045ee71b149ad97306fb514488f3f77788

作者 genglw
1 个父辈 60f302a9

feat: first

要显示太多修改。

为保证性能只显示 17 of 17+ 个文件。

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