| | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | this.getMaintainScanDeviceApplyQrCodeData('111') |
| | | // this.getMaintainScanDeviceApplyQrCodeData('101') |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | async submit() { |
| | | const header = { |
| | | // 'Content-Type': 'multipart/form-data', |
| | | 'Content-Type': 'application/x-www-form-urlencoded', |
| | | 'rediskey': uni.getStorageSync('rediskey'), |
| | | 'admin': uni.getStorageSync('usercode'), |
| | | 'username': encodeURIComponent(uni.getStorageSync('username')), |
| | | 'navTabId': uni.getStorageSync('usercode'), |
| | | 'userid': uni.getStorageSync('userid'), |
| | | 'guid': uni.getStorageSync('guid'), |
| | | 'usertype': 'APP' |
| | | // 'Content-Type': 'application/x-www-form-urlencoded', |
| | | 'Token': uni.getStorageSync('Token') |
| | | // 'rediskey': uni.getStorageSync('rediskey'), |
| | | // 'admin': uni.getStorageSync('usercode'), |
| | | // 'username': encodeURIComponent(uni.getStorageSync('username')), |
| | | // 'navTabId': uni.getStorageSync('usercode'), |
| | | // 'userid': uni.getStorageSync('userid'), |
| | | // 'guid': uni.getStorageSync('guid'), |
| | | // 'usertype': 'APP' |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | // #ifdef APP-PLUS ||MP |
| | | // const temp = [{ |
| | | // name: 'files1' |
| | | // }] |
| | | |
| | | let formData = { |
| | | username: uni.getStorageSync('username'), |
| | | eqpcode: this.topContent[0].code, |
| | | wkshpcode: this.topContent[0].wksp_code, |
| | | faultsourcecode: this.selectValue, |
| | |
| | | |
| | | |
| | | console.log(formData) |
| | | console.log(this.fileList, 'fileList') |
| | | |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/DeviceManage/MaintainScanDeviceApplySave', |
| | | url: this.$baseUrl + '/DeviceManager/MaintainScanDeviceApplySave', |
| | | files: this.fileList.length === 0 ? [{ |
| | | uri: '/' |
| | | }] : this.fileList, |
| | |
| | | header: header, |
| | | formData: formData, |
| | | success: (res) => { |
| | | console.log(res, 1) |
| | | // console.log(res, '1') |
| | | let result = JSON.parse(res.data) |
| | | if (res.statusCode == 200 && result.code == '200') { |
| | | uni.$u.toast('提交成功!') |
| | |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | fail(res) { |
| | | // console.log(res, '1') |
| | | uni.$u.toast('提交失败!') |
| | | this.isDisabledSubmitButton = false |
| | | }, |