| | |
| | | style="width: 220px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | |
| | | @change="partDialogChange" |
| | | > |
| | | <!-- @focus="getPartSelect2"--> |
| | |
| | | class="tableFixed" |
| | | :data="eqpDialogArr" |
| | | :height="tableHeight" |
| | | :style="{width: 100+'%',height:tableHeight-50+'px',}" |
| | | :style="{width: 100+'%',height:tableHeight-50+'px'}" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | highlight-current-row |
| | | @sort-change="dialogSortChange" |
| | | > |
| | | <!-- @row-click="rowClick"--> |
| | | <el-table-column |
| | | width="50" |
| | | label="序号" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button> |
| | | <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | this.routeDialogArr = res |
| | | this.stepDialogArr = [] |
| | | this.eqpDialogArr = [] |
| | | this.dialogForm.routecode = '' |
| | | }, |
| | | async routeDialogChange(val) { |
| | | const { data: res } = await RouteSelectStep({ routecode: val }) |
| | |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code |
| | | } else if (typeof val === 'number') { |
| | | // } else if (typeof val === 'number') { |
| | | } else { |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr[0].code |
| | | this.dialogForm.stepcode = this.stepDialogArr[0].name |
| | | } |
| | | |
| | | const res = await StepSelectEqpList(this.eqpTable) |
| | | this.eqpDialogArr = res.data |
| | | this.eqpTableLength = res.count |
| | |
| | | editRow(row) { |
| | | if (this.isEqpTableEdit) { |
| | | row.isVisible = 1 |
| | | let temp = {} |
| | | this.eqpDialogArr.forEach((item, index) => { |
| | | if (row.eqpcode === item.eqpcode) { |
| | | temp = item |
| | | this.eqpDialogArr.splice(index, 1, temp) |
| | | this.eqpDialogArr[index].isVisible = 1 |
| | | } |
| | | }) |
| | | this.isEqpTableEdit = false |
| | | } else { |
| | | return this.$message.info('只能一行一行修改!') |
| | | } |
| | | }, |
| | | // rowClick(row, column, event) { |
| | | // console.log(row, column, event, 3) |
| | | // console.log(this.dialogForm.stepcode, 4) |
| | | // this.getEqpTable(this.dialogForm.stepcode) |
| | | // }, |
| | | // 复制行 |
| | | async copyRow(row) { |
| | | let currentData = {}// 当前行对象 |
| | |
| | | this.editRouteName = row.route_name |
| | | this.editStepName = row.stepname |
| | | |
| | | // this.$nextTick(() => { |
| | | await this.partDialogChange(row.partcode) |
| | | await this.routeDialogChange(row.route_code) |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.routecode = row.route_code |
| | | this.dialogForm.stepcode = row.stepcode |
| | | // }) |
| | | await this.partDialogChange(row.partcode) |
| | | await this.routeDialogChange(row.route_code) |
| | | await this.radioChange(0) |
| | | }, |
| | | // 删除按钮 |
| | |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-share ,.el-icon-delete,.el-icon-edit-outline{ |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-edit-outline{ |
| | | margin-right: 15px; |
| | | } |
| | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .userDialogVisible ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | height: 100% !important; |
| | | } |
| | | |
| | | ::v-deep .el-table__fixed{ |
| | | height: 100% !important; |
| | | } |