value
2024-05-28 24a87c59b5a1362df4d2a6d975fe911c6777004d
Merge remote-tracking branch 'origin/master'

# Conflicts:
# src/components/do/b1-ins-order/fiberoptic-config.vue
已修改3个文件
180 ■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/fiberoptic-config.vue 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -670,7 +670,7 @@
        orderType: [],
        filters: [],
        formType: [],
        configShow: false
        configShow: false,
      }
    },
    watch: {
src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -65,26 +65,34 @@
        <el-col :span="15">
          <div class="grid-content">
            <h5>检测项信息</h5>
            <el-table ref="table1" :data="tableData" tooltip-effect="dark" style="width: 100%" height="282px"
              size="small" @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="55">
            <el-table ref="table1" :data="detectionItems" tooltip-effect="dark" style="width: 100%"
            :row-class-name="tableRowClassName"
            :header-cell-class-name="setClassName"
            height="283px"
              size="small" @selection-change="handleSelectionChange2"
              @select-all="handleAll"
              @select="upProductSelect"
              >
              <el-table-column type="selection" width="55"
              :selectable="()=>(currentDetectionItems||this.multiFiberList.length > 0)">
              </el-table-column>
              <el-table-column label="实验室" show-overflow-tooltip>
                <template slot-scope="scope">{{ scope.row.date }}</template>
              <el-table-column label="实验室" show-overflow-tooltip prop="sonLaboratory" ></el-table-column>
              <el-table-column prop="inspectionItem" label="检验项" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="name" label="检测项目" show-overflow-tooltip>
              <el-table-column prop="inspectionItemSubclass" label="检验项子项" show-overflow-tooltip width="100px">
              </el-table-column>
              <el-table-column prop="address" label="试验方法" show-overflow-tooltip>
              <el-table-column prop="methodS" label="试验方法" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="address" label="单价" width="70" show-overflow-tooltip>
              <el-table-column prop="price" label="单价" width="70" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="address" label="单位" width="70" show-overflow-tooltip>
              <el-table-column prop="unit" label="单位" width="70" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="address" label="预计时间" show-overflow-tooltip>
              <el-table-column prop="manDay" label="预计时间" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="address" label="检测标准" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="address" label="检测要求" show-overflow-tooltip>
              <el-table-column prop="ask" label="检测要求" show-overflow-tooltip width="200px">
                <template slot-scope="scope">
                  <el-input v-model="scope.row.ask" placeholder="请输入" size="small"></el-input>
                </template>
              </el-table-column>
            </el-table>
          </div>
@@ -151,14 +159,15 @@
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="mireStandard" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="mireModel===null" @focus="selectsStandardMethodByFLSSM()"
                  @change="(value)=>methodChange(value)">
                  @change="(value)=>methodChange(value)" :loading="mireStandardLoading">
                  <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id">
                  </el-option>
                </el-select>
              </div>
            </div>
            <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px"
              size="small" @selection-change="handleSelectionChange">
              size="small" @selection-change="handleSelectionChange4"
              @row-click="rowClickFiber">
              <el-table-column type="selection" width="55">
              </el-table-column>
              <el-table-column prop="bushColor" label="管套色标" width="90" align="center">
@@ -218,7 +227,36 @@
        productList2: [],
        fiberList: [],
        fibersList: [],
        selectFibers: []
        selectFibers: [],
        detectionItems:[],
        currentDetectionItems:null,
        mireStandardLoading:false,
        multiFiberList:[]
      }
    },
    computed: {
      isAllDisabled() {
        return this.multiFiberList.length > 0||this.currentDetectionItems
      },
    },
    watch: {
      mireModel(val1,val0) {
        if(val1!=val0){
          this.mireStandards = []
          this.fiberList = []
          this.multiFiberList = []
          this.detectionItems = []
          this.currentDetectionItems = null;
          this.mireStandard = null;
        }
      },
      mireStandard(val1,val0) {
        if(val1!=val0){
          this.fiberList = []
          this.multiFiberList = []
          this.detectionItems = []
          this.currentDetectionItems = null;
        }
      }
    },
    mounted() {
@@ -242,6 +280,15 @@
      },
      handleSelectionChange1(val) {
        this.selectBushing = val
        this.mireModel = null
      },
      handleSelectionChange2(val){},
      handleSelectionChange3(val){
        this.detectionItems = this.HaveJson(this.productList)
      },
      handleSelectionChange4(val){
        this.multiFiberList = val
        this.detectionItems = this.HaveJson(this.productList)
      },
      outConfig() {
        this.$parent.configShow = false
@@ -319,9 +366,11 @@
      },
      selectsStandardMethodByFLSSM() {
        this.mireStandards = []
        this.mireStandardLoading = true
        this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
          tree: '中天科技检测中心 - 通信产品实验室 - 光纤 - ' + this.mireModel
        }).then(res => {
          this.mireStandardLoading = false
          this.mireStandards = res.data.standardMethodList
        })
      },
