Browse Source

Merge remote-tracking branch 'origin/gzb' into wzl

gzb
wangzhonglu 9 months ago
parent
commit
b39401c410

+ 1
- 1
src/router/platform.js View File

@@ -23,7 +23,7 @@ export default {
23 23
     },
24 24
     {
25 25
       path: "personal",
26
-      component: () => import("@/views/regionSection/personal.vue"),
26
+      component: () => import("@/views/personal/personal.vue"),
27 27
       name: "personal",
28 28
       meta: {
29 29
         keepAlive: true,

+ 4
- 4
src/router/region.js View File

@@ -13,7 +13,7 @@ export default {
13 13
   children: [
14 14
     {
15 15
       path: "personal",
16
-      component: () => import("@/views/regionSection/personal.vue"),
16
+      component: () => import("@/views/personal/personal.vue"),
17 17
       name: "personal",
18 18
       meta: {
19 19
         keepAlive: true,
@@ -22,9 +22,9 @@ export default {
22 22
       }
23 23
     },
24 24
     {
25
-      path: "logdoperatemsg",
26
-      component: () => import("@/views/regionSection/logdoperatemsg.vue"),
27
-      name: "logdoperatemsg",
25
+      path: "dope",
26
+      component: () => import("@/views/dope/dope.vue"),
27
+      name: "dope",
28 28
       meta: {
29 29
         keepAlive: true,
30 30
         isAuth: true,

+ 4
- 4
src/router/school.js View File

@@ -23,7 +23,7 @@ export default {
23 23
     },
24 24
     {
25 25
       path: "personal",
26
-      component: () => import("@/views/regionSection/personal.vue"),
26
+      component: () => import("@/views/personal/personal.vue"),
27 27
       name: "personal",
28 28
       meta: {
29 29
         keepAlive: true,
@@ -32,9 +32,9 @@ export default {
32 32
       }
33 33
     },
34 34
     {
35
-      path: "logdoperatemsg",
36
-      component: () => import("@/views/regionSection/logdoperatemsg.vue"),
37
-      name: "logdoperatemsg",
35
+      path: "dope",
36
+      component: () => import("@/views/dope/dope.vue"),
37
+      name: "dope",
38 38
       meta: {
39 39
         keepAlive: true,
40 40
         isAuth: true,

src/views/regionSection/logdoperatemsg.vue → src/views/dope/dope.vue View File


+ 1
- 1
src/views/layout.vue View File

@@ -259,7 +259,7 @@ export default {
259 259
       });
260 260
     },
261 261
     headerDope() {
262
-      this.$router.push("logdoperatemsg");
262
+      this.$router.push("dope");
263 263
     },
264 264
     // 获取短信验证码
265 265
     getMsgCode() {

+ 403
- 4
src/views/personal/personal.vue View File

@@ -1,14 +1,413 @@
1 1
 <template>
2
-  <div></div>
2
+  <div class="main_root">
3
+    <div class="personal_list">
4
+      <div class="personal_item" v-for="item in personal_list" :key="item.id">
5
+        <div
6
+          @click="toggle(item.id)"
7
+          :class="[curmodel === item.id ? 'active' : '']"
8
+        >
9
+          {{ item.title }}
10
+        </div>
11
+      </div>
12
+    </div>
13
+    <div class="contents" v-if="curmodel === 1">
14
+      <div class="user">
15
+        <div class="head">
16
+          <img src="../../assets/img/user.png" />
17
+        </div>
18
+        <div class="username">
19
+          <p>{{ personalInfo.aname }}</p>
20
+          <div>
21
+            登录名<span>{{ personalInfo.loginname }}</span> 角色<span>{{
22
+              personalInfo.atype === 1
23
+                ? "平台管理员"
24
+                : personalInfo.atype === 2
25
+                ? "区域管理员"
26
+                : "学校管理员"
27
+            }}</span>
28
+            手机号<span>{{ personalInfo.phone }}</span>
29
+          </div>
30
+        </div>
31
+      </div>
32
+      <div class="comm">
33
+        <div class="com">
34
+          <span>创建时间</span>{{ personalInfo.createtime }}
35
+          <span style="margin-left: 20px">更新时间</span
36
+          >{{ personalInfo.updatetime }}
37
+        </div>
38
+        <div class="com">
39
+          <span>最后登录时间</span>{{ personalInfo.lasttime }}
40
+          <span style="margin-left: 20px">最后登录IP</span
41
+          >{{ personalInfo.lastip }}
42
+        </div>
43
+        <div class="com">
44
+          <span style="width: 50px">描述</span>{{ personalInfo.comm }}
45
+        </div>
46
+      </div>
47
+    </div>
48
+    <div class="content" v-else-if="curmodel === 2">
49
+      <div class="search_header">
50
+        <div class="search_left">
51
+          <DatePicker
52
+            v-model="searchForm.dataRange"
53
+            @on-change="searchList()"
54
+            :editable="false"
55
+            :transfer="true"
56
+            format="yyyy-MM-dd"
57
+            type="daterange"
58
+            placement="bottom-start"
59
+            placeholder="请选择时间段"
60
+            style="margin-right: 10px; width: 220px"
61
+          ></DatePicker>
62
+          <Input
63
+            v-model="searchForm.name"
64
+            placeholder="请输入事件名称"
65
+            search
66
+            @on-search="searchList()"
67
+            style="width: 180px"
68
+          />
69
+        </div>
70
+      </div>
71
+      <div class="table_wrap">
72
+        <Table :columns="columns" :data="searchForm.list">
73
+        </Table>
74
+      </div>
75
+      <div class="page_wrap">
76
+        <Page
77
+          :transfer="true"
78
+          :total="searchForm.total"
79
+          :current="searchForm.page"
80
+          :page-size="searchForm.size"
81
+          :page-size-opts="[10, 20, 40, 60]"
82
+          @on-change="pageChange"
83
+          @on-page-size-change="pageSizeChange"
84
+          show-total
85
+          show-sizer
86
+        ></Page>
87
+      </div>
88
+    </div>
89
+    <div class="content" style="padding-top: 16px" v-else>
90
+      <div class="table_wrap">
91
+        <Table :columns="columns1" :data="searchForm.list"></Table>
92
+      </div>
93
+      <div class="page_wrap">
94
+        <Page
95
+          :transfer="true"
96
+          :total="searchForm.total"
97
+          :current="searchForm.page"
98
+          :page-size="searchForm.size"
99
+          :page-size-opts="[10, 20, 40, 60]"
100
+          @on-change="pageChange"
101
+          @on-page-size-change="pageSizeChange"
102
+          show-total
103
+          show-sizer
104
+        ></Page>
105
+      </div>
106
+    </div>
107
+  </div>
3 108
 </template>
4 109
 
5 110
 <script>
111
+import { admin_detail, admin_list_lr, admin_list_re } from "@/api/admin";
112
+import { dateFormat } from "@/utils";
113
+
6 114
 export default {
7 115
   data() {
8
-    return {};
116
+    return {
117
+      personal_list: [
118
+        {
119
+          id: 1,
120
+          title: "个人信息"
121
+        },
122
+        {
123
+          id: 2,
124
+          title: "最近事件"
125
+        },
126
+        {
127
+          id: 3,
128
+          title: "历史登录"
129
+        }
130
+      ],
131
+      curmodel: 1,
132
+      personalInfo: {},
133
+      searchForm: {
134
+        dataRange: [],
135
+        name: "",
136
+        page: 1,
137
+        size: 10,
138
+        list: [],
139
+        total: 0
140
+      },
141
+      userInfo: {},
142
+      columns: [
143
+        {
144
+          title: "序号",
145
+          align: "center",
146
+          width: 70,
147
+          render: (h, params) => {
148
+            return h(
149
+              "span",
150
+              params.index +
151
+                (this.searchForm.page - 1) * this.searchForm.size +
152
+                1
153
+            );
154
+          }
155
+        },
156
+        {
157
+          title: "登录名",
158
+          key: "loginname",
159
+          align: "center"
160
+        },
161
+        {
162
+          title: "所属模块",
163
+          key: "logmodel",
164
+          align: "center"
165
+        },
166
+        {
167
+          title: "模块操作",
168
+          key: "logaction",
169
+          align: "center"
170
+        },
171
+        {
172
+          title: "日志内容",
173
+          key: "content",
174
+          align: "center"
175
+        },
176
+        {
177
+          title: "时间",
178
+          key: "createtime",
179
+          width: 190,
180
+          align: "center"
181
+        }
182
+      ],
183
+      columns1: [
184
+        {
185
+          title: "序号",
186
+          align: "center",
187
+          width: 70,
188
+          render: (h, params) => {
189
+            return h(
190
+              "span",
191
+              params.index +
192
+                (this.searchForm.page - 1) * this.searchForm.size +
193
+                1
194
+            );
195
+          }
196
+        },
197
+        {
198
+          title: "登录IP",
199
+          key: "ip",
200
+          align: "center"
201
+        },
202
+        {
203
+          title: "地址",
204
+          key: "ipAddress",
205
+          align: "center"
206
+        },
207
+        {
208
+          title: "登录时间",
209
+          key: "createtime",
210
+          width: 190,
211
+          align: "center"
212
+        }
213
+      ]
214
+    };
215
+  },
216
+  created() {
217
+    this.userInfo = JSON.parse(
218
+      localStorage.getItem("xh_control_userInfo")
219
+    ).content;
220
+    this.getPersonal();
9 221
   },
10
-  methods: {}
222
+  computed: {
223
+    powerParams() {
224
+      return this.$store.getters.powerParams;
225
+    }
226
+  },
227
+  methods: {
228
+    toggle(type) {
229
+      this.curmodel = type;
230
+      if (type === 1) {
231
+        this.getPersonal();
232
+      } else {
233
+        this.searchForm.size = 10;
234
+        this.searchForm.page = 1;
235
+        this.searchList();
236
+      }
237
+    },
238
+    // 搜索
239
+    searchList() {
240
+      this.searchForm.page = 1;
241
+      this.getEvent();
242
+    },
243
+    // 页码改变
244
+    pageChange(page) {
245
+      this.searchForm.page = page;
246
+      this.getEvent();
247
+    },
248
+    // 每页显示数量改变
249
+    pageSizeChange(size) {
250
+      this.searchForm.size = size;
251
+      this.searchForm.page = 1;
252
+      this.getEvent();
253
+    },
254
+    async getEvent() {
255
+      let res = {
256
+        code: null
257
+      };
258
+      if (this.curmodel === 2) {
259
+        let _begindate = this.searchForm.dataRange[0];
260
+        _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
261
+        let _enddate = this.searchForm.dataRange[1];
262
+        _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
263
+        res = await admin_list_re({
264
+          objectid: this.userInfo.adminid,
265
+          begindate: _begindate,
266
+          enddate: _enddate,
267
+          name: this.searchForm.name,
268
+          page: this.searchForm.page,
269
+          size: this.searchForm.size
270
+        });
271
+      } else {
272
+        res = await admin_list_lr({
273
+          objectid: this.userInfo.adminid,
274
+          page: this.searchForm.page,
275
+          size: this.searchForm.size
276
+        });
277
+      }
278
+
279
+      if (res.code === 0) {
280
+        this.searchForm.list = res.obj.data;
281
+        this.searchForm.total = res.obj.total;
282
+      } else {
283
+        this.$Message.error(res.msg);
284
+      }
285
+    },
286
+    getPersonal() {
287
+      admin_detail({ adminid: this.userInfo.adminid }).then((res) => {
288
+        if (res.code === 0) {
289
+          this.personalInfo = res.obj;
290
+        } else {
291
+          this.$Message.error(res.msg);
292
+        }
293
+      });
294
+    }
295
+  }
11 296
 };
12 297
 </script>
13 298
 
14
-<style lang="less" scoped></style>
299
+<style lang="less" scoped>
300
+.main_root {
301
+  background-color: transparent;
302
+  border: navajowhite;
303
+  height: calc(100% - 20px);
304
+  display: flex;
305
+  .personal_list {
306
+    width: 200px;
307
+    height: 100%;
308
+    border-radius: 15px;
309
+    padding: 20px 10px;
310
+    border: 1px solid #e9f0f9;
311
+    background: #ffffff;
312
+    margin-right: 20px;
313
+    .personal_item {
314
+      line-height: 30px;
315
+      text-align: center;
316
+      cursor: pointer;
317
+    }
318
+    .active {
319
+      border-radius: 6px;
320
+      background: #339dff;
321
+      color: white;
322
+    }
323
+  }
324
+  .contents {
325
+    width: calc(100% - 220px);
326
+    height: 100%;
327
+    .user {
328
+      height: 200px;
329
+      border-radius: 15px;
330
+      background: white;
331
+      margin-bottom: 20px;
332
+      display: flex;
333
+      align-items: center;
334
+      .head {
335
+        width: 100px;
336
+        height: 100px;
337
+        margin: 0 40px;
338
+        border-radius: 16px;
339
+        overflow: hidden;
340
+        border: 2px solid #ffffff;
341
+        box-shadow: 0 6px 14px 0 #dce0e880;
342
+        img {
343
+          width: 100%;
344
+          height: 100%;
345
+          object-fit: cover;
346
+        }
347
+      }
348
+      .username {
349
+        p {
350
+          color: #253a70;
351
+          font-size: 20px;
352
+          font-weight: 500;
353
+          font-family: "SourceHanSansCN";
354
+          text-align: left;
355
+          line-height: 50px;
356
+        }
357
+        div {
358
+          color: #7c8db5;
359
+          font-size: 16px;
360
+          font-weight: 400;
361
+          font-family: "SourceHanSansCN";
362
+          line-height: 50px;
363
+          span {
364
+            color: #253a70;
365
+            display: inline-block;
366
+            margin: 0 20px;
367
+          }
368
+        }
369
+      }
370
+    }
371
+    .comm {
372
+      height: calc(100% - 220px);
373
+      border-radius: 15px;
374
+      background: white;
375
+      margin-bottom: 20px;
376
+      padding: 40px;
377
+      .com {
378
+        line-height: 30px;
379
+        color: #253a70;
380
+        font-size: 16px;
381
+        font-weight: 400;
382
+        margin-bottom: 10px;
383
+        font-family: "SourceHanSansCN";
384
+        span {
385
+          color: #7c8db5;
386
+          display: inline-block;
387
+          width: 100px;
388
+          margin-right: 20px;
389
+        }
390
+      }
391
+    }
392
+  }
393
+  .content {
394
+    width: calc(100% - 220px);
395
+    height: 100%;
396
+    overflow-y: auto;
397
+    border-radius: 15px;
398
+    border: 1px solid #e9f0f9;
399
+    background: #ffffff;
400
+    .search_header {
401
+      display: flex;
402
+      justify-content: space-between;
403
+      align-items: center;
404
+      margin: 16px 16px;
405
+      .search_left {
406
+        display: flex;
407
+        justify-content: flex-start;
408
+        align-items: center;
409
+      }
410
+    }
411
+  }
412
+}
413
+</style>

+ 0
- 413
src/views/platformSection/personal.vue View File

@@ -1,413 +0,0 @@
1
-<template>
2
-  <div class="main_root">
3
-    <div class="personal_list">
4
-      <div class="personal_item" v-for="item in personal_list" :key="item.id">
5
-        <div
6
-          @click="toggle(item.id)"
7
-          :class="[curmodel === item.id ? 'active' : '']"
8
-        >
9
-          {{ item.title }}
10
-        </div>
11
-      </div>
12
-    </div>
13
-    <div class="contents" v-if="curmodel === 1">
14
-      <div class="user">
15
-        <div class="head">
16
-          <img src="../../assets/img/user.png" />
17
-        </div>
18
-        <div class="username">
19
-          <p>{{ personalInfo.aname }}</p>
20
-          <div>
21
-            登录名<span>{{ personalInfo.loginname }}</span> 角色<span>{{
22
-              personalInfo.atype === 1
23
-                ? "平台管理员"
24
-                : personalInfo.atype === 2
25
-                ? "区域管理员"
26
-                : "学校管理员"
27
-            }}</span>
28
-            手机号<span>{{ personalInfo.phone }}</span>
29
-          </div>
30
-        </div>
31
-      </div>
32
-      <div class="comm">
33
-        <div class="com">
34
-          <span>创建时间</span>{{ personalInfo.createtime }}
35
-          <span style="margin-left: 20px">更新时间</span
36
-          >{{ personalInfo.updatetime }}
37
-        </div>
38
-        <div class="com">
39
-          <span>最后登录时间</span>{{ personalInfo.lasttime }}
40
-          <span style="margin-left: 20px">最后登录IP</span
41
-          >{{ personalInfo.lastip }}
42
-        </div>
43
-        <div class="com">
44
-          <span style="width: 50px">描述</span>{{ personalInfo.comm }}
45
-        </div>
46
-      </div>
47
-    </div>
48
-    <div class="content" v-else-if="curmodel === 2">
49
-      <div class="search_header">
50
-        <div class="search_left">
51
-          <DatePicker
52
-            v-model="searchForm.dataRange"
53
-            @on-change="searchList()"
54
-            :editable="false"
55
-            :transfer="true"
56
-            format="yyyy-MM-dd"
57
-            type="daterange"
58
-            placement="bottom-start"
59
-            placeholder="请选择时间段"
60
-            style="margin-right: 10px; width: 220px"
61
-          ></DatePicker>
62
-          <Input
63
-            v-model="searchForm.name"
64
-            placeholder="请输入事件名称"
65
-            search
66
-            @on-search="searchList()"
67
-            style="width: 180px"
68
-          />
69
-        </div>
70
-      </div>
71
-      <div class="table_wrap">
72
-        <Table :columns="columns" :data="searchForm.list">
73
-        </Table>
74
-      </div>
75
-      <div class="page_wrap">
76
-        <Page
77
-          :transfer="true"
78
-          :total="searchForm.total"
79
-          :current="searchForm.page"
80
-          :page-size="searchForm.size"
81
-          :page-size-opts="[10, 20, 40, 60]"
82
-          @on-change="pageChange"
83
-          @on-page-size-change="pageSizeChange"
84
-          show-total
85
-          show-sizer
86
-        ></Page>
87
-      </div>
88
-    </div>
89
-    <div class="content" style="padding-top: 16px" v-else>
90
-      <div class="table_wrap">
91
-        <Table :columns="columns1" :data="searchForm.list"></Table>
92
-      </div>
93
-      <div class="page_wrap">
94
-        <Page
95
-          :transfer="true"
96
-          :total="searchForm.total"
97
-          :current="searchForm.page"
98
-          :page-size="searchForm.size"
99
-          :page-size-opts="[10, 20, 40, 60]"
100
-          @on-change="pageChange"
101
-          @on-page-size-change="pageSizeChange"
102
-          show-total
103
-          show-sizer
104
-        ></Page>
105
-      </div>
106
-    </div>
107
-  </div>
108
-</template>
109
-
110
-<script>
111
-import { admin_detail, admin_list_lr, admin_list_re } from "@/api/admin";
112
-import { dateFormat } from "@/utils";
113
-
114
-export default {
115
-  data() {
116
-    return {
117
-      personal_list: [
118
-        {
119
-          id: 1,
120
-          title: "个人信息"
121
-        },
122
-        {
123
-          id: 2,
124
-          title: "最近事件"
125
-        },
126
-        {
127
-          id: 3,
128
-          title: "历史登录"
129
-        }
130
-      ],
131
-      curmodel: 1,
132
-      personalInfo: {},
133
-      searchForm: {
134
-        dataRange: [],
135
-        name: "",
136
-        page: 1,
137
-        size: 10,
138
-        list: [],
139
-        total: 0
140
-      },
141
-      userInfo: {},
142
-      columns: [
143
-        {
144
-          title: "序号",
145
-          align: "center",
146
-          width: 70,
147
-          render: (h, params) => {
148
-            return h(
149
-              "span",
150
-              params.index +
151
-                (this.searchForm.page - 1) * this.searchForm.size +
152
-                1
153
-            );
154
-          }
155
-        },
156
-        {
157
-          title: "登录名",
158
-          key: "loginname",
159
-          align: "center"
160
-        },
161
-        {
162
-          title: "所属模块",
163
-          key: "logmodel",
164
-          align: "center"
165
-        },
166
-        {
167
-          title: "模块操作",
168
-          key: "logaction",
169
-          align: "center"
170
-        },
171
-        {
172
-          title: "日志内容",
173
-          key: "content",
174
-          align: "center"
175
-        },
176
-        {
177
-          title: "时间",
178
-          key: "createtime",
179
-          width: 190,
180
-          align: "center"
181
-        }
182
-      ],
183
-      columns1: [
184
-        {
185
-          title: "序号",
186
-          align: "center",
187
-          width: 70,
188
-          render: (h, params) => {
189
-            return h(
190
-              "span",
191
-              params.index +
192
-                (this.searchForm.page - 1) * this.searchForm.size +
193
-                1
194
-            );
195
-          }
196
-        },
197
-        {
198
-          title: "登录IP",
199
-          key: "ip",
200
-          align: "center"
201
-        },
202
-        {
203
-          title: "地址",
204
-          key: "ipAddress",
205
-          align: "center"
206
-        },
207
-        {
208
-          title: "登录时间",
209
-          key: "createtime",
210
-          width: 190,
211
-          align: "center"
212
-        }
213
-      ]
214
-    };
215
-  },
216
-  created() {
217
-    this.userInfo = JSON.parse(
218
-      localStorage.getItem("xh_control_userInfo")
219
-    ).content;
220
-    this.getPersonal();
221
-  },
222
-  computed: {
223
-    powerParams() {
224
-      return this.$store.getters.powerParams;
225
-    }
226
-  },
227
-  methods: {
228
-    toggle(type) {
229
-      this.curmodel = type;
230
-      if (type === 1) {
231
-        this.getPersonal();
232
-      } else {
233
-        this.searchForm.size = 10;
234
-        this.searchForm.page = 1;
235
-        this.searchList();
236
-      }
237
-    },
238
-    // 搜索
239
-    searchList() {
240
-      this.searchForm.page = 1;
241
-      this.getEvent();
242
-    },
243
-    // 页码改变
244
-    pageChange(page) {
245
-      this.searchForm.page = page;
246
-      this.getEvent();
247
-    },
248
-    // 每页显示数量改变
249
-    pageSizeChange(size) {
250
-      this.searchForm.size = size;
251
-      this.searchForm.page = 1;
252
-      this.getEvent();
253
-    },
254
-    async getEvent() {
255
-      let res = {
256
-        code: null
257
-      };
258
-      if (this.curmodel === 2) {
259
-        let _begindate = this.searchForm.dataRange[0];
260
-        _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
261
-        let _enddate = this.searchForm.dataRange[1];
262
-        _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
263
-        res = await admin_list_re({
264
-          objectid: this.userInfo.adminid,
265
-          begindate: _begindate,
266
-          enddate: _enddate,
267
-          name: this.searchForm.name,
268
-          page: this.searchForm.page,
269
-          size: this.searchForm.size
270
-        });
271
-      } else {
272
-        res = await admin_list_lr({
273
-          objectid: this.userInfo.adminid,
274
-          page: this.searchForm.page,
275
-          size: this.searchForm.size
276
-        });
277
-      }
278
-
279
-      if (res.code === 0) {
280
-        this.searchForm.list = res.obj.data;
281
-        this.searchForm.total = res.obj.total;
282
-      } else {
283
-        this.$Message.error(res.msg);
284
-      }
285
-    },
286
-    getPersonal() {
287
-      admin_detail({ adminid: this.userInfo.adminid }).then((res) => {
288
-        if (res.code === 0) {
289
-          this.personalInfo = res.obj;
290
-        } else {
291
-          this.$Message.error(res.msg);
292
-        }
293
-      });
294
-    }
295
-  }
296
-};
297
-</script>
298
-
299
-<style lang="less" scoped>
300
-.main_root {
301
-  background-color: transparent;
302
-  border: navajowhite;
303
-  height: calc(100% - 20px);
304
-  display: flex;
305
-  .personal_list {
306
-    width: 200px;
307
-    height: 100%;
308
-    border-radius: 15px;
309
-    padding: 20px 10px;
310
-    border: 1px solid #e9f0f9;
311
-    background: #ffffff;
312
-    margin-right: 20px;
313
-    .personal_item {
314
-      line-height: 30px;
315
-      text-align: center;
316
-      cursor: pointer;
317
-    }
318
-    .active {
319
-      border-radius: 6px;
320
-      background: #339dff;
321
-      color: white;
322
-    }
323
-  }
324
-  .contents {
325
-    width: calc(100% - 220px);
326
-    height: 100%;
327
-    .user {
328
-      height: 200px;
329
-      border-radius: 15px;
330
-      background: white;
331
-      margin-bottom: 20px;
332
-      display: flex;
333
-      align-items: center;
334
-      .head {
335
-        width: 100px;
336
-        height: 100px;
337
-        margin: 0 40px;
338
-        border-radius: 16px;
339
-        overflow: hidden;
340
-        border: 2px solid #ffffff;
341
-        box-shadow: 0 6px 14px 0 #dce0e880;
342
-        img {
343
-          width: 100%;
344
-          height: 100%;
345
-          object-fit: cover;
346
-        }
347
-      }
348
-      .username {
349
-        p {
350
-          color: #253a70;
351
-          font-size: 20px;
352
-          font-weight: 500;
353
-          font-family: "SourceHanSansCN";
354
-          text-align: left;
355
-          line-height: 50px;
356
-        }
357
-        div {
358
-          color: #7c8db5;
359
-          font-size: 16px;
360
-          font-weight: 400;
361
-          font-family: "SourceHanSansCN";
362
-          line-height: 50px;
363
-          span {
364
-            color: #253a70;
365
-            display: inline-block;
366
-            margin: 0 20px;
367
-          }
368
-        }
369
-      }
370
-    }
371
-    .comm {
372
-      height: calc(100% - 220px);
373
-      border-radius: 15px;
374
-      background: white;
375
-      margin-bottom: 20px;
376
-      padding: 40px;
377
-      .com {
378
-        line-height: 30px;
379
-        color: #253a70;
380
-        font-size: 16px;
381
-        font-weight: 400;
382
-        margin-bottom: 10px;
383
-        font-family: "SourceHanSansCN";
384
-        span {
385
-          color: #7c8db5;
386
-          display: inline-block;
387
-          width: 100px;
388
-          margin-right: 20px;
389
-        }
390
-      }
391
-    }
392
-  }
393
-  .content {
394
-    width: calc(100% - 220px);
395
-    height: 100%;
396
-    overflow-y: auto;
397
-    border-radius: 15px;
398
-    border: 1px solid #e9f0f9;
399
-    background: #ffffff;
400
-    .search_header {
401
-      display: flex;
402
-      justify-content: space-between;
403
-      align-items: center;
404
-      margin: 16px 16px;
405
-      .search_left {
406
-        display: flex;
407
-        justify-content: flex-start;
408
-        align-items: center;
409
-      }
410
-    }
411
-  }
412
-}
413
-</style>

+ 0
- 413
src/views/regionSection/personal.vue View File

@@ -1,413 +0,0 @@
1
-<template>
2
-  <div class="main_root">
3
-    <div class="personal_list">
4
-      <div class="personal_item" v-for="item in personal_list" :key="item.id">
5
-        <div
6
-          @click="toggle(item.id)"
7
-          :class="[curmodel === item.id ? 'active' : '']"
8
-        >
9
-          {{ item.title }}
10
-        </div>
11
-      </div>
12
-    </div>
13
-    <div class="contents" v-if="curmodel === 1">
14
-      <div class="user">
15
-        <div class="head">
16
-          <img src="../../assets/img/user.png" />
17
-        </div>
18
-        <div class="username">
19
-          <p>{{ personalInfo.aname }}</p>
20
-          <div>
21
-            登录名<span>{{ personalInfo.loginname }}</span> 角色<span>{{
22
-              personalInfo.atype === 1
23
-                ? "平台管理员"
24
-                : personalInfo.atype === 2
25
-                ? "区域管理员"
26
-                : "学校管理员"
27
-            }}</span>
28
-            手机号<span>{{ personalInfo.phone }}</span>
29
-          </div>
30
-        </div>
31
-      </div>
32
-      <div class="comm">
33
-        <div class="com">
34
-          <span>创建时间</span>{{ personalInfo.createtime }}
35
-          <span style="margin-left: 20px">更新时间</span
36
-          >{{ personalInfo.updatetime }}
37
-        </div>
38
-        <div class="com">
39
-          <span>最后登录时间</span>{{ personalInfo.lasttime }}
40
-          <span style="margin-left: 20px">最后登录IP</span
41
-          >{{ personalInfo.lastip }}
42
-        </div>
43
-        <div class="com">
44
-          <span style="width: 50px">描述</span>{{ personalInfo.comm }}
45
-        </div>
46
-      </div>
47
-    </div>
48
-    <div class="content" v-else-if="curmodel === 2">
49
-      <div class="search_header">
50
-        <div class="search_left">
51
-          <DatePicker
52
-            v-model="searchForm.dataRange"
53
-            @on-change="searchList()"
54
-            :editable="false"
55
-            :transfer="true"
56
-            format="yyyy-MM-dd"
57
-            type="daterange"
58
-            placement="bottom-start"
59
-            placeholder="请选择时间段"
60
-            style="margin-right: 10px; width: 220px"
61
-          ></DatePicker>
62
-          <Input
63
-            v-model="searchForm.name"
64
-            placeholder="请输入事件名称"
65
-            search
66
-            @on-search="searchList()"
67
-            style="width: 180px"
68
-          />
69
-        </div>
70
-      </div>
71
-      <div class="table_wrap">
72
-        <Table :columns="columns" :data="searchForm.list">
73
-        </Table>
74
-      </div>
75
-      <div class="page_wrap">
76
-        <Page
77
-          :transfer="true"
78
-          :total="searchForm.total"
79
-          :current="searchForm.page"
80
-          :page-size="searchForm.size"
81
-          :page-size-opts="[10, 20, 40, 60]"
82
-          @on-change="pageChange"
83
-          @on-page-size-change="pageSizeChange"
84
-          show-total
85
-          show-sizer
86
-        ></Page>
87
-      </div>
88
-    </div>
89
-    <div class="content" style="padding-top: 16px" v-else>
90
-      <div class="table_wrap">
91
-        <Table :columns="columns1" :data="searchForm.list"></Table>
92
-      </div>
93
-      <div class="page_wrap">
94
-        <Page
95
-          :transfer="true"
96
-          :total="searchForm.total"
97
-          :current="searchForm.page"
98
-          :page-size="searchForm.size"
99
-          :page-size-opts="[10, 20, 40, 60]"
100
-          @on-change="pageChange"
101
-          @on-page-size-change="pageSizeChange"
102
-          show-total
103
-          show-sizer
104
-        ></Page>
105
-      </div>
106
-    </div>
107
-  </div>
108
-</template>
109
-
110
-<script>
111
-import { admin_detail, admin_list_lr, admin_list_re } from "@/api/admin";
112
-import { dateFormat } from "@/utils";
113
-
114
-export default {
115
-  data() {
116
-    return {
117
-      personal_list: [
118
-        {
119
-          id: 1,
120
-          title: "个人信息"
121
-        },
122
-        {
123
-          id: 2,
124
-          title: "最近事件"
125
-        },
126
-        {
127
-          id: 3,
128
-          title: "历史登录"
129
-        }
130
-      ],
131
-      curmodel: 1,
132
-      personalInfo: {},
133
-      searchForm: {
134
-        dataRange: [],
135
-        name: "",
136
-        page: 1,
137
-        size: 10,
138
-        list: [],
139
-        total: 0
140
-      },
141
-      userInfo: {},
142
-      columns: [
143
-        {
144
-          title: "序号",
145
-          align: "center",
146
-          width: 70,
147
-          render: (h, params) => {
148
-            return h(
149
-              "span",
150
-              params.index +
151
-                (this.searchForm.page - 1) * this.searchForm.size +
152
-                1
153
-            );
154
-          }
155
-        },
156
-        {
157
-          title: "登录名",
158
-          key: "loginname",
159
-          align: "center"
160
-        },
161
-        {
162
-          title: "所属模块",
163
-          key: "logmodel",
164
-          align: "center"
165
-        },
166
-        {
167
-          title: "模块操作",
168
-          key: "logaction",
169
-          align: "center"
170
-        },
171
-        {
172
-          title: "日志内容",
173
-          key: "content",
174
-          align: "center"
175
-        },
176
-        {
177
-          title: "时间",
178
-          key: "createtime",
179
-          width: 190,
180
-          align: "center"
181
-        }
182
-      ],
183
-      columns1: [
184
-        {
185
-          title: "序号",
186
-          align: "center",
187
-          width: 70,
188
-          render: (h, params) => {
189
-            return h(
190
-              "span",
191
-              params.index +
192
-                (this.searchForm.page - 1) * this.searchForm.size +
193
-                1
194
-            );
195
-          }
196
-        },
197
-        {
198
-          title: "登录IP",
199
-          key: "ip",
200
-          align: "center"
201
-        },
202
-        {
203
-          title: "地址",
204
-          key: "ipAddress",
205
-          align: "center"
206
-        },
207
-        {
208
-          title: "登录时间",
209
-          key: "createtime",
210
-          width: 190,
211
-          align: "center"
212
-        }
213
-      ]
214
-    };
215
-  },
216
-  created() {
217
-    this.userInfo = JSON.parse(
218
-      localStorage.getItem("xh_control_userInfo")
219
-    ).content;
220
-    this.getPersonal();
221
-  },
222
-  computed: {
223
-    powerParams() {
224
-      return this.$store.getters.powerParams;
225
-    }
226
-  },
227
-  methods: {
228
-    toggle(type) {
229
-      this.curmodel = type;
230
-      if (type === 1) {
231
-        this.getPersonal();
232
-      } else {
233
-        this.searchForm.size = 10;
234
-        this.searchForm.page = 1;
235
-        this.searchList();
236
-      }
237
-    },
238
-    // 搜索
239
-    searchList() {
240
-      this.searchForm.page = 1;
241
-      this.getEvent();
242
-    },
243
-    // 页码改变
244
-    pageChange(page) {
245
-      this.searchForm.page = page;
246
-      this.getEvent();
247
-    },
248
-    // 每页显示数量改变
249
-    pageSizeChange(size) {
250
-      this.searchForm.size = size;
251
-      this.searchForm.page = 1;
252
-      this.getEvent();
253
-    },
254
-    async getEvent() {
255
-      let res = {
256
-        code: null
257
-      };
258
-      if (this.curmodel === 2) {
259
-        let _begindate = this.searchForm.dataRange[0];
260
-        _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
261
-        let _enddate = this.searchForm.dataRange[1];
262
-        _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
263
-        res = await admin_list_re({
264
-          objectid: this.userInfo.adminid,
265
-          begindate: _begindate,
266
-          enddate: _enddate,
267
-          name: this.searchForm.name,
268
-          page: this.searchForm.page,
269
-          size: this.searchForm.size
270
-        });
271
-      } else {
272
-        res = await admin_list_lr({
273
-          objectid: this.userInfo.adminid,
274
-          page: this.searchForm.page,
275
-          size: this.searchForm.size
276
-        });
277
-      }
278
-
279
-      if (res.code === 0) {
280
-        this.searchForm.list = res.obj.data;
281
-        this.searchForm.total = res.obj.total;
282
-      } else {
283
-        this.$Message.error(res.msg);
284
-      }
285
-    },
286
-    getPersonal() {
287
-      admin_detail({ adminid: this.userInfo.adminid }).then((res) => {
288
-        if (res.code === 0) {
289
-          this.personalInfo = res.obj;
290
-        } else {
291
-          this.$Message.error(res.msg);
292
-        }
293
-      });
294
-    }
295
-  }
296
-};
297
-</script>
298
-
299
-<style lang="less" scoped>
300
-.main_root {
301
-  background-color: transparent;
302
-  border: navajowhite;
303
-  height: calc(100% - 20px);
304
-  display: flex;
305
-  .personal_list {
306
-    width: 200px;
307
-    height: 100%;
308
-    border-radius: 15px;
309
-    padding: 20px 10px;
310
-    border: 1px solid #e9f0f9;
311
-    background: #ffffff;
312
-    margin-right: 20px;
313
-    .personal_item {
314
-      line-height: 30px;
315
-      text-align: center;
316
-      cursor: pointer;
317
-    }
318
-    .active {
319
-      border-radius: 6px;
320
-      background: #339dff;
321
-      color: white;
322
-    }
323
-  }
324
-  .contents {
325
-    width: calc(100% - 220px);
326
-    height: 100%;
327
-    .user {
328
-      height: 200px;
329
-      border-radius: 15px;
330
-      background: white;
331
-      margin-bottom: 20px;
332
-      display: flex;
333
-      align-items: center;
334
-      .head {
335
-        width: 100px;
336
-        height: 100px;
337
-        margin: 0 40px;
338
-        border-radius: 16px;
339
-        overflow: hidden;
340
-        border: 2px solid #ffffff;
341
-        box-shadow: 0 6px 14px 0 #dce0e880;
342
-        img {
343
-          width: 100%;
344
-          height: 100%;
345
-          object-fit: cover;
346
-        }
347
-      }
348
-      .username {
349
-        p {
350
-          color: #253a70;
351
-          font-size: 20px;
352
-          font-weight: 500;
353
-          font-family: "SourceHanSansCN";
354
-          text-align: left;
355
-          line-height: 50px;
356
-        }
357
-        div {
358
-          color: #7c8db5;
359
-          font-size: 16px;
360
-          font-weight: 400;
361
-          font-family: "SourceHanSansCN";
362
-          line-height: 50px;
363
-          span {
364
-            color: #253a70;
365
-            display: inline-block;
366
-            margin: 0 20px;
367
-          }
368
-        }
369
-      }
370
-    }
371
-    .comm {
372
-      height: calc(100% - 220px);
373
-      border-radius: 15px;
374
-      background: white;
375
-      margin-bottom: 20px;
376
-      padding: 40px;
377
-      .com {
378
-        line-height: 30px;
379
-        color: #253a70;
380
-        font-size: 16px;
381
-        font-weight: 400;
382
-        margin-bottom: 10px;
383
-        font-family: "SourceHanSansCN";
384
-        span {
385
-          color: #7c8db5;
386
-          display: inline-block;
387
-          width: 100px;
388
-          margin-right: 20px;
389
-        }
390
-      }
391
-    }
392
-  }
393
-  .content {
394
-    width: calc(100% - 220px);
395
-    height: 100%;
396
-    overflow-y: auto;
397
-    border-radius: 15px;
398
-    border: 1px solid #e9f0f9;
399
-    background: #ffffff;
400
-    .search_header {
401
-      display: flex;
402
-      justify-content: space-between;
403
-      align-items: center;
404
-      margin: 16px 16px;
405
-      .search_left {
406
-        display: flex;
407
-        justify-content: flex-start;
408
-        align-items: center;
409
-      }
410
-    }
411
-  }
412
-}
413
-</style>

+ 43
- 2
src/views/regionSection/regionManage/adminManage.vue View File

@@ -168,7 +168,26 @@
168 168
             <Radio :label="2">禁用</Radio>
169 169
           </RadioGroup>
170 170
         </FormItem>
171
-        <FormItem label="所属区域" prop="regionid" style="width: 100%">
171
+        <FormItem label="地址" style="width: 100%">
172
+          <Input
173
+              v-model="adminInfo.address"
174
+              placeholder="请输入地址"
175
+          ></Input>
176
+        </FormItem>
177
+        <FormItem label="描述信息" style="width: 100%">
178
+          <Input
179
+              type="textarea"
180
+              v-model="adminInfo.comm"
181
+              placeholder="请输入描述信息"
182
+          ></Input>
183
+        </FormItem>
184
+        <FormItem label="账号类型" style="width: 100%">
185
+          <RadioGroup v-model="adminInfo.userType">
186
+            <Radio :label="1">区域管理员</Radio>
187
+            <Radio :label="2">学校管理员</Radio>
188
+          </RadioGroup>
189
+        </FormItem>
190
+        <FormItem v-if="adminInfo.userType === 1" label="所属区域" prop="regionid" style="width: 100%">
172 191
           <Select
173 192
             :transfer="true"
174 193
             v-model="adminInfo.regionid"
@@ -182,6 +201,20 @@
182 201
             >
183 202
           </Select>
184 203
         </FormItem>
204
+        <FormItem v-if="adminInfo.userType === 2" label="选择学校" class="require" style="width: 100%">
205
+          <Select
206
+              :transfer="true"
207
+              v-model="adminInfo.schoolid"
208
+              style="width: 180px"
209
+          >
210
+            <Option
211
+                v-for="item in searchForm.schoolList"
212
+                :value="item.schoolid"
213
+                :key="item.schoolid"
214
+            >{{ item.schoolName }}</Option
215
+            >
216
+          </Select>
217
+        </FormItem>
185 218
       </Form>
186 219
       <div
187 220
         slot="footer"
@@ -350,6 +383,9 @@ export default {
350 383
         loginpwd1: "",
351 384
         phone: "",
352 385
         msgcode: "",
386
+        address: "",
387
+        comm: "",
388
+        userType: 1,
353 389
         enabled: 1,
354 390
         regionid: null
355 391
       },
@@ -511,6 +547,9 @@ export default {
511 547
         phone: "",
512 548
         msgcode: "",
513 549
         enabled: 1,
550
+        address: "",
551
+        comm: "",
552
+        userType: 1,
514 553
         regionid: null
515 554
       };
516 555
     },
@@ -595,7 +634,9 @@ export default {
595 634
             phone: this.adminInfo.phone,
596 635
             msgcode: this.adminInfo.msgcode,
597 636
             enabled: this.adminInfo.enabled,
598
-            regionid: this.adminInfo.regionid
637
+            regionid: this.adminInfo.regionid,
638
+            address: this.adminInfo.address,
639
+            comm: this.adminInfo.comm
599 640
           };
600 641
           //编辑
601 642
           if (this.adminInfo.adminid) {

+ 25
- 4
src/views/regionSection/regionManage/regionManage.vue View File

@@ -125,6 +125,19 @@
125 125
             }}
126 126
           </div>
127 127
         </FormItem>
128
+        <FormItem label="地址" style="width: 100%">
129
+          <Input
130
+              v-model="regionInfo.admin.address"
131
+              placeholder="请输入地址"
132
+          ></Input>
133
+        </FormItem>
134
+        <FormItem label="描述信息" style="width: 100%">
135
+          <Input
136
+              type="textarea"
137
+              v-model="regionInfo.admin.comm"
138
+              placeholder="请输入描述信息"
139
+          ></Input>
140
+        </FormItem>
128 141
       </Form>
129 142
       <div
130 143
         slot="footer"
@@ -326,7 +339,9 @@ export default {
326 339
           loginpwd: "",
327 340
           loginpwd1: "",
328 341
           phone: "",
329
-          msgcode: ""
342
+          msgcode: "",
343
+          address: "",
344
+          comm: ""
330 345
         }
331 346
       },
332 347
       // 编辑
@@ -335,7 +350,9 @@ export default {
335 350
         regionid: null,
336 351
         regionName: "",
337 352
         regionCode: "",
338
-        rversion: null
353
+        rversion: null,
354
+        address: "",
355
+        comm: ""
339 356
       },
340 357
       // 查看
341 358
       viewInfo: {
@@ -717,7 +734,9 @@ export default {
717 734
           loginpwd: generateRandomString(8),
718 735
           loginpwd1: "",
719 736
           phone: "",
720
-          msgcode: ""
737
+          msgcode: "",
738
+          address: "",
739
+          comm: ""
721 740
         }
722 741
       };
723 742
     },
@@ -785,7 +804,9 @@ export default {
785 804
               loginname: this.regionInfo.admin.loginname,
786 805
               loginpwd: this.regionInfo.admin.loginpwd,
787 806
               phone: this.regionInfo.admin.phone,
788
-              msgcode: this.regionInfo.admin.msgcode
807
+              msgcode: this.regionInfo.admin.msgcode,
808
+              address: this.regionInfo.admin.address,
809
+              comm: this.regionInfo.admin.comm
789 810
             }
790 811
           }).then((data) => {
791 812
             this.showLoading = false;

+ 2
- 11
src/views/regionSection/search/allApps.vue View File

@@ -682,7 +682,6 @@ export default {
682 682
             appName: res.obj.appName,
683 683
             devices: res.obj.devices
684 684
           };
685
-          console.log(this.deviceInfo);
686 685
         } else {
687 686
           this.$Message.error(res.msg);
688 687
         }
@@ -708,7 +707,6 @@ export default {
708 707
     },
709 708
     installChange() {
710 709
       //安装统计切换版本
711
-      console.log(this.installInfo.versionName);
712 710
       let obj = this.installInfo.apphistorys.filter(
713 711
         (v) => v.versionName === this.installInfo.versionName
714 712
       )[0];
@@ -721,7 +719,6 @@ export default {
721 719
       }).then((res) => {
722 720
         this.showLoading = false;
723 721
         if (res.code === 0) {
724
-          console.log(res.obj);
725 722
           this.installInfo.list = res.obj;
726 723
         } else {
727 724
           this.$Message.error(res.msg);
@@ -749,13 +746,11 @@ export default {
749 746
           });
750 747
           qrcode._el.title = "";
751 748
         });
752
-        console.log(this.downloadInfo);
753 749
       } else if (type === 2) {
754 750
         //获取历史版本
755 751
         this.showLoading = true;
756 752
         let res = await app_detail_history({ appid: row.appid });
757
-        if (res.code === 0) {
758
-        } else {
753
+        if (res.code != 0) {
759 754
           this.$Message.error(res.msg);
760 755
         }
761 756
         //安装统计
@@ -767,7 +762,6 @@ export default {
767 762
         });
768 763
         this.showLoading = false;
769 764
         if (res1.code === 0) {
770
-          console.log(res1.obj);
771 765
           this.installInfo = {
772 766
             show: true,
773 767
             appName: row.appName,
@@ -818,7 +812,6 @@ export default {
818 812
       let obj = this.viewInfo.apphistorys.filter(
819 813
         (v) => v.versionName === this.viewInfo.versionName
820 814
       )[0];
821
-      console.log(obj);
822 815
       this.viewInfo.apkPath = obj.apkPath;
823 816
       this.viewInfo.appAbbr = obj.appAbbr;
824 817
       this.viewInfo.appDeveloper = obj.appDeveloper;
@@ -866,7 +859,6 @@ export default {
866 859
             devices: res.obj.devices,
867 860
             schools: res.obj.schools
868 861
           };
869
-          console.log(this.viewInfo);
870 862
         } else {
871 863
           this.$Message.error(res.msg);
872 864
         }
@@ -927,7 +919,6 @@ export default {
927 919
         this.showLoading = false;
928 920
         if (data.code === 0) {
929 921
           this.searchForm.list = data.obj.data;
930
-          console.log(this.searchForm.list);
931 922
           this.searchForm.total = data.obj.total;
932 923
         } else {
933 924
           this.$Message.error(data.msg);
@@ -955,7 +946,7 @@ export default {
955 946
     display: flex;
956 947
     margin: 16px 0;
957 948
     .app_logo {
958
-      flex-wrap: none;
949
+      flex: none;
959 950
       width: 56px;
960 951
       height: 56px;
961 952
       border-radius: 20px;

+ 0
- 262
src/views/schoolSection/logdoperatemsg.vue View File

@@ -1,262 +0,0 @@
1
-<template>
2
-  <div class="main_root">
3
-    <div class="search_header">
4
-      <div class="search_left">
5
-        <Input
6
-          v-model="searchForm.name"
7
-          placeholder="请输入姓名、账号、设备号"
8
-          search
9
-          @on-search="searchList()"
10
-          style="width: 240px; margin-right: 20px"
11
-        />
12
-        <Checkbox @on-change="showReadChange" v-model="searchForm.showRead"
13
-          >只显示未读</Checkbox
14
-        >
15
-      </div>
16
-    </div>
17
-    <div class="table_wrap">
18
-      <div class="log_list" v-for="item in searchForm.list" :key="item.doid">
19
-        <div class="username" @click="headleView(item)">
20
-          {{ item.classname }} 【{{ item.username }}】<span
21
-            :class="[item.hasread === 1 ? 'active' : '']"
22
-            >{{ item.hasread === 1 ? "已读" : "未读" }}</span
23
-          >
24
-        </div>
25
-        <div class="comm">{{ item.comm }}</div>
26
-        <div class="school">
27
-          学校:<span>{{ item.schoolName }}</span> 设备号:<span>{{
28
-            item.sn
29
-          }}</span>
30
-          时间:<span>{{ item.createtime }}</span>
31
-        </div>
32
-      </div>
33
-      <div class="nodeta" v-if="searchForm.list.length === 0">暂无数据</div>
34
-    </div>
35
-    <div class="page_wrap" v-if="searchForm.list.length > 0">
36
-      <Page
37
-        :transfer="true"
38
-        :total="searchForm.total"
39
-        :current="searchForm.page"
40
-        :page-size="searchForm.size"
41
-        :page-size-opts="[10, 20, 40, 60]"
42
-        @on-change="pageChange"
43
-        @on-page-size-change="pageSizeChange"
44
-        show-total
45
-        show-sizer
46
-      ></Page>
47
-    </div>
48
-    <!-- 查看 -->
49
-    <Modal
50
-      class="modal1"
51
-      :mask-closable="false"
52
-      v-model="viewInfo.show"
53
-      title="查看"
54
-    >
55
-      <div>
56
-        <div class="username">
57
-          {{ viewInfo.classname }} 【{{ viewInfo.username }}】
58
-        </div>
59
-        <div class="school">
60
-          学校:<span style="margin-right: 20px">{{
61
-            viewInfo.schoolName
62
-          }}</span>
63
-          时间:{{ viewInfo.createtime }}
64
-        </div>
65
-        <div class="comm">{{ viewInfo.comm }}</div>
66
-        <div class="comm">设备号:{{ viewInfo.sn }}</div>
67
-      </div>
68
-      <div slot="footer" style="text-align: center">
69
-        <div>
70
-          <Button @click="viewInfo.show = false">关闭</Button>
71
-        </div>
72
-      </div>
73
-    </Modal>
74
-  </div>
75
-</template>
76
-
77
-<script>
78
-import { logdoperatemsg_edit_read, logdoperatemsg_list } from "@/api/log";
79
-
80
-export default {
81
-  data() {
82
-    return {
83
-      searchForm: {
84
-        showRead: 0,
85
-        name: "",
86
-        page: 1,
87
-        size: 10,
88
-        list: [],
89
-        total: 0
90
-      },
91
-      viewInfo: {
92
-        show: false
93
-      },
94
-      userInfo: {}
95
-    };
96
-  },
97
-  created() {
98
-    this.userInfo = JSON.parse(
99
-      localStorage.getItem("xh_control_userInfo")
100
-    ).content;
101
-    this.searchList();
102
-  },
103
-  computed: {
104
-    powerParams() {
105
-      return this.$store.getters.powerParams;
106
-    }
107
-  },
108
-  methods: {
109
-    headleView(item) {
110
-      logdoperatemsg_edit_read({ ldomid: item.ldomid }).then((res) => {
111
-        if (res.code === 0) {
112
-          this.searchForm.list.forEach((v) => {
113
-            if (item.ldomid === v.ldomid) {
114
-              //改状态为已读
115
-              v.hasread = 1;
116
-            }
117
-          });
118
-          this.viewInfo = {
119
-            show: true,
120
-            classname: item.classname,
121
-            username: item.username,
122
-            schoolName: item.schoolName,
123
-            createtime: item.createtime,
124
-            comm: item.comm,
125
-            sn: item.sn
126
-          };
127
-        } else {
128
-          this.$Message.error(res.msg);
129
-        }
130
-      });
131
-    },
132
-    showReadChange() {
133
-      this.searchForm.showRead = this.searchForm.showRead ? 1 : 0;
134
-      this.searchList();
135
-    },
136
-    // 搜索
137
-    searchList() {
138
-      this.searchForm.page = 1;
139
-      this.getList();
140
-    },
141
-    // 页码改变
142
-    pageChange(page) {
143
-      this.searchForm.page = page;
144
-      this.getList();
145
-    },
146
-    // 每页显示数量改变
147
-    pageSizeChange(size) {
148
-      this.searchForm.size = size;
149
-      this.searchForm.page = 1;
150
-      this.getList();
151
-    },
152
-    getList() {
153
-      logdoperatemsg_list({
154
-        rtype: this.powerParams.rtype,
155
-        objectid: this.powerParams.objectid,
156
-        name: this.searchForm.name,
157
-        page: this.searchForm.page,
158
-        size: this.searchForm.size,
159
-        showRead: this.searchForm.showRead
160
-      }).then((res) => {
161
-        if (res.code === 0) {
162
-          this.searchForm.list = res.obj.data;
163
-          this.searchForm.total = res.obj.total;
164
-        } else {
165
-          this.$Message.error(res.msg);
166
-        }
167
-      });
168
-    }
169
-  }
170
-};
171
-</script>
172
-
173
-<style lang="less" scoped>
174
-.search_header {
175
-  display: flex;
176
-  justify-content: space-between;
177
-  align-items: center;
178
-  margin: 16px 16px;
179
-  .search_left {
180
-    display: flex;
181
-    justify-content: flex-start;
182
-    align-items: center;
183
-  }
184
-}
185
-.table_wrap {
186
-  border: none;
187
-  .log_list {
188
-    border-radius: 8px;
189
-    border: 1px solid #ced9f2;
190
-    padding: 16px;
191
-    margin-bottom: 10px;
192
-    font-family: "SourceHanSansCN";
193
-    .username {
194
-      color: #253a70;
195
-      font-size: 16px;
196
-      font-weight: 700;
197
-      line-height: 30px;
198
-      margin-bottom: 10px;
199
-      cursor: pointer;
200
-      span {
201
-        display: inline-block;
202
-        border-radius: 11px;
203
-        background: #95abdf1a;
204
-        color: #95abdf;
205
-        font-size: 14px;
206
-        line-height: 14px;
207
-        font-weight: 400;
208
-        padding: 4px 10px;
209
-      }
210
-      .active {
211
-        background: #ebf3ff;
212
-        color: #339dff;
213
-      }
214
-    }
215
-    .comm {
216
-      color: #253a70;
217
-      font-size: 16px;
218
-      font-weight: 400;
219
-      line-height: 30px;
220
-    }
221
-    .school {
222
-      color: #798cb5;
223
-      font-size: 16px;
224
-      font-weight: 400;
225
-      line-height: 30px;
226
-      span {
227
-        margin-right: 20px;
228
-      }
229
-    }
230
-  }
231
-}
232
-.modal1 {
233
-  font-family: "SourceHanSansCN";
234
-
235
-  .username {
236
-    color: #253a70;
237
-    font-size: 18px;
238
-    font-weight: 500;
239
-    line-height: 30px;
240
-    text-align: center;
241
-  }
242
-  .school {
243
-    color: #afbcc7;
244
-    font-size: 12px;
245
-    font-weight: 400;
246
-    text-align: center;
247
-    line-height: 26px;
248
-    margin: 10px 0;
249
-  }
250
-  .comm {
251
-    color: #253a70;
252
-    font-size: 16px;
253
-    font-weight: 400;
254
-    line-height: 30px;
255
-  }
256
-}
257
-.nodeta {
258
-  min-height: 300px;
259
-  line-height: 300px;
260
-  text-align: center;
261
-}
262
-</style>

+ 0
- 413
src/views/schoolSection/personal.vue View File

@@ -1,413 +0,0 @@
1
-<template>
2
-  <div class="main_root">
3
-    <div class="personal_list">
4
-      <div class="personal_item" v-for="item in personal_list" :key="item.id">
5
-        <div
6
-          @click="toggle(item.id)"
7
-          :class="[curmodel === item.id ? 'active' : '']"
8
-        >
9
-          {{ item.title }}
10
-        </div>
11
-      </div>
12
-    </div>
13
-    <div class="contents" v-if="curmodel === 1">
14
-      <div class="user">
15
-        <div class="head">
16
-          <img src="../../assets/img/user.png" />
17
-        </div>
18
-        <div class="username">
19
-          <p>{{ personalInfo.aname }}</p>
20
-          <div>
21
-            登录名<span>{{ personalInfo.loginname }}</span> 角色<span>{{
22
-              personalInfo.atype === 1
23
-                ? "平台管理员"
24
-                : personalInfo.atype === 2
25
-                ? "区域管理员"
26
-                : "学校管理员"
27
-            }}</span>
28
-            手机号<span>{{ personalInfo.phone }}</span>
29
-          </div>
30
-        </div>
31
-      </div>
32
-      <div class="comm">
33
-        <div class="com">
34
-          <span>创建时间</span>{{ personalInfo.createtime }}
35
-          <span style="margin-left: 20px">更新时间</span
36
-          >{{ personalInfo.updatetime }}
37
-        </div>
38
-        <div class="com">
39
-          <span>最后登录时间</span>{{ personalInfo.lasttime }}
40
-          <span style="margin-left: 20px">最后登录IP</span
41
-          >{{ personalInfo.lastip }}
42
-        </div>
43
-        <div class="com">
44
-          <span style="width: 50px">描述</span>{{ personalInfo.comm }}
45
-        </div>
46
-      </div>
47
-    </div>
48
-    <div class="content" v-else-if="curmodel === 2">
49
-      <div class="search_header">
50
-        <div class="search_left">
51
-          <DatePicker
52
-            v-model="searchForm.dataRange"
53
-            @on-change="searchList()"
54
-            :editable="false"
55
-            :transfer="true"
56
-            format="yyyy-MM-dd"
57
-            type="daterange"
58
-            placement="bottom-start"
59
-            placeholder="请选择时间段"
60
-            style="margin-right: 10px; width: 220px"
61
-          ></DatePicker>
62
-          <Input
63
-            v-model="searchForm.name"
64
-            placeholder="请输入事件名称"
65
-            search
66
-            @on-search="searchList()"
67
-            style="width: 180px"
68
-          />
69
-        </div>
70
-      </div>
71
-      <div class="table_wrap">
72
-        <Table :columns="columns" :data="searchForm.list">
73
-        </Table>
74
-      </div>
75
-      <div class="page_wrap">
76
-        <Page
77
-          :transfer="true"
78
-          :total="searchForm.total"
79
-          :current="searchForm.page"
80
-          :page-size="searchForm.size"
81
-          :page-size-opts="[10, 20, 40, 60]"
82
-          @on-change="pageChange"
83
-          @on-page-size-change="pageSizeChange"
84
-          show-total
85
-          show-sizer
86
-        ></Page>
87
-      </div>
88
-    </div>
89
-    <div class="content" style="padding-top: 16px" v-else>
90
-      <div class="table_wrap">
91
-        <Table :columns="columns1" :data="searchForm.list"></Table>
92
-      </div>
93
-      <div class="page_wrap">
94
-        <Page
95
-          :transfer="true"
96
-          :total="searchForm.total"
97
-          :current="searchForm.page"
98
-          :page-size="searchForm.size"
99
-          :page-size-opts="[10, 20, 40, 60]"
100
-          @on-change="pageChange"
101
-          @on-page-size-change="pageSizeChange"
102
-          show-total
103
-          show-sizer
104
-        ></Page>
105
-      </div>
106
-    </div>
107
-  </div>
108
-</template>
109
-
110
-<script>
111
-import { admin_detail, admin_list_lr, admin_list_re } from "@/api/admin";
112
-import { dateFormat } from "@/utils";
113
-
114
-export default {
115
-  data() {
116
-    return {
117
-      personal_list: [
118
-        {
119
-          id: 1,
120
-          title: "个人信息"
121
-        },
122
-        {
123
-          id: 2,
124
-          title: "最近事件"
125
-        },
126
-        {
127
-          id: 3,
128
-          title: "历史登录"
129
-        }
130
-      ],
131
-      curmodel: 1,
132
-      personalInfo: {},
133
-      searchForm: {
134
-        dataRange: [],
135
-        name: "",
136
-        page: 1,
137
-        size: 10,
138
-        list: [],
139
-        total: 0
140
-      },
141
-      userInfo: {},
142
-      columns: [
143
-        {
144
-          title: "序号",
145
-          align: "center",
146
-          width: 70,
147
-          render: (h, params) => {
148
-            return h(
149
-              "span",
150
-              params.index +
151
-                (this.searchForm.page - 1) * this.searchForm.size +
152
-                1
153
-            );
154
-          }
155
-        },
156
-        {
157
-          title: "登录名",
158
-          key: "loginname",
159
-          align: "center"
160
-        },
161
-        {
162
-          title: "所属模块",
163
-          key: "logmodel",
164
-          align: "center"
165
-        },
166
-        {
167
-          title: "模块操作",
168
-          key: "logaction",
169
-          align: "center"
170
-        },
171
-        {
172
-          title: "日志内容",
173
-          key: "content",
174
-          align: "center"
175
-        },
176
-        {
177
-          title: "时间",
178
-          key: "createtime",
179
-          width: 190,
180
-          align: "center"
181
-        }
182
-      ],
183
-      columns1: [
184
-        {
185
-          title: "序号",
186
-          align: "center",
187
-          width: 70,
188
-          render: (h, params) => {
189
-            return h(
190
-              "span",
191
-              params.index +
192
-                (this.searchForm.page - 1) * this.searchForm.size +
193
-                1
194
-            );
195
-          }
196
-        },
197
-        {
198
-          title: "登录IP",
199
-          key: "ip",
200
-          align: "center"
201
-        },
202
-        {
203
-          title: "地址",
204
-          key: "ipAddress",
205
-          align: "center"
206
-        },
207
-        {
208
-          title: "登录时间",
209
-          key: "createtime",
210
-          width: 190,
211
-          align: "center"
212
-        }
213
-      ]
214
-    };
215
-  },
216
-  created() {
217
-    this.userInfo = JSON.parse(
218
-      localStorage.getItem("xh_control_userInfo")
219
-    ).content;
220
-    this.getPersonal();
221
-  },
222
-  computed: {
223
-    powerParams() {
224
-      return this.$store.getters.powerParams;
225
-    }
226
-  },
227
-  methods: {
228
-    toggle(type) {
229
-      this.curmodel = type;
230
-      if (type === 1) {
231
-        this.getPersonal();
232
-      } else {
233
-        this.searchForm.size = 10;
234
-        this.searchForm.page = 1;
235
-        this.searchList();
236
-      }
237
-    },
238
-    // 搜索
239
-    searchList() {
240
-      this.searchForm.page = 1;
241
-      this.getEvent();
242
-    },
243
-    // 页码改变
244
-    pageChange(page) {
245
-      this.searchForm.page = page;
246
-      this.getEvent();
247
-    },
248
-    // 每页显示数量改变
249
-    pageSizeChange(size) {
250
-      this.searchForm.size = size;
251
-      this.searchForm.page = 1;
252
-      this.getEvent();
253
-    },
254
-    async getEvent() {
255
-      let res = {
256
-        code: null
257
-      };
258
-      if (this.curmodel === 2) {
259
-        let _begindate = this.searchForm.dataRange[0];
260
-        _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
261
-        let _enddate = this.searchForm.dataRange[1];
262
-        _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
263
-        res = await admin_list_re({
264
-          objectid: this.userInfo.adminid,
265
-          begindate: _begindate,
266
-          enddate: _enddate,
267
-          name: this.searchForm.name,
268
-          page: this.searchForm.page,
269
-          size: this.searchForm.size
270
-        });
271
-      } else {
272
-        res = await admin_list_lr({
273
-          objectid: this.userInfo.adminid,
274
-          page: this.searchForm.page,
275
-          size: this.searchForm.size
276
-        });
277
-      }
278
-
279
-      if (res.code === 0) {
280
-        this.searchForm.list = res.obj.data;
281
-        this.searchForm.total = res.obj.total;
282
-      } else {
283
-        this.$Message.error(res.msg);
284
-      }
285
-    },
286
-    getPersonal() {
287
-      admin_detail({ adminid: this.userInfo.adminid }).then((res) => {
288
-        if (res.code === 0) {
289
-          this.personalInfo = res.obj;
290
-        } else {
291
-          this.$Message.error(res.msg);
292
-        }
293
-      });
294
-    }
295
-  }
296
-};
297
-</script>
298
-
299
-<style lang="less" scoped>
300
-.main_root {
301
-  background-color: transparent;
302
-  border: navajowhite;
303
-  height: calc(100% - 20px);
304
-  display: flex;
305
-  .personal_list {
306
-    width: 200px;
307
-    height: 100%;
308
-    border-radius: 15px;
309
-    padding: 20px 10px;
310
-    border: 1px solid #e9f0f9;
311
-    background: #ffffff;
312
-    margin-right: 20px;
313
-    .personal_item {
314
-      line-height: 30px;
315
-      text-align: center;
316
-      cursor: pointer;
317
-    }
318
-    .active {
319
-      border-radius: 6px;
320
-      background: #339dff;
321
-      color: white;
322
-    }
323
-  }
324
-  .contents {
325
-    width: calc(100% - 220px);
326
-    height: 100%;
327
-    .user {
328
-      height: 200px;
329
-      border-radius: 15px;
330
-      background: white;
331
-      margin-bottom: 20px;
332
-      display: flex;
333
-      align-items: center;
334
-      .head {
335
-        width: 100px;
336
-        height: 100px;
337
-        margin: 0 40px;
338
-        border-radius: 16px;
339
-        overflow: hidden;
340
-        border: 2px solid #ffffff;
341
-        box-shadow: 0 6px 14px 0 #dce0e880;
342
-        img {
343
-          width: 100%;
344
-          height: 100%;
345
-          object-fit: cover;
346
-        }
347
-      }
348
-      .username {
349
-        p {
350
-          color: #253a70;
351
-          font-size: 20px;
352
-          font-weight: 500;
353
-          font-family: "SourceHanSansCN";
354
-          text-align: left;
355
-          line-height: 50px;
356
-        }
357
-        div {
358
-          color: #7c8db5;
359
-          font-size: 16px;
360
-          font-weight: 400;
361
-          font-family: "SourceHanSansCN";
362
-          line-height: 50px;
363
-          span {
364
-            color: #253a70;
365
-            display: inline-block;
366
-            margin: 0 20px;
367
-          }
368
-        }
369
-      }
370
-    }
371
-    .comm {
372
-      height: calc(100% - 220px);
373
-      border-radius: 15px;
374
-      background: white;
375
-      margin-bottom: 20px;
376
-      padding: 40px;
377
-      .com {
378
-        line-height: 30px;
379
-        color: #253a70;
380
-        font-size: 16px;
381
-        font-weight: 400;
382
-        margin-bottom: 10px;
383
-        font-family: "SourceHanSansCN";
384
-        span {
385
-          color: #7c8db5;
386
-          display: inline-block;
387
-          width: 100px;
388
-          margin-right: 20px;
389
-        }
390
-      }
391
-    }
392
-  }
393
-  .content {
394
-    width: calc(100% - 220px);
395
-    height: 100%;
396
-    overflow-y: auto;
397
-    border-radius: 15px;
398
-    border: 1px solid #e9f0f9;
399
-    background: #ffffff;
400
-    .search_header {
401
-      display: flex;
402
-      justify-content: space-between;
403
-      align-items: center;
404
-      margin: 16px 16px;
405
-      .search_left {
406
-        display: flex;
407
-        justify-content: flex-start;
408
-        align-items: center;
409
-      }
410
-    }
411
-  }
412
-}
413
-</style>

Loading…
Cancel
Save