jinlin
2024-08-02 2fef10f07e65ce6f703c8043085e5728bd311d1e
web/src/views/modules/basicInfo/ParamData.vue
@@ -3,7 +3,7 @@
    <el-row :gutter="5">
      <el-col :span="4">
        <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
          <product-model-tree @on-selected="onProductSelected" showXdy="false" :isShow="false"/>
          <product-model-tree ref="modelTree" @on-selected="onProductSelected" @on-default="onDefault" showXdy="false" :isShow="false"/>
        </div>
      </el-col>
      <el-col :span="20">
@@ -37,7 +37,7 @@
              </el-form-item>
            </el-form>
            <el-tabs v-model="activeName" @tab-click="handleClick">
              <el-tab-pane label="基本可靠性" name="first" >
              <el-tab-pane label="基本可靠性" name="first">
                <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
                          v-adaptive="{bottomOffset:30}"
                          :header-cell-style="{'text-align':'center'}"
@@ -63,7 +63,8 @@
                                   :hit="hit"/>
                    </template>
                  </el-table-column>
                  <el-table-column v-if="dataForm.productType==='2'" :key="3" prop="baseOperatRatio" label="基本可靠性运行比" align="right">
                  <el-table-column v-if="dataForm.productType==='2'" :key="3" prop="baseOperatRatio" label="基本可靠性运行比"
                                   align="right">
                    <template slot-scope="scope">
                      <el-input v-if="scope.row.isEdit" v-model="scope.row.baseOperatRatio"></el-input>
                      <span v-else v-text="scope.row.baseOperatRatio"></span>
@@ -80,7 +81,7 @@
                  <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='4'" :key="5"
                                   label="基本可靠性计算">
                    <!--                <zt-table-column-dict prop="joinCompute" :keys="6" label="参加计算" width="100" dict="is_or_not"/>-->
                    <el-table-column prop="basicJoinCompute" label="参加计算" :key="6"  width="100" align="center">
                    <el-table-column prop="basicJoinCompute" label="参加计算" :key="6" width="100" align="center">
                      <template v-slot="{ row }">
                        <el-select v-if="row.isEdit" v-model="row.basicJoinCompute"
                                   placeholder="参加计算">
@@ -98,7 +99,7 @@
                    <el-table-column prop="basicMtbfRegulate" :key="7" label="MTBF" align="right" width="110">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulate"></el-input>
                        <span v-else >{{scope.row.basicMtbfRegulate | keepNumber}}</span>
                        <span v-else>{{scope.row.basicMtbfRegulate | keepNumber}}</span>
                      </template>
                    </el-table-column>
                    <!--<el-table-column prop="basicMtbfAccept" :key="8" label="可接受的MTBF" width="100">
@@ -113,12 +114,12 @@
                        <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span>
                      </template>
                    </el-table-column>
                   <!-- <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF可接受成功率" width="120">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAcceptSuccRate"></el-input>
                        <span v-else v-text="scope.row.basicMtbfAcceptSuccRate"></span>
                      </template>
                    </el-table-column>-->
                    <!-- <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF可接受成功率" width="120">
                       <template slot-scope="scope">
                         <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAcceptSuccRate"></el-input>
                         <span v-else v-text="scope.row.basicMtbfAcceptSuccRate"></span>
                       </template>
                     </el-table-column>-->
                    <el-table-column prop="basicUnitNum" label="单元数量" :key="11" width="100" align="center">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input>
@@ -185,12 +186,12 @@
                        <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span>
                      </template>
                    </el-table-column>
                   <!-- <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF可接受成功率" width="100">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAcceptSuccRate"></el-input>
                        <span v-else v-text="scope.row.taskMtbcfAcceptSuccRate"></span>
                      </template>
                    </el-table-column>-->
                    <!-- <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF可接受成功率" width="100">
                       <template slot-scope="scope">
                         <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAcceptSuccRate"></el-input>
                         <span v-else v-text="scope.row.taskMtbcfAcceptSuccRate"></span>
                       </template>
                     </el-table-column>-->
                    <el-table-column prop="taskMtbcfOperatingRatio" :key="20" label="MTBCF运行比" align="right">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input>
@@ -210,7 +211,8 @@
                      </template>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='4'" :key="22" label="维修分布" align="center">
                  <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='4'" :key="22" label="维修分布"
                                   align="center">
                    <!--                <zt-table-column-dict prop="repairable" :keys="23" label="可维修" dict="is_or_not"/>-->
                    <el-table-column prop="repairable" label="可维修" :key="23" width="80" align="center">
                      <template v-slot="{ row }">
@@ -246,7 +248,7 @@
                    <el-table-column prop="repairMttcr" label="MTTCR" :key="25" width="100" align="right">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcr"></el-input>
                        <span v-else >{{scope.row.repairMttcr | keepNumber}}</span>
                        <span v-else>{{scope.row.repairMttcr | keepNumber}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column prop="repairMttcrOtherParams2" :key="26" label="MTTCR其他参数2" align="right">
@@ -379,14 +381,12 @@
      SelectTyModel
    },
    mounted() {
      this.$refs.modelTree.getProductList()
      this.pageCode = this.$route.query.pageCode
      this.dataForm.pageCode = this.$route.query.pageCode
      console.log(this.pageCode, 'this.pageCode this.pageCode')
    },
    methods: {
      handleClick() {
      },
      add() {
        this.$refs.SelectTyModel.$refs.dialog.init(null, {
          type: this.dataForm.productType + 1,
@@ -447,6 +447,14 @@
          this.$refs.tableObj.query()
        })
      },
      onDefault(defaultId) {
        this.dataForm.srcId = defaultId
        this.dataForm.productType = '1'
        this.activeName = 'first'
        this.$nextTick(() => {
          this.$refs.tableObj.query()
        })
      },
      dataLoaded(data) {
        this.dataList = data
        for (let dataList of data) {