| | |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getDeviceRepairStandArdSearch" |
| | | /> |
| | |
| | | <el-table-column |
| | | prop="repairitem_descr" |
| | | label="保养要求" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.repairitem_descr }}</div> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import { |
| | | AddUpdateDeviceCheckStandArd, AddUpdateDeviceRepairStandArd, |
| | | DeleteDeviceCheckStaned, DeleteDeviceRepairStaned, |
| | | DeviceCheckItemSelect, |
| | | DeviceCheckStandArdSearch, |
| | | DeviceCheckStanedAssociationEqp, DeviceRepairItemSelect, |
| | | DeviceRepairStandArdSearch, DeviceRepairStanedAssociationEqp, |
| | | SaveDeviceCheckStanedAssociationEqp, SaveDeviceRepairStanedAssociationEqp, |
| | | ViewDeviceCheckStanedSearch, ViewDeviceRepairStanedSearch |
| | | AddUpdateDeviceRepairStandArd, |
| | | DeleteDeviceRepairStaned, |
| | | DeviceRepairItemSelect, |
| | | DeviceRepairStandArdSearch, |
| | | DeviceRepairStanedAssociationEqp, |
| | | SaveDeviceRepairStanedAssociationEqp, |
| | | ViewDeviceRepairStanedSearch |
| | | } from '@/api/sbgl' |
| | | import $ from 'jquery' |
| | | import { validateCode } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请输入编码')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('编码不能为中文')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const validateTypeCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请选择上级')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | |
| | | dialogFormRules: { |
| | | |
| | | code: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请输入标准名称', trigger: ['blur', 'change'] } |
| | |
| | | item.isVisible = 0 |
| | | item.repairitem_code = item.code |
| | | item.repairitem_name = item.name |
| | | item.repairitem_descr = item.chkdesc |
| | | item.repairitem_descr = item.chk_desc |
| | | }) |
| | | |
| | | this.repairItemSelectArr = [...this.repairItemSelectArr].filter(x => [...this.tableDataDialog].every(y => y.repairitem_code !== x.code)) |
| | |
| | | DeleteDeviceRepairStaned({ repairstand_code: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getDeviceRepairStandArdSearch() |
| | | } |
| | | }) |
| | |
| | | this.dialogFormEqp.code = row.code |
| | | |
| | | const { data: res } = await DeviceRepairStanedAssociationEqp({ repairstand_code: row.code }) |
| | | this.dialogFormEqp.eqpAll = res |
| | | this.dialogFormEqp.eqpAll = res.filter(item => item.children.length > 0) |
| | | |
| | | if (this.dialogFormEqp.eqpAll.length > 0) { |
| | | this.dialogFormEqp.eqpAll.forEach((item, index) => { |