From eb6ffb9bf2eb98e6ed749ebbc14f2f607b7090a9 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期四, 19 九月 2024 16:15:03 +0800
Subject: [PATCH] 修改
---
web/src/views/modules/basicInfo/ParamData.vue | 77 +++++++++++++++++++++-----------------
1 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/web/src/views/modules/basicInfo/ParamData.vue b/web/src/views/modules/basicInfo/ParamData.vue
index 4bba40e..82803bc 100644
--- a/web/src/views/modules/basicInfo/ParamData.vue
+++ b/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">
@@ -107,18 +108,18 @@
<span v-else v-text="scope.row.basicMtbfAccept"></span>
</template>
</el-table-column>-->
- <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="MTBF鎴愬姛鐜�" align="right">
+ <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="鎴愬姛鐜�" align="right">
<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="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>
@@ -131,7 +132,7 @@
<span v-else v-text="scope.row.basicRunsNum"></span>
</template>
</el-table-column>
- <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="MTBF杩愯姣�" align="right">
+ <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="杩愯姣�" align="right">
<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>
@@ -179,38 +180,39 @@
<span v-else v-text="scope.row.taskMtbcfAccept"></span>
</template>
</el-table-column>-->
- <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="MTBCF鎴愬姛鐜�" align="right">
+ <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="鎴愬姛鐜�" align="right">
<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="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">
+ <!-- <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="杩愯姣�" align="right">
<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="taskMtbcfOtherParams2" :key="21" label="MTBCF鍏朵粬鍙傛暟2" align="right">
+ <el-table-column prop="taskMtbcfOtherParams2" :key="21" label="鍏朵粬鍙傛暟2" align="right">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams2"></el-input>
<span v-else v-text="scope.row.taskMtbcfOtherParams2"></span>
</template>
</el-table-column>
- <el-table-column prop="taskMtbcfOtherParams3" :key="30" label="MTBCF鍏朵粬鍙傛暟3" align="right">
+ <el-table-column prop="taskMtbcfOtherParams3" :key="30" label="鍏朵粬鍙傛暟3" align="right">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams3"></el-input>
<span v-else v-text="scope.row.taskMtbcfOtherParams3"></span>
</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,16 +248,16 @@
<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">
+ <el-table-column prop="repairMttcrOtherParams2" :key="26" label="鍏朵粬鍙傛暟2" align="right">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams2"></el-input>
<span v-else v-text="scope.row.repairMttcrOtherParams2"></span>
</template>
</el-table-column>
- <el-table-column prop="repairMttcrOtherParams3" :key="27" label="MTTCR鍏朵粬鍙傛暟3" align="right">
+ <el-table-column prop="repairMttcrOtherParams3" :key="27" label="鍏朵粬鍙傛暟3" align="right">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams3"></el-input>
<span v-else v-text="scope.row.repairMttcrOtherParams3"></span>
@@ -302,7 +304,6 @@
effect: '',
hit: false,
dataForm: {
- pageCode: this.$route.query.pageCode,
id: '',
pid: '',
srcId: '',
@@ -315,6 +316,9 @@
reliabDistribType: ''
},
isOrNot: [{
+ value: 0,
+ label: '鍚�'
+ },{
value: 1,
label: '鏄�'
}],
@@ -379,19 +383,14 @@
SelectTyModel
},
mounted() {
- this.pageCode = this.$route.query.pageCode
- this.dataForm.pageCode = this.$route.query.pageCode
- console.log(this.pageCode, 'this.pageCode this.pageCode')
+ this.$refs.modelTree.getProductList()
},
methods: {
- handleClick() {
-
- },
add() {
this.$refs.SelectTyModel.$refs.dialog.init(null, {
type: this.dataForm.productType + 1,
id: this.dataForm.srcId,
- pageCode: this.pageCode
+ pageCode: 'expect'
})
console.log(this.dataForm.srcId, 'add')
},
@@ -447,6 +446,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) {
--
Gitblit v1.9.1