From c6a9d92199d79100781a8c85cec045a778e648c2 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期五, 10 五月 2024 09:30:04 +0800
Subject: [PATCH] 组合
---
web/src/views/modules/basicInfo/ParamData.vue | 65 +++++++++++++++++---------------
1 files changed, 35 insertions(+), 30 deletions(-)
diff --git a/web/src/views/modules/basicInfo/ParamData.vue b/web/src/views/modules/basicInfo/ParamData.vue
index 6155b6e..0774e81 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="5">
<div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
- <product-model-tree @on-selected="onProductSelected"/>
+ <product-model-tree @on-selected="onProductSelected" showXdy="false"/>
</div>
</el-col>
<el-col :span="19">
@@ -21,30 +21,33 @@
<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: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"/>
- <el-table-column v-if="dataForm.nodeType==='4'" :key="3" prop="baseOperatRatio" label="鍩烘湰鍙潬鎬ц繍琛屾瘮">
+ <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.nodeType==='5'||dataForm.nodeType==='4'" :key="4" prop="actualRunTime"
+ <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">
@@ -57,7 +60,7 @@
<span v-else v-text="scope.row.actualRunTime"></span>
</template>
</el-table-column>
- <el-table-column v-if="dataForm.nodeType==='2'" :key="5" label="鍩烘湰鍙潬鎬ц绠�">
+ <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 }">
@@ -124,7 +127,7 @@
</el-table-column>
</el-table-column>
- <el-table-column v-if="dataForm.nodeType==='2'" :key="15" label="浠诲姟鍙潬鎬ц绠�">
+ <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>
@@ -163,7 +166,7 @@
</el-table-column>
</el-table-column>
- <el-table-column v-if="dataForm.nodeType==='2'" :key="22" label="缁翠慨鍒嗗竷">
+ <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 }">
@@ -210,9 +213,10 @@
</el-table-column>
</el-table-column>
- <!-- <zt-table-column-dict v-if="dataForm.nodeType==='2'" :key="27" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�"
+ <!-- <zt-table-column-dict v-if="dataForm.productType==='3'" :key="27" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�"
width="160"/>-->
- <el-table-column v-if="dataForm.nodeType==='2'" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�" :key="27"
+ <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"
@@ -228,7 +232,8 @@
:hit="hit"/>
</template>
</el-table-column>
- <el-table-column v-if="dataForm.nodeType==='2'" :key="28" prop="runTime" label="杩愯鏃堕棿" width="100">
+ <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>
@@ -277,11 +282,11 @@
srcId: '',
name: '',
dataThreeList: null,
- nodeType: '5',
- basicJoinCompute:'',
- repairable:'',
- repairDistribType:'',
- reliabDistribType:''
+ productType: '5',
+ basicJoinCompute: '',
+ repairable: '',
+ repairDistribType: '',
+ reliabDistribType: ''
},
isOrNot: [{
value: 1,
@@ -311,13 +316,13 @@
],
// editingCell:null,
dataList: [],
- originalTableData:[],
+ originalTableData: [],
originalData: null, // 璁板綍淇敼鍓嶇殑鏁版嵁
}
},
// 鍦ㄧ粍浠朵腑瀹氫箟 beforeRouteLeave 瀵艰埅瀹堝崼
beforeRouteLeave(to, from, next) {
- console.log(this.$store.state.contentTabs,'this.$store.state.contentTabsActiveName')
+ console.log(this.$store.state.contentTabs, 'this.$store.state.contentTabsActiveName')
if (this.hasUnsavedChanges()) { // 妫�鏌ユ槸鍚︽湁鏈繚瀛樼殑鍙樻洿
this.$confirm('鎮ㄦ湁鏈繚瀛樼殑鏇存敼锛岃鍏堜繚瀛樸�傛槸鍚︾户缁寮�锛�', '鎻愮ず', {
confirmButtonText: '淇濆瓨',
@@ -345,7 +350,7 @@
methods: {
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
})
@@ -363,7 +368,7 @@
this.dataForm.dataThreeList = null
this.$refs.tableObj.query()
this.originalTableData = JSON.parse(JSON.stringify(this.dataList)); // 鏇存柊鍒濆鏁版嵁涓哄綋鍓嶆暟鎹�
- console.log(this.originalTableData,'this.originalTableData 褰撳墠琛ㄦ牸json鏁版嵁')
+ console.log(this.originalTableData, 'this.originalTableData 褰撳墠琛ㄦ牸json鏁版嵁')
}
},
edit(row) {
@@ -396,11 +401,11 @@
// },
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
@@ -411,7 +416,7 @@
console.log(dataList, 'dataList')
}
this.originalTableData = JSON.parse(JSON.stringify(this.dataList))
- console.log(this.originalTableData,'this.originalTableData 鍒濆琛ㄦ牸json鏁版嵁')
+ console.log(this.originalTableData, 'this.originalTableData 鍒濆琛ㄦ牸json鏁版嵁')
},
hasUnsavedChanges() {
// 妫�鏌ュ綋鍓嶈〃鏍兼暟鎹笌鍒濆鏁版嵁鏄惁鐩稿悓
--
Gitblit v1.9.1