spring
2025-02-26 36ca85c695cc3d6a6a645aca796d36b718249aee
修改高低温、功率试验单位
已修改3个文件
147 ■■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/humidity.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/power-capacity.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -2505,20 +2505,30 @@
      let isHaveAsk = this.totalArr.filter(
        a => (a.ask === null || a.ask == "") && a.state == 1
      );
      let isHaveAsk0 = this.totalArr.filter(
        a =>
          (a.ask == "/" ||
      let arr = []
      sampleList.forEach(m => {
        m.insProduct.forEach(a => {
          arr.push(a)
        })
      })
      let isHaveAsk0 = arr.filter(
        a => {
          if (a.ask) {
            a.ask = String(a.ask)
          }
          return (a.ask == "/" ||
            a.ask == "-" ||
            a.ask == "——" ||
            (/\d/.test(a.ask) &&
              ((a.ask && a.ask.includes("<")) ||
              a.ask && typeof a.ask === 'string' && a.ask.includes("<") ||
                a.ask.includes(">") ||
                a.ask.includes("=") ||
                a.ask.includes(">") ||
                a.ask.includes("<") ||
                a.ask.includes("≥") ||
                a.ask.includes("≤")))) &&
              a.ask.includes("≤") || a.ask.includes(":"))) &&
          a.state == 1
        }
      );
      let stateArr = this.totalArr.filter(a => a.state == 1);
      if (isHaveAsk.length > 0) {
src/components/do/b1-inspect-order-plan/humidity.vue
@@ -3,7 +3,10 @@
    <table border="1" cellpadding="10" class="thermal-table" style="margin-bottom: 20px;">
      <template v-for="(item,index) in insProductList">
        <tr>
          <td style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;" :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?7:6">{{ item.inspectionItemSubclass }}</td>
          <td style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;"
            :colspan="insProductList && insProductList.find(m => m.list0.length == 6) ? 7 : 6">{{
              item.inspectionItemSubclass }}
          </td>
        </tr>
        <tr>
          <td style="font-size: 16px;background-color: #F0F1F5;">规格型号</td>
@@ -12,12 +15,9 @@
          <td>{{item.methodS}}</td>
          <td style="font-size: 16px;background-color: #F0F1F5;">设备编号</td>
          <td :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?2:1">
            <el-select v-model="item.equipValue" placeholder="请选择" size="small" :disabled="state>1" @focus="methodFocus(item)" @change="m=>handleEquip(m,item)">
              <el-option
                v-for="item in equipOptions"
                :key="item.value"
                :label="item.value"
                :value="item.value">
            <el-select v-model="item.equipValue" placeholder="请选择" size="small" :disabled="state > 1"
              @focus="methodFocus(item)" @change="m => handleEquip(m, item)">
              <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value">
              </el-option>
            </el-select>
          </td>
@@ -26,72 +26,80 @@
          <td style="font-size: 16px;background-color: #F0F1F5;">试验要求</td>
          <td colspan="3" style="text-align: left;">{{item.tell}}</td>
          <td style="font-size: 16px;background-color: #F0F1F5;">设备名称</td>
          <td :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?2:1">{{ item.equipName }}</td>
          <td :colspan="insProductList && insProductList.find(m => m.list0.length == 6) ? 2 : 1">{{ item.equipName }}
          </td>
        </tr>
        <tr>
          <td style="font-size: 16px;background-color: #F0F1F5;">实验前样品检查</td>
          <td :colspan="item.beforeCheck=='破损'?1:(insProductList&&insProductList.find(m=>m.list0.length==6)?3:2)">
            <el-select v-model="item.beforeCheck" placeholder="请选择" size="small" :disabled="state>1" @change="save(item)">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
          <td
            :colspan="item.beforeCheck == '破损' ? 1 : (insProductList && insProductList.find(m => m.list0.length == 6) ? 3 : 2)">
            <el-select v-model="item.beforeCheck" placeholder="请选择" size="small" :disabled="state > 1"
              @change="save(item)">
              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </td>
          <td v-if="item.beforeCheck=='破损'">
            <el-input v-model="item.beforeNote" placeholder="破损说明" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea"
              :rows="3"></el-input>
            <el-input v-model="item.beforeNote" placeholder="破损说明" size="small" :disabled="state > 1"
              style="display: inline-block;width: 100%;" @change="save(item)" type="textarea" :rows="3"></el-input>
          </td>
          <td style="font-size: 16px;background-color: #F0F1F5;">实验后样品检查</td>
          <td :colspan="item.afterCheck=='破损'?1:2">
            <el-select v-model="item.afterCheck" placeholder="请选择" size="small" :disabled="state>1" @change="save(item)">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            <el-select v-model="item.afterCheck" placeholder="请选择" size="small" :disabled="state > 1"
              @change="save(item)">
              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </td>
          <td v-if="item.afterCheck=='破损'" :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?2:1">
            <el-input v-model="item.afterNote" placeholder="破损说明" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea"
              :rows="3"></el-input>
          <td v-if="item.afterCheck == '破损'"
            :colspan="insProductList && insProductList.find(m => m.list0.length == 6) ? 2 : 1">
            <el-input v-model="item.afterNote" placeholder="破损说明" size="small" :disabled="state > 1"
              style="display: inline-block;width: 100%;" @change="save(item)" type="textarea" :rows="3"></el-input>
          </td>
        </tr>
        <tr v-if="item.inspectionItemSubclass&&item.inspectionItemSubclass.includes('低')">
          <td>电调结果</td>
          <td v-for="(m,i) in item.list0" :key="i">
            <el-input v-model="m.value" :placeholder="'第'+(i+1)+'次'" size="small" :disabled="state>1" style="display: inline-block;width: 50%;" @change="save(item)"></el-input>
            <el-button icon="el-icon-minus" circle size="mini" type="danger"
           :disabled="state>1" style="margin: 5px;display: inline-block;" @click="deleteList(item.list0,i,m)" ></el-button>
            <el-button icon="el-icon-plus" circle size="mini" type="primary" :disabled="state>1" style="margin: 5px;display: inline-block;" v-if="i==item.list0.length-1&&i<5" @click="addList(item.list0,item.list0.length-1)"></el-button>
            <el-input v-model="m.value" :placeholder="'第' + (i + 1) + '次'" size="small" :disabled="state > 1"
              style="display: inline-block;width: 50%;" @change="save(item)"></el-input>
            <el-button icon="el-icon-minus" circle size="mini" type="danger" :disabled="state > 1"
              style="margin: 5px;display: inline-block;" @click="deleteList(item.list0, i, m)"></el-button>
            <el-button icon="el-icon-plus" circle size="mini" type="primary" :disabled="state > 1"
              style="margin: 5px;display: inline-block;" v-if="i == item.list0.length - 1 && i < 5"
              @click="addList(item.list0, item.list0.length - 1)"></el-button>
          </td>
        </tr>
        <tr style="background-color: #F0F1F5;">
          <td colspan="2">时间</td>
          <td colspan="1">温度</td>
          <td colspan="1">湿度</td>
          <td colspan="1">时间</td>
          <td colspan="1">温度(℃)</td>
          <td colspan="1">湿度(%)</td>
          <td colspan="1">温度变化速率(℃/min)</td>
          <td  :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?3:2">操作</td>
        </tr>
        <tr v-for="(m,i) in item.list" :key="i+item.id">
          <td colspan="2">
          <el-date-picker
          v-model="m.time"
          placeholder="时间" size="small" editable format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" style="width: 100%;" @change="save(item)" :disabled="state>1" type="datetime">
          <td colspan="1">
            <el-date-picker v-model="m.time" placeholder="时间" size="small" editable format="yyyy-MM-dd HH:mm"
              value-format="yyyy-MM-dd HH:mm" style="width: 100%;" @change="save(item)" :disabled="state > 1"
              type="datetime">
          </el-date-picker>
          </td>
          <td colspan="1">
            <el-input v-model="m.temperature" placeholder="温度" size="small" @change    ="a=>handleReplace(m,'℃','temperature',item)" :disabled="state>1"></el-input>
            <el-input v-model="m.temperature" placeholder="温度" size="small"
              @change="a => handleReplace(m, '℃', 'temperature', item)" :disabled="state > 1"></el-input>
          </td>
          <td colspan="1">
            <el-input v-model="m.humidity" placeholder="湿度" size="small" @change    ="a=>handleReplace(m,'%rh','humidity',item)" :disabled="state>1"></el-input>
            <el-input v-model="m.humidity" placeholder="湿度" size="small"
              @change="a => handleReplace(m, '%', 'humidity', item)" :disabled="state > 1"></el-input>
          </td>
          <td colspan="1">
            <el-input v-model="m.change" placeholder="温度变化速率" size="small"
              @change="a => handleReplace(m, '℃/min', 'change', item)" :disabled="state > 1"></el-input>
          </td>
          <td  :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?3:2">
            <el-button icon="el-icon-minus" circle size="mini" type="danger"
            @click="deleteList(item.list,i,item)" :disabled="state>1" style="margin: 5px;"></el-button>
            <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(item.list,i,'out')" :disabled="state>1" style="margin: 5px;"></el-button>
            <el-button icon="el-icon-minus" circle size="mini" type="danger" @click="deleteList(item.list, i, item)"
              :disabled="state > 1" style="margin: 5px;"></el-button>
            <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(item.list, i, 'out')"
              :disabled="state > 1" style="margin: 5px;"></el-button>
          </td>
        </tr>
      </template>
@@ -137,6 +145,7 @@
            this.$set(m,'time','')
            this.$set(m,'temperature','')
            this.$set(m,'humidity','')
            this.$set(m, 'change', '')
          })
          this.$set(item,'equipValue','')
          this.$set(item,'equipName','')
