Просмотр исходного кода

在线设备优化;时间策略优化

gzb
wangzhonglu 8 месяцев назад
Родитель
Сommit
d74892a96c

+ 3
- 0
src/components/TimeStrategy/TimeStrategy.vue Просмотреть файл

@@ -134,6 +134,9 @@ export default {
134 134
       for (const weekValue in _timeInfo) {
135 135
         let _dayHalfHours = _timeInfo[weekValue];
136 136
         if (_dayHalfHours && _dayHalfHours.length > 0) {
137
+          _dayHalfHours = _dayHalfHours.sort((a, b) => {
138
+            return a - b;
139
+          });
137 140
           let _dayTimeInfo = {
138 141
             week: weekValue,
139 142
             starttime: null,

+ 7
- 3
src/views/schoolSection/deviceManage/inLineDevice.vue Просмотреть файл

@@ -12,6 +12,7 @@
12 12
           <Option :value="2">离线设备</Option>
13 13
         </Select>
14 14
         <Select
15
+          v-if="searchForm.atype === 1"
15 16
           v-model="searchForm.doEvent"
16 17
           style="margin-right: 10px; width: 150px"
17 18
           @on-change="searchList()"
@@ -159,16 +160,19 @@ export default {
159 160
     },
160 161
     // 获取列表
161 162
     getList() {
162
-      device_manager_list_od({
163
+      let form = {
163 164
         rtype: this.powerParams.rtype,
164 165
         objectid: this.powerParams.objectid,
165 166
         page: this.searchForm.page,
166 167
         size: this.searchForm.size,
167 168
         schoolid: this.powerParams.objectid,
168 169
         atype: this.searchForm.atype,
169
-        doEvent: this.searchForm.doEvent,
170 170
         name: this.searchForm.name
171
-      }).then((data) => {
171
+      };
172
+      if (this.searchForm.atype === 1) {
173
+        form.doEvent = this.searchForm.doEvent;
174
+      }
175
+      device_manager_list_od(form).then((data) => {
172 176
         if (data.code === 0) {
173 177
           this.searchForm.list = data.obj.data;
174 178
           this.searchForm.total = data.obj.total;

Загрузка…
Отмена
Сохранить