Browse Source

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

gzb
wangzhonglu 8 months ago
parent
commit
d74892a96c

+ 3
- 0
src/components/TimeStrategy/TimeStrategy.vue View File

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

+ 7
- 3
src/views/schoolSection/deviceManage/inLineDevice.vue View File

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

Loading…
Cancel
Save