From dbba6136b706d9b880c746670b1a5b4da7bbfb70 Mon Sep 17 00:00:00 2001 From: liwei <1598061435@qq.com> Date: Tue, 10 Sep 2024 16:15:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E9=83=A8=E7=BD=B2=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/AIStation/VoiceCommand.js | 22 + src/api/AIStation/VoiceCommandLocation.js | 19 + src/router/index.js | 8 + .../AIStation/ExtinguisherPage/index.vue | 76 +++- src/views/AIStation/MoveMonitorPage/index.vue | 74 ++- .../AIStation/PipelineTempPage/index.vue | 75 ++- src/views/AIStation/RecyclePumpPage/index.vue | 74 ++- src/views/AIStation/TransTempPage/index.vue | 74 ++- .../AIStation/VoiceCommandLocationPage.vue | 428 +++++++++++++++++- src/views/AIStation/VoiceCommandPage.vue | 212 ++++++--- 10 files changed, 894 insertions(+), 168 deletions(-) create mode 100644 src/api/AIStation/VoiceCommand.js create mode 100644 src/api/AIStation/VoiceCommandLocation.js diff --git a/src/api/AIStation/VoiceCommand.js b/src/api/AIStation/VoiceCommand.js new file mode 100644 index 00000000..5998aafa --- /dev/null +++ b/src/api/AIStation/VoiceCommand.js @@ -0,0 +1,22 @@ +import httpTwo from '../httpTwo' + + +export const getVoiceCommandsData = (item) => { + return httpTwo.get(`/busVoiceCommands/list?page=${item.page}&rows=${item.pageSize}&stationId=${item.stationId}&ipAddress=${item.ipAddress}&macAddress=${item.macAddress}&startTime=${item.startTime}&endTime=${item.endTime}`) +} + +export const addVoiceCommands = (item) => { + return httpTwo.post(`/busVoiceCommands/add`,item ) +} + +export const deleteVoiceCommands = (id) => { + return httpTwo.deletes(`/busVoiceCommands/deleteLogical/`+ id) +} + +export const updateVoiceCommands = (item) => { + return httpTwo.put(`/busVoiceCommands/update/${item.businessId}`,item) +} + +export const exportVoiceCommands = (item) => { + return httpTwo.get(`/busVoiceCommands/export`) +} diff --git a/src/api/AIStation/VoiceCommandLocation.js b/src/api/AIStation/VoiceCommandLocation.js new file mode 100644 index 00000000..31c76ff2 --- /dev/null +++ b/src/api/AIStation/VoiceCommandLocation.js @@ -0,0 +1,19 @@ +import httpTwo from '../httpTwo' +import axios from "axios"; + + +export const getVoiceCommandsLocationData = (item) => { + return httpTwo.get(`/busVoiceCommandsLocation/list?page=${item.page}&rows=${item.pageSize}&stationId=${item.stationId}&ipAddress=${item.ipAddress}&macAddress=${item.macAddress}`) +} + +export const addVoiceCommandsLocation = (item) => { + return httpTwo.post(`/busVoiceCommandsLocation/add`,item ) +} + +export const deleteVoiceCommandsLocation = (id) => { + return httpTwo.deletes(`/busVoiceCommandsLocation/deleteLogical/`+ id) +} + +export const updateVoiceCommandsLocation = (item) => { + return httpTwo.put(`/busVoiceCommandsLocation/update/${item.businessId}`,item) +} diff --git a/src/router/index.js b/src/router/index.js index 915c9d4c..efbd1c4d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -544,6 +544,14 @@ const routes = [ title: "è¯éŸ³æŒ‡ä»¤éƒ¨ç½²ä½ç½®", }, }, + { + path: "/AIStation/VoiceCommandLocation", + name: "VoiceCommandLocation", + component: () => import("@/views/AIStation/VoiceCommandLocationPage.vue"), + meta: { + title: "è¯éŸ³æŒ‡ä»¤éƒ¨ç½²ä½ç½®", + }, + }, ], }, { diff --git a/src/views/AIStation/ExtinguisherPage/index.vue b/src/views/AIStation/ExtinguisherPage/index.vue index f70fa2b7..abe3da36 100644 --- a/src/views/AIStation/ExtinguisherPage/index.vue +++ b/src/views/AIStation/ExtinguisherPage/index.vue @@ -7,7 +7,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs" import store from "../../../store/index.js"; import {getWeatherMagData} from "@/api/AIStation/Extinguisher.js"; import axios from 'axios' -const options = reactive([]); +const options = ref([]); const enterpriseId = ref(); const props = { multiple: true, emitPath: false } @@ -69,7 +69,7 @@ const alarmStatusList = [ value: 1 } ] -const stationId = ref([]); +const stationId = ref(); const queryParams = ref({ stationId: '', alarmStatus: '', @@ -159,7 +159,7 @@ const resetSearch = () => { startTime: '', endTime: '', } - stationId.value = [] + stationId.value = '' searchData.value = [] } @@ -172,6 +172,44 @@ function getEnterprise(){ enterpriseId.value = result[0].enterpriseId; } } +//èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// console.log('result:',result) +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } + //èŽ·å–æ¢çƒæœºç»„列表 function getSupplys(){ loading.value = true; @@ -181,34 +219,28 @@ function getSupplys(){ const result = store.getters.getEnterprise(); if (result) { result.forEach(element=>{ + let allItems = [] if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ - element.serviceCenterList.forEach(center=>{ - let c = []; - center.supplyList.forEach(supply => { - let chi = []; - supply.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) }); - c.push({ children: chi, label: supply.supplyName}); }); - options.push({children: c, label: center.serviceCenterName}); }) }else{ element.supplyList.forEach(element => { - let chi = []; element.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + allItems.push({ value: unit.unitId, label: unit.unitName }) }) - options.push({ children: chi, label: element.supplyName}); }) } } + options.value = allItems; }); } - // stationId.value.push(options[0].children[0].children[0].value); } - getSupplys(); // åˆå§‹åŒ–选ä¸çš„æ ‡ç¾é¡µ onMounted(() => { @@ -222,8 +254,16 @@ onMounted(() => { <div class="search-wrapper"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form-item label="æ¢çƒç«™ï¼š"> - <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" - placeholder="请选择" style="min-width: 210px;" /> +<!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="stationId" placeholder="请选择" style="min-width: 210px" filterable clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> </el-form-item> <el-form-item label="告è¦çжæ€:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-select placeholder="请选择" clearable style="width: 180px" v-model="queryParams.alarmStatus"> diff --git a/src/views/AIStation/MoveMonitorPage/index.vue b/src/views/AIStation/MoveMonitorPage/index.vue index 1c4c188a..9da9629b 100644 --- a/src/views/AIStation/MoveMonitorPage/index.vue +++ b/src/views/AIStation/MoveMonitorPage/index.vue @@ -7,7 +7,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs" import store from "../../../store/index.js"; -const options = reactive([]); +const options = ref([]); const enterpriseId = ref(); const props = { multiple: true, emitPath: false } @@ -97,7 +97,7 @@ const search = () => { const handleExport = () => { console.log('导出:', queryParams.value); }; -const stationId = ref([]); +const stationId = ref(); // é‡ç½® const resetSearch = () => { queryParams.value = { @@ -106,7 +106,7 @@ const resetSearch = () => { startTime: '', endTime: '', } - stationId.value = [] + stationId.value = '' } const loading = ref(true); getEnterprise(); @@ -117,6 +117,42 @@ function getEnterprise(){ } } //èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } +//èŽ·å–æ¢çƒæœºç»„列表 function getSupplys(){ loading.value = true; // tableData.length = 0; @@ -125,34 +161,28 @@ function getSupplys(){ const result = store.getters.getEnterprise(); if (result) { result.forEach(element=>{ + let allItems = [] if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ - element.serviceCenterList.forEach(center=>{ - let c = []; - center.supplyList.forEach(supply => { - let chi = []; - supply.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) }); - c.push({ children: chi, label: supply.supplyName}); }); - options.push({children: c, label: center.serviceCenterName}); }) }else{ element.supplyList.forEach(element => { - let chi = []; element.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + allItems.push({ value: unit.unitId, label: unit.unitName }) }) - options.push({ children: chi, label: element.supplyName}); }) } } + options.value = allItems; }); } - // stationId.value.push(options[0].children[0].children[0].value); } - getSupplys(); </script> @@ -161,8 +191,16 @@ getSupplys(); <div class="search-wrapper"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form-item label="æ¢çƒç«™ï¼š"> - <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" - placeholder="请选择" style="min-width: 210px;" /> +<!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="stationId" placeholder="请选择" style="min-width: 210px" filterable clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> </el-form-item> <el-form-item label="告è¦çжæ€:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> diff --git a/src/views/AIStation/PipelineTempPage/index.vue b/src/views/AIStation/PipelineTempPage/index.vue index 2247d82e..f1f694f5 100644 --- a/src/views/AIStation/PipelineTempPage/index.vue +++ b/src/views/AIStation/PipelineTempPage/index.vue @@ -95,6 +95,7 @@ const search = () => { endTime: queryParams.value.endTime, } console.log('查询:', item); + getSupplys() }; const handleExport = () => { @@ -109,12 +110,12 @@ const resetSearch = () => { startTime: '', endTime: '', } - stationId.value = [] + stationId.value = '' } -const options = reactive([]); +const options = ref([]); const enterpriseId = ref(); const props = { multiple: true, emitPath: false } -const stationId = ref([]); +const stationId = ref(); const loading = ref(true); getEnterprise(); function getEnterprise(){ @@ -123,6 +124,42 @@ function getEnterprise(){ enterpriseId.value = result[0].enterpriseId; } } +// //èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } //èŽ·å–æ¢çƒæœºç»„列表 function getSupplys(){ loading.value = true; @@ -132,34 +169,28 @@ function getSupplys(){ const result = store.getters.getEnterprise(); if (result) { result.forEach(element=>{ + let allItems = [] if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ - element.serviceCenterList.forEach(center=>{ - let c = []; - center.supplyList.forEach(supply => { - let chi = []; - supply.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) }); - c.push({ children: chi, label: supply.supplyName}); }); - options.push({children: c, label: center.serviceCenterName}); }) }else{ element.supplyList.forEach(element => { - let chi = []; element.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + allItems.push({ value: unit.unitId, label: unit.unitName }) }) - options.push({ children: chi, label: element.supplyName}); }) } } + options.value = allItems; }); } - // stationId.value.push(options[0].children[0].children[0].value); } - getSupplys(); </script> @@ -168,8 +199,16 @@ getSupplys(); <div class="search-wrapper"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form-item label="æ¢çƒç«™ï¼š"> - <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" - placeholder="请选择" style="min-width: 210px;" /> +<!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="stationId" placeholder="请选择" style="min-width: 210px" filterable clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> </el-form-item> <el-form-item label="告è¦çжæ€:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> diff --git a/src/views/AIStation/RecyclePumpPage/index.vue b/src/views/AIStation/RecyclePumpPage/index.vue index a6d327d6..616dfcdd 100644 --- a/src/views/AIStation/RecyclePumpPage/index.vue +++ b/src/views/AIStation/RecyclePumpPage/index.vue @@ -127,12 +127,12 @@ const resetSearch = () => { startTime: '', endTime: '', } - stationId.value = [] + stationId.value = '' }; -const options = reactive([]); +const options = ref([]); const enterpriseId = ref(); const props = { multiple: true, emitPath: false } -const stationId = ref([]); +const stationId = ref(); const loading = ref(true); getEnterprise(); function getEnterprise(){ @@ -142,6 +142,42 @@ function getEnterprise(){ } } //èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } +//èŽ·å–æ¢çƒæœºç»„列表 function getSupplys(){ loading.value = true; // tableData.length = 0; @@ -150,34 +186,28 @@ function getSupplys(){ const result = store.getters.getEnterprise(); if (result) { result.forEach(element=>{ + let allItems = [] if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ - element.serviceCenterList.forEach(center=>{ - let c = []; - center.supplyList.forEach(supply => { - let chi = []; - supply.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) }); - c.push({ children: chi, label: supply.supplyName}); }); - options.push({children: c, label: center.serviceCenterName}); }) }else{ element.supplyList.forEach(element => { - let chi = []; element.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + allItems.push({ value: unit.unitId, label: unit.unitName }) }) - options.push({ children: chi, label: element.supplyName}); }) } } + options.value = allItems; }); } - // stationId.value.push(options[0].children[0].children[0].value); } - getSupplys(); </script> @@ -186,8 +216,16 @@ getSupplys(); <div class="search-wrapper"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form-item label="æ¢çƒç«™ï¼š"> - <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" - placeholder="请选择" style="min-width: 210px;" /> +<!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="stationId" placeholder="请选择" style="min-width: 210px" filterable clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> </el-form-item> <el-form-item label="告è¦çжæ€:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> diff --git a/src/views/AIStation/TransTempPage/index.vue b/src/views/AIStation/TransTempPage/index.vue index 45d61bc2..96da6db5 100644 --- a/src/views/AIStation/TransTempPage/index.vue +++ b/src/views/AIStation/TransTempPage/index.vue @@ -127,12 +127,12 @@ const resetSearch = () => { startTime: '', endTime: '', } - stationId.value = [] + stationId.value = '' }; -const options = reactive([]); +const options = ref([]); const enterpriseId = ref(); const props = { multiple: true, emitPath: false } -const stationId = ref([]); +const stationId = ref(); const loading = ref(true); getEnterprise(); function getEnterprise(){ @@ -142,6 +142,42 @@ function getEnterprise(){ } } //èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } +//èŽ·å–æ¢çƒæœºç»„列表 function getSupplys(){ loading.value = true; // tableData.length = 0; @@ -150,34 +186,28 @@ function getSupplys(){ const result = store.getters.getEnterprise(); if (result) { result.forEach(element=>{ + let allItems = [] if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ - element.serviceCenterList.forEach(center=>{ - let c = []; - center.supplyList.forEach(supply => { - let chi = []; - supply.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) }); - c.push({ children: chi, label: supply.supplyName}); }); - options.push({children: c, label: center.serviceCenterName}); }) }else{ element.supplyList.forEach(element => { - let chi = []; element.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + allItems.push({ value: unit.unitId, label: unit.unitName }) }) - options.push({ children: chi, label: element.supplyName}); }) } } + options.value = allItems; }); } - // stationId.value.push(options[0].children[0].children[0].value); } - getSupplys(); </script> @@ -186,8 +216,16 @@ getSupplys(); <div class="search-wrapper"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form-item label="æ¢çƒç«™ï¼š"> - <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" - placeholder="请选择" style="min-width: 210px;" /> +<!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="stationId" placeholder="请选择" style="min-width: 210px" filterable clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> </el-form-item> <el-form-item label="告è¦çжæ€:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> diff --git a/src/views/AIStation/VoiceCommandLocationPage.vue b/src/views/AIStation/VoiceCommandLocationPage.vue index eff61de5..605e66ee 100644 --- a/src/views/AIStation/VoiceCommandLocationPage.vue +++ b/src/views/AIStation/VoiceCommandLocationPage.vue @@ -1,13 +1,435 @@ -<script> +<script setup> +import {reactive, ref} from "vue"; +import zhCn from "element-plus/dist/locale/zh-cn.mjs" +import axios from "axios"; +import store from "../../store"; +import {getVoiceCommandsLocationData,deleteVoiceCommandsLocation,addVoiceCommandsLocation,updateVoiceCommandsLocation} from "../../api/AIStation/VoiceCommandLocation"; +// 查询æ¡ä»¶ +const queryParams = ref({ + stationId: '',//æ¢çƒç«™id + ipAddress: '',//ipåœ°å€ + macAddress: '',//macåœ°å€ +}); + +//ä¾›çƒç«™è¯¦æƒ…æ•°æ® +const singleDetails = ref({ + stationName: 'ä¾›çƒç«™1',//æ¢çƒç«™åç§° + code: '1',//ç¼–å· + ipAddress: '192.168.11.11', + macAddress: 'A2-B2-C2-D2-02-2C', +}) + +//新增或修改表å•傿•° +const addOrUpdateForm = ref({ + businessId: '', + code: '',//ç¼–å· + stationId: '',//æ¢çƒç«™id + ipAddress: '',//ipåœ°å€ + macAddress: '',//macåœ°å€ +}) + +//åˆ—è¡¨æ•°æ® +const voiceCommandLocationData = ref([ + { + businessId: '1', + stationId: 'e1289fbe-9d71-4426-a500-d3024a8c84c1', + code: '1111', + stationName: 'æ¢çƒç«™1', + macAddress: 'A1-B1-C1-D1-01-1C', + ipAddress: '192.168.11.1', + }, + { + businessId: '2', + stationId: 'b6216c70-d0c0-465f-8019-594dfa954a7c', + code: '222', + stationName: 'æ¢çƒç«™2', + macAddress: 'A2-B2-C2-D2-02-2C', + ipAddress: '192.168.11.2', + } +]) + +const enterpriseId = ref(); +const loading = ref(true); +const props = { multiple: true, emitPath: false } +//æ¢çƒç«™åˆ—表 +const options = ref([]) +// 分页 +const Page = reactive({total: 0, pageSize: 20, page: 1}); +// 详情弹窗 +const detailOpen = ref(false) +//新增 修改弹窗 +const dialogFormVisible = ref(false) +//新增或修改表å•çš„title +const formTitle = ref('') + +//åŠ è½½åˆ—è¡¨æ•°æ® +loadData() +function loadData(){ + console.log('调用了LoadData') + const item = { + page: Page.page, + pageSize: Page.pageSize, + stationId: queryParams.value.stationId, + ipAddress: queryParams.value.ipAddress, + macAddress: queryParams.value.macAddress, + } + console.log('item:',item) + //æŸ¥è¯¢æ•°æ® + getVoiceCommandsLocationData(item).then(res => { + voiceCommandLocationData.value = res.rows + }) +} + +const handleFormData = async () => { + const item = { + businessId: addOrUpdateForm.value.businessId, + stationId: addOrUpdateForm.value.stationId, + code: addOrUpdateForm.value.code, + ipAddress: addOrUpdateForm.value.ipAddress, + macAddress: addOrUpdateForm.value.macAddress, + } + if (addOrUpdateForm.value.businessId === ''){ + console.log('走新增-----') + //新增 è°ƒæ–°å¢žçš„æŽ¥å£ + addVoiceCommandsLocation(item).then(res => { + dialogFormVisible.value = false + }).catch((err) => { + console.log('err:',err) + dialogFormVisible.value = false + }).finally(() =>{ + loadData() + }) + } else { + console.log('走修改---') + updateVoiceCommandsLocation(item).then(res => { + dialogFormVisible.value = false + }).catch((err) => { + console.log('err:',err) + dialogFormVisible.value = false + }).finally(() =>{ + loadData() + }) + } +}; + +// é‡ç½®æŒ‰é’® +const resetSearch = () => { + queryParams.value = { + stationId: '',//ä¾›çƒç«™id + ipAddress: '',//idåœ°å€ + macAddress: '',//macåœ°å€ + } + loadData() +} + +const tableHeaderClass = data => { // è¡¨å¤´æ ·å¼ + return 'table-header-class' +} +const tableBodyClass = data => { // è¡¨ä½“æ ·å¼ + return 'table-body-class' +} + +// åˆ†é¡µå¤§å°æ”¹å˜æ—¶è§¦å‘ +const handleSizeChange = (val) => { + Page.pageSize = val; +}; + +// 当å‰é¡µæ”¹å˜æ—¶è§¦å‘ +const handleCurrentChange = (val) => { + Page.page = val; +}; + +//è¯¦æƒ…æŒ‰é’®è§¦å‘ +function handleDetail(row) { + console.log('详情:', row) + singleDetails.value = row + detailOpen.value = true +} + +//æ–°å¢žæŒ‰é’®è§¦å‘ +function handleAddButton(row) { + addOrUpdateForm.value = { + businessId: '', + stationId: '',//æ¢çƒç«™id + code: '',//æ¢çƒç«™ç¼–å· + ipAddress: '',//idåœ°å€ + macAddress: '',//macåœ°å€ + } + formTitle.value = '新增' + dialogFormVisible.value = true +} + +//ä¿®æ”¹æŒ‰é’®è§¦å‘ +function handleUpdateButton(row) { + addOrUpdateForm.value = row + formTitle.value = '修改' + dialogFormVisible.value = true +} + +//åˆ é™¤æŒ‰é’® +function deleteButton(row) { + console.log('row.businessId:', row.businessId) + deleteVoiceCommandsLocation(row.businessId).then(res => { + loadData() + console.log('åˆ é™¤:') + }).catch((err) => { + console.log(err) + }).finally(() =>{ + loadData() + }) +} +// //èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } + +getEnterprise(); +function getEnterprise(){ + const result = store.getters.getEnterprise(); + if (result) { + enterpriseId.value = result[0].enterpriseId; + } +} +//èŽ·å–æ¢çƒæœºç»„列表 +function getSupplys(){ + loading.value = true; + // tableData.length = 0; + options.length = 0; + const result = store.getters.getEnterprise(); + if (result) { + result.forEach(element=>{ + let allItems = [] + if(element.enterpriseId === enterpriseId.value){ + if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) + }); + }); + }) + }else{ + element.supplyList.forEach(element => { + element.transferList.forEach(unit => { + allItems.push({ value: unit.unitId, label: unit.unitName }) + }) + }) + } + } + options.value = allItems; + }); + } +} +getSupplys() </script> <template> - + <div> + <div class="ExtinguisherPage-container"> + <div class="search-wrapper"> + <el-form style="padding: 10px 0 0 10px" :model="queryParams" :inline="true"> + <el-form-item label="æ¢çƒç«™ï¼š"> +<!-- <el-cascader :options="options" v-model="queryParams.stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="queryParams.stationId" placeholder="请选择" style="min-width: 210px" filterable clearable > + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="MAC地å€:" prop="macAddress"> + <el-input placeholder="请输入MAC地å€" style="width: 180px" v-model="queryParams.macAddress"/> + </el-form-item> + <el-form-item label="IP地å€:" prop="ipAddress"> + <el-input placeholder="请输入IP地å€" style="width: 180px" v-model="queryParams.ipAddress"/> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="loadData()" class="add-search-btn">查询</el-button> + <el-button type="primary" @click="resetSearch()" class="add-search-btn">é‡ç½®</el-button> + </el-form-item> + </el-form> + </div> + <div> + <el-button type="primary" @click="handleAddButton()" class="add-search-btn" style="margin-left: 15px">新增</el-button> + </div> + <div> + <el-table + :data="voiceCommandLocationData" + border + style="width: 98%;margin-left: 15px" + height="calc(85vh - 170px)" + :header-cell-class-name="tableHeaderClass" + :row-class-name="tableBodyClass" + > + <el-table-column type="index" label="åºå·" align="center" width="100"/> + <el-table-column prop="stationName" align="center" label="æ¢çƒç«™" sortable/> + <el-table-column prop="code" align="center" label="ç¼–å·" sortable/> + <el-table-column prop="macAddress" align="center" label="MAC地å€"/> + <el-table-column prop="ipAddress" align="center" label="IP 地å€"/> + <el-table-column label="æ“作" align="center" width="190" fixed="right"> + <template #default="scope"> + <div class="table-operate-column"> + <el-button link @click="handleDetail(scope.row)" type="primary">详情</el-button> + <el-button link @click="handleUpdateButton(scope.row)" type="primary">编辑</el-button> + <el-button link @click="deleteButton(scope.row)" type="primary">åˆ é™¤</el-button> + </div> + </template> + </el-table-column> + </el-table> + <el-pagination v-model:current-page="Page.page" v-model:page-size="Page.pageSize" + :page-sizes="[20, 30, 50, 100, 200, 300, 400]" :disabled="disabled" + layout="total, sizes, prev, pager, next, jumper" :total="Page.total" + @size-change="handleSizeChange" @current-change="handleCurrentChange" class="pagination"/> + </div> + <div class="dialog-Extinguisher"> + <el-dialog title="查看详情" + v-model="detailOpen" + width="700px" + :close-on-click-modal="false" + append-to-body> + <el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form"> + <el-row> + <el-col :span="12"> + <el-form-item label="æ¢çƒç«™ï¼š" prop="stationName"> + {{ singleDetails.stationName || '-' }} + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="ç¼–å·ï¼š" prop="code"> + <span>{{ singleDetails.code || '-' }}</span> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="MAC地å€ï¼š" prop="macAddress"> + <span>{{ singleDetails.macAddress || '-' }}</span> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="ip地å€ï¼š" prop="ipAddress"> + <span>{{ singleDetails.ipAddress || '-' }}</span> + </el-form-item> + </el-col> + </el-row> + </el-form> + </el-dialog> + </div> + <el-dialog :title="formTitle" v-model="dialogFormVisible" label-width="80px"> + <el-form label-width="80px"> + <el-form-item label="æ¢çƒç«™ï¼š"> +<!-- <el-cascader :options="options" v-model="addOrUpdateForm.stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="addOrUpdateForm.stationId" placeholder="请选择"> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="ç¼–å·:"> + <el-input v-model="addOrUpdateForm.code" placeholder="请选择编å·"></el-input> + </el-form-item> + <el-form-item label="MAC地å€:"> + <el-input v-model="addOrUpdateForm.macAddress" placeholder="请输入MAC地å€"></el-input> + </el-form-item> + <el-form-item label="IP地å€:"> + <el-input v-model="addOrUpdateForm.ipAddress" placeholder="请输入IP地å€"></el-input> + </el-form-item> + </el-form> + <div slot="footer" class="addDialog-footer"> + <el-button @click="dialogFormVisible = false">å– æ¶ˆ</el-button> + <el-button type="primary" @click="handleFormData()">ç¡® 定</el-button> + </div> + </el-dialog> + </div> + </div> </template> +<style scoped> +.ExtinguisherPage-container { + width: 100%; + background-color: white; +} +.search-wrapper { + width: 100%; + display: flex; + justify-content: start; +} -<style scoped> +.search-wrapper .el-row { + width: 50%; + border: none; + display: flex; + align-items: center; + margin: 5px 10px 5px 5px; +} + +.table-operate-column { + display: flex; + justify-content: center; + align-items: center; +} + +.table-operate-column .el-button { + font-size: 12px; +} + +.add-search-btn { + margin: 5px 10px 5px 0; +} +.pagination { + padding: 0; + margin-left: 20px; + height: 40px; + vertical-align: middle; +} +.addDialog-footer{ + display: flex; + justify-content: right; +} </style> diff --git a/src/views/AIStation/VoiceCommandPage.vue b/src/views/AIStation/VoiceCommandPage.vue index 718aac0b..595a7d62 100644 --- a/src/views/AIStation/VoiceCommandPage.vue +++ b/src/views/AIStation/VoiceCommandPage.vue @@ -2,22 +2,92 @@ import {reactive, ref} from "vue"; import zhCn from "element-plus/dist/locale/zh-cn.mjs" import store from "../../store/index.js"; +import {getVoiceCommandsData,deleteVoiceCommands,addVoiceCommands,updateVoiceCommands,exportVoiceCommands} from "../../api/AIStation/VoiceCommand"; + + + +const options = ref([]); +const enterpriseId = ref(); +const props = { multiple: true, emitPath: false } +const stationId = ref(); +const loading = ref(true); +// 分页 +const Page = reactive({total: 0, pageSize: 20, page: 1}); +const VoiceCommandData = ref([ + { + stationId: '1', + question: 'æ’æŠ¥å¤©æ°”é¢„æŠ¥', + answer: '今天天气晴朗', + updateDate: '2023-02-01 12:00:00', + macAddress: 'A1-B1-C1-D1-01-1C', + ipAddress: '192.168.11.1', + result: '0' + }, + { + stationId: '2', + question: '说一下用电é‡', + answer: '当å‰ç«™ç”µè¡¨æŠ„表æ®å’Œè¿‘三日用é‡', + updateDate: '2024-12-11 12:00:00', + macAddress: 'A2-B2-C2-D2-02-2C', + ipAddress: '192.168.11.2', + result: '1' + } +]) +// 详情弹窗 +const detailOpen = ref(false) +const singleDetails = { + updateDate: '2023-02-11 12:00:00', + stationId: '1', + result: '1', + question: '说一下用电é‡', + answer: '当å‰ç«™ç”µè¡¨æŠ„表æ®å’Œè¿‘三日用é‡', + ipAddress: '192.168.11.2', + macAddress: 'A2-B2-C2-D2-02-2C', +} + +// ä¾›çƒç«™ +const heatStationList = [ + { + label: '行政区供çƒç«™', + value: 1 + }, + { + label: '东部供çƒç«™', + value: 2 + }, + { + label: 'å°çŽ‹åº„ä¾›çƒç«™', + value: 3 + } +] + const queryParams = ref({ + stationId: '', startTime: '', endTime: '', ipAddress: '', macAddress: '', }); -const search = () => { + +//åŠ è½½åˆ—è¡¨æ•°æ® +function loadData(){ + console.log('调用了LoadData') const item = { - stationId: stationId.value, + page: Page.page, + pageSize: Page.pageSize, + stationId: queryParams.value.stationId, startTime: queryParams.value.startTime, endTime: queryParams.value.endTime, ipAddress: queryParams.value.ipAddress, macAddress: queryParams.value.macAddress, } - console.log('查询:', item); -}; + console.log('item:',item) + //æŸ¥è¯¢æ•°æ® + getVoiceCommandsData(item).then(res => { + VoiceCommandData.value = res.rows + }) +} +loadData() const handleExport = () => { console.log('导出:', queryParams.value); @@ -26,18 +96,16 @@ const handleExport = () => { // é‡ç½® const resetSearch = () => { queryParams.value = { - alarmStatus: '', - alarmType: '', + stationId: '', startTime: '', endTime: '', + ipAddress: '', + macAddress: '', } - stationId.value = [] + loadData(); }; -const options = reactive([]); -const enterpriseId = ref(); -const props = { multiple: true, emitPath: false } -const stationId = ref([]); -const loading = ref(true); + + getEnterprise(); function getEnterprise(){ const result = store.getters.getEnterprise(); @@ -45,6 +113,43 @@ function getEnterprise(){ enterpriseId.value = result[0].enterpriseId; } } + +//èŽ·å–æ¢çƒæœºç»„列表 +// function getSupplys(){ +// loading.value = true; +// // tableData.length = 0; +// options.length = 0; +// stationId.length = 0; +// const result = store.getters.getEnterprise(); +// if (result) { +// result.forEach(element=>{ +// if(element.enterpriseId=== enterpriseId.value){ +// if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ +// element.serviceCenterList.forEach(center=>{ +// let c = []; +// center.supplyList.forEach(supply => { +// let chi = []; +// supply.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }); +// c.push({ children: chi, label: supply.supplyName}); +// }); +// options.push({children: c, label: center.serviceCenterName}); +// }) +// }else{ +// element.supplyList.forEach(element => { +// let chi = []; +// element.transferList.forEach(unit => { +// chi.push({ value: unit.unitId, label: unit.unitName }); +// }) +// options.push({ children: chi, label: element.supplyName}); +// }) +// } +// } +// }); +// } +// // stationId.value.push(options[0].children[0].children[0].value); +// } //èŽ·å–æ¢çƒæœºç»„列表 function getSupplys(){ loading.value = true; @@ -54,38 +159,31 @@ function getSupplys(){ const result = store.getters.getEnterprise(); if (result) { result.forEach(element=>{ + let allItems = [] if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ - element.serviceCenterList.forEach(center=>{ - let c = []; - center.supplyList.forEach(supply => { - let chi = []; - supply.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + element.serviceCenterList.forEach(center=>{//é历一级目录下的 + center.supplyList.forEach(supply => {//拿到一级目录下的然åŽé历它二级目录下的 + supply.transferList.forEach(unit => {//拿到 + allItems.push({ value: unit.unitId, label: unit.unitName }) }); - c.push({ children: chi, label: supply.supplyName}); }); - options.push({children: c, label: center.serviceCenterName}); }) }else{ element.supplyList.forEach(element => { - let chi = []; element.transferList.forEach(unit => { - chi.push({ value: unit.unitId, label: unit.unitName }); + allItems.push({ value: unit.unitId, label: unit.unitName }) }) - options.push({ children: chi, label: element.supplyName}); }) } } + options.value = allItems; }); } - // stationId.value.push(options[0].children[0].children[0].value); } - getSupplys(); -// 分页 -const Page = reactive({total: 2, pageSize: 20, page: 1}); + const tableHeaderClass = data => { // è¡¨å¤´æ ·å¼ return 'table-header-class' } @@ -101,51 +199,7 @@ const handleSizeChange = (val) => { const handleCurrentChange = (val) => { Page.page = val; }; -const VoiceCommandData = [ - { - stationId: '1', - question: 'æ’æŠ¥å¤©æ°”é¢„æŠ¥', - answer: '今天天气晴朗', - updateDate: '2023-02-01 12:00:00', - macAddress: 'A1-B1-C1-D1-01-1C', - ipAddress: '192.168.11.1', - result: '0' - }, - { - stationId: '2', - question: '说一下用电é‡', - answer: '当å‰ç«™ç”µè¡¨æŠ„表æ®å’Œè¿‘三日用é‡', - updateDate: '2024-12-11 12:00:00', - macAddress: 'A2-B2-C2-D2-02-2C', - ipAddress: '192.168.11.2', - result: '1' - }] -// 详情弹窗 -const detailOpen = ref(false) -const singleDetails = { - updateDate: '2023-02-11 12:00:00', - stationId: '1', - result: '1', - question: '说一下用电é‡', - answer: '当å‰ç«™ç”µè¡¨æŠ„表æ®å’Œè¿‘三日用é‡', - ipAddress: '192.168.11.2', - macAddress: 'A2-B2-C2-D2-02-2C', -} -// ä¾›çƒç«™ -const heatStationList = [ - { - label: '行政区供çƒç«™', - value: 1 - }, - { - label: '东部供çƒç«™', - value: 2 - }, - { - label: 'å°çŽ‹åº„ä¾›çƒç«™', - value: 3 - } -] + function handleDetail(row) { singleDetails.value = row detailOpen.value = true @@ -159,8 +213,16 @@ function handleDetail(row) { <div class="search-wrapper"> <el-form style="padding: 10px 0 0 10px" :model="queryParams" :inline="true"> <el-form-item label="æ¢çƒç«™ï¼š"> - <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" - placeholder="请选择" style="min-width: 210px;" /> +<!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"--> +<!-- placeholder="请选择" style="min-width: 210px;" />--> + <el-select v-model="queryParams.stationId" placeholder="请选择" style="min-width: 210px" filterable clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> </el-form-item> <el-form-item label="IP地å€:" prop="ipAddress"> <el-input placeholder="" style="width: 180px" v-model="queryParams.ipAddress"/> @@ -191,7 +253,7 @@ function handleDetail(row) { </el-config-provider> </el-form-item> <el-form-item> - <el-button type="primary" @click="search" class="add-search-btn">查询</el-button> + <el-button type="primary" @click="loadData()" class="add-search-btn">查询</el-button> <el-button type="primary" @click="resetSearch" class="add-search-btn">é‡ç½®</el-button> <el-button type="primary" @click="handleExport" class="add-search-btn">导出</el-button> </el-form-item> -- 2.22.0