| | |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | label="设备编码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="设备名称" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="eqptype_name" |
| | | label="设备类型" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="eqpgroup_name" |
| | | label="设备组" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | prop="wksp_name" |
| | | label="生产车间" |
| | | sortable="custom" |
| | | min-width="120" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="Line_name"--> |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | width="160" |
| | | label="创建时间" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="100" |
| | | fixed="right" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="稼动率" prop="ratio"> |
| | | <el-input v-model="dialogForm.ratio" style="width: 195px" /> |
| | | <el-input v-model="dialogForm.ratio" style="width: 175px" /> |
| | | <span style="margin-left: 10px">%</span> |
| | | </el-form-item> |
| | | |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { |
| | | AddUpdateDeviceGroup, AddUpdateDeviceManger, |
| | | AddUpdateDeviceType, DeleteDeviceManger, DeleteDeviceType, |
| | |
| | | devicename: '', |
| | | devicetypecode: '', |
| | | devicegroupcode: '', |
| | | importdate: '', |
| | | importdate: handleDatetime(new Date()), |
| | | workshopcode: '', |
| | | linecode: '', |
| | | status: '', |
| | | status: 'Y', |
| | | ratio: '' |
| | | }, |
| | | DeviceGroupDialogArr: [], // 设备组数组 |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | // 获取设备清单列表 |
| | | this.getDeviceMangerSearch() |
| | | // 获取设备类型下拉 |
| | | this.getDeviceTypeSelect() |
| | | // 获取所属车间下拉 |
| | | this.getWorkShopSelect() |
| | | this.handleRequest() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | handleRequest() { |
| | | // 获取设备清单列表 |
| | | this.getDeviceMangerSearch().then(res => { |
| | | if (res.code === '200') { |
| | | // 获取设备类型下拉 |
| | | this.getDeviceTypeSelect() |
| | | // 获取所属车间下拉 |
| | | this.getWorkShopSelect() |
| | | } |
| | | }) |
| | | }, |
| | | // 获取设备清单列表 |
| | | async getDeviceMangerSearch() { |
| | | const res = await DeviceMangerSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | return { code: res.code } |
| | | }, |
| | | // 获取所属车间下拉 |
| | | async getWorkShopSelect() { |
| | |
| | | this.dialogForm.devicename = '' |
| | | this.dialogForm.devicetypecode = '' |
| | | this.dialogForm.devicegroupcode = '' |
| | | this.dialogForm.importdate = '' |
| | | this.dialogForm.importdate = handleDatetime(new Date()) |
| | | this.dialogForm.workshopcode = '' |
| | | // this.dialogForm.linecode = '' |
| | | this.dialogForm.status = '' |
| | | this.dialogForm.status = 'Y' |
| | | this.dialogForm.ratio = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | if (window.innerHeight < 800) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | if (row.name.trim().length < 1) { |
| | | return this.$message.info('类型名称不能为空!') |
| | | } |
| | | if (row.remark.trim().length < 1) { |
| | | return this.$message.info('类型描述不能为空!') |
| | | } |
| | | // if (row.remark.trim().length < 1) { |
| | | // return this.$message.info('类型描述不能为空!') |
| | | // } |
| | | const data = { |
| | | 'code': row.code, |
| | | 'name': row.name, |
| | |
| | | if (row.eqptype_code.trim().length < 1) { |
| | | return this.$message.info('所属设备类型不能为空!') |
| | | } |
| | | if (row.remark.trim().length < 1) { |
| | | return this.$message.info('分组描述不能为空!') |
| | | } |
| | | // if (row.remark.trim().length < 1) { |
| | | // return this.$message.info('分组描述不能为空!') |
| | | // } |
| | | const data = { |
| | | 'code': row.code, |
| | | 'name': row.name, |