| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="12"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备编号"> |
| | | <j-input placeholder="请输入设备编号" v-model="queryParam.equipmentId"></j-input> |
| | | <a-input placeholder="请输入设备编号" v-model="queryParam.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备类型"> |
| | | <a-select placeholder="请选择设备类型" :triggerChange="true" v-model="queryParam.equipmentType" |
| | | :allowClear="true"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="驱动类型"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="请选择驱动类型" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
| | | </a-col> |
| | |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import api from '@/api/mdc' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'EquipmentOperationParamsAlarm', |
| | | mixins: [JeecgListMixin], |
| | | created(){ |
| | | this.getDriveTypeByApi() |
| | | this.queryGroup() |
| | | }, |
| | | data() { |
| | | return { |
| | | name: 'EquipmentOperationParamsAlarm', |
| | | description: '这是设备运行参数报警页面', |
| | | queryParam: {}, |
| | | driveTypeList:[], |
| | | selectList: [], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/mdc/mdcOverrunAlarm/list' |
| | | list: '/mdc/mdcOverrunAlarm/list', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | ipagination:{ |
| | | current: 1, |
| | |
| | | order: 'desc' |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | /** |
| | | * 调用接口获取控制系统类型 |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 联想输入框筛选功能 |
| | | * @param input 输入的内容 |
| | | * @param option 配置 |
| | | * @returns {boolean} 判断是否筛选 |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | | this.selectList = res.result |
| | | // this.selectList = res.result.map((item, index, arr) => { |
| | | // return { label: item.id, value: item.equipmentTypeName + '' } |
| | | // }) |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |