|
@@ -7,6 +7,7 @@ import {
|
7
|
7
|
syncShenSong,
|
8
|
8
|
addRawDevice,
|
9
|
9
|
deleteRawDevice,
|
|
10
|
+ syncLoc,
|
10
|
11
|
} from '@/services/device';
|
11
|
12
|
import List from './components/List';
|
12
|
13
|
import MaBind from './components/MaBind';
|
|
@@ -104,8 +105,16 @@ export default (props) => {
|
104
|
105
|
setOpen(true);
|
105
|
106
|
};
|
106
|
107
|
|
107
|
|
- const syncLoc = (row) => {
|
|
108
|
+ const onSyncLoc = ({ deviceType, deviceNo }) => {
|
108
|
109
|
const hide = message.loading('请稍候...', 0);
|
|
110
|
+ syncLoc({ deviceType, deviceNo })
|
|
111
|
+ .then(() => {
|
|
112
|
+ hide();
|
|
113
|
+ message.success('同步定位成功');
|
|
114
|
+ })
|
|
115
|
+ .catch(() => {
|
|
116
|
+ hide();
|
|
117
|
+ });
|
109
|
118
|
};
|
110
|
119
|
|
111
|
120
|
// 设备操作
|
|
@@ -121,7 +130,7 @@ export default (props) => {
|
121
|
130
|
unBind(row);
|
122
|
131
|
break;
|
123
|
132
|
case 'syncLoc':
|
124
|
|
- syncLoc(row);
|
|
133
|
+ onSyncLoc(row);
|
125
|
134
|
break;
|
126
|
135
|
case 'delete':
|
127
|
136
|
onDelete(row);
|