licp
2024-09-24 1a7bb722b745a421b12590a363c88684901249c9
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -717,7 +717,7 @@
      }"
      v-if="state==1&&fileAdd"
      :on-success="handleSuccessUp" :show-file-list="false"
        accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar,.csv' :headers="headers" :on-change="beforeUpload"
        accept='.jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv' :headers="headers" :on-change="beforeUpload"
        style="width: 80px !important;"
        :on-error="onError" ref='upload'>
        <el-button size="small" type="primary" v-if="state==1">附件上传</el-button></el-upload>
@@ -855,6 +855,13 @@
        <el-button type="primary" @click="submit0">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="文件预览"
      :visible.sync="lookFileVisible"
      width="60%" fullscreen>
      <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url"
      :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/>
    </el-dialog>
  </div>
</template>
@@ -865,16 +872,19 @@
  import excelFunction from '../../../util/excelFountion'
  import CircuitParameters1 from './circuit-parameters1.vue'
  import CircuitParameters2 from './circuit-parameters2.vue'
  import filePreview from '../../tool/file-preview.vue'
  export default {
    props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'],
    components: {
      ValueTable,
      Circuit,
      CircuitParameters1,
      CircuitParameters2
      CircuitParameters2,
      filePreview
    },
    data() {
      return {
        lookFileVisible:false,//预览文件
        experimentDia:false,
        experimentInfo:{
          note:'',
@@ -944,6 +954,12 @@
            disabFun: (row, index) => {
                        return this.state!=1
                     }
               },
          {
                  id: '1',
                  font: '预览',
                  type: 'text',
                  method: 'lookFile',
               }
          ],
          isPage: false,
@@ -1054,7 +1070,8 @@
        otherForm:{
          temperature:'',
          humidity:''
        }
        },
        currentFile:{},//当前文件
      }
    },
    // 用于上传文件的信息
@@ -3596,6 +3613,15 @@
        await this.handleChangeSample(this.currentSample)
        this.currentNum++
        this.tableLoading = false
      },
      lookFile(row){
        this.currentFile = row;
        if(row.type==1){
          this.currentFile.url = this.javaApi+'/img/'+row.fileUrl
        }else{
          this.currentFile.url = this.javaApi+'/word/'+row.fileUrl
        }
        this.lookFileVisible = true
      }
    }
  }