| | |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="iscontr" |
| | | prop="main_cycle" |
| | | label="保养周期" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.main_cycle==='Y'">年</div> |
| | | <div v-if="row.main_cycle==='S'">季</div> |
| | | <div v-if="row.main_cycle==='M'">月</div> |
| | | <div v-if="row.main_cycle==='W'">周</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="is_checkeqp" |
| | | prop="is_repaireqp" |
| | | label="关联设备" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <i v-if="row.is_checkeqp==='Y'" class="el-icon-share" @click="checkeqpClick(row)" /> |
| | | <i v-if="row.is_repaireqp==='Y'" class="el-icon-share" @click="checkeqpClick(row)" /> |
| | | <i |
| | | v-if="row.is_checkeqp==='N'" |
| | | v-if="row.is_repaireqp==='N'" |
| | | class="el-icon-share" |
| | | style="color: rgb(180 ,181, 185)" |
| | | @click="checkeqpClick(row)" |
| | |
| | | :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 |
| | | 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'] } |
| | |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.getViewDeviceCheckStanedSearch(row.code) |
| | | this.getViewDeviceRepairStanedSearch(row.code) |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | |
| | | // }) |
| | | }, |
| | | // 修改前请求接口 |
| | | async getViewDeviceCheckStanedSearch(checkstand_code) { |
| | | const { data: res } = await ViewDeviceCheckStanedSearch({ checkstand_code }) |
| | | async getViewDeviceRepairStanedSearch(repairstand_code) { |
| | | const { data: res } = await ViewDeviceRepairStanedSearch({ repairstand_code }) |
| | | this.tableDataDialog = res.Data |
| | | |
| | | this.dialogForm.code = res.code |
| | |
| | | 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.name = row.name |
| | | this.dialogFormEqp.code = row.code |
| | | |
| | | const { data: res } = await DeviceRepairStanedAssociationEqp({ checkstand_code: row.code }) |
| | | this.dialogFormEqp.eqpAll = res |
| | | const { data: res } = await DeviceRepairStanedAssociationEqp({ repairstand_code: row.code }) |
| | | this.dialogFormEqp.eqpAll = res.filter(item => item.children.length > 0) |
| | | |
| | | if (this.dialogFormEqp.eqpAll.length > 0) { |
| | | this.dialogFormEqp.eqpAll.forEach((item, index) => { |
| | |
| | | this.dialogFormEqp.eqpTree = [this.dialogFormEqp.eqpAll[index]] |
| | | } |
| | | }) |
| | | this.$nextTick(() => { // 树形回显 |
| | | this.$refs.epqTree.setCheckedKeys(this.dialogFormEqp.eqpCodeSelectedArr) |
| | | }) |
| | | }, |
| | | // 小盒子点击 |
| | | myCheckboxInputClick(val) { |