| | |
| | | loading: false, |
| | | exporting: false, |
| | | importingMap: false, |
| | | syncingLocMast: false, |
| | | initializingLocMast: false, |
| | | tableData: [], |
| | | selection: [], |
| | |
| | | }); |
| | | }).catch(function () {}); |
| | | }, |
| | | promptSyncLocMast: function () { |
| | | var self = this; |
| | | self.$prompt('请输入需要同步的楼层', '同步地图坐标', { |
| | | confirmButtonText: '下一步', |
| | | cancelButtonText: '取消', |
| | | inputPattern: /^\d+$/, |
| | | inputErrorMessage: '请输入数字层数' |
| | | }).then(function (payload) { |
| | | var lev = $.trim(payload && payload.value ? payload.value : ''); |
| | | self.$confirm('将按当前地图重新同步第' + lev + '层地图坐标与库位绑定关系。是否继续?', '同步地图坐标', { |
| | | confirmButtonText: '继续同步', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(function () { |
| | | self.syncingLocMast = true; |
| | | $.ajax({ |
| | | url: baseUrl + '/basMap/syncLocMast/auth', |
| | | method: 'POST', |
| | | headers: self.authHeaders(), |
| | | data: { |
| | | lev: lev |
| | | }, |
| | | success: function (res) { |
| | | if (self.handleForbidden(res)) { |
| | | return; |
| | | } |
| | | if (!res || res.code !== 200) { |
| | | self.$message.error((res && res.msg) ? res.msg : '同步失败'); |
| | | return; |
| | | } |
| | | self.$message.success(res.msg || '同步成功'); |
| | | self.loadTable(); |
| | | }, |
| | | error: function () { |
| | | self.$message.error('同步失败'); |
| | | }, |
| | | complete: function () { |
| | | self.syncingLocMast = false; |
| | | } |
| | | }); |
| | | }).catch(function () {}); |
| | | }).catch(function () {}); |
| | | }, |
| | | submitDialog: function () { |
| | | var self = this; |
| | | if (!self.$refs.dialogForm) { |