From 195bb5267a6ece13363303e177fee7d1fa3941aa Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期二, 19 十一月 2024 15:25:25 +0800
Subject: [PATCH] 修改
---
web/src/views/modules/taskReliability/TaskBinoParam.vue | 127 ++++++++++++++++++++++++++++++-----------
1 files changed, 92 insertions(+), 35 deletions(-)
diff --git a/web/src/views/modules/taskReliability/TaskBinoParam.vue b/web/src/views/modules/taskReliability/TaskBinoParam.vue
index 4081cc3..89c1ce4 100644
--- a/web/src/views/modules/taskReliability/TaskBinoParam.vue
+++ b/web/src/views/modules/taskReliability/TaskBinoParam.vue
@@ -1,52 +1,76 @@
<template>
- <zt-dialog ref="dialog" column="3" title="浜岄」鍙傛暟" append-to-body @confirm="handleSaveRows" :editAble="false">
- <zt-table-wraper :paging='false' ref="tableObj" query-url="/taskReliability/TaskBinoParam/page" delete-url="/taskReliability/TaskBinoParam"
- v-slot="{ table }" >
- <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
- </el-form>
- <el-table v-loading="table.dataLoading" :data="table.dataList"
- height="600px"
- border @selection-change="table.selectionChangeHandle" @cell-click="handleCellClick"
- :header-cell-style="{'text-align':'center'}">
- <!-- <el-table-column type="selection" width="40"/>-->
- <el-table-column prop="phaseName" label="闃舵" align="center" />
- <el-table-column prop="operatConditName" label="宸ュ喌" align="center"/>
- <el-table-column prop="productName" label="浜岄」鍒嗗竷璁惧" align="center"/>
- <el-table-column prop="successRate" label="鎴愬姛鐜�" width="100" align="right">
- <template slot-scope="scope" >
+ <zt-dialog ref="dialog" column="3" title="浜岄」鍙傛暟" @confirm="handleSaveRows" append-to-body :editAble="true"
+ :hasConfirm="false">
+ <el-row :gutter="5">
+ <el-col :span="6">
+ <el-form :inline="true" :model="dataForm" style="padding: 0">
+ <el-form-item style="margin: 0">
+ <span style="font-size: 17px">浜岄」鍒嗗竷璁惧鍒楄〃</span>
+ </el-form-item>
+ </el-form>
+ <el-table :data="sbData" @row-click="selectSb" border highlight-current-row
+ :header-cell-style="{'text-align':'center'}">
+ <el-table-column prop="namePath" label="浜岄」鍒嗗竷璁惧" align="left"/>
+ </el-table>
+ </el-col>
+ <el-col :span="18">
+ <el-form :inline="true" :model="dataForm" style="padding: 0">
+ <el-form-item style="margin: 0">
+ <span style="font-size: 17px">浜岄」鍒嗗竷璁惧鍙傛暟</span>
+ </el-form-item>
+ <el-form-item style="float: right;margin: 0">
+ <el-button type="primary" @click="tongXia()">涓庣涓�琛屾�绘鏁板拰鎴愬姛娆℃暟鐩稿悓</el-button>
+ </el-form-item>
+ </el-form>
+ <el-table v-loading="loading" :data="tableData" border @cell-click="handleCellClick"
+ height="600px"
+ :header-cell-style="{'text-align':'center'}">
+ <!-- <el-table-column type="selection" width="40"/>-->
+ <el-table-column prop="phaseName" label="闃舵" align="center"/>
+ <el-table-column prop="operatConditName" label="宸ュ喌" align="center"/>
+ <el-table-column prop="productName" label="浜岄」鍒嗗竷璁惧" align="center"/>
+ <el-table-column prop="successRate" label="鎴愬姛鐜�" width="100" align="right">
+ <template slot-scope="scope">
<span
v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
<el-input ref="editInput"
autosize v-model="scope.row.successRate"
- placeholder="鎴愬姛鐜�" ></el-input>
+ placeholder="鎴愬姛鐜�"></el-input>
</span>
- <span v-else>{{scope.row.successRate}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="simulatTimes" label="浠跨湡娆℃暟" align="center" width="100">
- <template slot-scope="scope">
+ <span v-else>{{scope.row.successRate}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="simulatTimes" label="鎬绘鏁�" align="center" width="100">
+ <template slot-scope="scope">
<span
v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
<el-input ref="editInput"
autosize v-model="scope.row.simulatTimes"
- placeholder="浠跨湡娆℃暟"></el-input>
+ placeholder="鎬绘鏁�"></el-input>
</span>
- <span v-else>{{scope.row.simulatTimes}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="successTimes" label="鎴愬姛娆℃暟" align="center" width="100">
- <template slot-scope="scope">
+ <span v-else>{{scope.row.simulatTimes}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="successTimes" label="鎴愬姛娆℃暟" align="center" width="100">
+ <template slot-scope="scope">
<span
v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
<el-input ref="editInput"
autosize v-model="scope.row.successTimes"
placeholder="鎴愬姛娆℃暟"></el-input>
</span>
- <span v-else>{{scope.row.successTimes}}</span>
- </template>
- </el-table-column>
- </el-table>
- </zt-table-wraper>
+ <span v-else>{{scope.row.successTimes}}</span>
+ </template>
+ </el-table-column>
+<!-- <el-table-column>-->
+<!-- <template slot-scope="scope">-->
+<!-- <zt-table-button @click="tongXia(scope.row,scope.$index)">鍚屼笅</zt-table-button>-->
+<!-- {{scope.$index+1}}-->
+<!-- </template>-->
+<!-- </el-table-column>-->
+ </el-table>
+ </el-col>
+ </el-row>
</zt-dialog>
</template>
@@ -58,24 +82,48 @@
dataForm: {
id: '',
taskId: '',
+ shipId: '',
successRate: '',
simulatTimes: '',
successTimes: '',
- dataThreeList:[]
+ dataThreeList: []
},
+ loading: false,
editingCell: null,
+ tableData: [],
dataList: [],
+ sbData: [],
originalTableData: [],
originalData: null,
}
},
components: {},
methods: {
- init(id, row) {
+ async init(id, row) {
this.dataForm.taskId = row.taskId
+ this.dataForm.shipId = row.shipId
+ let params = {
+ shipId: this.dataForm.shipId
+ }
+ let res = await this.$http.get('/taskReliability/TaskBinoParam/getSb', {params: params})
+ if (res.success) {
+ this.sbData = res.data
+ }
+ },
+ async selectSb(row) {
+ this.loading = true
+ let params = {
+ productId: row.id,
+ taskId: this.dataForm.taskId
+ }
+ let res = await this.$http.get('/taskReliability/TaskBinoParam/page', {params: params})
+ if (res.success) {
+ this.loading = false
+ this.tableData = res.data
+ }
},
async handleSaveRows() {
- this.dataForm.dataThreeList = this.$refs.tableObj.dataList
+ this.dataForm.dataThreeList = this.tableData
console.log(this.dataForm, 'this.dataForm this.dataForm')
let res = await this.$http.post('/taskReliability/TaskBinoParam/save', this.dataForm)
if (res.success) {
@@ -88,6 +136,15 @@
console.log(this.originalTableData, 'this.originalTableData 褰撳墠琛ㄦ牸json鏁版嵁')
}
},
+ tongXia(row,index){
+ console.log(this.tableData[0].simulatTimes,'this.tableData[0].simulatTimes')
+ console.log(this.tableData[0].successTimes,'this.tableData[0].successTimes')
+ for(let i=1;i<this.tableData.length; i++){
+ this.tableData[i].simulatTimes = this.tableData[0].simulatTimes
+ this.tableData[i].successTimes = this.tableData[0].successTimes
+ }
+ this.handleSaveRows()
+ },
handleCellClick(row, column) {
this.editingCell = {row, column}
this.$nextTick(() => {
--
Gitblit v1.9.1