licp
2024-05-23 5b51c0fbc5e39a2303e32059c1ecc86d04b88d72
src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -28,16 +28,16 @@
            </el-col>
              <el-col :span="6">
                <el-form-item label="零件号" prop="code">
                <el-input v-model="dataForm.code">
                <el-input v-model="dataForm.code" :disabled="dataForm&&dataForm.id!==null&&dataForm.id!==''">
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    :disabled="(resultVal!=null && resultVal!='')"
                    :disabled="dataForm&&dataForm.id!==null&&dataForm.id!==''"
                    @click="queryCode"></el-button>
                    <el-button
                    slot="append"
                    icon="el-icon-full-screen"
                    :disabled="(resultVal!=null && resultVal!='')"
                    :disabled="dataForm&&dataForm.id!==null&&dataForm.id!==''"
                    @click="Turnonthecamera"></el-button>
                </el-input>
                </el-form-item>
@@ -86,33 +86,40 @@
                </el-col>
                <el-col :span="6">
                  <el-form-item label="数量" prop="number">
                      <el-input v-model="dataForm.number" :disabled="(resultVal!=null && resultVal!='')" />
                      <el-input v-model="dataForm.number" :disabled="dataForm&&dataForm.id!==null&&dataForm.id!==''" />
                  </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <el-form-item label="报检日期" prop="createTime">
                    <el-form-item label="报检日期" prop="startTime">
                        <el-date-picker
                        :disabled="dataForm.id!=null"
                        v-model="dataForm.createTime"
                        disabled
                        v-model="dataForm.startTime"
                        type="datetime"
                        format="yyyy-MM-dd HH:mm:ss"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        placeholder="报检日期">
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="报检人" prop="createUser" v-if="dataForm.id!=null">
                <el-col :span="6" v-if="dataForm.id!=null">
                  <el-form-item label="报检人" prop="createUser" >
                        <el-input v-model="dataForm.createUser" disabled />
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item  prop="projectName" label="项目名称" v-if="dataForm.id!=null">
                <el-col :span="6" v-if="dataForm.id!=null">
                  <el-form-item  prop="projectName" label="项目名称" >
                    <el-tooltip :disabled="dataForm.projectName==null" :content="dataForm.projectName">
                      <el-input v-model="dataForm.projectName" disabled ></el-input>
                    </el-tooltip>
                  </el-form-item>
              </el-col>
              <el-col :span="6">
                    <el-form-item label="备注" prop="remark">
                        <el-input :disabled="dataForm&&dataForm.id!==null&&dataForm.id!==''" v-model="dataForm.remark" />
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
      </div>
@@ -122,6 +129,9 @@
            <el-row style="width:100%;z-index: 10;height:50px;" v-if="resultVal==null">
                <el-col :span="12"></el-col>
                <el-col :span="12" style="text-align: right;">
                    <el-button v-if="dataForm.id&&resultVal==null" size="small"
                    type="primary"
                    @click="saveTable()">保存</el-button>
                  <el-button v-if="dataForm.id==null" size="small" @click="clickAddLine()">添加检验项目</el-button>
                  <el-button class="pad-addcol-btn" v-if="resultVal==null || dataForm.id==null" size="small" @click="addTeatValueColumn()">添加检测值列</el-button>
                  <el-button v-if="resultVal==null || dataForm.id==null" size="small" @click="delTeatValueColumn()">删除检测值列</el-button>
@@ -147,21 +157,30 @@
                      </el-table-column>
                      <el-table-column prop="father" label="检验项目" width="160">
                        <template slot-scope="scope">
                          <el-input v-if="scope.row.children" style="width:80%" :disabled="dataForm.id!=null" v-model="scope.row.father" placeholder="请输入检验项目"></el-input>
                          <el-input v-if="scope.row.children" style="width:80%" :disabled="dataForm.id!=null&&(resultVal!=null && resultVal!='')" v-model="scope.row.father" placeholder="请输入检验项目"
                          :ref="'inspectProject'+scope.$index"
                          :id="'inspectProject'+scope.$index"
                          @keyup.native="moveFocus($event, scope.$index, 'inspectProject')"></el-input>
                        </template>
                      </el-table-column>
                      <el-table-column prop="name" label="项目" width="160">
                        <template slot-scope="scope">
                        <div v-if="!scope.row.children">
                          <el-input class="inline-input" :disabled="dataForm.id!=null" v-model="scope.row.name"
                            placeholder="请输入项目名称"></el-input>
                          <el-input class="inline-input" :disabled="dataForm.id!=null&&(resultVal!=null && resultVal!='')" v-model="scope.row.name"
                            placeholder="请输入项目名称"
                            :ref="'project'+scope.$index"
                            :id="'project'+scope.$index"
                             @keyup.native="moveFocus($event, scope.$index, 'project')"></el-input>
                      </div>
                          </template>
                      </el-table-column>
                      <el-table-column prop="unit" label="单位" width="160">
                        <template slot-scope="scope">
                        <div v-if="!scope.row.children">
                          <el-input :disabled="dataForm.id != null" v-model="scope.row.unit" placeholder="请输入单位"></el-input>
                          <el-input :disabled="dataForm.id!=null&&(resultVal!=null && resultVal!='')" v-model="scope.row.unit" placeholder="请输入单位"
                          :ref="'unit'+scope.$index"
                          :id="'unit'+scope.$index"
                          @keyup.native="moveFocus($event, scope.$index, 'unit')"></el-input>
                        </div>
                        </template>
@@ -169,66 +188,38 @@
                      <el-table-column prop="required" label="标准值" width="160">
                        <template slot-scope="scope">
                          <div v-if="!scope.row.children">
                          <el-input :disabled="dataForm.id != null" v-model="scope.row.required"
                            placeholder="请输入标准值"></el-input>
                          <el-input :disabled="dataForm.id!=null&&(resultVal!=null && resultVal!='')" v-model="scope.row.required"
                            placeholder="请输入标准值"
                            :ref="'standard'+scope.$index"
                            :id="'standard'+scope.$index"
                             @keyup.native="moveFocus($event, scope.$index, 'standard')"></el-input>
                          </div>
                        </template>
                      </el-table-column>
                      <el-table-column prop="testValue" label="检测值" min-width="160" v-for="(item,index) in empiricalValueAdd" :key="index">
                        <template slot-scope="scope">
                          <div v-if="!scope.row.children">
                            <el-select v-model="scope.row.testValueList[index]"
                            ref="testValueSelect"
                            clearable
                            filterable
                            allow-create
                            default-first-option
                            @change="changeState(scope.row)"
                            @blur="onTypeBlur($event)">
                                <el-option label="是" value="是"></el-option>
                                <el-option label="否" value="否"></el-option>
                            </el-select>
                            <!-- <testValueSelect
                            @input1="changeState(scope.row)"
                            :options="[{
                                label:'是',
                                value: '是'
                            },{
                                label:'否',
                                value: '否'
                            }]"
                            v-model="scope.row.testValueList[index]"
                            ></testValueSelect> -->
                            <!-- <div style="display:flex">
                                <el-input
                                ref="testValueInput"
                                clearable
                                @blur.stop="changeState(scope.row)"
                                v-model="scope.row.testValueList[index]"
                                placeholder="请输入检测值"/>
                                <el-dropdown @command="handleCommand" class="dropdown" trigger="click">
                                    <i class="el-icon-arrow-down el-icon--right"></i>
                                    <el-dropdown-menu slot="dropdown">
                                        <el-dropdown-item :command="{'index':index,'use':'是',...scope.row}">是</el-dropdown-item>
                                        <el-dropdown-item :command="{'index':index,'use':'否',...scope.row}">否</el-dropdown-item>
                                    </el-dropdown-menu>
                                </el-dropdown>
                            </div> -->
                            <!-- :disabled="scope.row.deviceId == null ||  (dataForm.id!=null&&(resultVal!=null && resultVal!=''))" -->
                            <!-- @blur.stop="changeState(scope.row)" -->
                            <!-- <el-autocomplete clearable
                            ref="testValueInput"
                            @input="testChange(scope.row)"
                            @blur="changeState(scope.row)"
                            v-model="scope.row.testValueList[index]"
                            :fetch-suggestions="querySearch"
                            placeholder="请输入或选择检测值" >
                            <template slot-scope="{ item }">
                                <div>{{ item.value }}</div>
                            </template>
                            </el-autocomplete> -->
                          <!-- <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="请先选择设备!" placement="top-start">
                            </el-tooltip> -->
                                <!-- @input="$nextTick(()=>{checkTestValues(scope.row)})" -->
                                <!-- @blur.capture.native="changeState(scope.row)" -->
                            <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="请先选择设备!" placement="top-start">
                                <el-autocomplete clearable
                                cache="false"
                                @blur="checkTestValues(scope.row,'blur',$event)"
                                @select="checkTestValues(scope.row,'select',$event)"
                                :disabled="scope.row.deviceId == null ||  (dataForm.id!=null&&(resultVal!=null && resultVal!=''))"
                                v-model="scope.row.testValueList[index]"
                                :fetch-suggestions="querySearch"
                                placeholder="请输入或选择检测值"
                                :ref="`detectionValue${index}`+scope.$index"
                                :id="`detectionValue${index}`+scope.$index"
                                @keyup.native="moveFocus($event, scope.$index, `detectionValue${index}`)"
                                popper-class="no-keyboard-events">
                                <template slot-scope="{ item }">
                                    <div>{{ item.value }}</div>
                                </template>
                                </el-autocomplete>
                            </el-tooltip>
                          </div>
                        </template>
                      </el-table-column>
