| | |
| | | <template> |
| | | <div> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="5"> |
| | | <div class="fa-card-a"> |
| | | <product-model-tree @on-selected="onProductSelected"/> |
| | | <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"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="19"> |
| | | <div class="mod-basicInfo-paramData}"> |
| | | <el-col :span="20"> |
| | | <div class="mod-basicInfo-paramData fa-card-a" style="margin-left: 5px;"> |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/basicInfo/ParamData/page" |
| | | delete-url="/basicInfo/ParamData/" |
| | | @dataLoaded="dataLoaded" |
| | |
| | | <zt-dict v-model="dataForm.repairable" dict="is_or_not" placeholder="是否可维修" clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.reliabDistribType" dict="ReliabDistribType" placeholder="请选择可靠性分布类型" clearable></zt-dict> |
| | | <zt-dict v-model="dataForm.reliabDistribType" dict="ReliabDistribType" placeholder="请选择可靠性分布类型" |
| | | clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.repairDistribType" dict="RepairDistribType" placeholder="请选择维修分布类型" clearable></zt-dict> |
| | | <zt-dict v-model="dataForm.repairDistribType" dict="RepairDistribType" placeholder="请选择维修分布类型" |
| | | clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="warning" @click="handleSaveRows">保存</zt-button> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="add" v-if="dataForm.nodeType==='2'" @click="add()"/> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="dataForm.srcId" type="warning" @click="handleSaveRows">保存</zt-button> |
| | | <zt-button v-if="dataForm.srcId" type="query" @click="table.query()"/> |
| | | <zt-button type="add" v-if="dataForm.productType==='3'" @click="add()"/> |
| | | <zt-button v-if="dataForm.srcId" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | class="paramsDataTable" |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="基本可靠性" name="first"> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | | class="paramsDataTable" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" :key="1" width="40" align="center"/> |
| | | <el-table-column prop="name" :key="2" label="名称" fixed="left" width="140"/> |
| | | <el-table-column v-if="dataForm.productType==='4'" :key="3" prop="baseOperatRatio" label="基本可靠性运行比"> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='5'||dataForm.productType==='4'" :key="4" |
| | | prop="actualRunTime" |
| | | label="实际运行时间"> |
| | | <!-- <template slot-scope="scope"> |
| | | <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> |
| | | <el-input ref="editInput" v-model="scope.row.actualRunTime" placeholder="实际运行时间"></el-input> |
| | | </span> |
| | | <span v-else>{{scope.row.actualRunTime}}</span> |
| | | </template>--> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.actualRunTime"></el-input> |
| | | <span v-else v-text="scope.row.actualRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :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"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.basicJoinCompute" |
| | | placeholder="参加计算"> |
| | | <el-option v-for="item in isOrNot" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="is_or_not" :value="row.basicJoinCompute" :typeS="typeS" :typeI="typeI" |
| | | :typeD="typeD" |
| | | :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfRegulate" :key="7" label="规定MTBF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfAccept" :key="8" label="可接受的MTBF" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAccept"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfAccept"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="MTBF规定成功率" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF可接受成功率" width="180"> |
| | | <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"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input> |
| | | <span v-else v-text="scope.row.basicUnitNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicRunsNum" label="运行次数" :key="12" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicRunsNum"></el-input> |
| | | <span v-else v-text="scope.row.basicRunsNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="MTBF运行比" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicSingleRunTime" :key="14" label="单次运行时间" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicSingleRunTime"></el-input> |
| | | <span v-else v-text="scope.row.basicSingleRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" :key="1" width="40" align="center"/> |
| | | <el-table-column prop="name" :key="2" label="名称" fixed="left"/> |
| | | <el-table-column v-if="dataForm.nodeType==='4'" :key="3" prop="baseOperatRatio" label="基本可靠性运行比"> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.nodeType==='5'||dataForm.nodeType==='4'" :key="4" prop="actualRunTime" |
| | | label="实际运行时间"> |
| | | <!-- <template slot-scope="scope"> |
| | | <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> |
| | | <el-input ref="editInput" v-model="scope.row.actualRunTime" placeholder="实际运行时间"></el-input> |
| | | </span> |
| | | <span v-else>{{scope.row.actualRunTime}}</span> |
| | | </template>--> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.actualRunTime"></el-input> |
| | | <span v-else v-text="scope.row.actualRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.nodeType==='2'" :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"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.basicJoinCompute" |
| | | placeholder="参加计算"> |
| | | <el-option v-for="item in isOrNot" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="is_or_not" :value="row.basicJoinCompute" :typeS="typeS" :typeI="typeI" |
| | | :typeD="typeD" |
| | | :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfRegulate" :key="7" label="规定MTBF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfAccept" :key="8" label="可接受的MTBF" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAccept"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfAccept"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="MTBF规定成功率" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF可接受成功率" width="180"> |
| | | <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"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input> |
| | | <span v-else v-text="scope.row.basicUnitNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicRunsNum" label="运行次数" :key="12" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicRunsNum"></el-input> |
| | | <span v-else v-text="scope.row.basicRunsNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="MTBF运行比" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicSingleRunTime" :key="14" label="单次运行时间" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicSingleRunTime"></el-input> |
| | | <span v-else v-text="scope.row.basicSingleRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="15" label="任务可靠性计算"> |
| | | <el-table-column prop="taskMtbcfRegulate" :key="16" label="规定MTBCF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfAccept" :key="17" label="可接受的MTBCF" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAccept"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfAccept"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="MTBCF规定成功率" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF可接受成功率" width="200"> |
| | | <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运行比" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfOtherParams" :key="21" label="MTBCF其他参数" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOtherParams"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | <el-table-column v-if="dataForm.nodeType==='2'" :key="15" label="任务可靠性计算"> |
| | | <el-table-column prop="taskMtbcfRegulate" :key="16" label="规定MTBCF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfAccept" :key="17" label="可接受的MTBCF" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAccept"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfAccept"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="MTBCF规定成功率" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF可接受成功率" width="200"> |
| | | <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运行比" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfOtherParams" :key="21" label="MTBCF其他参数" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOtherParams"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="22" label="维修分布"> |
| | | <!-- <zt-table-column-dict prop="repairable" :keys="23" label="可维修" dict="is_or_not"/>--> |
| | | <el-table-column prop="repairable" label="可维修" :key="23"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.repairable" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in isOrNot" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI" |
| | | :typeD="typeD" |
| | | :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <zt-table-column-dict prop="repairDistribType" :keys="24" label="维修分布类型" width="140" dict="RepairDistribType"/>--> |
| | | <el-table-column prop="repairDistribType" label="维修分布类型" :key="24" width="140"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.repairDistribType" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in repairDistribType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS" |
| | | :typeI="typeI" |
| | | :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcr" label="MTTCR" :key="25" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcr"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcr"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcrOtherParams" :key="26" label="MTTCR其他参数" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcrOtherParams"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | <el-table-column v-if="dataForm.nodeType==='2'" :key="22" label="维修分布"> |
| | | <!-- <zt-table-column-dict prop="repairable" :keys="23" label="可维修" dict="is_or_not"/>--> |
| | | <el-table-column prop="repairable" label="可维修" :key="23"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.repairable" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in isOrNot" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI" |
| | | :typeD="typeD" |
| | | :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <zt-table-column-dict prop="repairDistribType" :keys="24" label="维修分布类型" width="140" dict="RepairDistribType"/>--> |
| | | <el-table-column prop="repairDistribType" label="维修分布类型" :key="24" width="140"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.repairDistribType" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in repairDistribType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS" |
| | | :typeI="typeI" |
| | | :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcr" label="MTTCR" :key="25" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcr"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcr"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcrOtherParams" :key="26" label="MTTCR其他参数" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcrOtherParams"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <!-- <zt-table-column-dict v-if="dataForm.productType==='3'" :key="27" prop="reliabDistribType" label="可靠性分布类型" |
| | | width="160"/>--> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" prop="reliabDistribType" |
| | | label="可靠性分布类型" :key="27" |
| | | width="160"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.reliabDistribType" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in reliabDistribType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="ReliabDistribType" :value="row.reliabDistribType" :typeS="typeS" |
| | | :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" |
| | | :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="28" prop="runTime" |
| | | label="运行时间" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.runTime"></el-input> |
| | | <span v-else v-text="scope.row.runTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" align="center" label="操作" width="150"> |
| | | <template slot-scope="scope"> |
| | | <zt-table-button size="small" type="primary" @click="edit(scope.row)">修改 |
| | | </zt-table-button> |
| | | <zt-table-button v-if="scope.row.isCanel" size="small" type="primary" @click="canel(scope.row)">取消 |
| | | </zt-table-button> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- <zt-table-column-dict v-if="dataForm.nodeType==='2'" :key="27" prop="reliabDistribType" label="可靠性分布类型" |
| | | width="160"/>--> |
| | | <el-table-column v-if="dataForm.nodeType==='2'" prop="reliabDistribType" label="可靠性分布类型" :key="27" |
| | | width="160"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.reliabDistribType" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in reliabDistribType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="ReliabDistribType" :value="row.reliabDistribType" :typeS="typeS" |
| | | :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" |
| | | :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.nodeType==='2'" :key="28" prop="runTime" label="运行时间" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.runTime"></el-input> |
| | | <span v-else v-text="scope.row.runTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" align="center" label="操作" width="150"> |
| | | <template slot-scope="scope"> |
| | | <zt-table-button size="small" type="primary" @click="edit(scope.row)">修改 |
| | | </zt-table-button> |
| | | <zt-table-button v-if="scope.row.isCanel" size="small" type="primary" @click="canel(scope.row)">取消 |
| | | </zt-table-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="任务可靠性" name="second"> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | | class="paramsDataTable" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" :key="1" width="40" align="center"/> |
| | | <el-table-column prop="name" :key="2" label="名称" fixed="left" width="140"/> |
| | | <el-table-column v-if="dataForm.productType==='4'" :key="3" prop="baseOperatRatio" label="基本可靠性运行比"> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='5'||dataForm.productType==='4'" :key="4" |
| | | prop="actualRunTime" |
| | | label="实际运行时间"> |
| | | <!-- <template slot-scope="scope"> |
| | | <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> |
| | | <el-input ref="editInput" v-model="scope.row.actualRunTime" placeholder="实际运行时间"></el-input> |
| | | </span> |
| | | <span v-else>{{scope.row.actualRunTime}}</span> |
| | | </template>--> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.actualRunTime"></el-input> |
| | | <span v-else v-text="scope.row.actualRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :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"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.basicJoinCompute" |
| | | placeholder="参加计算"> |
| | | <el-option v-for="item in isOrNot" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="is_or_not" :value="row.basicJoinCompute" :typeS="typeS" :typeI="typeI" |
| | | :typeD="typeD" |
| | | :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfRegulate" :key="7" label="规定MTBF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfAccept" :key="8" label="可接受的MTBF" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAccept"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfAccept"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="MTBF规定成功率" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF可接受成功率" width="180"> |
| | | <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"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input> |
| | | <span v-else v-text="scope.row.basicUnitNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicRunsNum" label="运行次数" :key="12" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicRunsNum"></el-input> |
| | | <span v-else v-text="scope.row.basicRunsNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="MTBF运行比" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicSingleRunTime" :key="14" label="单次运行时间" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicSingleRunTime"></el-input> |
| | | <span v-else v-text="scope.row.basicSingleRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="15" label="任务可靠性计算"> |
| | | <el-table-column prop="taskMtbcfRegulate" :key="16" label="规定MTBCF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfAccept" :key="17" label="可接受的MTBCF" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAccept"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfAccept"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="MTBCF规定成功率" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF可接受成功率" width="200"> |
| | | <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运行比" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfOtherParams" :key="21" label="MTBCF其他参数" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOtherParams"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="22" label="维修分布"> |
| | | <!-- <zt-table-column-dict prop="repairable" :keys="23" label="可维修" dict="is_or_not"/>--> |
| | | <el-table-column prop="repairable" label="可维修" :key="23"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.repairable" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in isOrNot" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI" |
| | | :typeD="typeD" |
| | | :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <zt-table-column-dict prop="repairDistribType" :keys="24" label="维修分布类型" width="140" dict="RepairDistribType"/>--> |
| | | <el-table-column prop="repairDistribType" label="维修分布类型" :key="24" width="140"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.repairDistribType" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in repairDistribType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS" |
| | | :typeI="typeI" |
| | | :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcr" label="MTTCR" :key="25" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcr"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcr"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcrOtherParams" :key="26" label="MTTCR其他参数" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcrOtherParams"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | <!-- <zt-table-column-dict v-if="dataForm.productType==='3'" :key="27" prop="reliabDistribType" label="可靠性分布类型" |
| | | width="160"/>--> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" prop="reliabDistribType" |
| | | label="可靠性分布类型" :key="27" |
| | | width="160"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.reliabDistribType" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in reliabDistribType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <zt-dict-tag v-else dict="ReliabDistribType" :value="row.reliabDistribType" :typeS="typeS" |
| | | :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" |
| | | :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="28" prop="runTime" |
| | | label="运行时间" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.runTime"></el-input> |
| | | <span v-else v-text="scope.row.runTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" align="center" label="操作" width="150"> |
| | | <template slot-scope="scope"> |
| | | <zt-table-button size="small" type="primary" @click="edit(scope.row)">修改 |
| | | </zt-table-button> |
| | | <zt-table-button v-if="scope.row.isCanel" size="small" type="primary" @click="canel(scope.row)">取消 |
| | | </zt-table-button> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/> |
| | | </zt-table-wraper> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | activeName:'first', |
| | | pageCode: '', |
| | | key: '', |
| | | typeS: '', |
| | |
| | | srcId: '', |
| | | name: '', |
| | | dataThreeList: null, |
| | | nodeType: '5', |
| | | basicJoinCompute:'', |
| | | repairable:'', |
| | | repairDistribType:'', |
| | | reliabDistribType:'' |
| | | productType: '5', |
| | | basicJoinCompute: '', |
| | | repairable: '', |
| | | repairDistribType: '', |
| | | reliabDistribType: '' |
| | | }, |
| | | isOrNot: [{ |
| | | value: 1, |
| | |
| | | ], |
| | | // editingCell:null, |
| | | dataList: [], |
| | | originalTableData: [], |
| | | originalData: null, // 记录修改前的数据 |
| | | } |
| | | }, |
| | | // 在组件中定义 beforeRouteLeave 导航守卫 |
| | | beforeRouteLeave(to, from, next) { |
| | | console.log(this.$store.state.contentTabs, 'this.$store.state.contentTabsActiveName') |
| | | if (this.hasUnsavedChanges()) { // 检查是否有未保存的变更 |
| | | this.$confirm('您有未保存的更改,请先保存。是否继续离开?', '提示', { |
| | | confirmButtonText: '保存', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.handleSaveRows(); // 保存数据 |
| | | next(); |
| | | }).catch(() => { |
| | | next(false); // 取消路由离开 |
| | | }); |
| | | } else { |
| | | next(); |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | console.log(this.pageCode, 'this.pageCode this.pageCode') |
| | | }, |
| | | methods: { |
| | | handleClick(){ |
| | | |
| | | }, |
| | | add() { |
| | | this.$refs.SelectTyModel.$refs.dialog.init(null, { |
| | | type: this.dataForm.nodeType - 1, |
| | | type: this.dataForm.productType - 1, |
| | | id: this.dataForm.srcId, |
| | | pageCode: this.pageCode |
| | | }) |
| | |
| | | this.originalData = null |
| | | this.dataForm.dataThreeList = null |
| | | this.$refs.tableObj.query() |
| | | this.originalTableData = JSON.parse(JSON.stringify(this.dataList)); // 更新初始数据为当前数据 |
| | | console.log(this.originalTableData, 'this.originalTableData 当前表格json数据') |
| | | } |
| | | }, |
| | | edit(row) { |
| | |
| | | // }, |
| | | onProductSelected(data) { |
| | | this.dataForm.srcId = data.id |
| | | if (data.productType === '3') { |
| | | this.dataForm.nodeType = '2' |
| | | } |
| | | this.dataForm.productType = data.productType |
| | | console.log(data, 'onProductSelected(data)') |
| | | this.$refs.tableObj.query() |
| | | this.$nextTick(() => { |
| | | this.$refs.tableObj.query() |
| | | }) |
| | | }, |
| | | dataLoaded(data) { |
| | | this.dataList = data |
| | |
| | | this.$set(dataList, 'isRemove', false) |
| | | console.log(dataList, 'dataList') |
| | | } |
| | | } |
| | | this.originalTableData = JSON.parse(JSON.stringify(this.dataList)) |
| | | console.log(this.originalTableData, 'this.originalTableData 初始表格json数据') |
| | | }, |
| | | hasUnsavedChanges() { |
| | | // 检查当前表格数据与初始数据是否相同 |
| | | return JSON.stringify(this.dataList) !== JSON.stringify(this.originalTableData); |
| | | }, |
| | | } |
| | | } |
| | | </script> |