Commit 68224c97 by jack

修复设备导入

1 parent f2a0958f
...@@ -141,7 +141,7 @@ import { ...@@ -141,7 +141,7 @@ import {
EXPORTDEVICECODE, EXPORTDEVICECODE,
UNSTOCKDOWNLOADTEMPLATE, UNSTOCKDOWNLOADTEMPLATE,
PREDEVICEIMPORT, PREDEVICEIMPORT,
DEVICEIMPORT DEVICEIMPORT,
} from '@/http/interface' } from '@/http/interface'
import addDevice from './addDevice' import addDevice from './addDevice'
import { exportExcel } from '@/common/common' import { exportExcel } from '@/common/common'
...@@ -172,12 +172,12 @@ export default { ...@@ -172,12 +172,12 @@ export default {
exportLoading: false, exportLoading: false,
addShow: false, addShow: false,
showDialog: false, showDialog: false,
uploadForm: {isOnlyimsi:false}, uploadForm: { isOnlyimsi: false },
uploadFile: {}, uploadFile: {},
uploadError: {}, uploadError: {},
PREDEVICEIMPORT: PREDEVICEIMPORT, PREDEVICEIMPORT: PREDEVICEIMPORT,
UNSTOCKDOWNLOADTEMPLATE: UNSTOCKDOWNLOADTEMPLATE, UNSTOCKDOWNLOADTEMPLATE: UNSTOCKDOWNLOADTEMPLATE,
fileLoading:false fileLoading: false,
} }
}, },
created() {}, created() {},
...@@ -351,19 +351,25 @@ export default { ...@@ -351,19 +351,25 @@ export default {
/**手动上传文件 */ /**手动上传文件 */
uploadInfoToServer: function () { uploadInfoToServer: function () {
let _this = this; let _this = this
let o = this.fileInfo let o = this.fileInfo
let m = this.uploadForm; let m = this.uploadForm
if (!o) { if (!o) {
return false return false
} }
let oParams = JSON.parse(o) let oParams = JSON.parse(o)
_this.fileLoading = true; _this.fileLoading = true
oParams[0].deviceCode = m.deviceCode; oParams[0].deviceCode = m.deviceCode
oParams[0].isOnlyimsi = m.isOnlyimsi; oParams[0].isOnlyimsi = m.isOnlyimsi
DEVICEIMPORT(oParams).then((res) => { DEVICEIMPORT(oParams).then((res) => {
_this.fileLoading = false; _this.fileLoading = false
console.log(res) if (res.returnCode == 0) {
_this.closeDialog()
_this.$Util.Info({
message: '导入成功',
type: 'success',
})
}
}) })
}, },
......
...@@ -258,6 +258,13 @@ export default { ...@@ -258,6 +258,13 @@ export default {
let oParams = JSON.parse(o); let oParams = JSON.parse(o);
DEVICEIMEISTOKEIMPORT(oParams).then(res => { DEVICEIMEISTOKEIMPORT(oParams).then(res => {
console.log(res); console.log(res);
if (res.returnCode == 0) {
_this.closeDialog()
_this.$Util.Info({
message: '导入成功',
type: 'success',
})
}
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!