smartForms.js
4.67 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
import request from '@/utils/request'
import { dataURLtoFile } from '@/utils/common'
const service = window.lwConfig.services.wecom + '/form'
//查询省市区
// export function treelist(data) {
// return request({
// url: service + '/treelist' + data,
// method: 'get',
// data,
// })
// }
//图片上传
// export function uploadFile(dataURL) {
// const data = new window.FormData()
// const f = dataURLtoFile(dataURL)
// data.append('file', f)
// // console.log('基础参数',f)
// console.log('基础参数1', data)
// return request({
// url: service + '/common/uploadFile2Cos',
// method: 'post',
// processData: false,
// data,
// })
// }
// 新增表单
export function insertInfoToSurvey(data) {
return request({
url: service + '/survey/add',
method: 'post',
data,
})
}
// 表单
export function surveyList(data) {
return request({
url: service + '/survey/list',
method: 'GET',
params: data,
})
}
// 删除表单列表
export function deleteInfoToSurvey(ids) {
return request({
url: service + '/survey/delete/' + ids,
method: 'DELETE',
})
}
// 获取表单问卷列表/表单详情
export function selectInfoToSurvey(id) {
return request({
url: service + '/survey/getInfo/' + id,
method: 'GET',
})
}
// 提交问卷
export function submitForm(data) {
return request({
url: service + '/answer/add',
method: 'post',
data,
})
}
// 判断用户是否填写表单
export function isCompleteSurvey(data) {
return request({
url: service + '/answer/isCompleteSurvey',
method: 'post',
data,
})
}
//提交用户填写表单
export function insertPieValue(data) {
return request({
url: service + '/statistic/insertPieValue',
method: 'post',
data,
})
}
// 更改表单状态
export function updateSurveyStatus(data) {
return request({
url: service + '/survey/updateStatus',
method: 'put',
data,
})
}
//获取微信用户信息
export function getAccessToken(data) {
return request({
url: service + '/Statistics/getAccessToken' + data,
method: 'get',
data,
})
}
//转移分组
export function updateSurveyGroup(data) {
return request({
url: service + '/updateSurveyGroup',
method: 'post',
data,
})
}
////////统计
//获取统计基本信息
export function selectStatistics(data) {
return request({
url: service + '/statistic/getStatistics',
method: 'get',
params: data,
})
}
//折现统计图
export function lineChart(data) {
return request({
url: service + '/statistic/lineChart',
method: 'post',
data,
})
}
//数据报表
export function StatisticsDataList(data) {
return request({
url: service + '/statistic/dataList',
method: 'post',
data,
})
}
//更改表单
export function updateInfoToSurvey(data) {
return request({
url: service + '/survey/update',
method: 'put',
data,
})
}
//数据统计数据
export function selectAnswerInfo(data) {
return request({
url: service + '/answer/getAnswerList',
method: 'post',
data,
})
}
//扇形统计图
export function pieChart(data) {
return request({
url: service + '/statistic/pieChart',
method: 'post',
data,
})
}
/**
* 数据报表导出
* @param {*} data
{
"belongId": "25",
"type": "",
"dataSource": "cillum consectetur",
"startDate": "1992-07-12",
"endDate": "2012-02-24"
}
* @returns
*/
export function overviewExport(data) {
return request({
url: service + '/statistic/data/export',
method: 'post',
data,
responseType: 'blob',
})
}
//智能表单答案统计 参数同上
export function answerExport(data) {
return request({
url: service + '/statistic/answer/export',
method: 'get',
params: data,
responseType: 'blob',
})
}
//用户统计报表导出 参数同上
export function userExport(data) {
return request({
url: service + '/statistic/user/export',
method: 'post',
data,
responseType: 'blob',
})
}
//用户统计
export function statisticsCustomer(data) {
return request({
url: service + '/statistic/customer',
method: 'post',
data,
})
}
//省市联动统计
export function areaStatistic(data) {
return request({
url: service + '/statistic/areaStatistic',
method: 'post',
data,
})
}
/**
* 智能表单站点统计
* @param {*} data
* {
* belongId: this.formId,
dataSource: this.dataSource,
* }
* @returns
*/
export function siteStas(data) {
return request({
url: service + '/statistic/siteStas',
method: 'post',
data,
})
}
export function statisticAdd(data) {
return request({
url: service + '/statistic/add',
method: 'post',
data,
})
}