quanyawei
2023-10-27 52d463e03c1f074099ed8e8a6b7c3ddde52d2708
pages/actionChange/components/rectificationInfor.vue
@@ -8,38 +8,54 @@
         <u-line color="#bbb" />
         <view>
            <view class="mainContent">
               <u--form labelPosition="left" label-width="70" :model="form" :border-bottom="false" :rules="rules"
               <u--form labelPosition="left" label-width="80" :model="form" :border-bottom="false" :rules="rules"
                  ref="uForm">
                  <view class="formItemContent">
                     <u-form-item label="是否整改:" required :border-bottom="false">
                        <view class="" v-if="pageState">
                           {{ dictObj.yesOrNo[basicInfor.isChange] ||''}}
                  <view class="" v-if="pageState">
                     <p class="rowTip">
                        <view class="rowTipContenet">
                           <view class="wholeLine">
                              <text class="rowTipContenetLabel">是否整改:</text>
                              <text class="rowTipContenetAll">
                                 {{ dictObj.yesOrNo[basicInfor.isChange] ||''}}
                              </text>
                           </view>
                        </view>
                        <u-radio-group v-else v-model="form.isChange" @change="radioGroupChange">
                           <u-radio :key="index" v-for="(item, index) in list"
                              :custom-style="{marginRight: '8px'}" :label="item.name" :name="item.value" />
                        </u-radio-group>
                     </u-form-item>
                        <view class="rowTipContenet">
                           <view class="wholeLine">
                              <text class="rowTipContenetLabel">整改人:</text>
                              <text class="rowTipContenetAll">{{ basicInfor.changeName ||''}}</text>
                           </view>
                        </view>
                     </p>
                  </view>
                  <view class="" v-else>
                     <view class="formItemContent">
                        <u-form-item label="是否整改:" :required="!pageState" :border-bottom="false">
                           <u-radio-group v-model="form.isChange" @change="radioGroupChange">
                              <u-radio :key="index" v-for="(item, index) in list"
                                 :custom-style="{marginRight: '8px'}" :label="item.name"
                                 :name="item.value" />
                           </u-radio-group>
                        </u-form-item>
                     </view>
                     <view class="formItemContent">
                        <u-form-item label="整改人:" prop="changeName" :border-bottom="false"
                           :required="!pageState">
                           <u-input v-model="form.changeName" border="none" placeholder="请输入" type="text" />
                        </u-form-item>
                     </view>
                  </view>
                  <view class="formItemContent">
                     <u-form-item label="整改人:" prop="changeName" :border-bottom="false" required>
                        <view class="" v-if="pageState">
                           {{ basicInfor.changeName ||''}}
                        </view>
                        <u-input v-else v-model="form.changeName" border="none" placeholder="请输入" type="text" />
                     </u-form-item>
                  </view>
                  <view class="formItemContent">
                     <u-form-item label="整改反馈" prop="changeDescribe" :border-bottom="false" required>
                        <view class="" v-if="pageState">
                     <u-form-item label="整改反馈:" prop="changeDescribe" :border-bottom="false"
                        :required="!pageState">
                        <view class="fonttest" v-if="pageState">
                           {{ basicInfor.changeDescribe ||''}}
                        </view>
                        <u--textarea v-else v-model="form.changeDescribe" border="none" placeholder="请输入内容" />
                        <u--textarea v-else v-model="form.changeDescribe" border="none" />
                     </u-form-item>
                  </view>
                  <view class="formItemContent">
                     <u-form-item label="相关附件" :border-bottom="false">
                     <u-form-item label="相关附件:" :border-bottom="false">
                        <view class="fileBox" v-if="pageState">
                           <cl-upload v-model="fileList" :add="false" :action="`''`" cloud-type="other"
                              :remove="false" />
@@ -86,20 +102,18 @@
         return {
            sysCode: '1010202',
            list: [{
                  name: '是',
                  value: 0,
               },
               {
                  name: '否',
                  value: 1,
               },
            ],
               name: '是',
               value: 0,
            }, {
               name: '否',
               value: 1,
            }, ],
            form: {
               isChange: 0,
               changeName: '',
               changeDescribe: '',
            },
            dictObj: this.$storage.getJson('dictObj'),
            dictObj: JSON.parse(uni.getStorageSync('dictObj') || '[]'),
            fileList: [],
            fileBaseList: [],
            baseUrl: this.$storage.get('baseUrl'),
@@ -147,23 +161,19 @@
            return new Promise((resolve, reject) => {
               if (!this.pageState) {
                  this.$refs.uForm.validate().then(res => {
                        resolve(true)
                     })
                     .catch(errors => {
                        reject(false)
                        uni.$u.toast('校验失败')
                     })
                     resolve(true)
                  }).catch(errors => {
                     reject(false)
                     uni.$u.toast('校验失败')
                  })
               } else {
                  resolve(true)
               }
            });
            })
         }
      },
   }
</script>
<style scoped lang="scss">
   /deep/.u-line {
      margin: 19.23rpx 0px !important;
@@ -172,17 +182,16 @@
   .workOrderDetail {
      border: 1px solid #bbb;
      border-radius: 5px;
      min-height: 288.46rpx;
      margin: 19.23rpx;
      padding: 19.23rpx;
      color: #101010;
      font-weight: 700;
      font-size: 26.92rpx;
      font-size: 30.77rpx;
      .headerCont {
         display: flex;
         justify-content: space-between;
         font-size: 15px;
         font-size: 30.77rpx;
      }
      .mainContent {
@@ -190,7 +199,8 @@
         font-weight: 500;
         .rowTip {
            padding: 8px 0;
            display: flex;
            padding: 5px 0;
            border-bottom: 1px dashed #bbb;
            .wholeLine {
@@ -199,12 +209,15 @@
               align-items: center;
               .rowTipContenetLabel {
                  min-width: 125rpx;
                  min-width: 144.23rpx;
                  font-size: 28.85rpx;
                  text-align: left;
               }
            }
            .rowTipContenetAll {
               width: calc(100% - 125rpx; );
               .rowTipContenetAll {
                  font-size: 28.85rpx;
                  width: calc(100% - 144.23rpx);
               }
            }
            .rowTipContenet {
@@ -226,38 +239,5 @@
            text-align: right !important;
         }
      }
   }
   .formItemContent {
      /deep/.u-form-item {
         padding: 8px 0;
         border-bottom: 1px dashed #bbb;
      }
      /deep/.u-form-item__body,
      /deep/.u-textarea {
         padding: 0 !important;
      }
      /deep/.u-form-item__body__left__content__label,
      /deep/.u-radio__text {
         font-size: 13px !important;
      }
   }
   .fileBox {
      display: -webkit-box;
      display: -webkit-flex;
      display: flex;
      position: relative;
      width: 100%;
      height: 100%;
      -webkit-box-orient: vertical;
      -webkit-box-direction: normal;
      -webkit-flex-direction: column;
      flex-direction: column;
      -webkit-box-pack: center;
      -webkit-justify-content: center;
      justify-content: center;
   }
</style>