From 585fb0bbd4a7bc7f8f333ecba7c5fecd2ee5cbc2 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 28 三月 2024 09:46:44 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop --- src/views/mdc/base/EquipmentOperationParamsAlarm.vue | 124 +++++++++++++++++++++++++++++++++++------ 1 files changed, 106 insertions(+), 18 deletions(-) diff --git a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue index dddc8ac..26b9299 100644 --- a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue +++ b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue @@ -4,15 +4,41 @@ <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="璁惧缂栧彿"> - <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentid"></a-input> + <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input> </a-form-item> </a-col> - <a-col :md="6" :sm="8"> - <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 :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" + :allowClear="true" + /> + </a-form-item> + </a-col> + + <a-col :md="6" :sm="6"> + <a-space> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + <a-button type="primary" icon="printer" v-print="'#paramsAlarm'" v-has="'paramsAlarm:print'">鎵撳嵃</a-button> + </a-space> </a-col> </a-row> </a-form> @@ -20,6 +46,7 @@ <a-table ref="table" + id="paramsAlarm" bordered size="middle" rowKey="equipmentid" @@ -35,15 +62,23 @@ <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: '#', @@ -58,49 +93,102 @@ { title: '璁惧缂栧彿', align: 'center', - dataIndex: 'equipmentid', + dataIndex: 'equipmentId', width: 250 }, { title: '鎶ヨ鏃堕棿', align: 'center', - dataIndex: 'collecttime', + dataIndex: 'createTime', width: 250 }, { title: '璁惧畾鍊�', align: 'center', width: 250, - dataIndex: 'setvalue' + dataIndex: 'setValue' }, { title: '瀹為檯鍊�', align: 'center', width: 250, - dataIndex: 'realvalue' + dataIndex: 'realValue' }, - { - title: '鎶ヨ鍙�', - align: 'center', - width: 250, - dataIndex: 'alarmno' - }, + // { + // title: '鎶ヨ鍙�', + // align: 'center', + // width: 250, + // dataIndex: 'alarmno' + // }, { title: '鎶ヨ鍐呭', align: 'center', width: 250, - dataIndex: 'alarmcontent' + dataIndex: 'alarmContent' } ], url: { - list: '/mdc/equipmentBeilvAlarm/list' + list: '/mdc/mdcOverrunAlarm/list', + queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' + }, + ipagination: { + current: 1, + pageSize: 30, + pageSizeOptions: ['30', '50', '100'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 }, /* 鎺掑簭鍙傛暟 */ isorter: { - column: 'collecttime', + column: 'createTime', 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> -- Gitblit v1.9.3