Browse Source

学校-在线设备、解除管控

gzb
wangzhonglu 9 months ago
parent
commit
d498192d7c

+ 35
- 20
src/views/schoolSection/deviceManage/inLineDevice.vue View File

@@ -3,21 +3,23 @@
3 3
     <div class="search_header">
4 4
       <div class="search_left">
5 5
         <Select
6
-          v-model="searchForm.online"
6
+          v-model="searchForm.atype"
7 7
           style="margin-right: 10px; width: 150px"
8
+          @on-change="searchList()"
8 9
         >
9 10
           <Option :value="1">在线设备</Option>
10 11
           <Option :value="0">离线设备</Option>
11 12
         </Select>
12 13
         <Select
13
-          v-model="searchForm.time"
14
+          v-model="searchForm.doEvent"
14 15
           style="margin-right: 10px; width: 150px"
16
+          @on-change="searchList()"
15 17
         >
16
-          <Option :value="1">最近1小时</Option>
17
-          <Option :value="2">最近48小时</Option>
18
+          <Option :value="5">最近1小时</Option>
19
+          <Option :value="4">最近48小时</Option>
18 20
           <Option :value="3">最近7天</Option>
19
-          <Option :value="4">最近14天</Option>
20
-          <Option :value="5">最近1个月</Option>
21
+          <Option :value="2">最近14天</Option>
22
+          <Option :value="1">最近2个月</Option>
21 23
         </Select>
22 24
         <Input
23 25
           v-model="searchForm.name"
@@ -29,7 +31,15 @@
29 31
       </div>
30 32
     </div>
31 33
     <div class="table_wrap">
32
-      <Table :columns="columns" :data="searchForm.list"></Table>
34
+      <Table :columns="columns" :data="searchForm.list">
35
+        <template slot-scope="{ row }" slot="controlSlot">
36
+          <div>
37
+            {{
38
+              row.control === 1 ? "管控中" : row.control === 2 ? "解除管控" : ""
39
+            }}
40
+          </div>
41
+        </template>
42
+      </Table>
33 43
     </div>
34 44
     <div class="page_wrap">
35 45
       <Page
@@ -48,12 +58,15 @@
48 58
 </template>
49 59
 
50 60
 <script>
61
+import { device_manager_list_od } from "@/api/device_manager";
51 62
 export default {
52 63
   data() {
53 64
     return {
54 65
       searchForm: {
55
-        online: 1,
56
-        time: 2,
66
+        // 1在线2离线
67
+        atype: 1,
68
+        // 1最近2个月 2最近14天 3最近7天 4最近48小时 5最近1小时
69
+        doEvent: 5,
57 70
         name: "",
58 71
         page: 1,
59 72
         size: 10,
@@ -76,43 +89,42 @@ export default {
76 89
         },
77 90
         {
78 91
           title: "登录账号",
79
-          key: "versionName",
92
+          key: "loginname",
80 93
           align: "center"
81 94
         },
82 95
         {
83 96
           title: "姓名",
84
-          key: "website",
85
-          width: 140,
97
+          key: "username",
86 98
           align: "center"
87 99
         },
88 100
         {
89 101
           title: "设备名称",
90
-          key: "updatename",
102
+          key: "device",
91 103
           align: "center"
92 104
         },
93 105
         {
94 106
           title: "管控状态",
95
-          key: "updatename",
107
+          slot: "controlSlot",
96 108
           align: "center"
97 109
         },
98 110
         {
99 111
           title: "设备型号",
100
-          key: "updatename",
112
+          key: "deviceModel",
101 113
           align: "center"
102 114
         },
103 115
         {
104 116
           title: "ID(IMEI/MEID/ESN)",
105
-          key: "updatename",
117
+          key: "sn",
106 118
           align: "center"
107 119
         },
108 120
         {
109 121
           title: "Rom版本",
110
-          key: "updatename",
122
+          key: "romVersion",
111 123
           align: "center"
112 124
         },
113 125
         {
114 126
           title: "最后在线时间",
115
-          key: "updatetime",
127
+          key: "lasttime",
116 128
           width: 190,
117 129
           align: "center"
118 130
         }
@@ -141,9 +153,12 @@ export default {
141 153
     },
142 154
     // 获取列表
143 155
     getList() {
144
-      /* whiteLibrary_list({
156
+      device_manager_list_od({
145 157
         page: this.searchForm.page,
146 158
         size: this.searchForm.size,
159
+        schoolid: 4,
160
+        atype: this.searchForm.atype,
161
+        doEvent: this.searchForm.doEvent,
147 162
         name: this.searchForm.name
148 163
       }).then((data) => {
149 164
         if (data.code === 0) {
@@ -152,7 +167,7 @@ export default {
152 167
         } else {
153 168
           this.$Message.error(data.msg);
154 169
         }
155
-      }); */
170
+      });
156 171
     }
157 172
   }
158 173
 };

