| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="eqpDialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="eqpDialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="eqpDialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | this.tableDataDialog.filter(item => item.repairitem_code !== '') |
| | | |
| | | let Data = [] |
| | |
| | | |
| | | AddUpdateDeviceRepairStandArd(data, this.operation === 'add' ? 'Add' : 'Update').then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.getDeviceRepairStandArdSearch() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |
| | |
| | | return 'custom-row' |
| | | }, |
| | | // 关联设备 |
| | | async checkeqpClick(row) { |
| | | checkeqpClick(row) { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在加载数据,请稍等...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | |
| | | this.dialogFormEqp.name = row.name |
| | | this.dialogFormEqp.code = row.code |
| | | |
| | | const { data: res } = await DeviceRepairStanedAssociationEqp({ repairstand_code: row.code }) |
| | | this.dialogFormEqp.eqpAll = res.filter(item => item.children.length > 0) |
| | | DeviceRepairStanedAssociationEqp({ repairstand_code: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | loading.close() |
| | | this.dialogFormEqp.eqpAll = res.data.filter(item => item.children.length > 0) |
| | | |
| | | if (this.dialogFormEqp.eqpAll.length > 0) { |
| | | this.dialogFormEqp.eqpAll.forEach((item, index) => { |
| | |
| | | |
| | | this.$nextTick(() => { // 树形回显 |
| | | this.$refs.epqTree.setCheckedKeys(this.dialogFormEqp.eqpCodeSelectedArr) |
| | | }) |
| | | }, 1000) |
| | | } else { |
| | | loading.close() |
| | | } |
| | | }) |
| | | }, |
| | | // 关联设备对话框关闭 |
| | |
| | | eqpDialogVisibleConfirm() { |
| | | // console.log(this.dialogFormEqp.eqpCodeSelectedArr, 888) |
| | | // this.dialogVisibleEqp = false |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const data = [] |
| | | this.dialogFormEqp.eqpAll.forEach((item, index) => { |
| | | if (item.children && item.children.length > 0) { |
| | |
| | | |
| | | SaveDeviceRepairStanedAssociationEqp(data, this.dialogFormEqp.code).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisibleEqp = false |
| | | this.$message.success('关联成功!') |
| | | this.getDeviceRepairStandArdSearch() |
| | | this.dialogVisibleEqp = false |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } |
| | | }) |
| | | } |
| | |
| | | ::v-deep .el-table__fixed-right{ |
| | | height: 100% !important; |
| | | } |
| | | |
| | | ::v-deep .el-table__fixed{ |
| | | height: 100% !important; |
| | | } |
| | |
| | | |
| | | </style> |
| | | <style> |
| | | .osloading{ |
| | | font-size: 26px !important; |
| | | } |
| | | |
| | | .el-loading-text{ |
| | | font-size: 26px !important; |
| | | } |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |