1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| /**
| * 企业自评相关数据接口
| */
|
| import { get, post } from '../baseRequset';
| import { getHistoryPointList, getGradeList } from '../../model/assessment';
|
| const app = getApp();
|
| //查找用户历史得分
| function fetchHistoryPoint({ userId, period, page = 1, per_page = 30 }) {
| const options = {
| url: `/evaluation/historyPoint/${userId}`,
| params: {
| page: page,
| per_page: per_page,
| platform: 'weixin',
| },
| };
| if (period) options.params.period = period;
| return get(options).then(res => {
| res.data = getHistoryPointList(res.data);
| return res;
| });
| }
|
| //查找用户测评详情
| function fetchAssessmentDetail({ userId, period }) {
| return get({
| url: `/evaluation/detail`,
| params: {
| userId: userId,
| period: period,
| },
| });
| }
|
| // 查找当前所有用户评分列表
| function fetchGradeList({ page = 1, per_page = 30, data }) {
| return post({
| url: `/evaluation/gradeList`,
| params: {
| userId: app.globalData.accessToken.userId,
| page: page,
| per_page: per_page,
| },
| data: data,
| }).then(res => {
| res.data.data = getGradeList(res.data.data, data.period);
| return res.data;
| });
| }
|
| //查找评分规则子项表以及对应的具体得分
| function fetchRuleAndScore({userId, period}) {
| return get({
| url: `/evaluationsubrule/score`,
| params: {
| userId: userId,
| time: period,
| platform: 'weixin'
| },
| });
| }
|
| export {
| fetchHistoryPoint,
| fetchAssessmentDetail,
| fetchGradeList,
| fetchRuleAndScore
| };
|
|