@@ -252,7 +243,10 @@
                      <el-table-column prop="note" label="检验描述" width="160" >
                        <template slot-scope="scope">
                          <div v-if="!scope.row.children">
                            <el-input @blur="changeState(scope.row)" :disabled="scope.row.deviceId == null ||  (dataForm.id!=null&&(resultVal!=null && resultVal!=''))" v-model="scope.row.note" placeholder="检验描述"></el-input>
                            <el-input @blur="checkTestValues(scope.row,'blur',$event)" :disabled="scope.row.deviceId == null ||  (dataForm.id!=null&&(resultVal!=null && resultVal!=''))" v-model="scope.row.note" placeholder="检验描述"
                            :ref="`remark`+scope.$index"
                            :id="`remark`+scope.$index"
                            @keyup.native="moveFocus($event, scope.$index, `remark`)"></el-input>
                          </div>
                        </template>
                      </el-table-column>
@@ -290,7 +284,7 @@
                :disabled="dataForm.rawInsNo==null || (resultVal!=null && resultVal!='')"
                drag
                ref="upload"
                action="/mes/rawInsProduct/upload"
                action="/mes/attachment/upload"
                :auto-upload="true"
                :headers="headers"
                :before-upload="submitUpload"
@@ -305,7 +299,6 @@
                </div>
              </el-upload>
            </div>
            <el-table :data="processConfigFileTableData" height="260px">
              <el-table-column
                prop="rawInsNo"
