Browse Source

日志导出

gzb
guozhongbo 9 months ago
parent
commit
dc680e68c6

+ 21
- 2
src/api/log.js View File

21
  */
21
  */
22
 export const logDeviceLogin_list = (data) =>
22
 export const logDeviceLogin_list = (data) =>
23
   setRequest("logDeviceLogin/list", data);
23
   setRequest("logDeviceLogin/list", data);
24
+/**
25
+ * 7.3.2 设备位置日志-所有(导出)
26
+ */
27
+export const logDeviceLogin_list_all = (data) =>
28
+    setRequest("logDeviceLogin/list_all", data);
24
 /**
29
 /**
25
  * 7.4.1 设备事件日志-列表
30
  * 7.4.1 设备事件日志-列表
26
  */
31
  */
30
  * 7.4.2 设备事件日志-添加
35
  * 7.4.2 设备事件日志-添加
31
  */
36
  */
32
 export const logdoperate_add = (data) => setRequest("logdoperate/add", data);
37
 export const logdoperate_add = (data) => setRequest("logdoperate/add", data);
38
+/**
39
+ * 7.4.3 设备事件日志-所有(导出)
40
+ */
41
+export const logdoperate_list_event_all = (data) => setRequest("logdoperate/list_event_all", data);
33
 /**
42
 /**
34
  * 7.5.1 设备违规日志-列表
43
  * 7.5.1 设备违规日志-列表
35
  */
44
  */
36
 export const logdoperate_list_violate = (data) =>
45
 export const logdoperate_list_violate = (data) =>
37
   setRequest("logdoperate/list_violate", data);
46
   setRequest("logdoperate/list_violate", data);
47
+/**
48
+ * 7.5.2 设备违规日志-所有(导出)
49
+ */
50
+export const logdoperate_list_violate_all = (data) =>
51
+    setRequest("logdoperate/list_violate_all", data);
38
 /**
52
 /**
39
  * 7.6.1 应用下载日志-列表
53
  * 7.6.1 应用下载日志-列表
40
  */
54
  */
55
 /**
69
 /**
56
  * 7.8.1 设备已安装应用-列表
70
  * 7.8.1 设备已安装应用-列表
57
  */
71
  */
58
-export const logAppStart_list_install = (data) =>
59
-  setRequest("logAppStart/list_install", data);
72
+export const logAppDown_list_install = (data) =>
73
+  setRequest("logAppDown/list_install", data);
74
+/**
75
+ * 7.8.2 设备已安装应用-所有(导出)
76
+ */
77
+export const logAppDown_list_install_all = (data) =>
78
+    setRequest("logAppDown/list_install_all", data);
60
 /**
79
 /**
61
  * 7.9.1 设备导出-列表(平台、区域)
80
  * 7.9.1 设备导出-列表(平台、区域)
62
  */
81
  */

+ 4
- 0
src/api/school.js View File

35
  * 3.1.5学校--详情
35
  * 3.1.5学校--详情
36
  */
36
  */
37
 export const school_detail = (data) => setRequest("school/detail", data);
37
 export const school_detail = (data) => setRequest("school/detail", data);
38
+/**
39
+ * 3.1.6学校--区域下学校列表
40
+ */
41
+export const school_list_rs = (data) => setRequest("school/list_rs", data);
38
 /**
42
 /**
39
  * 3.2.0.1用户--账号登录
43
  * 3.2.0.1用户--账号登录
40
  */
44
  */

+ 1
- 1
src/views/regionSection/log/admin.vue View File

101
   },
101
   },
102
   created() {
102
   created() {
103
     this.userInfo = JSON.parse(
103
     this.userInfo = JSON.parse(
104
-        localStorage.getItem("xh_control_userInfo")
104
+      localStorage.getItem("xh_control_userInfo")
105
     ).content;
105
     ).content;
106
     this.searchList();
106
     this.searchList();
107
   },
107
   },

+ 12
- 3
src/views/regionSection/log/deviceEvents.vue View File

67
         show-sizer
67
         show-sizer
68
       ></Page>
68
       ></Page>
69
     </div>
69
     </div>
70
+    <Spin fix v-if="showLoading" style="background-color: transparent">
71
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
72
+      <div>加载中</div>
73
+    </Spin>
70
   </div>
74
   </div>
71
 </template>
75
 </template>
72
 
76
 
73
 <script>
77
 <script>
