loulijun2021
2024-05-17 f16c4fed5e34e5514a564266c500ff382644630a
pages/sbgl/wxsq.vue
@@ -25,7 +25,7 @@
                     </view>
                     <view class="marginRight20">
                        <u-icon name="scan" @click="topScanClick" color="red" size="56"></u-icon>
                        <u-icon name="scan" @click="topScanClick" color="red" size="28"></u-icon>
                     </view>
                  </view>
@@ -53,7 +53,7 @@
                  </view>
               </view>
               <u-gap height="20" bgColor="#eff0f1"></u-gap>
               <u-gap height="10" bgColor="#eff0f1"></u-gap>
               <view class="head" style="padding-bottom: 10rpx;">
                  <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;">
@@ -71,7 +71,7 @@
                     </view>
                  </view>
               </view>
               <u-gap height="20" bgColor="#eff0f1"></u-gap>
               <u-gap height="10" bgColor="#eff0f1"></u-gap>
               <view class="head" style="padding-bottom: 10rpx;">
                  <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;">
@@ -83,7 +83,7 @@
                     </view>
                  </view>
                  <view class='inputClass  contentFont' style="margin: 0 20rpx; width: 95%;">
                     <u--textarea placeholder="请输入" confirm-type="send" border="surround" height='140'
                     <u--textarea placeholder="请输入" confirm-type="send" border="surround" height='100'
                        v-model="descMessage">
                     </u--textarea>
                  </view>
@@ -93,7 +93,7 @@
                  <view style="display: flex;">
                     <view v-for="(pic,index) in fileList" :key="pic.name">
                        <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;">
                           <u-icon name="close" color="#fff" size="26"
                           <u-icon name="close" color="#fff" size="13"
                              style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;"
                              @click="deletePic(pic)"></u-icon>
@@ -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 + '/AppDeviceManage/MaintainScanDeviceApplySave',
               url: this.$baseUrl + '/DeviceManager/MaintainScanDeviceApplySave',
               files: this.fileList.length === 0 ? [{
                  uri: '/'
               }] : this.fileList,
@@ -361,6 +359,7 @@
               header: header,
               formData: formData,
               success: (res) => {
                  // console.log(res, '1')
                  let result = JSON.parse(res.data)
                  if (res.statusCode == 200 && result.code == '200') {
                     uni.$u.toast('提交成功!')
@@ -375,6 +374,7 @@
                  this.isDisabledSubmitButton = false
               },
               fail(res) {
                  // console.log(res, '1')
                  uni.$u.toast('提交失败!')
                  this.isDisabledSubmitButton = false
               },