@@ -435,19 +428,20 @@
  getObj,
  updateRawInsProduct,
  updateRawInspectsById,
  getProcessConfigFiles,
  downloadProcessConfigFile,
  deleteProcessConfigFile,
  updateRawInsProduct2,
  updateDeviceById, chooseIFS} from '@/api/quality/rawMaterial'
  import {
    getProcessConfigFiles,
    deleteProcessConfigFile,
    downloadProcessConfigFile
 } from '@/api/quality/attachment'
  import rawMaterialPartDialog from '@/views/common/rawMaterial-part'
  import { getStore } from '@/util/store'
  import qrCodeApp from '@/views/common/qrCodeApp'
  import testValueSelect from './testValue-select'
  export default {
  components:{
    rawMaterialPartDialog,
    qrCodeApp,
    testValueSelect
  },
    computed:{},
    data(){
@@ -459,8 +453,9 @@
              Authorization: 'Bearer ' + getStore({ name: 'access_token' })
            },
            paramData: {
              rawInsNo: '',
              lineNumber: ''
              no: '',
              lineNumber: '',
              type: 0
            },
            row: null,
            proIndex: 0,
@@ -492,6 +487,7 @@
                unit: '',
                number: '',
                supplier: '',
                remark:'',
                rawInsProducts: [{
                  deviceId: 0,
                  father:'',
@@ -513,9 +509,11 @@
            }],
            dataRule: {
              code:[{ required: true, message: '请扫描选择零件', trigger: 'blur' }],
              createTime: [{ required: true, message: '请选择报检日期', trigger: 'change' }]
            //   startTime: [{ required: true, message: '请选择报检日期', trigger: 'blur' }]
            },
            deviceList: [],
            keyfield:['inspectProject','project','unit','standard','remark'],
            keyfield0:['detectionValue0']
        }
    },
    beforeUpdate(){
@@ -539,6 +537,18 @@
          this.unqualifiedNum = null
        }
      },
      empiricalValueAdd(newVal){
        if(newVal!=this.keyfield0.length){
            if(newVal>this.keyfield0.length){
                this.keyfield0 = []
                for(let i=0;i<newVal;i++){
                    this.keyfield0.push('detectionValue'+i)
                }
            }else{
                this.keyfield0.splice(this.keyfield0.length-1,1);
            }
        }
      }
    },
    methods:{
      querySearch(queryString, cb){
@@ -556,8 +566,9 @@
      },
      getConfigFiles() {
        const param = {
          rawInsNo: this.dataForm.rawInsNo,
          lineNumber: this.dataForm.id
          no: this.dataForm.rawInsNo,
          lineNumber: this.dataForm.id,
          type: 0
        }
        getProcessConfigFiles(param).then((res) => {
          this.processConfigFileTableData = res.data.data
@@ -583,7 +594,7 @@
          })
      },
      submitUpload() {
        this.paramData.rawInsNo = this.dataForm.rawInsNo
        this.paramData.no = this.dataForm.rawInsNo
        this.paramData.lineNumber = this.dataForm.id
        this.progrecessFileLoading = true
      },
@@ -651,6 +662,7 @@
          this.dataForm.code = param.code
          this.dataForm.name = param.name
          this.dataForm.formTime = param.formTime
          this.dataForm.startTime = param.formTime
          this.dataForm.unit = param.unit
          this.dataForm.specs = param.specs
          this.dataForm.supplier = param.supplier
@@ -730,7 +742,9 @@
        });
      },
      addTeatValueColumn(){
        this.empiricalValueAdd = this.empiricalValueAdd + 1;
        this.$nextTick(()=>{
            this.empiricalValueAdd = this.empiricalValueAdd + 1;
        })
      },
      // 添加行
      clickAddLine(row,index) {
@@ -791,32 +805,35 @@
          if(this.list){
              this.list.forEach(e=>{
                  if(e.children){
                      e.children.forEach(i=>{
                      e.children.map(i=>{
                          if(i.testValueList.length>1){
                              let arr = i.testValue.split(",")
                              arr.splice((arr.length-1),1)
                              let obj = {
                                deviceId: i.deviceId,
                                rpId: i.rpId,
                                testValue: arr.join(","),
                                note: i.note
                              }
                              updateRawInsProduct(obj).then(res=>{
                                if(res.data.code === 0){
                                  this.init(this.dataForm.id)
                                }
                              })
                            i.testValueList = i.testValueList.splice(i.testValueList.length-1,1)
                            return i
                            //   let arr = i.testValue.split(",")
                            //   arr.splice((arr.length-1),1)
                            //   let obj = {
                            //     deviceId: i.deviceId,
                            //     rpId: i.rpId,
                            //     testValue: arr.join(","),
                            //     note: i.note
                            //   }
                            //   updateRawInsProduct(obj).then(res=>{
                            //     if(res.data.code === 0){
                            //       this.init(this.dataForm.id)
                            //     }
                            //   })
                          }
                      })
                  }
              })
              this.saveTable()
          }
      },
      delTeatValueColumn(){
        if (this.empiricalValueAdd - 1 > 0) {
          if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) {
            this.empiricalValueAdd = this.empiricalValueAdd - 1;
            this.changeRowResult()
            // this.changeRowResult()
            this.list.forEach(i => {
              if(i.children){
                i.children.forEach(ele=>{
@@ -824,6 +841,7 @@
                })
              }
            });
            this.saveTable()
          }
        }
      },
@@ -834,6 +852,8 @@
            this.dataForm.rawInsNo = data.rawInsNo
            this.dataForm.name = data.name
            this.dataForm.formTime = data.formTime
            this.dataForm.startTime = data.startTime
            this.dataForm.remark = data.remark
            this.dataForm.code = data.code
            this.dataForm.specs = data.specs
            this.dataForm.unit = data.runit
@@ -919,73 +939,62 @@
        console.log(e,e.target.tabIndex);
        console.log(e.target.value);
      },
      handleCommand(command){
        if(command.use && command.use==='是'){
            command.testValueList[command.index] = '是'
        }
        if(command.use && command.use==='否'){
            command.testValueList[command.index] = '否'
        }
        this.changeState(command)
      },
      onTypeBlur(event){
        const enterKeyEvent = new KeyboardEvent('keyup', {
            key: 'Enter',
            keyCode: 13,
            which: 13,
            bubbles: true
        });
        // 模拟在输入框上触发按键事件
        this.$refs.testValueSelect.dispatchEvent(enterKeyEvent);
      },
      changeState(row) {
        if(row.use){
            this.$refs.testValueSelect.$event.target.value = row.use
        }
          this.$nextTick(()=>{
            console.log("blur---",row.testValueList);
            return
            if(row){
                let isTrue = true
                for(var i=0;i<row.testValueList.length;i++){
                    let val = row.testValueList[i]
                    if(val != '' && val != null){
                        if(!['是','否'].includes(val)){
                            let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/
                            if(!reg.test(val)){
                                val = null
                              this.$message.error("请输入6位数字或选择是否")
                              isTrue = false
      checkTestValues(row,currentOption,event){
          if(row){
              let isTrue = true
              if(currentOption==='blur'){
                  let targetVal = event.target.value
                  if( (targetVal && ['是','否'].includes(targetVal)) || !targetVal){
                    isTrue = false
                  }else{
                      for(var i=0;i<row.testValueList.length;i++){
                          let val = row.testValueList[i]
                          if(val != '' && val != null){
                              if(!['是','否'].includes(val)){
                                  let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/
                                  if(!reg.test(val)){
                                    row.testValueList[i] = ''
                                    event.target.value = ''
                                    this.$message.error("请输入6位数字或选择是否")
                                    isTrue = false
                                }
                            }
                          }
                      }
                    }
                }
                if(!isTrue){
                    return
                }
            }
            console.log(row.testValueList);
            return
            if (row.rpId != null && row.rpId != '') {
                let val = row.testValueList.join(",")
                if (val === undefined || val === '' || val === null) {
                    return
                }
                let obj = {
                    deviceId: row.deviceId,
                    rpId: row.rpId,
                    testValue: val,
                    note: row.note
                }
              updateRawInsProduct(obj).then(res => {
                  if (res.data.code == 0) {
                      this.$message.success("更新成功")
                  } else {
                      this.$message.error("更新失败")
                  }
                  this.init(this.dataForm.id)
              })
              }
              if(!isTrue){
                  return
              }
            //   this.changeState(row)
          }
      },
      saveTable() {
        let rawInsProducts = [];
          this.$nextTick(()=>{
            this.list.forEach(item=>{
                if(item.children){
                    item.children.forEach(ele=>{
                        let obj = JSON.parse(JSON.stringify(ele))
                        obj.testValue = obj.testValueList.join(",")
                        obj.id = obj.rpId
                        delete obj.testValueList;
                        obj.name = ele.name;
                        obj.father = item.father;
                        obj.unit = ele.unit;
                        rawInsProducts.push(obj)
                    })
                }
            })
            if(rawInsProducts.length>0){
                updateRawInsProduct2(rawInsProducts).then(res => {
                    if (res.data.code == 0) {
                        this.$message.success("更新成功")
                    } else {
                        this.$message.error("更新失败")
                    }
                    this.init(this.dataForm.id)
                })
            }
        })
      },
@@ -1036,12 +1045,13 @@
                this.list.forEach(item=>{
                item.children.forEach(c=>{
                    c.testValue=c.testValueList.join(",")
                    c.required = c.required.replace(',',',').replace('(','(').replace(')',')')
                })
                })
                data.rawInsProducts = this.list
                addRawInspects(data).then(res=>{
                    this.$message.success("保存成功")
                    // this.$router.go(-1)
                    this.$router.go(-1)
                }).catch(error=>{
                this.$message.error(error)
                })
@@ -1056,11 +1066,135 @@
          this.deviceList = res.data.data
        })
      },
    },
      moveFocus(event, index, key) {
        console.log(key, index,key)
        let keyfield = this.insertArrayAt(this.keyfield,4,this.keyfield0);
        // enter键
        // if (event.keyCode === 13) { // 回车
        //     if (index === this.getLen() - 1 && key === keyfield[keyfield.length - 1]) { // 最后一行最后一个
        //         console.log('最后一行最后一个无法回车')
        //     return
        //     }
        //     this.$nextTick(() => {
        //         event.target.blur()
        //     })
        //     if (key === keyfield[keyfield.length - 1]) { // 当前行最后一个,跳转下一行第一个
        //     } else { // 跳转下一个
        //     const nextkeyindex = keyfield.findIndex(k => k === key) + 1
        //     this.$nextTick(() => {
        //         document.getElementById(keyfield[nextkeyindex] + index).focus()
        //     })
        //     }
        // }
        // 向上 =38
        if (event.keyCode === 38) {
            console.log('向上')
            if (index === 0) { // 第一行
            console.log('第一行无法向上')
            return
            }
            document.getElementById(key + index).blur()
            if(key.includes('detectionValue')){
                this.$refs[key + index][0].activated = false;
            }
            let i = 0;
            while (true){
                let dom = document.getElementById(key + (index - 1-i))
                if(dom){
                    dom.focus()
                    return
                }else if((index-1-i)==0){
                    return
                }
                i++
            }
        }
        // 下 = 40
        if (event.keyCode === 40) {
            console.log('向下')
            if (index === this.getLen() - 1) { // 最后一行
            console.log('最后一行无法向下')
            return
            }
            document.getElementById(key + index).blur()
            if(key.includes('detectionValue')){
                this.$refs[key + index][0].activated = false;
            }
            this.$nextTick(() => {
            let i = 0;
            while (true){
                let dom = document.getElementById(key + (index + 1+i))
                console.log(dom,key + (index + 1+i))
                if(dom){
                    dom.focus()
                    return
                }else if((index+1+i)==this.getLen() - 1){
                    return
                }
                i++
            }
            })
        }
        // 左 = 37
        if (event.keyCode === 37) {
            console.log('向左')
            if (index === 0 && key === keyfield[0]) { // 第一行第一个
            console.log('第一行第一个无法向左')
            return
            }
            document.getElementById(key + index).blur()
            const prevkeyindex = keyfield.findIndex(k => k === key) - 1
            this.$nextTick(() => {
                let dom = document.getElementById(keyfield[prevkeyindex] + index)
                if(dom){
                    dom.focus()
                }
            })
        }
        // 右 = 39
        if (event.keyCode === 39) {
            console.log('向右')
            if (index === this.getLen() - 1 && key === keyfield[keyfield.length - 1]) { // 最后一行最后一个
            console.log('最后一行最后一个无法向右')
            return
            }
            document.getElementById(key + index).blur()
            const nextkeyindex = keyfield.findIndex(k => k === key) + 1
            this.$nextTick(() => {
                let dom = document.getElementById(keyfield[nextkeyindex] + index)
                if(dom){
                    dom.focus()
                }
            })
        }
        },
      insertArrayAt(arr1, index, arr2) {
        return arr1.slice(0, index).concat(arr2, arr1.slice(index));
        },
        getLen(){
        let arr = []
        this.list.forEach(item => {
            arr.push(item)
            item.children.forEach(child => {
                arr.push(child)
            })
        })
        return arr.length
      }
      }
}
</script>
<style>
.no-keyboard-events * {
  pointer-events: none;
  /* 其他需要的样式 */
}
.rawMaterial-detail {
  width: 100%;
  height: 530px;