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 = [
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"
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">
......
......@@ -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">
......
......@@ -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">
......
......@@ -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">
......
......@@ -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">
......
......@@ -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>
......
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