@@ -149,6 +158,7 @@
          this.$set(item,'list',JSON.parse(item.insProductResult.insValue))
          item.list.forEach(m=>{
            this.$set(m,'time',m.time)
            this.$set(m, 'temperature', m.temperature)
            this.$set(m,'temperature',m.temperature)
            this.$set(m,'humidity',m.humidity)
          })
@@ -190,7 +200,8 @@
        arr.splice(i+1,0,{
          time:'',
          temperature:'',
          humidity:''
          humidity: '',
          change: ''
        })
      }
    },
@@ -258,7 +269,8 @@
      headers: {
        'Content-Type': 'application/json'
      },
      noQs:true}).then(res => {
        noQs: true
      }).then(res => {
        if (res.code === 201) {
          this.$message.error('保存失败')
          return
@@ -278,6 +290,7 @@
    margin: 5px 5px 0;
    table-layout: fixed;
  }
  .thermal-table td {
    min-width: 70px;
    text-align: center;
@@ -286,10 +299,12 @@
    white-space: normal;
    padding: 5px;
  }
  .thermal-table .el-input{
    display: flex;
    align-items: center;
  }
  >>>.el-input__inner {
    text-align: center;
  }
src/components/do/b1-inspect-order-plan/power-capacity.vue
@@ -2,7 +2,8 @@
  <div>
    <table border="1" cellpadding="10" class="thermal-table" style="margin-bottom: 20px;">
      <tr>
        <td style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;" colspan="6">{{ currentInfo.inspectionItemSubclass }}</td>
        <td style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;"
          colspan="6">{{ currentInfo.inspectionItemSubclass }}</td>
      </tr>
      <tr>
        <td style="font-size: 16px;background-color: #F0F1F5;">规格型号</td>
@@ -11,12 +12,9 @@
        <td>{{currentInfo.methodS}}</td>
        <td style="font-size: 16px;background-color: #F0F1F5;">设备编号</td>
        <td>
          <el-select v-model="currentInfo.equipValue" placeholder="请选择" size="small" :disabled="state>1" @focus="methodFocus(item)" @change="m=>handleEquip(m,currentInfo)">
            <el-option
              v-for="item in equipOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value">
          <el-select v-model="currentInfo.equipValue" placeholder="请选择" size="small" :disabled="state > 1"
            @focus="methodFocus(item)" @change="m => handleEquip(m, currentInfo)">
            <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </td>
@@ -35,10 +33,12 @@
      <tr v-for="(item,index) in currentInfo.list" :key="index">
        <td>{{index+1}}</td>
        <td colspan="3">
          <el-input v-model="item.power" placeholder="" size="small" @change="m=>save(currentInfo)" :disabled="state>1"></el-input>
          <el-input v-model="item.power" placeholder="" size="small" @change="m => save(currentInfo)"
            :disabled="state > 1"></el-input>
        </td>
        <td colspan="2">
          <el-input v-model="item.peakPower" placeholder="" size="small" @change="m=>save(currentInfo)" :disabled="state>1"></el-input>
          <el-input v-model="item.peakPower" placeholder="" size="small" @change="m => save(currentInfo)"
            :disabled="state > 1"></el-input>
        </td>
      </tr>
    </table>
@@ -126,7 +126,8 @@
      headers: {
        'Content-Type': 'application/json'
      },
      noQs:true}).then(res => {
        noQs: true
      }).then(res => {
        if (res.code === 201) {
          this.$message.error('保存失败')
          return
@@ -146,6 +147,7 @@
    margin: 5px 5px 0;
    table-layout: fixed;
  }
  .thermal-table td {
    min-width: 70px;
    text-align: center;
@@ -154,10 +156,12 @@
    white-space: normal;
    padding: 5px;
  }
  .thermal-table .el-input{
    display: flex;
    align-items: center;
  }
  >>>.el-input__inner {
    text-align: center;
  }