74
 import { dateFormat, doEventInfo } from "@/utils";
78
 import { dateFormat, doEventInfo } from "@/utils";
75
-import { logdoperate_list_event } from "@/api/log";
79
+import { logdoperate_list_event, logdoperate_list_event_all } from "@/api/log";
76
 import { exportToExcel } from "@/utils/exportToExcel";
80
 import { exportToExcel } from "@/utils/exportToExcel";
77
 export default {
81
 export default {
78
   data() {
82
   data() {
79
     return {
83
     return {
84
+      showLoading: false,
80
       doEventInfo,
85
       doEventInfo,
81
       searchForm: {
86
       searchForm: {
82
         dataRange: [],
87
         dataRange: [],
185
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
190
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
186
       let _enddate = this.searchForm.dataRange[1];
191
       let _enddate = this.searchForm.dataRange[1];
187
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
192
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
193
+      this.showLoading = true;
188
       logdoperate_list_event({
194
       logdoperate_list_event({
189
         rtype: this.powerParams.rtype,
195
         rtype: this.powerParams.rtype,
190
         objectid: this.powerParams.objectid,
196
         objectid: this.powerParams.objectid,
196
         enddate: _enddate,
202
         enddate: _enddate,
197
         name: this.searchForm.name
203
         name: this.searchForm.name
198
       }).then((data) => {
204
       }).then((data) => {
205
+        this.showLoading = false;
199
         if (data.code === 0) {
206
         if (data.code === 0) {
200
           this.searchForm.list = data.obj.data;
207
           this.searchForm.list = data.obj.data;
201
           this.searchForm.total = data.obj.total;
208
           this.searchForm.total = data.obj.total;
209
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
216
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
210
       let _enddate = this.searchForm.dataRange[1];
217
       let _enddate = this.searchForm.dataRange[1];
211
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
218
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
212
-      logdoperate_list_event({
219
+      this.showLoading = true;
220
+      logdoperate_list_event_all({
213
         rtype: this.powerParams.rtype,
221
         rtype: this.powerParams.rtype,
214
         objectid: this.powerParams.objectid,
222
         objectid: this.powerParams.objectid,
215
         regionid: this.powerParams.objectid,
223
         regionid: this.powerParams.objectid,
218
         enddate: _enddate,
226
         enddate: _enddate,
219
         name: this.searchForm.name
227
         name: this.searchForm.name
220
       }).then((data) => {
228
       }).then((data) => {
229
+        this.showLoading = false;
221
         if (data.code === 0) {
230
         if (data.code === 0) {
222
           exportToExcel(
231
           exportToExcel(
223
             [
232
             [
224
               {
233
               {
225
-                list: data.obj.data.map((item) => {
234
+                list: data.obj.map((item) => {
226
                   return {
235
                   return {
227
                     学校名称: item.schoolName,
236
                     学校名称: item.schoolName,
228
                     班级: item.classname,
237
                     班级: item.classname,

+ 95
- 24
src/views/regionSection/log/deviceExport.vue View File

14
             ></Tree>
14
             ></Tree>
15
           </div>
15
           </div>
16
         </div>
16
         </div>
17
+        <Select
18
+          :transfer="true"
19
+          v-model="searchForm.schoolid"
20
+          @on-change="searchList()"
21
+          style="width: 180px; margin-left: 10px"
22
+        >
23
+          <template v-if="school_list.length > 0">
24
+            <Option :value="0">所有学校</Option>
25
+            <Option
26
+              v-for="item in school_list"
27
+              :value="item.schoolid"
28
+              :key="item.schoolid"
29
+              >{{ item.schoolName }}</Option
30
+            >
31
+          </template>
32
+        </Select>
17
       </div>
33
       </div>
18
       <Button type="primary" class="primary_btn" @click="toExport()"
34
       <Button type="primary" class="primary_btn" @click="toExport()"
19
         >导出</Button
35
         >导出</Button
45
         show-sizer
61
         show-sizer
46
       ></Page>
62
       ></Page>
47
     </div>
63
     </div>
64
+    <Spin fix v-if="showLoading" style="background-color: transparent">
65
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
66
+      <div>加载中</div>
67
+    </Spin>
48
   </div>
68
   </div>
49
 </template>
69
 </template>
50
 
70
 
51
 <script>
71
 <script>
52
-import { logDeviceBind_list_region } from "@/api/log";
72
+import { logDeviceBind_list_region, logDeviceBind_list_user } from "@/api/log";
53
 import { region_list_sel_tree } from "@/api/region";
73
 import { region_list_sel_tree } from "@/api/region";
74
+import { exportToExcel } from "@/utils/exportToExcel";
75
+import { school_list_rs } from "@/api/school";
54
 export default {
76
 export default {
55
   data() {
77
   data() {
56
     return {
78
     return {
79
+      showLoading: false,
57
       searchForm: {
80
       searchForm: {
58
         regionid: 0,
81
         regionid: 0,
82
+        schoolid: 0,
59
         title: "所有区域",
83
         title: "所有区域",
60
         page: 1,
84
         page: 1,
61
         size: 10,
85
         size: 10,
141
       localStorage.getItem("xh_control_userInfo")
165
       localStorage.getItem("xh_control_userInfo")
142
     ).content;
166
     ).content;
143
     this.init();
167
     this.init();
144
-    this.searchList();
145
   },
168
   },
146
   mounted() {
169
   mounted() {
147
     window.addEventListener("click", () => {
170
     window.addEventListener("click", () => {
152
     headerTree() {
175
     headerTree() {
153
       //打开树形区域列表
176
       //打开树形区域列表
154
       this.isshowtree = true;
177
       this.isshowtree = true;
178
+      console.log(this.isshowtree);
155
     },
179
     },
156
-    getSelectedNodes(data) {
180
+    async getSelectedNodes(data) {
157
       this.searchForm.title = data[0].title;
181
       this.searchForm.title = data[0].title;
158
       this.searchForm.regionid = data[0].regionid;
182
       this.searchForm.regionid = data[0].regionid;
183
+      this.searchForm.schoolid = 0;
184
+      await this.getSchoolList();
159
       this.searchList();
185
       this.searchList();
160
     },
186
     },
161
-    init() {
162
-      region_list_sel_tree({ regionid: this.powerParams.objectid }).then(
163
-        (res) => {
164
-          if (res.code === 0) {
165
-            this.setRegionList(res.obj[0]);
166
-            this.region_list = res.obj;
167
-            this.region_list.unshift({
168
-              title: "所有区域",
169
-              regionid: 0,
170
-              children: []
171
-            });
172
-
173
-            console.log(this.region_list);
174
-          } else {
175
-            this.$Message.error(res.msg);
176
-          }
177
-        }
178
-      );
187
+    async init() {
188
+      this.showLoading = true;
189
+      let res = await region_list_sel_tree({
190
+        regionid: this.powerParams.objectid
191
+      });
192
+      this.showLoading = false;
193
+      if (res.code === 0) {
194
+        this.setRegionList(res.obj[0]);
195
+        this.region_list = res.obj;
196
+        this.searchForm.regionid = this.region_list[0].regionid;
197
+        this.searchForm.title = this.region_list[0].title;
198
+      } else {
199
+        this.$Message.error(res.msg);
200
+      }
201
+      this.searchForm.schoolid = 0;
202
+      await this.getSchoolList();
203
+      this.searchList();
204
+    },
205
+    async getSchoolList() {
206
+      this.showLoading = true;
207
+      let res = await school_list_rs({ regionid: this.searchForm.regionid });
208
+      this.showLoading = false;
209
+      if (res.code === 0) {
210
+        this.school_list = res.obj;
211
+      } else {
212
+        this.$Message.error(res.msg);
213
+      }
179
     },
214
     },
180
     setRegionList(node) {
215
     setRegionList(node) {
181
       node.title = node.regionName;
216
       node.title = node.regionName;
204
     },
239
     },
205
     // 获取列表
240
     // 获取列表
206
     getList() {
241
     getList() {
242
+      this.showLoading = true;
207
       logDeviceBind_list_region({
243
       logDeviceBind_list_region({
208
         rtype: this.powerParams.rtype,
244
         rtype: this.powerParams.rtype,
209
         objectid: this.powerParams.objectid,
245
         objectid: this.powerParams.objectid,
210
         page: this.searchForm.page,
246
         page: this.searchForm.page,
211
         size: this.searchForm.size,
247
         size: this.searchForm.size,
212
-        regionid: this.searchForm.regionid
248
+        regionid: this.searchForm.regionid,
249
+        schoolid: this.searchForm.schoolid
213
       }).then((data) => {
250
       }).then((data) => {
251
+        this.showLoading = false;
214
         if (data.code === 0) {
252
         if (data.code === 0) {
215
           this.searchForm.list = data.obj.data;
253
           this.searchForm.list = data.obj.data;
216
           this.searchForm.total = data.obj.total;
254
           this.searchForm.total = data.obj.total;
217
-          console.log(this.searchForm.list);
218
         } else {
255
         } else {
219
           this.$Message.error(data.msg);
256
           this.$Message.error(data.msg);
220
         }
257
         }
221
       });
258
       });
222
     },
259
     },
223
-    toExport() {}
260
+    toExport() {
261
+      this.showLoading = true;
262
+      logDeviceBind_list_user({
263
+        regionid: this.searchForm.regionid,
264
+        schoolid: this.searchForm.schoolid
265
+      }).then((res) => {
266
+        this.showLoading = false;
267
+        if (res.code === 0) {
268
+          let name = "";
269
+          exportToExcel(
270
+            [
271
+              {
272
+                list: res.obj.map((item) => {
273
+                  return {
274
+                    学校名称: item.schoolName,
275
+                    班级: item.classname,
276
+                    登录名: item.loginname,
277
+                    姓名: item.username,
278
+                    设备号码: item.sn,
279
+                    设备型号: item.deviceModel,
280
+                    Rom版本: item.romVersion,
281
+                    违规: item.violated === 1 ? "是" : "否",
282
+                    更新时间: item.createtime
283
+                  };
284
+                }),
285
+                name: "设备导出"
286
+              }
287
+            ],
288
+            "设备导出"
289
+          );
290
+        } else {
291
+          this.$Message.error(res.msg);
292
+        }
293
+      });
294
+    }
224
   }
295
   }
225
 };
296
 };
226
 </script>
297
 </script>

+ 21
- 9
src/views/regionSection/log/deviceInstallation.vue View File

41
         show-sizer
41
         show-sizer
42
       ></Page>
42
       ></Page>
43
     </div>
43
     </div>
44
+    <Spin fix v-if="showLoading" style="background-color: transparent">
45
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
46
+      <div>加载中</div>
47
+    </Spin>
44
   </div>
48
   </div>
45
 </template>
49
 </template>
46
 
50
 
47
 <script>
51
 <script>
48
 import { dateFormat } from "@/utils";
52
 import { dateFormat } from "@/utils";
49
-import { logAppStart_list_install } from "@/api/log";
53
+import {
54
+  logAppDown_list_install,
55
+  logAppDown_list_install_all,
56
+  logAppStart_list_install
57
+} from "@/api/log";
50
 import { exportToExcel } from "@/utils/exportToExcel";
58
 import { exportToExcel } from "@/utils/exportToExcel";
51
 export default {
59
 export default {
52
   data() {
60
   data() {
111
         },
119
         },
112
         {
120
         {
113
           title: "版本名称",
121
           title: "版本名称",
114
-          key: "versionName",
122
+          key: "appVersion",
115
           align: "center"
123
           align: "center"
116
         },
124
         },
117
         {
125
         {
118
           title: "版本号",
126
           title: "版本号",
119
-          key: "versionNum",
127
+          key: "appNum",
120
           align: "center"
128
           align: "center"
121
         },
129
         },
122
         {
130
         {
162
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
170
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
163
       let _enddate = this.searchForm.dataRange[1];
171
       let _enddate = this.searchForm.dataRange[1];
164
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
172
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
165
-      logAppStart_list_install({
173
+      this.showLoading = true;
174
+      logAppDown_list_install({
166
         rtype: this.powerParams.rtype,
175
         rtype: this.powerParams.rtype,
167
         objectid: this.powerParams.objectid,
176
         objectid: this.powerParams.objectid,
168
         regionid: this.powerParams.objectid,
177
         regionid: this.powerParams.objectid,
172
         enddate: _enddate,
181
         enddate: _enddate,
173
         name: this.searchForm.name
182
         name: this.searchForm.name
174
       }).then((data) => {
183
       }).then((data) => {
184
+        this.showLoading = false;
175
         if (data.code === 0) {
185
         if (data.code === 0) {
176
           this.searchForm.list = data.obj.data;
186
           this.searchForm.list = data.obj.data;
177
           this.searchForm.total = data.obj.total;
187
           this.searchForm.total = data.obj.total;
185
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
195
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
186
       let _enddate = this.searchForm.dataRange[1];
196
       let _enddate = this.searchForm.dataRange[1];
187
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
197
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
188
-      logAppStart_list_install({
198
+      this.showLoading = true;
199
+      logAppDown_list_install_all({
189
         rtype: this.powerParams.rtype,
200
         rtype: this.powerParams.rtype,
190
         objectid: this.powerParams.objectid,
201
         objectid: this.powerParams.objectid,
191
         regionid: this.powerParams.objectid,
202
         regionid: this.powerParams.objectid,
193
         enddate: _enddate,
204
         enddate: _enddate,
194
         name: this.searchForm.name
205
         name: this.searchForm.name
195
       }).then((data) => {
206
       }).then((data) => {
207
+        this.showLoading = false;
196
         if (data.code === 0) {
208
         if (data.code === 0) {
197
           exportToExcel(
209
           exportToExcel(
198
             [
210
             [
199
               {
211
               {
200
-                list: data.obj.data.map((item) => {
212
+                list: data.obj.map((item) => {
201
                   return {
213
                   return {
202
                     学校名称: item.schoolName,
214
                     学校名称: item.schoolName,
203
                     班级: item.classname,
215
                     班级: item.classname,
205
                     姓名: item.username,
217
                     姓名: item.username,
206
                     设备号码: item.sn,
218
                     设备号码: item.sn,
207
                     应用名称: item.appName,
219
                     应用名称: item.appName,
208
-                    应用包名: item.appPackage,
209
-                    版本名称: item.versionName,
210
-                    版本号: item.versionNum,
220
+                    应用包名: item.appPackage || "",
221
+                    版本名称: item.appVersion || "",
222
+                    版本号: item.appNum || "",
211
                     上报时间: item.createtime
223
                     上报时间: item.createtime
212
                   };
224
                   };
213
                 }),
225
                 }),

+ 12
- 3
src/views/regionSection/log/deviceLocation.vue View File

41
         show-sizer
41
         show-sizer
42
       ></Page>
42
       ></Page>
43
     </div>
43
     </div>
44
+    <Spin fix v-if="showLoading" style="background-color: transparent">
45
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
46
+      <div>加载中</div>
47
+    </Spin>
44
   </div>
48
   </div>
45
 </template>
49
 </template>
46
 
50
 
47
 <script>
51
 <script>
48
 import { dateFormat } from "@/utils";
52
 import { dateFormat } from "@/utils";
49
-import { logDeviceLogin_list } from "@/api/log";
53
+import {logDeviceLogin_list, logDeviceLogin_list_all} from "@/api/log";
50
 import { exportToExcel } from "@/utils/exportToExcel";
54
 import { exportToExcel } from "@/utils/exportToExcel";
51
 export default {
55
 export default {
52
   data() {
56
   data() {
53
     return {
57
     return {
58
+      showLoading: false,
54
       searchForm: {
59
       searchForm: {
55
         dataRange: [],
60
         dataRange: [],
56
         name: "",
61
         name: "",
150
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
155
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
151
       let _enddate = this.searchForm.dataRange[1];
156
       let _enddate = this.searchForm.dataRange[1];
152
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
157
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
158
+      this.showLoading = true;
153
       logDeviceLogin_list({
159
       logDeviceLogin_list({
154
         rtype: this.powerParams.rtype,
160
         rtype: this.powerParams.rtype,
155
         objectid: this.powerParams.objectid,
161
         objectid: this.powerParams.objectid,
160
         enddate: _enddate,
166
         enddate: _enddate,
161
         name: this.searchForm.name
167
         name: this.searchForm.name
162
       }).then((data) => {
168
       }).then((data) => {
169
+        this.showLoading = false;
163
         if (data.code === 0) {
170
         if (data.code === 0) {
164
           this.searchForm.list = data.obj.data;
171
           this.searchForm.list = data.obj.data;
165
           this.searchForm.total = data.obj.total;
172
           this.searchForm.total = data.obj.total;
173
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
180
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
174
       let _enddate = this.searchForm.dataRange[1];
181
       let _enddate = this.searchForm.dataRange[1];
175
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
182
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
176
-      logDeviceLogin_list({
183
+      this.showLoading = true;
184
+      logDeviceLogin_list_all({
177
         rtype: this.powerParams.rtype,
185
         rtype: this.powerParams.rtype,
178
         objectid: this.powerParams.objectid,
186
         objectid: this.powerParams.objectid,
179
         regionid: this.powerParams.objectid,
187
         regionid: this.powerParams.objectid,
181
         enddate: _enddate,
189
         enddate: _enddate,
182
         name: this.searchForm.name
190
         name: this.searchForm.name
183
       }).then((data) => {
191
       }).then((data) => {
192
+        this.showLoading = false;
184
         if (data.code === 0) {
193
         if (data.code === 0) {
185
           exportToExcel(
194
           exportToExcel(
186
             [
195
             [
187
               {
196
               {
188
-                list: data.obj.data.map((item) => {
197
+                list: data.obj.map((item) => {
189
                   return {
198
                   return {
190
                     设备号码: item.sn,
199
                     设备号码: item.sn,
191
                     登录名: item.loginname,
200
                     登录名: item.loginname,

+ 15
- 3
src/views/regionSection/log/violatingDevice.vue View File

95
         show-sizer
95
         show-sizer
96
       ></Page>
96
       ></Page>
97
     </div>
97
     </div>
98
+    <Spin fix v-if="showLoading" style="background-color: transparent">
99
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
100
+      <div>加载中</div>
101
+    </Spin>
98
   </div>
102
   </div>
99
 </template>
103
 </template>
100
 
104
 
101
 <script>
105
 <script>
102
 import { dateFormat, doEventInfo } from "@/utils";
106
 import { dateFormat, doEventInfo } from "@/utils";
103
-import { logdoperate_list_violate } from "@/api/log";
107
+import {
108
+  logdoperate_list_violate,
109
+  logdoperate_list_violate_all
110
+} from "@/api/log";
104
 import { exportToExcel } from "@/utils/exportToExcel";
111
 import { exportToExcel } from "@/utils/exportToExcel";
105
 export default {
112
 export default {
106
   data() {
113
   data() {
107
     return {
114
     return {
115
+      showLoading: false,
108
       doEventInfo,
116
       doEventInfo,
109
       searchForm: {
117
       searchForm: {
110
         dataRange: [],
118
         dataRange: [],
228
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
236
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
229
       let _enddate = this.searchForm.dataRange[1];
237
       let _enddate = this.searchForm.dataRange[1];
230
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
238
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
239
+      this.showLoading = true;
231
       logdoperate_list_violate({
240
       logdoperate_list_violate({
232
         rtype: this.powerParams.rtype,
241
         rtype: this.powerParams.rtype,
233
         objectid: this.powerParams.objectid,
242
         objectid: this.powerParams.objectid,
239
         enddate: _enddate,
248
         enddate: _enddate,
240
         name: this.searchForm.name
249
         name: this.searchForm.name
241
       }).then((data) => {
250
       }).then((data) => {
251
+        this.showLoading = false;
242
         if (data.code === 0) {
252
         if (data.code === 0) {
243
           this.searchForm.list = data.obj.data;
253
           this.searchForm.list = data.obj.data;
244
           this.searchForm.total = data.obj.total;
254
           this.searchForm.total = data.obj.total;
252
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
262
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
253
       let _enddate = this.searchForm.dataRange[1];
263
       let _enddate = this.searchForm.dataRange[1];
254
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
264
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
255
-      logdoperate_list_violate({
265
+      this.showLoading = true;
266
+      logdoperate_list_violate_all({
256
         rtype: this.powerParams.rtype,
267
         rtype: this.powerParams.rtype,
257
         objectid: this.powerParams.objectid,
268
         objectid: this.powerParams.objectid,
258
         regionid: this.powerParams.objectid,
269
         regionid: this.powerParams.objectid,
261
         enddate: _enddate,
272
         enddate: _enddate,
262
         name: this.searchForm.name
273
         name: this.searchForm.name
263
       }).then((data) => {
274
       }).then((data) => {
275
+        this.showLoading = false;
264
         if (data.code === 0) {
276
         if (data.code === 0) {
265
           exportToExcel(
277
           exportToExcel(
266
             [
278
             [
267
               {
279
               {
268
-                list: data.obj.data.map((item) => {
280
+                list: data.obj.map((item) => {
269
                   return {
281
                   return {
270
                     学校名称: item.schoolName,
282
                     学校名称: item.schoolName,
271
                     班级: item.classname,
283
                     班级: item.classname,

Loading…
Cancel
Save