+ 25
- 13
src/views/schoolSection/deviceManage/removeControlDevice.vue View File

@@ -4,15 +4,23 @@
4 4
       <div class="search_left">
5 5
         <Input
6 6
           v-model="searchForm.name"
7
-          placeholder="请输入名称"
7
+          placeholder="请输入姓名、账号、设备号、型号"
8 8
           search
9 9
           @on-search="searchList()"
10
-          style="width: 150px"
10
+          style="width: 260px"
11 11
         />
12 12
       </div>
13 13
     </div>
14 14
     <div class="table_wrap">
15
-      <Table :columns="columns" :data="searchForm.list"></Table>
15
+      <Table :columns="columns" :data="searchForm.list">
16
+        <template slot-scope="{ row }" slot="controlSlot">
17
+          <div>
18
+            {{
19
+              row.control === 1 ? "管控中" : row.control === 2 ? "解除管控" : ""
20
+            }}
21
+          </div>
22
+        </template>
23
+      </Table>
16 24
     </div>
17 25
     <div class="page_wrap">
18 26
       <Page
@@ -31,10 +39,12 @@
31 39
 </template>
32 40
 
33 41
 <script>
42
+import { device_manager_list_od } from "@/api/device_manager";
34 43
 export default {
35 44
   data() {
36 45
     return {
37 46
       searchForm: {
47
+        pushType: 2,
38 48
         name: "",
39 49
         page: 1,
40 50
         size: 10,
@@ -57,38 +67,37 @@ export default {
57 67
         },
58 68
         {
59 69
           title: "登录账号",
60
-          key: "versionName",
70
+          key: "loginname",
61 71
           align: "center"
62 72
         },
63 73
         {
64 74
           title: "姓名",
65
-          key: "website",
66
-          width: 140,
75
+          key: "username",
67 76
           align: "center"
68 77
         },
69 78
         {
70 79
           title: "设备名称",
71
-          key: "updatename",
80
+          key: "device",
72 81
           align: "center"
73 82
         },
74 83
         {
75 84
           title: "管控状态",
76
-          key: "updatename",
85
+          slot: "controlSlot",
77 86
           align: "center"
78 87
         },
79 88
         {
80 89
           title: "设备型号",
81
-          key: "updatename",
90
+          key: "deviceModel",
82 91
           align: "center"
83 92
         },
84 93
         {
85 94
           title: "ID(IMEI/MEID/ESN)",
86
-          key: "updatename",
95
+          key: "sn",
87 96
           align: "center"
88 97
         },
89 98
         {
90 99
           title: "Rom版本",
91
-          key: "updatename",
100
+          key: "romVersion",
92 101
           align: "center"
93 102
         },
94 103
         {
@@ -122,9 +131,12 @@ export default {
122 131
     },
123 132
     // 获取列表
124 133
     getList() {
125
-      /* whiteLibrary_list({
134
+      device_manager_list_od({
126 135
         page: this.searchForm.page,
127 136
         size: this.searchForm.size,
137
+        schoolid: 4,
138
+        atype: this.searchForm.atype,
139
+        doEvent: this.searchForm.doEvent,
128 140
         name: this.searchForm.name
129 141
       }).then((data) => {
130 142
         if (data.code === 0) {
@@ -133,7 +145,7 @@ export default {
133 145
         } else {
134 146
           this.$Message.error(data.msg);
135 147
         }
136
-      }); */
148
+      });
137 149
     }
138 150
   }
139 151
 };

Loading…
Cancel
Save