loulijun2021
2024-05-17 f16c4fed5e34e5514a564266c500ff382644630a
pages/sbgl/wxsq.vue
@@ -192,7 +192,7 @@
      },
      mounted() {
         this.init()
         this.getMaintainScanDeviceApplyQrCodeData('111')
         // this.getMaintainScanDeviceApplyQrCodeData('101')
      },
      methods: {
@@ -297,14 +297,15 @@
         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'
            }
@@ -335,12 +336,8 @@
            // #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,
@@ -349,11 +346,12 @@
            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,
@@ -361,7 +359,7 @@
               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('提交成功!')
@@ -376,6 +374,7 @@
                  this.isDisabledSubmitButton = false
               },
               fail(res) {
                  // console.log(res, '1')
                  uni.$u.toast('提交失败!')
                  this.isDisabledSubmitButton = false
               },