@@ -419,7 +468,7 @@
                color: colors2[i].label,
                model: model,
                standard: standard,
                product: this.productList
                productList:this.HaveJson(this.productList),
              }
              a.fiber.push(fiber)
              this.fiberList.push(fiber)
@@ -450,6 +499,92 @@
            this.fibersList.push(fibers)
          }
        })
      },
      rowClickFiber(row, column, event){
        this.currentDetectionItems = row
        this.detectionItems = this.HaveJson(this.productList)
      },
      tableRowClassName({
        row,
        rowIndex
      }) {
        if (row.state === 0) {
          return 'warning-row';
        }
        return '';
      },
      handleAll(e) {
        if (e.length > 0) {
          this.detectionItems.map(m => {
            m.state = 1
            return m
          })
        } else {
          this.detectionItems.map(m => {
            m.state = 0
            return m
          })
        }
        if (e.length > 0) {
          if(this.multiFiberList.length > 0){
            this.multiFiberList.map(item => {
              item.productList.map(m=>{
                m.state = 1;
                return m;
              })
              return item
            })
          }else{
          this.currentDetectionItems.productList.map(m=>{
              m.state = 1;
              return m;
            })
          }
        } else {
          if(this.multiFiberList.length > 0){
            this.multiFiberList.map(item => {
              item.productList.map(m=>{
                m.state = 0;
                return m;
              })
              return item
            })
          }else{
            this.currentDetectionItems.productList.map(m=>{
              m.state = 0;
              return m;
            });
          }
        }
        this.$nextTick(() => {
          this.$refs.table1.doLayout()
        })
      },
      upProductSelect(selection, row) {
        row.state = row.state == 1 ? 0 : 1
        if(this.multiFiberList.length > 0){
          this.multiFiberList.map(item => {
            item.productList.map(m=>{
              if(m.id == row.id){
                m.state = row.state;
              }
              return m
            })
            return item
          })
        }else{
          this.currentDetectionItems.productList.map(m=>{
            if(m.id == row.id){
                m.state = row.state;
              }
              return m;
            });
        }
      },
      setClassName({ column }) {
        if (column.type == 'selection' && !this.isAllDisabled) {
          return 'all-disabled'
        }
      },
      clearFibers(){
        this.packageInfo.ismiers = false
@@ -523,4 +658,9 @@
    padding-top: 2px !important;
    padding-bottom: 2px !important;
  }
  >>>.all-disabled .el-checkbox__input .el-checkbox__inner {
    background-color: #edf2fc;
    border-color: #dcdfe6;
    cursor: not-allowed;
  }
</style>
src/main.js
@@ -13,11 +13,11 @@
//本地
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://192.168.11.200:8001';//李
const javaApi = 'http://192.168.11.200:8001';//李
// const javaApi = 'http://10.20.102.168:8001';//张
// const javaApi = 'http://172.20.10.3:8001';//姜
// const javaApi = 'http://192.168.11.2:8001';//柴
 const javaApi = 'http://127.0.0.1:8001';//晏
//  const javaApi = 'http://127.0.0.1:8001';//晏
// const javaApi = 'http://114.132.189.42:1234';//测试服
//胜云服务器
// Vue.prototype.LOCATIONVUE = "http://syxt.shxiao2.cn";