| | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <div style="display: flex"> |
| | | <el-button v-waves icon="el-icon-c-scale-to-original" @click="deviceTypeButton">设备类型</el-button> |
| | | <el-button v-waves icon="el-icon-document-copy" @click="deviceGroupButton">设备组</el-button> |
| | | <!-- <el-button v-waves icon="el-icon-c-scale-to-original" @click="deviceTypeButton">设备类型</el-button>--> |
| | | <!-- <el-button v-waves icon="el-icon-document-copy" @click="deviceGroupButton">设备组</el-button>--> |
| | | <el-button v-waves icon="el-icon-download" @click="upload">导入</el-button> |
| | | |
| | | </div> |
| | | |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" filterable label="设备类型" style="display: flex;"> |
| | | <el-select |
| | | v-model="form.DeviceType" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | filterable |
| | | placeholder="请选择" |
| | | @change="deviceTypeChange" |
| | | > |
| | | <!-- @focus="getDeviceTypeSelect"--> |
| | | <el-option |
| | | v-for="item in DeviceTypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="设备组" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.DeviceGroup" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | :disabled="form.DeviceType===''" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in DeviceGroupArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-show="isExpandForm" filterable label="设备类型" style="display: flex;">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="form.DeviceType"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="deviceTypeChange"--> |
| | | <!-- >--> |
| | | <!-- <!– @focus="getDeviceTypeSelect"–>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in DeviceTypeArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-show="isExpandForm" label="设备组" style=" display: flex;">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="form.DeviceGroup"--> |
| | | <!-- filterable--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- :disabled="form.DeviceType===''"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in DeviceGroupArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | </div> |
| | | <div |
| | | class="bodySearchReset" |
| | |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | /> |
| | | </div> |
| | | |
| | | <div class="elTableDiv" style="margin-top: 0;"> |
| | | <div class="elTableDiv"> |
| | | <TableColumnSettings |
| | | :list1="tableColumnSettingsArray" |
| | | @tableColumnUpdate="tableColumnUpdate" |
| | |
| | | :data="tableData" |
| | | border |
| | | class="tableFixed" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | :height="tableHeight+'px'" |
| | | highlight-current-row |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getDeviceMangerSearch" |
| | | /> |
| | |
| | | <el-form-item label="设备名称" prop="devicename"> |
| | | <el-input v-model="dialogForm.devicename" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="设备类型" prop="devicetypecode"> |
| | | <el-select |
| | | v-model="dialogForm.devicetypecode" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | filterable |
| | | @change="devicetypecodeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in DeviceTypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设备组" prop="devicegroupcode"> |
| | | <el-select |
| | | v-model="dialogForm.devicegroupcode" |
| | | :popper-append-to-body="false" |
| | | :disabled="dialogForm.devicetypecode===''" |
| | | style="width: 200px" |
| | | filterable |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in DeviceGroupDialogArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="设备类型" prop="devicetypecode">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.devicetypecode"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- filterable--> |
| | | <!-- @change="devicetypecodeChange"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in DeviceTypeArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="设备组" prop="devicegroupcode">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.devicegroupcode"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- :disabled="dialogForm.devicetypecode===''"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in DeviceGroupDialogArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="投入日期" prop="importdate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.importdate" |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | import { getCookie } from '@/utils/auth' |
| | | |
| | | export default { |
| | | name: 'SBQD', |
| | | name: 'DeviceList', |
| | | components: { |
| | | Pagination, ImportPicker, TableColumnSettings |
| | | }, |
| | |
| | | DeviceCode: '', // 设备编码 |
| | | DeviceName: '', // 设备名称 |
| | | Status: '', // 使用状态 |
| | | WorkShop: '', // 所属车间 |
| | | WorkShop: this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode'), // 所属车间 |
| | | DeviceType: '', // 设备类型 |
| | | DeviceGroup: '', // 设备组 |
| | | prop: 'lm_date', // 排序字段 |
| | |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'eqptype_code', |
| | | label: '设备类型编码', |
| | | id: 5, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | // { |
| | | // minWidth: false, |
| | | // width: 130, |
| | | // prop: 'eqptype_code', |
| | | // label: '设备类型编码', |
| | | // id: 5, |
| | | // show: false, |
| | | // fixed: false, |
| | | // sortable: true |
| | | // }, |
| | | // { |
| | | // minWidth: 110, |
| | | // width: false, |
| | | // prop: 'eqptype_name', |
| | | // label: '设备类型', |
| | | // id: 6, |
| | | // show: true, |
| | | // fixed: false, |
| | | // sortable: true |
| | | // }, |
| | | // { |
| | | // minWidth: false, |
| | | // width: 120, |
| | | // prop: 'eqpgroup_code', |
| | | // label: '设备组编码', |
| | | // id: 7, |
| | | // show: false, |
| | | // fixed: false, |
| | | // sortable: true |
| | | // }, |
| | | // { |
| | | // minWidth: 110, |
| | | // width: false, |
| | | // prop: 'eqpgroup_name', |
| | | // label: '设备组', |
| | | // id: 8, |
| | | // show: true, |
| | | // fixed: false, |
| | | // sortable: true |
| | | // }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'eqptype_name', |
| | | label: '设备类型', |
| | | id: 6, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 120, |
| | | prop: 'eqpgroup_code', |
| | | label: '设备组编码', |
| | | id: 7, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'eqpgroup_name', |
| | | label: '设备组', |
| | | id: 8, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'enable', |
| | | label: '使用状态', |
| | | id: 9, |
| | |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'input_date', |
| | | label: '投入日期', |
| | | id: 10, |
| | |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 130, |
| | | minWidth: 130, |
| | | width: false, |
| | | prop: 'wksp_code', |
| | | label: '生产车间编码', |
| | | id: 11, |
| | |
| | | this.form.DeviceCode = '' |
| | | this.form.DeviceName = '' |
| | | this.form.Status = '' |
| | | this.form.WorkShop = '' |
| | | this.form.WorkShop = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode') |
| | | this.form.DeviceType = '' |
| | | this.form.DeviceGroup = '' |
| | | this.getDeviceMangerSearch() |
| | |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | await this.devicetypecodeChange(row.eqptype_code) |
| | | // await this.devicetypecodeChange(row.eqptype_code) |
| | | await this.workshopcodeChange(row.wksp_code) |
| | | this.$nextTick(() => { |
| | | this.dialogForm.id = row.id |
| | |
| | | id: this.dialogForm.id, |
| | | devicecode: this.dialogForm.devicecode, |
| | | devicename: this.dialogForm.devicename, |
| | | devicetypecode: this.dialogForm.devicetypecode, |
| | | devicegroupcode: this.dialogForm.devicegroupcode, |
| | | devicetypecode: '', |
| | | devicegroupcode: '', |
| | | importdate: handleDatetime(this.dialogForm.importdate), |
| | | workshopcode: this.dialogForm.workshopcode, |
| | | // linecode: this.dialogForm.linecode, |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 245 |
| | | this.tableHeight = this.mainHeight - 195 |
| | | this.$refs.tableDataRef.doLayout() |
| | | // if (window.innerHeight < 769) { |
| | | // this.tableHeight = this.tableHeight - 50 |
| | |
| | | this.DeviceGroupArray.splice(index, 1) |
| | | } |
| | | }) |
| | | if (this.form.DeviceType !== '') { |
| | | this.deviceTypeChange(this.form.DeviceType) |
| | | } |
| | | // if (this.form.DeviceType !== '') { |
| | | // this.deviceTypeChange(this.form.DeviceType) |
| | | // } |
| | | }, |
| | | // 新增 |
| | | addDeviceGroup() { |