From bf2e77248f05798c3f2904fe24416bb75c9e6476 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 03 七月 2025 17:33:48 +0800
Subject: [PATCH] 设备台账维修班组字段使用后台数据
---
src/views/mdc/base/EquipmentOperationParamsAlarm.vue | 100 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 94 insertions(+), 6 deletions(-)
diff --git a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue
index 46caa59..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: '#',
@@ -93,7 +128,19 @@
}
],
url: {
- list: '/mdc/mdcOverrunAlarm/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: {
@@ -101,6 +148,47 @@
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