Commit dbba6136 authored by liwei's avatar liwei

语音部署位置页面

parent 1dadf10b
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`)
}
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)
}
...@@ -544,6 +544,14 @@ const routes = [ ...@@ -544,6 +544,14 @@ const routes = [
title: "语音指令部署位置", title: "语音指令部署位置",
}, },
}, },
{
path: "/AIStation/VoiceCommandLocation",
name: "VoiceCommandLocation",
component: () => import("@/views/AIStation/VoiceCommandLocationPage.vue"),
meta: {
title: "语音指令部署位置",
},
},
], ],
}, },
{ {
......
...@@ -7,7 +7,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs" ...@@ -7,7 +7,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import store from "../../../store/index.js"; import store from "../../../store/index.js";
import {getWeatherMagData} from "@/api/AIStation/Extinguisher.js"; import {getWeatherMagData} from "@/api/AIStation/Extinguisher.js";
import axios from 'axios' import axios from 'axios'
const options = reactive([]); const options = ref([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = { multiple: true, emitPath: false } const props = { multiple: true, emitPath: false }
...@@ -69,7 +69,7 @@ const alarmStatusList = [ ...@@ -69,7 +69,7 @@ const alarmStatusList = [
value: 1 value: 1
} }
] ]
const stationId = ref([]); const stationId = ref();
const queryParams = ref({ const queryParams = ref({
stationId: '', stationId: '',
alarmStatus: '', alarmStatus: '',
...@@ -159,7 +159,7 @@ const resetSearch = () => { ...@@ -159,7 +159,7 @@ const resetSearch = () => {
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
stationId.value = [] stationId.value = ''
searchData.value = [] searchData.value = []
} }
...@@ -172,6 +172,44 @@ function getEnterprise(){ ...@@ -172,6 +172,44 @@ function getEnterprise(){
enterpriseId.value = result[0].enterpriseId; 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(){ function getSupplys(){
loading.value = true; loading.value = true;
...@@ -181,34 +219,28 @@ function getSupplys(){ ...@@ -181,34 +219,28 @@ function getSupplys(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
if (result) { if (result) {
result.forEach(element=>{ result.forEach(element=>{
let allItems = []
if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{ element.serviceCenterList.forEach(center=>{//遍历一级目录下的
let c = []; center.supplyList.forEach(supply => {//拿到一级目录下的然后遍历它二级目录下的
center.supplyList.forEach(supply => { supply.transferList.forEach(unit => {//拿到
let chi = []; allItems.push({ value: unit.unitId, label: unit.unitName })
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{ }else{
element.supplyList.forEach(element => { element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => { 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(); getSupplys();
// 初始化选中的标签页 // 初始化选中的标签页
onMounted(() => { onMounted(() => {
...@@ -222,8 +254,16 @@ onMounted(() => { ...@@ -222,8 +254,16 @@ onMounted(() => {
<div class="search-wrapper"> <div class="search-wrapper">
<el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px">
<el-form-item label="换热站:"> <el-form-item label="换热站:">
<el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" <!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"-->
placeholder="请选择" style="min-width: 210px;" /> <!-- 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>
<el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1">
<el-select placeholder="请选择" clearable style="width: 180px" v-model="queryParams.alarmStatus"> <el-select placeholder="请选择" clearable style="width: 180px" v-model="queryParams.alarmStatus">
......
...@@ -7,7 +7,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs" ...@@ -7,7 +7,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import store from "../../../store/index.js"; import store from "../../../store/index.js";
const options = reactive([]); const options = ref([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = { multiple: true, emitPath: false } const props = { multiple: true, emitPath: false }
...@@ -97,7 +97,7 @@ const search = () => { ...@@ -97,7 +97,7 @@ const search = () => {
const handleExport = () => { const handleExport = () => {
console.log('导出:', queryParams.value); console.log('导出:', queryParams.value);
}; };
const stationId = ref([]); const stationId = ref();
// 重置 // 重置
const resetSearch = () => { const resetSearch = () => {
queryParams.value = { queryParams.value = {
...@@ -106,7 +106,7 @@ const resetSearch = () => { ...@@ -106,7 +106,7 @@ const resetSearch = () => {
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
stationId.value = [] stationId.value = ''
} }
const loading = ref(true); const loading = ref(true);
getEnterprise(); getEnterprise();
...@@ -117,6 +117,42 @@ function 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(){ function getSupplys(){
loading.value = true; loading.value = true;
// tableData.length = 0; // tableData.length = 0;
...@@ -125,34 +161,28 @@ function getSupplys(){ ...@@ -125,34 +161,28 @@ function getSupplys(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
if (result) { if (result) {
result.forEach(element=>{ result.forEach(element=>{
let allItems = []
if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{ element.serviceCenterList.forEach(center=>{//遍历一级目录下的
let c = []; center.supplyList.forEach(supply => {//拿到一级目录下的然后遍历它二级目录下的
center.supplyList.forEach(supply => { supply.transferList.forEach(unit => {//拿到
let chi = []; allItems.push({ value: unit.unitId, label: unit.unitName })
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{ }else{
element.supplyList.forEach(element => { element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => { 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(); getSupplys();
</script> </script>
...@@ -161,8 +191,16 @@ getSupplys(); ...@@ -161,8 +191,16 @@ getSupplys();
<div class="search-wrapper"> <div class="search-wrapper">
<el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px">
<el-form-item label="换热站:"> <el-form-item label="换热站:">
<el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" <!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"-->
placeholder="请选择" style="min-width: 210px;" /> <!-- 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>
<el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1">
<el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus">
......
...@@ -95,6 +95,7 @@ const search = () => { ...@@ -95,6 +95,7 @@ const search = () => {
endTime: queryParams.value.endTime, endTime: queryParams.value.endTime,
} }
console.log('查询:', item); console.log('查询:', item);
getSupplys()
}; };
const handleExport = () => { const handleExport = () => {
...@@ -109,12 +110,12 @@ const resetSearch = () => { ...@@ -109,12 +110,12 @@ const resetSearch = () => {
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
stationId.value = [] stationId.value = ''
} }
const options = reactive([]); const options = ref([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = { multiple: true, emitPath: false } const props = { multiple: true, emitPath: false }
const stationId = ref([]); const stationId = ref();
const loading = ref(true); const loading = ref(true);
getEnterprise(); getEnterprise();
function getEnterprise(){ function getEnterprise(){
...@@ -123,6 +124,42 @@ function getEnterprise(){ ...@@ -123,6 +124,42 @@ function getEnterprise(){
enterpriseId.value = result[0].enterpriseId; 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(){ function getSupplys(){
loading.value = true; loading.value = true;
...@@ -132,34 +169,28 @@ function getSupplys(){ ...@@ -132,34 +169,28 @@ function getSupplys(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
if (result) { if (result) {
result.forEach(element=>{ result.forEach(element=>{
let allItems = []
if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{ element.serviceCenterList.forEach(center=>{//遍历一级目录下的
let c = []; center.supplyList.forEach(supply => {//拿到一级目录下的然后遍历它二级目录下的
center.supplyList.forEach(supply => { supply.transferList.forEach(unit => {//拿到
let chi = []; allItems.push({ value: unit.unitId, label: unit.unitName })
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{ }else{
element.supplyList.forEach(element => { element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => { 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(); getSupplys();
</script> </script>
...@@ -168,8 +199,16 @@ getSupplys(); ...@@ -168,8 +199,16 @@ getSupplys();
<div class="search-wrapper"> <div class="search-wrapper">
<el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px">
<el-form-item label="换热站:"> <el-form-item label="换热站:">
<el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" <!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"-->
placeholder="请选择" style="min-width: 210px;" /> <!-- 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>
<el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1">
<el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus">
......
...@@ -127,12 +127,12 @@ const resetSearch = () => { ...@@ -127,12 +127,12 @@ const resetSearch = () => {
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
stationId.value = [] stationId.value = ''
}; };
const options = reactive([]); const options = ref([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = { multiple: true, emitPath: false } const props = { multiple: true, emitPath: false }
const stationId = ref([]); const stationId = ref();
const loading = ref(true); const loading = ref(true);
getEnterprise(); getEnterprise();
function getEnterprise(){ function getEnterprise(){
...@@ -142,6 +142,42 @@ 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(){ function getSupplys(){
loading.value = true; loading.value = true;
// tableData.length = 0; // tableData.length = 0;
...@@ -150,34 +186,28 @@ function getSupplys(){ ...@@ -150,34 +186,28 @@ function getSupplys(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
if (result) { if (result) {
result.forEach(element=>{ result.forEach(element=>{
let allItems = []
if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{ element.serviceCenterList.forEach(center=>{//遍历一级目录下的
let c = []; center.supplyList.forEach(supply => {//拿到一级目录下的然后遍历它二级目录下的
center.supplyList.forEach(supply => { supply.transferList.forEach(unit => {//拿到
let chi = []; allItems.push({ value: unit.unitId, label: unit.unitName })
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{ }else{
element.supplyList.forEach(element => { element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => { 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(); getSupplys();
</script> </script>
...@@ -186,8 +216,16 @@ getSupplys(); ...@@ -186,8 +216,16 @@ getSupplys();
<div class="search-wrapper"> <div class="search-wrapper">
<el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px">
<el-form-item label="换热站:"> <el-form-item label="换热站:">
<el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" <!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"-->
placeholder="请选择" style="min-width: 210px;" /> <!-- 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>
<el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1">
<el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus">
......
...@@ -127,12 +127,12 @@ const resetSearch = () => { ...@@ -127,12 +127,12 @@ const resetSearch = () => {
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
stationId.value = [] stationId.value = ''
}; };
const options = reactive([]); const options = ref([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = { multiple: true, emitPath: false } const props = { multiple: true, emitPath: false }
const stationId = ref([]); const stationId = ref();
const loading = ref(true); const loading = ref(true);
getEnterprise(); getEnterprise();
function getEnterprise(){ function getEnterprise(){
...@@ -142,6 +142,42 @@ 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(){ function getSupplys(){
loading.value = true; loading.value = true;
// tableData.length = 0; // tableData.length = 0;
...@@ -150,34 +186,28 @@ function getSupplys(){ ...@@ -150,34 +186,28 @@ function getSupplys(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
if (result) { if (result) {
result.forEach(element=>{ result.forEach(element=>{
let allItems = []
if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{ element.serviceCenterList.forEach(center=>{//遍历一级目录下的
let c = []; center.supplyList.forEach(supply => {//拿到一级目录下的然后遍历它二级目录下的
center.supplyList.forEach(supply => { supply.transferList.forEach(unit => {//拿到
let chi = []; allItems.push({ value: unit.unitId, label: unit.unitName })
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{ }else{
element.supplyList.forEach(element => { element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => { 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(); getSupplys();
</script> </script>
...@@ -186,8 +216,16 @@ getSupplys(); ...@@ -186,8 +216,16 @@ getSupplys();
<div class="search-wrapper"> <div class="search-wrapper">
<el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px"> <el-form :model="queryParams" :inline="true" style="padding: 10px 0 0 10px">
<el-form-item label="换热站:"> <el-form-item label="换热站:">
<el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" <!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"-->
placeholder="请选择" style="min-width: 210px;" /> <!-- 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>
<el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1"> <el-form-item label="告警状态:" prop="alarmStatus" v-show="selectedBtn === 1">
<el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus"> <el-select placeholder="" clearable style="width: 180px" v-model="queryParams.alarmStatus">
......
...@@ -2,22 +2,92 @@ ...@@ -2,22 +2,92 @@
import {reactive, ref} from "vue"; import {reactive, ref} from "vue";
import zhCn from "element-plus/dist/locale/zh-cn.mjs" import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import store from "../../store/index.js"; 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({ const queryParams = ref({
stationId: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
ipAddress: '', ipAddress: '',
macAddress: '', macAddress: '',
}); });
const search = () => {
//加载列表数据
function loadData(){
console.log('调用了LoadData')
const item = { const item = {
stationId: stationId.value, page: Page.page,
pageSize: Page.pageSize,
stationId: queryParams.value.stationId,
startTime: queryParams.value.startTime, startTime: queryParams.value.startTime,
endTime: queryParams.value.endTime, endTime: queryParams.value.endTime,
ipAddress: queryParams.value.ipAddress, ipAddress: queryParams.value.ipAddress,
macAddress: queryParams.value.macAddress, macAddress: queryParams.value.macAddress,
} }
console.log('查询:', item); console.log('item:',item)
}; //查询数据
getVoiceCommandsData(item).then(res => {
VoiceCommandData.value = res.rows
})
}
loadData()
const handleExport = () => { const handleExport = () => {
console.log('导出:', queryParams.value); console.log('导出:', queryParams.value);
...@@ -26,18 +96,16 @@ const handleExport = () => { ...@@ -26,18 +96,16 @@ const handleExport = () => {
// 重置 // 重置
const resetSearch = () => { const resetSearch = () => {
queryParams.value = { queryParams.value = {
alarmStatus: '', stationId: '',
alarmType: '',
startTime: '', startTime: '',
endTime: '', 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(); getEnterprise();
function getEnterprise(){ function getEnterprise(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
...@@ -45,6 +113,43 @@ function getEnterprise(){ ...@@ -45,6 +113,43 @@ function getEnterprise(){
enterpriseId.value = result[0].enterpriseId; 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(){ function getSupplys(){
loading.value = true; loading.value = true;
...@@ -54,38 +159,31 @@ function getSupplys(){ ...@@ -54,38 +159,31 @@ function getSupplys(){
const result = store.getters.getEnterprise(); const result = store.getters.getEnterprise();
if (result) { if (result) {
result.forEach(element=>{ result.forEach(element=>{
let allItems = []
if(element.enterpriseId=== enterpriseId.value){ if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){ if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{ element.serviceCenterList.forEach(center=>{//遍历一级目录下的
let c = []; center.supplyList.forEach(supply => {//拿到一级目录下的然后遍历它二级目录下的
center.supplyList.forEach(supply => { supply.transferList.forEach(unit => {//拿到
let chi = []; allItems.push({ value: unit.unitId, label: unit.unitName })
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{ }else{
element.supplyList.forEach(element => { element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => { 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(); getSupplys();
// 分页
const Page = reactive({total: 2, pageSize: 20, page: 1});
const tableHeaderClass = data => { // 表头样式 const tableHeaderClass = data => { // 表头样式
return 'table-header-class' return 'table-header-class'
} }
...@@ -101,51 +199,7 @@ const handleSizeChange = (val) => { ...@@ -101,51 +199,7 @@ const handleSizeChange = (val) => {
const handleCurrentChange = (val) => { const handleCurrentChange = (val) => {
Page.page = 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) { function handleDetail(row) {
singleDetails.value = row singleDetails.value = row
detailOpen.value = true detailOpen.value = true
...@@ -159,8 +213,16 @@ function handleDetail(row) { ...@@ -159,8 +213,16 @@ function handleDetail(row) {
<div class="search-wrapper"> <div class="search-wrapper">
<el-form style="padding: 10px 0 0 10px" :model="queryParams" :inline="true"> <el-form style="padding: 10px 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="换热站:"> <el-form-item label="换热站:">
<el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false" <!-- <el-cascader :options="options" v-model="stationId" :props="props" collapse-tags clearable :show-all-levels="false"-->
placeholder="请选择" style="min-width: 210px;" /> <!-- 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>
<el-form-item label="IP地址:" prop="ipAddress"> <el-form-item label="IP地址:" prop="ipAddress">
<el-input placeholder="" style="width: 180px" v-model="queryParams.ipAddress"/> <el-input placeholder="" style="width: 180px" v-model="queryParams.ipAddress"/>
...@@ -191,7 +253,7 @@ function handleDetail(row) { ...@@ -191,7 +253,7 @@ function handleDetail(row) {
</el-config-provider> </el-config-provider>
</el-form-item> </el-form-item>
<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="resetSearch" class="add-search-btn">重置</el-button>
<el-button type="primary" @click="handleExport" class="add-search-btn">导出</el-button> <el-button type="primary" @click="handleExport" class="add-search-btn">导出</el-button>
</el-form-item> </el-form-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment